cancel
Showing results for 
Search instead for 
Did you mean: 

How to automatically complete an SD Contract when not all quantity is used

Former Member
0 Kudos

Hi,

I have a situation where it often happens that not all the quantity in an SD Quantity Contract is used in Sales Orders. When this happens, currently the business users have to go into the Contract, and amend the quantity in order to complete it. I am looking for a way to configure SAP so that these Contracts will automatically move to Complete Status when a certain percentage of the quantity has been used.

I have tried Completion Rules B and C on a new Item Category (copied from KMN). When I select B the Contract is marked as complete after the first Sales Order is raised, regardless of the quantity. When I select C the Contract does not mark as complete. both times I set up a Contract for 100KG, then Ordered 98KG. I tried amending the under-delivery tolerances on the Customer Master and it had no effect.

I have searched the SD Forums, looked on SAP Support Marketplace, and tried Google - but I can't find anything that describes my situation. Can someone out there advise?

Thanks,

Val

Accepted Solutions (1)

Accepted Solutions (1)

former_member211108
Contributor
0 Kudos

Hi,

I don't think this can be achieved in SAP std.

You have to go for custom development in ABAP . You can achieve this through userexit MV45AFZZ. The code will be executed when saving the subsequent sales document i.e. Sales order. Once the said percentage is achieved this code will set the status of contract as referenced.

Hope this will help you.

Thanks and regards

Atul

Former Member
0 Kudos

Hi Atul,

Thanks for the quick reply - I was beginning to think that a User Exit would have to be involved. I'll speak to our ABAPer about it.

Regards,

Val

Answers (1)

Answers (1)

Shiva_Ram
Active Contributor
0 Kudos

You need to develop a Z-program to fulfill this requirement. The logic could be if if sales document type is contract and VBAP-ZMENG/RV45A-KWMENG matches certain %, then apply reason for rejection for the contract line items. You may create a separate reason for rejection for example, "contract value/quantity reached" for this purpose in the SPRO side. You can run this program in the background for example every night.

Regards,