Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

This Document helps you to create OVS Help for multiple inputs. 

Create WebDynpro Component with initial view and window.

Go to Component, under used component use WDR_OVS under componet with OVS Component use.

Goto view context create 2 attributes, VBELN and KUNNR.

Go to View Layout and create input fields for VBELN and KUNNR.

Go to Properties->Select input help mode to OVS and select OVS Component usage. Do the same for all attributes.

Go to Methods tab->Create OV_OVS Enent handler, by selecting Event as OVS.( What you created in First Step ).

Under ON_OVS method write sample code like below.

Sample Code :

method ON_OVS .

 
types:
   
begin of lty_stru_input,
      vbeln
type vbeln,
   
end of lty_stru_input.
 
types:
   
begin of lty_stru_list,
      vbeln
type vbeln,
   
end of lty_stru_list.

 
types:
   
begin of lty_stru_input1,
      kunnr
type kunnr,
   
end of lty_stru_input1.
 
types:
   
begin of lty_stru_list1,
      kunnr
type kunnr,
   
end of lty_stru_list1.

 
data: ls_search_input  type lty_stru_input,
        lt_select_list  
type standard table of lty_stru_list,
        ls_search_input1
type lty_stru_input1,
        lt_select_list1 
type standard table of lty_stru_list1.

 
FIELD-SYMBOLS : <ls_selection>  type lty_stru_list,
                  <ls_selection1>
type lty_stru_list1.

 
CASE ovs_callback_object->phase_indicator.

   
WHEN if_wd_ovs=>co_phase_0.
   
WHEN if_wd_ovs=>co_phase_1.
   
WHEN if_wd_ovs=>co_phase_2.

     
IF ovs_callback_object->context_attribute CS 'VBELN'.
       
SELECT vbeln
              
FROM vbak INTO TABLE lt_select_list
              
WHERE ernam = sy-uname.
        ovs_callback_object->set_output_table(
output = lt_select_list ).

     
ELSEIF ovs_callback_object->context_attribute CS 'KUNNR'.
       
SELECT kunnr
              
FROM kna1 INTO TABLE lt_select_list1
              
WHERE ernam = sy-uname.
        ovs_callback_object->set_output_table(
output = lt_select_list1 ).
     
ENDIF.

   
WHEN if_wd_ovs=>co_phase_3.

     
IF ovs_callback_object->context_attribute CS 'VBELN'.
       
ASSIGN ovs_callback_object->selection->* TO <ls_selection>.
       
IF <ls_selection> IS ASSIGNED.
          ovs_callback_object->context_element->set_attribute(
                                 name  =
`VBELN`
                                
value = <ls_selection>-vbeln ).
       
ENDIF.
     
ENDIF.
     
IF ovs_callback_object->context_attribute CS 'KUNNR'.
       
ASSIGN ovs_callback_object->selection->* TO <ls_selection1>.
       
IF <ls_selection1> IS ASSIGNED.
          ovs_callback_object->context_element->set_attribute(
                                 name  =
`KUNNR`
                                
value = <ls_selection1>-kunnr ).
       
ENDIF.
     
ENDIF.
 
ENDCASE.


endmethod.

Labels in this area