Spend Management Blogs by Members
Check out community member blog posts about spend management and SAP Ariba, SAP Fieldglass, and SAP Concur solutions. Post or comment about your experiences.
Showing results for 
Search instead for 
Did you mean: 
Former Member

We had a situation in CLM Production where some contract documents were stuck in approval phases and we were unable to unlock them.

As is the case in most organizations, we have contract document approvals / rejections after the respective Legal / Finance / Sourcing team approves or rejects the contract. 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. There were a handful of contracts (~31) which were stuck in their approval phases and had remained locked even after approval / rejection.

SAP Basis team restarted the ODP_Workflow_Event Daemon and also restarted the application. 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.

We referred the post below and saw that Sys admin already has Break document lock as Allowed. Though we could never really find the button which said "Break Document Lock"


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.

Here is what we did to manually unlock these contract documents. We developed a toolbar script itilizing the IapiDocumentLockManager in our Development instance with the following parameters:

This put a script option on all contract documents as below. In other words, this 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. We did all this on a Sunday to ensure no users were there in the system. Once we accomplished this, then the toolbar script was made Inactive.

One tricky part was to identify which contracts documents were stuck. 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.

We had to write a query for this to fetch those contract documents. Key here was to catch those contract documents which were not locked by “System”. As you know once you put the contract documents in any approval phase, system shows a message “Locked by System on….”. This message was not available on those contract documents that were stuck.

The query snippet that we wrote is as follows:








(select docref_object_id from db2clm.FCI_DOC_LOCK t6

where lock_mode=1 and locked_by_object_name is null)

So by doing the above the problem was solved but the issue is we still dont know why it happened in the first place. We have raised an OSS message with SAP. We do have 2 servers in PROD for HA. Does it have any impact on the system if the Workflow engine Daemon is run on any of these service?

Thank you,