Show TOC

Background documentationOVS Value Help Locate this document in the navigation structure

 

One way of using F4 input help is to include an OVS value help (Object Value Selection). The OVS value help is implemented by a system-side Web Dynpro component that can be used by every application component (you can find more information about component uses in section Cross-Component Programming in this documentation).

After the OVS value help has been entered for a context attribute, it is automatically available for each InputField bound to this context attribute. At runtime, the OVS component is then automatically instantiated whenever a user presses the F4 button for a selected InputField or clicks the value help icon next to the InputField in question. At the same time, the dialog box is also created automatically on the screen.

System Component WDR_OVS

Component WDR_OVS provides a view in which the search results can be displayed as a table. The component also contains a selection view that can be used to restrict the search criteria.

Both InputFields of the selection view as well as the structure and the contents of the table of the results view resulting from this restriction are defined by the application used. The OVS component therefore needs to call back to the using component at a suitable time.

Event OVS and its Parameter OVS_CALLBACK_OBJECT

The callback to 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 . It passes parameter OVS_CALLBACK_OBJECT of type IF_WD_OVS to the corresponding event handler in the application component. The phase is determined from instance attribute PHASE_INDICATOR of the event parameter. When the event is first triggered the attribute has value CO_PHASE_0, when it is triggered the second time, CO_PHASE_1 and so on. The four time points are described in detail below.

This graphic is explained in the accompanying text.

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. Method SET_INPUT_STRUCTURE is provided for this purpose. The following rules applies to this method too: If it is called at a different time point, 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.

The application component also has to pass the table with the values available for selection to the OVS component. This is implemented using method SET_OUTPUT_TABLE of 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 can now select one or several rows from the table. However, the latter is only possible if multiple selection for the results table was configured in the first phase of the process, using method SET_CONFIGURATION. In the standard configuration of the OVS component, only one row of the results table can be selected. The content of the selected row is then available for reading in the instance attribute SELECTION of the event parameter OVS_CALLBACK_OBJECT.

Binding the Value to a Context Attribute

To bind an OVS value help to a context attribute, follow the steps below:

  1. Enter a component use for the OVS component in your application component.

  2. Specify the use also on the Property tab page of the view in question.

  3. In the properties table of each single context attribute of the view, you can now select entry Object Value Selector in the row Value Help Mode. In a new row in the property table, you need to enter the component use intended for the value help.

    You can make these settings when creating the attribute.

  4. For your application component view, an event handler has to be created for the OVS event of the OVS component used. The system supports you here by automatically generating a source text template when the handler method is assigned to the OVS event.

Context Change Log for OVS Value Help

When you work with an OVS value help you can still use the function Context Change Log. Note that:

In phase PHASE_INDICATOR = IF_WD_OVS=>CO_PHASE_3, the selected data must be entered explicitly in the change log table, as this only takes places automatically for user inputs. Package SWDP_DEMO also contains an example application DEMO_VALUE_HELP in your system. You can use this to help you find your way while programming your application.