cancel
Showing results for 
Search instead for 
Did you mean: 

Message tag in IDoc XML

sunit_s
Participant
0 Kudos

Hi All

I am using SOAP adapter to send idoc xml to our partner. I have configured asynchronous scenario with SOAP adapter receiver channel. The partner is successfully receiving IDOC-XML.

The issue is:

IDOC-XML naturally contains idoc type name as first tag but partner wants message name as first tag. For example for message WMMBXY.WMMBID02 partner wants:

<WMMBXY xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

- <IDOC BEGIN="1">

<EDI_DC40 SEGMENT="1">

<TABNAM>EDI_DC40</TABNAM>

<MANDT />


but SAP PI is generating the following in IDoc XML

<WMMBID02 >

- <IDOC BEGIN="1">

- <EDI_DC40 SEGMENT="1">

<TABNAM>EDI_DC40</TABNAM>

<MANDT />



how best to replace the above tab with message name?
Regards
Sunny

Accepted Solutions (0)

Answers (1)

Answers (1)

engswee
Active Contributor
0 Kudos

Hi Sunit

You can try adding the following XSLT mapping as a subsequent step in your Operation Mapping.


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:template match="/ | @* | node()">

  <xsl:copy>

  <xsl:apply-templates select="@* | node()"/>

  </xsl:copy>

  </xsl:template>

  <xsl:template match="schema">

  <WMMBXY xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

  <xsl:apply-templates/>

  </WMMBXY>

  </xsl:template>

</xsl:stylesheet>

Rgds

Eng Swee