‎2014 Feb 20 6:20 AM
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.
‎2014 Feb 20 6:26 AM
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
‎2014 Feb 20 6:33 AM
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).
‎2014 Feb 20 6:49 AM
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???
‎2014 Feb 20 6:52 AM
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.
‎2014 Feb 20 7:17 AM
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??
‎2014 Feb 20 7:24 AM
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.
‎2014 Feb 20 7:27 AM
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
‎2014 Feb 20 7:34 AM
Thanks Nabheet. I will try to develop your logic and let u know.
‎2014 Feb 20 7:36 AM
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
‎2014 Feb 20 6:33 AM
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
‎2014 Feb 20 6:37 AM
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.
‎2014 Feb 20 6:48 AM
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
‎2014 Feb 20 6:55 AM
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.
‎2014 Feb 20 7:02 AM
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
‎2014 Feb 20 7:11 AM
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.
‎2014 Feb 20 6:57 AM
In google search using the following keyword "labels smartforms" , click on the first link and you will get the idea.
‎2014 Feb 20 7:36 AM
One of my ex-colleagues did it long time back. Roughly, I remember she used template under loop inside the main window.
‎2014 Feb 20 10:53 AM
‎2014 Feb 23 6:01 AM