In the enhancement Post-Method of CL_EHFND_FBI_GUIBB_FORM->get_data( )
method , I have code that initializes the FORM field QIM_ID to a specific value when the screen initially opens, by changing field in CS_DATA structure.
When the screen is initially opened, the field is initialized with the specified value.
However, if any event is executed on the screen, the GET_DATA method is executed and clears the initialization. Is there a structure in addition to CS_DATA that needs to be updated or synchronized?
Below is code used:
* If Incident 'Report Incident - Simplified' - QIM configuration
if me->core_object->ms_uibb_key-config_id =
'ZEHHSS_INC_REC_QIM_FRM'.
read table ct_field_usage into ls_field_usage with key name =
'QIM_ID'.
lv_index = sy-tabix.
ls_field_usage-read_only = abap_true.
modify ct_field_usage from ls_field_usage index lv_index.
ev_field_usage_changed = abap_true.
if io_event->mv_event_id ne 'FPM_START' and
io_event->mv_event_id ne 'FPM_LEAVE_INITIAL_SCREEN'.
if me->core_object->mv_qim_update_flg is not initial.
clear me->core_object->mv_qim_update_flg.
* Set QIM Issue ID
if me->core_object->mv_qim_issue_id is not initial.
assign component 'QIM_ID' of structure cs_data to
<lv_field>.
<lv_field> = me->core_object->mv_qim_issue_id.
endif.
ev_data_changed = abap_true.
endif.
endif.
endif.
endmethod. "IPO_ZCL_EHFND_FBI_GUIBB_FORM~GET_DATA