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: 

Background report save as PDF or excel

former_member1349771
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi try looking at the following link from wiki,

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convertSpoolrequesttoPDFandsendase-mail

3 REPLIES 3

Former Member
0 Kudos

Hi try looking at the following link from wiki,

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convertSpoolrequesttoPDFandsendase-mail

0 Kudos

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.

Former Member
0 Kudos

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.