cancel
Showing results for 
Search instead for 
Did you mean: 

check Portal userID existence

Former Member
0 Kudos

I need to develop a WEBDYNPRO program that

checks the existence and eventually reads the following data from any userID allowed to enter the portal: Name, LastName and Profile.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

See if below Blog cud help you anyway,

Plz don forget points, if it helped.

Regards,

P.

Answers (5)

Answers (5)

Former Member
0 Kudos

If it has solved your problem, u need to close the thread with points distributed.

Thanks,

P.

Former Member
0 Kudos

Thanks, I have resolved.

Former Member
0 Kudos

thanks, I cannot recover the user with GETSAPUSER why in that moment the amministatore is connected. The administrator must insert USERID of a customer and control of the existence. For Example the administrator inserts USERID "TOMMY" and presses push-button "CHECK" of the WebDynpro. Therefore the message will be visualized: Present customer or not present Customer and other information of the customer!

Former Member
0 Kudos

Hi Mario,

Thie following code should solve your problem.

try {

IWDClientUser wdUser = WDClientUser.getCurrentUser();

IUser user = wdUser.getSAPUser();

if (user != null)

{

IUserAccount[] acct = user.getUserAccounts();

if(acct[0] != null)

{

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

}

}

}

Note: Defining the IUser will show an error. To resolve this, within the properties of

the project, choose Java build path ' Libraries ' Add external jars '

com.sap.securities ' lib ' com.sap.security.api. Open this file and retype the code.

Regards

Rajeev.

Do award points for helpful answers in SDN

Former Member
0 Kudos

HI

I think you can use IWDClientUser available in

com.sap.tc.webdynpro.service.sal.um.api.IWDClientUser for this purpose.

IWDClientUser user = WDClientUser.getCurrentUser();

String lastname = user.getLastName();

String title = user.getTitle();

String sname = user.getServiceName();

String uid = user.getClientUserID();

Regards

Harini S