cancel
Showing results for 
Search instead for 
Did you mean: 

mapping issue

Former Member
0 Kudos

Hi PI Experts,

My source data is like this.

customer

--name

--order

-


id

-


amount

my target data is like this.

sales details

--customer details

-


name

-


total orders of customer

-


total amount of customer

--summary

-


total customers

-


total orders of customers

-


total amount of customers

my scenario is, if they are number of orders for a particular customer on the source side then the sum of all the amounts for that particular customer should be printed on the first node of the target side i.e 'total amount of customer' and if once again the same customer node is repeated on the source side then the 'total customers' on the target side should be taken as '1' and i should get the' total amount of all the customers' on the last node of the target data.

For example, if i had a

customer 'A' and he has 2 orders i.e " '101,1000' ", " '102,2000' "

customer 'B' and he has 3 orders i.e " '201,3000' ", " '202,4000' "

customer 'A' and he has 3 orders i.e " '301,100' ", " '302,200' ", " '303,300' "

so the output should be like this....

sales details

--customer details

-


name................................................'A'

-


total orders of customer..................'2'

-


total amount of customer.................'3000'

--customer details

-


name................................................'B'

-


total orders of customer..................'2'

-


total amount of customer.................'7000'

--customer details

-


name................................................'A'

-


total orders of customer..................'3'

-


total amount of customer.................'600'

--summary

-


total customers...............................'2'

-


total orders of customers...............'7'

-


total amount of customers..............'10,600'

Hope u understood my scenario..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Srinivasbajina,

go with the following:


customer -->customer details
               name ---> name 
               order (set a higher context)-->[count]---->total orders of customer
               amount (context to customer) --->  [Sum] -->total amount of customer


[constant]---->summary
    customer---> [removeContexts]--->[Sort]---->[SplitByValue(ValueChange)]-->[collapseContext]-->[Count]--->total customers
    order---> [removeContexts]--->[Count]--->total orders of customers
    amount---> [removeContexts]--->[Sum]--> total amount of customers

Regards,

Konrad

Answers (1)

Answers (1)

Former Member
0 Kudos

Thank u Konrad Thalheim

can u tell me some sites where i can find some mapping exercises??

Former Member
0 Kudos

Srinivasbajina,

search the SDN for good stuff.

E,g, the PI Learing map: http://wiki.sdn.sap.com/wiki/display/XI/LearningMap or http://wiki.sdn.sap.com/wiki/display/XI/ProcessOrchestration-ProcessIntegration-ExchangeInfrastructure

The blogs in http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/t/16 are usually very good.

By the way. If someone has answered your question close the topic as at least I am searching for unanswered topics. Read also the forum rules:

Enjoy PI!

Regards,

Konrad

Edited by: Konrad Thalheim on Jan 28, 2012 5:45 PM