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

Convert SAPScript to PDF using spool

Former Member
0 Likes
904

Hi Experts.

I have a sap script form Ztest_F1 and print program Ztest_P. How do I convert the form into PDF and display it in ABAP web dynpro application? code sample is appreciated.

Thanks,

- Anthony-

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
782

Hi Anthony,

To convert SAP Script into PDF, first generate a Spool Request

Then goto transaction SP01 and copy the generated Spool Request number

now execute the SAP report RSTXPDFT4

Here enter the copied Spool request number and the target directory into the parameters

execute the report

Required pdf file will be generated into the target directory

i hope it will help you out....

Please refer this simple program:

http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm

Regards,

Nitin.

4 REPLIES 4
Read only

former_member182371
Active Contributor
0 Likes
782

Hi,

have a look at standard report RSTXPDF4.

Best regards.

Read only

Former Member
0 Likes
783

Hi Anthony,

To convert SAP Script into PDF, first generate a Spool Request

Then goto transaction SP01 and copy the generated Spool Request number

now execute the SAP report RSTXPDFT4

Here enter the copied Spool request number and the target directory into the parameters

execute the report

Required pdf file will be generated into the target directory

i hope it will help you out....

Please refer this simple program:

http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm

Regards,

Nitin.

Read only

0 Likes
782

Hi Nitin,

Thanks, In this case ZSPOOLTOPDF2 is the print program of a SAPScript Form?

submit ZSPOOLTOPDF2

to sap-spool

spool parameters %_print

archive parameters %_print

without spool dynpro

and return.

How can i get spool number?

IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.

What is this 'SPOOLTOPDF'?

Thanks,

-Anthony-

Read only

Former Member
0 Likes
782

Problem solved! We can use open_form, ...close_form FMs to generate the spool request. Thanks!