10-10-2017 2:54 PM
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-10-2017 3:24 PM
Just to make sure :
Hope this helps ...
Kind regards
Nic T.
10-11-2017 7: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:
- ME_PROCESS_PO_CUST-CHECK or POST
- EXIT_SAPMM06E_012
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-11-2017 9: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-11-2017 10: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.
06-13-2018 1:17 PM