Skip to Content
0

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

May 31, 2017 at 10:16 AM

140

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

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

Bhavesh Kantilal

Hi Please help me to write UDF for the above requirement

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Iñaki Vila May 31, 2017 at 12:38 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Priyanka Anagani Jun 01, 2017 at 07:03 AM
0

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

--Priyanka

Share
10 |10000 characters needed characters left characters exceeded