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 log in details

Former Member
0 Kudos
223

Hi,

Where (in which table) can I see the user log in details period wise.

Thanks.

Sheeja

6 REPLIES 6

Former Member
0 Kudos
82

Hi,

Check out

Regards

Bala

Former Member
0 Kudos
82

hi sheeja,

You can find the user details in all these tables USR01,USR02,USR03,USR04 and also use BAPI_USER_GET_DETAIL to fetch the details.

Regards.....

Arun

Reward points if useful.

Former Member
0 Kudos
82

Hi Sheeja,

Check in the table USR41,USR02,USR22. Or u can check in the t-code STAD.

enter user name and date. It will display all the details abt that user login details.

Hope this helps you, reply for queries, Shall post you the updates.

Regards.

Kumar. .

Former Member
0 Kudos
82

Hi,

What I need the log on history of users.

Rgds.

Sheeja

0 Kudos
82

Hi,

Use BAPIS there are very useful BAPIS to get the user's info.

BAPI_USER_CHANGE Change User

BAPI_USER_CLONE Create User with Template in Another System

BAPI_USER_CREATE Create a user

BAPI_USER_CREATE1 Create a user

BAPI_USER_DELETE BAPI to Delete a user

BAPI_USER_DISPLAY Display users

BAPI_USER_EXISTENCE_CHECK Check a user exists

BAPI_USER_GET_DETAIL Read Details of user

BAPI_USER_LOCACTGROUPS_ASSIGN Change Activity Group Assignment for Dependent Systems from Central System

BAPI_USER_LOCACTGROUPS_DELETE Delete Activity Group Assignments in the Dependent Systems

BAPI_USER_LOCK Lock User

BAPI_USER_LOCPROFILES_ASSIGN Change Profile Assignment for Dependent Systems from Central System

BAPI_USER_LOCPROFILES_DELETE Delete Profile Assignments for Dependent Systems

BAPI_USER_PROFILES_ASSIGN User: Assign profiles

BAPI_USER_PROFILES_DELETE User: Delete All Profile Assignments

BAPI_USER_UNLOCK Unlock user

Cheers,

Simha.

reward all the helpful answers...

SantoshKallem
Active Contributor
0 Kudos
82

check T CODE: STAT

EXECUTE THIS U WILL GET ALL USERS LAST LOGIN INFORMATION

  • A demo program to create subscreen in your ABAP Program

*

  • This report will display the user last login date and time.

*

  • Subscreen selection 1 : User Name

  • 2 : Last Login Date

  • 3 : Class Belong To

*

  • Written by : SAP Basis, ABAP Programming and Other IMG Stuff

REPORT ZSUBSCREEN.

TABLES: USR02, "Logon data

SSCRFIELDS. "FIELDS ON SELECTION SCREENS

*----


  • SUBSCREEN 1

*----


SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-010.

SELECT-OPTIONS: USERNAME FOR USR02-BNAME.

SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN END OF SCREEN 100.

*----


  • SUBSCREEN 2

*----


SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-020.

SELECT-OPTIONS: LASTLOGI FOR USR02-TRDAT.

SELECTION-SCREEN END OF BLOCK B2.

SELECTION-SCREEN END OF SCREEN 200.

*----


  • SUBSCREEN 3

*----


SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-030.

SELECT-OPTIONS: CLASSTYP FOR USR02-CLASS.

SELECTION-SCREEN END OF BLOCK B3.

SELECTION-SCREEN END OF SCREEN 300.

  • STANDARD SELECTION SCREEN FOR SCROLLING LEFT AND RIGHT

SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK SUB FOR 15 LINES,

END OF BLOCK SUB.

START-OF-SELECTION.

SELECT * FROM USR02 WHERE BNAME IN USERNAME

AND ERDAT IN LASTLOGI

AND CLASS IN CLASSTYP.

WRITE: / 'User ', USR02-BNAME,

'Last Login Date ', USR02-TRDAT,

'Last Login Time ', USR02-LTIME,

'CLASS ', USR02-CLASS.

ENDSELECT.

END-OF-SELECTION.

INITIALIZATION.

  • SCREEN ICON LEFT AND RIGHT

SSCRFIELDS-FUNCTXT_01 = '@0D@'.

SSCRFIELDS-FUNCTXT_02 = '@0E@'.

SUB-PROG = SY-REPID.

SUB-DYNNR = 100.

AT SELECTION-SCREEN.

CASE SY-DYNNR.

WHEN 100.

IF SSCRFIELDS-UCOMM = 'FC01'.

SUB-DYNNR = 300.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

SUB-DYNNR = 200.

ENDIF.

WHEN 200.

IF SSCRFIELDS-UCOMM = 'FC01'.

SUB-DYNNR = 100.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

SUB-DYNNR = 300.

ENDIF.

WHEN 300.

IF SSCRFIELDS-UCOMM = 'FC01'.

SUB-DYNNR = 200.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

SUB-DYNNR = 100.

ENDIF.

ENDCASE.

REWARD IF USEFUL

SANTHOSH

Message was edited by:

santhosh reddy