Modify in the AVL report,and refresh to the internal table

本文介绍了一种在SAP ALVGRID中高效获取已选中记录的方法。通过使用类CL_GUI_ALV_GRID的check_changed_data方法,可以将ALVGRID中的变化数据同步到对应的内部表中,进而实现对选中记录的下载等功能。

          In ALV GRID,there is a checkbox field.The edit property of this field is checked.So user can check or cancel check of specific record.On th application toolbar ,i place an button named 'DOWNLOAD'.The functional of this button is download records in the alv report which are checked. Before download i must get the checked record.But the internal table which the alv grid display with is not change.Even through i have checked some records in the alv report.Only i press some buttons on the alv standard toolbar.But this way is not so convenient for the user's daily operation. At last i found an very useful method of class CL_GUI_ALV_GRID.It is check_changed_data.In the PAI of 'DOWNLOAD' command, i call this method in the first time,to set the changed data in the alv report to the corsponding internal table.And then i can process this internal table furhter according to the requirement.

DATA: l_r_grid    TYPE REF TO CL_GUI_ALV_GRID.
DATA: l_v_valid  TYPE C.

l_r_grid->check_changed_data( IMPORTING e_valid = l_v_valid ).
l_r_grid->refresh_table_display( ).

已经博主授权,源码转载自 https://pan.quark.cn/s/a4b39357ea24 在信息技术领域,特别是软件编程行业,微软公司推出的集成开发环境(IDE)Visual Studio,凭借其卓越的功能和广泛的适用范围,成为了众多程序员的常用工具。不过,在实际操作期间,用户可能会遭遇各种挑战,其中一种较为普遍的挑战是“Visual Studio遭遇了异常情况,这或许与某个附加组件有关”。本文将详细研究这一现象的成因、潜在后果以及最终的应对措施。 ### 原因剖析 Visual Studio通过支持多种插件和附加组件来扩展其功能,这些组件通常由第三方开发者设计,旨在为用户提供更多个性化和专业化的工具。然而,这些插件的质量良莠不齐,部分可能未经过充分的测试或与特定版本的Visual Studio存在兼容性难题,从而在执行时引发异常。异常的出现可能源于以下几个因素: 1. **代码缺陷**:若附加组件中的代码存在逻辑问题或资源管理不当,就可能导致运行时异常。 2. **资源竞争**:多个插件同时占用相同的资源(例如内存、文件句柄等),可能会产生资源冲突,进而触发异常。 3. **依赖不匹配**:插件可能需要特定版本的库或框架,如果系统中安装的版本不一致,也可能导致异常。 4. **安全隐患**:部分插件可能存在安全漏洞,一旦被恶意利用,可能会导致更严重的问题,包括但不限于异常崩溃。 ### 后果分析 当Visual Studio遇到由附加组件引发的异常时,不仅会中断当前的工作进程,降低开发效能,还可能带来以下潜在风险: 1. **数据遗失**:若异常发生在保存操作之前,可能会导致未保存的工作内容遗失。 2. **稳定性减弱**:频繁的异常会导致Visual Stud...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值