cancel
Showing results for 
Search instead for 
Did you mean: 

Filter data according to user profile

Former Member
0 Kudos

Hello EM experts!

I am facing an issue with a client request.

We created a scenario based on a custom type of event Handler.

Recently, the client asked me to create user profile that can access only a single type of event Handler (parameter 1 starts with 'A', for instance). I developped a quick solution, creating a new parameter that contains the first character of the parameter 1.

In the selection profile, I added this parameter, hidden, and I put 'A' as the default value.

It works to develop a quick solution but it is not a good way to do it in the future. Particularly because I have now a profile to create that has to access all the event hanlder where the parameter 1 does not start by A.

If the rules become more and more complex, it will not work at all.

Do you know a way to put a default value in the selection that can use operators like 'contains', 'does not contain'... I did not find what I'd like in SPRO, but maybe with an enhancement ?

Thank you for your help !

Perrine

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

I looked into Authorization profile, I created one based on my parameter but I do not understand where I am supposed to say that these values should be displayed for these users.

I tried with the roles but I only find a "from" / "to" selection. I do not think it is working for me because I do not know exactly which event Handler I want in each profile. The condition is something like

- Parameter 1 starting with A for some users

- Everything else for some other users.

Am i missing something?

Best regards

Perrine

Former Member
0 Kudos

Hi Perrine,

Please follow this documentation and I am sure it will work for you:

    1. Define an authorization profile parameter set with the corresponding control or info parameters. Only that data belonging to the parameters specified in this IMG activity is displayed to the user when he or she creates, changes, queries or evaluates event handler data.
      You define the control and info parameters under

Define Control and Info Parameters

    .
    2. Define an authorization profile and assign one or more authorization profile parameter sets.
      Specify an

authorization group number

    for each authorization profile parameter set. When checking the authorization, the system checks whether a user is authorized for all parameters of an authorization group. If an event handler belongs to several authorization groups, the user only needs authorization for one of the groups to create or change event handlers, or to have the system display them.
      3. Assign the authorization profile to an

event handler type

    .
      4. Under

Role Maintenance

      assign the authorization profile to a role.
Former Member
0 Kudos

Hi Perrine,

Authorization profile few limitations:

1. The control parameters should exist when you create an event handler.

2. You have to assign to event handler.

Let's follow these steps:

1. Create Authorization profile parameters in IMG

2. Go to user role in SUIM
. Go to Authorization tab -> Display Authorization -> Event Management -> Event Handler Authorization -> Give Parameter name in authorization object field "X_EM_EH"

3. Assign Parameter name as "A" in Parameter Value of Length 255

Other option:

Implement in BADI /SAPTRX/BADI_EH_S-AFTER_GET_DATA_DISP what to display to users maintain custom table and logic defined.

Regards


GGOPII

Former Member
0 Kudos

Hi Gopi,

I finally got how we are supposed to use the authorizations, the problem is i have for instance 3 event handlers where the parameter 1 is equal to :

- AAA

- ABB

- BBB

For one profile, I want to see AAA and ABB and fo the other one BBB. So one solution should be to create an extra parameter including only the first character of the parameter and then use authorizations.

The problem is, this have not been forecasted at the beggining pf the projetc so a lot of event Handler will not have this new parameter.

Regarding the second solution, I am not sure but I guess it is the same problem than with filter, it is triggered after the data are searched. So If the tick "no more than 200" is activated and no lines are corresponding to the criteria, nothing is displayed. I can be wrong I did not test it.

So for now I implemented the BADI /SAPTRX/IF_BADI_WDA_UI~BEFORE_SEARCH_API. where I add the search criteria I need (got from a custom table).

Best regards,

Perrine

Former Member
0 Kudos

Hi Perrine,

Thanks for this solution. Could you write a blog step by step in our SAP EM forum that would benefit anyone who is looking for this kind of solution in future.

I appreciate your help in advance.

Regards


GGOPII

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Perrine

I think this can be achieved as per your/Daniel parameter configuration and define a custom authorization role.

1. Create Custom role copy from SAP Standard EM User role or from your custom role already assigned for user.

2. Select the parameters from Selection profile where you configured (or you can create a custom table and maintain entries which you want to pull the data)

Regards


GGOPII

Former Member
0 Kudos

Hi Perrine,

Have you looked at the Auth Profiles and filter profiles? Please refer the following link:

Authorizations and Filters - SAP Event Management Infrastructure - SAP Library

This might solve your issue.

Path is:

Thanks,

Vishnu

former_member186607
Active Contributor
0 Kudos

Hi Perrine,

ône more question regarding the requirement: If you would now create three different user profiles (one to restrict selection to EHs with parameter 1 starting with 'A', one for EHs with parameter 1 starting with 'B' and one for EHs with parameter 1 NOT starting with 'A' or 'B'), would these three user profiles be assigned to different users? Or would it be also a use case that one user will have two or all three user profiles assigned?

Best regards, Daniel

Former Member
0 Kudos

Hello Daniel,

A user will have only one profile.

Best regards,

Perrine

Former Member
0 Kudos

Hello Vishnu,

I tired with filter and I almost managed to do what I want, but the problem is the filter is applied after the selection criteria.

In my case, when I search without any additional criteria and if the "no more than 200 results" was ticked and none of the lines started with A, I had no lines returned. It is confusing for the user.

And I think authorization is used at event handler profile so I do  not think it can be applied here. Am I wrong ?

Best regards,

Perrine

former_member190756
Active Contributor
0 Kudos

Hi Perrine,

Filter Profiles are to restrict the view on an EH i.e. to hide some attributes like EE or Parameters but not to completely hide an EH.

Authorization Profiles are there to restrict the access to complete EH i.e. a user can see the EH or not.

So for your case Authorization Profile should be the right way.

Best regards,

Steffen