02-17-2022 4:35 PM
Hi,
How can I assign table record into 2 different field symbols in a loop?
I am planning to loop over table and keep reference to the 1st record of the group, so at the end of group I can change the 1st record. Something like:
LOOP AT itab ASSIGNING <fs>.
AT NEW plant.
"store reference of <fs> to <fs_ref>.
ENDAT.
ADD 1 TO lv_counter.
AT LAST.
<fs_ref>-counter = lv_counter.
ENDAT.
ENDLOOP.
02-17-2022 5:32 PM
using ABAP ASSIGN statement, you can assign one field symbol to “point” to the same data another field symbol is “pointing to”
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapassign.htm
02-17-2022 5:32 PM
using ABAP ASSIGN statement, you can assign one field symbol to “point” to the same data another field symbol is “pointing to”
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapassign.htm
02-17-2022 7:06 PM
so, something like this (to do only for the 1st record of the group):
ASSIGN <fs> TO <fs_ref>.