Wednesday, April 13, 2016

This post is for migrating JOBS. I have
prepared a small script which can used to create 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

Script:

DECLARE

lv_group_nameVARCHAR2(200):='SHARE_GROUP';

ln_business_group_idNUMBER;

ln_job_group_idNUMBER;

ln_job_idNUMBER;

ln_object_version_number NUMBER;

ln_job_definition_idNUMBER;

lv_job_nameVARCHAR2(200);

BEGIN

--
get group id and business group id

BEGIN

SELECT business_group_id,

job_group_id

INTO ln_business_group_id,

ln_job_group_id

FROM per_job_groups

WHERE displayed_name = lv_group_name;

EXCEPTION

WHENOTHERSTHEN

dbms_output.put_line('Unable to get the job
group details.Error:'||SQLERRM);

Do you think this Article is useful?

Post a Comment

Disclaimer

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.