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事件怎么用,哪位高手有具体的例子
展开
展开全部
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 .
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
启帆信息
2024-11-19 广告
2024-11-19 广告
启帆信息是英伟达中国区代理商,原厂授权代理,提供全面的软件技术解决方案以及NVIDIA以太网产品、交换机等产品,欢迎前来咨询!...
点击进入详情页
本回答由启帆信息提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询