472: select fnd_user.employee_id
473: into v_auc_contact_id
474: from
475: fnd_user,
476: hz_relationships
477: where
478: fnd_user.user_id = fnd_global.user_id()
479: and hz_relationships.object_id = v_site_id
480: and hz_relationships.subject_id = fnd_user.person_party_id
475: fnd_user,
476: hz_relationships
477: where
478: fnd_user.user_id = fnd_global.user_id()
479: and hz_relationships.object_id = v_site_id
480: and hz_relationships.subject_id = fnd_user.person_party_id
481: and hz_relationships.relationship_type = 'POS_EMPLOYMENT'
482: and hz_relationships.relationship_code = 'EMPLOYEE_OF'
483: and hz_relationships.start_date <= SYSDATE
476: hz_relationships
477: where
478: fnd_user.user_id = fnd_global.user_id()
479: and hz_relationships.object_id = v_site_id
480: and hz_relationships.subject_id = fnd_user.person_party_id
481: and hz_relationships.relationship_type = 'POS_EMPLOYMENT'
482: and hz_relationships.relationship_code = 'EMPLOYEE_OF'
483: and hz_relationships.start_date <= SYSDATE
484: and hz_relationships.end_date >= SYSDATE
477: where
478: fnd_user.user_id = fnd_global.user_id()
479: and hz_relationships.object_id = v_site_id
480: and hz_relationships.subject_id = fnd_user.person_party_id
481: and hz_relationships.relationship_type = 'POS_EMPLOYMENT'
482: and hz_relationships.relationship_code = 'EMPLOYEE_OF'
483: and hz_relationships.start_date <= SYSDATE
484: and hz_relationships.end_date >= SYSDATE
485: and nvl(fnd_user.end_date,sysdate) >= sysdate;
478: fnd_user.user_id = fnd_global.user_id()
479: and hz_relationships.object_id = v_site_id
480: and hz_relationships.subject_id = fnd_user.person_party_id
481: and hz_relationships.relationship_type = 'POS_EMPLOYMENT'
482: and hz_relationships.relationship_code = 'EMPLOYEE_OF'
483: and hz_relationships.start_date <= SYSDATE
484: and hz_relationships.end_date >= SYSDATE
485: and nvl(fnd_user.end_date,sysdate) >= sysdate;
486: exception
479: and hz_relationships.object_id = v_site_id
480: and hz_relationships.subject_id = fnd_user.person_party_id
481: and hz_relationships.relationship_type = 'POS_EMPLOYMENT'
482: and hz_relationships.relationship_code = 'EMPLOYEE_OF'
483: and hz_relationships.start_date <= SYSDATE
484: and hz_relationships.end_date >= SYSDATE
485: and nvl(fnd_user.end_date,sysdate) >= sysdate;
486: exception
487: when others then
480: and hz_relationships.subject_id = fnd_user.person_party_id
481: and hz_relationships.relationship_type = 'POS_EMPLOYMENT'
482: and hz_relationships.relationship_code = 'EMPLOYEE_OF'
483: and hz_relationships.start_date <= SYSDATE
484: and hz_relationships.end_date >= SYSDATE
485: and nvl(fnd_user.end_date,sysdate) >= sysdate;
486: exception
487: when others then
488: v_auc_contact_id := null;
2233: v_debug_status := 'TRADING_PARTNER_CONTACT';
2234:
2235: BEGIN
2236: SELECT object_id INTO x_trading_partner_contact_id
2237: FROM hz_relationships
2238: WHERE subject_id = x_trading_partner_id
2239: AND relationship_type = 'CONTACT'
2240: AND relationship_code = 'CONTACT_OF'
2241: AND start_date < Sysdate