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

sapscript to spool

Former Member
0 Likes
1,731

in driver prgram of my sapscript, i need to generate a spool request (automatically in driver program) and then convert this Spool to PDF (tat i can do by using FM abapspoolpdf)..but how to go for the first requirement???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,124

Hi,

for the first option you need to pass some parameters to imports in function module OPEN_FORM. Check out importing structure OPTIONS in this function module (OPTIONS-TDNEWID,OPTIONS-TDDATASET).

Cheers,

5 REPLIES 5
Read only

Former Member
0 Likes
1,124

Hi,

When a print command is triggered for some Output it generates a Spool request.

We can capture that spool request number from TSP01 table.

we can pass that spool number to Fun module:

call function 'CONVERT_ABAPSPOOLJOB_2_PDF' and convert to PDF.

Regards,

Anji

Read only

Former Member
0 Likes
1,125

Hi,

for the first option you need to pass some parameters to imports in function module OPEN_FORM. Check out importing structure OPTIONS in this function module (OPTIONS-TDNEWID,OPTIONS-TDDATASET).

Cheers,

Read only

0 Likes
1,124

try to do like that..

data : begin of zz_itcpp.

include structure itcpp.

data : end of zz_itcpp.

"CALL FUNCTION 'CLOSE_FORM'

Importing

Result = zz_itcpp

EXCEPTIONS

UNOPENED = 1

BAD_PAGEFORMAT_FOR_PRINT = 2

SEND_ERROR = 3

SPOOL_ERROR = 4

CODEPAGE = 5

OTHERS = 6

zz_spool_no = zz_itcpp-TDSPOOLID.

Read only

Former Member
0 Likes
1,124

hi

u can get the spool number in sy-spono..which can be passed to the function module.

hope this helps....

reward if useful

Read only

Former Member
0 Likes
1,124

<b>RSTXPDFT4</b>, Check this program.

Regards

Justin