In this example Quick view is used to
display customer details.
Prerequisites: Need a Form UIBB which
display customer ID (KNA1-KUNNR).
If you need steps to crate form UIBB click
on below link.
Implementation of Feeder class:
- Create a new class and add interface IF_FPM_GUIBB_QV_THING
- Create empty implementations for methods FLUSH, PROCESS_EVENT, GET_DEFAULT_CONFIG, CHECK_CONFIG, INITIALIZE and GET_PARAMETER_LIST
- Create a type and a data object for storing the displayed data
private section.
TYPES: BEGIN OF ty_st,
kunnr TYPE kunnr,
name1 TYPE name1_gp,
name2 TYPE name2_gp,
ort01 TYPE ort01_gp,
END OF ty_st .
kunnr TYPE kunnr,
name1 TYPE name1_gp,
name2 TYPE name2_gp,
ort01 TYPE ort01_gp,
END OF ty_st .
- GET_DEFINITION Implementation:
DATA: ls_data TYPE ty_st,
ls_field_description TYPE fpm_qv_thing_field_description.
eo_field_catalog ? = cl_abap_structdescr=>describe_by_data( ls_data ).
es_options-title_ref = 'KUNNR'.
ls_field_description TYPE fpm_qv_thing_field_description.
eo_field_catalog ? = cl_abap_structdescr=>describe_by_data( ls_data ).
es_options-title_ref = 'KUNNR'.
- GET_DATA Implementation:
Iv_key contain customer
id i.e KUNNR
DATA: ls_data TYPE ty_st.
SELECT SINGLE kunnr name1 name2 ort01 FROM kna1 INTO ls_data WHERE kunnr = iv_key.
IF sy-subrc = 0.
cs_data = ls_data.
ev_data_changed = abap_true.
ENDIF.
SELECT SINGLE kunnr name1 name2 ort01 FROM kna1 INTO ls_data WHERE kunnr = iv_key.
IF sy-subrc = 0.
cs_data = ls_data.
ev_data_changed = abap_true.
ENDIF.
Creating configuration:
- Open form UIBB configuration and create Quickview by selecting Thing component
- Enter new configuration ID and click on configure Quickview
- Popup will display to create new configuration ID, Click on yes and create configuration ID.
After save enter Feeder class which is created using above
step.
- Select attribute which you need to display on the Quick view.
- Save.
- Now go back to the form UIBB and select attribute for which you need attach quick view.
Select Quickview ID which you created and save.
- Output
when use mouse over on customer id it will display
the customer details (Quick view).
No comments:
Post a Comment