As an example, this will bring back the OBS ID for level 3
select inv.id, OBS.ID DIRECTORATE_ID, OBS.UNIQUE_NAME DIRECTORATE_CODE, OBS.NAME DIRECTORATE_NAME from inv_investments inv
JOIN PRJ_OBS_ASSOCIATIONS assoc ON inv.id = assoc.record_id AND UPPER(assoc.table_name) = 'SRM_PROJECTS'
JOIN prj_obs_units obs_units ON assoc.unit_id = obs_units.id
JOIN prj_obs_types obs_types ON obs_units.type_id = obs_types.id AND obs_types.unique_name = '*********'
JOIN PRJ_OBS_UNITS_FLAT flat ON assoc.unit_id = flat.unit_id
JOIN PRJ_OBS_UNITS OBS ON OBS.ID = FLAT.BRANCH_UNIT_ID and obs.depth = 3
Modify for your OBS Unique Name, and what ever level of the OBS you want to bring back.
PS - it will also work on-premise, unclear why you called out your question relating to SaaS.