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: 

sapscript to spool

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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,

0 Kudos

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.

Former Member
0 Kudos

hi

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

hope this helps....

reward if useful

former_member735409
Participant
0 Kudos

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

Regards

Justin