Skip to Content
0

How to retrieve user id from agentry Java library?

Apr 11, 2017 at 06:34 PM

117

avatar image
Former Member

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



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Bill Froelich
Apr 12, 2017 at 08:29 PM
1

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Bill...

0