2013 May 15 5:36 AM
Hi Gurus,
I have created a Routine in VOFM for Condition base value.
The scenario is, whenever the condition type ZW03 has 100% rate, in that case the Net value i.e KOMP-NETWR should become 0.01 and not 0.00(which it is doing currently ).
I wrote a code for this and it is working perfectly fine in case of sales order creation VA01 as well as when we save the document.
But once we run VA02 and make any changes, again the value returns to 0.00 and not 0.01.
Kindly Help me as this is a very weird problem.
Regards,
Dinesh
2013 May 15 5:52 AM
2013 May 15 6:22 AM
Hi Sijin,
It is working fine for VA01 as well as when we see the same in VA02, but once we make any change it returns to the same value of 0.00.
Regards,
Dinesh
2013 May 15 5:57 AM
Hi Dinesh,
can you provide the code ? KOMP-NETWR is CURR 15.2.
Did you define the 0.01 as ...
CONSTANTS: c_netwr TYPE KOMP-NETWR VALUE '0.01'.
If you debug VA02 save, what shows debugger in your code ?
Matthias
2013 May 15 6:23 AM
Hi Matthias,
The following code was written by me:
IF KOMP-PSTYV EQ 'TAN' AND KOMV-KSCHL EQ 'ZW03' AND KOMV-KBETR EQ '1000.00'.
XKWERT = KOMP-NETWR - '0.01'.
LOOP AT TKOMV WHERE KSCHL EQ 'ZW03'.
TKOMV-KWERT = KOMP-NETWR - '0.01'.
MODIFY TKOMV TRANSPORTING KWERT.
ENDLOOP.
ELSE.
XKWERT = KOMP-NETWR.
ENDIF.
Regards,
Dinesh
2013 May 15 6:32 AM
Dinesh -
Are you able to debug this problem? IN VA02, if you keep a break point in your code, is it stopping there? I think once you do some changes it is not refreshing the pricing condition. Once you complete all your changes, there is a button at the bottom to refresh the pricing. Try that button and see what happens.
Kuntal
2013 May 15 6:48 AM
Hi Kuntal,
Yes, it is stopping there but as soon as we make changes via VA02 (any change in date, qty, billing block) again the value returns to 0.00, for which the routine was applied to make it 0.01.
I have noticed that as soon as the sales order is saved the tables also get updated with the required value i.e 0.01 but still in the change mode it is causing problem.
Regards,
Dinesh
2013 May 15 6:53 AM
Dinesh -
As I have said, probably all your pricing condition are not getting refreshed. So either you can check that button I have told in my last post or you can follow below menu path after your changes to refresh the value "EDIT -> NEW Pricing document". I think this should again refresh the values.
2013 May 15 7:12 AM
Kuntal
The condition type which i have added is a Manual Entry and as soon as we carry out New Pricing the value for condition type ZW03 gets erased.
2013 May 15 1:25 PM
2013 May 20 3:44 PM
Dinesh,
Everytime we make a change VA02 entire pricing fucntionality will be triggered.So,if I understand your issue correctly may be you need to include REPRICING functionality in your routine or just check if any of the user exits in MV45AFZ* is having any repricing functionality which is getting triggered and resulting inconsistent results.
K.Kiran.