Using a FAB app to store configuration values
Applications often use configuration values that need to be stored and retrieved from somewhere. Although the typical approach would be to use standard SAP tables to store this data, the FAB platform offers another choice. A FAB application could be generated with a suitable data model for the configuration data which can then be used by another FAB app.
TODO: CE . Document ability to load configuration values from a configuration app. Example App: ADAM - DEMO-PROCESS_FLOW
Sample code to be tweaked
DATA:
lo_assist TYPE REF TO /iqx/cl_forms_assist,
lo_data TYPE REF TO data,
lv_form_name TYPE /iqx/formhd_inst-zform_name,
ls_data TYPE t_data.
FIELD-SYMBOLS: <fs_fdata> TYPE any.
MOVE-CORRESPONDING cr_data TO gs_data.
CREATE OBJECT lo_assist.
CALL METHOD lo_assist->read_form_data
EXPORTING
iv_form_name = 'PJ_SHOWCAPTURE_CONFIG'
iv_instance = gs_data-configinstanceid
IMPORTING
er_data = lo_data
EXCEPTIONS
no_instance_data = 1
OTHERS = 2.
ASSIGN lo_data->* TO <fs_fdata>.
MOVE-CORRESPONDING <fs_fdata> TO gs_data.
MOVE-CORRESPONDING gs_data TO cr_data.
Step-by-step guide
Related articles
IQX Business Solutions - FAB 3.10