on 05-17-2009 12:58 PM
Dear Experts,
I have created a program similar to SAPTECHNICAL OVS example,but values are not getting displayed.
When I debugged ovs_callback_object->query_parameters-> does not contain any values.*
assign ovs_callback_object->query_parameters->* to <ls_query_params>.
MY Scenario: I created car (type scarr-carrid) and carr (type scarr-carrname) in View context and created same in view with the same names and did binding correctly. Now when we click on carrier id, help should appear with selection criteria and if we enter something then corresponding details will appear.
Now i have created ovs controller also.
My Problem : When I debugged i found that ovs_callback_object->query_parameters->* does not contain any values.So at run time,when i had set the value of carrid in ovs_callback_object->query_parameters->* then values were appearing.
So can anyone pls tell me why the value i enter in ovs help is not getting updated in ovs_callback_object->query_parameters->* ..........Pls help.
Pls help me...
Kind regards
Sajid
Edited by: shaik sajid on May 17, 2009 1:58 PM
Edited by: shaik sajid on May 17, 2009 1:59 PM
Hi Sajid,
I did try using the same code which I assume you would have pasted from your ON_OVS method. It does by itself contain many incomplete statements & bad syntaxes. I dont get as to how you would have even been able to activate your component if it were the coding. Anyways I am pasting the coding which I arrived at after correcting your errors. I am now able to see the values being passes on properly in the statement:
assign ovs_callback_object->query_parameters->* to <ls_query_params>
Try with the CARRID input as AA or A*. I did try & obtain the proper results with the coding.
Regards,
Uday
method ON_OVS .
types: begin of lty_stru_input,
CAR type string,
carr type string,
end of lty_stru_input.
types: begin of lty_stru_list,
CARrid type scarr-carrid,
carrname type scarr-carrname,
end of lty_stru_list.
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.
DATA : lv_short TYPE string,
lv_stext TYPE string.
case ovs_callback_object->phase_indicator.
when if_wd_ovs=>co_phase_0.
ls_text-name = `CAR`.
ls_text-value = `ID`.
insert ls_text into table lt_label_texts.
ls_text-name = `CARR`.
ls_text-value = `Desc`.
insert ls_text into table lt_label_texts.
ls_text-name = `CARRID`.
ls_text-value = `CAR ID`.
insert ls_text into table lt_column_texts.
ls_text-name = `CARRNAME`.
ls_text-value = `CAR DESC`.
insert ls_text into table lt_column_texts.
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.
ovs_callback_object->context_element->get_static_attributes( importing static_attributes = ls_search_input ).
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.
******** TODO exception handling
endif.
lv_short = <ls_query_params>-CAR.
lv_stext = <ls_query_params>-CARR.
REPLACE ALL OCCURRENCES OF '*' IN lv_short WITH '%' .
REPLACE ALL OCCURRENCES OF '*' IN lv_stext WITH '%' .
IF lv_short NE ' ' AND lv_stext NE ' '.
SELECT CARRID CARRNAME FROM Scarr INTO TABLE lt_select_list WHERE CARRID LIKE lv_short AND CARRNAME LIKE lv_stext ORDER BY CARRID ASCENDING.
ELSEIF lv_short EQ ' ' AND lv_stext NE ' '.
SELECT CARRID CARRNAME FROM Scarr INTO TABLE lt_select_list WHERE CARRNAME LIKE lv_stext ORDER BY CARRID ASCENDING.
ELSEIF lv_short NE ' ' AND lv_stext EQ ' '.
SELECT CARRID CARRNAME FROM Scarr INTO TABLE lt_select_list WHERE CARRID LIKE lv_short ORDER BY CARRID ASCENDING.
ENDIF.
ovs_callback_object->set_output_table( output = lt_select_list ).
when if_wd_ovs=>co_phase_3.
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.
ovs_callback_object->context_element->set_attribute( name = `CAR` value = <ls_selection>-CARRID ).
endif.
endcase.
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Said,
My mails to your id are bouncing back... Plz update the mail id in your contact card if it has changed.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shaik,
Didnt realize that we both work in the same company. My code too has lost all its formatting after pasting in here. Am sending you the properly formatted code to your outlook.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Experts
Following is my code
method ON_OVS .
types: begin of lty_stru_input,
CAR type string,
carr type string,
end of lty_stru_input.
types: begin of lty_stru_list,
CARrid type scarr-carrid,
carrname type scarr-carrname,
end of lty_stru_list.
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.
DATA : lv_short TYPE string,
lv_stext TYPE string.
case ovs_callback_object->phase_indicator.
when if_wd_ovs=>co_phase_0.
ls_text-name = `CAR`.
ls_text-value = `ID`.
insert ls_text into table lt_label_texts.
ls_text-name = `CARR`.
ls_text-value = `Desc`.
insert ls_text into table lt_label_texts.
ls_text-name = `CARRID`.
ls_text-value = `CAR ID`.
insert ls_text into table lt_column_texts.
ls_text-name = `CARRNAME`.
ls_text-value = `CAR DESC`.
insert ls_text into table lt_column_texts.
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.
ovs_callback_object->context_element->get_static_attributes(
importing static_attributes = ls_search_input ).
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.
******** TODO exception handling
endif.
lv_short = <ls_query_params>-CAR.
lv_stext = <ls_query_params>-CARR.
REPLACE ALL OCCURRENCES OF '*' IN lv_short WITH '%' .
REPLACE ALL OCCURRENCES OF '*' IN lv_stext WITH '%' .
IF lv_short NE ' ' AND lv_stext NE ' '.
SELECT CARRID CARRNAME FROM Scarr INTO TABLE lt_select_list
WHERE CARRID LIKE lv_short AND
CARRNAME LIKE lv_stext
ORDER BY CARRID ASCENDING.
ELSEIF lv_short EQ ' ' AND lv_stext NE ' '.
SELECT CARRID CARRNAME FROM Scarr INTO TABLE lt_select_list
WHERE CARRNAME LIKE lv_stext
ORDER BY CARRID ASCENDING.
ELSEIF lv_short NE ' ' AND lv_stext EQ ' '.
SELECT CARRID CARRNAME FROM Scarr INTO TABLE lt_select_list
WHERE CARRID LIKE lv_short
ORDER BY CARRID ASCENDING.
ENDIF.
ovs_callback_object->set_output_table( output = lt_select_list ).
when if_wd_ovs=>co_phase_3.
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.
ovs_callback_object->context_element->set_attribute(
name = `CAR`
value = <ls_selection>-CARRID ).
endif.
endcase.
endmethod.
Pls help........
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
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.