cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP - ABAP RAP - managed service change documents

hendrikp
Participant
0 Kudos
1,910

Hello,

according to this documentation there is a way to create change document objects and write change documents.

We have a business requirement(auditing reasons) to provide change history for tables we use in a ABAP RAP Model. In an unmanaged scenario it would probably be possible to write them within the create,update & delete methods.

However we currently have a managed scenario. Is there a way to write change documents in an ABAP RAP managed scenario and if yes how?

View Entire Topic
Andre_Fischer
Product and Topic Expert
Product and Topic Expert

Hi Hendrik,

in a managed scenario you will use an additional save

Integrating Additional Save in Managed Business Objects - SAP Help Portal

In the behavior implementation class you would have to create an additional local class and in the save_modified( ) you would be able to call the API to work with change documents.

Kind regards,

Andre

CLASS lsc_<your_rap_bo> DEFINITION INHERITING FROM cl_abap_behavior_saver.

  PROTECTED SECTION.

    METHODS save_modified REDEFINITION.

ENDCLASS.

CLASS lsc_zdmo_i_rapgeneratorbo IMPLEMENTATION.

  METHOD save_modified.

  ENDMETHOD.
ENDCLASS.
anoukvandenengel
Explorer

Hello Andre,

I am currently implementing this, but I was wondering how I should handle any potential exceptions raised by the write method of the change document handler class, since I cannot report any errors back to the user in the late save phase.