Monday, April 18, 2016
This post is for Updating JOBS in HR Module. I have prepared a small script which can used to update the JOBS in Oracle Apps R12. Before we get into script, let have a brief introduction to related tables.
- PER_JOB_GROUPS is used to group records contained in PER_JOBS. Each Job Group has to be within a business group unless the profile option HR: Cross Business Group Profile is set to 'N' in which case a Job Group can have a NULL Business Group (considered to be a Global Job Group). Jobs in Global Job Groups can be viewed across the system. All HR jobs, i.e., those jobs used within the HRMS system, must be defined within a 'Default HR Job Group'. The default HR Job Group is created at the same time a Business Group is created.
- PER_JOBS holds jobs that have been defined for a Business Group. The
NAME is a concatenation of key flexfield segments, held in PER_JOB_DEFINITIONS. Jobs define the role that an employee can perform in the business group, and they are independent of specific organizations. Each Job is contained within a Job Group.
- PER_JOBS_TL: Translated columns for per_jobs
- PER_JOB_DEFINITIONS is a key flexfield combinations table. It holds
the segment combinations for jobs that are stored in PER_JOBS. Oracle
Applications do not support code combinations IDs that exceed 2,000,000,000.
Tested Version: R12.2.4
lv_lang VARCHAR2(50) DEFAULT 'US';
lv_job VARCHAR2(2000) DEFAULT 'SHARE.ORACLEAPPS';
lv_new_job_name VARCHAR2(200) DEFAULT 'SHARE.ORACLEAPPSNEW';
-- get job details
WHERE name = lv_job;
WHEN OTHERS THEN
dbms_output.put_line('Unable to get the job details.Error:'||SQLERRM);
(p_validate => FALSE
,p_job_id => ln_job_id
,p_object_version_number => ln_object_version_number
,p_comments => 'TEST JOB Updated'
,p_concat_segments => lv_new_job_name
,p_language_code => lv_lang
,p_job_definition_id => ln_job_definition_id
,p_name => lv_job
,p_valid_grades_changed_warning => lb_valid_grades_changed_warn
,p_effective_date => SYSDATE
DBMS_OUTPUT.PUT_LINE('JOB ID: '||ln_job_id);
WHEN OTHERS THEN
dbms_output.put_line('Unable to create a job.Error:'||SQLERRM);
API to Create Job: http://www.shareoracleapps.com/2016/04/api-to-create-hr-jobs-in-oracle-apps-R12-hrjobsapi-createjob.html
Happy Sharing!! Enjoy Learning!!
Do you think this Article is useful?
The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.