cancel
Showing results for 
Search instead for 
Did you mean: 

Application level permissions for Webdynpro applications

Former Member
0 Kudos

hi Experts,

We have a requirement where, i need to set permissions for webdynpro application at application level.

Would anyone please help me to understand this step wise.

What settings has to be done at user level ? should i create R/3 role for the set of users, then how do i read the access given to any particular user ?

Please help.

Regards,

Sanjyoti.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Following is one way of acheiving this,

Create users and roles in portal.

Assign roles to the iview containing the application.

From the code too you can make sure that certain roles are allowed to use some of the functionalities.

Following is the API

http://help.sap.com/javadocs/nw04/current/um/com/sap/security/api/IUser.html

To get the role based on the user

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

usr.isMemberOfRole(arg0, arg1)

usr.isMemberOfGroup(arg0, arg1)

Regards

Ayyapparaj

Former Member
0 Kudos

hi,

thank you for your fast reply.

what should i do if i want to maintain and define the user authorisation from R/3 system.

That is at R/3 i will have a role or group of users.

From front end application, i will read the user from portal and check its availability in the particular R/3 group. If present the authorisation is allowed else not ?

Regards,

Sanjyoti.

vmadhuvarshi_
Contributor
0 Kudos

Sanjyoti,

Once you get the current portal user with IUser usr = WDClientUser.getCurrentUser().getSAPUser();, you should call a BAPI / RFC in the R3 backend with user name to check for its existence. The function module to check for user existence is USER_EXISTENCE_CHECK. You can find a similar RFC to check for user's existence in a group as well. If it returns true, you can permit the user to go ahead, else stop.

To call a RFC in backend, you need to maintain JCO destinations and create model with relevant RFCs.

Hope it helps,

Vishwas.

Former Member
0 Kudos

thankyou for your reply...

Regards,

Sanjyoti.

Answers (2)

Answers (2)

Former Member
0 Kudos

Assign The following property to application of web dyn pro sap.authentication set it to true then after deployin the application it will display a login page. If u assign a particular role to a particular user in the portal it will accept the login Id. and for displaying the name use the following code in Wd init()

{

IWDClientUser clientUser = WDClientUser.getCurrentUser();

IUser user = clientUser.getSAPUser();

String user123 = user.getDisplayName() .toUpperCase();

wdContext.currentContextElement().setName(user123);

}

Former Member
0 Kudos

Hi sanjyoti,

Check this thread.

Regards,

Mithu