cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get current SAP Business One user in Excel Interactive Analysis Report?

0 Kudos

How in the course of building a report through Excel Interactive Analysis, based on Hana models, get the current user and use it? Can there be a way to map the user Hana from Analitic Permissions to the SAP Business One user to restrict the selection?

Accepted Solutions (1)

Accepted Solutions (1)

former_member390407
Contributor

Hi Roman,

How is it going? 😉

I'm not sure if you can get this information on the Excel tier but you can try to get from your view. I haven't tested that, but I think this must work:

SELECT TOP 1 "UserCode" 
FROM "USR5"
WHERE "USR5"."SessionID" = current_connection
	AND "Action" = 'I'
ORDER BY "Date" DESC,
	"Time" Desc

This query is gonna return you the last logged in user code for the current HANA session ID.

Answers (0)