Application Development 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: 

User Session Information

0 Kudos

Hello,

how to read session information of a User,

such as

User,

session id

Transaction

prorgam

is there any function module for this

Regards

Ramakrishna Reddy

6 REPLIES 6

Former Member
0 Kudos

This message was moderated.

0 Kudos

HI, i need to write ABAP code to collect the session information over a period of time in a table.

0 Kudos

Hello friend,

you can get the termial id by using by using FM THUSRINFO

then pass this to FM TH_SHOW_USR_DETAILS... you will get all deatils

or directly use FM: TH_GET_SESSION_ID

this will directly give you session id

or you can use following code:

REPORT  ZTEST1.

TYPE-POOLS: slis.

PARAMETERS: use TYPE usrinfo-bname.
TABLES:
  sm04dic,
  usr41,
  usertrace.

INCLUDE <color>.
INCLUDE tskhincl.
INCLUDE rsusrcom.
INCLUDE rsblkcom.

DATA: BEGIN OF usr_tabl_alv OCCURS 10.
        INCLUDE STRUCTURE usrinfo.
DATA:   ext_type(20),
        ext_type_str(20),
        ext_state(10),
        ext_time(8),
        ext_trace(5),
        line_col(3),
        ipaddr(30),
        selected(1),
        total_mem_mb TYPE i,
        appl_info TYPE appl_info.
DATA: END OF usr_tabl_alv.
DATA: item LIKE LINE OF usr_tabl_alv.
CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_list
      ID 'TABUSR' FIELD usr_tabl-*sys* .

Former Member
0 Kudos

Hi,

You may be able to get this info from transaction ST03.

Regards, Andy

kesavadas_thekkillath
Active Contributor
0 Kudos

Use TH_LONG_USR_INFO for current sessions

Check the folder SysHealth in this link:[http://www.guidancetech.com/people/holland/sap/abap/] for history

Former Member
0 Kudos

TCode STAT, Check Function module - SAPWL_READ_STATISTIC_FILES