06-18-2009 3:16 PM
Hi Gurus,
I have a problem with a custom value routine. Inside it a new value for xkwert is calculated but it never goes to its corresponding xkomv-kwert field. So the kwert field for my condition remains the same.
I've been debugging the code, mainly "LV61AA55" and I've seen that there are two ways to get to the routines execution:
1º )
* execute condition value formula not changing xkomv
* will normally be processed in xkomv_kwert_ermitteln
IF xkomv-kofrm NE 0 AND wertformel EQ space AND komp-kposn NE 0.
rettkomv = xkomv.
xkwert = xkomv-kwert.
frm_kondi_wert-nr = xkomv-kofrm.
PERFORM (frm_kondi_wert) IN PROGRAM saplv61a IF FOUND.
xkomv = rettkomv.
ENDIF.
2º)
* 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.
As you guys can see, on the second one it takes the xkwert value correctly into xkomv-kwert but in my case it never pass through that code inside form "xkomv_kwert_ermitteln". On my case, it always go through the point 1 and never assign the xkwert to the xkomv.
I show you the code here:
Custom routine:
form frm_kondi_wert_930.
zkomv[] = xkomv[].
case xkomv-kschl.
when 'ZVAC'.
clear: kwert_aux, kbetr_aux, komv_aux.
read table zkomv with key kschl = 'ZIMP'.
if sy-subrc = 0.
kwert_aux = xkomv-kwert * zkomv-kbetr / 100000.
xkwert = xkomv-kwert - kwert_aux.
endif.
when 'Z234'.
clear: kwert_aux, kbetr_aux, komv_aux.
read table zkomv with key kschl = 'ZIMP' into komv_aux.
if sy-subrc = 0.
kwert_aux = xkomv-kwert * zkomv-kbetr / 100000.
xkwert = xkomv-kwert - kwert_aux.
endif.
endform.
Here are my condition specs:
So do you have any idea on solving this problem?
Thanks in advance,
John.
Edited by: John Smith on Jun 18, 2009 4:17 PM
11-20-2009 5:03 PM
Dear John,
Were you able to solve the problemb ? I am having the same problem in pricing ?
Appreciate if you can help.
Thanks,
Rupak
11-20-2009 5:03 PM
Dear John,
Were you able to solve the problemb ? I am having the same problem in pricing ?
Appreciate if you can help.
Thanks,
Rupak
03-03-2010 10:50 AM
Hi, what I did was change the condition properties as you can see on this screenshot:
http://gunshit.250free.com/ScreenShot212.png
Sorry for the late reply, hope it helps anyway.
Regards,
John
Edited by: John Smith on Mar 3, 2010 11:55 AM
07-11-2016 1:28 PM
Hi Marcelo
The image does not exist. Can you Please add the image link again?
07-13-2016 3:11 PM
Hi Thilina,
It's a long time since this post and may depend on your current ERP version. I think this was on 4.72
Anyway, if I remember correctly, the problem was about the condition type properties. In order to get the value fixed properly you gotta follow this rules specified on LV61AA55:
IF xkomv-krech NA absolute OR xkomv-kgrpe NE 'X'.
PERFORM xkomv_kwert_ermitteln.
ENDIF.
where "absolute" var is: "BT". So your condition type can't use calculation type "B" or "T" and can not be grouped either (KGRPE must be initial)
For example my working condition type was like:
Anyway your problem could be different. Your best option would be to open a new post explaining your case with your code and context.
Just tell me if you do and I'll try to clear it out
Regards
Message was edited by: Marcelo García
04-06-2010 12:38 PM
04-19-2010 10:11 PM
Hi ,
I did the changes according to the screenshot attached by you. It didn't work. Basically when you change the qty. the price doesn't get updated. Can you be able to tell what was the actual change ?
04-19-2010 11:02 PM
Hi Rupak,
Well... are you sure is the same case as yours? do you use a calculation formula? If you look the code of mine, I take the KBETR from another condition type and then calculate the value for the proper one (ZVAC, Z234)
Can you post your calculation formula code to analyze it?
Regards,
John
05-03-2011 11:54 AM
Hi John,
I am facing a similar problem. I tried to open the screen shot posted by you but its not showing up now.
My code is:
CONCATENATE c_varcond_prefix l_varcond INTO l_varcond SEPARATED BY space.
* Now find the corresponding ZA00 with the same variant condition
READ TABLE tkomv into wl_tkomv
WITH KEY
kposn = komp-uepos
kschl = c_za00
varcond = l_varcond.
IF sy-subrc = 0.
* xkomv-kawrt = wl_tkomv-kbetr.
xkwert = wl_tkomv-kbetr.
ENDIF.
However as you mentioned this is getting overwritten by standard code. The calculation type is a percentage. Can you please tell me how you solved the issue?
Regards,
Sai
06-01-2011 7:30 AM
Hello,
i have the sanme problem in RV64A903
The xkwert is changed but it has no effect.
I have open an call.
If i get an answer from SAP, i will tell it you.
Regards
Florian
08-01-2011 12:45 PM
Hi Florian,
please help. We do have the same issue. Did you get a reply from SAP?
Thanks
Srinivas
08-08-2011 8:06 AM
04-16-2016 5:55 PM
This finally paid for my 3 weeks hard work!!
ENHANCEMENT-POINT xkomv_bewerten_04 SPOTS es_saplv61 worked just perfect to my requirement!!
Thanks Martin!!
-Satya