cancel
Showing results for 
Search instead for 
Did you mean: 

User roles/mapping from Portal into NWDS

Former Member
0 Kudos

Hello:

I've created a webDynpro app that receives a client ID and retrieves the client data using an RFC connection into R/3. It's working now, however, I need to deploy it into the portal and instead of typing the client ID in a text field, the app should get it from the user name.

Let's say, the user "Alejandro" logs in the portal and the app should seek for the name "Alejandro". IS it possible to use a "user mapping" in order to link the portal login into the search parameter for the RFC in the webDynpro app?

Thanks

Alejandro

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In NDS right click on Your project->properties->Java Build path->Libraries->Add variable-> Eclipse Home->extend->plugins->com.sap.security->lib->com.sap.security.api.jar

These imports should be there

import com.sap.security.api.IUser;

import com.sap.security.api.IUserAccount;

get the IUSer object by

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

You will get first name ,last name,Id etc from this object

Once you get the ID you can pass it to an RFC as input parameter

see this post

Hope this helps you

Regards

Rohit

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Alejandro,

Have you got the answer for your query?

Let me know if you need more info?

Regards,

karthick

Former Member
0 Kudos

Hi,

By using this IUser Object you can get the user first name ,last name,user location,user cell phone number and some more details.

Regards,

Karthick

Former Member
0 Kudos

Hello:

Thanks both of you! you were really helpful, just wondering, if I make the query dependant from the User ID, how can I debug it? (assuming I'll just do a "Deploy new archive and run" ).

An another thing..... where do I find advanced features like this?

Thank you very much!!

Alejandro