Hi,
I develop a WebDynpro Application for SAP Portal 6.0 SP9. I want to read the user ID of the currently logged in Portal User in my WebDynpro Application to show personalized data. In the WebDynpro I use the following code:
if (WDPortalUtils.isRunningInPortal()) {
logger.debugT("WD in Portal!");
try {
IWDClientUser curUser = WDClientUser.getCurrentUser();
IUser sapUser = curUser.getSAPUser();
String userId = curUser.getClientUserID();
if (sapUser != null) {
userId = sapUser.getUniqueName();
}
... catch etc.
}
The IUser sapUser is always Null, the userId is set to a - for me useless - two digits number...
Portal and the J2EE engine are running on the same system.
So I tried to switch on authentication in the properties of the application.
The result was that I get a second login screen when I call the IView with my WebDynpro in it.
When I enter my Portal credentials, nothing happens, login screen comes again. Giving wrong credentials results in a bad login error as expected.
So can someone tell me what I miss here? Is there another way to get the User data? I tried some standard Java ways, but as always SAP does not conform to that standards.
Thanx in advance for any help,
Frank