on 07-25-2006 12:33 AM
How to retrieve 'Windows Username' in Webdynpro application?
Thanks & Regards
V.Das
If you wish to get the client's username :
import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
try{
IWDClientUser user = WDClientUser.getCurrentUser();
} ...
String firstName = user.getFirstName();
String secondName = user.getLastName();
if you wish to get local name :
InetAddress.getByName("localhost").getHostName();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I don't think you can get access to the windows user name from a WD application. That's because of security reasons.
I would have suggested System.getProperty("user.name") if it was a stand-alone java app, but in WD that's not going to work. I think it will return the SAP service name.
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.