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 <table> 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 <table> 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.
endloop.
endform.
5. 保存时调用4中的子程序
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/166523/viewspace-446997/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/166523/viewspace-446997/