on 05-11-2011 9:33 PM
Hi,
I am using SAP standard program SAPFM06P and custom SAP script to print PO details.
I have a problem in printing Terms and Conditions page. details are below:
I have FIRST, NEXT pages for data and LAST page for terms and conditions.
for FIRST page, next page is NEXT &
for NEXT page, next page is NEXT &
for LAST page, next page is LAST.
In my LAST page i have only one window(TERMS_CO) with terms and conditions (no Main window here).
With this setting when i print the PO, TC page is not printing.
I tried putting /: NEW-PAGE LAST in my FIRST page main window and i am getting fatal error.
Pls let me know how SAP calls the page sequence & is there any explicit code we need to put in any windows to call terms and conditions page?
Regards,
Sreeni
if it maybe didnt get clear enough, you have to do what dhina said, in your DRIVER PROGRAM, not in the form.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I Solved my own. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
as you have to print the terms and condition on the last page do the following things:-
first call the function 'OPEN_FORM'
AND PROVIDE THE SAPSCRIPT NAME
THEN 'START_FORM'.
THEN 'WRITE_FORM'.
AND PASS THE DATA FROM THE PROGRAM TO BE PRINTED.
AFTER THIS CALL FUNCTION 'END_FORM'.
AGAIN CALL THE FUNCTION 'START_FORM' AND
THIS TIME PASS THE 'LAST PAGE NAME' IN 'START_PAGE' EXPORTING PARAMETER
USE 'WRITE_FROM' TO PRINT THE TERMS AND CONDITION
'END_FORM'
AND 'CLOSE_FORM'
This works great. But what if this last page of Terms & Conditions needs to print TWO pages (the TaC is a Standard Text)?
Example of a 6 Page Purchase Order:
FIRST
NEXT
NEXT
NEXT
LAST
LAST
How do you ensure that the "second" LAST page prints? LAST's next page is LAST but it doesn't print the "second" page. Protect/EndProtect did not work either.
Any thoughts?
try
CALL FUNCTION 'CONTROL_FORM'
command = 'NEW-PAGE LAST
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Sreeni,
The only way to call the last page using the following coding
CALL FUNCTION 'CONTROL_FORM'
command = 'NEW-PAGE LAST'.
Before change the program you should find when you want to call the last page that place you give the code.
Regards,
Dhina..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.