Skip to Content
avatar image
Former Member

PI mapping - group-by and sum

Hi,

In SAP PI, I have a Message Type with the following elements :

- PONum

- PODate

-Supplier

-Division

-EAN

-Quantity

-GrossPrice

I want to group by EAN and sum the field Quantity.

Can I do this by PI mapping ?

Can you help me ?

When I try to make mapping, I get the same number of rows in my target message type even if I have the same EAN in several rows.

My Message Type is sorted by EAN.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 20, 2014 at 02:32 PM

    Hi,

    The source and the target message types have the same structure :

    EAN mapping :

    Quantity mapping :

    For the other fields, I map them with the same field.

    When I test with the MT.xml file, I got this error message :

    Thanks.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2014 at 02:16 PM

    Hi Pilar,

    you can achieve this in graphical mapping. the logic would be

    EAN --> remove context --> split by value (value change) --> collapse contest

    from this you will no of messages.

    for quantity you req. below mapping

    quantity -->> remove context --> format by example (as below) -->

    EAN --> remove context --> split by value (value change)

    for more specific mapping, please provide input and output structure.

    regards,

    Harish

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2014 at 02:17 PM

    Hi Pilar,

    Yes it can be achieved in PI mapping.

    Can you please share the screenshot of your mapping with Source n Target structures

    Regards,

    Azhar

    Add comment
    10|10000 characters needed characters exceeded