2013 Sep 03 4:19 PM
Greetings all,
I have the following situation:
I have a SAPSCRIPT with the following page flow:
HEADER1->HEADER2
HEADER2->HEADER3
HEADER3->FIRST
FIRST->NEXT
NEXT->NEXT
Header1, Header2 and Header3 Pages are Terms and Condition, however they can't be shown when a certain variable has value '5', so i want to skip then, if condition is true.
What i was trying to do was:
(Inside HEADER1)
IF &variable& = '5'.
&NEXTPAGE& = 4 (4 = FIRST PAGE)
NEW-PAGE
ENDIF.
But that didn't give me any results,
PS: The printing program is Standard, so all i can change is inside the ZSAPSCRIPT.
Thank you all for your attention,
Best Regards,
2013 Sep 03 6:36 PM
Hi Jonathan.
When filling the output_parameters, try to set the tdpageslct = '4-'. It will begin the print from page 4.
Greetings all,
I have the following situation:
I have a SAPSCRIPT with the following page flow:
HEADER1->HEADER2
HEADER2->HEADER3
HEADER3->FIRST
FIRST->NEXT
NEXT->NEXT
Header1, Header2 and Header3 Pages are Terms and Condition, however they can't be shown when a certain variable has value '5', so i want to skip then, if condition is true.
What i was trying to do was:
(Inside HEADER1)
IF &variable& = '5'.
&NEXTPAGE& = 4 (4 = FIRST PAGE)
NEW-PAGE
ENDIF.
But that didn't give me any results,
PS: The printing program is Standard, so all i can change is inside the ZSAPSCRIPT.
Thank you all for your attention,
Best Regards,
2013 Sep 03 6:36 PM
Hi Jonathan.
When filling the output_parameters, try to set the tdpageslct = '4-'. It will begin the print from page 4.
2013 Sep 04 1:45 PM
Hello Heber,
Thank you for your answer, however i believe i can only change this output_parameters when calling the Sapscript from the Printing Program... But as i already mentioned, the printing program is Standard, so i can not do any changes to it. Am i right ?
Best Regards,
2013 Sep 04 3:02 PM
Jonathan, you're right, except if you can implement an enhancement in the standard caller code.
Before that, check the link below and try to specify your next page directly in the NEW-PAGE statement.
http://help.sap.com/saphelp_40b/helpdata/pt/d1/8031a9454211d189710000e8322d00/content.htm
[]'s,
Heber
2013 Sep 04 5:38 PM
Thank you very much Fabiano,
I was able to implement an enhancement point on the printing program, that would allow me to change the initial page if my condition was true,
For the record: To call a SAPSCRIPT Form, you must call function OPEN_FORM which has a parameter called OPTIONS of Structure ITCPO, so all i had to do was an enhancement to change the field TDPAGESLCT to 4, if my condition was true.
Thank you for your attention,
Best regards,