on 11-04-2008 7:43 AM
Hi all,
I am working on JDBC to Mail scenario. We have to pick the data from Oracle system and mail has to be sent with an attached Excel file.
I am doing this scenario by using of following blog.
I am getting the output as an attachment but iam not getting the data.
the same xslt coding iam using which has given in blog.
any idea........
Thanks,
Sreedhar Goud.
HI
Are you able to see data from the Audit log in RWB or SXMB_MONI inbound message.
Check this if this is the case then XSLT code is having issue else it can be because of sender JDBC not picking up data
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
JDBC is picking the data.In SXMB_MONI outbound payload iam able to see the data but in inbound payload there is no data.i think the problem is in XSLT code only.
My source structure:
<?xml version="1.0" encoding="utf-8" ?>
<ns:MT_ORMS_Errors xmlns:ns="http://mg.adityabirla.com/mg/orms/mail">
<row>
<INTERFACE_NAME>MG_SAP_RMS_ITEM_PKG</INTERFACE_NAME>
<RECORD_DETAIL>Item</RECORD_DETAIL>
<ERROR>item</ERROR>
<CREATE_DATE>2008-11-03 00:00:00.0</CREATE_DATE>
<MAIL_SENT>N</MAIL_SENT>
</row>
</ns:MT_ORMS_Errors>
XSLT code:
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<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>Deliveries from XI</Subject>
<From></From>
<To></To>
<Content_Type>application/vnd.ms-excel</Content_Type>
<Content>
<xsl:text xsl:space="preserve">These deliveries has been completed:</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">INTERFACE_NAME</xsl:text>
<xsl:value-of select="$nbsp"/>
<xsl:value-of select="$tdE"/>
<xsl:value-of select="$tdB"/>
<xsl:text xsl:space="preserve">RECORD_DETAIL</xsl:text>
<xsl:value-of select="$nbsp"/>
<xsl:value-of select="$tdE"/>
<xsl:value-of select="$tdB"/>
<xsl:text xsl:space="preserve">ERROR</xsl:text>
<xsl:value-of select="$nbsp"/>
<xsl:value-of select="$tdE"/>
<xsl:value-of select="$tdB"/>
<xsl:text xsl:space="preserve">CREATE_DATE</xsl:text>
<xsl:value-of select="$nbsp"/>
<xsl:value-of select="$tdE"/>
<xsl:value-of select="$trE"/>
<xsl:for-each select="MT_ORMS_Errors/row">
<xsl:value-of select="$trB"/>
<xsl:value-of select="$tdB"/>
<xsl:value-of select="INTERFACE_NAME"/>
<xsl:value-of select="$nbsp"/>
<xsl:value-of select="$tdE"/>
<xsl:value-of select="$tdB"/>
<xsl:value-of select="RECORD_DETAIL"/>
<xsl:value-of select="$nbsp"/>
<xsl:value-of select="$tdE"/>
<xsl:value-of select="$tdB"/>
<xsl:value-of select="ERROR"/>
<xsl:value-of select="$nbsp"/>
<xsl:value-of select="$tdE"/>
<xsl:value-of select="$tdB"/>
<xsl:value-of select="CREATE_DATE"/>
<xsl:value-of select="$nbsp"/>
<xsl:value-of select="$tdE"/>
<xsl:value-of select="$trE"/>
</xsl:for-each>
<xsl:value-of select="$tableE"/>
</Content>
</ns1:Mail>
</xsl:template>
</xsl:stylesheet>
Thanks,
Sreedhar Goud.
HI
XSL will not work for these tags
<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>
change <table> as <table> and so on in your XSL code
Thanks
Gaurav
Hi Gaurav,
in output iam able to see headings that means up to for each statement its working fine.
if i test the same in interfacemapping output is coming as
These deliveries has been completed:<br><br><table><tr BGCOLOR="#CCCC99"><td>INTERFACE_NAME </td><td>RECORD_DETAIL </td><td>ERROR </td><td>CREATE_DATE </td></tr></table>
Sreedhar Goud.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.