Skip to Content
0
Oct 12, 2005 at 03:19 PM

Get current user

519 Views

I know, old question, has been answered a milion times by now but mine is somewhat different...

I'm trying to add the current user in an inputfield for a metadata property. We need to add multiple users in on metadata property and I need the current user as the default user. No problem you would say.

Problem is I wrote this customized Java class (NO Web Dynpro or iView) based on Thilo Brandts article:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/06cbeb90-0201-0010-b584-9b98e9649b6a

This class is added as a metadata extension so it's NOT a standalone application.

Result is I do not have the 'request' value I need to get the current user id with the:

IUser me = request.getUser();

command. Also I don't find the information on how to use the context method to retrieve the user information.

Anyone?