少年休闲海

少年休闲海的SAP世界

批量计算透明表记录条数

REPORT  z_barry_test NO STANDARD PAGE HEADING .

TABLES info_tabl.

DATA: BEGIN OF it_tablename OCCURS 0 ,
        tabname LIKE dd02l-tabname ,
        devclass LIKE info_tabl-devclass ,
      END OF it_tablename.

DATA  kbytes TYPE k_bytes .
DATA: tabcount TYPE i .

SELECT-OPTIONS: s_table FOR it_tablename-tabname OBLIGATORY ,
                s_class FOR info_tabl-devclass .
PARAMETERS p_inckb AS CHECKBOX .

START-OF-SELECTION.
  SELECT tabname devclass INTO TABLE it_tablename
    FROM info_tabl
    WHERE tabname IN s_table AND
          devclass IN s_class AND
          as4local = 'A' AND
          tabclass = 'TRANSP'.

  LOOP AT it_tablename.
    CLEAR tabcount.
    SELECT COUNT(*) INTO tabcount FROM (it_tablename-tabname) .

    IF p_inckb = 'X'.
      EXEC SQL.
        SELECT
          BYTES/1024
        FROM DBA_SEGMENTS
        INTO :kbytes
      WHERE SEGMENT_NAME = :it_tablename-tabname
      ENDEXEC.
    ENDIF.

    WRITE: / it_tablename-tabname,it_tablename-devclass, tabcount,kbytes.
  ENDLOOP.



阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhongguomao/article/details/6867936
文章标签: table class report
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

批量计算透明表记录条数

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭