on 05-11-2010 2:41 AM
Dear Experts,
I am working in a file to mail scenario. Here i am sending the mail to the intended reciients
via email as a mail body thru XSLT programming.Here i have used the mail package XSD.
The question is, when i am trying to update one of the field name Vendor_No as a Ext_No,
everything is working fine in the mail body but the contents under the vendor_No is not being populated.
I mean, i can see the header changed as Ext_No but contents are missing under that.The surprise here is
that with Vendor_No the contents are getting populated easily. but when i am changing the Vendor_No as Ext_No
contents are not being populated.
Please help me wz the same.
Thanks
Veeru
Hi
check whehter the vendor & EXt no are in same context if not set the context of ext no to vendor.
Regards
Ramg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is my XSLT code
<?xml version="1.0" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="urn://TCL:SCM/Error_ServiceEntry">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:variable name="break"><br></xsl:variable>
<xsl:variable name="tableB"><table></xsl:variable>
<xsl:variable name="tableE"></table></xsl:variable>
<xsl:variable name="trB"><tr></xsl:variable>
<xsl:variable name="trE"></tr></xsl:variable>
<xsl:variable name="tdB"><td></xsl:variable>
<xsl:variable name="tdE"></td></xsl:variable>
<xsl:variable name="nbsp"> </xsl:variable>
<xsl:variable name="thB"><tr BGCOLOR="#CCCC99"></xsl:variable>
- <xsl:template match="/">
- <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
<Subject>TCL-Error notification for unsuccessful service entry/entries</Subject>
<From>from mail id</From>
<To>to mail id</To>
<Content_Type>text/html</Content_Type>
- <Content>
<xsl:text xsl:space="preserve">Unsuccessful Entries:</xsl:text>
<xsl:value-of select="$break" />
<xsl:value-of select="$break" />
<xsl:value-of select="$tableB" />
<xsl:value-of select="$thB" />
<xsl:value-of select="$tdB" />
<xsl:text xsl:space="preserve">Vendor_No</xsl:text>
<xsl:value-of select="$nbsp" />
<xsl:value-of select="$tdE" />
<xsl:value-of select="$tdB" />
<xsl:text xsl:space="preserve">PO_Number</xsl:text>
<xsl:value-of select="$nbsp" />
<xsl:value-of select="$tdE" />
<xsl:value-of select="$tdB" />
- <xsl:for-each select="ns0:MT_Error_Service_Entry/RecordData/Data">
<xsl:value-of select="$trB" />
<xsl:value-of select="$tdB" />
<xsl:value-of select="Vendor_No" />
<xsl:value-of select="$nbsp" />
<xsl:value-of select="$tdE" />
<xsl:value-of select="$tdB" />
<xsl:value-of select="PO_Number" />
<xsl:value-of select="$nbsp" />
<xsl:value-of select="$tdE" />
<xsl:value-of select="$tdB" />
</xsl:for-each>
<xsl:value-of select="$tableE" />
</Content>
</ns1:Mail>
</xsl:template>
</xsl:stylesheet>
Hi
It seems you havent change your XSLT code based on the source!!
I believe your source will be
<nso:MT_Error_Service_Entry>
<RecordData>
<Data>
<Ext_No>
<Po_num>
</Data>
As per the source your xslt will be ..
<?xml version="1.0" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="urn://TCL:SCM/Error_ServiceEntry">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:variable name="break">
</xsl:variable>
<xsl:variable name="tableB"><table></xsl:variable>
<xsl:variable name="tableE"></table></xsl:variable>
<xsl:variable name="trB"><tr></xsl:variable>
<xsl:variable name="trE"></tr></xsl:variable>
<xsl:variable name="tdB"><td></xsl:variable>
<xsl:variable name="tdE"></td></xsl:variable>
<xsl:variable name="nbsp"> </xsl:variable>
<xsl:variable name="thB"><tr BGCOLOR="#CCCC99"></xsl:variable>
- <xsl:template match="/">
- <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
<Subject>TCL-Error notification for unsuccessful service entry/entries</Subject>
<From>from mail id</From>
<To>to mail id</To>
<Content_Type>text/html</Content_Type>
- <Content>
<xsl:text xsl:space="preserve">Unsuccessful Entries:</xsl:text>
<xsl:value-of select="$break" />
<xsl:value-of select="$break" />
<xsl:value-of select="$tableB" />
<xsl:value-of select="$thB" />
<xsl:value-of select="$tdB" />
<xsl:text xsl:space="preserve">Vendor_No</xsl:text>
<xsl:value-of select="$nbsp" />
<xsl:value-of select="$tdE" />
<xsl:value-of select="$tdB" />
<xsl:text xsl:space="preserve">PO_Number</xsl:text>
<xsl:value-of select="$nbsp" />
<xsl:value-of select="$tdE" />
<xsl:value-of select="$tdB" />
- <xsl:for-each select="ns0:MT_Error_Service_Entry/RecordData/Data">
<xsl:value-of select="$trB" />
<xsl:value-of select="$tdB" />
*<xsl:value-of select="Ext_no" />*
<xsl:value-of select="$nbsp" />
<xsl:value-of select="$tdE" />
<xsl:value-of select="$tdB" />
<xsl:value-of select="PO_Number" />
<xsl:value-of select="$nbsp" />
<xsl:value-of select="$tdE" />
<xsl:value-of select="$tdB" />
</xsl:for-each>
<xsl:value-of select="$tableE" />
</Content>
</ns1:Mail>
</xsl:template>
</xsl:stylesheet>
Correct me if im wrong!!
Regards
Ramg
Edited by: Ramkumar Ganesh on May 11, 2010 9:09 PM
Answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The surprise here is that with Vendor_No the contents are getting populated easily.
but when i am changing the Vendor_No as Ext_No contents are not being populated.
Did you give a proper XPATH for Ext_no also? if value is not getting populated (even if source message has value) then it can be because of this XPATH.
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.