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.
Showing results for 
Search instead for 
Did you mean: 

Adding rebate condition to invoice

Former Member
0 Kudos

Hi all,

I have a requirement to add a rebate to invoices exceeding a purticular limit.

I have added the rebate condition to the list of pricing conditions using the exit USEREXIT_PRICING_PREPARE_TKOMP.

The rebate calculation is working fine but the problem that i am facing is that, when i take the pricing conditions in VF01 it will show the rebate condition that i attached and the associated rebate percentage; but the rebate will not be applied to the net amount. Only when i press enter or press activate button the rebate gets calculated and applied to the net amount.

My requirement is such that the rebate should get applied during the invoice generation itself without the user having to do anything.

Can anyone help me in solving this problem.




Former Member
0 Kudos

you do not have to ADD the condition to the list of condiitons in userexit.

I would just define this condition in pricing procedure, create condiiton records (even with dummy values), define requirements to suppress condition it if your conditions are not met either in pricing procedure or in the access sequence, then you can assign condition value formula to your condition to set the value (if it needs to be calculated and can't be defined using condition record itself).

In that case everythign will be calculated properly.

0 Kudos

Hi Mahulenka,

Thanks for your reply.

I am not sure whether it can be done that way. Here the rebate percentage alters with customer. For each customer there will be a certain minimum amount limit for applying the rebate. Once the invoice amount exceeds this limit the rebate percentage for that customer is to be applied.

Rebate percenteges along with the minimum amount limit will be stored in an Ztable. Since the rebate percentage alters with the customer, I don't think it can be done by configuring the pricing procedure.

In the userexit I am querying the Ztable to find the limit amount and rebate percentage. I am also trying to calculate the rebate amount and move it to KBETR field of the XKOMV structure; but that amount is not getting displayed in VF01.

I'm sorry that i didn't explain the scenario completly in my first post. I hope that i have now made it clear now.

Thanks & Regards