Application Development and Automation 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: 
Read only

Problem with multiple windows in smartforms.

Former Member
0 Likes
2,367

Dear All,

I have to develop a situation like this:

All these windows should come in one page....i, e per page 4/6 windows will be there. Actually this is the same problem, i discussed in my previous thread. Now the requirement has changed. Every page should have 4/6 windows and Container no will be 1 of 3, 2of 3 and so on. If total container no. = 12, then two page will print with six windows in each page. And all windows should show no of container one by one.

Please give me idea.

Thanks,

With regards.

19 REPLIES 19
Read only

VijayaKrishnaG
Active Contributor
0 Likes
2,329

Hi Taniya,

Will all these windows contains same data or differ like different batch number or Mat.Doc.No?? And Now how do you need numbering, whether 1 or 6 or 1 of 12?

-Vijay

Read only

0 Likes
2,329

Thanks Vijay. All the windows contains only one mat doc no....the difference is rather than pages now the windows will show container no as 1 of 3,  2nd window as 2 of 3 (when total cont no= 3, 1st window will show cont no as 1 of 3, 2nd window will show cont no as 2 of 3 and so on).

Read only

0 Likes
2,329

Taniya, is there any relation with Number of windows and Total No. of containers?? I mean to know that is number of windows = Total No. of containers???

Read only

0 Likes
2,329

No...not at all. Number of windows are same for all document no. Total no of containers are different. Rather there are radio buttons, selecting them user can choose to see 6 windows or 4 windows in one page.

Read only

0 Likes
2,329

Taniya,

You mentioned that if Counter number = 12, then two pages will get with 6 windows in each, So there will be a relation.

In this case you need to get Numbering as 1 of 12, 2 of 12... 6 of 12 in PAGE 1 and 7 of 12... 12 of 12 in Second page, Am I right??

Read only

0 Likes
2,329

You are right .Here number of windows are fixed. If Counter number = 50 then 50/6 = 9 pages with 6 windows in each page will be the result.

Read only

0 Likes
2,329

Taniya

Let says you enter 100 as counter so its going to print 17 pages as 6 label on each.

Insert a loop which will run 100 times. keep a global variable which will increment after each iteration after printing the label contents. Once it reaches 6 you insert a command of page break and clear the variable so that next time when it becomes 6 you repeat the same

Nabhete

Read only

0 Likes
2,329

Thanks Nabheet. I will try to develop your logic and let u know.

Read only

0 Likes
2,329

Taniya I am assuming a case having 12 containers and User selected 6 Windows per page.

1. Create 6 Templates in Main Window.

2. Place condition on 5 and 6 templates as If No.of Windows per page > 4 (Window_count).

3. Loop the Internal table in MAIN Window and write a logic as IF SY-TABIX > Window_count make a flag = 'X' and delete records in ITAB 1 TO window_count.

4. Create a Command in loop as next page same PAGE 1 and place a condition IF FLAG = 'X'.

Regards,

Vijay

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
2,329

Hi Taniya

What if you only have one Main Window on the layout. In your table after every 6th line you do a page break..

Nabheet

Read only

0 Likes
2,329

Hi Nabheet,

Thanks for your reply. Table contains only one data. This data will show in all windows. Only Container no will increase based on total container no. i, e total cont no = 3, so 1st window will show Cont no as 1 of 3, 2nd will show Cont no as 2 of 3 and so on.

Read only

0 Likes
2,329

Taniya

Will your smartform only have one line if yes and number of containers will be fixed then you can hardcode container in secondary windows as 1,2,3 but if number of containers to be printed on each page can change then you may have to use main window. Else if all constant simply create 6 secondary window harcode container number rest read from internal table

Nabheet

Read only

0 Likes
2,329

No, I am passing only one parameter, so smartform has only one line but number of containers are not fixed. Number of windows are fixed.

Read only

0 Likes
2,329

Hi Taniya

I would have done it by keeping only one MAIN window and looping as many time as prints are required. I would not have used fixed windows

Nabheet

Read only

0 Likes
2,329

If this can be done is also appreciated. Can you plz tell me how u will do that? Of course the Cont. no field will update as i told.

Read only

Former Member
0 Likes
2,329

In google search using the following keyword "labels smartforms" , click on the first link and you will get the idea.

Read only

Former Member
0 Likes
2,329

One of my ex-colleagues did it long time back. Roughly, I remember she used template under loop inside the main window.

Read only

Former Member
0 Likes
2,329

If possible then please give screen shot for form painter

Read only

Former Member
0 Likes
2,329

Thanks to all. The problem is solved now