Experiment with FPM_SEARCH_UIBB
This demo covers small experiment I did with FPM_SEARCH_UIBB in Floor plan manager. We got quite a few requirements in which we have to extract data, generate list output and provide ALV features (like sort, filter, excel download etc).
To quickly deliver them, I have developed a framework which generates the selection criteria fields, validates them in common feeder class, provides F4 functionality, saving variants etc..
- Reports Configuration table : This table holds fields required as search criteria and their properties. Structure of this table is discussed in short while.
- Common Search Feeder class
- Component configuration created for FPM_SEARCH_UIBB
- SAP Note for Auto collapse feature on selection screens
1. Reports Configuration table – This drives the selection criteria generation.
Note : Selection criteria fields related to multiple reports are maintained against Application configuration. Data in this table is consumed by the feeder class and selection screen is generated.
|APPLICATION_CONFIG||Application configuration created for report|
|SEQUENCE_NUM||Sequence of Fields|
|NAME||Name of the field|
|FIELD_LABEL||Label of the field on selection screen|
|IS_OF_TYPE||Field can be Date, Numeric, Text or Enumerated (controlling operators on selection screen. For instance, ‘is between’ is logical for date and numeric fields )|
|MANDATORY||Required if checked|
|MAX_1_VALUE||If checked, field accepts multiple values|
|VAL_METHOD_NAME||Method in common search feeder which validates the field|
|MESSAGE_NUM||If validation fails in above method, message will be displayed|
|DDIC_SHLP_NAME||DDIC search help name|
|OVS_NAME||For some fields, OVS is used to provide search help|
|OVS_METHOD_NAME||Method name in common search feeder|
|WD_VALUE_HELP||For position field, WD component ERC_C_SEARCH_POSITION_UI is used to provide search help|
|DEFAULT_OP||Default operator is set for the field. For example, ’10 – is between’ is set for date fields|
|DOMAIN_NAME||Used for enumerated fields, to fill drop down values|
|TABLE_NAME||Used for enumerated fields, to fill drop down values|
|FIELD_NAME||Used for enumerated fields, to fill drop down values|
2. Common Search Feeder classZCL_ER_COMMON_SEARCH_FEEDER
When application is executed for the first time, INITIALIZE and GET_DEFAULT_CONFIG methods will get triggered. For any user actions after that, methods FLUSH, GET_DEFINITION, PROCESS_EVENT and GET_DATA will trigger in sequence.
Functionality of the methods in feeder class:
a. Method INITIALIZE: Capture the Application configuration of the report being executed
b. Method GET_DEFAULT_CONFIG : Add attributes from Reports configuration table and make layout settings
Note : This method can be used to configure the UIBB and its properties from feeder class dynamically instead of making static settings in component configuration
c. Method GET_DEFINITION : Field catalog is populated, special groups are defined and other field attributes are populated. Highlighted statement will help us store variants specific to reports.
d. Method SET_FIELD_CATALOG : Populates field catalog dynamically
Note : Field catalog is populated from the fields maintained in the Reports config table discussed in step 1
e. Method SET_FIELD_ATTRIBUTES : Field attributes are set based on reports config table
f. Method GET_DATA : Defaulting the date fields on the reports
g. Method PROCESS_EVENT : Before triggering the list feeder class to extract data, all the fields will be validated in this method.
- VALIDATE_NUMBERIC_FIELDS [Again, this is dynamic method which validates numeric fields on all reports]
In below screenshot, method name comes from reports configuration table
After all validations, Selection parameters and other inputs are transferred to list feeder class.
h. Important Interfaces used in this feeder class:
- IF_FPM_FEEDER_MODEL : Used for establishing wiring between two UIBBs
- IF_FPM_GUIBB_OVS_SEARCH : Capture the changes on selection screen
3. Component configuration ZER_CC_COMMON_SEARCH_UIBB created for FPM_SEARCH_UIBB
All the settings and adding attributes are all controlled in feeder class only. No changes are required in this component.
Whenever we create new configuration, just add above component configuration in it.
4. SAP Note for Auto collapse feature on selection screens
2413245 – SelectOptions20: Change copy/paste behavior for more than 20 entries
For any kind of clarifications or queries, Please get in touch with me on firstname.lastname@example.org