Skip to Content

SAP PI/PO message mapping

Hi All,

I have provide the source and expected target structure below. Can any one please tell the mapping for the same.

Root Node at target has to be repeated for each records at source.

FYI - At the source end i am receiving flat file and converting it into xml using Message Transform beam in sender channel.

Please let me know the mapping and if any UDF is required to achive this output.

capture.jpg (17.8 kB)
capture1.jpg (56.2 kB)
Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Jun 11, 2017 at 03:42 PM

    Hi Vini!

    I guess the most suitable approach for this kind of transformation is using XSL transformation. Something like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="" version="1.0">
        <xsl:template match="/">
            <ns1:MT_Target xmlns:ns1="">
                <xsl:apply-templates select="//Record"/>
        <xsl:template match="Record">
                    <xsl:for-each select="./*">
                            <Name><xsl:value-of select="local-name()"/></Name>
                            <Value><xsl:value-of select="."/></Value>

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Evgeniy,

      Thanks for the reply.

      The XSL transformation works fine. But for Header fields (Field1 and Field2) i have to read the RFH2 headers through JMS channel and pass the values.I think this would be relatively easy if the transformation is achieved via graphical mapping.

      I am using duplicate sub tree to replicate "Record" nodes at target structure.But how to replicate "root" node for every Record at Source side.

      So can you please let me know how to achieve this via graphical mapping.

  • Posted on Jun 12, 2017 at 09:59 AM

    Hi Vini,

    Where are you facing the issue in Graphical mapping? It's a very simple straight forward graphical mapping.



    wmrto.png (104.4 kB)
    ovvvy.png (147.9 kB)
    Add comment
    10|10000 characters needed characters exceeded