Skip to Content
0
Jun 06 at 06:22 PM

Node function in graphical mapping in SAP CPI

148 Views Last edit Jun 06 at 06:55 PM 3 rev

Hi All,

Hope you and your family are doing great!!

I need help to achieve one scenario.

Input structure is:

<data>

<record>

<name>john</name> <city>pune</city> <doc_no>1</doc_no>

</record>

<sub_record>

<doc_no>1</doc_no> <empid>321</empid> <asset>cpu</asset>

</sub_record>

<record>

<name>mark</name> <city>delhi</city> <doc_no>2</doc_no>

</record>

<sub_record>

<doc_no>2</doc_no> <empid>44</empid> <asset>computer</asset>

</sub_record>

<sub_record>

<doc_no>2</doc_no> <empid>89</empid> <asset>mouse</asset>

</sub_record>

</data>

Key is doc_no and output that I need is :

<?xml version="1.0" encoding="UTF-8"?>

<data>

<header>

<name>john</name><city>pune</city><doc_no>1</doc_no>

<sub_record>

<empid>321</empid><asset>cpu</asset>

</sub_record>

</header>

<header>

<name>mark</name><city>delhi</city><doc_no>2</doc_no>

<sub_record>

<empid>44</empid><asset>computer</asset>

</sub_record>

<sub_record>

<empid>89</empid><asset>mouse</asset>

</sub_record>

</header>

</data>

Can you please help me to identify which node functions are used to get the desired output.

Appreciate your help in advance.

Thanks,
Divya