Friday, March 04, 2011

Field symbols - the advantage

Hi,

Good day to all, this is my first blog ever. Hope you will find this useful as I will start from this topic -> abap field-symbols.


In this topic, I will teach you how field-symbols may help optimize your abap code:

Backgound: field-symbols is usually used for a generic data types.

Uses:

For example, if you want to increase the performance of your LOOP statement then you may use field-symbols this way:

FIELD-SYMBOLS <wa_itab> like any line of itab.

LOOP AT itab assigning <wa_itab>

  <wa_itab>-name1 = 'someone'.

ENDLOOP.

If you'll notice, there is no update or modify statement for itab, it is because <wa_itab> is already pointing to the line index of the itab thus automatically updating it.

Please comment...

Thanks!

No comments:

Post a Comment