Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Single or composite role, which table to check ?

Former Member
20,609

Hello,

I'm currently trying to find out in which AGR_* table is stored the flag that indicates whether a role is a composite or a single one.

I try AGR_DEFINE but it seems that there is no flag to determine whether the role is single or composite. I can't look in AGR_AGRS because i'm trying to determine composite role without any single role associated and therefore there is no entry in AGR_AGRS.

Do you have any idea ?

Thank you very much for your help !

Jerome.

1 ACCEPTED SOLUTION
Read only

Former Member
7,779

Check AGR_FLAGS - the field is "attributes" and the value is COLL_AGR - is there is a "X" in the flag field for the role then it is a composite role.

4 REPLIES 4
Read only

Former Member
7,780

Check AGR_FLAGS - the field is "attributes" and the value is COLL_AGR - is there is a "X" in the flag field for the role then it is a composite role.

Read only

0 Kudos
4,031

Example how to get composite roles in native SQL:

SELECT MANDT, AGR_NAME FROM AGR_FLAGS
WHERE FLAG_TYPE = 'COLL_AGR' AND FLAG_VALUE = 'X'

Example how to get single Z roles (not composite) which don't have authorizations, in native SQL:

select agr_name
from agr_define
where mandt       = '100'
  and agr_name like 'Z%'
  and exists ( select * from agr_flags
               where mandt      = agr_define.mandt
                 and agr_name   = agr_define.agr_name
                 and flag_type  = 'COLL_AGR'
                 and flag_value = ' ' )
  and not exists ( select * from agr_1250
                   where mandt    = agr_define.mandt
                     and agr_name = agr_define.agr_name )

 

Read only

Former Member
7,779

Hi,

The tables which will help you as follows.

AGR_AGRS- provides list of Composite roles with all single roles which are there in these composite roles.

where as

AGR_DEFINE - provides the derived role and its parent role.

Regards

Puneet

Read only

dhorions
Contributor
0 Kudos
7,779

You can use the VIEW : V_AGR_COLL

If you go to se11 and look at the join conditions for this view you can see that in orde to have a composite rol, you should look at agr_flags for these conditions


AGR_FLAGS	FLAG_TYPE	EQ	'COLL_AGR'	
AND
AGR_FLAGS	FLAG_VALUE	EQ	'X'	

<edit>

i'm sorry, JC already said this, I missed that

</edit>

Message was edited by:

Dries Horions