Ansicht
Dokumentation

ABENSAVER_METHOD_SAVE - SAVER METHOD SAVE

ABENSAVER_METHOD_SAVE - SAVER METHOD SAVE

BAL Application Log Documentation   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

save, RAP Saver Method

CLASS lsc_bdef DEFINITION
  INHERITING FROM CL_ABAP_BEHAVIOR_SAVER $[ ABSTRACT$] $[FINAL$].
  PROTECTED SECTION.
     ...
     METHODS save REDEFINITION.
     ...
ENDCLASS.

CLASS lsc_bdef IMPLEMENTATION
      ...
     METHOD save.
     ...
     ENDMETHOD
     ...
ENDCLASS.


Effect

RAP saver method that must be defined as part of a RAP saver class lsc_bdef in the CCIMP include of an ABAP behavior pool. It is declared by redefining predefined methods of the superclass.

Once the save sequence gets triggered, the method is called for each RAP BO after at least one successful modification of data in the current LUW. It is the third method of the save sequence to be called. In late numbering scenarios, it is the fourth method to be called following the adjust_numbers method.

The method saves the current state of the transactional buffer, i. e. all RAP BO instances (including instances from cross-BO relationships) from within the current LUW, to the database. However, the method is only triggered if each of the previous methods has been processed successfully.

Method Parameters

The method has the following implicit, predefined parameter:

Errors from RAP BO consumers must not appear after the check_before_save method, hence, failed is not available as a parameter. However, if the application must stop the transaction, a runtime error occurs.

Development guide for the ABAP RESTful Application Programming Model, section Save Sequence Runtime.

Note

After persisting data to the database, it is recommended that the transactional buffer is cleared because the same ABAP session might be used for more than one LUW and any remaining changes in the transactional buffer could lead to inconsistencies.

  • The example Example for a RAP Saver Class (Late Numbering) demonstrates this RAP saver method within a RAP saver class using a simple unmanaged RAP BO in late numbering scenario which also includes the adjust_numbers saver method.





Vendor Master (General Section)   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 5228 Date: 20240508 Time: 044145     sap01-206 ( 75 ms )