Through BAPI: BAPI_PROJECT_GETINFO, you can get the WBS and network and network activities under the project.
CALL FUNCTION 'BAPI_PROJECT_GETINFO'
EXPORTING
project_definition = iv_project
with_activities = 'X'
TABLES
e_wbs_element_table = lt_wbs_element_table
e_wbs_hierarchie_table = lt_wbs_hierarchie_table
e_activity_table = lt_act_table.
But need to pay attention to the following issues: the person in charge has insufficient authority, the authority object: C_PROJ_VNR (T-CODE: SU53)
Insufficient permissions will make it impossible to obtain data