cancel
Showing results for 
Search instead for 
Did you mean: 

How to create header and item from single source node in SAP PO 7.5

0 Kudos

Hi Experties,

Below is source xml and expected output XML.

Source XML:

<Record>

<ID>1</ID>

<Po>2</Po>

</Record>

<Record>

<ID>1</ID>

<Po>3</Po>

</Record>

</Record>

<Record>

<ID>2</ID>

<Po>4</Po>

</Record>

Expected Output

-<Header>

<ID>1</ID>

---<item>

<Po>2</Po>

</Item>

---<item>

<Po>3</Po>

</Item>

</Header>

-<Header>

<ID>2</ID>

---<item>

<Po>4</Po>

</Item> </Header>

Accepted Solutions (0)

Answers (2)

Answers (2)

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Neha ,

Try the below mapping :

P.S : Please make sure to close all your open threads by marking helpful/correct answers.

Mapping Logic

Result :

Thanks,

Manoj

0 Kudos

Thanks manoj. It works

manoj_khavatkopp
Active Contributor
0 Kudos

neha_gupta96 : Good to know , make sure to close thread by marking correct/helpful annwers.

babruvahana
Contributor
0 Kudos

Hi Neha,

You can leverage node functions to create the expected output structure. I suggest you to go through the blogs in the community to understand node functions, queues and contexts.

Regards,

Pavan

0 Kudos

Dear Pavan,

I have done below mapping. But the new header is not getting created when LIFEX have 2 values It should create 2 header and the second header line item should be below that header.

mapping for header.

Mapping for Item: