Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Display data in smartform

I have 2 internal tables itab1 and itab2. itab1 has 5 serial nos. and on the basis of sr. no. of itab1, i fill itab2.

If itab1 has values as 1 Mat1, then itab2 has as 1 Sub1.

2 Mat2 1 Sub2

3 Mat3 2 Sub3

4 Mat4 2 Sub4

2 Sub7

I get both the internal tables in the driver program

Now i want to display these records in my smartform as:

1 Mat1

1 Sub1

1 Sub2

2 Mat2

2 Sub3

2 Sub4

2 Sub4 and so on.

Now itab1 and itab2 are 2 diff int. tables.with header data in itab1 and itm data in itab2. Now how do i loop so as to display 1 hdr rec & then its corresp. item data.

replied

You can pass both the internal tables ITAB1 and ITAB2 in the tables parameter of smartform function module.

In Smartforms you can have nested loop structure, loop at ITAB1 first and display the header and for each header read ITAB2 with the si.no and display the items.

hope it solves

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question