09-01-2008 12:58 PM
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
09-01-2008 1:15 PM
09-01-2008 1:02 PM
09-01-2008 1:09 PM
09-01-2008 1:15 PM
09-01-2008 1:15 PM
09-01-2008 1:16 PM
09-01-2008 1:35 PM
&----
*& 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.
09-01-2008 1:42 PM
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