12-14-2016 11:11 AM
I have a report which has an output screen divide in 2 parts. On top, an ALV is displayed and based on the data of the ALV, a line graph is displayed below, at the bottom.
The line graph is created with the FM "GFW_PRES_SHOW".
Now, the final requirement for this report is that both, the ALV and Line Graph, should be displayed in the email body, which will be sent to the client.
Any help would be appreciated.
Thanks,
Monik
12-14-2016 11:37 AM
What did you already try, did you attach the ALV (in XML or HTML format) and/or the exported content picture of graphic from GFV_PRES_SHOW to the message, did you define the body of the mail as html format and include the two object in the html (e.g.<img src="CID:attachment" etc>. )
Regards,
Raymond
12-14-2016 12:07 PM
Hey Raymond,
Thanks for your reply.
I have not tried that HTML way. I wasn't aware of it. I was looking for solutions of this and figured if there's no way of doing this, might as well try to send it as an attachment (also facing problems in this).
But I'll try to search about this and go forward.
Meanwhile, if you have a link that shows a demo of this, that'd be helpful.
Thanks,
Monik
12-14-2016 12:22 PM
Use search tool (google, lauchpad) to find threads and samples like Sending an image in Email. Look also at the reports BCS_EXAMPLE_* provided by SAP.
Regards,
Raymond
04-21-2017 2:08 PM
Hey Raymond,
Sorry for replying to your answer so late, but I'm in need of immediate help. So below is the current status of my code:
Here's what I've done so far:
But this is not working. I'm still getting a broken image in email. This thread suggests to change to CL_BCS class. But I cannot do that.
So my humble question to you is: how would one proceed after using GFW_PRES_SHOW to have the graph in email body considering:
Kind regards,
Monik
04-21-2017 2:48 PM
Monik,
Tried to check if any of standard programs are using the FM GFW_PRES_SHOW,but in my version there are only two demo/standard progs DEMO_GFW_PRES_SHOW and LSGFWU04,which don't have the functionality of embedding the image into excel attachment.
May be you also can check if there are any Standard or Custom Program having such a functionality in your System.Once you succeed,you can post a doc/blog so that it can be referred by Users in SCN Communicty :-).Thanks.
K.Kiran.
04-24-2017 7:46 AM
Look at the CONTENT* of GFW_PRES_SHOW export and table parameters for 'Exported picture of graphic'. Attach this w3mime data to the mail directly in the main body or as an attachment with CI ref. Question: Why 'must' the outdated FM be used, when the CL_BCS class is much better and stable.
04-24-2017 1:11 PM
Thanks for your input, Raymond.
I'm making progress. I changed the FM to CL_BCS and added second attachment of image with w3mime data. Below is the code:
lr_document->ADD_ATTACHMENT(
i_attachment_type = 'JPG'
I_ATTACHMENT_SUBJECT = 'ips_graph'
I_ATT_CONTENT_HEX = W3MIME ).
Now I'm getting email with bigger blank image box. My guess is, it is somehow related to i_attachment_type. I don't know what type of image data is returned by GFW_PRESS_SHOW.
I will debug to find out more. Meanwhile, if you have any suggestion, I would appreciate it.