ABAP 指针的使用方法

DATA: TEMP_ZMM_261_BS TYPE STANDARD TABLE OF ZMM_261_BS.

 

定义指针:
FIELD-SYMBOLS <LFS_BS261> TYPE ZMM_261_BS.

       SORT  TEMP_ITAB_ZRESB_18_BS BY MATNR BDMNG.
       LOOP AT TEMP_ZMM_261_BS ASSIGNING <LFS_BS261>.
            READ TABLE TEMP_ITAB_ZRESB_18_BS WITH KEY
                            MATNR = <LFS_BS261>-MATNR
                            BDMNG = <LFS_BS261>-BDMNG.
            IF SY-SUBRC = 0.

* 使用指针修改内表数据
              <LFS_BS261>-VORNR = TEMP_ITAB_ZRESB_18_BS-VORNR.
              <LFS_BS261>-PLNFL = TEMP_ITAB_ZRESB_18_BS-PLNFL.
              <LFS_BS261>-LTXA1 = TEMP_ITAB_ZRESB_18_BS-LTXA1.
              <LFS_BS261>-FLAG2 = '8'.


              DELETE TEMP_ITAB_ZRESB_18_BS INDEX SY-TABIX.
            ELSE.
                CONTINUE.
            ENDIF.
       ENDLOOP.

你可能感兴趣的:(table,delete)