cancel
Showing results for 
Search instead for 
Did you mean: 

How to reject the purchase requisition via ABAP code

Former Member
0 Kudos

Hi Experts,

We have to reject the purchase requisition using abap code.

Can you please tell me how to achieve this?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

markteichmann
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can use BAPI_REQUISITION_RESET_REL_GEN if you reject all positions.

For your coding you first need to read the current status via BAPI_REQUISITION_GETRELINFO and then call BAPI_REQUISITION_RESET_REL_GEN in order to reject a distinct releasecode.

Regards,   Mark

Former Member
0 Kudos

Hi Mark,

Thanks for your reply.

Above BAPI only work reverse the released PR (approved or released) but I want to reject purchase requisition using button “Release Refused” .

ie. by clicking the icon

Please advise.

Thanks.

markteichmann
Product and Topic Expert
Product and Topic Expert
0 Kudos

You are right, the Reject function is another thing. I also do not know of any simple way to achieve this.

There is an old version of a wiki page (now deleted!?) that contains some background information for the Enjoy MM transactions, maybe it can help:

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=68747607

Also this code could work out for you:

Message was edited by: Mark Teichmann

Former Member
0 Kudos

Hello Mark,

Thanks for your reply. I forgot to populate the update flag as 'U'  in internal table while calling FM 'ME_UPDATE_REQUISITION'.

Now its working...

Thanks a lot....

Answers (1)

Answers (1)

bpawanchand
Active Contributor
0 Kudos

Hi,

Check this

Regards

Pavan

Former Member
0 Kudos

Thanks for your reply.

Can you please give me the code?