Like I said, possibly simple. :)
Looks like I didn't see the forest because of all those trees. *g*
Thanks for pointing it out to me Elke!
Marco

PS: Herzlichen Dank ;)

-----Ursprüngliche Nachricht-----
Von: elke.zabach [mailto:elke.zabach@sap.com]
Gesendet: Freitag, 7. Februar 2003 09:01
An: Marco Keuchler; sapdb.general
Betreff: RE: Possibly simple: Finding out the active user

M.Keuchler@microfin.de wrote:

> Hi everybody,
> my apologies for this somewhat simple question, but still...
> What's the best way to find out the user that's currently 
> active? On the
> SAPDB help pages I found an SQL statement which I adjusted to 
> return the
> Usename instead of the machine he is using:
>  
> SELECT username
> FROM DOMAIN.CONNECTEDUSERS cu, DOMAIN.CONNECTPARAMETERS cp
> WHERE cu.session = cp.session
>  
> This works fine. However, I couldn't find a way to allow an ordinary
> user to run it. 
> So my question is: Isn't there a simpler way, like some function or
> variable holding the active user?
> If not, how do I empower the average user to run the SQL statement? 
> I tried creating a view and granting the neccessary rights to 
> the view,
> but to no avail, I get the same error.
> (Which is Native error -5001, Syntax Error or Access 
> Violation, Missing
> Privilege)

what about the 'special register' USER as described here:
http://www.sapdb.org/htmhelp/15/1a2bb4b44d11d2a97100a0c9449261/frameset.htm
and perhaps a
select user from dual
(available for everybody). Sounds a little bit easier than your join-select.

Elke
SAP Labs Berlin