cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping requirment based on field value

santosh_k3
Active Participant
0 Kudos

Hi All,

I have a mapping requirement

where in the file i have a 2 AM records as shown

AM U 00000000000010000C

AM X 00000000000120000

Based on AM-03 field i..e,, AM-03 = 'C'

then to the target field i need to pass the value(00000000000120000) of next AM02 record.

so when ever AM03 filed is 'C' then i need to pass the value of next AM record.

can any body suggest me how i it can be acheived.

Thanks

Sai_SHA

Accepted Solutions (0)

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You coud also try doing message mapping itself

Step 1) source idoc field and constant function (value say C) as two inputs for the function equalsS

Step 2) output of equalsS give it to if input of ifwithoutelse function

Step 3) map source idoc field to then input of ifwithouelse function.

Step 4) ifwithoutelse function output to target field.

Former Member
0 Kudos

i am not sure whether i have understood ur req correctly or not..

but u can chk this UDF in ur mapping:

execution type: all values of a context


if(var1[0].equals("C"))
{
result.addValue(var2[1]);
}

filed3---removecontext

-


UDF----target

field2---removecontext

santosh_k3
Active Participant
0 Kudos

Hi AmitSri,

The understanding is absolutely correct.

thanks, it is working fine

Thanks

Sai_SHA