Skip to Content

Mapping requirment based on field value

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 11, 2012 at 03:29 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 11, 2012 at 03:39 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded