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: 

Sending XML and PDF both in same mail

praveen_hannu
Contributor
0 Kudos
789

Dear Experts

I have a requirement that, I will get a XML file and I need to process them accordingly and later I am displaying a log as ALV list.

When my client wants to schedule the background, then I need to process them and send as an attachment XML and file and ALV log as PDF attachment.

I have tried 3 different ways to send both the files in the same email, but got failed, below my 3 methods;

1. Send them both in solix tab, when I am using this way, I can see my XML file properly, but PDF file is not working.

2. Send both of them in soli tab, I can see PDF file properly and XML file displaying few invalid characters and it is not opening in browser.

3. Send PDF file in soli tab and XML file in solix tab, during this time neither working .

I am using the function module "SO_NEW_DOCUMENT_ATT_SEND_API1".

Kindly help me is there any way I can send both the files in a same mail.

Thanks

Praveen

1 REPLY 1

Former Member
0 Kudos
151

Try to not use this FM instead use the OO approach with class CL_BCS, see the examples below
attach PDF:

http://wiki.sdn.sap.com/wiki/display/Snippets/Sending++attachment+using+cl_bcs+classes
attach XML:

http://scn.sap.com/thread/3181023

You just need to call method ADD_ATTACHMENT twice.

Regards,

Felipe