cancel
Showing results for 
Search instead for 
Did you mean: 

Using authorization objects in AMDP method.

former_member771977
Discoverer
0 Kudos
730

Hi Team,

Is there any option to use authorization objects in AMDP methods.

For example this is the autheraisation object that i have used in my ABAP class. Can i use the same in AMDP class.

method PRECHECK_AUTH .

clear is_authorized.

authority-check object 'ZXF1_APANA'
id 'BUKRS' field is_data-bukrs
id 'ACTVT' field '03'
id 'USER' dummy
id 'BRGRU' field is_data-blart.

if sy-subrc = 0.
is_authorized = 'X'.
endif.

endmethod.

Accepted Solutions (0)

Answers (1)

Answers (1)

Cocquerel
Active Contributor
0 Kudos

No, "authority-check object" is an ABAP statement that can not be used in SQLScript.

In CDS, you can manage access control (see https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/70/7332186bf41014b5040bee4e204223/frameset.htm )