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 → 

    RAP - save action

    Syntax


    [internal][static][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


    Defines a RAP save action. RAP save actions are  RAP actions that can only be called during a specified RAP saver method in  the RAP save sequence. Any call during the RAP interaction phase  leads to a short dump.

    Save actions are characterized by the syntax addition save. The name of the RAP saver method during which the action can be executed is specified in brackets. finalize, adjustnumbers, or both can be specified in brackets to indicate the saver method during which the action can be called.

    Non-factory actions and factory actions (instance-bound and static) can be defined as save action. A default factory action, however, cannot be a save action. The respective syntax rules of the kind of action apply (non-factory, static factory, instance-bound factory).

    The following RAP BDL operation additions are allowed for save actions:

    Calling RAP Save Actions

    A RAP save action can be called in the following contexts:

    • From an external RAP BO consumer.
    • In the ABAP behavior pool, from a finalize or adjust_numbers RAP saver method, according to the specification in brackets.
    • A save(finalize) action can be called from the implementation of a RAP determination on save.

    RAP save actions must not be called in the following contexts:

    • A RAP saver method other than the one specified in brackets. For example, a save(finalize) action must not be called during the RAP saver method adjust_numbers. Any attempt to do so leads to a syntax check error.
    • In the implementation of a RAP determination on modify. If this is done,  a short dump occurs.
    • If called from the implementation of any other RAP handler method, a short dump occurs.

    Availability


    Hints

    • Save actions without a RAP saver method specification are obsolete. The following syntax is not valid: save action MySaveAction. Existing save actions that do not specify a RAP saver method in brackets are automatically interpreted as save(finalize).
    • RAP save actions are required for the RAP representation of certain existing functionality which does not maintain a transactional buffer but (from a RAP perspective) only has a save phase.

    Further Information


    Development guide for the ABAP RESTful Application Programming Model, section about Actions.