Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pricing problem after condition inactivation

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Pawel,

check OSS Note 836243 carefully.

It should give ideas how to deal with your problem, if it's not possible to put ZUG below ZUPK - which would be the easyest way...

Cheers

carsten

6 REPLIES 6

Former Member
0 Kudos

I would not deal with KINAK within userexit_pricing_prepare_tkomp.

Try a formula.

Or deal with condition routine for ZUPK

Former Member
0 Kudos

Use a CBV (Condition Base Value) routine for the mentioned condition type to modify KINAK value.

Former Member
0 Kudos

OK, I can create new requirement in VOFM. But I have to exclude condition ZUG if ZUPK is equal to 0. But ZUG is before ZUPK in pricing procedure so when this requirement will be call value of the ZUPK will bot be in table XKOMV.

How to solve this problem?

Regards

Pawel

Former Member
0 Kudos

Pawel,

check OSS Note 836243 carefully.

It should give ideas how to deal with your problem, if it's not possible to put ZUG below ZUPK - which would be the easyest way...

Cheers

carsten

Former Member
0 Kudos

Thanks, problem solved

0 Kudos

Can you explain how you solved the issue?

I have a similar kind of requirement.

Thanks in Advance

Giri