/* Formatted on 21/09/2010 2:53:37 PM (QP5 v5.149.1003.31008) */
DECLARE
l_business_group_id
NUMBER;l_person_id
NUMBER;l_person_type_id
number ;l_contact_type
VARCHAR2 (80);l_start_date
DATE;l_last_name
VARCHAR2 (30);l_first_name
VARCHAR2 (30);l_middle_names
VARCHAR2 (30);x_contact_relationship_id
NUMBER;x_ctr_object_version_number
NUMBER;x_per_person_id
NUMBER;x_per_object_version_number
NUMBER;x_per_effective_start_date
DATE;x_per_effective_end_date
DATE;x_full_name
VARCHAR2 (240);x_per_comment_id
NUMBER;x_name_combination_warning
BOOLEAN;x_orig_hire_warning
BOOLEAN;BEGIN
l_start_date
:= trunc(sysdate);l_business_group_id
:= 176;l_person_id
:= 8508;l_contact_type
:= 'OR'; -- select lookup_code From fnd_lookup_values where 1 = 1 and meaning = 'Other Relative' and lookup_type = 'CONTACT' and ENABLED_FLAG = 'Y'l_last_name
:= 'TEST';l_person_type_id
:= 87; -- select person_type_id from per_person_types where USER_PERSON_TYPE = 'Contact' and business_group_id = 176l_first_name
:= 'CONTACTAPI';dbms_output.put_line
('START ');hr_contact_rel_api.
create_contact
(p_validate => FALSE,p_start_date
=> l_start_date,p_business_group_id
=> l_business_group_id,p_person_id
=> l_person_id,p_contact_type
=> l_contact_type,p_last_name
=> l_last_name,p_person_type_id
=> l_person_type_id,p_third_party_pay_flag
=> 'Y' ,p_first_name
=> l_first_name,p_contact_relationship_id
=> x_contact_relationship_id,p_ctr_object_version_number
=> x_ctr_object_version_number,p_per_person_id
=> x_per_person_id,p_per_object_version_number
=> x_per_object_version_number,p_per_effective_start_date
=> x_per_effective_start_date,p_per_effective_end_date
=> x_per_effective_end_date,p_full_name
=> x_full_name,p_per_comment_id
=> x_per_comment_id,p_name_combination_warning
=> x_name_combination_warning,p_orig_hire_warning
=> x_orig_hire_warning );dbms_output.put_line
('END AMIT'); --DBMS_OUTPUT.put_line('l_contact_relationship_id :'|| x_contact_relationship_id); --DBMS_OUTPUT.put_line('l_ctr_object_version_number :'||x_ctr_object_version_number);-- DBMS_OUTPUT.put_line('l_per_person_id :'|| x_per_person_id);
--DBMS_OUTPUT.put_line('l_per_object_version_number :'||x_per_object_version_number); --DBMS_OUTPUT.put_line('l_per_effective_start_date :'||x_per_effective_start_date); --DBMS_OUTPUT.put_line('l_per_effective_end_date :'||x_per_effective_end_date); -- DBMS_OUTPUT.put_line('l_full_name :'||x_full_name); --DBMS_OUTPUT.put_line('l_per_comment_id :'||x_per_comment_id); --DBMS_OUTPUT.put_line('l_name_combination_warning :'||x_name_combination_warning); -- DBMS_OUTPUT.put_line('l_orig_hire_warning :'||x_orig_hire_warning);end;
Thanks
Amit