Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Spool Request Number

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

10 REPLIES 10

Former Member
0 Kudos

Hi

Use this FM 'CONVERT_ABAPSPOOLJOB_2_PDF'

Thanks

0 Kudos

Hi krk how should i use that FM can you please give me the procedure?

waiting for your reply...

0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

Hi

I already pasted the code..

TSP01 is the table name where you have spool numbers.

Thanks

0 Kudos

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

Former Member
0 Kudos

Hi,

Goto SP01 or system->own spool requests,

then get the spool which want

regards

Shiva

Former Member
0 Kudos

hi

check table TSP01 for spool numbers ..

regards,

vijay..

mithun_shetty4
Contributor
0 Kudos

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