2014 Feb 17 6:52 AM
Hello All Experts,
I have the following requirement,
In sales documents under line items, whenever there is a change in the Target-quantity field (Screen field-VBAP-ZMENG) a pricing prodecure gets triggered and the value of Net quantity(Screen field-VBAP-NETWR) is recalculated. This is like standard behaviour, Now for my requirement
I have a particular subroutine procedure which needs to get triggered whenever i change the values in following fields and hit enter, the fields are
Plant (Screen field- VBAP-WERKS)
Pricing date (Screen field-VBKD-PRSDT)
material Pricing group (Screen field-VBAP-MATKL)
Price list category (Screen field-VBKD-PLTYP)
Material main item
Document Currency (Screen field-VBAK-WAERK)
Could You please suggest me the user exits where i can code to trigger my Subroutine whenever there is change in these fields.
Am very thankful for your help
Thanks and regards,
Satish
2014 Feb 17 8:23 AM
Hi
Include MV45AFZB, subroutines USEREXIT_NEW_PRICING_VBAP and USEREXIT_NEW_PRICING_VBKD.
See also SAP Note 24832 - Pricing rules / TVCPF
Regards
Eduardo
2014 Feb 17 8:23 AM
Hi
Include MV45AFZB, subroutines USEREXIT_NEW_PRICING_VBAP and USEREXIT_NEW_PRICING_VBKD.
See also SAP Note 24832 - Pricing rules / TVCPF
Regards
Eduardo
2014 Feb 17 8:51 AM
Hi eduardo,
Thanks for the reply
Can you please review my Code below,
For example take in case of document currency, Can i code like this below,
if VBAK-WAERK ne *VBAK-WAERK.
new_pricing = 'B'.
endif.
If yes can i proceed with the same approach for all fields, also can you please explain how this code will retrigger the pricing procedure because here no where am mentioning about the subroutine details.
Thanks,
Satish
2014 Feb 17 9:24 AM
Hi
There isn't an userexit for changed data in VBAK, but in the note mentioned, see the example 5, maybe with implicit enhancement you could do it.
Regards
Eduardo
2014 Feb 19 5:54 AM
Hi Eduardo,
I have gone through the example 5, there it is dealing about triggering new pricing. But my requirment is different.
My requirement is for all the above mentioned fields when i change the value and click on the update button the pricing procedure B is getting triggerred, but i want this same procedure B to get triggerred when i change the values and press enter
Hope you are clear. Can you please help on how to achieve this
regards,
Satish
2014 Apr 07 2:35 PM
Hi Eduardo,
I have acheived the requirement by coding the following code in include MV45AFZB.
IF vbkd-konda NE *vbkd-konda.
new_pricing = 'B'.
ENDIF.
Similarly for all the six fields i have coded the same.
Now one issue from this is whenever i make a change in VK12 with the condition record, the changes are is directly reflecting in VA02 which should not happen, even though in deugging mode this include is not at all called when i make changes in VK12.
But the strange thing is if i comment my code lines and do the changes in VK12 then my changes are not reflecting in VA02.
Please help me in rectifying this issue.
Thanks and regards,
Satish
2014 Apr 09 8:23 AM
Hi
If you change the value of KONDA in VA02, then re-determination type 'B' happens (according recommendation is the mentioned note). If you comment, you need trigger the re-determination with pushing the button for re-determination in VA02.
I hope this helps you
Regards
Eduardo