"Similar use case to using field symbols: In a loop across an internal table,
"you assign the content of the line in a data reference variable
"instead of actually copying the content to boost performance.
"Again, the inline declaration comes in handy.
"Filling an internal table.
SELECT *
FROM zdemo_abap_fli
INTO TABLE @DATA(fli_tab).
LOOP AT fli_tab REFERENCE INTO DATA(ref).
"A component of the table line may be addressed.
"Note the object component selector; the dereferencing operator together
"with the component selector is also possible: ->*-
ref->carrid = ...
...
ENDLOOP.
"More statements are available that assign content to a data reference variable,
"for example, READ TABLE.
READ TABLE fli_tab INDEX 1 REFERENCE INTO DATA(rt_ref).
Serkan AKKAVAK
Computer Engineer BSc
Head of SAP & Software Department
Contact : serkurumsal@yandex.com
0 Comments