cancel
Showing results for 
Search instead for 
Did you mean: 

Document is still locked after approval

isaac_ariza_cruz
Participant
0 Kudos

Hello SAP Sourcing experts,

For one of our clients, we are facing following issue (we are using SAP Sourcing 7):

We have created one Project Phase Definition in the following way:

  • In Creation
  • In Approval Subgroup
  • Approved by Subgroup
  • In Approval Level 2
  • Approved
  • Rejected

In case of no rejection is executed by any approver, the phase movement is the following one: In Creation -> In Approval Subgroup -> Approved by Subgroup -> In Approval Level 2 -> Approved

The phases with the workflow are:

  • In Approval Subgroup --> Retrieve current approver from custom field ZAPPROVER1
  • In Approval Level 2 --> Retrieve current approver from custom field ZAPPROVER2

Phase Approved by Subgroup is an intermediate phase used by the current approver to introduce a new approver which will be used for phase In Approval Level 2.

For this case, scripts and workflows have been reduced to the simplest ones.

Then, the steps to reproduce the issue are:

  1. Project owner creates a new Project. Fill all mandatory fields and change phase to In Creation.
  2. Project owner fill in custom field ZAPPROVER1 and sent this project to the approval flow (changing phase to In Approval Subgroup)
  3. Document is locked by the system due to it has been sent for approval.
  4. Current approver log in into the system and goes to his/her Current Approvals List. Open the project and approve it (filling in approval comments).                                                                           
  5. Approval level is completed and screen comes back from the approval screen to the project which is still showing the message that it is locked by the system. It is because standard doesn't refresh the screen and document needs to be reloaded to shown current status.
  6. Then, due to current approver needs to fill in custom field ZAPPROVER2 and send this document for the second approval level, he/she reload document from Recent Items just right after he/she has approved it (i.e.: document has been reload right after he has approved first approval level and screen has come back from approval comments to project screen).
  7. Result: Document is still showing lock message and EDIT button is not displayed.

Checking Background Task List (Today's daemons) and NWA logs, there is not any error raised by custom code.

Indeed, depending on how fast current user tries to reload the document, in some of the cases following error is registered into the NWA log:

From our point of view we think that due to the performance of the system, it is not ready to do this action as quick as we are doing it.

Therefore:

  • Could you please confirm us if there is a way to improve performance of the system?
  • Could you please confirm us if maybe there is no way to improve it and indeed this behavior is raised due to standard code needs time to be executed (which means that project cannot be reload until unlocking of the document is executed)?
  • Have you ever faced same problem in other developments?

Thanks in advance for the time and support.

Best regards,

Isaac

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Can you please see logout and login once and recheck whether it is still locked or not. If you still find the document locked i suggest you to go to setup->system setup->workflow definitions-> (in document tool bar) current workflow reports and see your document still there in this report.

If you still face the same issue we may need to check the workflow configurations and custom scripts you are using. Or check is IAPILockDocument class is using anywhere in your workflow script and correct if something went wrong.

Regards,

Gurvi.

former_member89217
Contributor
0 Kudos

SO if I understand this correctly, eventually the document is unlocked but the time varies correct?

ginodw2014
Explorer
0 Kudos

In my case no the document stays locked it does not get unlock as time pass.

former_member89217
Contributor
0 Kudos

In your case, there must be a failure of some sort in the either the Workflow Postscript or a Script that also tries to execute on the document. You will need to enable Debug logging and review the results as the document goes through approval.

Gary

ginodw2014
Explorer
0 Kudos


Hi experts,

Is there any solution for the above issue, I have the same problem with some of the Project documents thats note been released by the system after approval is done.

Regards

Gino