cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to set a permanent lock no matter the session is end or not?

Jerry_Lin
Advisor
Advisor
0 Kudos

Dear expert,

I am suffering from a challenge, I published my oData service to UI5 app providing a function like editing and saving an order, currently two users can edit the same order in the same time because I can't set the permanent lock for the firstly who click "Edit" button:

I did enque the object in oData implementation method, but when the service is end, the lock will be released implicitly, so the second user can Edit the same order eventually.

I know the etag is an good option to solve the situation, but what the customer want is the mechanism like Pessimistic Lock, once a user lock the oder, the others one can't change it in the same time, just like SAP GUI.

Any guys can help?

View Entire Topic
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jerry,

what you are looking for can be handeld via transactional applications that are leveraging the BOPF framework as described here:

https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/201809.000/en-US/d36820f082c84085b6634b...

This however only works in a so called green field approach where you write data into new tables.

For a brown field approach where you create, update or delete data using classic API's such as BAPI's this does not work.

Here you have to wait until draft becomes available with the new ABAP RESTful Programming Model that is currently only available for the SAP Cloud ABAP Environment.

Best Regards,

Andre

maheshpalavalli
Active Contributor
0 Kudos

It works for normal scenarios as well I think it's just marketing gimmick from SAP?? or maybe it just doesn't support out of box and we have to do things manually. The Business partner(Customer & Supplier apps) are based on ABAP Programming model for fiori (with draft)

There are more than a couple of blogs which shows that and one such.

https://blogs.sap.com/2019/01/09/abap-programming-model-for-sap-fiori-draft-based-for-non-guid-keys-...

BR,

Mahesh

Jerry_Lin
Advisor
Advisor
0 Kudos

Thanks Andre, I searched a plenty of related problems that ABAPer facing, it's seems no standard solution to achieve the pessimistic lock mechanism on OP, I am now going to try the z-solution to cover the situation.

0 Kudos

Is there any solution in RAP managed without draft to have a lock set on click of edit button itself.

Regards,

Porselvan