ABAP RAP Advanced

Additional Save and Unmanaged Save

Saving Under Your Own Control

Additional Save in RAP

  • Extends the standard persistence in the managed scenario
  • Allows additional logic during the save phase
  • Embedded in the RAP framework transaction flow
  • Defined in Behavior Definition (BDEF) as a save extension
managed implementation in class zbp_i_task unique;
strict ( 2 );
with draft;

define behavior for ZI_Task alias Task
implementation in class zbp_i_task unique
with additional save
...
  • Implementation takes place in the saver class, method save_modified
  • Typical use cases: audit logging, external services, change documents

Unmanaged Save in RAP

  • RAP leaves the entire persistence process to the developer
  • Interaction phase and save sequence must be fully implemented manually
  • BDEF definition with unmanaged save attribute
define behavior for ZI_User alias User
with unmanaged save
...
{
  ...
  field ( readonly ) IsEditable;

  update ( features : instance );
  delete ( features : instance );
  ...
}
  • Enables integration of existing legacy data persistence
  • Maximum control, but significantly more development effort

Differences: Additional vs. Unmanaged Save

Feature Additional Save Unmanaged Save
Persistence Control Framework managed + extension Fully developer-controlled
Complexity Moderate High
Use Case Enhancements & service reuse Legacy integration & full control
BDEF Syntax additional save unmanaged save

Recommendation

  • Use Additional Save when only extensions are needed
  • Use Unmanaged Save for integrating existing persistence or special scenarios
  • Consider impact on transactionality and performance
  • Thoroughly test save phases in both draft and active scenarios