on 07-23-2007 3:06 PM
Hi
I realized an OVS-F4-Help in WDR_SELECT_OPTIONS.
The Event on_ovs is raised and if I use table_multi_select = abap_false
i_ovs_data-m_ovs_callback_object->set_configuration(
label_texts = lt_label_texts
column_texts = lt_column_texts
group_header = lv_group_header
window_title = lv_window_title
table_header = lv_table_header
col_count = 2
row_count = 20
table_multi_select = abap_false ).
I get the correct value in the select-option with the following code
WHEN if_wd_ovs=>co_phase_3.
* apply result
IF i_ovs_data-m_ovs_callback_object->selection IS NOT BOUND.
******** TODO exception handling
ENDIF.
ASSIGN i_ovs_data-m_ovs_callback_object->selection->* TO <ls_selection>.
IF <ls_selection> IS ASSIGNED.
i_ovs_data-m_ovs_callback_object->context_element->set_attribute(
name = i_ovs_data-m_ovs_callback_object->context_attribute
value = <ls_selection>-kostl ).
ENDIF.
I tried to use table_multi_select = abap_true, but then I have no idea how the code for <b>WHEN if_wd_ovs=>co_phase_3.</b> must look like.
If anyone know the answer,give me the solution.
thanks in advance,
Marcus
Hello Marcus,
In this case the pointer refers to a table instead of a structure. Just fill the table with the selected values. They will then be copied over to the final range table.
Best regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Thomas,
I tried to do this like this.
WHEN if_wd_ovs=>co_phase_3.
* apply result
IF i_ovs_data-m_ovs_callback_object->selection IS NOT BOUND.
******** TODO exception handling
ENDIF.
DATA lt_kostl TYPE TABLE OF kostl.
ASSIGN i_ovs_data-m_ovs_callback_object->selection->* TO <lt_selection>.
IF <lt_selection> IS ASSIGNED.
LOOP AT <lt_selection> ASSIGNING <ls_selection>.
INSERT <ls_selection>-kostl INTO TABLE lt_kostl.
ENDLOOP.
ENDIF.
i_ovs_data-m_ovs_callback_object->context_element->set_attribute(
name = i_ovs_data-m_ovs_callback_object->context_attribute
value = lt_kostl ).
Hi Marcus,
You can find a copy&paste example in WDR_TEST_SELECT_OPTIONS in the method ON_OVS of the view MAIN_VIEW.
There you can find for SCARR in called method do_ovs_scarr:
method do_ovs_scarr.
data:
lt_scarr type cl_wd_flight_model=>tt_scarr,
scarr type scarr.
field-symbols:
<lt_ovs_result> type cl_wd_flight_model=>tt_scarr,
<scarr> like line of <lt_ovs_result>,
<lt_sel_opt_result> type standard table.
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( TABLE_MULTI_SELECT = abap_true ).
when if_wd_ovs=>co_phase_1.
i_ovs_data-m_ovs_callback_object->set_input_structure( input = scarr ).
when if_wd_ovs=>co_phase_2.
cl_wd_flight_model=>get_scarr( importing et_scarr = lt_scarr ).
i_ovs_data-m_ovs_callback_object->set_output_table( output = lt_scarr ).
when if_wd_ovs=>co_phase_3.
assign i_ovs_data-m_ovs_callback_object->selection->* to <lt_ovs_result>.
assign i_ovs_data-mt_selected_values->* to <lt_sel_opt_result>.
loop at <lt_ovs_result> assigning <scarr>.
insert <scarr>-carrid into table <lt_sel_opt_result>.
endloop.
endcase.
endmethod.
Best regards,
Thomas
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.