cancel
Showing results for 
Search instead for 
Did you mean: 

Need Mapping help

former_member229310
Active Participant
0 Kudos

Hello,

I would need a help in mapping. Below is the requirement.

Source File

field1 field2 field3 Quantity flag

Par 20110101 MAT1 1 X

Par 20110101 MAT1 2 X

Par 20110102 MAT2 1 X

Par 20110101 MAT2 3

Par 20110103 MAT2 1 X

Par 20110102 MAT1 2 X

Par 20110101 MAT3 1

Par 20110102 MAT2 4 X

Par 20110101 MAT4 1

Target File

Need to add quatity for the same field2 and field3. Only flag entries should be considered. Need to exclude unflag entries.

field1 field2 field3 Quantity

Par 20110101 MAT1 3

Par 20110102 MAT1 2

Par 20110102 MAT2 5

Par 20110103 MAT2 1

Par 20110103 MAT2 1

I tried with context mapping but getting stuck. Could anyone give some idea how to proceed.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can easily do in graphical mapping. As per your below input data

Field1	Field2	Field3	Field4	Field5
Par	20110101	MAT1	1	X
Par	20110101	MAT1	2	X
Par	20110102	MAT2	1	X
Par	20110101	MAT2	3	
Par	20110103	MAT2	1	X
Par	20110102	MAT1	2	X
Par	20110101	MAT3	1	
Par	20110102	MAT2	4	X
Par	20110101	MAT4	1	

Step1: - First Concat both FIELD2+FIELD3 and then use SORTY BY KEY Option & sort remaining all fields based on those value.

Step2:- Then based on this automatically all the other fields will be changed and then use FORMAT BY EXAMPLE and out of passing 2 arguements to the Format By Example - 1st Arguement is Pass the respective field values by doing a Remove Context and 2nd arguement pass the Field3 by passing SPLIT BY VALUE CHANGE.

Step 3: - once it is done here first context is decided by the end of the step2

Step4: - Once the contexts are decided then filter by the help of IF WITHOUT ELSE if FIELD 5 !=X then pass else IGNORE

Step5: - then at node level by creating target Records use COLLAPSE CONTEXT so as per the input data

Par 20110101 MAT1 3 - 1 record and Par 20110102 MAT1 2 - 1 NODE...................................... will be creating at first level

Step6: - Later on At the end of creating 4 field at target side simply use SUM present in STATIC FUnctions graphical options.

Ur requirement will be achived.

Regards

Amar Srinivas ELi

Edited by: Amar Srinivas Eli on Sep 26, 2011 7:55 PM

Answers (1)

Answers (1)

former_member229310
Active Participant
0 Kudos

used the graphical mappin as suggested