on 06-24-2008 10:03 AM
Hi All,
i have to give the select-options for one field(Patient_id) which is not having any search help in dictionary.
plz help me to use OVS in Select -Options......
Thanks in Advance,
Ravi
>
> Hi All,
>
> i have to give the select-options for one field(Patient_id) which is not having any search help in dictionary.
>
> plz help me to use OVS in Select -Options......
>
> Thanks in Advance,
> Ravi
Look at the parameter interface of the method add_selection_field (IF_WD_SELECT_OPTIONS). There are several parameters for dynamically attaching a different type of search help to a select-option. Look at I_VALUE_HELP_TYPE, I_VALUE_HELP_ID, I_VALUE_HELP_MODE, etc. This will allow you to attach an OVS to a select-option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This will be helpful
Abhi
Edited by: Abhimanyu Lagishetti on Jun 24, 2008 11:45 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi
>
> This will be helpful
>
> Abhi
>
> Edited by: Abhimanyu Lagishetti on Jun 24, 2008 11:45 AM
That is a nice document on Select-Options in general, but I don't see anything in it related to this question. There is example of how to link to value help or OVS. Is there something I am missing?
Hi
In WDDOINIT code as follows to get a select option
data: lr_select_options type ref to iwci_wdr_select_options.
data: lr_cpuse type ref to if_wd_component_usage.
DATA: LR_HELPER TYPE REF TO IF_WD_SELECT_OPTIONS.
DATA: LR_TABLE TYPE REF TO DATA.
lr_cpuse = wd_this->wd_CpUse_Select_Options( ).
if lr_cpuse->has_active_component( ) = abap_false.
lr_cpuse->create_component( ).
endif.
lr_select_options = wd_This->wd_CpIfc_Select_Options( ).
LR_HELPER = LR_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
LR_TABLE = LR_HELPER->CREATE_RANGE_TABLE( I_TYPENAME = 'CHAR1' ).
lr_HELPER->add_selection_field(
i_id = 'CHAR1'
IT_RESULT = LR_TABLE
I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_OVS
).
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.
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.
Abhi
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.