cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing UserId's

Former Member
0 Kudos

Hi All,

I am creating a webdynpro report for displaying KM documents and hitscount. In that i want to capture the UserId's from portal and display it. How can i capture it? Is there any code samples for that?

Regards,

Divya

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

answered

Former Member
0 Kudos

Hi,

do you mean the document centric properties such as Created By, LastModifiedBy?

regards,

Christian

former_member197348
Active Contributor
0 Kudos

Hi Divya,

Use this method,

 public java.lang.String getUserName( )
  {
    //@@begin getUserName()
		//Getting the user name
		String userName = "";
		IWDClientUser wdUser = null;
		try
		{
			wdUser = WDClientUser.getCurrentUser();
		}
		catch (WDUMException e)
		{
			wdComponentAPI.getMessageManager().reportException(e.getLocalizedMessage(), false);
		}
		IUser usernam = wdUser.getSAPUser();
		userName = usernam.getUniqueName();
		return userName;
    //@@end
  }

and add the jar <b>com.sap.security.api</b>. Get back if there are any issues.

regards,

Siva

Former Member
0 Kudos

Hi,

I want the UserIds to be captured for individual document. (Individual Documents downloaded Report). Is that possible? Currently it is giving me

"User.Private_Datasource.UN:Administrator".

Is it possible to capture the Userid's for individual documents.

Regards,

Divya