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
I get both the internal tables in the driver program
Now i want to display these records in my smartform as:
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.
Lavanya Kumar 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