cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT mapping error

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

check whehter the vendor & EXt no are in same context if not set the context of ext no to vendor.

Regards

Ramg

Former Member
0 Kudos

Expert,

These are teh fields of the same node.

<Records>

<Ext_No>

<PO_nO>

</Records>

Thanks

Veeru

Former Member
0 Kudos

Hi

After modifying did you update your interface mapping? Try edit, read the interface, activate and check once.

Regards

Ramg

Former Member
0 Kudos

Expert,

I have updated teh interface mapping and activated as well. But still teh same.

Thanks

Veeru

Former Member
0 Kudos

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">&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>

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks to all. Its working now. I was doing the FCC at the sender side. I was supposed to change the data fields name there as well when its changing at the XSLT mapping.

Thanks Again

Veeru

Answers (2)

Answers (2)

Former Member
0 Kudos

Answered

former_member200962
Active Contributor
0 Kudos
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.