cancel
Showing results for 
Search instead for 
Did you mean: 

EDI TO IDOC MAPPING

Former Member
0 Kudos

Hi Experts,

I have 1 mapping requirement like

Source:


           <L_N1>

               <S_N1>

                  <D_98>BO</D_98>

                  <D_93>RETURNS CODE</D_93>

                  <D_66>92</D_66>

                  <D_67>NV</D_67>

               </S_N1>

            </L_N1>

            <L_N1>

               <S_N1>

                  <D_98>MA</D_98>

                  <D_93>NEERAV   JAIN</D_93>

               </S_N1>

               <S_N3>

                  <D_166>ANJI </D_166>

                  <D_166_2>REDDY</D_166_2>

               </S_N3>

               <S_N4>

                  <D_19>NEW YORK</D_19>

                  <D_156>NY</D_156>

                  <D_116>10010</D_116>

               </S_N4>

            </L_N1>

        

In the above example when ever <D_98> equal to BT qualifier and S_N3 segment exists then ZCOMMHD segment had to form at IDOC end.

That was formed.


But under ZCOMMHD segment one field is there named X for that field we have to pass  data of D_166 and D_166_2 which are under S_N3 segment [By concatenating both the fields] . Here 1 restriction was there i.e. We need to pass the data to X field of S_N3 segment which are coming under S_N1 BT qualifier.

EX: Data will come as follows

<L_N1>

               <S_N1>

                  <D_98>MA</D_98>

                  <D_93>NEERAV   JAIN</D_93>

               </S_N1>

               <S_N3>

                  <D_166>TESTING </D_166>

                  <D_166_2>SCENARIO</D_166_2>

               </S_N3>

               <S_N4>

                  <D_19>NEW YORK</D_19>

                  <D_156>NY</D_156>

                  <D_116>10010</D_116>

               </S_N4>

            </L_N1>

            <L_N1>

               <S_N1>

                  <D_98>BT</D_98>

                  <D_93>NEERAV   JAIN</D_93>

               </S_N1>

               <S_N3>

                  <D_166>ANJI REDDY</D_166>

                  <D_166_2>TESTING AGAIN</D_166_2>

               </S_N3>

               <S_N4>

                  <D_19>NEW YORK</D_19>

                  <D_156>NY</D_156>

                  <D_116>10010</D_116>

               </S_N4>

            </L_N1>

Here for S_N1 segment 2 qualifiers are there MA and BT. BUT at target side ZCOMMH segment had to for when ever D_166 segment equal to BT.

         

              Under ZCOMMH  X value had to come like  ANJI REDDY/TESTING AGAIN [which is coming under D_98 equals BT]

                                

                          Not like  TESTING/SCENARIO [which is coming under D_98 equals MA]

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Use If Without Else - 

IF -  If the <D_98> field equals "BT"

THEN - map <D_166> / <D_166_2>  to ZCOMMH

For all other conditions, target field ZCOMMH will not be generated

former_member186851
Active Contributor
0 Kudos

Hello Anji,

Please post the condition your using for field X.

I guess your not comparing correctly/context issues.

Former Member
0 Kudos

HI ,

In the above posting Some condition was given wrong. Please check the below one.

Here for S_N1 segment 2 qualifiers are there MA and BT. BUT at target side ZCOMMHsegment had to create when ever D_98 segment equal to BT.

        

              Under ZCOMMH  X value had to come like  ANJI REDDY/TESTING AGAIN[which is coming under D_98 equals BT]

                               

                          Not like  TESTING/SCENARIO [which is coming under D_98 equals MA]

Note: Please check the above payload once again

Former Member
0 Kudos

Hi Anji

Do the mapping like below

output:

Thanks,

Indrajit

nidhi_srivastava22
Active Contributor
0 Kudos

I agree to Indrajit, this will solve your issue. Make sure you keep the context of all the three source fields to be same(right click and check the context).

Thanks,

Nidhi