Skip to Content
0
Former Member
Apr 06, 2011 at 12:47 PM

XI Mapping of list field

20 Views

Hi there,

i have to make a change in a PI Mapping...

Until now the mapping was looking that:

SOURCE:

<ITEM>
      <KSCHL>100</KSCHL>
      <VKORG>1000</VKORG>
      <CNO>123456</CNO>
      <DISCPRODHIER>12345</DISCPRODHIER>
      <DISCAMOUNT_T>15</DISCAMOUNT_T>
      <KONWA>ZRSM</KONWA>
      <DISCVALIDON_T>010101</DISCVALIDON_T>
      <DISCVALIDTO_T>010101</DISCVALIDTO_T>
   </ITEM>

TARGET:

<ITEM>
      <ZEN_CON_001>
         <KSCHL>100</KSCHL>
         <VKORG>1000</VKORG>
         <KUNNR>123456</KUNNR>
         <PRODH1>12345</PRODH1>
         <KBETR>15</KBETR>
         <KONWA>ZRSM</KONWA>
         <DATAB>010101</DATAB>
         <DATBI>010101</DATBI>
      </ZEN_CON_001>
   </ITEM>

Every target item was unique of a source item.

But now in the field PRODH1 the PI will get multiply values....

"12345,12346,12347,12348,12349"

e.g: <PRODHIER>12345,12346,12347,12348,12349</PRODHIER>

The mapping should create for every one of the separated values one target item ("</ZEN_CON_001>").

Then we should have 5 target Items as result of the source item with these 5 Values in PRODH1 from the example.

Should look like this:

Source:

<ITEM>
      <KSCHL>100</KSCHL>
      <VKORG>1000</VKORG>
      <CNO>123456</CNO>
      <DISCPRODHIER>12345,12346,12346</DISCPRODHIER>
      <DISCAMOUNT_T>15</DISCAMOUNT_T>
      <KONWA>ZRSM</KONWA>
      <DISCVALIDON_T>010101</DISCVALIDON_T>
      <DISCVALIDTO_T>010101</DISCVALIDTO_T>
   </ITEM>

mapping target:

<ITEM>
      <ZEN_CON_001>
         <KSCHL>100</KSCHL>
         <VKORG>1000</VKORG>
         <KUNNR>123456</KUNNR>
         <PRODH1>12345</PRODH1>
         <KBETR>15</KBETR>
         <KONWA>ZRSM</KONWA>
         <DATAB>010101</DATAB>
         <DATBI>010101</DATBI>
      </ZEN_CON_001>
<ZEN_CON_001>
         <KSCHL>100</KSCHL>
         <VKORG>1000</VKORG>
         <KUNNR>123456</KUNNR>
         <PRODH1>12346</PRODH1>
         <KBETR>15</KBETR>
         <KONWA>ZRSM</KONWA>
         <DATAB>010101</DATAB>
         <DATBI>010101</DATBI>
      </ZEN_CON_001>
<ZEN_CON_001>
         <KSCHL>100</KSCHL>
         <VKORG>1000</VKORG>
         <KUNNR>123456</KUNNR>
         <PRODH1>12347</PRODH1>
         <KBETR>15</KBETR>
         <KONWA>ZRSM</KONWA>
         <DATAB>010101</DATAB>
         <DATBI>010101</DATBI>
      </ZEN_CON_001>
   </ITEM>

Please can you help me at this?

I have tried to create a UDF for that, but i hadn't any success.

Thank you very much!