Skip to end of metadata
Go to start of metadata
Suppose the requirement is to get all database tables belonging to package COM_PRODUCT_BASE and its sub packages.
Since COM_PRODUCT_BASE contains no database tables not only sub packages:
Since Repository information system does not support query against sub packages:
Here below is an ABAP code snippet which can help you get table list:
method GET_TABLE_LIST.
DATA: t_descendant TYPE cl_pak_package_queries=>tt_subpackage_info,
lt_result TYPE STANDARD TABLE OF tadir-obj_name.
CALL METHOD cl_pak_package_queries=>get_all_subpackages
EXPORTING
im_package = iv_package_name
IMPORTING
et_subpackages = t_descendant
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc = 0.
SELECT obj_name INTO TABLE lt_result FROM TADIR as dir INNER JOIN dd02l as tt ON dir~obj_name
= tt~tabname
FOR ALL ENTRIES IN t_descendant
WHERE pgmid = 'R3TR' and object = 'TABL' AND tt~tabclass = 'TRANSP'
AND devclass = t_descendant-package .
endmethod.
  • No labels