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

User Session Information

Former Member
0 Likes
2,397

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
Read only

Former Member
0 Likes
1,387

This message was moderated.

Read only

0 Likes
1,387

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

Read only

JerryWang
Product and Topic Expert
Product and Topic Expert
0 Likes
1,387

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* .

Read only

Former Member
0 Likes
1,387

Hi,

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

Regards, Andy

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,387

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

Read only

Former Member
0 Likes
1,387

TCode STAT, Check Function module - SAPWL_READ_STATISTIC_FILES