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

create authorization check for a report

Former Member
0 Likes
2,445

Hi,

I need to create an authorization check for a report. It means that I need to restrict the usage of the report to couple of users ( 'USER1' and 'USER2' ). How can I do that? I did read through a lot of threads regarding this piece got a bit confused and stuck while creating the authorization object.

Say the report name is ZHR_TIMEABC.

Can anyone explain how to create an authorization object and how are they tied to the object and call them in the abap code?

Thanks in advance,

VG

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,005

Check whether this is useful

You can have the authorisation for the particular program and check against this code below for the object S_C_FUNCT

AUTHORITY-CHECK OBJECT 'S_C_FUNCT'

ID 'PROGRAM'

FIELD sy-repid

ID 'ACTVT'

FIELD '16'

ID 'CFUNCNAME'

FIELD 'SYSTEM'.

Hi,

I need to create an authorization check for a report. It means that I need to restrict the usage of the report to couple of users ( 'USER1' and 'USER2' ). How can I do that? I did read through a lot of threads regarding this piece got a bit confused and stuck while creating the authorization object.

Say the report name is ZHR_TIMEABC.

Can anyone explain how to create an authorization object and how are they tied to the object and call them in the abap code?

Thanks in advance,

VG

14 REPLIES 14
Read only

Former Member
0 Likes
2,005
Read only

Former Member
0 Likes
2,006

Check whether this is useful

You can have the authorisation for the particular program and check against this code below for the object S_C_FUNCT

AUTHORITY-CHECK OBJECT 'S_C_FUNCT'

ID 'PROGRAM'

FIELD sy-repid

ID 'ACTVT'

FIELD '16'

ID 'CFUNCNAME'

FIELD 'SYSTEM'.

Read only

0 Likes
2,005

Hi,

Thanks for the response. The link did not help me. From the threads, I read that we use transactions SU20, SU21 to create authorization objects and assign them to a group and then use the object in the abap code. It looks like the link gives a different info.

Correct me if I am wrong, I am new to this topic.

Thanks,

VG

Read only

0 Likes
2,005

S_C_FUNCT C calls in ABAP programs is the authorization object for programs

Read only

0 Likes
2,005

Hi,

Does this mean that I need not create any obijects using SU20 or 21 and just call this function in the program for authorization check?

VG

Read only

0 Likes
2,005

No, you dont have to create any authorization. Just use that as it is

Read only

0 Likes
2,005

JUST CALL

Read only

0 Likes
2,005

Hi,

Thanks. Here is my understanding, S_C_FUNCT calls a system generated function module to make an authority check. So, if different users say USER1 and USER2 have different authroization levels, defined in their user profile, just adding this piece code will take care of authroization check for the program OR do I need to take care of something else?

If so, when do we need to create the authorization objects using SU20 and assign the group and follo this process? When do we use this approach ( lot of threads on authority check have mentioned this procedure)?

Your inputs will be helpful to understand this concept.

Thanks,

VG

Read only

0 Likes
2,005

[SAP HELP|http://help.sap.com/saphelp_40b/helpdata/es/34/55cada98482bc0e10000009b38f91f/content.htm]

Read only

0 Likes
2,005

Hi,

Thanks. I got the info. In that case when do you create custom authorization objects and assign the group to it?

VG

Read only

0 Likes
2,005

for some data elements for which you donnot have a SAP standard Object... maybe a zfield...etc..

Read only

0 Likes
2,005

Thanks for your continued help. In that case, if I understand this right, if we need to do authorization check for some custom tables or custom data fields you need to create custom authorization objects and proceed however for reports or interfaces using the S_C_FUNCT will handle the authority check and should be enough.

In that case, even for my custom report I do not have to create custom authorization objects the standard S_C_FUNCT object should be enough. Right?

Thanks again,

VG

Read only

0 Likes
2,005

authority check is data element specific... dont think too much, just remember it.. hit F1 on authority check for more and more info J@Y

Read only

0 Likes
2,005

Thanks.

VG