09-22-2008 3:34 PM
Hi All,
I want to fetch or calculate value of KBETR field .i.e Profit margin at header level in SD pricing conditions. important thing is that value should be at header level not at item level.
I have only sales order number with me.
Can anybody guide me , which table or FM will help me for this?
Thanks in advance.
Regards,
Mrunal
09-22-2008 3:56 PM
The different subtotals from the pricing screen are stored in table VBAP only. The field names are KZWI1 to KZWI6. Those fields contain the different condition screen subtotals.
So if you e.g. want the order header total for KZWI3 just do the following:
select sum( kzwi3 )
into lv_subtotal
from vbap
where vbeln eq lv_vbeln.
In this case you would get the sum of all item subtotals for KZWI3 for order number lv_vbeln.
Hope that helps,
Michael