cancel
Showing results for 
Search instead for 
Did you mean: 

What table stores essential mandt info

0 Kudos

HI folks,

  What database table holds the essential mandt info, the one that is checked when a user logs on? I checked dd20t but could not find it.

Thanks, best regards,

Claudio

Accepted Solutions (1)

Accepted Solutions (1)

ashish_vikas
Active Contributor
0 Kudos

mandt/client definition is stored in T000 table.

best regards

ashish

Answers (2)

Answers (2)

Reagan
Advisor
Advisor
0 Kudos

Hello

http://scn.sap.com/docs/DOC-29170

Have a look at this article that contains the user tables.

The user tables are part of every client and these are not cross client tables.

When a user logs into an SAP system to a particular client the user master record tables for that particular client are queried from the underlying database system.

On a successful login the system then loads the profile, roles, favorites, etc for that particular user.

If you want to know the tables used during a user login then do an SQL trace from ST05.

Regards

RB

0 Kudos

Thanks guys for your excellent help.

Best regards,

Claudio

former_member183107
Contributor
0 Kudos

Hi Claudio,

The table is USR02 as it lists all clients, user IDs, last logon date, days since last logon, account status and bad logon counts. That means that we are interested in fields MANDT, BNAME, TRDAT, UFLAG and LOCNT.

Notes about fields in table USR02

  • Field TRDAT contains the last logon date in format YYYYMMDD. But, we will convert it to MM/DD/YYYY. Also, if the user has never logged in TRDAT will display a value of "00000000" but we will translate it to "-Never-".
  • We will calculate the number of days since the last logon by subtracting the current date from the last logon date. Since TRDAT is a character (varchar) field, we will convert it to "datetime" first to obtain the day difference. Then, we will convert it back to character. If the user has never logged in we will indicate that with a "-".
  • Field UFLAG has two special values to indicate the status of an account. Value "64" indicates that the user has been locked by the administrator. Value "128" indicates that the user got locked out due to many incorrect logon attempts. We will translate the values into more meaningful messages.
  • Field LOCNT keeps count of incorrect (bad) logons. Notice that a value of 0 is set when there has not been bad logons. However, we will display a value only when there have been bad logons. This field is numeric (tinyint) but we will convert it to character to handle the display format.

Regards,

Himanshu

Former Member
0 Kudos

Hi,

Please find the below list of the table called by sap standard table when user login in sap.

Table Query
USR02SELECT  WHERE "MANDT"= '600'  AND "BNAME"= 'User id'
WPBHELP_URLSELECT <AGGREGATE>  WHERE "MANDT"= '600'  AND "ACTIVE"= 'X'
USRBF2SELECT  WHERE "MANDT"= '600'  AND "BNAME"= 'User id'  AND "OBJCT"= 'S_SCR'  ORDER BY "MANDT", "BNAME", "OBJCT", "AUTH"
SOXPSELECT  WHERE "MANDT"= '600'  AND "RECEIVER"= 'User id'
AGR_USERSSELECT  WHERE "MANDT"= '600'  AND "UNAME"= 'User id'
USLA04SELECT  WHERE "MANDT"= '600'  AND "BNAME" IN ( 'User id'  )
AGR_FLAGSSELECT  WHERE "MANDT"= '600'  AND "AGR_NAME"= 'Roles assigned to the user'  AND "FLAG_TYPE"= 'SYS_FLAG'
USR21SELECT  WHERE "MANDT"= '600'  AND "BNAME"= 'User id'

Thanks

Rishi Abrol