ABAP for Cloud Development
AS ABAP Release 914, ©Copyright 2024 SAP SE. All rights reserved.
ABAP - Keyword Documentation → ABAP RAP Business Objects → RAP - Behavior Definitions → RAP - BDL for Behavior Definitions → RAP - Managed and Unmanaged Behavior Definitions → RAP - EntityBehaviorDefinition → RAP - EntityBehaviorBody → RAP - RAP BO Operations → RAP - Non-Standard Operations →
RAP - action
Syntax Forms
Non-Factory Actions
1.
internalstatic repeatable action
(
features: instance global
precheck
authorization:none
authorization:update
authorization:global
authorization:instance
lock:none
)
ActionName external 'ExternalName'
InputParameter
OutputParameter ;
{default function GetDefaultsForActName external 'GetDefaultsForExtName' ;}Factory Actions
2.
internalstatic default factory action
(
features: instance global
precheck
authorization:none
authorization:update
authorization:global
authorization:instance
lock:none
)
ActionName external 'ExternalName'
InputParameter
[cardinality];
{default function GetDefaultsForActName external 'GetDefaultsForExtName' ;}Save Actions
3.
internalstatic factory
save(finalize adjustnumbers finalize, adjustnumbers) action
(
features: global
precheck
authorization:none
authorization:global
authorization:instance
)
ActionName external 'ExternalName'
InputParameter
OutputParameter ;
{default function GetDefaultsForActName external 'GetDefaultsForExtName' ;}
Description
RAP actions are non-standard RAP BO operations that modify the state of an entity instance. The custom logic must be implemented in the RAP handler method FOR MODIFY
.
The following kinds of actions are available:
- Non-factory actions
- Non-factory actions implement custom logic that changes existing entity instances.
- Instance-bound non-factory actions can be declared as repeatable. A repeatable action can be executed multiple times on the same RAP BO entity instance in the same ABAP EML or OData request.
- Factory actions
- Factory actions can be used to create RAP BO entity instances.
- A default factory action is a special kind of factory action.
- Save actions
- RAP save actions can be non-factory actions or factory actions. RAP save actions are characterized by the syntax addition
save
, which has the effect that the action in question can only be executed during the RAP save sequence. Any attempt to execute a RAP save action during the RAP interaction phase results in a short dump.
Further Information
Development guide for the ABAP RESTful Application Programming Model, section about Actions.