Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Display 2 different internal tables in main window at same time

former_member391265
Participant
0 Kudos

Hi Abapers, I have gone through the search but unfortunately i have not got my solution exactly. therefore, I am putting my query here I need to display 2 different internal tables data in Main window simultaneously in smartforms. Lets say, vbak table data (3 fields) and sflight table data (2 fields).  What i am aware of is we can loop only 1 internal table at same time. If you know any solutions  or sample example for my above query, I would appreciate that. Thanks in Advance.!!

6 REPLIES 6

Former Member
0 Kudos

Hi,

I have used in Adobe forms I am not very sure about scripts....

Regards,

Ravi Shankar.L

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

If you need nesting tables look here:

Regards.

0 Kudos

Hi KSRCM SRCM,

1) If you want to LOOP through two tables and show them in MAIN, you can create two TABLEs and loop them.

2) If you want the two tables to begin from the same line, then you can give the total length of the first table as 10 cm and second table as the length of your MAIN (say 22 cm for example)

Say your first table VBAK has 3 column nd other table SFLIGHT has 2 Column

Column widh for table VBAK = 10 cm

Col 1 = 3 cm     Col 2 = 3 cm and Col 3 = 4 cm (Total 10)

Column width for table SFLIGHT = 22 CM

Col1 = 10 cm ( dummy column which is above or below table VBAK)

Col 2 = 5 cm (actual first column of SFLIGHT)

Col 3 = 7 cm (actual second column of SFLIGHT)

Total = 22 cm

3) Else, you can create two separate secondary windows on top of MAIN. Fit the two windows to hide MAIN window exactly.

Now create one table each in two secondary windows and LOOP and display your data.

Hope this helps.

Cheers.

Raju Shrestha

<removed by moderator>

Message was edited by: Manish Kumar

Former Member
0 Kudos

Hi KSRCM,

If you need to print 2 tables, you should have a common field in both the internal tables so that you can loop in the first table and loop/read the second table based on that common field.

Create a code window, build one new internal table with the fields to be printed from both the tables and use that internal table to loop and display the data in the output.

Hope this helps.

Regards,

Phani

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Using Excel can you show (Screen shot) the requires output.

Regards.

former_member202818
Active Contributor
0 Kudos

Hi KSRCM,

I would suggest you to combine both internal table into one... and use a simple trick in smartform line type..

Total is one table and flight details is another table, but for smartform both combined into a single table.

Line Type design

Regards

Sreekanth