cancel
Showing results for 
Search instead for 
Did you mean: 

Problem mapping IDOC context

Former Member
0 Kudos

Hello,

I've the follow IDOC

E1EDP01                0..9999

    POSEX            0..1

    E1EDP20

        ZSD_E1EDP20    0..9999

            Reparto 0..1

I need created the statment1 for each Reparto.

Example:

E1EDP01

    POSEX = 10

    E1EDP20

        ZSD_E1EDP20

            Reparto = 1

        ZSD_E1EDP20

            Reparto = 2

E1EDP01

    POSEX = 20

    E1EDP20

        ZSD_E1EDP20

            Reparto = 1

        ZSD_E1EDP20

            Reparto = 2

In this case, in target, it must be created four node statament1

The mapping is:

ZSD_E1EDP20 (context: E1EDP01) -> Statment1

It's create only two statment1:

1) Posex 10

   Reparto 1

2) Posex 20

   Reparto 2

I've testing differents options, but i fail

Any Idea?

Regards,     

Silvia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Silivia,

Since you changed the context of ZSD_E1EDP20 as E1EDP01 this is resulting into tow statement1, it is working correct since there are only two ZSD_E1EDP20 under each E1EDP01.

In order to create 4 statements, you need to change the context of ZSD_E1EDP20 to the parent of the node E1EDP01(Two level up).

Regards,

Ashish

Former Member
0 Kudos

if I do what you say, I have a problem with a field posdoc:

E1EDP01                               statment1

     POSEX                                   tablename

     ...                                             action

                                                      table

                                                      access                                                             
                                                            posdoc

The mapping is

POSEX -> posdoc

and the error is:


Cannot produce target element /ns0:MT_TRAS/STATEMENT1[3]/TABLENAME/ACCESS/POSDOC. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

Former Member
0 Kudos

Siliva,

As per the requirment, i believe each of the POSEX value would be repeated in two statements ?

Since in above example, POSEX is coming two times in whole payload & you have four statements in output. So i m assuming the first POSEX will be there in Statement[0] & Statement[1].

POSEX second value will be part of Statement[2] & Statement[3]

Am I correct?

Regards,
Ashish

Former Member
0 Kudos

Siliva,

Here you need to repeat POSEX for the number of times ZSD_E1EDP20 is coming under E1EDP20.

You should use one as many function where POSEX will be first parameter & ZSD_E1EDP20 will be seconf & third parameter.

Regards,

Ashish

Answers (0)