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: 

Authorisation Group In Custom Table

Former Member
0 Kudos

Hi Experts,

Our requirement is of the following nature.

We have created a custom table which has some data.

Can we add a field for authorisation so that only that data is visible to the user?

This is similar to the concept of authorisation groups in standard tables wherein the authorisation groups are added to the pfcg roles of the users so that only the data corresponding to the authorisation group values are visible to the users.

For eg take these 5 entries:

S.No. Authorisation Grp

1. AA

2. AA

3. AB

4. AB

5. AC

Now we add the values of 'AA' or 'AB' etc into the PFCG roles of users so that a user having 'AA' value may see only the first 2 rows on querying the table.

Any help in this regard would be appreciated.

Thanks and Regards,

Ravi Bhatnagar

1 REPLY 1

Former Member
0 Kudos

Hi Ravi,

1. Its a good idea and it can be done. You can use the same concept which you have mentioned. But after generating the table maintenance, you will have to write some custom code in it, so that required records are only populated and shown to the user.

2. For that, according to my opinion,

a) create a new authorisation object and inside that add a authorisation field (which can take master values from this table).

b) use this object (eg. AUTHORITY-CHECK 'ZOBJ') inside the maintenance program.

c) Based upon the sy-subrc value, you can populate/depopulate the records to be shown

d) OR you can show all records, but at the time of saving,

you can check authorisation object and give message that no authority to change AA. (eg)

Hope this helps.

regards,

amit m.