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:
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
im_package = iv_package_name
et_subpackages = t_descendant
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
FOR ALL ENTRIES IN t_descendant
WHERE pgmid = 'R3TR' and object = 'TABL' AND tt~tabclass = 'TRANSP'
AND devclass = t_descendant-package .