74: /*-----------------------------------------------------+
75: | Cursor for finding a person party from person_id |
76: +-----------------------------------------------------*/
77: CURSOR per_person_party_cur(l_per_person_id
78: per_all_people_f.person_id%TYPE) IS
79: SELECT pp.party_id
80: FROM hz_parties pp
81: , per_all_people_f per
82: WHERE pp.orig_system_reference = 'PER:'||per.person_id
77: CURSOR per_person_party_cur(l_per_person_id
78: per_all_people_f.person_id%TYPE) IS
79: SELECT pp.party_id
80: FROM hz_parties pp
81: , per_all_people_f per
82: WHERE pp.orig_system_reference = 'PER:'||per.person_id
83: AND per.person_id = l_per_person_id;
84:
85: /*-----------------------------------------------------+
191: | since a per person is allowed to have multiple |
192: | fnd users. |
193: | |
194: | For now we rely on the ORIG_SYSTEM_REFERENCE in |
195: | HZ_PARTIES to link to PER_ALL_PEOPLE_F |
196: | |
197: | After HR Merge into TCA, we should use the PARTY_ID |
198: | in PER_ALL_PEOPLE_F. Creating a Person Party |
199: | for a HR Person can be obsolete since a party will |
194: | For now we rely on the ORIG_SYSTEM_REFERENCE in |
195: | HZ_PARTIES to link to PER_ALL_PEOPLE_F |
196: | |
197: | After HR Merge into TCA, we should use the PARTY_ID |
198: | in PER_ALL_PEOPLE_F. Creating a Person Party |
199: | for a HR Person can be obsolete since a party will |
200: | be created when a HR person is created |
201: | |
202: +-----------------------------------------------------*/
419: /*===================================================================+
420: | PRIVATE procedure Create_Per_Person_Party
421: |
422: | DESCRIPTION
423: | Create a party for a per_all_people_f person if it has not
424: | already created. The concept here is that we believe that
425: | HR person is more reliable resource than email_address for
426: | the fnd users that are already assigned a per_all_people.
427: |
432: |
433: | PSEUDO CODE/LOGIC
434: |
435: | PARAMETERS
436: | p_per_person_id Person Identifier for PER_ALL_PEOPLE_F
437: |
438: |
439: | RETURNS
440: | x_party_id Party Identifier
452: x_party_id OUT NOCOPY NUMBER) IS
453:
454: /*-----------------------------------------------------+
455: | Cursor for fetching a person record from |
456: | per_all_people_f for creating a person party. |
457: | |
458: | Note: We don't try to do a full mapping here. |
459: | That will be done in TCA/HR merge. |
460: | Only minimal information is populated here for UI |
460: | Only minimal information is populated here for UI |
461: | to display basic personal information about a user |
462: +-----------------------------------------------------*/
463: CURSOR per_person_cur(l_per_person_id
464: per_all_people_f.person_id%TYPE) IS
465: SELECT per.person_id,
466: per.first_name,
467: per.last_name,
468: per.email_address
465: SELECT per.person_id,
466: per.first_name,
467: per.last_name,
468: per.email_address
469: FROM per_all_people_f per
470: WHERE per.person_id = l_per_person_id
471: AND TRUNC(SYSDATE) BETWEEN effective_start_date
472: AND effective_end_date;
473:
492: FETCH per_person_cur INTO per_person_rec;
493: CLOSE per_person_cur;
494:
495: --
496: -- Raise an exception if PER_ALL_PEOPLE_F not found.
497: --
498:
499: --
500: -- Create a Person Party