2011 Nov 28 11:15 AM
Hi Guys,
does any one meets the requirement ,to block changes(not only,but also make sure do not lock the PR object in SM12) from PR based on certain criteria;
my case is to develop PR send out the IDOC by user Exit, when first level release/submit by the user, then ,unless there is a message comes back to SAP ,user cannot change/edit/lock this PR; why lock is not allowed,is because ,if user locked this PR ,the backend process will failed when they returning approval/reject message being processed; although we have a schedule job to re-process such failed IDOC message comes back to SAP, My user wants to make the PR only in display mode;
I have tried the BADI ME_PROCESS_REQ_CUST -> Open, this one can only prevent the field value to be changed, still the PR is in change mode, also the obj appears in the SM12,
anyone got some suggestion
PS: although I have few points, if anybody can help me ,I will show hand.
2012 Apr 20 2:31 AM
Hi Everyone,
At Last, I found the solution, just update there ,maybe ,this will help someone; sometimes we try to think it more simple ,not to dig it so deeply.
FOR PR: go to implement BADI : ME_PROCESS_REQ_CUST, and add following codes in method:
IF_EX_ME_PROCESS_REQ_CUST~OPEN
------------------------------------code start-------------------------------------
SET PARAMETER ID 'BAN' FIELD WA_HEADER-BANFN.
LEAVE TO TRANSACTION 'ME53N' .
----------------------------------code end-----------------------------------------
for PO the BADI : ME_PROCESS_PO_CUST, the process is the same.