abap 中 for all entries in 中的 distinct 功能

FUNCTION ZWHMES_TES1.
*"----------------------------------------------------------------------
*"*"本地接口:
*"----------------------------------------------------------------------

types:begin of ty_mm,
           matnr type mara-matnr,
       end of ty_mm.

types: begin of ty_makt,
          matnr type mara-matnr,
          spras type makt-spras,
          maktx type makt-maktx,
       end of ty_makt.

       data mm type table of ty_mm with header line.
       data makt type table of ty_makt WITH HEADER LINE.

       mm-matnr = '000000007001010018'.
       append mm.
       select
           matnr
           spras
           maktx
         from makt
            into CORRESPONDING FIELDS OF TABLE makt
          for ALL ENTRIES IN mm
           where matnr = mm-matnr.
       loop at makt.
          write:/
          makt-matnr
           ,
          makt-spras
           ,
           makt-maktx.
       endloop.



ENDFUNCTION.

猜你喜欢

转载自blog.csdn.net/hewusheng10/article/details/104170405