on 05-08-2010 8:34 AM
in my component, i created a tabstrip in my view,and i have three tabs in my tabstrip .in each tab i put a alv .but some std functions and some self-defined functions in alv didn't work. I have done a test, the functions do work if i do not use tabstrip.
so .. experts,could you give some ideas or suggestions.
Best Regards!
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All the code you had pasted here is looking correct. There is only one more possibility I assume that Do you create the Component usages of SALV_WD_TABLE WD component for each View container in the Used component Tab in Object name?
If you have already done, Hoping for someone who had faced this problem and revert back to us with a handy solution.
You keep bumping this thread, but there really isn't enough information in here to base any suggestions upon. There is nothing general about ALV in a tabStrip that would cause the standard functions not to work. Add to that you haven't really told us much or shared much code. Perhaps you should describe exactly what you mean by "don't work" Are they not triggering your event handler? Where are you event handlers defined? What standard functions exactly are having a problem. More details will be needed before someone can likely help you.
ok,I'll share more infomation here:
first here's my part of code in the method wddoinit:
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
if l_ref_cmp_usage->has_active_component( ) is initial .
l_ref_cmp_usage->create_component( ).
endif.
data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
data: l_value type ref to cl_salv_wd_config_table.
l_value = l_ref_interfacecontroller->get_model( ).
data lr_buttonui type ref to cl_salv_wd_fe_button.
data lr_buttonsa type ref to cl_salv_wd_fe_button.
data lr_inputui1 type ref to cl_salv_wd_fe_input_field.
data lr_inputui2 type ref to cl_salv_wd_fe_input_field.
create object lr_inputui1 exporting value_elementname = 'CARRID'.
create object lr_inputui2 exporting value_elementname = 'CONNID'.
create object lr_buttonui.
create object lr_buttonsa.
lr_buttonui->set_text( 'Search Flights' ).
lr_buttonsa->set_text( 'Save' ).
lr_inputui1->set_label_text( ' AIRLINE :' ).
lr_inputui2->set_label_text( ' FLIGHT NO :' ).
data input1 type ref to cl_salv_wd_function.
input1 = l_value->if_salv_wd_function_settings~create_function( id = 'LINPUT1' ).
input1->set_editor( lr_inputui1 ).
data input2 type ref to cl_salv_wd_function.
input2 = l_value->if_salv_wd_function_settings~create_function( id = 'LINPUT2' ).
input2->set_editor( lr_inputui2 ).
data button1 type ref to cl_salv_wd_function.
button1 = l_value->if_salv_wd_function_settings~create_function( id = 'LBUTTON' ).
button1->set_editor( lr_buttonui ).
data button2 type ref to cl_salv_wd_function.
button2 = l_value->if_salv_wd_function_settings~create_function( id = 'LBUTTON1' ).
button2->set_editor( lr_buttonsa ).
then I create a method of event on_function:
method on_function .
data: temp type string,
lr_node type ref to if_wd_context_node.
temp = r_param->id.
data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
if temp = 'LBUTTON'.
wd_comp_controller->fill_sflights( ).
elseif temp = 'LBUTTON1'.
l_ref_interfacecontroller->data_check( ).
endif.
endmethod.
and here's the method of event on_data_check:
method check_save .
data: node_node_flighttab type ref to if_wd_context_node,
elem_node_flighttab type ref to if_wd_context_element,
lt_sflight type if_main=>elements_node_sflight.
check r_param->t_error_cells is initial.
node_node_flighttab = wd_context->get_child_node( name = 'NODE_SFLIGHT' ).
node_node_flighttab->get_static_attributes_table(
importing table = lt_sflight ).
save data to database
update... => only simlate, to not change the flight data model
content!
Create success message
get message manager
data: l_current_controller type ref to if_wd_controller,
l_message_manager type ref to if_wd_message_manager.
l_current_controller ?= wd_this->wd_get_api( ).
call method l_current_controller->get_message_manager
receiving
message_manager = l_message_manager.
report message
call method l_message_manager->report_success
exporting
message_text = 'Data was successfully saved.'.
endmethod.
when I test my application the lead selection didn't work ,and if i modify a value in a cell then push the button 'save',the view will recover itself.
There is nothing in particular about a tabstrip that would disrupt the functionality of the ALV. Are you using three separate component instances for each inner tab? The only thing I could think of is that you are re-initializing the ALV on each tab change and losing the registration of the event handlers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,Thomas!
I have used three separate component instances for each inner tab.And in the method wddoint,I wrote the code as follow:
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
if l_ref_cmp_usage->has_active_component( ) is initial .
l_ref_cmp_usage->create_component( ).
endif.
data: l_ref_cmp_usage1 type ref to if_wd_component_usage.
l_ref_cmp_usage1 = wd_this->wd_cpuse_alv1( ).
if l_ref_cmp_usage1->has_active_component( ) is initial .
l_ref_cmp_usage1->create_component( ).
endif.
data: l_ref_cmp_usage2 type ref to if_wd_component_usage.
l_ref_cmp_usage2 = wd_this->wd_cpuse_alv2( ).
if l_ref_cmp_usage2->has_active_component( ) is initial .
l_ref_cmp_usage2->create_component( ).
endif.
No one has some ideas /thinkings ?
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 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.