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'.
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.
Proce 100 USD
ZUG 50 %
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