on 01-12-2007 1:17 PM
hi,
whenever anyone logs in through the portal and runs a webdynpro iview, the webdynpro application should be such that it gives the name of the user logged in.
Eg, if i logiin and run the webdynpro iview, the application should display that I have logged in.
how can this be done?
its urgent.
add the jar file com.sap.security.api.jar
IWDClientUser wdUser = null;
IUser user = null;
IUserAccount[] acct = null;
try
{
wdUser = WDClientUser.getCurrentUser();
user = wdUser.getSAPUser();
if (user!=null)
{
acct = user.getUserAccounts();
if (acct[0] != null)
{
strUserID = acct[0].getLogonUid();
wdContext.currentContextElement().setCa_UserId(strUserID);
}
else
{
strUserID = "acc is null";
}
}
else
{
strUserID = "user is null";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.