Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

want to find /calculate vallue of Profit margin ( KBETR )

Former Member
0 Kudos

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

1 REPLY 1

former_member589029
Active Contributor
0 Kudos

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