Skip to Content
0
Jan 14, 2020 at 03:42 PM

Do not create an EDI output loop for any item with zero cost on Invoice02

59 Views

Invoice Payload :

<?xml version="1.0" encoding="UTF-8"?>
<Z4INVOIC02>
<IDOC BEGIN="1">

<E1EDP01 SEGMENT="1">
<POSEX>000020</POSEX>
<MENGE>1.000</MENGE>
<MENEE>EA</MENEE>

<E1EDP19 SEGMENT="1">
<QUALF>003</QUALF>
<IDTNR>1A</IDTNR> (item 1A)
</E1EDP19>
No E1EDP05 - no cost item
</E1EDP01>

<E1EDP01 SEGMENT="1">
<POSEX>000021</POSEX>
<MENGE>3.000</MENGE>
<MENEE>EA</MENEE>
</E1EDP19>
<E1EDP19 SEGMENT="1">
<QUALF>003</QUALF>
<IDTNR>2A</IDTNR> (item 2A)
</E1EDP19>

<E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KOTXT>Net Value for Item</KOTXT>
<BETRG>199.80</BETRG>
<KRATE>75.60</KRATE> - Price for item 2A
<UPRBS>1</UPRBS>
<MEAUN>EA</MEAUN>
<MWSKZ>O0</MWSKZ>
<KOEIN>USD</KOEIN>
<KOBAS>3</KOBAS>
</E1EDP05>
</E1EDP01>
</IDOC>
</Z4INVOIC02>


How do I map this example to create this output

invoice 123

item 2A price 66.60

I have tried mapping the item loop on the output to only create if E1EDP05 segment in the idoc exist, I have used context on E1EDP01 level and the IDOC level , I either get no items, or I get the second item but the price does not populate.