cancel
Showing results for 
Search instead for 
Did you mean: 

How to Get Search option in Select_options OVS

Former Member
0 Kudos


Hi,

i've done select_options for one field and implemented OVS for it. but in that Phase-1 this follwoing code is giving dump.

i refered all documents but there all are comented this phase.

    WHEN IF_WD_OVS=>CO_PHASE_1. "Search option

*         if I_OVS_DATA-M_OVS_CALLBACK_OBJECT->CONTEXT_ELEMENT IS NOT INITIAL.

*         I_OVS_DATA-M_OVS_CALLBACK_OBJECT->CONTEXT_ELEMENT->GET_STATIC_ATTRIBUTES(

*           IMPORTING

*             STATIC_ATTRIBUTES = ls_input_search   ).

*         endif.

Regards,

Jack.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

To display search structure simply use,

  i_ovs_data-m_ovs_callback_object->set_input_structure(

           input = ls_search_input ).



Regards,

Kiran

Former Member
0 Kudos

Hi,

Search option is came but search action how it will work.

former_member184578
Active Contributor
0 Kudos

Hi,

Search option is came but search action how it will work.

What do you mean by how it will work? 

If you mean to get the result based on the values entered in search structure, In Phase 2, <ls_query_params> contains the entered input value

write the below code in Phase 2,


ASSIGN i_ovs_data-m_ovs_callback_object->query_parameters->*

                              TO <ls_query_params>.

      IF NOT <ls_query_params> IS ASSIGNED.

      * raise error

     ENDIF.

      replace all occurrences of '*' in <ls_query_params>-FIELD with '%'. " here FIELD is name of field in "search structure

     select FIELD from <DB_TAB> into table lt_select_list where FIELD like <ls_query_params>-FIELD.

      ovs_callback_object->set_output_table( output = lt_select_list ).

hope this helps,

Regards,

Kiran

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks Kiran.

Problem solved.