cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

pessimistic lock in custom RAP based application(OData V2)

santosh_fhalke
Participant
0 Kudos
2,493

Hi,

We want to implement pessimistic lock in one of the custom RAP based application(OData V2) where if user A is editing the document & if at the same time user B is trying to edit the same document then system should give error as "The document is currently being processed by user". 

User do not want to use optimistic lock, which lets user to go in edit mode and at the time of save system will checks the lock.

The similar functionality is already achieved in one of the standard Fiori app -- App ID
F3893 (Manage Sales Orders - Version 2) it is using pessimistic lock.

When user click on Edit button on object page, call goes to backend to check sales order is already locked or not. if it is locked then system is giving popup with error as it is already locked. However not able to understand how this is integrated into this particular app.

If anyone have any idea about this, appreciate your help in this.

santosh_fhalke_0-1712591169931.png

View Entire Topic
Pradeep_Reddy1
Participant
0 Kudos

Hi,

 

Please review the Business Definition (BDEF) of the R_SalesOrderTP in SAP RAP. Look for the keyword 'lock master'.

To gain a better understanding, insert a breakpoint within the behavior class's lock method."

Regards,

Pradeep.