on 11-13-2007 4:40 AM
Hi experts,
I just want to know is there any standard program that converts standard script to document format.
Thanks in advance.
Regards,
Nagaraju.
Hi
Try to use the program RSTXPDFT4.
RSTXPDF3 to customize the PDF conversion
If you want to go to PDF, there is another approach. There are SAP functions to convert SPOOL to PDF. They are CONVERT_ABAPSPOOLJOB_2_PDF and CONVERT_OTFSPOOLJOB_2_PDF. What you can do here is schedule your report as one step in a job and then your post processing as another step. You can use GET_JOB_RUNTIME_INFO to get the jobcount and jobname of the currently running job. You can then read back in table TBTCP to get the spool list number (listident) of a previous step.
Example:
clear jselect.
*jselect-jobname = '*'.
jselect-username = '*'.
****Have this program get its own Job Name
call function 'GET_JOB_RUNTIME_INFO'
importing
* EVENTID =
* EVENTPARM =
* EXTERNAL_PROGRAM_ACTIVE =
jobcount = jselect-jobcount
jobname = jselect-jobname
* STEPCOUNT =
exceptions
no_runtime_info = 1
others = 2.
****Read the spool number for this job step.
clear tbtcp.
select single listident from tbtcp
into tbtcp-listident
where jobname = jselect-jobname
and jobcount = jselect-jobcount
and stepcount = step.
if tbtcp-listident = 0.
message i009 with step.
endif.
data: spool_id like tsp01-rqident.
move tbtcp-listident to spool_id.
****Is this ABAP List Processing?
if abap = 'X'.
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = spool_id
* NO_DIALOG =
* DST_DEVICE =
* PDF_DESTINATION =
* IMPORTING
* PDF_BYTECOUNT =
* PDF_SPOOLID =
* LIST_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
tables
pdf = ipdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
if sy-subrc <> 0.
message i016 with sy-subrc.
endif.
else.
****Or is this SAPscript?
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
exporting
src_spoolid = spool_id
* NO_DIALOG =
* DST_DEVICE =
* PDF_DESTINATION =
* IMPORTING
* PDF_BYTECOUNT =
* PDF_SPOOLID =
* OTF_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
tables
pdf = ipdf
exceptions
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
if sy-subrc <> 0.
message i016 with sy-subrc.
endif.
endif.
Regards
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.