on 08-01-2008 12:11 PM
Hi All,
I am trying to put the OVS help in a select option.
When I run the application and click the help icon for select option I am getting the below error:
OVS: Methode SET_OUTPUT_TABLE Cannot Be Called
The abap call stack is this :
Method: IF_WDR_OVS_LISTENER~MODIFY_RESULT_VIEW of program CL_WDR_VALUE_HELP_HANDLER=====CP
Method: WDDOMODIFYVIEW of program /1BCWDY/05LR4UBIVJKOH0BA5Y5V==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_MODIFY_VIEW of program /1BCWDY/05LR4UBIVJKOH0BA5Y5V==CP
Method: DO_MODIFY_VIEW of program CL_WDR_DELEGATING_VIEW========CP
Method: MODIFY_VIEW of program CL_WDR_VIEW===================CP
Method: DO_MODIFY_VIEW of program CL_WDR_CLIENT_COMPONENT=======CP
Method: DO_MODIFY_VIEW of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
My code is below :
method on_ovs .
types:
begin of lty_stru_input,
add fields for the display of your search input here
carrid type sflight-carrid,
end of lty_stru_input,
begin of lty_stru_list,
add fields for the selection list here
carrid type sflight-carrid,
end of lty_stru_list,
ty_range type range of sflight-carrid.
data: ls_search_input type lty_stru_input,
lt_select_list type standard table of lty_stru_list,
ls_text type wdr_name_value,
lt_label_texts type wdr_name_value_list,
lt_column_texts type wdr_name_value_list,
lv_window_title type string,
lv_group_header type string,
lv_table_header type string.
field-symbols: <ls_query_params> type lty_stru_input,
<ls_selection> type lty_stru_list.
case ovs_callback_object->phase_indicator.
when if_wd_ovs=>co_phase_0.
ls_text-name = `CARRID`. "must match a field name of search
ls_text-value = `CARRID`. "wd_assist->get_text( `001` ).
insert ls_text into table lt_label_texts.
ls_text-name = `CARRID`. "must match a field in list structure
ls_text-value = `CARRID`. "wd_assist->get_text( `002` ).
insert ls_text into table lt_column_texts.
lv_window_title = 'Test Window'.
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 ).
when if_wd_ovs=>co_phase_1.
ls_search_input-carrid = 'AH'.
pass the values to the OVS component
ovs_callback_object->set_input_structure(
input = ls_search_input ).
when if_wd_ovs=>co_phase_2.
if ovs_callback_object->query_parameters is not bound.
TODO Exception Handling
endif.
assign ovs_callback_object->query_parameters->*
to <ls_query_params>.
if not <ls_query_params> is assigned.
select carrid from sflight into table lt_select_list.
else.
select carrid from sflight into table
lt_select_list where carrid eq <ls_query_params>-carrid.
endif.
ovs_callback_object->set_output_table( output = lt_select_list ).
when if_wd_ovs=>co_phase_3.
apply result
if ovs_callback_object->selection is not bound.
TODO exception handling
endif.
assign ovs_callback_object->selection->* to <ls_selection>.
if <ls_selection> is assigned.
data: lr_select_options type ref to iwci_wdr_select_options.
data lr_helper type ref to if_wd_select_options.
data: lt_range type ty_range.
data: lr_comp_usage type ref to if_wd_component_usage,
wa_range like line of lt_range,
rt_range type ref to data.
wa_range-sign = 'I'.
wa_range-option = 'EQ'.
wa_range-low = <ls_selection>-carrid.
append wa_range to lt_range.
"lt_RANGE-SIGN = 'I'.
create data rt_range like lt_range.
lr_comp_usage = wd_this->wd_cpuse_my_select( ).
if lr_comp_usage->has_active_component( ) is initial.
lr_comp_usage->create_component( ).
endif.
lr_select_options = wd_this->wd_cpifc_my_select( ).
lr_helper = lr_select_options->init_selection_screen( ).
call method lr_helper->set_range_table_of_sel_field
exporting
i_id = 'CARRID'
it_range_table = rt_range.
endif.
endcase.
endmethod.
Please help!!!
Its urgent.
Regards,
Sumit Oberoi
Hi Sumit,
1) In the WDINIT method define ur select-option.
2) IN Mthods of ur view controller write :
ON_OVS Event Handle ON_OVS INTERFACECONTROLLER SELECT_OPTIONS
3) code for ON_OVS:
DATA: l_current_controller TYPE REF TO if_wd_controller,
l_message_manager TYPE REF TO if_wd_message_manager,
lv_message_ERROR(100), l_subrc TYPE subrc,
lv_message_SUCESS(100).
DATA : STRU_ENAME TYPE ZU5_PERLIST_S.
DATA: WA_CALLOWNR LIKE STRU_ENAME.
DATA: IT_CALLOWNR LIKE STANDARD TABLE OF STRU_ENAME.
DATA: IT_ENAME TYPE ZU5_PERLIST_T.
DATA: LV_STR TYPE STRING VALUE 'BOB'.
DATA: lr_componentcontroller type ref to ig_componentcontroller,
l_ref_cmp_usage type ref to if_wd_component_usage.
DATA: rt_CALLOWNR type ref to data,
R_CALLOWNR TYPE RANGE OF IHPA-PARNR,
R_CALLOWNR_line LIKE LINE OF R_CALLOWNR.
field-symbols:
<lt_ovs_result1> LIKE IT_ENAME,
<PA0001> TYPE ZU5_PERLIST_S,
<lt_sel_opt_result1> type standard table.
field-symbols: <fs_CALLOWNR> type table.
case ovs_callback_object->
case i_ovs_data-m_ovs_callback_object->phase_indicator.
when if_wd_ovs=>co_phase_0.
l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
get a pointer to the interface controller of the select options component
wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
i_ovs_data-m_ovs_callback_object->set_configuration(
WINDOW_TITLE =
GROUP_HEADER =
LABEL_TEXTS =
TABLE_HEADER =
COLUMN_TEXTS =
COL_COUNT =
TABLE_MULTI_SELECT = abap_true ).
when if_wd_ovs=>co_phase_1.
// to display extra search window
i_ovs_data-m_ovs_callback_object->set_input_structure(
input = STRU_PA0001
GROUP_HEADER =
LABEL_TEXTS =
WINDOW_TITLE =
).
to display extra search window
when if_wd_ovs=>co_phase_2.
rt_CALLOWNR = wd_this->m_handler->get_range_table_of_sel_field( i_id = 'CALLOWNR' ).
assign rt_CALLOWNR->* to <fs_CALLOWNR>.
R_CALLOWNR = <fs_CALLOWNR>.
READ TABLE R_CALLOWNR INTO R_CALLOWNR_line INDEX 1.
LV_STR = R_CALLOWNR_line-LOW.
CALL METHOD ZU7_CL_DB_UTILITY=>GET_PERNR_HITLIST
EXPORTING
I_SEARCH = LV_STR
IMPORTING
ET_HLIST = IT_ENAME.
l_current_controller ?= wd_this->wd_get_api( ).
CALL METHOD l_current_controller->get_message_manager
RECEIVING
message_manager = l_message_manager.
IF LV_STR IS INITIAL.
lv_message_ERROR = wd_assist->if_wd_component_assistance~get_text( key = '031' ).
CALL METHOD l_message_manager->report_error_message
EXPORTING
message_text = lv_message_ERROR.
ELSE.
CLEAR lv_message_ERROR.
DATA : LV_LINES TYPE char3.
DESCRIBE TABLE IT_ENAME LINES LV_LINES.
lv_message_ERROR = wd_assist->if_wd_component_assistance~get_text( key = '032' ).
CONCATENATE LV_LINES lv_message_ERROR INTO lv_message_ERROR SEPARATED BY space.
CALL METHOD L_MESSAGE_MANAGER->CLEAR_MESSAGES
EXPORTING
INCLUDING_PERMANENT_MSG = ABAP_FALSE.
CALL METHOD L_MESSAGE_MANAGER->REPORT_SUCCESS
EXPORTING
MESSAGE_TEXT = lv_message_ERROR.
ENDIF.
i_ovs_data-m_ovs_callback_object->set_output_table(
output = IT_ENAME
).
when if_wd_ovs=>co_phase_3.
assign i_ovs_data-m_ovs_callback_object->selection->* to <lt_ovs_result1>.
assign i_ovs_data-mt_selected_values->* to <lt_sel_opt_result1>.
loop at <lt_ovs_result1> assigning <PA0001>.
APPEND <PA0001>-PERNR TO <lt_sel_opt_result1>.
endloop.
endcase.
Regards,
Vishal.
Edited by: VISHAL GUPTA on Aug 5, 2008 9:42 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishal,
Thanks a lot for your reply!!
I have not choosen the OVS event for Select_option interface controller.
This i think was the main problem.
Now on choosing tht it is giving some error while activating.
Please tell me the type and the way to get access to the below objects
case i_ovs_data-m_ovs_callback_object->phase_indicator.
Hey Vishal I got the objects its the import parameter.
The problem is solved
Regards,
Sumit
Edited by: Sumit Oberoi on Aug 6, 2008 7:16 AM
Edited by: Sumit Oberoi on Aug 6, 2008 7:21 AM
Hi,
Kindly please let me know how you have resolved you problem...
I am still getting error at this point.
ERROR is here---->> IF first_time = 'X'.
IF me->called <> 'SET_OUTPUT_TABLE'.
RAISE EXCEPTION
TYPE
cx_wdr_rt_exception
EXPORTING
textid = cx_wdr_rt_exception=>ovs_method_not_called
msgv1 = 'SET_OUTPUT_TABLE'.
ENDIF.
l_node ?= me->wd_context.
READ TABLE l_node->controller->component->controllers INTO wa_controller WITH KEY nam
IF sy-subrc = 0.
wa_mapping_info-controller = l_node->controller->name.
Thanks in Advance
do not populate IT_VALUE_SET if you are using OVS.
If you are using manual search help than only use this.
create a range table that consists of this new data element
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'CHAR12' ).
add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'CALLOWNR'
it_result = lt_range_table
i_read_only = read_only
I_DESCRIPTION = 'Call Owner'
i_complex_restrictions = i_complex_restrict_PARTNR
i_use_complex_restriction = 'X'
IT_VALUE_SET = IT_SRCHHELP_PARNR1
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_OVS
i_value_help_id = 'OVS_USAGE'
Regards,
Vishal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.