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

Get idle time for session

Former Member
0 Likes
2,758

Hello, Experts!

How can i get idle time for current session in ABAP report? Is it possible?

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,046

I find preferable to perform the idle time check in your program itself, in your program (instance which locked an object) you can release the lock after a certain idle time.

Use class cl_gui_timer for this, there are [samples in the wiki|http://wiki.sdn.sap.com/wiki/dosearchsite.action?searchQuery.queryString=gui_timer&searchQuery.spaceKey=conf_global] which refresh the screen, just adapt to your requirement (e.g. store timestamp when performing any action - module in the PAI of program dynpro - compare with current timestamp in event raised by the timer class, leave transaction or release object and leave to initial screen of transaction if more than 5 mn have elapsed) (put a status message to inform the user why he was dropped from transaction)

If you want to release the lock only if another user want it, the second user program should write the rescues somewhere (database table ?) and the event raised by the timer will check this table for existence of a request for the same record.

Regards,

Raymond

Hello, Experts!

How can i get idle time for current session in ABAP report? Is it possible?

7 REPLIES 7
Read only

Former Member
0 Likes
2,046

Hi

Just check if you can get some idea from transaction AL08 & SM50.

Regards

Abhii

Read only

Former Member
0 Likes
2,046

Hi

Try with TCODE: ST03G and SAP Report SAPWL_ST03G

hope this will help you..

Regards,

kiran

Read only

Former Member
0 Likes
2,046

Hi,

Logging off the inactive users is not set up by default. Setting up the feature of logging off the users improves the security as unattended terminals do not stay active indefinitely.

To activate automatic logging off, do the following:

  • Go to Profile Maintenance by choosing Tools --> CCMS --> Configuration --> Profile Maintenance or the transaction RZ11.

  • Maintain the parameter rdisp/gui_auto_logout. Enter the required number of seconds of inactivity before the user is logged off automatically.

To deactivate automatic logoff, delete the parameter from the profile(s) or set the value '0'.

cheers,

bhavana

Moderator message: copy/paste without credit, please do not repeat, might lead to account deletion!

http://www.google.com/search?hl=en&source=hp&q=%22Toactivateautomaticloggingoff%22

Edited by: Thomas Zloch on Aug 27, 2010 2:37 PM

Read only

0 Likes
2,046

Thanks for your answers!

I'll check these transactions.

>>>> To Bhavana Amar

Thank you!

But it can`t help me I'll try to describe my situation - i have a Z transaction who locked objects (it`s a mandatory condition). I have a idea logoff User1 session when transaction starts by User2 if idle time first session more then 5 minutes. And i can`t setup standart auto logoff becouse 5 minutes it`s so little time to other standart transaction.

Maybe can i setup auto logoff only on there is transaction (Z)?

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,047

I find preferable to perform the idle time check in your program itself, in your program (instance which locked an object) you can release the lock after a certain idle time.

Use class cl_gui_timer for this, there are [samples in the wiki|http://wiki.sdn.sap.com/wiki/dosearchsite.action?searchQuery.queryString=gui_timer&searchQuery.spaceKey=conf_global] which refresh the screen, just adapt to your requirement (e.g. store timestamp when performing any action - module in the PAI of program dynpro - compare with current timestamp in event raised by the timer class, leave transaction or release object and leave to initial screen of transaction if more than 5 mn have elapsed) (put a status message to inform the user why he was dropped from transaction)

If you want to release the lock only if another user want it, the second user program should write the rescues somewhere (database table ?) and the event raised by the timer will check this table for existence of a request for the same record.

Regards,

Raymond

Read only

0 Likes
2,046

Thank you, Raymond!

Realy, it`s good idea!

Read only

Former Member
0 Likes
2,046

The best idea - control everyone actions in a Z transaction and save last activity timestamp