
The query snippet that we wrote is as follows: This message was not available on those contract documents that were stuck. As you know once you put the contract documents in any approval phase, system shows a message “Locked by System on….”. Key here was to catch those contract documents which were not locked by “System”. We had to write a query for this to fetch those contract documents. This was the most tedious part as there were many contract documents in approval phases for legitimate reasons and we didn’t want to unlock those unnecessarily. One tricky part was to identify which contracts documents were stuck. Once we accomplished this, then the toolbar script was made Inactive.

We did all this on a Sunday to ensure no users were there in the system. In other words, t his script provided an option on all contract documents in PROD with a Scripts > Unlock icon and we then had to manually go into each of the 31 contract documents that were stuck to unlock. This put a script option on all contract documents as below. We developed a toolbar script itilizing the IapiDocumentLockManager in our Development instance with the following parameters: Here is what we did to manually unlock these contract documents. We also canceled the workflow for these errant documents from Setup > Workflow definitions > Current workflow processes but when the user goes in to the contract, he/she still did not see the Edit button. Though we could never really find the button which said “Break Document Lock”

We referred the post below and saw that Sys admin already has Break document lock as Allowed.

What we could not do was to take those contracts out of locked phase as the Edit button was no longer there nor did the Legal / Finance / Sourcing teams and the contract owners had the ability to unlock the contract. SAP Basis team restarted the ODP_Workflow_Event Daemon and also restarted the application. There were a handful of contracts (~31) which were stuck in their approval phases and had remained locked even after approval / rejection. If it is approved, it moves to Approved phase and when it is rejected it moves back to Draft (or initial) phase for the contract owner to make changes and resubmit. We had a situation in CLM Production where some contract documents were stuck in approval phases and we were unable to unlock them.Īs is the case in most organizations, we have contract document approvals / rejections after the respective Legal / Finance / Sourcing team approves or rejects the contract.
