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 to PDF

Former Member
0 Likes
1,319

Hi,

I have a requirment to convert a spool request into PDF and then email it to customers mail address.

Report program generating invoice prints in spool through Sapscript.

I tried to use FM "CONVERT_ABAPSPOOLJOB_2_PDF"

to convert spool print request into PDF, but getting following error message.

Spool 23773 contains no ABAP list data.

Any pointers will be helpful.

Thanks & Regards

Swati

1 ACCEPTED SOLUTION
Read only

GauthamV
Active Contributor
0 Likes
1,181

hi,

use this program RSTXPDF4.

Hi,

I have a requirment to convert a spool request into PDF and then email it to customers mail address.

Report program generating invoice prints in spool through Sapscript.

I tried to use FM "CONVERT_ABAPSPOOLJOB_2_PDF"

to convert spool print request into PDF, but getting following error message.

Spool 23773 contains no ABAP list data.

Any pointers will be helpful.

Thanks & Regards

Swati

7 REPLIES 7
Read only

Former Member
0 Likes
1,181

try with RSTXPDFT4 program once

Read only

Former Member
Read only

GauthamV
Active Contributor
0 Likes
1,182

hi,

use this program RSTXPDF4.

Read only

Former Member
0 Likes
1,181

Hi

Go through the link given below :

With Regards

Nikunj Shah

Read only

Former Member
0 Likes
1,181

Hi,

I hope the below link will help you.

Thnaks,

Khushboo.

Read only

Former Member
0 Likes
1,181

&----


*& Report ZMR_INVOICE_TO_PDF

*&

&----


*&

*&

&----


report zmr_invoice_to_pdf.

data : v_fname type rs38l_fnam.

data : v_retdoc type ssfcrespd,

v_retval type ssfcrescl,

v_retspr type ssfcresop,

spoll_id type ssfcrescl-spoolids,

wa_spoll_id like line of spoll_id,

rspool_id type rspoid.

parameters : p_vbeln type vbrp-vbeln.

start-of-selection.

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = 'ZSD_INVOICE'

importing

fm_name = v_fname

exceptions

no_form = 1

no_function_module = 2

others = 3

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

call function v_fname

exporting

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

v_vbeln = p_vbeln

importing

document_output_info = v_retdoc

job_output_info = v_retval

job_output_options = v_retspr

exceptions

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

others = 5

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

spoll_id = v_retval-spoolids.

read table spoll_id into wa_spoll_id index 1.

rspool_id = wa_spoll_id.

submit rstxpdft4

with spoolno = rspool_id

and return.

Read only

Former Member
0 Likes
1,181

Hello Swati.

I have come across this WIKI code,

[SDN Wiki Code Gallery - Standard Reference - Convert Spool request to PDF and send as e-mail|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convert%2bspool%2brequest%2bto%2bpdf%2band%2bsend%2bas%2be-mail]

Hope that's usefull.

Good Luck & Regards.

Harsh Dave