Application Development 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: 

Populate authoristation role on the fly ($var)

Former Member
0 Kudos

Hi there,

I have got an Authorisation role (BW_GM_GRANT_AUTH) which instead of containing a list of valid grants, it has a $ variable ($ZGMGRANT) which i need to populate on the fly. Does anyone know how i might go about doing this.

thanks in advance

Regards

Mart

1 REPLY 1

uwe_schieferstein
Active Contributor
0 Kudos

Hello Mart

Our company has developed and is selling a software package which does what you like to do. This software is suitable to mass-generate roles and is based on template roles.

However, in your case where you have a single or only few roles to generate I would recommend a different approach using eCATT (I assume that you work at least on release 6.20):

(1) Record a test script (for transaction PFCG) which replaces the variables in your role with concrete values.

(2) Parametrize your test script (using a test data container) in oder to make your generation more flexible.

(3) In your application where you want to generate the role call function module ECATT_EXECUTE (function grouop ECATT_EXECUTE) to execute your test script.

Alternatively, instead of recording transaction PFCG you could also directly modify the corresponding DB tables (AGR_1251 and AGR_1252) in your test script because in eCATT you can use basically all ABAP means.

In any case, don't forget to generate the profile(s) of your role.

I am not sure if users that are currently assigned to your role will get the new authorizations without logout and login.

Hope I could help you.

Regards

Uwe