cancel
Showing results for 
Search instead for 
Did you mean: 

Reusing single OVS in WD component for various purposes

Former Member
0 Kudos

Hi,

I want to create some custom search helps for three to four fields in my WD Application.

For achieving this i am using OVS component but i don't want to use 3 or 4 OVS components.

I want to use 1 OVS component and do the code modifications according to the field values.

To say simply Reusing the OVS component.

Thanks

Vamsi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please refer to this document for detailed explanation on how to reuse the same ovs for multiple fields.

http://scn.sap.com/docs/DOC-41319

Former Member
0 Kudos

Hi VR.

This is achievable. OVS has four phase, 0,1,2 3. In Phase 2, you have the data selection. In the OVS event handler, you get the field name, based on which you can have four different method call in phase 2 for four fields.

Here is Sample code:

DATA lv_par_list TYPE wdr_event_parameter.

  FIELD-SYMBOLS <lv_field_sel> TYPE ANY.

* Get the details of the field properties on which the F4 is requested

  READ TABLE wdevent->parameters INTO lv_par_list

     WITH KEY name = 'OVS_CONTEXT_ATTRIBUTE'.

  ASSIGN lv_par_list-value->* TO <lv_field_sel>.

* Check the field name for F4 and call the corresponding module

  CASE <lv_field_sel>.

    WHEN 'SH_CATEGORY_ID'.                         " For Category ID

      wd_this->onactioncall_category_id_ovs(

        ovs_callback_object = ovs_callback_object  " ref to if_wd_ovs

        wdevent =     wdevent                      " ref to cl_wd_custom_event

      ).

Thanks

Angshuman