on 11-20-2008 6:12 PM
Moved to correct forum by Moderator. General wasn't right either.
Hi All.
I need to print "Remarks" only in last page of sap script.
Can anyone please help me on this.
Thanks
Senthil kumar V.
Edited by: Matt on Nov 21, 2008 7:38 AM
Hi Senthil,
at last.
call function 'WRITE_FORM'
exporting
element = 'REMARKS'
* FUNCTION = 'SET'
* TYPE = 'BODY'
window = 'MAIN'
Regards,
Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use &nextpage& = 0 condition for displaying remarks in last page..
you can also do it through your print program
try this....
assign text element to the remarks...
loop at itab
call function write_form
at last.
call function write_form -- in the elements parameter pass the text element used for remarks
endat.
endloop.
this should work
regards
padma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you have 4 possibilities.2 at non main window, 2 at main window.
at non main window.
1. /: IF &PAGE(C)& = &SAPSCRIPT-FORMPAGES(C)&
remarks
remarks
remarks
/: ENDIF
2, /: if &NEXTPAGE& ='0'.
remarks
remarks
remarks
/: ENDIF
at main window
3. Add the remarks at the last item of the main which is printed
4. add a new item to your main (/E)
put your remarks in it.
Change your program in such a way this item will print as last one.
like
/E REMARKS
remarks
remarks
remarks
and in sapscript program add logic at the end.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'REMARKS'
EXCEPTIONS
element = 1
window = 2.
I am sure this will do. Make a choice.
Gr., Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
/:IF &nextpage& eq '0'
Remarks
/:endif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add the following to the sapscript main window.
/E LAST_PAGE_LOGIC
/: IF &V_LOGIC& NE &SPACE&
Z1 <A>Footer</>
/: ENDIF
your sapscript program should have the following logic at the end.
data: v_logic type c.
v_logic = 'X'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LAST_PAGE_LOGIC'
EXCEPTIONS
element = 1
window = 2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In SAPscript, there are a few ways to print text only on the last page. The logical approach depends on whether you are using the MAIN window or a secondary window to print the text. If you are printing this text in the MAIN window, then simply put the words in a text element which prints last. If your footer is outside/below the MAIN window, then you'll want to use a secondary window-based approach.
If using a secondary window, one possibility is comparing the value in SAPscript symbol PAGE with SAPSCRIPT-FORMPAGES. When they are equal, have the text print; otherwise, have nothing print. However, these variables are not exactly the same. To make them 'apples-to-apples', insert a control command in your SAPscript form similar to a formatting command, for example:
/: IF &PAGE(3ZC)& = &SAPSCRIPT-FORMPAGES(3ZC)&
[your END OF PAGE text here]
/: ENDIF
Another option is to simply check if &NEXTPAGE& ='0'. This should achieve the same results.
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.