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

Former Member
0 Likes
991

I need to write my report to spool of type OTF. Usually the ABAP program creates spool of type ABAP list. How do I override that?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
954

Hi

I don't think it's possible, why do you want to do that?

Max

9 REPLIES 9
Read only

Former Member
0 Likes
955

Hi

I don't think it's possible, why do you want to do that?

Max

Read only

0 Likes
954

I needed my spool in pdf format for downstream processing.

Read only

0 Likes
954

You can convert an abap spool in pdf format too

Read only

0 Likes
954

I wanted to skip that in between step and wanted to see if there is a way to directly create a OTF spool?

Read only

0 Likes
954

The only way that I know of to create an OTF spool is via a SAPscript form. That would mean that you would have to develop your output as Sapscript. But I know that there is a way to convert a spool straight to PDF. Put this in the function module field of SE37.

CONV*SPOOLPDF

And hit F4.

Regards,

Rich Heilman

Read only

0 Likes
954

Yep, here it is.....

CONVERT_ABAPSPOOLJOB_2_PDF

Use this function module to convert a spool into PDF.

Regards,

Rich Heilman

Read only

0 Likes
954

Looked at the convertPdf FM.. But the one concern is I need to provide the spool id?

Let say I write to a spool in a report program using NEW-PAGE and then using NEW-PAGE print off, I stop writing to spool..

Now I want to get the spool id within the same report? Then I can use that spool id and call this FM.. Is that feasible?

Thanks

Read only

0 Likes
954

Hi

I don't know if it's possible, but you can try this solutions:

NEW-PAGE PRINT ON.

Now the system write abap list in the spool

WRITE .............

NEW-PAGE PRINT OFF.

Now the system close the spool and write in the screen, here you can try to found out your spool.

You should know some conditions to read TSP01:

SELECT * FROM TSP01 WHERE .....

CHECK sy-subrc = 0.

CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'

.......

Max

Message was edited by: max bianchi

Read only

0 Likes
954

system variable sy-spono will hold the spool number you just created using

new-page print on parameters <params> no dialog.

perform write_list .

new-page print off.

Regards

Raja