Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Prefix inside XML tags

Hi,

I am working on a scenario where I need to insert prefix to XML tags that belong to Header section. Following is an example of it -

<sh:StandardBusinessDocumentHeader>

  <sh:HeaderVersion>1.0</sh:HeaderVersion>

  <sh:Sender>

  <sh:Identifier Authority="GS1">5412345000013</sh:Identifier>

  <sh:ContactInformation>

  <sh:Contact>John Doe</sh:Contact>

  </sh:ContactInformation>

  </sh:Sender>

<advancedRemittanceNotification>

        <creationDateTime>2011-04-12T11:00:00.000-05:00</creationDateTime>

        <documentStatusCode>ORIGINAL</documentStatusCode>

        <advancedRemittanceNotificationIdentification>

            <entityIdentification>ARN51101</entityIdentification>

            <contentOwner>

                <gln>5412345000013</gln>

            </contentOwner>

        </advancedRemittanceNotificationIdentification>

        <expectedPaymentDate>2005-04-15</expectedPaymentDate>

        <isThereADiscrepancy>false</isThereADiscrepancy>

        <receiptOfGoodsDate>2005-02-19</receiptOfGoodsDate>

       

As can be seen, prefix 'sh' is added to the header only. When sending out, 'sh' needs to be inserted and incoming messages to PI will have 'sh' prefixed to header elements too.

Is only XSLT mapping a best solution for this or someone has experience handling in some other way ?

Would appreciate if someone can share XSLT code for it.

Thanks

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question