cancel
Showing results for 
Search instead for 
Did you mean: 

How to track the login user session in webdynpro

Former Member
0 Kudos

Hi all,

I have a new requirement as Explained below

User will login from portal with login username and password.

I want to retive that information.

How to keep track of that information in webdynpro

Thanks & Regards

Padma N

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member192434
Active Contributor
0 Kudos

Hi Padma,

First you need to add the security.jar file by following the given steps

Right Click on Project-Propertyjava Build PathLibrariesWDRuntime

Com.sap.security_2.0.0

public void LoginUser( )

{

//@@begin LoginUser()

String LogonID;

try{

// create an user object from the current user

IWDClientUser wdUser=WDClientUser.getCurrentUser();

IUser user=wdUser.getSAPUser();

//LogonID=user.getUniqueName();

wdComponentAPI.getMessageManager().reportSuccess(user.getFirstName()" "user.getLastName().toUpperCase());

//wdComponentAPI.getMessageManager().reportSuccess(LogonID.toUpperCase());

wdComponentAPI.getMessageManager().reportSuccess("Logon User ID : "+wdUser.getClientUserID().toUpperCase());

}catch(Exception e){

e.printStackTrace();

}

//@@end

}

Thanks

Anup

Former Member
0 Kudos

Hi,

to get the user name do like this,

String userid="";

try {

IWDClientUser user = WDClientUser.getCurrentUser();

userid = user.getSAPUser().getUniqueName();

} catch (WDUMException e) {

e.printStackTrace();

}

and you have to add the security jar to javabuild path.

Regards,

ramesh

Former Member
0 Kudos

Hi

chk this doc:[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e039ce31-4156-2b10-1481-bdc3ff8cae48]

Regards

Khushboo

Former Member
0 Kudos

Hi,

Check [this|; thread.

Regards,

Satyajit.