Skip to Content
0
Former Member
Sep 15, 2007 at 07:03 AM

deep struct+output format

19 Views

Q3]] An example creates two internal tables TAB1 and TAB2. TAB2 has a deep structure because the second component of LINE2 has the data type of internal table TAB1. LINE1 is filled and appended to TAB1. Then, LINE2 is filled and appended to TAB2. After clearing TAB1 with the REFRESH statement, the same procedure is repeated

LOOP AT TAB2 INTO LINE2.
  WRITE: / LINE2-FIELD1.
  LOOP AT LINE2-FIELD2 INTO LINE1.
    WRITE: / LINE1-COL1, LINE1-COL2, LINE1-COL3.
  ENDLOOP.
ENDLOOP.

The output is:

A

abc 12 3

def 34 5

B

ghi 56 7

jkl 78 9

How would the output come as<b>:

the dots are there to explain the output without any use</b>

A.... abc 12 .............. 3

...... def 34 ...............5

B..... ghi 56 ................7

........ jkl 78 ..................9

Regards

Abaper.learner