Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8078

Re: Reusing single OVS in WD component for various purposes

$
0
0

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


Viewing all articles
Browse latest Browse all 8078

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>