cancel
Showing results for 
Search instead for 
Did you mean: 

adding mail to the subject of the message and not as an attachment

Former Member
0 Kudos

hello

this is an advanced to other thread that I have.

I have a scenario RFC to MAIL. today, after your help, I am able to send the RFC as an attachment.

since I have in RFC an array that can be from 0 to unbounded, I am not able to send all the RFC (as xml) in the body, just the first one.

I also try to write an xsl but now the mail is sent with attachment.

I would like to know what else do I have to configure in order to recieve all the RFC message in the body.

(maybe something in the module, or write something in the xsl).

the example to the xml that I recieve:

<rfc:Y_SD_XI_FEED_BACK_1 xmlns:rfc="urn:sap-com:document:sap:rfc:functions">

<COUNTER_E>0</COUNTER_E>

<DATUM>2009-02-08</DATUM>

<DELIVERY>0187001010</DELIVERY>

<FILE_NAME/>

<FUNCNAME>Y_SD_XI_SHIPMENT_HANDLER_1</FUNCNAME>

<INV_DOC_NO/>

<MANDT>220</MANDT>

<PO_NUMBER/>

<SYSID>DEV</SYSID>

<TEXT>Success in Shipment INITIAL (delivery: 0187001010 )</TEXT>

<UZEIT>13:11:01</UZEIT>

<IT_RETURN>

<item>

<TYPE>S</TYPE>

<ID>VW</ID>

<NUMBER>487</NUMBER>

<MESSAGE>Processing shipment : Start</MESSAGE>

<LOG_NO/>

<LOG_MSG_NO>000000</LOG_MSG_NO>

<MESSAGE_V1/>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4/>

<PARAMETER/>

<ROW>0</ROW>

<FIELD/>

<SYSTEM>DEV</SYSTEM>

</item>

<item>

<TYPE>S</TYPE>

<ID>VW</ID>

<NUMBER>511</NUMBER>

<MESSAGE>Processing shipment 0000003132 : Header data</MESSAGE>

<LOG_NO/>

<LOG_MSG_NO>000000</LOG_MSG_NO>

<MESSAGE_V1>0000003132</MESSAGE_V1>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4/>

<PARAMETER/>

<ROW>0</ROW>

<FIELD/>

<SYSTEM>DEV</SYSTEM>

</item>

</IT_RETURN>

</rfc:Y_SD_XI_FEED_BACK_1>

the xsl that I wrote is:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:template match="/">

<rfc:Y_SD_XI_FEED_BACK_1 xmlns:rfc="urn:sap-com:document:sap:rfc:functions">

<xsl:element name = "COUNTER_E" >

<xsl:value-of select = "//COUNTER_E" />

</xsl:element>

<xsl:element name = "DATUM" >

<xsl:value-of select = "//DATUM" />

</xsl:element>

<xsl:element name = "DELIVERY" >

<xsl:value-of select = "//DELIVERY" />

</xsl:element>

<xsl:element name = "FILE_NAME" >

<xsl:value-of select = "//FILE_NAME" />

</xsl:element>

<xsl:element name = "FUNCNAME" >

<xsl:value-of select = "//FUNCNAME" />

</xsl:element>

<xsl:element name = "INV_DOC_NO" >

<xsl:value-of select = "//INV_DOC_NO" />

</xsl:element>

<xsl:element name = "MANDT" >

<xsl:value-of select = "//MANDT" />

</xsl:element>

<xsl:element name = "PO_NUMBER" >

<xsl:value-of select = "//PO_NUMBER" />

</xsl:element>

<xsl:element name = "SYSID" >

<xsl:value-of select = "//SYSID" />

</xsl:element>

<xsl:element name = "TEXT" >

<xsl:value-of select = "//TEXT" />

</xsl:element>

<xsl:element name = "SYSID" >

<xsl:value-of select = "//SYSID" />

</xsl:element>

<xsl:element name = "UZEIT" >

<xsl:value-of select = "//UZEIT"/>

</xsl:element>

<IT_RETURN>

<xsl:for-each select = "//IT_RETURN/item" >

<item>

<xsl:element name = "TYPE" >

<xsl:value-of select = "//TYPE" />

</xsl:element>

<xsl:element name = "ID" >

<xsl:value-of select = "//ID" />

</xsl:element>

<xsl:element name = "NUMBER" >

<xsl:value-of select = "//NUMBER" />

</xsl:element>

<xsl:element name = "MESSAGE" >

<xsl:value-of select = "//MESSAGE"/>

</xsl:element>

<xsl:element name = "LOG_NO" >

<xsl:value-of select = "//LOG_NO" />

</xsl:element>

<xsl:element name = "LOG_MSG_NO" >

<xsl:value-of select = "//LOG_MSG_NO" />

</xsl:element>

<xsl:element name = "MESSAGE_V1" >

<xsl:value-of select = "//MESSAGE_V1"/>

</xsl:element>

<xsl:element name = "MESSAGE_V2" >

<xsl:value-of select = "//MESSAGE_V2"/>

</xsl:element>

<xsl:element name = "MESSAGE_V3" >

<xsl:value-of select = "//MESSAGE_V3"/>

</xsl:element>

<xsl:element name = "MESSAGE_V4" >

<xsl:value-of select = "//MESSAGE_V4"/>

</xsl:element>

<xsl:element name = "PARAMETER" >

<xsl:value-of select = "//PARAMETER"/>

</xsl:element>

<xsl:element name = "ROW" >

<xsl:value-of select = "//ROW"/>

</xsl:element>

<xsl:element name = "FIELD" >

<xsl:value-of select = "//FIELD"/>

</xsl:element>

<xsl:element name = "SYSTEM" >

<xsl:value-of select = "//SYSTEM"/>

</xsl:element>

</item>

</xsl:for-each>

</IT_RETURN>

</rfc:Y_SD_XI_FEED_BACK_1>

</xsl:template>

</xsl:stylesheet>

Thanks

Kfir

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To get the content of the attachment as content of the mail you should use the messagetransferbean.

with the parameter content type as text.

Thanks.

Regards,

Indira D

Answers (1)

Answers (1)

Former Member
0 Kudos

since I am not familiar with what you wrote, example of where to put it, and where exactly to write it will be appreciated

Thx

Kfir