Method LOAD
Use
The LOAD method has the following tasks:
-
It reads the configuration of the current BRF object from the database
-
It transfers this definition to the OLD and CUR table
You have to redefine the LOAD method.
Sample source text:
METHOD if_maintenance_brf~load .
CALL METHOD super->if_maintenance_brf~load.
CALL METHOD cl_aux_brf=>load_structure
EXPORTING
iv_tabname = 'TBRF142'
iv_import_status = ds_brf150-import_status
iv_applclass = ds_brf150-applclass
iv_key_category = 'F'
iv_key_object = ds_brf150-expression
iv_version = ds_brf150-version
iv_edit_mode = mv_edit_mode
iv_history_available = if_maintenance_brf~mv_history_available
IMPORTING
es_structure_cur = ms_brf142_cur
es_structure_old = ms_brf142_old.
CALL METHOD cl_aux_brf=>load_table
EXPORTING
iv_tabname = 'TBRF144'
iv_import_status = ds_brf150-import_status
iv_applclass = ds_brf150-applclass
iv_key_category = 'F'
iv_key_object = ds_brf150-expression
iv_version = ds_brf150-version
iv_edit_mode = mv_edit_mode
iv_history_available = if_maintenance_brf~mv_history_available
IMPORTING
et_table_cur = mt_brf144_cur
et_table_old = mt_brf144_old.
ENDMETHOD.
Description:
Calling the superclass is mandatory, because access to table TBRF150 and to other BRF tables that are not dependent on the implementing class takes place in the superclass.
Class CL_AUX_BRF provides a range of methods that read generic structure-like data (table TBRF142) and table-like data (table TBRF144) from the database. However, these methods only operate if the key format of the tables is analogous to the relevant base table. If this is not the case, you have to implement the read logic yourself.
With the above source text, note the following:
-
In the source text you can see that structure DS_BRF150_SCR is used instead of ms_brf150_scr.
-
When you transfer the key fields, you must always refer to the fields of structure ds_brf150. These fields are filled in the initial screen and define the BRF object that needs to be processed.
-
The member variable mv_edit_mode refers to the data element BRF_EDIT_MODE. In turn, this data element refers to the domain BRF_EDIT_MODE. Look at the fixed values for domains to get the permitted values for mv_edit_mode.
-
The field IV_CATEGORY refers to data element BRF_CLASS_CATEGORY. Data element BRF_CLASS_CATEGORY refers to domain BRF_CLASS_CATEGORY with the associated fixed values for domains.