on 01-27-2010 5:04 AM
Hi,
I have problem with sapscript. The sapscript is customized by coping standard PO, RFQ etc printing sapscript, MEDRUCK. The print(driver) program is still standard.
My problem is when all the line items are printed, i need to print a text at last. This text should be in MAIN window.
The last thing which is getting print in each line item is Item Text by using standard Text Element.
When i put the text after line item in MAIN window, it printed that Text in all the pages. But my requirement is to print the Text only in last page.
Can anyone please give me any idea on how can i proceed for this problem.
Thank you in Advance!!
Define a smaller area that's just below the main window and add the nextpage condition there. In the main area nextpage isn't zero because it's still printing the main area.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think this problem can be solved in SAPSCRIPT! How can the last page be detected in SAPSCRIPT when it's unknown how many more windows and text elements are to be written by ABAP?
If it were me, I would copy the standard print program (or make an enhancement or modification if it's okay). Add another text element in your MAIN window with your text and in the ABAP, call FM WRITE_FORM for that text element before the CLOSE_FORM is called ito write the text on the last page.
Edited by: Erik Peterson on Jan 28, 2010 8:28 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI mala_swa,
Try to use this.....this may resolve ur problem....
Code it in main window.
/: If &nextpage& = 0
Include ur text
/:endif
Thanks
Ganesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Ganesh/ Greg,
Thank you both for your response...
I tried both the ways but its not working..
In MAIN window, when i wrote this statement &SAPSCRIPT-FORMPAGES& with command line value /: ,
And after that when i debug that sapscript i found &SAPSCRIPT-FORMPAGES& = 0. Which is not true becoz i know thr is total no of pages is 1.
In MAIN window, when i wrote this statement &NEXTPAGE& with command line value /: ,
And after that when i debug that sapscript i found &NEXTPAGE& ='2'. Which is not true becoz i know thr is only one page and nextpage shud be 0.
When i write same code with command line value * then only i see &SAPSCRIPT-FORMPAGES& = 1 and &NEXTPAGE& ='0'.
So it means &SAPSCRIPT-FORMPAGES& and &NEXTPAGE& is not giving correct value when i am writing these in command line /:
But becoz i have to write IF statement so i have to use command line value /:
Don't know what to do now....
Please help!!!
thanks.
Hi,
I'm not very familiar with sapscripts, but I think this can help (in MAIN window):
IF &PAGE& EQ &SAPSCRIPT-FORMPAGES&
/* your text include here
ENDIF
.
Best regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.