cancel
Showing results for 
Search instead for 
Did you mean: 

hierarchical structure message mapping in PI

Former Member
0 Kudos

Hello All,

I have a source and target structure in graphical message mapping

<?xml version="1.0" encoding="UTF-8"?>

<Material_MT>

   <row>    0..unbounded

      <MATERIAL_ID>1234</MATERIAL_ID>

      <DEL_FLAG>

     </row>

  <row>    0..unbounded

      <MATERIAL_ID>1234</MATERIAL_ID>

      <DEL_FLAG>Y</DEL_FLAG>

     </row>

  <row>  

      <MATERIAL_ID>4567</MATERIAL_ID>

      <DEL_FLAG>N</DEL_FLAG>

     </row>

<row>  

      <MATERIAL_ID>1234</MATERIAL_ID>   

      <DEL_FLAG>N</DEL_FLAG>

     </row>

</Material_MT

Materials can repeat in the source structure but their flags could be different

Target structure


<Mat>  1..1

<Mat_update> 0..unbounded

   <Matid>

           <Matreg>

                 <Matcomplete/>

                 <tuple>

                      <id/>

                  </tuple>    

           </Matreg>

     </Matid>

     <recordind>

            <id>

      </recordind>

</Mat_update>


Now, the requirement is


1) For each <MATERIAL_ID>  in the source, map its corresponding flag <DEL_FLAG> value <Matcomplete/ field in the target ,

2) For each  <MATERIAL_ID> in the source, take its corresponding value and make a soap  lookup call in mdm to get tuple ids (mutiple value per material possible) and map each to <id> (under <tuple>)

3) For each <MATERIAL_ID> in the source, take its corresponding value and make a soap lookup call in mdm to get <recordind> (single value per material) and map to <id> under <recordind>


Now, I have done soap lookup for 2)  and getting multiple tupleIDs for a single material


For 3) also, I am doing a lookup and getting a single ID back 


Both 2)   and 3) are achieved using  udf soap lookup  - 2) will return a resultlist and 3 a single string value

My main question is how to do message mapping for achieving step1, 2 and 3. Pls help...its needed badly

Thanks

mike





Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Mike,

Below is the logic as per my understanding.

1- Direct mapping from DEL_FLAG> value <Matcomplete/ field in the target

2- After lookup Map multiple Tuple Id's to Tuble node.

3-After lookup Map  recordind to Id .

If you want it in detail let me know the sample output structure with values.

Regards,

Sudha