on 11-28-2017 11:09 AM
Hi SDNites,
I have a mapping scenario in which values has to be summed up after sorting the records. Can you please guide how can this be done i.e. can it be achieved using message mapping without UDF or do I need to use UDF mandatorily?
Input,
VBELN POSNR MATNR QTY
123 10 MAT1 2
234 10 MAT1 4
123 20 MAT2 5
123 30 MAT1 3
123 10 MAT1 8
234 10 MAT1 3
234 20 MAT2 4
Output,
VBELN POSNR MATNR QTY
123 10 MAT1 10 (Value summed up)
123 20 MAT2 5
123 30 MAT1 3 (Same material but not summed as different position)
234 10 MAT1 7
234 20 MAT2 4
I have to produce the right vbeln, posnr, matnr against the summed up quantity. Can you please advise how can this be achieved.
Regards,
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Abhishek,
For this kind of duties, one approach that has worked with me is using XSLT transformations. There is an specific command to sort the data and you could even summarise using xslt. It is clean and straight forward.
Have a look into the sort and sum commands
https://www.w3schools.com/xml/xsl_sort.asp
Regards,
Ariel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.