Skip to Content
avatar image
Former Member

How to retrieve user id from agentry Java library?

Hi guys,

I need to know what method Do I have to use in order to retrieve the executing user ID in a custom bapi class (agentry java library)?. I've found through another post (https://archive.sap.com/discussions/thread/3633174), that probably the method "eval" from the user class (com.syclo.agentry.User), works for this. Now that post refer specifically to get client language like:

String lang = User.eval("<<user.client.Language>>"); 

If this is the correct method to get the info that I want, which string property I have to pass to get the executing user ID in my class?

Something like this perhaps:

String uid = User.eval("<<user.client.id>>"); 

or just like

String uid = User.eval("<<id>>");

Thanks in advance, Best Regards

Mariana



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 12, 2017 at 08:29 PM

    There is a user java object that should have the user name already specified with appropriate getter. I believe u.getAgentryName() will return what you want assuming u is the User object.

    You should also be able to eval <<user.agentryID>> and get the same value.

    --Bill

    Add comment
    10|10000 characters needed characters exceeded