如何在WebDynpro ABAP表中获取所选条目?(How to get the selected entry in WebDynpro ABAP table?)

编程入门 行业动态 更新时间:2024-10-24 06:26:13
如何在WebDynpro ABAP表中获取所选条目?(How to get the selected entry in WebDynpro ABAP table?)

我有一个webdynpro包含一个显示多行的表。 用户单击删除按钮后,我想删除表中选定的行。

我现在的问题是,我不知道如何在事件调用中实现它。 如何识别表格的选定行?

I have a webdynpro containing a table displaying numerous lines. After the user clicks the delete button I want to delete the selected line of the table.

My problem right now is, that I don't know how to implement this in the event-call. How can I identify the selected line of the table?

最满意答案

如果“table”表示可编辑的ALV,则为此设置预设功能。 请查看http://help.sap.com/saphelp_nw04s/helpdata/EN/5f/ec57c72a1349c8bfdda56d976e9399/frameset.htm和http://help.sap.com/saphelp_nw04s/helpdata/EN/5f/ec57c72a1349c8bfdda56d976e9399/frameset。 htm有关如何手动处理选择的详细信息,请参阅http://help.sap.com/saphelp_nw04s/helpdata/EN/5f/ec57c72a1349c8bfdda56d976e9399/frameset.htm 。

I finally got the solution:

In the button event implement the following, to access the node and finally the id-value:

method ONACTIONZSS10_15_ONDELETE . DATA ls_cust type wd_this->element_IT_Cust. DATA lo_nd_cust TYPE REF TO if_wd_context_node. DATA lo_el_cust TYPE REF TO if_wd_context_element. " Get the selected element lo_nd_cust = wd_context->get_child_node( name = 'IT_CUST' ). lo_el_cust = lo_nd_cust->get_element( ). " Get the attributes of the node-element lo_el_cust->get_static_attributes( IMPORTING static_attributes = ls_cust ). " Call the delete-function CALL FUNCTION 'ZSS10_15_CUST_FM_DELETE' EXPORTING custid = ls_cust-ID . endmethod.

更多推荐

本文发布于:2023-07-24 01:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1240140.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:条目   所选   如何在   WebDynpro   table

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!