*&---------------------------------------------------------------------* *& Report ZZTEST *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT ZZTEST. TYPES:BEGIN OF TY_EKKO, EBELN TYPE EKKO-EBELN, BUKRS TYPE EKKO-BUKRS, END OF TY_EKKO. DATA :GT_OUT TYPE STANDARD TABLE OF TY_EKKO, GS_OUT TYPE TY_EKKO. DATA LV_TABIX TYPE SY-INDEX. GS_OUT-EBELN = '0000000002'. GS_OUT-BUKRS = '0002'. APPEND GS_OUT TO GT_OUT. CLEAR GS_OUT. GS_OUT-EBELN = '0000000003'. GS_OUT-BUKRS = '0002'. APPEND GS_OUT TO GT_OUT. CLEAR GS_OUT. GS_OUT-EBELN = '0000000001'. GS_OUT-BUKRS = '0001'. APPEND GS_OUT TO GT_OUT. CLEAR GS_OUT. LOOP AT GT_OUT INTO GS_OUT. LV_TABIX = SY-TABIX. IF GS_OUT-BUKRS <> '0001'. DELETE GT_OUT INDEX LV_TABIX. CONTINUE. ENDIF. IF GS_OUT-BUKRS = '0001'. GS_OUT-BUKRS = '001A'. ENDIF. MODIFY GT_OUT FROM GS_OUT. CLEAR GS_OUT. ENDLOOP. BREAK-POINT.
标签:GT,GS,删除,某条,EBELN,BUKRS,DELETE,EKKO,OUT From: https://www.cnblogs.com/Anyohh233/p/17980243