I am new to using field-symbols and having this peculiar problem:
In a program, I am dynamically defining a table where employee subgroups will be columns.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE EXPORTING IT_FIELDCATALOG = IT_FIELDCAT IMPORTING EP_TABLE = NEW_TABLE. * Create a new Line with the same structure of the table. ASSIGN NEW_TABLE->* TO <L_TABLE>. CREATE DATA NEW_LINE LIKE LINE OF <L_TABLE>. ASSIGN NEW_LINE->* TO <L_LINE>.
Next, I intend to summarise this data according to company code, so I defined two other field symbols of type ANY TABLE :
field-symbols: <BUKRS_TAB1> type any table. field-symbols: <BUKRS_TAB2> type any table. ASSIGN NEW_TABLE->* TO <BUKRS_TAB1>. ASSIGN NEW_TABLE->* TO <BUKRS_TAB2>.
However, before I execute COLLECT, I found that these two <BUKRS_TAB1> & <BUKRS_TAB2> already contain the same data as ITAB_FINAL.
Also, attempting to clear any of these field symbols results in CLEAR-ing of other field-symbols too.
Any suggestions for me?