cancel
Showing results for 
Search instead for 
Did you mean: 

Send Mail with 2 attachments and body

0 Kudos

Hi all,

Could you please help me with the below scenario?

ABAPProxy-->PI-->MAIL

The problem is: With the XML structure received from ECC(Proxy) i have to create 2 files and attach them in to the mail structure.

The XML strucure is like:

<ns1:MT_OrdSAP xmlns:ns1="test">

   <File>

      <row>

         <Num>777777</Num>

         <Texto>Test1</Texto>

         <Clase>ZFA1</Clase>

         <Prio>2</Prior>

      </row>

      <row>

         <Num>88888</Num>

         <Text>test1</Text>

         <Clase>ZFA1</Clase>

         <Prior>2</Prior>

      </row>

   </File>

   <Z_I0002_MANT>

      <T_TEXT>

         <AUFNR>999999</AUFNR>

         <VORNR>99</VORNR>

         <ZAEHL>1</ZAEHL>

         <TDFORMAT>*</TDFORMAT>

         <TDLINE>test</TDLINE>

      </T_TEXT>

      <T_TEXT>

         <AUFNR>999998</AUFNR>

         <VORNR>98</VORNR>

         <ZAEHL>1</ZAEHL>

          <TDFORMAT>*</TDFORMAT>

         <TDLINE>test</TDLINE>

      </T_TEXT>

   </Z_I0002_MANT>

</ns1:MT_OrdenMtoProvSAP>

The mail shoud contain 2 attachments:

the first one should have this: (file.txt)

7777,Test1,ZFA1,2

8888,Test2,ZFA1,2

The second one shold contain this (file2.txt)

999999,99,1,*,test

999998,99,1,*,test

Also the mail shoud have a text in the body, subject, from, to, etc.

Do you have any idea for this scenario? As i don't know how to divide one XML in 2 files.

Thanks for your help.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

This message was moderated.

Answers (5)

Answers (5)

pedro_baroni3
Active Contributor
0 Kudos
0 Kudos

Hi all,

Thanks for your replies,

Just for Reference... I use the MIME format just like this: (in the field Content of the mail structure)

--Mail-OrdenMto

Content-Type: text/plain; name="file_return.txt"

999999,99,1,*,test

999998,99,1,*,test

Thanks for your help.

Former Member
0 Kudos

i dont know how to send mail,

please forgive me.

Please any body help.

problem in migrate the GL account creation through

LSMW.

i can not pass the value of control in chart of account

value.

how to pass the p&l  statement details and

chart of accounts value through LSMW

thank you for your consideration

Bhargavakrishna
Active Contributor
0 Kudos
baskar_gopalakrishnan2
Active Contributor
0 Kudos

Use Payloadzipbean module and zip both the files and send as attachment. You might want to check stefan's blog for this ..

http://scn.sap.com/people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the...

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