cancel
Showing results for 
Search instead for 
Did you mean: 

OVS help for Select-option

Former Member
0 Kudos

Hi all,

how to create OVS help for select options..

Kindly help me with sample coding..

Thanks & Regards,

Senthil

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi!,

This post was very helpful for me.

But I´m still having some problems I´d like to know if you have the same or not.

After phase = 3, I don´t have complete the "select-option" data, I mean, I have no green icon beside the input field. I´ve got it when the user press another input help, or another field... and so on.

Does any expert know how to solve this problem?.

Thank you very much for your help

Former Member
0 Kudos

Hi all,

I'm not getting it...

Can anyone give the complete code for this for both init method & ovs method.....

Thanks

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

First include the component WDR_SELECT_OPTIONS in the USED COMPONENTS.

The code to be written in WDDOINIT.

DATA :lo_cmp_usage TYPE REF TO if_wd_component_usage.

DATA :lt_range_table TYPE REF TO data,

read_only TYPE abap_bool.

lo_cmp_usage = wd_this->wd_cpuse_select_options1( ).

IF lo_cmp_usage->has_active_component( ) IS INITIAL.

lo_cmp_usage->create_component( ).

ENDIF.

wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options1( ).

wd_this->m_handle = wd_this->m_wd_select_options->init_selection_screen( ).

CALL METHOD wd_this->m_handle->set_global_options

EXPORTING

i_display_btn_cancel = abap_false

i_display_btn_execute = abap_false.

lt_range_table = wd_this->m_handle->create_range_table(

i_typename = '/MRSS/T_RMOR_CANDIDATE_ORG_UNI' ).

wd_this->m_handle->add_selection_field(

i_description = 'Candidate-Org Unit'

i_id = '/MRSS/T_RMOR_CANDIDATE_ORG_UNI'

i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_OVS

i_value_help_id = '/MRSS/SH_RM_ORG_GROUP' "NAME OF OVS SEARCH HELP

it_result = lt_range_table

i_read_only = read_only ).

Regards,

Priya

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

For the OVS method the code to be written :

Now go to Methods tab of the View

add a method say ON_OVS change the method type to Event Handler and in 4th column(Event) select F4, you can see the Events available for Select Option Used Component, select ON_OVS event.

Inside the ON_OVS event handler code as you code for typical OVS, here youwill not get OVS_CALLBACK_OBJECT directly, if you want input screen you can code in phase indicator 0 and 1.

I_OVS_DATA is the importing parameter which you get automatically for the method.

data: ovs_callback_object type ref to if_wd_ovs.

TYPES: BEGIN OF T_CHAR1,

CHAR1 TYPE CHAR1,

TEXT TYPE STRING,

END OF T_CHAR1.

DATA: LS_CHAR1 TYPE T_CHAR1.

DATA: LT_CHAR1 TYPE TABLE OF T_CHAR1.

data: lt_result type table of char1.

data: lv_char1 type char1.

field-symbols: <selection> like ls_char1,

<lt_result> type standard table,

<result> type char1.

ovs_callback_object = i_ovs_data-m_ovs_callback_object.

case ovs_callback_object->phase_indicator.

when if_wd_ovs=>co_phase_2.

LS_CHAR1-CHAR1 = '1'.

LS_CHAR1-TEXT = 'fIRST option'.

append ls_char1 to lt_char1.

LS_CHAR1-CHAR1 = '2'.

LS_CHAR1-TEXT = 'second option'.

append ls_char1 to lt_char1.

ovs_callback_object->set_output_table( output = lt_char1 ).

when if_wd_ovs=>co_phase_3.

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

assign <selection>-char1 to <result>.

assign i_ovs_data-mt_selected_values->* to <lt_result>.

append <result> to <lt_result>.

endcase

Regards,

Priya

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You can refer below thread .

[;

Regards,

Priya

Former Member
0 Kudos

hi,

In your compoennet make the OVS search help .

For OVS Search help refer Standard Component : Demo_value_help.

Now to attach the OVS Search help to Select options use this :

wd_this->m_handler->add_selection_field(

i_id = 'S_CARR_ID'

it_result = lt_range_table

i_read_only = read_only

i_obligatory = 'X'

I_NO_INTERVALS = 'X'

I_NO_EXTENSION = 'X'

I_VALUE_HELP_ID = 'Z3AF_HCP_SEARCHHELP'

I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_OVS

).

I_VALUE_HELP_ID -- Give name of OVS Search help here.('Z3AF_HCP_SEARCHHELP')

I_VALUE_HELP_TYPE requires a string, various attributes of IF_WD_VALUE_HELP_HANDLER which can be used :

Various options for i_value_help_type are :

CO_PREFIX_SEARCHHELP

CO_PREFIX_OVS

CO_PREFIX_APPLDEV

CO_PREFIX_NONE

CO_PREFIX_AUTO

Former Member
0 Kudos

Hi saurav,

this is fine... i did this..

the problem is with the coding in ovs part... its working for normal input field... but throwing dump for select option.

dump is 'Methode SET_OUTPUT_TABLE Cannot Be Called '...

can u give the code for ovs help for select option...

Thks

Former Member
0 Kudos

check out this blog on OVS :

/people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap

Former Member
0 Kudos

hi,

Refer this thread :

hi Karan,

Refer this thread :

Answer with code by Vishal.

The problem would have been the wrong place where you have written the code .

Code has to be written in ON_OVS Event Handle ON_OVS INTERFACECONTROLLER SELECT_OPTIONS

Edited by: Saurav Mago on Oct 27, 2009 1:02 PM