1508: -- {Start Of Comments}
1509: --
1510: -- Description:
1511: -- Checks that the organization id exists in the table
1512: -- PER_ORG_STRUCTURE_ELEMENTS.
1513: --
1514: -- Prerequisites:
1515: -- None.
1516: --
1539:
1540: -- Declare the cursor
1541: cursor csr_org_id is
1542: select 'Y'
1543: from per_org_structure_elements pse
1544: where pse.organization_id_parent = p_top_organization_id
1545: and (p_org_structure_version_id IS null OR
1546: (p_org_structure_version_id IS NOT null AND
1547: pse.org_structure_version_id = p_org_structure_version_id));