Skip to Content
0
Former Member
Jan 05, 2006 at 11:33 AM

Accessing Portal user information in WebDynpro Application

19 Views

Hi

I am trying to capture the current login from the login page of the portal.I have tried with this code as I have mentioned below.

try{

IUser user = WDClientUser.getLoggedInClientUser().getSAPUser();

IUserAccount[] acct = user.getUserAccounts();

if(acct[0] != null)

{

String strUserid = acct[0].getLogonUid();

//wdContext.currentContextElement().setAssoid(new String(strUserid));

wdContext.currentContextElement().setCustomer(new String(strUserid));

}

}

catch(Exception ex) { ex.getMessage(); }

I have three inputs in the login screen Acc number,User Id and the password.

Now by using the above code I am getting the Acc Number appended with the UserId, for eaxmple If my Acc number is "A00WE" and my User ID is "user1"

The value I am getting is as "A00WE.user1"

I only want to capture the Acc NUmber and not the User ID.Now please any one tell me how to capture only the Acc number cutting down the user Id.

Thanks and regards

krish