SAP Table

USR02 Logon Data (Kernel-Side Use)

SAP table USR02 is a critical system table used to store logon-related data for user accounts within the SAP system. It includes information such as user statuses, failed logon attempts, password hash data, password change timestamps, and lock statuses. This table is primarily utilized by the SAP kernel to manage and secure user authentication and access. Due to its sensitive nature, access to USR02 should be restricted to authorized administrators.

SAP table USR02 has 2 primary key fields being MANDT,BNAME.

If you are only analysing data from a single SAP instance you may omit field MANDT in your relationships as it will be the same across the entire dataset. On the other hand, if you are combining data from multiple SAP instances you need to take MANDT into account.

/ Fields

USR02 columns.

Field Description Data Type Length Decimals Checktable Data Element
KeyMANDT Client CLNT 3 0 * MANDT
KeyBNAME User Name in User Master Record CHAR 12 0 XUBNAME
BCODE Password Hash Key RAW 8 0 XUCODE
GLTGV User valid from DATS 8 0 XUGLTGV
GLTGB User valid to DATS 8 0 XUGLTGB
USTYP User Type CHAR 1 0 XUUSTYP
CLASS User group in user master maintenance CHAR 12 0 USGRP XUCLASS
LOCNT Number of failed logon attempts INT1 3 0 XULOCNT
UFLAG User Lock Status INT1 3 0 XUUFLAG
ACCNT Account ID CHAR 12 0 XUACCNT
ANAME Creator of the User Master Record CHAR 12 0 XUANAME
ERDAT Creation Date of the User Master Record DATS 8 0 XUERDAT
TRDAT Last Logon Date DATS 8 0 XULDATE
LTIME Last Logon Time TIMS 6 0 XULTIME
OCOD1 Password Hash Key RAW 8 0 XUCODE
BCDA1 Date of Last Password Change DATS 8 0 XUBCDAT
CODV1 Code Version of Password Hash Algorithm (Old Systems) CHAR 1 0 XUCODEVERS
OCOD2 Password Hash Key RAW 8 0 XUCODE
BCDA2 Date of Last Password Change DATS 8 0 XUBCDAT
CODV2 Code Version of Password Hash Algorithm (Old Systems) CHAR 1 0 XUCODEVERS
OCOD3 Password Hash Key RAW 8 0 XUCODE
BCDA3 Date of Last Password Change DATS 8 0 XUBCDAT
CODV3 Code Version of Password Hash Algorithm (Old Systems) CHAR 1 0 XUCODEVERS
OCOD4 Password Hash Key RAW 8 0 XUCODE
BCDA4 Date of Last Password Change DATS 8 0 XUBCDAT
CODV4 Code Version of Password Hash Algorithm (Old Systems) CHAR 1 0 XUCODEVERS
OCOD5 Password Hash Key RAW 8 0 XUCODE
BCDA5 Date of Last Password Change DATS 8 0 XUBCDAT
CODV5 Code Version of Password Hash Algorithm (Old Systems) CHAR 1 0 XUCODEVERS
VERSN User master record version CHAR 3 0 XUVERSION
CODVN Code Version of Password Hash Algorithm (New Systems) CHAR 1 0 XUCODEVER2
TZONE Time Zone CHAR 6 0 TTZZ TZNZONE
ZBVMASTER CUA User Template: Logon Not Possible Here CHAR 1 0 XUZBVFLAG
PASSCODE Password Hash Value (SHA1, 160 Bit) RAW 20 0 PWD_SHA1
PWDCHGDATE Date of Last Password Change DATS 8 0 XUBCDAT
PWDSTATE Password Change: Required / Allowed / Not Possible INT1 3 0 PWDCHGSTATE
RESERVED CUA Control Information INT1 3 0 XUCUACNTL
PWDHISTORY Indicator: Password History Stored in Table USRPWDHISTORY INT1 3 0 XUPWDHIST
PWDLGNDATE Date of Last Password Logon DATS 8 0 XULPDAT
PWDSETDATE Date: Password Reset by Administrator DATS 8 0 XUSPDAT
PWDINITIAL Indicator: Password Is Initial (= Set by Administrator) INT1 3 0 XUPWDINIT
PWDLOCKDATE Date: Setting of Password Lock DATS 8 0 XUPLDAT
PWDSALTEDHASH Password Hash Value (Various Algorithms and Codings) CHAR 255 0 PWD_HASH_STRING
SECURITY_POLICY Security Policy Name CHAR 40 0 SEC_POLICY_CUST SECURITY_POLICY_NAME
/ Relationships

USR02 foreign keys.

Table Field Check Table Description Check Field
USR02 CLASS USGRP User Groups MANDT
USR02 CLASS USGRP User Groups USERGROUP
USR02 SECURITY_POLICY SEC_POLICY_CUST Configuration of Security Policies CLIENT
USR02 SECURITY_POLICY SEC_POLICY_CUST Configuration of Security Policies NAME
USR02 TZONE TTZZ Time zones TZONE