cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

PriyankaAnagani
Active Contributor
0 Kudos

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

--Priyanka

iaki_vila
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

bhavesh.kantilal

Hi Please help me to write UDF for the above requirement

JL23
Active Contributor
0 Kudos

You mean 4 minutes is enough to give your question, that you posted with a wrong primary tag, an extra push?