10-13-2008 6:06 AM
Hello Guru's,
I have a requirement my user execute one report in background now the output is appearing in ALV
He wants now that is output should save as PDF or excel & send email to respective persons.
Can we do this if yes please guide.I will be executing report in background.
Regards
Edited by: ABHUT on Oct 13, 2008 10:40 AM
10-13-2008 6:23 AM
Hi try looking at the following link from wiki,
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convertSpoolrequesttoPDFandsendase-mail
10-13-2008 6:23 AM
Hi try looking at the following link from wiki,
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convertSpoolrequesttoPDFandsendase-mail
10-13-2008 7:20 AM
Thanks Avinash,
Now my output is coming in PDF can u please guide me similarly how can i convert into excel.
It has been a great help.
10-13-2008 6:28 AM
get them spool no and pass it to standard report RSTXPDFT4
to convert to pdf and for sending mail use f.m
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = objpack
contents_txt = objtxt[]
contents_bin = so_ali[]
*contents_hex = so_ali[]
receivers = reclist[]
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
shan.