cancel
Showing results for 
Search instead for 
Did you mean: 

portal logged in username

Former Member
0 Kudos

Hi,

I am creating a web dynpro ABAP iview in portal.

I want to pass portal login username in application parameter.

How to do this ?

--Srikanth

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

answered

Former Member
0 Kudos

Please check the following link. It contains complete step wise explanation.

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/getting%2blogged%2bin%2bportal%2buser%2b...

Former Member
0 Kudos

if you want login id then it is unique id only.

jayesh talreja

Former Member
0 Kudos

IUser user = null;

try

{

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

}

catch(WDUMException e)

{

wdComponentAPI.getMessageManager().reportSuccess("fail to get current user1" +e.getLocalizedMessage());

}

String useruid=user.getUniqueID();

same way u can get username.(i think user.getUserName();)

Former Member
0 Kudos

Hi

First fetch the login name of the user like this

...

IWDClientUser clientUser = WDClientUser.getCurrentUser();
IUser user = clientUser.getSAPUser();

Then pass the user as an argument.

You need to add security.api.jar file to your application.

regards

Naresh Garg.

Edited by: Naresh Garg on Sep 26, 2008 12:47 PM

Former Member
0 Kudos

Hi,

When we create an Iview declare the application paramters

USER=<User.LogonUid>

and in the WD4A application, try to declare a paramter USER type user in the Window->Inbound Plugs->Paramters. BY defalut there is CUSTOM_EVENT under that try to declare this parameter.

In the method of this default event->

code the follwing-

WD_COMP_CONTROLLER->lv_user = user.

Decalre this lv_user in the attributes of the component controler.

Now create the view with the textview and bind this attribute (lv_user) to that and display the portal user name.

Now run the EP's Iview and it displays the user name.

Regards

Lekha

Former Member
0 Kudos

Hi Srikanth,

Use this to pass the user name <User.UserID>.

Hope it helps & award points if found helpful.

Regards,

Gourav