2023 Jun 20 10:13 AM
Hi Friends,
I have created the Dynamic internal table. The screen shot is given below.
Then I uploaded the data from excel. The screen shot is given below.
now my requirement is, to move the uploaded data to a dynamic table.
Thanks with regards,
Vallamuthu M.
2023 Jun 20 10:35 AM
please see https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abencorresponding_constr_mapping.htm
BTW,you can also use loop statement
2023 Jun 20 10:35 AM
please see https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abencorresponding_constr_mapping.htm
BTW,you can also use loop statement
2023 Jun 20 10:43 AM
please, do not make screenshot of code, copy/past and use [CODE] button
2023 Jun 20 10:48 AM
HI xiaosanyu,
Thanks for your update. But in the Dynamic table, a few fields are changing, so I am not able to find the struct1(dynamic table) field name.
Thanks with regards,
Vallamuthu M.
2023 Jun 20 11:09 AM
LOOP AT lta_split INTO DATA(ls_split).
APPEND INITIAL LINE TO <fs_dyn_table> ASSIGNING FIELD-SYMBOL(<fs_row>).
LOOP AT gt_fcat INTO DATA(ls_fcat).
ASSIGN COMPONENT ls_fcat-fieldname OF STRUCTURE <fs_row> TO FIELD-SYMBOL(<fs_cell>).
CHECK sy-subrc = 0.
CASE ls_fcat-fieldname.
WHEN 'VKORG'.
<fs_cell> = ls_split-col01.
WHEN ''.
ENDCASE.
ENDLOOP.
ENDLOOP.
2023 Jun 20 11:10 AM
vallamuthu.madheswaran2
please try, gt_fcat is your dyn_table fieldcat
2023 Jun 20 11:18 AM
Hi Vallamuthu,
Check if assign component fit your needs, you can access by index of a structure to move to a field:
ASSIGN COMPONENT sy-index OF STRUCTURE <fyn_dyn_line> TO FIELD-SYMBOL(<field_to>).
ASSIGN COMPONENT sy-index OF STRUCTURE ls_split TO FIELD-SYMBOL(<field_from>).
Regards, Fernando Da Rós