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: 

Purchase Requistion (ME51N) : BADI ME_REQ_POSTED

Former Member
0 Kudos

Hi,

I have used ME_REQ_POSTED-post(Method) Badi to check custom consistency in ME51N. If there is any error the badi throws the Message and returns to t-code : using leave to transaction sy-tcode which is working fine, but the problem is that even the creation of the PR is manually stopped the PR number is generated and not saved(say: 8000012). Next time when I am creating a new PR with the same consisentcy check and if it gets through a new number is generated with (say 8000013) but not with (8000012).If this case araises there will be problem with number range allocation each and every time they get exhausted?

Kindly post the solution if any one has ever faced.....

Thanks in advance for the help.

with regards,

krishna Mukthineni.

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Krishna

Most likely you are not using the correct BAdI. As the name implies (ME_REQ_POSTED) we have passed the last checkpoints already. The method IF_EX_ME_REQ_POSTED~POSTED is not intended to block the posting since it does not contain any exceptions.

I assume that BAdI ME_PROCESS_REQ_CUST is the one you should implement. Its interface method CHECK ( Closing Check ) allows you to block saving the purchase requisition. If you set its CHANGING parameter CH_FAILED = 'X' then saving should not be possible.

Regards

Uwe

2 REPLIES 2

uwe_schieferstein
Active Contributor
0 Kudos

Hello Krishna

Most likely you are not using the correct BAdI. As the name implies (ME_REQ_POSTED) we have passed the last checkpoints already. The method IF_EX_ME_REQ_POSTED~POSTED is not intended to block the posting since it does not contain any exceptions.

I assume that BAdI ME_PROCESS_REQ_CUST is the one you should implement. Its interface method CHECK ( Closing Check ) allows you to block saving the purchase requisition. If you set its CHANGING parameter CH_FAILED = 'X' then saving should not be possible.

Regards

Uwe

0 Kudos

Hi All,

I am in the same problem, I want to change the line item data in Purchase requistion before saving. But badi ME_REQ_POSTED

is not working. Since it has only importing parameters.

Kindly guide me as which badi and method to use for this.

Thanks,

Pradeep