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.
Showing results for 
Search instead for 
Did you mean: 

Sending XML and PDF both in same mail

0 Kudos

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.




Former Member
0 Kudos

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

You just need to call method ADD_ATTACHMENT twice.