cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Harish
Active Contributor
0 Kudos

Hi Audrey,

If you are using exist function then it will create blue suppresses when condition did not meet. make sure that your mapping of subelement follows the similar rules.

e.g. map the BETRG with the context set to E1EDP01 and use map with default and split by value. This will make sure the the value will pass to the second line.

regards,

Harish