835: IS
836:
837: CURSOR c_alt_id IS
838: SELECT api_person_id
839: FROM igs_pe_alt_pers_id
840: WHERE pe_person_id = p_person_id
841: AND person_id_type
842: IN (SELECT person_id_type
843: FROM igs_pe_person_id_typ
1860:
1861: CURSOR c_alternate_id(cp_system_person_id_type igs_pe_person_id_typ.s_person_id_type%TYPE) IS
1862: SELECT palt.api_person_id_uf,
1863: palt.region_cd
1864: FROM igs_pe_alt_pers_id palt,
1865: igs_pe_person_id_typ typv
1866: WHERE typv.s_person_id_type = cp_system_person_id_type
1867: AND palt.person_id_type = typv.person_id_type
1868: AND palt.pe_person_id = p_person_rec.person_id
1867: AND palt.person_id_type = typv.person_id_type
1868: AND palt.pe_person_id = p_person_rec.person_id
1869: AND SYSDATE BETWEEN palt.start_dt AND NVL(palt.end_dt,SYSDATE);
1870:
1871: l_drivers_license IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1872: l_drivers_license_state IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1873: l_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1874: l_new_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1875: l_taxid IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1868: AND palt.pe_person_id = p_person_rec.person_id
1869: AND SYSDATE BETWEEN palt.start_dt AND NVL(palt.end_dt,SYSDATE);
1870:
1871: l_drivers_license IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1872: l_drivers_license_state IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1873: l_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1874: l_new_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1875: l_taxid IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1876: l_not_valid BOOLEAN := FALSE;
1869: AND SYSDATE BETWEEN palt.start_dt AND NVL(palt.end_dt,SYSDATE);
1870:
1871: l_drivers_license IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1872: l_drivers_license_state IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1873: l_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1874: l_new_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1875: l_taxid IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1876: l_not_valid BOOLEAN := FALSE;
1877: l_region_cd IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1870:
1871: l_drivers_license IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1872: l_drivers_license_state IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1873: l_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1874: l_new_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1875: l_taxid IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1876: l_not_valid BOOLEAN := FALSE;
1877: l_region_cd IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1878: lv_region_cd IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1871: l_drivers_license IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1872: l_drivers_license_state IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1873: l_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1874: l_new_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1875: l_taxid IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1876: l_not_valid BOOLEAN := FALSE;
1877: l_region_cd IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1878: lv_region_cd IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1879:
1873: l_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1874: l_new_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1875: l_taxid IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1876: l_not_valid BOOLEAN := FALSE;
1877: l_region_cd IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1878: lv_region_cd IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1879:
1880: BEGIN
1881: /* Debug */
1874: l_new_ssn IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1875: l_taxid IGS_PE_ALT_PERS_ID.api_person_id%TYPE;
1876: l_not_valid BOOLEAN := FALSE;
1877: l_region_cd IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1878: lv_region_cd IGS_PE_ALT_PERS_ID.region_cd%TYPE;
1879:
1880: BEGIN
1881: /* Debug */
1882: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
4603:
4604: CURSOR c_get_sevis_user_id(c_dep_id NUMBER)
4605: IS
4606: SELECT alt.api_person_id
4607: FROM igs_pe_alt_pers_id alt
4608: WHERE
4609: alt.pe_person_id = c_dep_id AND
4610: alt.person_id_type IN (SELECT person_id_type FROM igs_pe_person_id_typ
4611: WHERE s_person_id_type = 'SEVIS_ID') AND
11639:
11640: CURSOR c_get_dso_id(c_person_id igs_pe_ev_form.person_id%TYPE)
11641: IS
11642: SELECT alt.api_person_id, alt.pe_person_id
11643: FROM hz_relationships rel, igs_pe_alt_pers_id alt
11644: WHERE rel.subject_id = c_person_id and
11645: rel.object_id = alt.pe_person_id AND
11646: sysdate between alt.start_dt and nvl(alt.end_dt,sysdate+1) AND
11647: sysdate between rel.start_date AND nvl(end_date, sysdate) AND
13019:
13020: -- Update sevis id
13021: -- end date current one (if any)
13022:
13023: UPDATE igs_pe_alt_pers_id
13024: SET end_dt = trunc(sysdate)
13025: WHERE pe_person_id = p_person_id
13026: AND person_id_type
13027: IN (SELECT person_id_type
13034: FETCH c_alt INTO l_alt_id;
13035: CLOSE c_alt;
13036:
13037: -- Insert new
13038: IGS_PE_ALT_PERS_ID_PKG.INSERT_ROW (
13039: X_ROWID => l_rowid,
13040: X_PE_PERSON_ID => p_person_id,
13041: X_API_PERSON_ID => p_sevisID,
13042: X_API_PERSON_ID_UF => p_sevisID,