I am using a single program to upload data into many tables(only one at a time).
The table name is a parameter to the program. Following is a snippet of the code I have. I need help in moving from the internal table(itab) to the table structure (<tab>) which I use with the modify command.
parameters: p_table(20) default 'ZTEST'.
DATA dref TYPE REF TO data.
DATA tabdref TYPE REF TO data.
FIELD-SYMBOLS <fs_struc> TYPE ANY.
FIELD-SYMBOLS <fs_tab> TYPE table.
CREATE DATA dref TYPE (p_table).
ASSIGN dref->* TO <fs_struc>.
CREATE DATA tabdref TYPE TABLE OF (p_table).
ASSIGN tabdref->* TO <fs_tab>.
perform read_from_excel into an internal table - itab
itab has fields col1, col2, col3, col4
-- I NEED TO MOVE FROM INTERNAL TABLE itab to <fs_tab>
(The table will not have more than 4 fields + mandt)
modify (p_table) FROM TABLE <fs_tab>.
PS: This is my first time in the SDN network. So, I hope this is the correct forum. It would be great, if u could provide detailed code, as I have been stuck for quite some time with this and need to resolve it at the earliest.