cancel
Showing results for 
Search instead for 
Did you mean: 

context handling for idoc

Former Member
0 Kudos

Dear all,

I have a graphical mapping issue in an IDoc to IDoc Scneario. I have a shipment IDoc where I need to map  E1EDL37 segment to target E1EDL37 only IF (E1DL44-EXIDV = 9999).

E1EDL44 is a segment below E1EDL37 .

It works fine in the scenario when there is  only one E1EDL44 segment under E1EDL37. The context for both E1EDL37 and E1EDL44-EXIDV is E1EDL20 .

I have a problem when there are two E1EDL44 Segments under E1EDL37 segment then I struggle with the context handling and regardless if the condition E1EDL44-EXIDV = 9999 is true.

EXIDV ( Context E1EDL20)

                                             EQUALS -----------------------------IF  

Constant[9999]

                                                                                THEN E1EDL37 (Context E1EDL20)   -------------------> Target (E1EDL37 )

The above  mapping works for all other scenarios except for the below scenario where there are two E1EDL44 segments. 

Source IDoc

E1EDL20

    -E1EDL37

       -- E1EDL44

             - EXIDV = 9999 cond = true

       -- E1EDL44

             -EXIDV  = 9999 cond = true

      -E1EDL37

        -- E1EDL44

              -EXIDV NE 9999 cond = false

        -- E1EDL44

             -EXIDV  NE 9999 cond = false

E1EDL20

  -E1EDL37

            - EXIDV = 9999 cond = true

      -- E1EDL44

            -EXIDV  = 9999 cond = true

     -E1EDL37

       -- E1EDL44

             -EXIDV NE 9999 cond = false

       -- E1EDL44

             -EXIDV  NE 9999 cond = false

Target IDoc should look like below.

E1EDL20

    -E1EDL37

      -- E1EDL44

            - EXIDV = 9999 cond = true

      -- E1EDL44

            -EXIDV  = 9999 cond = true

E1EDL20

  -E1EDL37

            - EXIDV = 9999 cond = true

      -- E1EDL44

            -EXIDV  = 9999 cond = true

Please advice.

Thanks,

Teresa


Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

In your case since you the context of EXIDV to E1EDL20 ;So values are coming under single array(true,true,false.false)-->so picking the first two for comparison.

What is your requirement exactly ? Do you need to map E1EDL37 to target when all values  of E1EDL37/EXIDV  equal to 9999 or at least one ?

If at least one then

change the context of EXIDV to E1EDL37 instead of E1EDL20

If all then as above said capture all the values of EXIDV under context of E1EDL20 under way jusp loop and cross check .

Regards

Venkat

Former Member
0 Kudos

Hello Venkat,

Since there are two deliveries E1EDL20 segments.

I am getting the value of EXIDV as below before checking the IF condition

true

true

false

false

-------Context change (E1EDL20)

true

true

false

false

The context for E1EDL37 which also has a context change (E1EDL20) is below before the IF Condition

E1EDL37

E1EDL37

---------------Context change (E1EDL20)

E1EDL37

E1EDL37

After the below IF condition the output is as below.

EXIDV ( Context E1EDL20)

                                             EQUALS -----------------------------IF 

Constant[9999]

                                                    THEN E1EDL37 (Context E1EDL20)   -------------> Target (E1EDL37 )

Current Output -

[]

[]

SUPPRESS

SUPPRESS

SUPPRESS

[]

[]

SUPPRESS

SUPPRESS

SUPPRESS

I am expecting the output to be as below - Therefore from the above IF condition I am expecting only ONE E1EDL37 in the target for each E1EDL20. 

[]

--------Context change E1EDL20

[]

The target should look like

E1EDL20

   E1EDL37

        -E1EDL44

         E1EDL44

--------------------------

E1EDL20

  E1EDL37

       -E1EDL44

        E1EDL44

I just want to make sure this does not affect the above scenarios which are already working where I have only one E1EDL44 segments not two. I am not sure if I need to use a UDF. If so can you please provide me with a sample.

Thank you ,

Teresa