cancel
Showing results for 
Search instead for 
Did you mean: 

mapping issue in idoc to jdbc scenario

Former Member
0 Kudos

Hi Experts,

the header data of invoice needs to be repeated based on LINE_NO and at the same time

IF PARVW=AG then we need to map PARTN with LOCATION_CODE

we have done the mapping logic like this

PARVW=AG---> IF THEN----> PARTN          
                                              ------->USEONEASMANY
                                             -----E1EDP01----           ------>Location_Code
                                          -----POSEX(LINE-NO)---

context of PARVW and PARTN is idoc. context of POSEX is E1EDP01

source data:

INVOIC02>

E1EDKA1 SEGMENT="1">

PARVW>RS</PARVW>

LIFNR>0000008100</LIFNR>

/E1EDKA1>

E1EDKA1 SEGMENT="1">

PARVW>AG</PARVW>

PARTN>0000001000</PARTN>

/E1EDKA1>

E1EDKA1 SEGMENT="1">

PARVW>RE</PARVW>

PARTN>0000008100</PARTN>

/E1EDKA1>

E1EDKA1 SEGMENT="1">

PARVW>RG</PARVW>

PARTN>0000008100</PARTN>

/E1EDKA1>

E1EDKA1 SEGMENT="1">

PARVW>BK</PARVW>

LIFNR>2000</LIFNR>

/E1EDKA1>

/IDOC>

/INVOIC02>

required target:

row

Location_Code>0000001000</Location_Code>

row

<Location_Code>0000001000</Location_Code>

PROBLEM is we are getting the below instead of the above:

row

Location_Code>0000008100</Location_Code>

row

<Location_Code>0000008100</Location_Code>

regards

arun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
PARVW=AG---> IF THEN----> PARTN          
                                --->USEONEASMANY
                                --->E1EDP01        --->RemoveContext-->SplitByValue-->Location_Code
                                --->POSEX(LINE-NO)

Try above mapping.

Alternatively you can use CopyValue(0) instead of UseOneAsMany.

PARVW=AG-> IF THEN> PARTN -


>RemoveContext>CopyValue--->Location_Code

Regards,

Sarvesh

Former Member
0 Kudos

HI SArvesh

mapping with COPY VALUE , has solved our problem , actually we were trying only with useoneasmany and that has issue with context change and it is not giving the exact required target which is handled through COPY VALUE

thanks for your immediate help

regards

arun

Answers (1)

Answers (1)

former_member187339
Active Contributor
0 Kudos

Hi,

Try your mapping like:



            PARTN--| THEN
PARVW=AG---> IF     --------------------------->USEONEASMANY ------>splitbyValue--->Location_Code
        Constant(') ELSE          E1EDP01---------| 
                                       POSEX(LINE-NO)----|
                                                                                

Regards

Suraj