on 06-13-2012 4:59 AM
We have a complex mapping issue. We have to map E1EDL24 from source to E1EDP09 in target,but there is an issue of batch split i.e. a single E1EDP09 may need to be populated from multiple E1EDL24.The E1EDL24 may appear multiple times for the same MATNR.
The E1EDL24 segment contains fields such as LIFMG,NTGEW which are to be added up in case a material contains batches i.e. same MATNR may appear in two or more segments. The possible cases are:
1.One material with no batch split:
<E1EDL24 SEGMENT="1">
<POSNR>900002</POSNR>
<MATNR>000010</MATNR>
<MATWA>0000010</MATWA>
<ARKTX>XYZ1</ARKTX>
<MATKL>XYZZZ0</MATKL>
<WERKS>XYY13</WERKS>
<LGORT>A101</LGORT>
<CHARG>10.01.2012</CHARG>
<KDMAT>XYZ</KDMAT>
<LFIMG>6.000</LFIMG>
i.e a single segment appears and will create a single E1EDP09 in target
2.One material with batch split:
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>1234</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>RANDOM_VICE_MTL_1</ARKTX>
<MATKL>ZFG100000</MATKL>
<WERKS>MY13</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>0.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>0.000</NTGEW>
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>1234</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>DXYZ</ARKTX>
<MATKL>Z</MATKL>
<WERKS>M</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>10.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>20.000</NTGEW>
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>1234</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>DXYZ</ARKTX>
<MATKL>Z</MATKL>
<WERKS>M</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>15.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>10.000</NTGEW>
Notice how the same material no.(MATNR) has been populated in a no. of E1EDL24 as it has a batch split. In such a case also there should be a single E1EDP09 but the
values of LIFMG,NTGEW be summed up i.e for LIFMG=0+10+15=25 & for NTGEW=0+20+10 =30.
Upto this requirement, it was doable as we mapped as E1EDL24->CollapseContexts->E1EDP09 and for summation LIFMG->RemoveContexts->sum->LIFMG.
However for following cases,we are facing issues
3.Two Material without batch split:
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>123456</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>DXYZ</ARKTX>
<MATKL>Z</MATKL>
<WERKS>M</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>12.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>10.000</NTGEW>
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>12345678</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>DXYZ</ARKTX>
<MATKL>Z</MATKL>
<WERKS>M</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>15.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>10.000</NTGEW>
Here we should get TWO E1EDP09 segments as the material no. is different,with LIFMG as 12 & 15 respectively.
4.Two material with batch split:
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>123456</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>DXYZ</ARKTX>
<MATKL>Z</MATKL>
<WERKS>M</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>0.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>0.000</NTGEW>
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>12345678</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>DXYZ</ARKTX>
<MATKL>Z</MATKL>
<WERKS>M</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>0.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>0.000</NTGEW>
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>123456</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>DXYZ</ARKTX>
<MATKL>Z</MATKL>
<WERKS>M</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>12.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>10.000</NTGEW>
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>12345678</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>DXYZ</ARKTX>
<MATKL>Z</MATKL>
<WERKS>M</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>15.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>10.000</NTGEW>
<E1EDL24 SEGMENT="1">
<POSNR>000010</POSNR>
<MATNR>12345678</MATNR>
<MATWA>000000000010000010</MATWA>
<ARKTX>DXYZ</ARKTX>
<MATKL>Z</MATKL>
<WERKS>M</WERKS>
<LGORT>A101</LGORT>
<KDMAT>1234</KDMAT>
<LFIMG>25.000</LFIMG>
<VRKME>CT</VRKME>
<LGMNG>0.000</LGMNG>
<MEINS>MIL</MEINS>
<NTGEW>10.000</NTGEW>
Notice how for each MATNR there are multiple segments, first with zero LIFMG and the others with a value, in such cases there should be two E1EDP09 in target but with
values summed up for each MATNR, i.e for MATNR= 123456,LIFMG should be summed as 0+12=12 & for MATNR=12345678, LIFMG should be summed as 0+15+25. We may need UDF's for populating E1EDP09 as well as for summation logic
Message was edited by: Michael Appleby
Hello,
You won't be needing any UDFs for this. See example mapping:
For E1EDP09:
MATNR -> removeContext -> sort:lexi asc -> splitByValue:ValueChanged -> collapseContext -> E1EDP09
For MATNR:
MATNR -> removeContext -> sort:lexi asc -> splitByValue:ValueChanged -> MATNR
For POSNR,WERKS,LGORT,CHARG,KDMAT,VRKME:
MATNR --> removeContext -------> sortByKey:lexi asc ----------------> formatByExample -> POSNR
POSNR -> mapWithDefault -> removeContext -> / /
MATNR -> removeContext -> sort:lexi asc -> splitByValue:ValueChanged -> /
for WERKS/LGORT/CHARG/KDMAT/VRKME just replace POSNR with the Appropriate field
For LFIMG/NTGEW
MATNR --> removeContext --------> sortByKey:lexi asc ----------------> formatByExample -> sum -> LFIMG
LFIMG-> mapWithDefault[0] -> removeContext -> / /
MATNR -> removeContext -> sort:lexi asc -> splitByValue:ValueChanged -> /
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.