Guides implementation of ABAP authorization and IAM including authorization objects, checks, IAM apps, business catalogs, roles, CDS access control (DCL), and privilege annotations for ABAP Cloud and on-premise.
Ships in SAP ABAP. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Guide for implementing authorization checks and identity/access management in ABAP Cloud and on-premise systems.
Determine the user's goal:
Identify the platform and clean core level:
CL_ABAP_AUTHORIZATION (Level A)AUTHORITY-CHECK (Level B)SU22 data and variants for non-released authorization objectsGuide implementation with the appropriate authorization model
IAM App → Business Catalog → Business Role → Business User
↑
Restriction Type (field-level restrictions)
Uses CL_ABAP_AUTHORIZATION (a released API). Available on SAP Cloud ERP and SAP BTP ABAP Environment.
Authorization Object → PFCG Role → User Assignment
↑
Authorization Fields + Permitted Values
Uses AUTHORITY-CHECK. Required on SAP Cloud ERP Private, where the IAM/COM Fiori apps are not available and the classic transactions must be used instead (PFCG, SM59, SOAMANAGER, SU21, SU22).
SAP Cloud ERP Private note: unlike SAP Cloud ERP (public), there is no strict content separation between SAP and customer regarding users, roles and communications.
When a wrapper exposes a classic API to ABAP Cloud code, the wrapped API often checks non-released authorization objects, which cannot be used in ABAP Cloud directly. Handling:
SU22 data for the wrapper when releasing it for cloud development, so the required non-released authorization objects are transparentSU22 variants for each designated usage of the wrapper, for use in role maintenanceSee the abap-cloud skill for the full wrapper pattern and its level classification.
CL_ABAP_AUTHORIZATION"Check authorization using released API
DATA(lo_auth) = cl_abap_authorization=>check_authorization(
EXPORTING
authorization_object = 'Z_MY_AUTH'
authorizations = VALUE #(
( field = 'ACTVT' value = '03' ) "Display
( field = 'ZCARR' value = lv_carrier )
) ).
IF lo_auth->is_authorized( ) = abap_false.
"User not authorized
RAISE EXCEPTION TYPE zcx_not_authorized.
ENDIF.
AUTHORITY-CHECKAUTHORITY-CHECK OBJECT 'Z_MY_AUTH'
ID 'ACTVT' FIELD '03'
ID 'ZCARR' FIELD lv_carrier.
IF sy-subrc <> 0.
MESSAGE e001(z_msg) WITH lv_carrier.
RETURN.
ENDIF.
| Value | Activity |
|---|---|
01 | Create |
02 | Change |
03 | Display |
06 | Delete |
16 | Execute |
In ADT or SU21:
Authorization Object: Z_MY_AUTH
Fields:
ACTVT — Activity (standard field, linked to domain ACTIV_AUTH)
ZCARR — Carrier (custom field, type S_CARR_ID)
ZREGN — Region (custom field, type CHAR4)
Z_TRAVEL)CDS access controls define row-level authorization for CDS view entities.
@EndUserText.label: 'Access Control for Travel'
@MappingRole: true
define role ZI_Travel {
grant select on ZI_Travel
where ( carrier_id ) =
aspect pfcg_auth ( Z_MY_AUTH, ZCARR, ACTVT = '03' );
}
define role ZI_Travel {
grant select on ZI_Travel
where ( carrier_id ) =
aspect pfcg_auth ( Z_MY_AUTH, ZCARR, ACTVT = '03' )
and ( agency_id ) =
aspect pfcg_auth ( Z_AGENCY_AUTH, ZAGENCY, ACTVT = '03' );
}
define role ZI_Travel_Admin {
grant select on ZI_Travel
where _unrestrictedAccess;
}
"Child entity inherits access control from parent
define role ZI_Booking {
grant select on ZI_Booking
where ( carrier_id ) =
aspect pfcg_auth ( Z_MY_AUTH, ZCARR, ACTVT = '03' );
}
PRIVILEGED ACCESS bypasses DCL entirely. Use it only in trusted backend code after an independent authorization check; never rely on DCL to protect rows returned by this query. For user-facing access, prefer a DCL-protected query.
"Run only after an explicit authorization check
SELECT FROM zi_travel
FIELDS travel_id, description
INTO TABLE @DATA(lt_all)
PRIVILEGED ACCESS.
Created in ADT, links a service binding to the authorization model:
ADT: New → Other → IAM App
Name: Z_TRAVEL_IAM
Type: EXT - External App (for OData services)
Service Binding: ZUI_TRAVEL_O4
Assign authorization objects to the IAM App to define which checks apply.
Groups IAM Apps into logical bundles:
ADT: New → Other → Business Catalog
Name: Z_BC_TRAVEL_MGMT
Description: Travel Management
IAM Apps: Z_TRAVEL_IAM, Z_BOOKING_IAM
Created in Fiori app "Maintain Business Roles":
Z_BR_TRAVEL_MANAGER)Define field-level restrictions in business roles:
| Restriction Type | Description |
|---|---|
| Unrestricted | Full access to all values |
| Restricted | Access limited to specified values |
| No Access | No access to the associated functionality |
Example: A travel manager role might restrict ZCARR to only LH and AA.
PFCG transactionZ_TRAVEL_DISPLAY)Bundle multiple single roles:
Z_TRAVEL_COMPOSITE (Composite Role)
├── Z_TRAVEL_DISPLAY (Single Role — display only)
├── Z_TRAVEL_EDIT (Single Role — create/change)
└── Z_TRAVEL_ADMIN (Single Role — full access)
"In behavior definition:
define behavior for ZR_Travel alias Travel
authorization master ( instance )
{
...
}
"In behavior implementation:
METHOD get_instance_authorizations.
READ ENTITIES OF zr_travel IN LOCAL MODE
ENTITY Travel
FIELDS ( carrier_id )
WITH CORRESPONDING #( keys )
RESULT DATA(lt_travels).
LOOP AT lt_travels INTO DATA(ls_travel).
DATA(lv_update_authorized) = abap_false.
DATA(lv_delete_authorized) = abap_false.
IF requested_authorizations-%update = if_abap_behv=>mk-on.
DATA(lo_update_auth) = cl_abap_authorization=>check_authorization(
authorization_object = 'Z_MY_AUTH'
authorizations = VALUE #(
( field = 'ZCARR' value = ls_travel-carrier_id )
( field = 'ACTVT' value = '02' ) ) ).
lv_update_authorized = lo_update_auth->is_authorized( ).
ENDIF.
IF requested_authorizations-%delete = if_abap_behv=>mk-on.
DATA(lo_delete_auth) = cl_abap_authorization=>check_authorization(
authorization_object = 'Z_MY_AUTH'
authorizations = VALUE #(
( field = 'ZCARR' value = ls_travel-carrier_id )
( field = 'ACTVT' value = '06' ) ) ).
lv_delete_authorized = lo_delete_auth->is_authorized( ).
ENDIF.
APPEND VALUE #(
%tky = ls_travel-%tky
%update = COND #(
WHEN requested_authorizations-%update = if_abap_behv=>mk-on
AND lv_update_authorized = abap_true THEN if_abap_behv=>auth-allowed
WHEN requested_authorizations-%update = if_abap_behv=>mk-on
THEN if_abap_behv=>auth-unauthorized )
%delete = COND #(
WHEN requested_authorizations-%delete = if_abap_behv=>mk-on
AND lv_delete_authorized = abap_true THEN if_abap_behv=>auth-allowed
WHEN requested_authorizations-%delete = if_abap_behv=>mk-on
THEN if_abap_behv=>auth-unauthorized )
) TO result.
ENDLOOP.
ENDMETHOD.
Check each requested operation independently. For instance authorization, base checks on the persisted instance state; if an update changes an authorization-relevant field, add a precheck for the proposed value.
"In behavior definition:
define behavior for ZR_Travel alias Travel
authorization master ( global )
{
...
}
METHOD get_global_authorizations.
DATA(lo_auth) = cl_abap_authorization=>check_authorization(
authorization_object = 'Z_MY_AUTH'
authorizations = VALUE #(
( field = 'ACTVT' value = '01' ) ) ). "Create
IF lo_auth->is_authorized( ).
result-%create = if_abap_behv=>auth-allowed.
ELSE.
result-%create = if_abap_behv=>auth-unauthorized.
ENDIF.
ENDMETHOD.
When helping with authorization/IAM topics, structure responses as:
## Authorization Guidance
### Platform
- [ABAP Cloud / On-Premise]
- Approach: [CDS DCL / AUTHORITY-CHECK / CL_ABAP_AUTHORIZATION / IAM]
### Implementation
[Step-by-step with code examples]
### Role Configuration
[How to set up roles and assign access]
S_ABPLNGVS developer governanceAUTHORITY-CHECK to CL_ABAP_AUTHORIZATIONWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
abap-authorization, iam, pfcg, cds-access-control, role-based-security
/sap-abap:authorization-iamfrom SAP ABAP
npx claudepluginhub likweitan/abap-skills --plugin sap-abap17 skills in this plugin
/abapComprehensive ABAP code quality checking using abaplint (automated static analysis) and Clean ABAP principles (manual code review). Use when users ask to check, lint, validate, review, or analyze ABAP code for syntax errors, clean code compliance, code quality, best practices, or adherence to Clean ABAP guidelines. Also use for abaplint setup, configuration, and execution. Triggers include "check this ABAP code", "lint my ABAP", "run abaplint", "configure abaplint", "is this clean ABAP", "review my ABAP", "analyze ABAP code quality", "code quality check", or "ABAP best practices"./abap-cloudHelp with ABAP Cloud development and the clean core level concept (Levels A, B, C, D) including ABAP Cloud vs. classic ABAP development models, ABAP Cloud language version restrictions, wrapper patterns for non-released APIs, released/classic/internal/not-recommended object classification, and clean core principles. Use when users ask about ABAP Cloud, ABAP for Cloud Development, clean core, clean core levels, Level A B C D, classic API, internal object, not recommended object, noAPI, wrapper pattern, released APIs, stability contract, language version, restricted ABAP, embedded Steampunk, developer extensibility, key user extensibility, changelog for SAP objects, or ABAP Cloud readiness. Triggers include "ABAP Cloud restrictions", "clean core", "clean core level", "which level is my extension", "Level A extension", "classic API", "wrapper class", "released API alternative", "ABAP language version", "Steampunk", or "extensibility model".Other plugins' skills for the same job