cancel
Showing results for 
Search instead for 
Did you mean: 

loop inside loop in smartforms

Former Member
0 Kudos

Hi folks,

I have to display layout like below in the main window,

first row: header data (it_header)

second row: item data (it_item)

i have data into 2 differnt table, I want loop inside loop at smarforms level. Can I do that, at form level.

Please helo me out.?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hii,

You can use nested loop in smartforms.To print header data and item data alternatively use this logic in smartform.

loop header

put text to display header

loop item

put text to display item

endloop "item

endloop "header

Answers (2)

Answers (2)

Former Member
0 Kudos

you can use Tables or loops

for this you can create 1 loop (it_header)

create TABLE1 with (it_header) : here you need to compare with key filed

like wa_header-key filed = wa_header ( loop work area)

create TABLE2 with (it_item) : here you need to compare with key filed

like wa_item-key filed = wa_header ( loop work area)

Former Member
0 Kudos

Hi,

Yes . you can use nested loop. But what is your perfect requirement?

I think for Header and Item data you can directly use Table node. Try to work with it.

0 Kudos

How? Can you explain it.