Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Weird lock concept

Former Member
0 Likes
827

Hi guys,

I have to create a solution of some problem and I'm not sure if is that even possible.
There is Z-report which should lock some objects (Z-objects), but users quite often are disconnected from SAP and they want those locks to be dying with their's connection to SAP. Standard locks still exist, so what could help me? In other words: what is cleaned out when connection breaks down?

Hi guys,

I have to create a solution of some problem and I'm not sure if is that even possible.
There is Z-report which should lock some objects (Z-objects), but users quite often are disconnected from SAP and they want those locks to be dying with their's connection to SAP. Standard locks still exist, so what could help me? In other words: what is cleaned out when connection breaks down?

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
0 Likes
790

When an internal mode is left at ABAP side, whatever it's left normally or abruptly stopped, the SAP locks are automatically removed.

So, I guess your case is that the ABAP session is still there (it's just the frontend which had an error), and the user can see that when he logs in again, as the system will ask for logging out of the existing session.

Otherwise, it's abnormal, and you should contact the SAP support.

Read only

0 Likes
790

Yes, I mean session still exists (and user is asked to kill it when is logging in) and they want to check somehow from another user if session which has to lock something is existing but "inactive" (connection has been broken down).

Read only

0 Likes
790

Absolutely no idea whether it's possible automatically but I would think no (as the SAP solution, via SAP GUI, is to ask the user).

Read only

0 Likes
790

Hi,

When do you know if something is inactive?

I had to create my own locking concept for a Fiori app since that does not support a pessimistic lock.

I investigated how long the process usually takes, then doubled that duration, in this case 5 minutes.

Basically when a user want to change something I add an entry in a table with a timestamp and its key and I give back the timestamp to the user.

Then when they save the change I check if the timestamp is the same and if so, the change is done.

If someone else wants to change the same object I check if their timestamp minus the one in the table is > 5 minutes if so, I overwrite the timestamp with theirs and if not I show them a message.

Kind regards, Rob Dielemans