The post creates a search UIBB in an OVP floorplan. The Search UIBB contains two search fields CARRID & CONNID. By defualt F4 helps comes for CARRID field but there is no F4 help is there for CONNID field. Now the task is to enable the F4 option for the CONNID field. In case any CARRID field is filled, then the F4 option for the CONNID should only bring the dependent CONNID values.
The task can be divided into 3 parts.
- Create a search UIBB for CARRID & CONNID field.
- Enabling F4 option for CONNID by OVS technique by implementing the interface IF_FPM_GUIBB_OVS
- Getting the dependent CONNID value based on CARRID value by implementing the interface IF_FPM_GUIBB_OVS_SEARCH
Create a feeder class for search UIBB.
Activate all method and implement the GET_DEFINITION method.
Put the below code.
Create an OVP application by using Tx- FPM_WB.
Add & create a search uibb configuration.
Provide the Feeder class.
Add only two fields CARRID & CONNID. Save & test the application.
So here is how the search uibb ovp application looks like. F4 automatically comes for CARRID field.
The the 2nd task is to enable the F4 option for the CONNID field.
To enable the F4 by ovp we need to implement interface IF_FPM_GUIBB_OVS and to enable dependent searched we need to implement IF_FPM_GUIBB_OVS_SEARCH.
The interface IF_FPM_GUIBB_OVS_SEARCH also added the interface IF_FPM_GUIBB_OVS. Then if we add interface IF_FPM_GUIBB_OVS_SEARCH its enough for our task.
Go to the feeder class and implement the interface IF_FPM_GUIBB_OVS_SEARCH.
Go to the GET_DEFINITION method.
Put below additional steps to enable F4 help option for CONNID field.
Now test the application. Here the F4 help option appears for the CONNID field.
Now the next step is to show dependent search functionality.
Create an attribute.
The method SET_CURRENT_SEARCH_CRITERIA provides the already filled search attribute value.
Store the search table in global search table.
Go to the HANDLE_PHASE_2 method. This method helps to select all the records that would be displayed on the F4 list.
Here we get the CARRID value if it is filled and based on this CONNID values are selected from DB table. If CARRID value is not provided we select all CONNID values from the DB table.
Now once the user selects any row, that CONNID value should appear in the search field.
Put the below code.
Now test the application. Do nor fill CARRID value. Press F4 for CONNID field.
It displays all the CONNID values . Select any.
The selected value appears on the field.
Test one more time. Fill any value for the CARRID from F4 option.
Now press F4 for CONNID field.
So here it only displays CONNID values for the given CARRID value as LH.
Thanks for the good post. I applied in my development it worked fine. I got an issue in this.
From the 1st test case mentioned
Airline – JL and Flight no: 0407 is selected.
But return sets only Flight no is set not the Airline.
I need to set Airline too. I tried, but didn’t reach the solution.