ovs input help

Upload: lathap2007

Post on 05-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 OVS Input Help

    1/2

    OVS Input HelpA further option for using the F4 input help consists of including OVS input help (OVS stands forObject Value Selection). The OVS input help is provided by a system-side Web Dynprocomponent that can be used by every application component (you will find more information on thesubject Component-Uses in the chapterCross-Component Programming in this documentation).

    After the OVS input help has been entered for a context attribute, it is automatically available foreach input field that is bound to this context attribute. At runtime, the OVS component is thenautomatically instantiated whenever a user presses the F4 button for a selected input field or clicksthe input help icon to the right of the input field in question. Also, the creation of the dialog box onthe 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 atable. In addition, the component gets a selection view that can be implemented to restrict thesearch criteria.

    Both the input fields of the selection view as well as the structure and the contents of the table ofthe 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 interfacecontroller of the OVS component. This event is automatically triggered four times, one after theother, and it passes the parameter OVS_CALLBACK_OBJECT of the type IF_WD_OVS to thecorresponding event handler in the application component. Through theinstance attribute PHASEINDICATOR of the event parameter, the respective phase is transmitted: When this event is firsttriggered, 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 orseveral rows from the event table should be selected. For this purpose, the event parameterOVS_CALLBACK_OBJECT provides the method SET_CONFIGURATION, which can be usedsolely 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 selectionfields to be displayed must be defined in this phase and passed to the OVS component. At thesame time, initial values can be passed for the selection fields. The methodSET_INPUT_STRUCTURE is provided for this purpose. For this method, too, the followingapplies: 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 valueswere entered on a selection view for the selection parameters, these are now available as instanceattribute QUERY_PARAMETERS of the event parameter OVS_CALLBACK_OBJECT.

    In addition, the application component must pass the table with the values available for selection tothe OVS component. This is done with the help of the method SET_OUTPUT_TABLE of the eventparameter OVS_CALLBACK_OBJECT.

    http://help.sap.com/saphelp_scm50/helpdata/en/0e/496ad66c601349a730502d3ea26e05/content.htmhttp://help.sap.com/saphelp_scm50/helpdata/en/a7/1d8b412bb5b35fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_scm50/helpdata/en/30/d7fa41c915da6fe10000000a1550b0/frameset.htmhttp://help.sap.com/saphelp_scm50/helpdata/en/a7/1d8b412bb5b35fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_scm50/helpdata/en/0e/496ad66c601349a730502d3ea26e05/content.htm
  • 8/2/2019 OVS Input Help

    2/2

    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 nowhas 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 themethod SET_CONFIGURATION. In the standard configuration of the OVS component, only onerow of the results table can be chosen. The content of the chosen line is then available for readingin 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 applicationcomponent.

    2. Then you must store this use on the tab pageProperties 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 Selectorin the row Input Help Mode. In a new tablerow, you will be requested to enter the component use intended for the input help. You canperform these settings already when you create the attribute.

    4. In your application component, an event handler must be stored for the OVS event ofthe 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 beentered 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 chapterContext Change Logof this

    documentation. In addition, the package SWDP_DEMO contains an example application in yoursystem, which you can use for orientation when programming your application.

    http://help.sap.com/saphelp_scm50/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_scm50/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_scm50/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_scm50/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_scm50/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_scm50/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/content.htm