03-09-2020 2:26 PM
how do i send the output of an ALV via email?
I'm using the SO_NEW_DOCUMENT_SEND_API1 function
how do I extract all the alv and put it in the pdf file and attach it in the email to send?
I have seen the fm SO_ATTACHMENT_INSERT_API1 but how do I insert the output of the alv?
03-09-2020 2:58 PM
Nowadays there are classes to
There are already many samples on this, perform some search or explain where you are stuck.
03-09-2020 2:41 PM
Do not used this Function module, it is obsolete
https://blogs.sap.com/2013/06/03/sending-mail-using-oo-3-result-of-a-report/
03-09-2020 3:27 PM
03-09-2020 2:49 PM
I was actually successful in doing this a long time ago in a 46c system. I'm sure there is probably a better way these days. But what I did was...
1) Assuming your ALV output is contained in a report program, use SUBMIT statement with extension TO SAP-SPOOL. This will produce the ALV in a list display as a spool.
2) Issue a submit statement for program RSPOLST2 with extension EXPORTING LIST TO MEMORY which will read the spool and put it into memory
3) Call function LIST_FROM_MEMORY which actually brings you the output into an internal table
4) Call function WWW_HTML_FROM_LISTOBJECT which converts the list object into HTML
5) you can then use the HTML and attach when you call the SO_NEW_DOCUMENT_SEND_API1 function.
Again, not pretty, my example is really old, but it worked. But there has to be a better way 15 years later.
Cheers,
Rich Heilman
03-09-2020 2:55 PM
03-09-2020 2:58 PM
Nowadays there are classes to
There are already many samples on this, perform some search or explain where you are stuck.