cancel
Showing results for 
Search instead for 
Did you mean: 

two loops in smartforms

Former Member
0 Kudos

Hello Friends,

I'M Using two loops in smartforms in which i want to print data like this:

loop1

only 6 records to be printed

endloop.

loop2

only 6 records needs to be printed

endloop

only if both the loops printed 6 records it should continue printing more thn 6 records in the next page.

how to put such condition such tht after printing 6 records in both the loops it should go to next page.

how to achieve tht??

Regards,

Sunny

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use a Program lines Node between loops and Increment a Counter after displaying each item by 1. Put a Command node and give Nex page in that when Counter > 6.

Answers (3)

Answers (3)

Former Member
0 Kudos

tnks

Former Member
0 Kudos

you have create the 2 tables in MAIN window. for each internal table you have to pass the some common value like

itab1.

VBELN- POSNRMATNR

12345-- 000010 3456

12345 --000020 6734

itab2

POSNR-- WRBTR---LIFMG like

000010-- 1000-- 3

000020- 2000-4

2nd TABLE -> in DATA tab> put condtion like POSNR = itab1-posnr.

baed on posnr it display the data....

Former Member
0 Kudos

Hi Sunny

Just use a variable (counter variable) in both loops which will get incremented by 1 only when one item is printed

and u can give condition in next page that it should print only if both counter variables of two loops is equal to 6

Hope it helps

Regards

Vikas C