05-28-2007 7:31 AM
Hi Friends,
When i am trying to convert the output to PDF Format by running standard program RSTXPDFT4 in editor it is asking for spool ..... so how will i get that spool number ...can anybody help me please...
Regards,
Naveen
05-28-2007 7:37 AM
Hi,
First u need to print the script form .
wen u go for PRINT TEST , in that u have to select PRINT and not the print preview.
then a spool will b egenaerted with a number.
wen u r going to save ur script as pdf , give that spool no. in rstxpdft4.
it will save the script in pdf format.
Revrt back if nay issues.
Reward with points if helpful.
Regards,
Naveen
05-28-2007 7:36 AM
05-28-2007 7:37 AM
Hi krk how should i use that FM can you please give me the procedure?
waiting for your reply...
05-28-2007 7:38 AM
Hi
Before that you use this FM
GET_JOB_RUNTIME_INFO .
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.
You get jobcount and jobname here.
..
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.
05-28-2007 7:37 AM
Hi,
First u need to print the script form .
wen u go for PRINT TEST , in that u have to select PRINT and not the print preview.
then a spool will b egenaerted with a number.
wen u r going to save ur script as pdf , give that spool no. in rstxpdft4.
it will save the script in pdf format.
Revrt back if nay issues.
Reward with points if helpful.
Regards,
Naveen
05-28-2007 7:40 AM
hi naveen,
thanks for your reply... but i want to convert a normal report output to PDF...
so in normal report output how can i get the spoll number.....
reward points are assured for good answers
regards,
naveen.
05-28-2007 7:44 AM
Hi
I already pasted the code..
TSP01 is the table name where you have spool numbers.
Thanks
05-28-2007 7:47 AM
Hi,
after displaying the output.
MENU option > list> print.
now a spool will be genaerated in the status bar.
give that spool in that.and u can save that report in pdf format.
Reward with points if helpful.
Regards
Naveen
Message was edited by:
Naveen Deva
05-28-2007 7:38 AM
Hi,
Goto SP01 or system->own spool requests,
then get the spool which want
regards
Shiva
05-28-2007 7:39 AM
05-28-2007 7:45 AM
Hi Naveen,
Goto Transaction SP01 to Display all the Spools requests.
Now use this Spool No in the Below mentioned Progam.
Award if Helpful
Regards,
Mithun