cancel
Showing results for 
Search instead for 
Did you mean: 

List of logging of users

Former Member
0 Kudos

Hi Experts,

I need a list containing when and who has logged in SAP.Is it possibble to show or does it need any workround or other solution (sql..) to show out?

I mean 08.01.2008 10:00 -manager

08.02.2008 12-05-manager etc.

Thank you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Information about users are in OUSR table. The LastLogin field stores only last login information (not history). For receiving history without programming you should create one table in db, for example LoginHistory with fields Date (datetime) and User (varchar) and through job created on sql server check the OUSR table, if there are some changes in lastlogin column and if yes, insert new record into table LoginHistory. The job should be like

insert LoginHistory

(

select o.lastlogin, o.U_name, from ousr o where o.lastlogin not in (select Date from LoginHistory where User = o.U_name)

)

hope it helps

Former Member
0 Kudos

I think instead of a job, it's better to use the TransactionNotification (altough i think for this purpose TransactionNotice may be more ideal if available but its on the same idea anyway) you can put that insert statement in one of these SPs and a new entry should pop up. all you need to do is add an IF and Insert into statement

IF (@Object_type = '12' AND @transaction_type='U')

BEGIN

DECLARE @u_name nvarchar(50)

SET @u_name = (Select U_Name from OUSR Where INTERNAL_K = @list_of_cols_val_tab_del)

INSERT INTO <TABLE> Values(@u_name,getdate())

SET @Error=0

END

this will give you accurate logins, including time...

Answers (3)

Answers (3)

former_member583013
Active Contributor
0 Kudos

Eszter,

Could I ask what you are really trying to do by using this log?

Suda

Former Member
0 Kudos

My client management wants to keep track of using SAP. Who and when logs in to SAP.

Documents is less because some user works only with master datas and prices not with documents records.

Former Member
0 Kudos

Item and price history files have even more records to log in regarding who did what. It is really unnecessary to create the old fashion user log.

Thanks,

Gordon

former_member583013
Active Contributor
0 Kudos

There are many ways suggested by other members towards this but I really think the Client is going to have an over kill. SAP provides for authorizations for this very reason and the client should rather prefer to use this.

Former Member
0 Kudos

OK,thank you all for the suggestions, I will make a list according to the above mentions to follow which user what did in SAP if at all and when.

That will be quite enough.

former_member583013
Active Contributor
0 Kudos

Great !! If you have the answer you were looking please mark this question as answered

Former Member
0 Kudos

To keep this info by a user table and a job or SP might have negative impact to B1system. Since all documents have historical records for audit trail, chang log keeps better info than just who logged-in @ what time.

If you really need this information by any reasons out of your control, I suggest you using some SQL Server tools to log all events. You can have full control of those trace files.

Thanks,

Gordon

vijay_kumar1
Contributor
0 Kudos

Hi Eszter ,

Try this query select lastlogin,U_name, from ousr if it helps.

Regards,

Vijay kumar