ABAP Tips and Tricks #1: Generic Hints

  1. Use the CHECK command instead of an IF statement whenever possible.  This reduces processing time and improves readability.
  2. Use the ON CHANGE OF command instead of developing code to compare current and previous values of a data field.
  3. Use SELECT SINGLE * FROM instead of SELECT * FROM for retrieving a table entry when the full key is known.
  4. Use the EXIT command to leave a loop structure as soon as a specified condition is met.  This reduces needless loop processing.
  5. Use APPEND instead of COLLECT to add entries to an internal table whenever possible.  The former command has less overhead.
  6. Use the AT command within loop processing whenever possible.
Comments