2011 Mar 27 12:31 AM
Hi Experts
I have a requirement to change the pricing condition value:For this i created a new routine and assigned this routine to Pricing Procedure in v/08.My newly created routine is getting triggered and new pricing value is getting in routine,but it is getting cleared in the standard program and the new value is not getting in my pricing condition.
I'm i missing any step in this process or using routines is not the right approach.Could any one can help me in getting out from this issue?
Regards,
Krishna
2011 Mar 27 4:37 AM
2011 Mar 27 12:23 PM
Looks like the field is getting cleared in the standard program. Try to debug after the new value is assigned in your routine. Look for refresh statements clearing the internal table or clear statements.
Also, check where is the new value assigned in your standard program
2011 Mar 27 2:17 PM
I'm trying to change xkomv-kbetr in my routine( calls from below perform statement).When my routine ends and when it comes back to standard program xkomv values are replacing by rettkomv,where my new value is overriding by old value.Here iam placing the code in standard program,from this perform statement my newly created routine is calling where it gets changed to new value and the old values are overriding using the statement xkomv = rettkomv
PERFORM (frm_kondi_wert) IN PROGRAM saplv61a IF FOUND.
xkomv = rettkomv.
Regards
Krishna
Edited by: meetkrishna on Mar 27, 2011 3:18 PM
2011 Jul 06 4:15 PM
Hi Krishna,
I had the very same problem, I have just solved it today, it was driving me nuts. Here is my solution:
I wanted to change the "Amount" column in the Pricing elements of the Condtitions TAB in Sales Order Header (KOMV-KBETR).
Eveytime I tried to change XKOMV-KBETR in my routine , it was overwritten by RETTKOMV.
There are two parts to the solution:
First of all, your VOFM routine is called in two places - from KOMV_BEWERTEN( in program LV61AA55 ) where it is overwritten as soon as it leaves your routine, but also from XKOMV_KWERT_ERMITTELN (in program LV61AA43) where it is not overwritten by RETTKOMV.
Put a break point in program LV61AA43 at this point in the code, and make sure your VOFM routine is called:
* calculation formula
IF xkomv-kofrm NE 0.
wertformel = 'X'.
xkwert = xkomv-kwert.
frm_kondi_wert-nr = xkomv-kofrm.
PERFORM (frm_kondi_wert) IN PROGRAM saplv61a IF FOUND.
xkomv-kwert = xkwert.
ENDIF.
Still, when I changed XKOMV-KBETR the change was not reflected on screen.
I needed to MODIFY the structure TKOMV where KSCHL was equal to my Condition Type.
Use a line of code something like:
modify tkomv transporting kbetr where KSCHL = 'ZXXX' AND (other conditions here)
In my case, the change was then reflected onscreen.
Hope this helps you,
David.
2011 Aug 01 12:42 PM
Hi Krishna and David,
I tried updating TKOMV. But i could see some random behaviour in condition values on sale order. kbetr values initially for item 10 are seen blank. Navigated to item 20 and could see item 10 values getting populdated in item 20 and so on.
Can you please help?
Thanks
Srinivas
2011 Aug 08 1:06 PM
Hi Srinivas,
yeah, logic can be a bit vague to isolate the correct line, but have tested in DV and QA and seems to be working okay.
I used, in the code:
check xkomv-ksteu = 'C'.
if this was true:
modify tkomv transporting kbetr where
kschl = 'ZFR1' and
KSTEU = 'C'.
ZFR1 being my condition type.
depending on your config, you might be able to use something similar.
Hopefully this might help you.
David.