‎2007 Aug 20 2:00 PM
Hi all,
In a report tree, we can state the authorisation grp which can access that tree. This auth grp will then be tied to a user role to restrict certain users from accessing the tree.
I have created a custom program to access a custom table which stores these authorisation grp. this program is supposed to check if the user has the authorisation to access the tree. If he/she has then show the tree, if not do not show.
the problem is i'm not really sure which table hold the link between the user role and auth grp. does anyone know how to go abt this problem?
thanks alot!
r3gards,
r3venant
‎2007 Aug 20 2:04 PM
‎2007 Aug 20 2:04 PM
‎2007 Aug 20 2:05 PM
why don't you use sap standard and give the authorisation where it's normally done in a role which is maintained in tcode PFCG
when you want to check authorisation in abap use the function for that
for I_TCODE you can fill in you're own name. and the field is ofcourse different also
authority-check object 'I_TCODE'
ID 'TCD' field 'IW32'.
*ads IF t370a-aktyp = 'V'.
if sy-subrc = 0.
f_tcode = 'IW32'.
ELSE.
f_tcode = 'IW33'.
ENDIF.
‎2007 Aug 20 2:15 PM
Hi A. de Smidt,
those are auth objects, do u know where the auth grps are stores?
the thing is a they are going to create an FOP to call the tree which needs to be done thru a custom program.
So the check has to be done in this program to determine which tree to call.
Regards,
r3venant
‎2007 Aug 20 2:45 PM
but why do you need to know where they are stored.??
if you have the name and you have the function you get back true or false if it passes the autorisation check.
really sap has provided a lot of functions that can do the work for you
the example above can also be used for you own created authorization groups and on which values you want to check
Message was edited by:
A. de Smidt