cancel
Showing results for 
Search instead for 
Did you mean: 

Portal Session gettable?

Former Member
0 Kudos

Hi all!

Is it possible to get the IPortalComponentRequest details in a webdynpro application. I don't want to pass data through the Application Parameters in the Portal.

In short, Can I read directly from the Portal Session.

Best regards,

Andreas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

there is no chance to do that at the moment.

Which data do you need? You want to share data betwenn your portal component and your Web Dynpro application?

Please describe your scenario a little bit more in detail.

Thanks in advance

Jochen

Former Member
0 Kudos

Hi Jochen!

Thanks for your answer!

We have an application in which we want to present data from underlying systems (CRM, BW). We are building WebDynpro applications where we need to get the portal user id in order to read the correct data from, say, CRM. How should one go about doing this? We do not want to create a technical user for every user in the portal (too many).. Is it possible to build a web service fronting the UM service in the portal? If so, can you please give me some good pointers on how to do this? I looked at the tutorials for web services and they didn't really cover this area in my opinion.

We are using EP6.0 SP2 (WAS 6.20) and WAS 6.40 (for the dynpro applications).

Best regards,

Andreas

Former Member
0 Kudos

Hi,

to get the current user just use

WDClientUser.getCurrentUser().getSAPUser().

If the portal and the Web Dynpro run on different machines you have to make sure, that the UME is configured in a way, that both machines uses the same user store.

Best regards

Jochen

Former Member
0 Kudos

Hello Jochen!

Hmm, I cant seem to find the method getSAPUser() in the API. I'm using SP8 of NWDS. Do I need to update to SP9 to get this method?

Best regards,

Andreas

Former Member
0 Kudos

Have at look at IWDClientUser, isn't it therein?

Former Member
0 Kudos

Nop.

Use

com.sap.tc.webdynpro.services.sal.um.api.WDClientUser class.


WDClientUser.forceLoggedInClientUser().getSAPUser();

Be sure to set authentication parameter of WD application to true and add reference to com.sap.security.api.sda library in project properties.

Regards,

VS

Former Member
0 Kudos

Hi all!

Thx for all the answers. It sure looks like what I need to do is set up the WAS towards our LDAP. As far as the getSAPUser() method goes, I don't have it?! Really strange indeed, but the only getter methods starting with S I've got in my forceLoggedInClientUser() are:

getSalutation() and getServiceName(). Seems I'm missing something, right?!

Former Member
0 Kudos

It seem that you do not add necessary libraries to your project.

If you are creating a Development Component, add reference to DC SAP-J2EE/com.sap.security.api and select the only public part in this DC.

If you are creating stand-alone WD project open Project Properties -> Java Build Path and add external jar:

<path-to-nw>eclipse\plugins\com.sap.tc.ap\comp\SAP-JEE\DCs\sap.com\com.sap.security.api.sda\_comp\gen\default\public\default\lib\java\com.sap.security.api.jar

This is a built-time support for security classes.

For runtime, also add a reference to classes at runtime. Open Project Properties -> WebDynpro References -> Libraries and add line com.sap.security.api.sda

Disclamer: I'm not sure regarding latest item. If it doesn't work, try to add instead Interface Reference to security_api

Regards,

VS

Former Member
0 Kudos

Thanks for your answer Valery,

has anyone got a pointer to good document regarding the configuration of WAS 6.40 towards an LDAP (MS Active Directory Service)? That would be most helpful.

Best regards,

Andreas

Former Member
0 Kudos

Hi,

the only way to get the current SAP user is the mentioned method

WDClientUser.getCurrentUser().getSAPUser.

Valery is right - if you do not see the getSAPUser() method you have to update your Java build path. You have to add the needed security_api.jar.

Best regards

Jochen

Answers (0)