Thursday, January 3, 2013

Single Insert Script for HRMS JOB Creation

 Single Insert Script for HRMS JOBS Creation 

DECLARE
     L_VALIDATE                             BOOLEAN := FALSE;
     L_BUSINESS_GROUP_ID                    NUMBER := 81;
     L_DATE_FROM                            DATE;
     L_DATE_TO                              DATE := NULL;
     L_BENCHMARK_JOB_FLAG                   VARCHAR2(5) := 'N';
     L_BENCHMARK_JOB_ID                     NUMBER := NULL;
     L_EMP_RIGHTS_FLAG                      VARCHAR2(5) := 'N';
     L_JOB_GROUP_ID                         NUMBER := 21;
     L_SEGMENT1                             VARCHAR2(250);
     L_SEGMENT2                             VARCHAR2(250);
     L_JOB_ID                               NUMBER;
     L_OBJECT_VERSION_NUMBER                NUMBER;
     L_JOB_DEFINITION_ID                    NUMBER;
     L_NAME                                 VARCHAR2(250);
 
BEGIN
HR_JOB_API.CREATE_JOB(
   P_VALIDATE              => L_VALIDATE
  ,P_BUSINESS_GROUP_ID     => L_BUSINESS_GROUP_ID          
  ,P_DATE_FROM             => '01-JAN-1981'                          
  ,P_DATE_TO               => L_DATE_TO                       
  ,P_BENCHMARK_JOB_FLAG    => L_BENCHMARK_JOB_FLAG       
  ,P_BENCHMARK_JOB_ID      => L_BENCHMARK_JOB_ID       
  ,P_EMP_RIGHTS_FLAG       => L_EMP_RIGHTS_FLAG       
  ,P_JOB_GROUP_ID          => L_JOB_GROUP_ID     
  ,P_SEGMENT1              => 'Accountant'
  ,P_SEGMENT2              => 'Professionals'     
  ,P_JOB_ID                => L_JOB_ID       
  ,P_OBJECT_VERSION_NUMBER => L_OBJECT_VERSION_NUMBER
  ,P_JOB_DEFINITION_ID     => L_JOB_DEFINITION_ID
  ,P_NAME                  => L_NAME);
EXCEPTION
  WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('err:'||SQLERRM);
END;
/
COMMIT;
/

No comments: