web dynpro for abap ON_DATA_CHECK ON_CELL_ACTION事件怎么用,哪位高手有具体的例子
webdynproforabapON_DATA_CHECKON_CELL_ACTION事件怎么用,哪位高手有具体的例子...
web dynpro for abap ON_DATA_CHECK ON_CELL_ACTION事件怎么用,哪位高手有具体的例子
展开
1个回答
展开全部
When we change the data in any cell of ALV table and press enter, ON_CELL_ACTION event will trigger and will give changed value in cell.
1.Create a method in the view name it like ON_CELL_ACTION,method type is Event handler that select from drop down and select event is ON_CELL_ACTION from Interface Controller Events.
2.Now to trigger this event write the below code in WDDOMODIFYVIEW method of view.
* Data Declaration
data lo_cmp_usage type ref to if_wd_component_usage.
data lo_interfacecontroller type ref to iwci_salv_wd_table .
data lo_value type ref to cl_salv_wd_config_table.
* Instantiate ALV
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
* Call get_model of Interface Controller to get reference of ALV
lo_value = lo_interfacecontroller->get_model(
).
* Enable the ON_CELL_ACTION Event
call method lo_value->if_salv_wd_table_settings~set_cell_action_event_enabled
exporting
value = ABAP_TRUE .
1.Create a method in the view name it like ON_CELL_ACTION,method type is Event handler that select from drop down and select event is ON_CELL_ACTION from Interface Controller Events.
2.Now to trigger this event write the below code in WDDOMODIFYVIEW method of view.
* Data Declaration
data lo_cmp_usage type ref to if_wd_component_usage.
data lo_interfacecontroller type ref to iwci_salv_wd_table .
data lo_value type ref to cl_salv_wd_config_table.
* Instantiate ALV
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
* Call get_model of Interface Controller to get reference of ALV
lo_value = lo_interfacecontroller->get_model(
).
* Enable the ON_CELL_ACTION Event
call method lo_value->if_salv_wd_table_settings~set_cell_action_event_enabled
exporting
value = ABAP_TRUE .
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询