1: PACKAGE BODY hr_h2pi_bg_upload AS
2: /* $Header: hrh2pibg.pkb 120.0 2005/05/31 00:38:20 appldev noship $ */
3:
4: g_package VARCHAR2(33) := ' hr_h2pi_bg_upload.';
5: MAPPING_ID_INVALID EXCEPTION;
1: PACKAGE BODY hr_h2pi_bg_upload AS
2: /* $Header: hrh2pibg.pkb 120.0 2005/05/31 00:38:20 appldev noship $ */
3:
4: g_package VARCHAR2(33) := ' hr_h2pi_bg_upload.';
5: MAPPING_ID_INVALID EXCEPTION;
6: MAPPING_ID_MISSING EXCEPTION;
7: PRAGMA EXCEPTION_INIT (MAPPING_ID_MISSING, -20010);
8:
323: PROCEDURE upload_hr_organization (p_from_client_id NUMBER) AS
324:
325: CURSOR csr_orgs (p_bg_id NUMBER) IS
326: SELECT DISTINCT organization_id,
327: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 1) hr_org,
328: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 2) class,
329: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 3) info
330: FROM hr_h2pi_hr_organizations
331: WHERE (status IS NULL OR status <> 'C')
324:
325: CURSOR csr_orgs (p_bg_id NUMBER) IS
326: SELECT DISTINCT organization_id,
327: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 1) hr_org,
328: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 2) class,
329: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 3) info
330: FROM hr_h2pi_hr_organizations
331: WHERE (status IS NULL OR status <> 'C')
332: AND client_id = p_bg_id
325: CURSOR csr_orgs (p_bg_id NUMBER) IS
326: SELECT DISTINCT organization_id,
327: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 1) hr_org,
328: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 2) class,
329: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 3) info
330: FROM hr_h2pi_hr_organizations
331: WHERE (status IS NULL OR status <> 'C')
332: AND client_id = p_bg_id
333: UNION
331: WHERE (status IS NULL OR status <> 'C')
332: AND client_id = p_bg_id
333: UNION
334: SELECT DISTINCT organization_id,
335: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 1) hr_org,
336: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 2) class,
337: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 3) info
338: FROM hr_h2pi_organization_class
339: WHERE (status IS NULL OR status <> 'C')
332: AND client_id = p_bg_id
333: UNION
334: SELECT DISTINCT organization_id,
335: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 1) hr_org,
336: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 2) class,
337: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 3) info
338: FROM hr_h2pi_organization_class
339: WHERE (status IS NULL OR status <> 'C')
340: AND client_id = p_bg_id
333: UNION
334: SELECT DISTINCT organization_id,
335: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 1) hr_org,
336: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 2) class,
337: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 3) info
338: FROM hr_h2pi_organization_class
339: WHERE (status IS NULL OR status <> 'C')
340: AND client_id = p_bg_id
341: UNION
339: WHERE (status IS NULL OR status <> 'C')
340: AND client_id = p_bg_id
341: UNION
342: SELECT DISTINCT organization_id,
343: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 1) hr_org,
344: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 2) class,
345: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 3) info
346: FROM hr_h2pi_organization_info
347: WHERE (status IS NULL OR status <> 'C')
340: AND client_id = p_bg_id
341: UNION
342: SELECT DISTINCT organization_id,
343: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 1) hr_org,
344: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 2) class,
345: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 3) info
346: FROM hr_h2pi_organization_info
347: WHERE (status IS NULL OR status <> 'C')
348: AND client_id = p_bg_id
341: UNION
342: SELECT DISTINCT organization_id,
343: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 1) hr_org,
344: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 2) class,
345: hr_h2pi_bg_upload.org_exists(p_from_client_id,organization_id, 3) info
346: FROM hr_h2pi_organization_info
347: WHERE (status IS NULL OR status <> 'C')
348: AND client_id = p_bg_id
349: ORDER BY organization_id;
1020: RETURN l_retval;
1021:
1022: END;
1023:
1024: END hr_h2pi_bg_upload;