cancel
Showing results for 
Search instead for 
Did you mean: 

OVS value not getting populated in field

Former Member
0 Kudos


Hi Experts,

Kindly suggest me a solution for the below given issue.

I have added three custom fileds to an already existing WD Coponent.

And also added OVS help as an input help method to these fields.

If I right click on the WD application and TEST, the application opens in browser and I am able to select the value from OVS list.

If I run the application by copying the URL and paste it in the browser, or clicking on Portal link, if we select the value from OVS list that value is not getting populated in the field.

Below is the logic I have written.

method ON_OVS_PAYMENT .

TYPES:   BEGIN OF ty_payment,

             payment
TYPE char4,

             desc   
TYPE char30,

          
END OF ty_payment.


* declare data structures for the fields to be displayed and
* for the table columns of the selection list, if necessary

 
types:

   
begin of lty_stru_input,
*   add fields for the display of your search input here

      payment
type char4,
*      desc    type string,

   
end of lty_stru_input.

 
types:

   
begin of lty_stru_list,
*   add fields for the selection list here

      payment
type char4,

      desc   
type char30,

   
end of lty_stru_list.



 
data: ls_search_input  type lty_stru_input,

        lt_select_list  
type standard table of lty_stru_list,

        ls_text         
type wdr_name_value,

        lt_label_texts  
type wdr_name_value_list,

        lt_column_texts 
type wdr_name_value_list,

        lv_window_title 
type string,

        lv_group_header 
type string,

        lv_payment      
type string,

        lt_payment      
TYPE TABLE OF ty_payment,

        ls_payment      
TYPE ty_payment,

        lv_short        
TYPE string,

        lv_table_header 
type string.



 
field-symbols: <ls_query_params> type lty_stru_input,

                 <ls_selection>   
type lty_stru_list.



 
case ovs_callback_object->phase_indicator.



   
when if_wd_ovs=>co_phase_0"configuration phase, may be omitted
*   in this phase you have the possibility to define the texts,
*   if you do not want to use the defaults (DDIC-texts)



      ls_text
-name = `PAYMENT`"must match a field name of search

      ls_text
-value = `Terms of payment`. "wd_assist->get_text( `001` ).

     
insert ls_text into table lt_label_texts.



      ls_text
-name = `PAYMENT`"must match a field in list structure

      ls_text
-value = `Terms of Payment`. "wd_assist->get_text( `002` ).

     
insert ls_text into table lt_column_texts.

      ls_text
-name = `DESC`"must match a field in list structure

      ls_text
-value = `Description`. "wd_assist->get_text( `002` ).

     
insert ls_text into table lt_column_texts.



      ovs_callback_object
->set_configuration(

                label_texts 
= lt_label_texts

                column_texts
= lt_column_texts

                group_header
= lv_group_header

                window_title
= lv_window_title

                table_header
= lv_table_header

                col_count   
= 2

                row_count   
= 20 ).





   
when if_wd_ovs=>co_phase_1.

      ovs_callback_object
->context_element->get_static_attributes(

         
importing static_attributes = ls_search_input ).
*     pass the values to the OVS component

      ovs_callback_object
->set_input_structure(

         
input = ls_search_input ).





   
when if_wd_ovs=>co_phase_2.

     
if ovs_callback_object->query_parameters is not bound.
******** TODO exception handling

     
endif.

     
assign ovs_callback_object->query_parameters->*

                             
to <ls_query_params>.

     
if not <ls_query_params> is assigned.
******** TODO exception handling

     
endif.


*     call business logic for a table of possible values
*     lt_select_list = ???

      lv_short
= <ls_query_params>-payment.

     
CALL FUNCTION 'ZSIILESD001' DESTINATION 'LOGICALE22'

     
EXPORTING

      i_payment            
= lv_short

     
TABLES

      ET_PAYMENT           
= lt_payment.



    lt_select_list[]
= lt_payment[].

      ovs_callback_object
->set_output_table( output = lt_select_list ).





   
when if_wd_ovs=>co_phase_3.
*   apply result



     
if ovs_callback_object->selection is not bound.
******** TODO exception handling

     
endif.



     
assign ovs_callback_object->selection->* to <ls_selection>.

     
if <ls_selection> is assigned.

        ovs_callback_object
->context_element->set_attribute(

                               name 
= `PAYMENT`

                              
value = <ls_selection>-payment ).

     
endif.

 
endcase.


endmethod.

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Pradeep,

I don't think it really make any difference to the application run if we run from SE80 or run via application url.

Try to set the external break point in OVS PHASE3 for your user. Check if the break point is reached and data is set after selection from OVS.

Regards,

Rama