on 03-07-2011 9:21 AM
Hi everyone,
I am trying to create a smart form with following requirements, but unable to understand how this will be achieved:
1) I have one smart form which contains 4 pages.
2) I have one internal table which contains employee # and name fields. Lets say there are 50 records in internal table.
3) First page should show employee # and name from internal table along with some static text.
4) Second, third and fourth page contains only static text.
Now when I will preview smartform, this should show me information of first employee on 1st page and then remaining 3 pages should appear. On 5th page information of second employee should appear and remaining 3 pages should appear as is, and so on....
So, for 50 employees total (50 * 4 = 200 pages) should be shown in preview window.
Thanks for the solution in advance.
Waqas Rashid
Hi
1. First you desgine the four pages as per your requirment.
2. Loop your internal table in form and display the customer number in page1.
once after displaying the first customer,use the command in from to goto next page in form.
3. For page1 keep next page as page2 and so on.
4. For page4 keep the next page as page1.
In end of page 4, write the code in program line.To delete the Customer form Internal table.Always use index 1.
since it goes again to page1 starts the loop again there you have new customer.
in this way after displaying the page 4,it goes to page 1 again and starts with new customer.
Regards,
Raghu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Raghu for your solution. I have checked, this is working.
You have mentioned in step 4 that I will have to delete employee from internal table. I have not deleted but still it is working.
There is a small problem, which is: I have only 2 records in internal table, but when I preview the form it shows me one extra blank page (page 1).
Can you tell me how to remove this blank page.
Thanks,
Waqas Rashid
Is blank page is appering at end or in between first customer and second customer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Waqas,
this is a bit a matter of taste.
In my personal taste i would rather call the smartform for every employee in your itab than just calling it once.
Achieveing that in print program is well, quite easy, Just call your smartform in a loop over the employees.
Then your smartform should be pretty easy.
Page 1: output your employee. have page2 as following page assigned
page 2: output static texts.have page3 as following page assigned
page 3: output static texts.have page4 as following page assigned
page 4: output static text
done.
So if you are processing the smartform several times with SAME spooltitle and suffix, they will all get into ONE spool unless you customized the output types otherwise.
So in the end you should have your desired spool.
In SAP itself when hitting the print preview button you get ONE print preview with 4 pages (1-4), and when you hit BACK (green arrow) you will get to the next preview (again four pages) and so on...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Florian,
Thanks for the prompt reply. Actually over here this is not the matter of taste; instead this is matter or user acceptance. Like; this form will be printed for 1000 + employees. So you can imagine pressing back button 1000 times is not practical at all.
What I want, user should simply run the report and print all pages in one shot.
Thanks,
Waqas Rashid
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.