cancel
Showing results for 
Search instead for 
Did you mean: 

Looping in 2 internal tables in Smartforms

Former Member
0 Kudos

Hi All,

I have a doubt in Smartforms.

I need to loop into 2 different internal tables in the Smartforms and display the data of both the internal tables in the Main Window of the smartforms.

How can this be acheived?

Any pointers or suggestions would be really helpful.

Thanks,

Saher

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can have internal tables ( header and item details.)

create loop nodes for both the internal tables

loop node -- header internal table.

loop node -- item internal table.

create your text nodes... to display both the details

make sure that the second loop is under the first loop. ( drag and drop the second loop over the first loop... u get option to place it after or under the loop )

regards

padma

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

[Looping 2 internal tables|http://www.sap-img.com/smartforms/internal-table-in-smartform.htm]

Regards,

Sravanthi

Former Member
0 Kudos

for example : you have to dispaly header data and item data.

header data like : 4500001234 text amount quantity.

item data like : 4500001234 000010 some other fileds

for this you need to create 2 tables .

first display the header data then you put contditin in item table ..

in the item data table : with in DATA tab ebeln = wa_header-itab-ebeln.

first dispaly the 4500001234 and check the item table with same number(4500001234 ) and display the item data and goes to the nex record 4500005678 and disaply the item data for second record.

the data will display like :'

4500001234 text amount quantity.

4500001234 000010 some other fileds

4500001234 000020 some other fileds

4500005678 text amount quantity.

4500005678 000010 some other fileds

4500005678 000020 some other fileds

Former Member
0 Kudos

Hi,

Create a structure with both internal table fields.

Pass both the intenal table values to that table, and display it.

If possible explin it clearly.

Former Member
0 Kudos

Hi ,

I need to display Payroll details of an employee using Smartforms.

There are 2 internal tables, 1 for Earnings and the other for Deductions. I have created a structure which has fields from both the tables.

Now I want to display the data from both the tables in the Main Window of the Smartforms. When I create 2 loops for 2 different tables, they are not executing simultaneosly and the data is like earnings is displayed first then the deductions.

I want both side by side.

Thanks,

Saher

0 Kudos

how do i define the structure of an internal table in the smartform ( which comprises of fields of two tables in se38)? is it possible 2 do that?

Former Member
0 Kudos

define a type in TYPES tab .... u can declare them as global data using TYPE TABLE OF ....