on 11-09-2005 5:31 PM
Hi All,
Can some tell me how to read the Logged in user name and his/her password in a webdynpro application.
Thanks in advance
Srikant
Adding to the Kasig,
You need to use the
<i><b>WDClientUser.getCurrentUser().getSAPUser()</b></i>
for getting the user.
As said by Kasig, you need to make sure that SAP Authentication is enabled in the Application Properties.
Thanks & Regards,
Raghavendra P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Sorry for getting back to you people bit late.
I've tried the thing and its working
But i too need to the information regarding his password.
In my application, username and password has to be filled in again which needs to be checked. so how do you do that.
one more query whether any input field can be masked in webdynpro application??
Thanks in advance
Srikant
Hi Srikant,
For getting the Password, We cant get the password of the user. I think it can be done using the UserMapping. check it out.
If you are looking this for calling the SAP ABAP function modules using the logged in user id and password then you can use the SAP Logon Tickets configuration.
By doing this, Portal it self read the current user id and takes his password and uses it to call the SAP Function Modules.
Try this if your scenario matches.
And when it comes to InputField's Mask.. we dont have such option. There is PasswordField property where you can make it true, maybe it can useful for you.
Thanks,
Raghavendra P
hi,
edit the application properties, set sap.authentication true
you need the following import:
import com.sap.security.api.IUser;
which you find under eclipse plugins.
then the following coding brings across the logged on user:
String logonID = "";
try
{
IWDClientUser wdUser = null;
try
{
wdUser = WDClientUser.getCurrentUser();
}
catch (WDUMException e1)
{
// TODO Auto-generated catch block
e1.printStackTrace();
}
// hängt an security.api.jar
IUser user = wdUser.getSAPUser();
logonID = user.getUniqueName();
}
catch (Exception e)
{
msgMgr.reportException("Error: " + e.getMessage(), true);
e.printStackTrace();
}
hope this helps, matthias
Message was edited by: matthias kasig
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.