11-12-2012 9:12 AM
Hello,
first I have posted this in forum SD as well, because I don't know where it fits best. Sorry for that!
Problem description:
I have created a statistical condition ZBPR within my pricing procedure.
This condition ZBPR has a calculation rule as follows:
FORM FRM_KONDI_WERT_940.
data: i_kwert like xkomv-kwert.
if komp-kposn ne 0.
i_kwert = komp-brtwr.
if komp-rke_ww021 = 'foc'.
xkwert = i_kwert.
else.
xkwert = 0.
endif.
endif.
ENDFORM.
I now realized that when I step into item conditions value in ZBPR is fine.
When I go back and step into header conditions the calculation rule (FRM_KONDI_WERT_940) is called one more time.
Now in FRM_KONDI_WERT_940 kposn is '00010', but komp-rke_ww021 is initial. This will result in that ZBPR is set to 0 !!!
Is there a way to check within FRM_KONDI_WERT_940 whether system is on item conditions or header conditions, because I just want to execute the calculation rule on item conditions ?
Thanks for your responses
Wolf.
11-12-2012 10:05 AM
Hi Wolfgang ,
Either You check for KOMK structure there
or
Maintain that Condition type Line Item Specific
Changes which can be made tab in v/06
11-12-2012 10:05 AM
Hi Wolfgang ,
Either You check for KOMK structure there
or
Maintain that Condition type Line Item Specific
Changes which can be made tab in v/06
11-12-2012 12:43 PM
Checked everything you mentioned. Was setup identical.
Problem was that field komp-rke_ww021 is initial when moving to header conditions.
Maybe something wrong in SAP standard?
I took another field from struct komp and now it works fine!
Thanks a lot!!!