cancel
Showing results for 
Search instead for 
Did you mean: 

Which Mapping to use??

Former Member
0 Kudos

Hi ALL,

I have the following input to be reformated to the below specfied output format. Can I acheive this using Graphical mapping or Do I have to go for XSLT/Java mapping?? Which one will be better choice for this scenario??

<u>Example Input:</u>

Period 1 | Material A | Plant A | Volume 50

Period 1 | Material B | Plant A | Volume 75

Period 3 | Material A | Plant A | Volume 25

Period 3 | Material C | Plant A | Volume 60

Period 3 | Material C | Plant B | Volume 30

<u>Example output:</u>

Plant A | Material A |Volume 50 | 00 |Volume 25| 00 | 00 | …..

Plant A | Material B |Volume 75 | 00 | 00 | 00 | 00 | …..

Plant A | Material C | 00 | 00 |Volume 60| 00 | 00 | …..

Plant B | Material C | 00 | 00 |Volume 30| 00 | 00 | …..

XI has to accumulate all matching records by plant, material and period. And have to slot the quantities into 13 period buckets... and write one output record for each unique plant and material combination.

Regards,

Raks

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Raks,

>>>>Which one will be better choice for this scenario??

..depending

If you dont have special requirements regarding <a href="/people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs i would recommend to use that mapping what is known best. If you dont know either graf mapping nor XSL, Java or ABAP it is easier to learn XSL or graf mapping than Java or ABAP.

Regards,

Udo

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

It's quite simple example in my opinion you should use here graphical mapping.

regards,

wojtek

Former Member
0 Kudos

Hi,

But you will have to write your own java functions to agregate it. Inside you can use HashMap with object key.

regards,

wojtek

Former Member
0 Kudos

Hi wojtek,

Can you pls elaborate on "HashMap" and I want to sort these records using atleast 3 feilds and want to create a single record for unique Plant, material. And source is a file which contains atleast 3000 records.

Regards,

Raks

Former Member
0 Kudos

Hi,

a) Please create a class with three fields and should implement interface Comparable than implement method equals

b) compile it

c) zip it or create jar file

d) import it to repository now you will be able to use it in your mapping

e) in user define function import this class (use the same packge in which it is)

f) use hashMap (http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html)

Regards,

wojtek