cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Authority in WDJ

Former Member
0 Kudos

Hi Friend

There are have two accounts in EP ( using some account in ECC6.0 ).

I Want to set user1 display plant 1000 only and user2 display plant 2000 , 3000.

How to get it? Please Help me. thanks.

Best Regards

Ben Chen

Accepted Solutions (1)

Accepted Solutions (1)

former_member214651
Active Contributor
0 Kudos

Hi,

what u can do is, get the logged user from the portal and then filter out the plants based on it or u can inform the ABAP'er about this requirement so that he will only send the list of plants based on the role for the userid which u pass for the function module.

Regards,

Poojith MV

Former Member
0 Kudos

Hi Poojith M V

I am ABAPer and first contact WDJ project development.

I know your meaning is input EP account to IDS, then check this user1 only display plant 1000.

but my customer hope set Authority in EP.

I don't Know how to set Authorization in Protal(user1 only plant1000 and user2 plant 2000).

Do you have other solutions? Thx.

Regards

Ben

former_member214651
Active Contributor
0 Kudos

HI Ben,

As far i know, the authorization in portal can be set to restrict the access of the user for the portal content (like administrator or access only to one WD application),

if something requires to be checked for what u r trying, it has to be handled in the development part.

Kindly let me know if i have answered ur question.

Regards,

Poojith MV

Former Member
0 Kudos

Hi Poojith MV

I try add code in View's Implementation.

Maybe I can check authority in here.

Now I only demo hot code plant 1000 in program.

if your other solution, plz tell me.

public void onActionSearchPO(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionSearchPO(ServerEvent)

boolean back = false; IWDMessageManager manager = wdComponentAPI.getMessageManager();

try {

// get webdynpro user

IWDClientUser user = WDClientUser.getCurrentUser();

// get sap WAS user for WD user

IUser iUser = user.getSAPUser();

// get role for name

Role sapRole = UMFactory.getRoleFactory().getRole("ROLE.UME_ROLE_PERSISTENCE.un:Display01")

back = sapRole.isUserMember(iUser.getUniqueID(), true);

}

catch (WDUMException e1) {

wdComponentAPI.getMessageManager().reportWarning("Demo01 Error " + e1.getMessage());

}

catch (UMException e2) {

wdComponentAPI.getMessageManager().reportWarning("Demo02 Error " + e2.getMessage());

}

//@@end

}

Edited by: BenChen on May 17, 2010 8:53 AM

Answers (0)