on 02-06-2009 9:51 AM
Hello,
I have to summarize prices in the INVOIC02 IDOC. In the invoice there is
header items and kit order items. The prices is found in the field BETRG
in the Y_E1EDP05 segment. It is only the prices with KSCHL = IV01 that
should be summarized. The link between header and kit items is found in
the field UEPOS, so the prices should be calculated to the correct header.
To only show the header items I can use this function:
UEPOS -> exists -> not -> createIf -> removeContext -> E1EDP01
So that is ok, but to get the correct prices to the header I guess one would need
some kind of UDF. I am a bit lost at this mapping, so I hope anyone can help.
I have provided the corresponding structures:
Here is the source message:
<E1EDP01 SEGMENT="1">
<POSEX>000010</POSEX>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>IV01</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.00</KRATE>
</Y_E1EDP05>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>MWST</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.000</KRATE>
</Y_E1EDP05>
</E1EDP05>
<E1EDP01 SEGMENT="1">
<POSEX>000020</POSEX>
<UEPOS>000010</UEPOS>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>IV01</KSCHL>
<BETRG>2.00</BETRG>
<KRATE>1.00</KRATE>
</Y_E1EDP05>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>MWST</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.000</KRATE>
</Y_E1EDP05>
</E1EDP05>
<E1EDP01 SEGMENT="1">
<POSEX>000030</POSEX>
<UEPOS>000010</UEPOS>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>IV01</KSCHL>
<BETRG>2.00</BETRG>
<KRATE>1.00</KRATE>
</Y_E1EDP05>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>MWST</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.000</KRATE>
</Y_E1EDP05>
</E1EDP05>
<E1EDP01 SEGMENT="1">
<POSEX>000040</POSEX>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>IV01</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.00</KRATE>
</Y_E1EDP05>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>MWST</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.000</KRATE>
</Y_E1EDP05>
</E1EDP05>
<E1EDP01 SEGMENT="1">
<POSEX>000050</POSEX>
<UEPOS>000040</UEPOS>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>IV01</KSCHL>
<BETRG>12.00</BETRG>
<KRATE>1.00</KRATE>
</Y_E1EDP05>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>MWST</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.000</KRATE>
</Y_E1EDP05>
</E1EDP05>
<E1EDP01 SEGMENT="1">
<POSEX>000060</POSEX>
<UEPOS>000040</UEPOS>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>IV01</KSCHL>
<BETRG>20.00</BETRG>
<KRATE>1.00</KRATE>
</Y_E1EDP05>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>MWST</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.000</KRATE>
</Y_E1EDP05>
</E1EDP05>
This is how the target message should look:
<E1EDP01 SEGMENT="1">
<POSEX>000010</POSEX>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>IV01</KSCHL>
<BETRG>4.00</BETRG>
<KRATE>0.00</KRATE>
</Y_E1EDP05>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>MWST</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.000</KRATE>
</Y_E1EDP05>
</E1EDP05>
<E1EDP01 SEGMENT="1">
<POSEX>000040</POSEX>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>IV01</KSCHL>
<BETRG>32.00</BETRG>
<KRATE>0.00</KRATE>
</Y_E1EDP05>
<Y_E1EDP05 SEGMENT="1">
<ALCKZ>+</ALCKZ>
<KSCHL>MWST</KSCHL>
<BETRG>0.00</BETRG>
<KRATE>0.000</KRATE>
</Y_E1EDP05>
</E1EDP05>
Kind regards,
Per Rune
Hi.
I was review your questions. let me see if i understand.
You need to summarize when KSCHL = IV01 and when UEPOS exist.
You should be check the context for the field BETRG. and use the same logic. on the segment header.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.