cancel
Showing results for 
Search instead for 
Did you mean: 

authorization issue

Former Member
0 Kudos

HI,

How to assign the authorization group to program.How to put authorization check in the program?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You mean to say ZProgram or Standard Program

For Standard Program, you wil have inputs for PA,PSA, EG, ESG so simple authorization is sufficient

But for Z PRograms,

AUTHORITY-CHECK OBJECT 'P_ORGIN' FOR USER sy-uname

ID 'PERSA' FIELD p_prarea.

IF sy-subrc <> 0.

DELETE git_select_option.

CONTINUE.

Regards

...Sadhu

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks experts

Former Member
0 Kudos

Is it a Customized program..? If so Does it uses the Logical database..??

If it is a Customized program and uses the Logical database, then you do not need to maintain any authorization group for the program as the logical database would by default takes care of the authorization aspect.

If it is a customized program which does not uses the logical database, then you are required to maintain the Auth grp.

How it is maintained - SE38 > Enter Program and then goto Change Mode > The from the menu click on GOTO and then select the attributes > You will then have this field before you to maintain the Auth grp.

The Authorization Check that you need to maintain in the program shall be as below :

AUTHORITY-CHECK OBJECT 'P_ORGIN'

ID 'INFTY' FIELD '*'

ID 'SUBTY' FIELD '*'

ID 'AUTHC' FIELD 'R' "read

ID 'PERSA' FIELD XXXXXX (Where XXXXXX will be variable where the Personnel areas passed to the output are captured)

ID 'PERSG' DUMMY

ID 'PERSK' DUMMY

ID 'VDSK1' DUMMY.

ted_dinh
Active Contributor
0 Kudos

Authorization group is assigned to an ABAP object by going into program 'Attribute' and populate 'Authorization Group' field . Users would need to have the program name included in 'S_PROGRAM' authorization object to execute. You don't need to put authorization check for this within the program.

Rgds.