Skip to Content
0
Former Member
Nov 12, 2012 at 09:12 AM

Calculation rule

95 Views

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.