Application Development and Automation 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:Ā 
Read only

validation on PO save.

Former Member
0 Likes
3,524

Hello Experts

i have  a requirement as below in MM on po save

  1. PO is prepared wrt to PR. No PO can be created without reference to PR.
  2. While saving PO, system should compare value in quantity of PO with value and quantity maintained in PR. If the value and quantity is more than the referred PR, then system should give an error message.
  3. This validation should consider all POs created wrt the PR maintained in PO line item.

i have a user exit EXIT_SAPMM06E_017  but when i put break point in this FM and create PO in using me21n, PO gets created without debugger getting activated.


Thank you.

Aditya

8 REPLIES 8
Read only

Former Member
0 Likes
2,381

Did you google it?? Just search for "PO save badi" and you will most likely find the answer you are looking for.

Here is one BAdI: ME_PROCESS_PO_CUST and method POST.

Read only

0 Likes
2,381

Hello Chandra Indukuri

I am using Exit SAPMM06E and in that FM EXIT_SAPMM06E_012,

Can you please Explain me how to compare PR line item with PO.

Thank You

Aditya

Read only

0 Likes
2,381

In EKPO table, you will have the PR refrence in

BANFN and BNFPO 

Use that as a reference to pick the PR detail.

Regards,

Venkat

Read only

0 Likes
2,381

You can also use a class for find Badi..use se24 give the name CL_EXITHANDLER ->display->use method GET_INSTANCE-> double click on GET_INSTANCE and put the break point on


CALL METHOD cl_exithandler=>get_class_name_by_interface

after done above activity Run Me21n now you can find Badi name in exit_name parameter..

Read only

JL23
Active Contributor
0 Likes
2,381

This can all be done by standard customizing in MM, not at all needed to code anything. But I have to second others here, please search for the solution (one by one) as this is already a FAQ and will be rejected in MM space.

Read only

Former Member
0 Likes
2,381

Hi,

Pl use ME_PROCESS_PO_CUST and interface is 'Check'. Runtime behavior should be 'The implementation will be called'.

For quantity check at PO compare with PR, you can set the standard message 06 076 'Materials of requisition & item & alr. ordered in full' with Error.

Regards

Ajay

Read only

Former Member
0 Likes
2,381

Hi,

Use Badi ME_PROCESS_PO_CUST as mentioned by Ajay, instead of using exits. it will work.

Thank you,

Sathees Kannan

Read only

Former Member
0 Likes
2,381

Hello Experts

Thank you for the Guidance and explanation

I used user exit SAPMM06E and in that  FM EXIT_SAPMM06E_012

i passed pr refrence from ekpo and extract pr details from eban.

thank you

Aditya