cancel
Showing results for 
Search instead for 
Did you mean: 

looping internal tables and Page selection

Former Member
0 Kudos

Hi ,

I have a unique requirement as follows,

2 internal table it_header( with 2 rec say) , it_item( 10 rec, 6 corresponding to first rec in header and 4rec corresponding to second record say )

Now i have to print the details of it_header( first rec) in header_layout and print 6 pages of item layout. Then second record in header must be printed in header_layout then the 4 page of item.

Sure point for pointers ,

Arun T

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Do it like this, create program lines in your smart form..

global declaration --> create internal table which has both header and item details

in program lines

Populate the 1st header line into corresponding header fields( into the above newly created internal table)

then populate the 6 corresponding items into the corresponding item fields..( into the above newly created internal table)

do the same process for next records...

Now in your table,

read this new internal table..

IF <HEADER-FIELDS> NE ' '. " in this new internal table

    • print header fields.

ELSEIF <ITEM-FIELDs> NE ' '.

**print item fields

ENDIF.

I guess this idea will help to solve your problem.

Regards,

SaiRam

Answers (0)