美文网首页
内表中查找重复数据

内表中查找重复数据

作者: SmalltalkVoice | 来源:发表于2016-09-24 09:18 被阅读132次
    
    
    REPORT zhello.
    
    DATA: BEGIN OF item OCCURS 0,
            index TYPE i,
          END OF item.
    DATA: in TYPE i.
    
    item-index = 1.
    APPEND item.
    item-index = 2.
    APPEND item.
    item-index = 3.
    APPEND item.
    item-index = 2.
    APPEND item.
    
    SORT item by index.  "必须做排序动作
    LOOP AT item.
      AT NEW index.
        in = 0.
      ENDAT.
      in = in + 1.
      AT END OF index.
        IF  in  NE 1.
          WRITE: 'double item'.
        ENDIF.
      ENDAT.
    ENDLOOP.
    

    相关文章

      网友评论

          本文标题:内表中查找重复数据

          本文链接:https://www.haomeiwen.com/subject/fhrxyttx.html