on 02-21-2024 7:26 AM
Dear All,
We have a IDoc XML being received through IDoc adapter and I tried to read the value of MESTYP using ContentModifier but the value is always coming as empty. I tried both header and property section like
MESTYP - //EDI_DC40/MESTYP (XPATH)
Any idea?
IDoc XML:
<FLOC01 xmlns="urn:sap-com:document:sap:idoc:soap:messages">
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
<MANDT>XXX</MANDT>
<DOCNUM>0000000000001278</DOCNUM>
<DOCREL>XXX</DOCREL>
<STATUS>XX</STATUS>
<DIRECT>X</DIRECT>
<OUTMOD>X</OUTMOD>
<IDOCTYP>FLOCXX</IDOCTYP>
<MESTYP>FLOCX</MESTYP>
<STDMES>/EVISX</STDMES>
<SNDPOR>SAPXXXX</SNDPOR>
<SNDPRT>XX</SNDPRT>
<SNDPRN>XXXXXXXXX</SNDPRN>
<RCVPOR>XXXX_XXX</RCVPOR>
<RCVPRT>XX</RCVPRT>
<RCVPRN>XXXXXXXXX</RCVPRN>
<CREDAT>YYYYMMDD</CREDAT>
<CRETIM>HHMMSS</CRETIM>
<ARCKEY>urn:sap.com:msgid=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</ARCKEY>
<SERIAL>YYYYMMDDHHMMSS</SERIAL>
</EDI_DC40>
<FLOC_HDR SEGMENT="1">
<ACTION>X</ACTION>
<TPLNR>XXXXXXXXXXXXXXXXXXXX</TPLNR>
<STRNO>XX.XX.XXXX.XXXX.XX-XXX-XXX</STRNO>
<TPLMA>XXXXXXXXXXXXXXXXXXXX</TPLMA>
<TPLMA_L>XX.XX.XXXX.XXXX</TPLMA_L>
<PLTXT>ITEM DESCRIPTION</PLTXT>
<EQART>XX-XXXX</EQART>
<BUKRS>XXXX</BUKRS>
<IWERK>XXXX</IWERK>
<SWERK>XXXX</SWERK>
<EQFNR>XX-XXX-XXX</EQFNR>
<KOSTL>XXXXXXXXXX</KOSTL>
<STORT>XX-XXX</STORT>
</FLOC_HDR>
</IDOC>
</FLOC01>
Hi ,
It is due to because of the namespace of this filed
use below xslt mapping code before the reading MESTYP filed in the content modifier.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@* | node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
<xsl:template match="comment() | text() | processing-instruction()">
<xsl:copy/>
</xsl:template>
</xsl:stylesheet>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
10 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.