on 10-27-2009 6:44 AM
Hi all,
how to create OVS help for select options..
Kindly help me with sample coding..
Thanks & Regards,
Senthil
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
I'm not getting it...
Can anyone give the complete code for this for both init method & ovs method.....
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.