665: --------------------------------------------------------------------------------
666: FUNCTION organization_rec(
667: p_name IN VARCHAR2,
668: p_business_group_id IN NUMBER,
669: p_error_when_not_exist IN VARCHAR2 DEFAULT 'TRUE') RETURN HR_ALL_ORGANIZATION_UNITS%ROWTYPE
670: --------------------------------------------------------------------------------
671: IS
672: l_csr RefCsr;
673: l_rec HR_ALL_ORGANIZATION_UNITS%ROWTYPE;
669: p_error_when_not_exist IN VARCHAR2 DEFAULT 'TRUE') RETURN HR_ALL_ORGANIZATION_UNITS%ROWTYPE
670: --------------------------------------------------------------------------------
671: IS
672: l_csr RefCsr;
673: l_rec HR_ALL_ORGANIZATION_UNITS%ROWTYPE;
674: BEGIN
675: l_csr := csr_with_bus('HR_ALL_ORGANIZATION_UNITS','NAME','T',p_name,p_business_group_id);
676: fetch l_csr into l_rec;
677: if not csr_found_and_close(l_csr,p_error_when_not_exist) then
671: IS
672: l_csr RefCsr;
673: l_rec HR_ALL_ORGANIZATION_UNITS%ROWTYPE;
674: BEGIN
675: l_csr := csr_with_bus('HR_ALL_ORGANIZATION_UNITS','NAME','T',p_name,p_business_group_id);
676: fetch l_csr into l_rec;
677: if not csr_found_and_close(l_csr,p_error_when_not_exist) then
678: l_rec := NULL;
679: end if;