Get Example source ABAP code based on a different SAP table
• ONLY GLOBAL GET PERMISSIONS • ONLY GLOBAL FEATURES GET PERMISSIONS • ONLY GLOBAL AUTHORIZATION GET PERMISSIONS • ONLY INSTANCE GET PERMISSIONS • ONLY INSTANCE FEATURES GET PERMISSIONS • ONLY INSTANCE AUTHORIZATION GET PERMISSIONS • ONLY FEATURES GET PERMISSIONS • ONLY AUTHORIZATION GET PERMISSIONS • ONLY GET PERMISSIONS
GET PERMISSIONS>, only_clause>
ABAP_SYNTAX ... ONLY ${ GLOBAL $| GLOBAL FEATURES $| GLOBAL AUTHORIZATION $| INSTANCE $| INSTANCE FEATURES $| INSTANCE AUTHORIZATION $| FEATURES $| AUTHORIZATION $| (dyn_spec) $} ...>
What does it do? The only_clause> specifies which control characteristics (instance/global and features/authorization aspects) are to be included in the result of a GET PERMISSIONS> statement.
Variants The following table shows all the variants for only_clause>. ABAP_NOTE For consolidating and interpreting the permission results, see the topic GET PERMISSIONS>, Guidelines>. Variant>Details> ONLY GLOBAL> Includes only the global authorization, global and static feature control in the result. In the subsequent syntax, FROM keys > is not allowed. ONLY GLOBAL FEATURES> Includes only global and static feature control in the result. In the subsequent syntax, FROM keys > is not allowed. ONLY GLOBAL AUTHORIZATION> Includes only global authorization in the result. In the subsequent syntax, FROM keys> is not allowed. ONLY INSTANCE> Includes only instance-based authorization and instance-based feature control in the result. Note that the result also includes static features. ONLY INSTANCE FEATURES> Includes only instance-based feature control in the result. Note that the result also includes static features. ONLY INSTANCE AUTHORIZATION> Includes only instance-based authorization in the result. ONLY FEATURES> Includes only global, static and instance-based feature control in the result. ONLY AUTHORIZATION> Includes only global and instance-based authorization in the result (but neither global nor instance-based feature control). ONLY dyn_spec> Specifies any of above variants dynamically using an enumeration value> of type T_PERMISSIONS_ONLY> of interface IF_ABAP_BEHV>>.
Latest notes:
In the subsequent syntax, FROM keys> must not be specified if any of the ONLY GLOBAL ...> variants are used. For all other ONLY > clauses, FROM keys> is required.
If no only_clause> is specified, all aspects, that is, global- and instance-based feature control as well as global- and instance-based authorization, are included. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 The following source code sections taken from CL_DEMO_RAP_EML_GET_PERM_ONLY>> demonstrate the variants of the only_clause>. ABEXA 01547 ABAP_EXAMPLE_END
ABAP_EXAMPLE_ABEXA
The example ABAP_EML - GET PERMISSIONS>, only_clause>> demonstrates the different variants of the only_clause> with a simple managed RAP BO.
The example ABAP_EML - RAP Calculator (Unmanaged)> demonstrates a GET PERMISSIONS> statement using only_clause> ONLY INSTANCE FEATURES> with a simple unmanaged RAP BO. In this case, permissions are requested to determine a calculation based on entries provided is possible or not. For example, it is disallowed if a division by 0 were to be executed. ABAP_EXAMPLE_END