Application Development and Automation 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: 
Read only

Spool Request Number

Former Member
0 Likes
1,186

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
Read only

Former Member
0 Likes
1,121

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
Read only

Former Member
0 Likes
1,121

Hi

Use this FM 'CONVERT_ABAPSPOOLJOB_2_PDF'

Thanks

Read only

0 Likes
1,121

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

waiting for your reply...

Read only

0 Likes
1,121

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.

Read only

Former Member
0 Likes
1,122

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

Read only

0 Likes
1,121

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.

Read only

0 Likes
1,121

Hi

I already pasted the code..

TSP01 is the table name where you have spool numbers.

Thanks

Read only

0 Likes
1,121

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

Read only

Former Member
0 Likes
1,121

Hi,

Goto SP01 or system->own spool requests,

then get the spool which want

regards

Shiva

Read only

Former Member
0 Likes
1,121

hi

check table TSP01 for spool numbers ..

regards,

vijay..

Read only

mithun_shetty4
Contributor
0 Likes
1,121

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