Skip to Content
avatar image
Former Member

Help me on message mapping

Hello,

Plzz help me how do i map if below condition arise.

REFAJ123

REFCD432

here REF is Record with 2 fields 1)REF01 2)REF02

I want to mapping this REF record to output side record.

Query is: If REF01 field is AJ then i need to map REF02 field(123) is to be map output side field. else ignore that record.

Output,

I need only value of 123 beacause( REF01 has value AJ) i dont want below REF data in Output.

Thanks,

Singh.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 09, 2010 at 07:19 AM

    USE Standard Function

    if without else

    if REF01 --> Equals S

    Constant(AJ)

    Than REF02 --> Target

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks,

      For ur reply.

      Here i have one doubt.

      in output side i have to fieds field 1 is mapped from REF01.

      Field2 is mapped from above condition u have mentioned.

      If Ref 01 not equals to AJ then i want to ignore that record data.

      i.e. i dont want to print ref01 CR value in output.

      Thanks,

      Singh.

      Edited by: vcpsingh on Mar 9, 2010 1:19 PM

  • avatar image
    Former Member
    Mar 09, 2010 at 07:27 AM

    Hi,

    write a UDF like this,

    Input:REF01,REF02

    Output:result,container

    Mode: All values of Context

    -


    if(REF01[0].equals("AJ"))

    result.addValue(REF02[0])

    else

    {

    //nothing.....

    }

    -


    Try with this one..

    If still prblm.. pl do post

    Babu

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      babu,

      UDF is working properly.

      But,

      If i use

      REFAJ345

      REFCR123

      REFAJ123

      here i am not getting 3 record.

      only first record is coming in output. Could u plzz clarify my doubt.

      Thanks,

      Singh.

      Edited by: vcpsingh on Mar 12, 2010 6:08 PM

      Edited by: vcpsingh on Mar 12, 2010 6:14 PM