Skip to Content

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

Loop within loop in smartforms

Hi Guys,

I have a case where i get Sales order no. For each line item there are multiple schedule  line items.

The Smart form has to print in table a line item & under it all the schedule line item.

Then the other block will print second line item and then under it multiple schedule line item.

I have driver program which gives me multiple line items & multiple schedule line item in internal table.

For sch line items, i have first column as Line item.

What i have done is SF, is under main window, i have created a loop and check the flag for internal table and put all line item in internal table

under this loop i have created another loop which will loop the sch line item based on where condition of line item.

When i print, i see all line items coming in one go and then under line item comes the sch line items multiple time.

How can i used loop within tin loop to print the

SO ( one time)

   Line item ( 1st)

      Sch line item ( 1)

      Sch line item (2)

  

   Line item ( 2nd)

      Sch line item ( 1)

      Sch line item (2)

Please advice.

Former Member
Not what you were looking for? View more on this topic or Ask a question