cancel
Showing results for 
Search instead for 
Did you mean: 

portal login through web dynpro apllication

Former Member
0 Kudos

hello,

I want to login portal through web dynpro apllication.

plz help me out.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Answered.

Former Member
0 Kudos

hi,

with the following code you can access all the users who will login to the portal


 public void CheckAllUsers( )
  {
    //@@begin CheckAllUsers()
	IWDClientUser currentUsers[] = WDClientUser.getClientUsers();

//	  Displaying the count of logged on users
	wdComponentAPI.getMessageManager().reportSuccess("Number of logged on Users in the portal - "+(currentUsers.length));

	for(int i = 0; i < currentUsers.length; i++)
	{
	if(currentUsers<i> != null)
	{
//	  Displaying the logged on users;
if(currentUsers<i>.getLastName().equals("Guest"))
{
}
else
{

   
	
	wdComponentAPI.getMessageManager().reportSuccess("User - "+currentUsers<i>.getFirstName()+" "+currentUsers<i>.getLastName()+ " "+ currentUsers<i>.getSAPUser().getUniqueID());
}
	}
	}
                   
   

You have to include the com.sap.security.api in the library

regards,

pinki

//@@end

}

regards,

pinki

Former Member
0 Kudos

Hi Abhilasha

you can go to the following link for more help...

http://help.sap.com/javadocs/NW04S/current/se/com/sap/security/api/package-summary.html

Regards

Naresh Garg

Former Member
0 Kudos

Hi,

Make the authentication property of your application to true.

1)Select your application -> double click

2)Go to Application Properties

3)New->Predefined->Browse

4) Select Authentication

5)Set the value to true.

6)Click finish compile and run.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Abhilasha,

You query is not very clear. Do you intend to say that when you run your WD application you want user to authenticate using portal login id or do you want to open a window with portal url?

Best Regards,

Ravi

Former Member
0 Kudos

hi ravi,

i wnt to autheticate using poratl login id.

Former Member
0 Kudos

Hi Abhilasha

You can use the following code

IWDClientUser wdUser = WDClientUser.getLoggedInClientUser();

IUser user = wdUser.getSAPUser();

wdContext.currentContextElement().setCtx_Va_Company(user.getCompany());

wdContext.currentContextElement().setCtx_Va_Email(user.getEmail());

wdContext.currentContextElement().setCtx_Va_JobTitle(user.getJobTitle());

wdContext.currentContextElement().setCtx_Va_Name(user.getName());

wdContext.currentContextElement().setCtx_Va_Title(user.getTitle());

To use the interfaces you require to include com.sap.security.api jar file in your application..

Regards

Naresh Garg.

Edited by: Naresh Garg on Apr 29, 2008 8:02 AM

Edited by: Naresh Garg on Apr 29, 2008 8:03 AM

Former Member
0 Kudos

Hi,

You can use the following code to navigate to portal from WD application.

IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow("http://<hostname>:<port number>/irj/portal","Google - Search for an e-mail address",false);

window.open();

thanks & regards,

Manoj