cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms - two MAIN windows functionality

Former Member
0 Kudos

Hi,

I need to put two MAIN windows functionality on one page of the printout in Smartforms.

It is possible that in one table there will be many lines which should spread to many pages, and it is possible that second table will have also many lines which should spread to many pages. Which table has more lines, the bigger the printout in pages in this table would be.

Is that possible to be done? I defined two main windows with the same window width, but only second main window is filled with data.

Thank you.

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi,

Create a third internal table Itab3 and add one more flag variable in itab3 and do the following changes in itab3.

a) Add five(This number depends on your requirement ) records of itab1 into itab3 and at fifth record keep the value of flag variable to 'X'.

b) After adding the first five records from itab1 proceed the same procedure with Itab2 and add the five records of itab2 at the fifth record of itab2 keep the value of flag variable to 'X'.

Then in the smartform do the following change.

a) Loop at the internal table itab3.

b) Create one more table line for empty space and give that one after printing the line item data.

c) There in the newly created table line give the condition as Flag = 'X'.

Then activate the smartform and run it.

Hope this dicussion will help you.

Regards,

Venkat.

Former Member
0 Kudos

Hi,

Create Two secondary window under main window.

And create table[or template] under each secondary window and specify table names which you want to ouput.

Former Member
0 Kudos

HI,

Build the table itab3 which contains all the fields from two table (itab1 and itab2). Now use these table in the smartform Main window to print as per your requirement.

DO.
 CLEAR L_COUNT.
 READ TABLE ITAB1 INDEX SY-INDEX.
 IF SY-SUBRC NE 0.
    L_COUNT = L_COUNT + 1.
 ENDIF.
 READ TABLE ITAB2 INDEX SY-INDEX.
 IF SY-SUBRC NE 0.
    L_COUNT = L_COUNT + 1.
 ENDIF.

IF L_COUNT EQ 2.
 EXIT.
ENDIF.
"  APPEND data to itab3
ENDDO.

Former Member
0 Kudos

Two tables cannot occur one by another. They have to be printed at the same pages.:

Page 1:

tab1-row1

tab1-row2

tab1-row3

tab1-row4

tab1-row5

tab2-row1

tab3-row2

tab4-row3

tab5-row4

tab6-row5

Page 2:

tab1-row6

tab1-row7

tab1-row8

tab2-row6

tab3-row7

tab4-row8

tab5-row9

tab6-row10

Page 3:

tab2-row11

tab2-row12

Madhurivs23
Participant
0 Kudos

Hay

Can you put a loop to the tables and then increment one counter in the loop and put the condition in the data tab where u will check that one with multiples of 5 or something of how many rows of that table u want to display in one page?

Rgds,

MAdhuri

Former Member
0 Kudos

Hi,

Put one table in Main window and another in a secondary window ... I am also currently doing the same kind of stuff.

Regards

Former Member
0 Kudos

Hello Wojciech,

1. Just create 2 TABLE under MAIN WINDOW and pass the header ,main area and footer details to it.

2. copy the main window to your SECOND page. Incease the size of the main window in SECOND

page as per your requirement.

3. Under FIrst page "General attribute" assign next page as SECOND page. and for SECOND page

keep the next page as SECOND page.

Hope this solves your problem. In case of any problem please revert back.

Cheers,

Suvendu

Former Member
0 Kudos

Hi,

You can define 2 tables in the same main window. So what is the necessity of having other main window.

if your requirement is to print the data available in the 2 tables (one after the other) then it is possible.

Just declare both the tables and your problem is resolved.

what you need to do is to give the internal table loop in the data tab of the table with the first internal table and the other internal table in the second table. it will automatically print the data of the first table and then go for the second one,

Thanks&Regards

Sarves

Former Member
0 Kudos

Hi,

You are getting that result since one smartform can contain only one main window. Having two main windows in smartforms is not possible.

Regards,

Ram.

Former Member
0 Kudos

I know two main windows in smartforms is not possible, I just want to have the functionality with two tables on the printout, which should both expand to many pages depending on the number of rows in each.

Is that not possible at all?

Former Member
0 Kudos

Hi,

we can use the two tables in one main window. But data of the tables will be printed one after another.