cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict PR creation if the contract value is fully consumed

hameedparvez
Explorer
0 Kudos

Our users are creating PR's with contract in source of supply, and we have auto PR to PO conversion job running. When the contract is fully/partially consumed and the value of PR is more than the remaining contract value then PR will not be converted to PO in ME59N job. This is standard SAP behavior and we are ok with that

But is there a way to stop the PR creation if the contract remaining value is less than the PR value and not get stuck in ME59N job log

users do not have access to ME59N job log and keep complaining PR's are not converted to PO. If there is any way to restrict PR creation then users can contact Buyer team to increase the value of contract or renew

Accepted Solutions (1)

Accepted Solutions (1)

myra_zhao
Active Participant
0 Kudos

It is not possible in standard way. You can use the BAdI ME_PROCESS_REQ_CUST, in the method PROCESS_ITEM to add your own logic to restrict the PR being created.

This BADI will be called when you create PR by transactions ME51N, ME52N, ME53N, and ME59N, as well as the BAPIs BAPI_PR_CREATE and BAPI_PR_CHANGE. But cannot called in case the PR generated from other ways like MRP, PM order or PS project etc.


Best regards,

Myra

hameedparvez
Explorer
0 Kudos

Thank you Myra Zhao... we thought about this option but was hoping some standard way was existing. I guess you are right we need to go for User exit

Thank you very much

Answers (1)

Answers (1)

0 Kudos

I think there is a misunderstanding of the functionality. The user will create the PR, having a valid contract or not. If the PR finds a valid source of supply it will automatically create the PO as described. But if there is no valid source of supply, Procurement team will have to address the requirement, look for possible suppliers, or whatever action they may take for that requisition. But if the PR is not created, how can procurement team realize that they need to fulfill the business need?

hameedparvez
Explorer
0 Kudos

Thank you Gabriel for providing you feedback

As of now whatever you said is happening, all the standard SAP steps are being followed.

But now they want to stop the PR creation if the Source of supply what the user is selecting (in this case is contract) is consumed and does not get stuck in ME59N

I believe the user exit is the only key as we have error message set up at PO level but at PR level standard SAP does not recommend.