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: 

BADI for sales order header level data

Former Member
0 Kudos

Is there any BADI which will give me the sales order header level data? I need net price of the sales order in header level. KOMK structure does not contains the net price value.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

If you can use user exit:

In include: MV45AFZZ

USEREXIT_MOVE_FIELD_TO_VBAP

--

Reddy

5 REPLIES 5

Former Member
0 Kudos

If you can use user exit:

In include: MV45AFZZ

USEREXIT_MOVE_FIELD_TO_VBAP

--

Reddy

brad_bohn
Active Contributor
0 Kudos

BADI or BAPI? Why not use VBAK-NETWR? What is your requirement - to do something with the net value at runtime or to retrieve the value?

Former Member
0 Kudos

My requirement is:

I am writing a pricing routine for calculating ZSMR condition value in sales order header level. The formula for calculating is (NET PRICE / NET SALES COST) / NET PRICE.

I can't use VBAK because I have not saved the sales order yet. I need to use some structure.

Which structure contains the net price of the sales order in header level. KOMK structure does not contains the net price value.

Edited by: dossgs on May 21, 2010 4:08 PM

brad_bohn
Active Contributor
0 Kudos

There isn't one. VBAK-NETWR is the sum of the VBAP-NETWR values once all of the items have been processed. Keep in mind that your formula for your condition is going to fire for every item as the items are processed one by one and the header value will be the sum of the item values.

Former Member
0 Kudos

Thanks Brad.

You made me to approach in the right direction. Could you please tell me which structure contains the header level condition records? I tried with

" IF komp-kposn IS INITIAL. " or komp-kposn EQ 0

READ TABLE xkomv WITH KEY kschl = 'ZSMR'.

ENDIF. "

But this is not working.

Any ideas ??