I tried using user_constraints and also used START WITH and connect by the concept
Below Query I used
Select table_name, level from ( select table_name, constraint_name, r_constraint_name
from user_constraints where table_name in (select t_name from my_table where is_active =1))
start with constraint_type = 'P'
connect by prior constraint_name = r_constraint_name;