Skip to Content
avatar image
Former Member

SAP PI/PO genereal question on a mapping

Hi All,

Just a question on graphical mapping in SAP PI/PO around something.

<Node>

<Field1>

<Field2>

<FIeld3>

<Node/>

Requirement: Add values of Field3 where Field1 Field2 are unique.Just be more clear, here is an exampe data

<Node>

<Field1>Name</Field1>

<Field2>Test</Field2>

<FIeld3>3<FIeld3>

</Node>

<Node>

<Field1>Name</Field1>

<Field2>Test</Field2>

<FIeld3>4<FIeld3>

</Node>

<Node>

<Field1>Name</Field1>

<Field2>Test1</Field2>

<FIeld3>6<FIeld3>

</Node>

Output should be:

<Node>

<Field1>Name</Field1>

<Field2>Test</Field2>

<FIeld3>7<FIeld3>

</Node>

<Node>

<Field1>Name</Field1>

<Field2>Test</Field2>

<FIeld3>6<FIeld3>

</Node>

Any thoughts?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 12, 2017 at 05:35 AM

    Hi,

    There is no need for UDF.

    For node:

    For field1/field2

    For field3

    Test:

    Regards,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 11, 2017 at 07:03 AM

    Hi Shyam,

    This can be achieved using udf. try the below mapping

    Concat (Field1 and Field2) --> remove context --> split by value (value change) --> input 1 for udf

    Input 2

    Field3 with remove context

    UDF (Context UDF)

    loop the input 2 with the occurrence of input 1 and add the input values.

    Hope this can help.

    regards,

    Harish

    Add comment
    10|10000 characters needed characters exceeded