Supported by

Best practices
Thou shalt not SELECT *

Always try to select only the fields you’ll need. Selecting others is a waste of resources.
Exception made for the use of FM *_SINGLE_READ because, even though these do select all fields, since they cache the data, they are still faster when used multiple times for the same key.
If you just want to check if a record exists, select just one field, if possible the one you’re using as criteria to avoid declaring an extra variable. Example: SELECT KUNNR INTO V_KUNNR FROM KNA1 WHERE KUNNR = V_KUNNR.
https://abapinho.com/2010/11/select-todos-os-campos/ (portuguese)

2 comentários a “Thou shalt not SELECT *”

  1. SAP Yard Diz:

    SAP site with a difference. Really like your page.


  2. Nuno Godinho Diz:

    Thanks! Glad you like it :)

Deixe um comentário

About Abapinho
Abapinho runs on WordPress
Articles (RSS) e Comments (RSS).