How To Get Login User Code in SAP B1 Query Manager

For getting a username or User code who is login into the system we can take help from the below queries


Hana: SELECT T0.”USER_CODE” FROM “OUSR” T0 WHERE T0.”USERID” = $[USER]

SQL: SELECT T0.USER_CODE FROM OUSR T0 WHERE T0.USERID = $[USER]

This will help in developing and creating the followings:

  • Reports
  • Custom Alerts,
  • Custom Approvals and
  • FMS (Formatted Search)