Ansicht
Dokumentation
ABAPHANDLER_METH_AUTH - HANDLER METH AUTH
Fill RESBD Structure from EBP Component Structure PERFORM Short ReferenceThis documentation is copyright by SAP AG.
FOR INSTANCE AUTHORIZATION, AUTHORIZATION
Handler method definition:
METHODS meth $[FINAL$]
FOR $[INSTANCE$] AUTHORIZATION
$[IMPORTING$]
${ REFERENCE(im_par_auth) $| im_par_auth $}
REQUEST ${ REFERENCE(req_auth) $| req_auth $}
FOR bdef
RESULT ${ REFERENCE(res_auth) $| res_auth $}
$[CHANGING ${ $[
failed TYPE data$]
$[reported TYPE data$] $}$].
Effect
Handler method that is used for instance-based authorization checks for accessing RAP BO entities. It must be defined and implemented in a handler class of an ABAP behavior pool. The method name meth can be chosen freely. bdef is the name or the alias of the BDEF.
Method Parameters
- IMPORTING parameters:
- im_par_auth: Internal table of type TYPE TABLE FOR AUTHORIZATION KEY.
- The parameter can also be passed by reference (see REFERENCE). The use of the ABAP word IMPORTING is optional.
- req_auth: Request parameter on which the information retrieval for instance-based authorization is based on. It is a structure of type TYPE STRUCTURE FOR AUTHORIZATION REQUEST. The parameter can also be passed by reference.
- CHANGING parameters:
- res_auth: Used to store the result of the permission information retrieval. It is an internal table of type TYPE TABLE FOR AUTHORIZATION RESULT. The parameter can also be passed by reference
- The CHANGING parameters failed and reported are implicitly available. They are used to return information on failures or messages respectively. It is possible to specify the parameters with the predefined names failed and reported explicitly following the ABAP word CHANGING. In this case, the generic type DATA is used. At runtime, the typed parameters implicitly have the BDEF derived type TYPE RESPONSE FOR.
BDEF Requirements
See the required BDEF notations for both variants in the topic CDS BDL - authorizations.
Examples
Examples for RAP handler method definitions. Find demonstrations of method implementations in the executable examples further down.
METHODS get_instance_authorizations FOR INSTANCE AUTHORIZATION
IMPORTING keys REQUEST requested_authorizations FOR bdef
RESULT result.
METHODS get_instance_authorizations FOR AUTHORIZATION
IMPORTING keys REQUEST requested_authorizations FOR bdef RESULT result
CHANGING failed TYPE DATA reported TYPE DATA.
Example for RAP Handler Methods: Demonstrates this RAP handler method within a RAP handler class using a simple unmanaged RAP BO that is draft-enabled.
General Material Data BAL_S_LOG - Application Log: Log header data
This documentation is copyright by SAP AG.
Length: 5768 Date: 20240426 Time: 051222 sap01-206 ( 64 ms )