Skip to Content
0
Former Member
May 06, 2013 at 09:55 AM

Dynamic Internal Table - Issue with assignment of values in specific format

27 Views

I have an internal table (refer Table 1 below) from which I need to pass certain values to a dynamic Internal table.

I have managed to build the dynamic internal table required, but the issue I face is how to transfer the values in the format as seen in Table 2 below.

When I do the below I am able to get the specific values required, but then I am not sure how I should proceed after this.

LOOP AT it_table1 ASSIGNING <fs_it1>.

ASSIGN COMPONENT 2 OF STRUCTURE <fs_it1> TO <fs1>.

ASSIGN COMPONENT 4 OF STRUCTURE <fs_it1> TO <fs2>.

ENDLOOP.

I did quite an extensive search in this & other forums, but couldn't manage to find a clue.

If this query has been addressed before please help to point me to the right thread or if further clarification is needed let me know.

Table 1:

CategoryTypeSubjectValue - 1Value - 2Value - 3Value - 4Value - 5TotalAAXX01A10 10 20ABXY02B 5 15525ACXX03C15 5 20AAXX01D20 15 35

Table 2:

Dynamic Table for Value - 1 (dynamic table created based on column - Type of main internal table)CategoryXX01XY02XX03XX01TotalAA10 10AB 0AC 15 15AA20 20