Skip to Content
0
Former Member
Oct 04, 2011 at 05:46 AM

Smartform - Loop issue not printing correctly

58 Views

Hi,

In smartforms -Main Window - I created like this

1.Loop Statement - This will loop - ITAB1

TEXT statement - ITAB1-ADRNR - (prints the address)

within the loop

ITEM_DATA (item data) table. - This will Loop ITAB2 - where ADRNR = ITAB1-ADRNR

This supposed to put line items which are having ADRNR from ITAB1

But my program is printing in wrong way..

it is printing

ADDRESS1 - ITAB1-ADRNR - correct

ITEM DATA - from ITAB2- related to ADRNR (if it has only 1 record) - correct

ADDRESS2-ITAB1-ADRNR - correct

ITEM DATA - from ITAB2 - where ADRNR = ITAB1ADRNR - if this condition satisfies more than 1 record

supposed to print all the records - but instead it is printing always the first record - wrong

Ex- if 3 records has the same ADRNR of ITAB1 in ITAB2 - it is actually printing 3 times the first satisfying record - Wrong

Can anyone please tell me what is the issue?

Thanks for your time.

Kevin