Skip to Content
0
Former Member
May 19, 2010 at 02:51 PM

Pricing problem after condition inactivation

29 Views

Hello

In userexit_pricing_prepare_tkomp I put:

IF vbak-kalsm EQ 'ZTHWG'.

LOOP AT xkomv INTO pxkomv WHERE kschl EQ 'ZUPK' AND kbetr EQ '0.00'.

LOOP AT xkomv WHERE kschl EQ 'ZUG' AND kposn EQ pxkomv-kposn.

xkomv-kinak = 'A'.

MODIFY xkomv.

ENDLOOP.

ENDIF.

So the condition ZUG is inactive if, for the same sales order line. there is condition ZUPK with value 0.

Problem is that the change is not working properly. ZUG is "yellow" and it's not taken into consideration when system calculate intem price after discounts. But value of the tax is wrong, even dough it's calculate based on value after discount which is OK.

EG

Proce 100 USD

ZUG 50 %

ZUPK 0%

Price after d. 100 USD - OK

tax 22 % - 11 USD - NOT OK

Please help me, because I don't have no idea why it's working like this.

Thanks in advance

Pawel