on 11-21-2005 3:32 PM
Hello everybody,
im trying to pass the WD user to a Backend-System via RFC FM as a import parameter. Therefor i want to assign the current user to the context of the controller. the current user is of type IWDClientUser and the context attribute 'User' is of type string. Now im getting a type mismatch error at the second code line:
IWDClientUser user = WDClientUser.getCurrentUser();
...
wdContext.currentZxss_Get_Employees_InputElement().setUser(user);
Guess i solved it.
String userId = user.toString();
Should do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Valery,
what im trying to do is this. I want to determine the user calling a WD Application. Therefor im using this line.
IWDClientUser user = WDClientUser.getCurrentUser();
this user i want to assign to a import parameter of a RFC-FM. After i have done the binding of the aRFC-Model to the Controller context i need to assign the determined user to the context of the controller with this line.
wdContext.currentZxss_Get_Employees_InputElement().setUser(user);
but unfortunately the type of the user (IWDClientUser) and the type of the import parameter of the method setUser (String) do not match and i cant do a type casting.
I know i dont have to do this, as the user calling the WD Application is the one executing the RFC in the backend and i could easily use the sy-uname at the RFC to determine the user... but its a test/learning example after all
regards,
Markus
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.