cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping in header XML grouping and sum idoc line items

former_member9652
Associate
Associate
0 Kudos

Hi experts

I'm mapping a header in a cXML where I'd like to get the segment E1EDP04 of ORDERS05 IDOC, which is a line item, group by MWSKZ and sum MWSBT.


So far I was able to do it only for the first segment. The second is going with 0 value. My guess is that I'm didn't increment some pointer or something like that. Could you please take a look and see what have I done wrong?

Please keep in mind that I'm very new at PI.

In the mapping below:

First MWSKZ and MWSBT are pointing at IDOC context.

Second MWSKZ is pointing to E1EDP04 context.

Results:

<Tax>

<Money currency="BRL">10271.78</Money>

  <Description xml:lang="pt-BR"/>

<TaxDetail category="IPI" percentageRate="02635.53">

<TaxAmount>

<Money currency="BRL">4310.66</Money>

</TaxAmount>

</TaxDetail>

<TaxDetail category="ICMS" percentageRate="03030.89">

<TaxAmount>

<Money currency="BRL">0</Money>

</TaxAmount>

</TaxDetail>

</Tax>

IDOC Segment: /ns0:Messages/ns0:Message1/ORDERS05/IDOC/E1EDP01/E1EDP04

<E1EDP04 SEGMENT="1">

<MWSKZ>IPI</MWSKZ>

<MSATZ> 15.00</MSATZ>

<MWSBT> 395.33</MWSBT>

</E1EDP04>

<E1EDP04 SEGMENT="1">

<MWSKZ>ICMS</MWSKZ>

<MSATZ> 18.00</MSATZ>

<MWSBT> 545.56</MWSBT>

</E1EDP04>

<E1EDP04 SEGMENT="1">

<MWSKZ>IPI</MWSKZ>

<MSATZ> 13.00</MSATZ>

<MWSBT> 3915.33</MWSBT>

</E1EDP04>

<E1EDP04 SEGMENT="1">

<MWSKZ>ICMS</MWSKZ>

<MSATZ> 16.00</MSATZ>

<MWSBT> 5415.56</MWSBT>

</E1EDP04>

Accepted Solutions (1)

Accepted Solutions (1)

PriyankaAnagani
Active Contributor
0 Kudos

Hi Rafael,

Please try with the attached mapping and see if its working.

---Priyanka

former_member9652
Associate
Associate
0 Kudos

Worked!!! Thank you a lot!

Answers (0)