03-23-2022 4:32 PM
I have the following loop:
FIELD-SYMBOLS: <fs_data> type any,
<gt_data> type standard table
LOOP AT <gt_data> ASSIGNING <fs_data>.
ENDLOOP.
How can I get the values
in <fs_data> and append them to an internal table?
03-23-2022 10:35 PM
You can do one of the following.
FIELD-SYMBOLS: <LV_ANY> TYPE ANY
<LV_MATNR> TYPE MATNR.
a) DO.
ASSIGN component sy-index of structure <fs_data> to <LV_ANY>.
IF SY-SUBRC IS NOT INITIAL.
EXIT.
ENDIF.
ENDDO.
b) ASSIGN COMPONENT 'MATERIAL_CODE' of structure <fs_data> to <LV_MATNR>>
03-23-2022 10:32 PM
"ASSIGN COMPONENT 1 OF STRUCTURE ..." Search the ABAP documentation and forum for more details.
03-23-2022 10:35 PM
You can do one of the following.
FIELD-SYMBOLS: <LV_ANY> TYPE ANY
<LV_MATNR> TYPE MATNR.
a) DO.
ASSIGN component sy-index of structure <fs_data> to <LV_ANY>.
IF SY-SUBRC IS NOT INITIAL.
EXIT.
ENDIF.
ENDDO.
b) ASSIGN COMPONENT 'MATERIAL_CODE' of structure <fs_data> to <LV_MATNR>>