Skip to Content

Need help with UDF PI

Hi All,

Can you please help me with the Mapping for below requirement.

Idoc has multiple E1EDP01 segments

  1. E1EDP01
  2. --> E1EDPT1 (TDID - Z005)
  3. --> E1EDPT2 -> TDLINE - Value1#Value2#Value3
  4. --> E1EDPT2 -> TDLINE - Value1#Value2#Value3

I have to take the E1EDPT2 TDLINE and split the values as

Value1 -> Target1

Value2 -> Target2

Value3 -> Target3

capture.jpg (58.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 27, 2017 at 09:26 AM

    Hi,

    Can you try this one? There are three UDFs, two splitters and one for joining

    split 1

    split 2 has three result values

    join UDF

    Here's the mapping

    E1EDP01 --> Header

    TEDIOptionList_Details, concat is using pipe "|" as its delimiter

    context of TDLINE set to E1EDPT1

    Mapping for OptionName_, Choice_ and ChoiceCode_

    TDLINE and TDID context same as the two previous mappings.

    Test:

    Regards,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 26, 2017 at 12:00 PM

    Try the below UDF.

    if(var1[0].equals("Z005"))
    {
    for(int j=0;j<var1.length;j++)
    {
    String s[]=var1[j].split("#");
    for(int i=0;i<s.length;i++)
    {
    result.addValue(s[i]);
    }
    }
    }

    Add comment
    10|10000 characters needed characters exceeded