Method ACTIVATE
Use
If you use history management, you must implement this method. If you do not use history management, you can ignore this method.
Sample source text:
Only the main parts of the source text are mentioned below.
METHOD if_maintenance_brf~activate .
DATA:
lv_count TYPE i.
CALL METHOD if_maintenance_brf~get_version_info
IMPORTING
ev_count = lv_count.
CALL METHOD cl_aux_brf=>save_structure
EXPORTING
iv_tabname = 'TBRF142'
iv_edit_mode = '5'
iv_history_available = if_maintenance_brf~mv_history_available
iv_applclass = ms_brf150_cur-applclass
iv_import_status = ms_brf150_cur-import_status
iv_key_category = 'F'
iv_key_object = ms_brf150_cur-expression
iv_version = ms_brf150_cur-version
iv_count = lv_count
* IMPORTING
* EV_SUBRC =
CHANGING
cs_structure_cur = ms_brf142_cur
cs_structure_old = ms_brf142_old.
CALL METHOD cl_aux_brf=>save_table
EXPORTING
iv_tabname = 'TBRF144'
iv_edit_mode = '5'
iv_history_available = if_maintenance_brf~mv_history_available
iv_applclass = ms_brf150_cur-applclass
iv_import_status = ms_brf150_cur-import_status
iv_key_category = 'F'
iv_key_object = ms_brf150_cur-expression
iv_version = ds_brf150-version
iv_count = lv_count
* IMPORTING
* EV_SUBRC =
CHANGING
ct_table_cur = mt_brf144_cur
ct_table_old = mt_brf144_old.
CALL METHOD super->if_maintenance_brf~activate.
ENDMETHOD.
Description:
The ACTIVATE method is similar to the SAVE method. The main difference is that you have to call the superclass at the end of the ACTIVATE method.
You must also keep in mind that you need to call get_version_info at the beginning.
As with the SAVE method, you also use the SAVE_TABLE and SAVE_STRUCTURE methods of auxiliary class CL_AUX_BRF.