on 10-12-2008 8:23 AM
hi experts,
can somebody tell me how to get the print preview of sap script
while getting the otf data.
I have set the ITCPO-TDGETOTF = 'X' option in OPEN FORM but when i give it its not showing the output. How can I see output ?
Hi Ajay,
I also have the similar requirement of populating print preview and also get the otf and send it to mail.
For mail I am able to send but I am not getting the print preview.
Could you please tell me how did u resolve the issue .
Thanks
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ajay,
TABLES ITCPO.
DATA: T_OTF TYPE TABLE OF ITCOO.
ITCPO-TDGETOTF = 'X'.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZPRG_TEST'
OPTIONS = ITCPO
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
OTHERS = 11.
IF SY-SUBRC 0.
ELSE.
CALL FUNCTION 'CLOSE_FORM'
TABLES
OTFDATA = T_OTF
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
OTHERS = 5.
ENDIF.
Check this code ok.
why dont you try giving a pdf preview which will be possible.
Regards,
Midhun Abraham
Edited by: Midhun Abraham on Oct 12, 2008 11:01 AM
Edited by: Midhun Abraham on Oct 12, 2008 11:05 AM
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.