Вы находитесь на странице: 1из 2

OVS Input Help

A further option for using the F4 input help consists of including OVS input help (OVS stands for Object Value Selection). The OVS input help is provided by a system-side Web Dynpro component that can be used by every application component (you will find more information on the subject Component-Uses in the chapter Cross-Component Programming in this documentation). After the OVS input help has been entered for a context attribute, it is automatically available for each input field that is bound to this context attribute. At runtime, the OVS component is then automatically instantiated whenever a user presses the F4 button for a selected input field or clicks the input help icon to the right of the input field in question. Also, the creation of the dialog box on the screen takes place automatically at this moment.

The System Component WDR_OVS


The component WDR_OVS provides a view in which the search results can be displayed as a table. In addition, the component gets a selection view that can be implemented to restrict the search criteria. Both the input fields of the selection view as well as the structure and the contents of the table of the results view are defined by the application used. Therefore, the OVS component must call back, at a suitable time, into the using component. Event OVS and Its Parameter OVS_CALLBACK_OBJECT The callback into the using component is implemented through the OVS event at the interface controller of the OVS component. This event is automatically triggered four times, one after the other, and it passes the parameter OVS_CALLBACK_OBJECT of the type IF_WD_OVS to the corresponding event handler in the application component. Through the instance attribute PHASE INDICATOR of the event parameter, the respective phase is transmitted: When this event is first triggered, the attribute has the value CO_PHASE_0; when it is triggered a second time, CO_PHASE_1, and so on. Below, the four target points are described in detail. PHASE_INDICATOR = IF_WD_OVS=>CO_PHASE_0 At this time, the OVS component can be configured. For example, the window title, the heading, or the column heading of the output table can be defined. In addition, you can set whether one or several rows from the event table should be selected. For this purpose, the event parameter OVS_CALLBACK_OBJECT provides the method SET_CONFIGURATION, which can be used solely at this point; calling this method at a later point triggers an error message. PHASE_INDICATOR = IF_WD_OVS=>CO_PHASE_1 If the optional selection view of the OVS component is to be used, the structure of the selection fields to be displayed must be defined in this phase and passed to the OVS component. At the same time, initial values can be passed for the selection fields. The method SET_INPUT_STRUCTURE is provided for this purpose. For this method, too, the following applies: If it is called at a later time, an error message is triggered. If the method is not called at all, the display of the selection view is not used and the event view is displayed immediately. PHASE_INDICATOR = IF_WD_OVS=>CO_PHASE_2 In this phase, the results set from the search must be determined by the component used. If values were entered on a selection view for the selection parameters, these are now available as instance attribute QUERY_PARAMETERS of the event parameter OVS_CALLBACK_OBJECT. In addition, the application component must pass the table with the values available for selection to the OVS component. This is done with the help of the method SET_OUTPUT_TABLE of the event parameter OVS_CALLBACK_OBJECT.

Calling SET_OUTPUT_TABLE is mandatory and must take place in this phase. PHASE_INDICATOR = IF_WD_OVS=>CO_PHASE_3 The result of the search was displayed in the results view of the OVS component. The user now has the option of choosing one or several rows of the table. However, the latter is only possible if multiple selection for the results table has been configured in the first phase of the run using the method SET_CONFIGURATION. In the standard configuration of the OVS component, only one row of the results table can be chosen. The content of the chosen line is then available for reading in the instance attribute SELECTION of the result parameter OVS_CALLBACK_OBJECT. Binding the Value Help to a Context Attribute To bind an OVS value help to a context attribute, the following steps are required: 1. First, you must enter a component use for the OVS component in your application component. 2. Then you must store this use on the tab page Properties in the corresponding view. 3. In the properties table of each single context attribute of the view, you now have the option of selecting the entry Object Value Selector in the row Input Help Mode. In a new table row, you will be requested to enter the component use intended for the input help. You can perform these settings already when you create the attribute. 4. In your application component, an event handler must be stored for the OVS event of the OVS component used.

Context Change Log for OVS Input Help


When you work with OVS input help, you can still use the function Context Change Log. However, you must observe the following: In the phase PHASE_INDICATOR = IF_WD_OVS=>CO_PHASE_3, the selected data must be entered explicitly in the change log table since this takes places automatically only for user inputs. You will find the necessary information for this in the chapter Context Change Log of this documentation. In addition, the package SWDP_DEMO contains an example application in your system, which you can use for orientation when programming your application.

Вам также может понравиться