cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the sap B1 login user code

Former Member
0 Kudos

My problem is to understand if it is possible to get from some tables the SAP B1 user code (not the sql user) with which the user is currently working on Sap B1. This will be very usefull in a query.

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi

SELECT T0.USER_CODE FROM OUSR T0 WHERE INTERNAL_K = $[USER]

use this query in Formatted search you will get Current user Code.

Former Member
0 Kudos

Hi

i have SAP B1 9.1 Pl04 HANA

and this query does not work with me

SELECT T0.USER_CODE FROM OUSR T0 WHERE INTERNAL_K = $[USER]


I get the following message:

Syntax error or access violation; 257 sql syntax near "$"

Thanks

Former Member
0 Kudos

Hi,

To know the current user from a query?

Something that I haven't tested for the moment (machine is getting up actually), but from your query (launched inside B1, in an FMS for example) you can use this: $[USER]

Regards,

Eric

Former Member
0 Kudos

I know there is a Widget floating around here somewhere that will show you which users are currently logged in. I downloaded it but was unable to get it to connect to my DB, maybe you will have more success than I. If you are not using Windows Vista or a Mac you will have to install a 3rd party program to be able to use the widget. I used the Yahoo! Widget tool and disabled all of the default widgets it includes. Here is a link to widget I am referring to;

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a048825f-9071-2910-30a0-db4bf07b...

former_member186095
Active Contributor
0 Kudos

Hello,

To see the users that are currently working in SAP B1 application in a certain table seems impossible. In tab allocation of license administration under administration module, you could see the gray words that means the current login user to SAP B1. There is also a file in the SAP folder relates to users that working in SAP B1.

Rgds,