let's create a FORM Repeater UIBB feeder class in Tx- SE24.
Implement the interfaces : IF_FPM_GUIBB and IF_FPM_GUIBB_FORM_REPEATER.
Activate all the methods and implement the below two methods : GET_DEFINITION & GET_DATA.
Put the below code in GET_DEFINITION method.
DATA: lr_strucdescr TYPE REF TO cl_abap_structdescr,
lt_fields TYPE ddfields,
ls_fields TYPE LINE OF ddfields.
lt_fields TYPE ddfields,
ls_fields TYPE LINE OF ddfields.
eo_field_catalog ?= cl_abap_tabledescr=>describe_by_name( 'SPFLI_TAB' ).
lr_strucdescr ?= eo_field_catalog->get_table_line_type( ).
lt_fields = lr_strucdescr->get_ddic_field_list( p_including_substructres = abap_true ).
lr_strucdescr ?= eo_field_catalog->get_table_line_type( ).
lt_fields = lr_strucdescr->get_ddic_field_list( p_including_substructres = abap_true ).
LOOP AT lt_fields INTO ls_fields.
APPEND INITIAL LINE TO et_field_description ASSIGNING FIELD-SYMBOL(<fs_field_descr>).
<fs_field_descr>-name = ls_fields-fieldname.
CASE <fs_field_descr>-name.
WHEN 'CARRID'.
<fs_field_descr>-allow_grouping = abap_true.
SELECT
carrid AS value
carrname AS text
FROM scarr INTO CORRESPONDING FIELDS OF TABLE <fs_field_descr>-fixed_values.
ENDCASE.
ENDLOOP.
APPEND INITIAL LINE TO et_field_description ASSIGNING FIELD-SYMBOL(<fs_field_descr>).
<fs_field_descr>-name = ls_fields-fieldname.
CASE <fs_field_descr>-name.
WHEN 'CARRID'.
<fs_field_descr>-allow_grouping = abap_true.
SELECT
carrid AS value
carrname AS text
FROM scarr INTO CORRESPONDING FIELDS OF TABLE <fs_field_descr>-fixed_values.
ENDCASE.
ENDLOOP.
Put the below code in GET_DATA method.
CASE IO_EVENT->mv_event_id.
WHEN 'FPM_START'.
SELECT * FROM SPFLI INTO TABLE GT_SPFLI.
CT_DATA = GT_SPFLI.
EV_DATA_CHANGED = ABAP_TRUE.
WHEN OTHERS.
ENDCASE.
WHEN 'FPM_START'.
SELECT * FROM SPFLI INTO TABLE GT_SPFLI.
CT_DATA = GT_SPFLI.
EV_DATA_CHANGED = ABAP_TRUE.
WHEN OTHERS.
ENDCASE.
Create an attribute.
Create a component configuration of the - FPM_FORM_REPEATER_UIBB .
Provide the configuration name. Save in the desired package.
Provide the feeder class name.
In general settings choose the SEPARATOR, Group Field.
Add necessary fields of the SPFLI table as element. Save the UIBB configuration.
rearrange the fields in the preview section as desired.
Now we have to create an OVP Application, application configuration and ovp component configuration. So execute Tx- FPM_WB.
Choose the highlighted link.
Provide application name, floor plan as - overview page and application configuration name and floor plan configuration name. Click Next button.
Save it.
Choose Edit Configuration link.
Provide title and choose FORM REPEATER COMPONENT.
Provide form repeater component name.
Save and then test the application.
Test the application.
So here we have the application looks like as below:
No comments:
Post a Comment