cancel
Showing results for 
Search instead for 
Did you mean: 

Login User Session details

Former Member
0 Kudos

Could anyone provide information as how to fetch Login User session details in Web dyna pro .

I have Text field and Label in webdynapro View.

These need to be autofilled based on login user.

How to achieve this requirment in webdynpro.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Raghu,

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

hpe it will hlp u

Regards

Khushboo

Former Member
0 Kudos

Khushboo,

How about getting role.

Is thr role jobtitle are same.

Could you please provide information of the below Security JARS?

Why these jars needs to be added ?

Note: You need to add the jar files com.sap.security.api.jar. and com.sap.security.api.perm.jar. We add these files by Right click on the project. Select Properties. Select Java Build Path.

Former Member
0 Kudos

Hi

add activation .jar also..

activation.jar :This JAR (Java Archive) file containing the classes that make up JavaBeans Activation Framework.

com.sap.security.api.jar used to add IWDclientuser Interface

u cn go through:[http://help.sap.com/javadocs/NW04s/current/wd/com/sap/tc/webdynpro/services/sal/um/api/IWDClientUser.html]

com.sap.security.api.perm.jar :JAR file with the classes of the customized authentication implementation .

role is diffrent thn job title..u can fetch role also.

go through this blog:[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1789] [original link is broken] [original link is broken] [original link is broken];

Regards

Khushboo

Former Member
0 Kudos

Hi Khushboo,

Your information is very much usefull for me to move forward.

I need information on u201Ccom.sap.security.api.jar. And com.sap.security.api.perm.jaru201D

Where is this available in NDS.

activation.jar

I remember i used for email attachments in java projects.But to avoid version compatibilities from whicj location ineed to add .

I found this "u201Ccom.sap.security.api.jar" jar is existing in

<NDS_PATH>:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.sap.security_2.0.0\lib.

When i tried to add as "Extenrnal Jar" in Builpath(properties) it is being added.

But when i build the source the added jars reference is lost and getting compiliation errors.

How about "com.sap.security.api.perm.jar" where do i get this jar..i mean in which plugin folder .

Former Member
0 Kudos

Ragu,

Here the presentation on UME API and retreving the logon user details:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/webinars-nw...

You need to add these 2 jar files to buildpath

1)com.sap.security.api.jar

2)com.sap.security.api.perm.jar

For more help how to add jars :

If it's not a local project and if you use NWDI environment , here the blog how to add jars for Web Dynpro DC's.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/194bdc4f-0901-0010-82ba-bf7...

You can find some jar from the below sap jar finder website:

http://sapjarfinder.com/

Thanks

Krishna

Former Member
0 Kudos

Hi all,

I have a doubt regarding these jars.I added sucessfully to a local webdynpro project by navigating like this

javaBuildPath->AddExternalLibraries

But i am getting compilation error while trying to do the same to a DC??

How to add these jars to a DC

Regards

Padma N

Former Member
0 Kudos

HI

Edited by: kiran kumar on Sep 25, 2008 8:27 AM

Former Member
0 Kudos

Hi Padma

For Dcs

You need add file from

Used Dcs--->Add used Dc>Active Dcs->SAP JTECH--->sda.api file

Then your problem will be reolved

Thanks

Kirankumar M

Former Member
0 Kudos

Hi,

I have a DC where my application is there.Inthat DC METADATA i found usedDc option

Is it that i have to go through thid DC->USED DC->NEW USED DC

Regards

Padma N

Former Member
0 Kudos

yah

Goto

DC meta data->used Dc-->Add used Dc>Active Dcs-.SAP JTECH---->sda.api file

Former Member
0 Kudos

Hi,

I found sap.com_SAP-J2EE

sap.com_SAP-BUILDS_1

sap.com_SAP_JTECHS_1

But i want to import com.sap.securty.api.jar for getting login USerID details.I didnt found this package int sap.com_SAP_JTECHS_1 as you said.

But there is a com.sap.secutity.api.sda[sap.com] in sap.com_SAP-J2EE

What to do to get the login user Details ??

Regards,

Padma N

Former Member
0 Kudos

sdgdf

Edited by: kiran kumar on Sep 25, 2008 9:09 AM

Former Member
0 Kudos

YES

SAP J2EE_1 in that only....

Former Member
0 Kudos

Hi

DC meta data->used Dc-->Add used Dc>Active Dcs-.SAP J2EE---->sda.api file

Former Member
0 Kudos

Some progress with your suggestion.

We will test and let u know.

Since this jar is inside NDS as a plugin it is found in Active Dcs,How about adding as an external jar for DC.

Former Member
0 Kudos

No need of external jar for DCs

For Dcs you need to add

SAP j2EE --->api.sda file thats enough from Acti ve Dcs

Thanks

Kirankumar M

Former Member
0 Kudos

Hi Raghu,

u can find these jars on ur system only.

find both"com.sap.security.api.jar. And com.sap.security.api.perm.jaru201D

at this path : C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.sap.tc.ap_2.0.0\comp\SAP-JEE\DCs\sap.com\com.sap.security.api.sda\_comp\gen\default\public\default\lib\java

now for activation.jar

1)for web services

C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.sap.ext.libs.webservices_2.0.0\lib

2)for j2ee

C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.tssap.ext.libs.j2ee_1.3.0\lib

Regards

Khushboo

Answers (3)

Answers (3)

Former Member
0 Kudos

You need also this library:

import com.sap.security.api.IUser;

for use this following code:

try {

// Usuario de la clase IWDClientUsar

IWDClientUser wdUser = WDClientUser.getCurrentUser();

// Si se puede recoger la informacion del usuario conectado.

if (wdUser != null) {

IUser epUser = wdUser.getSAPUser();

if (epUser != null) {

// Si se est? ejecutando en el entorno de Desarrollo.

Former Member
0 Kudos

hi refer the following tutorial

Fetching User Details from the Portal and Displaying it in Web Dynpro with Authentication in the Portal

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-tec...

Former Member
0 Kudos

Hi,

if you want to display the login user name do the following in the DoInit of the view.

String userid="";

try {

IWDClientUser user = WDClientUser.getCurrentUser();

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

} catch (WDUMException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

and place the userid into context attribute of your Text field.

Regards,

ramesh