on 09-26-2006 10:36 PM
Hi there,
I am new to XI and hope find good ideas from the gurus!
I need to send my Idoc as attachment to the mail adapter. I am using mail package and hence the to, from and subject are mapped from within my Idoc. I now have the problem of getting the Idoc structure into the content tag ! is there a work around ! I am using XI 7.0.
Any Ideas will be highly regarded.
thanks,
amair
You can use XSLT mapping like this:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes" />
<xsl:template match="*">
<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
<Subject><xsl:value-of select="//subject"/></Subject>
<From><xsl:value-of select="//sender"/></From>
<To><xsl:value-of select="//receiver"/></To>
<Content><xsl:copy-of select="/"/></Content>
</ns:Mail>
</xsl:template>
</xsl:stylesheet>
Another option is not using the Mail Package, but populating the adapter header fields for setting from, to and subject.
http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
have a look at this weblog:
/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hallo Michal,
I am trying the weblog for my problem but it does not somehow do what it is supposed to !
/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping - XML node into a string with graphical mapping
here is my situation in detail.
source:
<some idoc>
<..>
..
</some idoc>
Target (TO BE)
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Mail xmlns:ns0="http://sap.com/xi/XI/Mail/30">
<From> this is from complex graphical mapping</From>
<Content_Type>text/xml;name="file.xml"</Content_Type>
<Content_Disposition>attachment;name="SYSTAT01.XML"
</Content_Disposition>
<Content>here is where I need the IDOC</Content>
</ns0:Mail>
I have already a graphical mapping in place and dont want to disturb it, can I some how get the source message in the content tag. I am not a XSL guru but is it possible to get the results with multiple mappings.
Thanks,
Amair
Hi,
I would suggest you to go with XSL mapping, and XSLT is very simple and easy to do
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
<Subject>Subject</Subject>
<From>from@email.com</From>
<To>to@email.com</To>
<Content_Type>text/xml</Content_Type>
<Content>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[
]]
>
]]>
Just save this as .XSL and zip it. Import it under Imported Archive and use it in Interface mapping.
You need to change from and to ids in the XSL.
Thanks,
Prakash
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.