Skip to Content
avatar image
Former Member

IDOC segment elements sending multiple values

Hello all,

I have a very unique requirement.

Segment E1EDK18 is appearing once or twice in most cases, however its occurance is set 0 to 3,

scenario is IDOC <-> PI <-> EDI 850.

segment structure is:

Segment - E1EDK18

Fields - QUAL

- TAGE

- PRZNT

Logic i have to implement is:

PRZNT - if there are two segments of E2EDK18,

then populate ITD.03 (target field) with PRZNT where QUALF = 001, Else leave it blank

TAGE - If there are two segments of E2EDK18,

then populate ITD.05 with TAGE where QUALF = 001 . Else leave it blank

TAGE - If there are two segments of E2EDK18 then populate 07

with TAGE where QUALF = 002 else if it only one E2EDK18 segment

then populate 07 with TAGE where QUALF = 001

I tried all the mapping options, but what is happening is for every E1EDK18 segment, one ITD segment is created in Target. i want all these values to populate inside one ITD segment on the target side.

Thanks in advance.

Regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 06, 2009 at 02:04 AM

    Hi Pavan,

    You should be able to achieve your mapping requirement using the standard mapping functions itself.

    e.g

    • Map a Constant with ITD*. Dont map E1EDK18 with ITD.

    To check the occurence of E1EDK18 you can use the "Count" function.

    For the field mapping you can try below ( with some modification)

    E1EDK18 ---> count--->
                                    equalsS ---> ifWithoutElse-----> ITD.03
    constant(2) ---->

    At the second level you have to add a condition for your QUALF = 001.

    If the QUALF for the first E1EDK18 segment will be always 001, you dont have to even check that condition. You can map the input fields directly with the target and it will take the values from the first occurence of E1EDK18.

    Also, you can write a small UDF to achieve your mapping requirement.

    Thanks,

    Pooja Pandey

    Add comment
    10|10000 characters needed characters exceeded