cancel
Showing results for 
Search instead for 
Did you mean: 

Looping Address and Main Box in Smartforms

Former Member
0 Kudos

Hi,

In smartforms...

I have a box to print address and after that next box(MAIN) for line item details.

My requirement is - I need to loop these 2 boxes..

Example

I have internal table with 9 records - which has 3 different address each having 3 line items

Then I need to display something like this...

address 1 -

Line items details - 1

Line items details - 2

Line items details - 3

Address 2 -

Line items details - 4

Line items details - 5

Line items details - 6

Address 3 -

Line items details - 7

Line items details - 8

Line items details - 9

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

You have to print all in the MAIN

Max

Former Member
0 Kudos

Hi Max...

Thanks for reply..

In Main how to loop the boxes.. (Address is in box format - not the line item format)

so how do you loop these boxes in the Main

Can you please share more info on this..

Thanks for your time.

Former Member
0 Kudos

Sorry

I've understood both elements are in MAIN

What does BOX meam? Is it a template?

You can create another internal table with the address, so you can loop the table with the item nested into the loop of the table with address:

LOOP AT T_ADDRESS.
   ------->Print Address data
  LOOP AT T_ITEM WHERE ADDRESS = T_ADRESS.
   --------> Print Item data

Max

former_member230486
Contributor
0 Kudos

Hi Friend,

In a main window you have to take template for address and table for item details.You just follow what Max said.