2006 Jan 23 2:54 AM
is it possible that i can save my output in SAPSCRIPT in an external file like MS Word?
thanks
is it possible that i can save my output in SAPSCRIPT in an external file like MS Word?
thanks
2006 Jan 23 3:33 AM
You can convert to PDF formats using
SX_OBJECT_CONVERT_OTF_PDF
Conversion From OTF to PDF (SAPScript conversion)
Also see <a href="http://searchsap.techtarget.com/tip/1,289483,sid21_gci933581,00.html">Get SAPScript output as PDF</a>
Ps: Reward points if helpful.
2006 Jan 23 3:46 AM
Hi!
First get SAPScript output as OTF:
options-tdgetotf = 'X'.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
options = options
...
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
otfdata = it_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
OTHERS = 5.
Then convert it to PDF:
DATA:
it_pdf LIKE tline OCCURS 100 WITH HEADER LINE,
v_len_in LIKE sood-objlen.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
ARCHIVE_INDEX = ' '
IMPORTING
bin_filesize = v_len_in
TABLES
otf = it_otf
lines = it_pdf
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4
.
Then download it_pdf as binary using DATASET or WS_DOWNLOAD.
Hope it helps.
Regards,
Maxim.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |