cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello.

I would like to ask you how can I manage this requeriment with the PI/PO graphical mapping.

I receive something like this:

<record>

<po_number>22</po_number>

<line_number> 1 </line_number>

<text> helllo </text>

</record>

<record>

<po_number>22</po_number>

<line_number> 2 </line_number>

<text> helllo </text>

</record>

<record>

<po_number>33</po_number>

<line_number> 3 </line_number>

<text> helllo </text>

</record>

<record>

<po_number>33</po_number>

<line_number> 4 </line_number>

<text> helllo </text>

</record>

So several equal lines, where we have a value repeated more than once that indicates the po number ( for example ) and the items of that po,every time the po_number changes I have to create a new entity of the target message

<JournalEntryCreateRequest>

<JournalEntry>

<OriginalReferenceDocumentType>22</<OriginalReferenceDocumentType>

<Item>

<ItemGroup>1/<ItemGroup>

<text>helllo</text>

</Item>

<Item>

<ItemGroup>2/<ItemGroup>

<text>helllo</text>

</Item>

</JournalEntry>

</JournalEntryCreateRequest>

<JournalEntryCreateRequest>

<JournalEntry>

<OriginalReferenceDocumentType>33</<OriginalReferenceDocumentType>

<Item>

<ItemGroup>3</ItemGroup>

<text>helllo</text>

</Item>

<Item>

<ItemGroup>4</ItemGroup>

<text>helllo</text>

</Item>

</JournalEntry>

</JournalEntryCreateRequest>

Could you help me?

Thanks,

Jorge.

0 Likes
View Entire Topic
Harish
Active Contributor
0 Likes

Hi Jorge,

You can achieve this using graphical mapping and node functions.

First - Create JournalEntryCreateRequest for a unique PO number

mapping

PO Number --> Remove context --> Split by value (value change) --> Collapse context --> JournalEntryCreateRequest

Second - JournalEntry and OriginalReferenceDocumentType

same mapping with additional split by value (each value)

Third - item

Item Group - Line number

text

mapping result (text is modified with number at the end)

hope this will help!!

regards,

Harish