Single Insert Script for HRMS Competence Element for JOBS/Positions
DECLARE
L_BUSINESS_GROUP_ID NUMBER :=81 ;
l_competence_id NUMBER :=5001;
l_assessment_type_id NUMBER;
L_COMPETENCE_TYPE_CODE VARCHAR2(30);
l_validate BOOLEAN :=FALSE;
L_PARENT_COMPETENCE_ELEMENT_ID NUMBER;
L_COMPETENCE_ELEMENT_ID NUMBER;
l_object_version_number NUMBER;
l_status VARCHAR2(5) := 'True';
error_msg VARCHAR2(1000);
l_validate_count NUMBER;
l_group_count NUMBER;
l_competence_count NUMBER;
l_assess_count NUMBER;
l_group_exists VARCHAR2(5);
l_competence_exists VARCHAR2(5);
l_total_records NUMBER := 0;
l_success_records NUMBER := 0;
L_FAILURE_RECORDS number := 0;
l_position_id NUMBER:=202201;
L_DATE_EFFECTIVE DATE;
-- l_job_id NUMBER:=460;
BEGIN
FND_GLOBAL.APPS_INITIALIZE(USER_ID=>15062, RESP_ID=>50939, RESP_APPL_ID=>800);
BEGIN
HR_COMPETENCE_ELEMENT_API.CREATE_COMPETENCE_ELEMENT (P_VALIDATE => L_VALIDATE ,
P_EFFECTIVE_DATE => '01-JAN-2012' ,
P_BUSINESS_GROUP_ID =>L_BUSINESS_GROUP_ID ,
P_TYPE => 'REQUIREMENT' ,
P_COMPETENCE_ID=>L_COMPETENCE_ID ,
P_POSITION_ID =>L_POSITION_ID ,
P_EFFECTIVE_DATE_FROM=>'01-JAN-2012' ,
P_COMPETENCE_ELEMENT_ID => L_COMPETENCE_ELEMENT_ID ,
P_OBJECT_VERSION_NUMBER => L_OBJECT_VERSION_NUMBER );
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('err:'||SQLERRM);
END;
dbms_output.put_line('Comp:'||l_competence_element_id||l_object_version_number);
END;
DECLARE
L_BUSINESS_GROUP_ID NUMBER :=81 ;
l_competence_id NUMBER :=5001;
l_assessment_type_id NUMBER;
L_COMPETENCE_TYPE_CODE VARCHAR2(30);
l_validate BOOLEAN :=FALSE;
L_PARENT_COMPETENCE_ELEMENT_ID NUMBER;
L_COMPETENCE_ELEMENT_ID NUMBER;
l_object_version_number NUMBER;
l_status VARCHAR2(5) := 'True';
error_msg VARCHAR2(1000);
l_validate_count NUMBER;
l_group_count NUMBER;
l_competence_count NUMBER;
l_assess_count NUMBER;
l_group_exists VARCHAR2(5);
l_competence_exists VARCHAR2(5);
l_total_records NUMBER := 0;
l_success_records NUMBER := 0;
L_FAILURE_RECORDS number := 0;
l_position_id NUMBER:=202201;
L_DATE_EFFECTIVE DATE;
-- l_job_id NUMBER:=460;
BEGIN
FND_GLOBAL.APPS_INITIALIZE(USER_ID=>15062, RESP_ID=>50939, RESP_APPL_ID=>800);
BEGIN
HR_COMPETENCE_ELEMENT_API.CREATE_COMPETENCE_ELEMENT (P_VALIDATE => L_VALIDATE ,
P_EFFECTIVE_DATE => '01-JAN-2012' ,
P_BUSINESS_GROUP_ID =>L_BUSINESS_GROUP_ID ,
P_TYPE => 'REQUIREMENT' ,
P_COMPETENCE_ID=>L_COMPETENCE_ID ,
P_POSITION_ID =>L_POSITION_ID ,
P_EFFECTIVE_DATE_FROM=>'01-JAN-2012' ,
P_COMPETENCE_ELEMENT_ID => L_COMPETENCE_ELEMENT_ID ,
P_OBJECT_VERSION_NUMBER => L_OBJECT_VERSION_NUMBER );
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('err:'||SQLERRM);
END;
dbms_output.put_line('Comp:'||l_competence_element_id||l_object_version_number);
END;
No comments:
Post a Comment