ALV控制单元格的可编辑.docx

ALV控制单元格的可编辑.docx

ID:60809562

大小:21.23 KB

页数:4页

时间:2020-12-20

ALV控制单元格的可编辑.docx_第1页
ALV控制单元格的可编辑.docx_第2页
ALV控制单元格的可编辑.docx_第3页
ALV控制单元格的可编辑.docx_第4页
资源描述:

《ALV控制单元格的可编辑.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、report  zibmwj_test06 no standard page heading.type-pools: slis.*- Fieldcatalogdata: it_fieldcat type lvc_t_fcat.data: x_fieldcat type lvc_s_fcat.data: x_layout type lvc_s_layo."第1步:用操作具体单元的是否可编辑的内表和工作区data: ls_edit type lvc_s_styl,      lt_edit type lvc_t_s

2、tyl,    gr_alvgrid type ref to cl_gui_alv_grid ."第2步:在内表定义添加字段,用于控制具体行的具体单元是否可编辑data: begin of it_vbap occurs 0,  vbeln type ebeln,  posnr like vbap-posnr,  style type lvc_t_styl, "FOR DISABLEend of it_vbap.data: ls_outtab like line of it_vbap.select vbeln  

3、posnr  up to 100 rows  into corresponding fields of table it_vbapfrom vbap.data:l_pos type i value 1.clear: l_pos.l_pos = l_pos + 1.x_fieldcat-seltext = 'VBELN'.x_fieldcat-fieldname = 'VBELN'.x_fieldcat-tabname = 'ITAB'.x_fieldcat-col_pos = l_pos.x_fieldcat-

4、edit = 'X'.x_fieldcat-outputlen = '10'.*x_fieldcat-ref_field = 'VBELN'.*x_fieldcat-ref_table = 'VBAK'.append x_fieldcat to it_fieldcat.clear x_fieldcat.l_pos = l_pos + 1.x_fieldcat-seltext = 'POSNR'.x_fieldcat-fieldname = 'POSNR'.x_fieldcat-tabname = 'ITAB'.

5、x_fieldcat-col_pos = l_pos.x_fieldcat-edit = 'X'.x_fieldcat-outputlen = '5'.append x_fieldcat to it_fieldcat.clear x_fieldcat.l_pos = l_pos + 1."第3步:设置第六行两个单元都不能输入sy-tabix = 6.ls_edit-fieldname = 'VBELN'.ls_edit-style = cl_gui_alv_grid=>mc_style_disabled.ls_

6、edit-style2 = space.ls_edit-style3 = space.ls_edit-style4 = space.ls_edit-maxlen = 10.insert ls_edit into table lt_edit.ls_edit-fieldname = 'POSNR'.ls_edit-style = cl_gui_alv_grid=>mc_style_disabled.ls_edit-style2 = space.ls_edit-style3 = space.ls_edit-style

7、4 = space.ls_edit-maxlen = 6.insert ls_edit into table lt_edit.insert lines of lt_edit into table ls_outtab-style."第4步:将控制数据写到内表modify it_vbap index sy-tabix from ls_outtab transporting style ."设置第10行只有项目不能输入clear ls_outtab.refresh lt_edit.ls_edit-fieldname 

8、= 'POSNR'.ls_edit-style = cl_gui_alv_grid=>mc_style_disabled.ls_edit-style2 = space.ls_edit-style3 = space.ls_edit-style4 = space.ls_edit-maxlen = 6.insert ls_edit into table lt_edit.insert line

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。