Application Development and Automation 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: 
Read only

Re-prcing on Sales Document

Former Member
0 Likes
875

Hello All,

Requirement: when enter some value in 'Your Refernce' filed on the 'Order Data' tab for the line item 10 in Sales Order and press enter button, it should automatically re-pricing the sales order (like: Pricing Date on the header level). and it should re-price even if there is any change to 'Your Reference' field on the 'Order Data' tab (Changing the value to something else).

This should happen at the item level not the header level.

I have no idea, what to do and how to procced. Can anyone please help me out with some sample code to acheive this functionality?

I found the user exit in USEREXIT_NEW_PRICING_VBKD in MV45AFZB. Please give me some inputs on how can we achieve this functionality.

Thank You.

Shyam

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
758

Hi shyam,

You use include MV45AFZB for this,

Then Under Form, USEREXIT_NEW_PRICING_VBKD add the following lines of code:

if vbkd-inc01 ne *vbkd-inc01.

new_pricing = 'C'.

endif.

Thanks and Regards,

Dhaya.G

Hello All,

Requirement: when enter some value in 'Your Refernce' filed on the 'Order Data' tab for the line item 10 in Sales Order and press enter button, it should automatically re-pricing the sales order (like: Pricing Date on the header level). and it should re-price even if there is any change to 'Your Reference' field on the 'Order Data' tab (Changing the value to something else).

This should happen at the item level not the header level.

I have no idea, what to do and how to procced. Can anyone please help me out with some sample code to acheive this functionality?

I found the user exit in USEREXIT_NEW_PRICING_VBKD in MV45AFZB. Please give me some inputs on how can we achieve this functionality.

Thank You.

Shyam

4 REPLIES 4
Read only

Former Member
0 Likes
758

Use form new_pricing_vbkd_br from exit MV45AFZB. Just place your logic and based in your conditions pass 'C' to variable NEW_PRICING and then the pricing will be recalculated.

Read only

Former Member
0 Likes
758

Hi,

Please check out the below link. It should definetely help you out.

[http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm]

Regards,

Danish.

Read only

Former Member
0 Likes
759

Hi shyam,

You use include MV45AFZB for this,

Then Under Form, USEREXIT_NEW_PRICING_VBKD add the following lines of code:

if vbkd-inc01 ne *vbkd-inc01.

new_pricing = 'C'.

endif.

Thanks and Regards,

Dhaya.G

Read only

0 Likes
758

Hi Ganesh,

I placed the below code in FORM USEREXIT_NEW_PRICING_VBKD.

IF vbkd-ihrez IS NOT INITIAL.
  IF vbkd-ihrez NE *vbkd-ihrez.
    new_pricing = 'B'.
  ENDIF.
ENDIF.

but I want to make sure that the entered value in the 'IHREZ' field is correct value or not? Can you please advice what do you want me to do?

What I did here is,

1). If the reference value (VBKD-IHREZ) is not blank then carryout the new price.

2). I will have to re-price, If there is any change to the entered IHREZ.

does my code work for both situations?

Thank You.

Shyam

Edited by: shyam.. on Mar 9, 2012 1:11 PM