2009 Feb 19 6:03 PM
Hi All,
I have a requirement to print certain number of pages in a SAP script based on some conditions? The script has total of four pages. Based on certain conditions i want to print only two of them.
I had put a check in the text elements for the script but it prints blank pages.
Any pointers to this will be highly appreciated?
Thanks and Regards,
Nilesh.
2009 Feb 19 10:58 PM
Nilesh,
Please remove the check statement and try this:
/: IF &SAPSCRIPT-FORMPAGES(C)& = 1 or 2 or 3 or 4 etc (the pages you do not want to print)
/* *** Statement
/: ELSEIF
/* ****
/: ENDIF
Blacky.
2009 Mar 18 12:05 PM
hi,
Use the START_FORM function module in your report program, to call a certain page of a script.
Secondly, while using this start form don't forget to use the counter function module i.e END_FORM while you call the next start_form based on the condition else it results in unwanted behavior.
Regards
Sharath
2009 Mar 18 12:13 PM
Hi,
Create only 2 pages,
Assign First page next page Second
Second page next page Second
All the remaining contents of the 3 and 4 page on second page only
Just use the Text elements of the 3 and 4 page in the IF and ENDIF, means to get printed only when condition satisfied.
Just review any standard sapscript MEDRUCK which uses one sapscript to print PO, RFQ, etc
how the IF and ENDIF conditions are used for the Text elements.
Regards
Bala Krishna
2009 Mar 18 12:20 PM
Hello
This link check this http://help.sap.com/saphelp_nw70/helpdata/en/d6/0db875494511d182b70000e829fbfe/frameset.htm
2009 Mar 19 12:25 PM
first u fecth all data in OTF then in otf loop u can put conditon and then print