Skip to Content

How to set purchase order on hold in ME_PROCESS_PO_CUST_CHECK

Oct 10, 2017 at 01:54 PM


avatar image

Hi there,

we have to implement an algorithm which does some checks on purchase order items and puts this purchase order to hold if the user clicks an SAVE in ME21N OR ME22N.

In method ME_PROCESS_PO_CUST~CHECK I can check if booking, hold or park was pressed, but I could not change these actions.

kind regards - Sven

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Raymond Giuseppi
Oct 11, 2017 at 08:07 AM

To keep things simple, could you consider just raising an error in CHECK method if save pressed and some required documents/certificates are not available, asking user to put the PO on hold/park it?

Also did you already raise some warning in PROCESS_ITEM, when new item is created or material changed, or is the search for documents way too 'expensive' ?

NB: Forget method POST, you shouldn't be allowed to change some data here.

10 |10000 characters needed characters left characters exceeded
Nic Teunckens Oct 10, 2017 at 02:24 PM

Just to make sure :

  • You actually have Activated "Park and Hold" Functionality (See SAP-Blog on the Business Functions and Customizing) ;
  • Check up on BAdI "ME_HOLD_PO" to enable Validation and separate Logic : See SAP-KBA 668212 and this Blog ;
  • See SAP-KBA 606728 for a Sample on how to use "ME_PROCESS_PO_CUST" together with "ME_HOLD_PO" ...

Hope this helps ...

Kind regards

Nic T.

10 |10000 characters needed characters left characters exceeded
Sven Schuberth Oct 11, 2017 at 06:02 AM

Hello Nic,

thank you for the answer. Unfortunately, this isn't what we want.

We want to order some special materials, which need some documents (certificates) in our system. At the save-event of ME21N/ME22N we want to check, if these documents exists.

If YES -> save purchase order and create order messages

If NO -> set the purchase order on hold an give an info to the user

so I've several exits/badis where I can do these check:



But I can't change the memory-status of the po in one of these sources. I've tried to change field memory and memory_type in method POST:

Data(ls_data) = im_header->get_data( ).
ls_data-memory = 'X'.
ls_data-memory_type = 'H'.
im_header->set_data( ls_data ).

but nothing happens...

kind regards - Sven

10 |10000 characters needed characters left characters exceeded
Sven Schuberth Oct 11, 2017 at 09:02 AM

In germany we have the legal requirement to implement "intelligent metering systems" til february 2018. Unfortunately SAP does not provide the purchase order process for these legal requirements.

Let me describe the workflow for such an order:

Before purchase order is released, we have to check, if some gateway-admin files for the material exists. If so, material can be ordered. If not, the files have to be ordered at GW-admin via webservice. Purchase order has to be set to hold until files arrive.

You may suggest, that we do not create purchase order and wait instead at purchase requisition, but this is not the planned workflow of our customer.

I've considered to throw an error-message in CHECK-method. If no other solution exists to set a purchase order during saving to hold, then I will implement this way. But it would be nicer to autohold the purchase order.

10 |10000 characters needed characters left characters exceeded