Skip to Content
avatar image
Former Member

SAP XI/PI/PO Mapping requirement UDF required to read the XML value from a field

Hi,

I want to read the XML data coming in a field, depends on tag value I have to get result

Below is the my input

<notes>

<Note>

<Note Type>abc</Note Type>

<Note Test><Details><DisplayString Type="ValueString">0</DisplayString><DisplayString Type="GST Percent">0</DisplayString><DisplayString Type="ProductItem ID">0144313</DisplayString><DisplayString Type="Ordered">0</DisplayString><DisplayString Type="Return Price">1.10</DisplayString><DisplayString Type="ReturnsCount">1</DisplayString><DisplayString Type="CarryOverCount">2</DisplayString><DisplayString Type="NextOrderDate">15/05/2017</DisplayString><DisplayString Type="NextOrderQuantity">3</DisplayString><DisplayString Type="NextOrderPerm">True</DisplayString><DisplayString Type="Net Price">1.20</DisplayString><DisplayString Type="Actual Total Value">6</DisplayString><DisplayString Type="Sale Total Value">6</DisplayString><DisplayString Type="Sale GST Value">6</DisplayString><DisplayString Type="Payment">6</DisplayString><DisplayString Type="Return Total Value">1.1</DisplayString></Details></Note Test>

</Note>

<Note>

<Note Type>xyz</Note Type>

<Note Test>gjh<Note Test>

</Note>

</notes>

here Note test is my input field, if Note type is abc I have to read the note test and depends on input constant(like Payment or Value String), it has to return value. Please help me for the UDF

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    May 31, 2017 at 10:20 AM

    Bhavesh Kantilal

    Hi Please help me to write UDF for the above requirement

    Add comment
    10|10000 characters needed characters exceeded

  • May 31, 2017 at 12:38 PM

    Hi Obedulla,

    You can do it with XSLT as well. You can find several examples in SCN:

    UDF: https://archive.sap.com/discussions/thread/3269146

    XSLT: https://archive.sap.com/discussions/thread/3608122

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 01, 2017 at 07:03 AM

    Can you provide your expected target XML so that we can try helping you with UDF.

    --Priyanka

    Add comment
    10|10000 characters needed characters exceeded