cancel
Showing results for 
Search instead for 
Did you mean: 

Retrive the value from OVS

former_member186020
Participant
0 Kudos

hi friends,

Actually i am using WD_SELECT_OPTIONS and i am also using ON_OVS event of the component to enable mulitple select .

My Problem is that i want to retrive the value which is entered manually by the user inside the ON_OVS event..

The code which i have written is:------



DATA:
    lt_prg          TYPE zpr_t_program,
    lv_searchstring TYPE string.
  FIELD-SYMBOLS:
    <lt_prg>                     LIKE lt_prg,
    <ls_prg>                    LIKE LINE OF <lt_prg>,
    <lt_sel_opt_result>   TYPE STANDARD TABLE,
    <lv_field>                  TYPE data,
    <lv_parameter>        TYPE zpr_program.

  CASE i_ovs_data-m_ovs_callback_object->phase_indicator.
    WHEN if_wd_ovs=>co_phase_0.
      i_ovs_data-m_ovs_callback_object->set_configuration( col_count  = 1
                                                                                table_multi_select = abap_true ).

    WHEN if_wd_ovs=>co_phase_1.
      "No Action
    WHEN if_wd_ovs=>co_phase_2.
      
      ASSIGN i_ovs_data-m_ovs_callback_object->query_parameters->* TO <lv_parameter>.
      IF <lv_parameter> IS ASSIGNED.
        "lv_searchstring = <lv_parameter>.
      ENDIF.
      i_ovs_data-m_ovs_callback_object->set_output_table( output = lt_prg ).

    WHEN if_wd_ovs=>co_phase_3.

      ASSIGN i_ovs_data-m_ovs_callback_object->selection->* TO <lt_prg>.
      ASSIGN i_ovs_data-mt_selected_values->* TO <lt_sel_opt_result>.
      LOOP AT <lt_prg> ASSIGNING <ls_prg>.
        ASSIGN COMPONENT 'INT_PRG_NAME_UC' OF STRUCTURE <ls_prg> TO <lv_field>.
        INSERT <lv_field> INTO TABLE <lt_sel_opt_result>.
      ENDLOOP.
  ENDCASE

I want to retrive the value inside co_phase_2.

Please help.

Thanks in advance...

Vishesh.

Edited by: Neil Gardiner on Dec 1, 2010 8:41 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

>

> WHEN if_wd_ovs=>co_phase_2.

>

> ASSIGN i_ovs_data-m_ovs_callback_object->query_parameters->* TO <lv_parameter>.

> IF <lv_parameter> IS ASSIGNED.

> "lv_searchstring = <lv_parameter>.

> ENDIF.

> i_ovs_data-m_ovs_callback_object->set_output_table( output = lt_prg ).

>

> I want to retrive the value inside co_phase_2.

.

Hi,

Do you mean to say "how to get the value of <lv_parameter> ?"

see a similar example in wdr_test_ovs component

former_member186020
Participant
0 Kudos

hi,

I want to get the value of "query_parameter" i.e. the value which is manually entered by the user.

thanks,

Vishesh

Former Member
0 Kudos

>

Field-symbols:

<lv_parameter> TYPE zpr_program

ASSIGN i_ovs_data-m_ovs_callback_object->query_parameters->* TO <lv_parameter>.

IF <lv_parameter> IS ASSIGNED.

"lv_searchstring = <lv_parameter>.

ENDIF.

Hi, Your field symbol <lv_parameter> of type zpr_program holding the value.

i do not know what kind structure you have inside this zpr_program.

You can query the entered value by

IF <lv_parameter> IS ASSIGNED.

lv_searchstring = <lv_parameter>-zpr_program structure attribute.

ENDIF.

ps : zpr_program structure attribute is the actual attribute you have defined as structure field.