ABAP顾问
分类: IT业界
2011-08-11 11:32:27
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.