Chinaunix首页 | 论坛 | 博客
  • 博客访问: 701960
  • 博文数量: 158
  • 博客积分: 6010
  • 博客等级: 准将
  • 技术积分: 1643
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-11 14:37
个人简介

人法地,地法天,天法道,道法自然

文章分类

全部博文(158)

文章存档

2022年(1)

2020年(3)

2016年(1)

2014年(7)

2013年(4)

2010年(5)

2009年(86)

2008年(25)

2007年(26)

我的朋友

分类:

2009-06-26 21:26:14

TABLE CONTROL中从实表中删除TABLE CONTROL中已删除的内容
1.
*data del_line like line of itab.
*data del_itab like itab occurs 0 with header line.
2.在标准的程序:
*form fcode_delete_row 中加
loop at assigning .
*&SPWIZARD: access to the component 'FLAG' of the table header         *
            assign component p_mark_name of structure to .
            if = 'X'.
               clear del_tabix.
               del_tabix = syst-tabix.
**************************=>  begin of added by nc
               clear del_line.
               move-corresponding to del_line.
 
               append del_line to del_itab.
**************************=>  end   of added by nc
 
               delete
index syst-tabix.
                       if sy-subrc = 0.
                          -lines = -lines - 1.
                       endif.
            endif.
endloop.
4. 写个子程序
form delete_line.
  loop at del_itab.
    delete from zmarm where matnr = del_itab-matnr
                     and kunnr = del_itab-kunnr
                     and vsart = del_itab-vsart
                     and meinh = del_itab-meinh.
endform.    
 
5. 保存时调用4中的子程序
阅读(1257) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~