Who's Online
1 registered (spiro), 3 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Recent Posts
Pension Schemes Setup
by kp_rapolu
Today at 03:09 PM
RBAC and Security Profiles
by CT
Today at 02:05 PM
Q: multiple assignments absence processing
by CT
Today at 12:34 PM
How managers initiates SSHR request of employees
by Saqib Rahat
Today at 09:00 AM
French Localizations
by bcooper
Yesterday at 07:11 AM
Setting up budgets in HRMS
by MarinaH
Yesterday at 06:06 AM
Attach documents in the SIT/EIT
by MarinaH
Yesterday at 03:09 AM
Talent management function in self service menu
by EBS_USER
06/09/10 11:23 PM
Basic Setup for CORE HR without Payroll
by EBS_USER
06/09/10 11:17 PM
FYI: P60s to be available in Self Service
by kp_rapolu
01/09/10 03:42 PM
Top Posters (30 Days)
SBi 31
CT 16
bcooper 15
Saqib Rahat 11
PeterP 10
EBS_USER 9
kp_rapolu 8
Geoff Dixon 8
delboy 5
MarinaH 5
(Views)Popular Topics
Family Pack K issues thread 8849
CREATE_GRADE api returns:PLS-00306: wrong number o 6175
Still trying to locate... 4660
Creating hr jobs ORA-20001: HR_289477_JOB_GROUP_ID 4444
Review of my Release 12 laptop 4226
Log-on problems for existing users 3538
Viewing Output of another user 3261
Family Pack K 3128
October UK-OUG? 3090
HR_PF.K RUP4 2908
Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#3311 - 14/07/08 11:49 AM Creating hr jobs ORA-20001: HR_289477_JOB_GROUP_ID *****
tovia123 Offline
hanger-on

Registered: 14/05/08
Posts: 69
Loc: UK
Hi

I am trying to load jobs from my temp/staging table in oracle to oracle hrms:

Code for my jobs api call package is here:
http://pastebin.com/m704097f6

I setup jobs flexfield as:

2 segments

job name
job desc

allow dynmic insert is set to on, etc..

then i ran the above api to load jobs information into oracle but i get strange error:

ERROR at line 1:
ORA-20001: HR_289477_JOB_GROUP_ID
ORA-06512: at "APPS.HR_JOB_API", line 878
ORA-06512: at "APPS.XXcompany_PKG_JOBS", line 58
ORA-06512: at line 1

I am confused, i even set job_group_id manually in the api call which in my code above as 21, which it is.
but Still gave me the same error.

Thanks in advance

Tovia Singer

Top
#3312 - 14/07/08 12:48 PM Re: Creating hr jobs ORA-20001: HR_289477_JOB_GROUP_ID [Re: tovia123]
SBi Offline
claiming squatters rights

Registered: 23/05/08
Posts: 291
Loc: UK
Check whether you are populating the concat_segments.

Top
#3313 - 14/07/08 01:20 PM Re: Creating hr jobs ORA-20001: HR_289477_JOB_GROU [Re: SBi]
CT Offline
veteran
***

Registered: 11/03/05
Posts: 820
Loc: Back at Fort Apache, Gosport!
Hello Tovia

Can I ask, how are you executing this procedure?

If you're running it as a standalone piece of code in a SQL or TOAD session, then I can see why it might not be delivering what you expect. I've looked at the package procedure PER_JOB_BUS.chk_job_group_id, and the thing that becomes immediately apparent is that it should work nicely provided you've supplied an appropriate value for business group id.

However, looking at your driving code that calls the api, you appear to be setting the business group by making a call to FND_PROFILE.value('PER_BUSINESS_GROUP_ID')

By way of a simple check, can you try setting the business group to an appropriate value, to see if you get past that problem? Also, whilst you are about it, can I please make another couple of suggestions:

1. If you're using sysdate as some kind of reference date, it's a very good idea to TRUNC it, in order to remove the time component. e.g. v_date_from DATE:=TRUNC(SYSDATE);

2. You will note that the parameter p_job_definition_id is defined as IN OUT - now the first time you call the api, the value you supply is NULL (as you haven't explicitly set the variable up as any particular value). On successful completion of the API, it will supply the value of the job_definition_id back to the calling procedure via that same parameter. However, the next call for the next job will end up passing back in that same value returned from the previous call. That will cause problems because the job definition id you 'gave' it will not match the values for the segments. To get round this, you need to explicitly set the variable v_job_definition_id to NULL just before calling the API.

Hope this helps





Edited by CT (14/07/08 01:20 PM)
_________________________
L&K
CT

Top
#3316 - 14/07/08 02:46 PM Re: Creating hr jobs ORA-20001: HR_289477_JOB_GROU [Re: CT]
tovia123 Offline
hanger-on

Registered: 14/05/08
Posts: 69
Loc: UK
Hi CT

Thanks for the reply, your a genius,
i set the business group id manually, and alsi did trunc on sysdate, and set: v_job_definition_id NUMBER:=NULL;

updated code: http://pastebin.com/d7ce018bb

Whats happend now is its said procedure succesfully completed,
Howevere when i checked: per_jobs only old jobs where ion there not teh ones i tried to load using the api. And i also checke teh application:

hrms uk super user
workstructures > job > Description

So i then ran the proceudre again and it said:

ERROR at line 1:
ORA-20001: The job you have entered already exists in this Business Group. Please enter a unique na
ORA-06512: at "APPS.HR_JOB_API", line 878
ORA-06512: at "APPS.XXH3G_PKG_JOBS", line 46
ORA-06512: at line 1

but thats not true,

the only thing i can think of is:

Application Developer > Application: Lookups > Common
COMPANY_HR_JOB_FUNCTION

HERE I ENETERD ALL THE JOB FUNCTIONS MANUALLY.

AND UNDER THE LOOKUP:
COMPANY_HR_JOB_TITLE

I ENTERED ALL THE JOB TITLES MANUALLY AS WELL.

Now i was atempting to load job_codes, eg:

Personal Assistant.Administration
Personal Assistant.Human Resources
Planner.Engineering (Networks)
Planner.Engineering (Operations)
Planner.Engineering (Technology)
Planner.Marketing


However Personal Assistant only exists under COMPANY_HR_JOB_TITLE lookup, and Administration for the first job above exists only in the lookups: COMPANY_HR_JOB_FUNCTION,

They dont exist as a combination in: per_Jobs name field.

So does that mean i have to create all my jobs using the above two lookup values which are visible when i go to:

workstructures > job > Description

?

I have too many jobs: 436 jobs in total.

Shall i remove the lookup value values?

by the way job_code in my temp table where i loaded all my jobs stores the values as:
Planner.Engineering (Operations)
Planner.Engineering (Technology)


Thanks in advance

Tovia Singer











Top
#3318 - 14/07/08 03:17 PM Re: Creating hr jobs ORA-20001: HR_289477_JOB_GROU [Re: tovia123]
CT Offline
veteran
***

Registered: 11/03/05
Posts: 820
Loc: Back at Fort Apache, Gosport!
So when you say you can't see the jobs, how are you trying to find them?

Try to find them using the creation date:

SELECT *
FROM PER_JOBS
WHERE creation_date > trunc(sysdate);

and see what comes back...

Plainly the validation of the job name uniqueness (performed by PER_JOB_BUS.chk_unique_name) is finding them as you're getting that message...
_________________________
L&K
CT

Top
#3319 - 14/07/08 03:18 PM Re: Creating hr jobs ORA-20001: HR_289477_JOB_GROU [Re: CT]
tovia123 Offline
hanger-on

Registered: 14/05/08
Posts: 69
Loc: UK
Hi CT

Also when i try to find the job.desc in: workstrrtures > job > description

I get the error:
app-fnd-00906: You can only query existing flexfield combinations.
You entered query criteria...

Does that mean my api didnt create/ load the job?

job menaing the combination of the two segments as i epxlained eralier


Thanks in advance

Tovia Singer

Top
#3320 - 14/07/08 03:22 PM Re: Creating hr jobs ORA-20001: HR_289477_JOB_GROU [Re: CT]
tovia123 Offline
hanger-on

Registered: 14/05/08
Posts: 69
Loc: UK
Hi CT

Interesting: The first job(first record) in my company_jobs table (temp table) returned when i ran:
SELECT *
FROM PER_JOBS
WHERE creation_date > trunc(sysdate);

which is:

Manager.Engineering (Operations)

the rets arent there

thanks in advance

Tovia

Top
#3321 - 14/07/08 03:44 PM Re: Creating hr jobs ORA-20001: HR_289477_JOB_GROU [Re: tovia123]
CT Offline
veteran
***

Registered: 11/03/05
Posts: 820
Loc: Back at Fort Apache, Gosport!
Hi Tovia

I'm a little confused - which, for those who know me, will not be a surprise...

This process is all about creating jobs that don't exist, yes? And yet for each pass of the source table there is at the start of the loop a check to see if the job name already exists, and log a message if it doesn't!

Could you possibly explain what that particular bit of code is intended to achieve?
Actually I think I've just sussed it:

I suspect this will work right up to the point where that little query actually finds a job id. Thereafter, even if the next row to be processed is not found, the previous value of v_job_id will be unchanged. In other words, not finding a row in per_jobs will NOT set the v_job_id to null! In the immediate term therefore, you need to force that v_job_id to null at the start of the loop.
_________________________
L&K
CT

Top
#3323 - 14/07/08 04:10 PM Re: Creating hr jobs ORA-20001: HR_289477_JOB_GROU [Re: CT]
CT Offline
veteran
***

Registered: 11/03/05
Posts: 820
Loc: Back at Fort Apache, Gosport!
Oh and while you're about it, from looking at the updated code you still need to reset the job_definition_id, like:

BEGIN

FOR v_emp_jobs IN cur_job_emp LOOP
--
v_job_id := null;
v_job_definition_id := null;
--
BEGIN
SELECT job_id
INTO v_job_id
FROM per_jobs
WHERE name=v_emp_jobs.job_code;
:
:
etc
_________________________
L&K
CT

Top
#3324 - 14/07/08 04:11 PM Re: Creating hr jobs ORA-20001: HR_289477_JOB_GROU [Re: CT]
tovia123 Offline
hanger-on

Registered: 14/05/08
Posts: 69
Loc: UK
Hi CT

Thanks so much, i am still getting error:

ERROR at line 1:
ORA-20001: The job you have entered already exists in this Business Group.
Please enter a unique name for your job.
ORA-06512: at "APPS.HR_JOB_API", line 878
ORA-06512: at "APPS.XXH3G_PKG_JOBS", line 46
ORA-06512: at line 1

i set v_job_id NUMBER:=NULL; updated the code here:
http://pastebin.com/d3b255130

thanks in advance

Tovia

Top
Page 1 of 2 1 2 >


Moderator:  bcooper, CT 
Oracle R12.1.1 on your existing computer
Get up and running with Oracle on your existing computer in 5 minutes

Get up and running with Oracle on your existing computer in 5 minutes!

Alard Consulting Ltd are pleased to offer Oracle R12.1.1 on your existing computer.

Connect to Oracle R12 from your computer to do client demonstrations, your own development work, or test functional setup on a Vision environment without having to install and maintain Oracle.

Backup your work before making changes in case things go wrong. Just copy the files to a new directory before making the changes. If it doesn't work, copy the files back again, all from Windows. No other skills needed.

As everything is contained on a single external hard drive, you can take it with you to use wherever you need it.

For each sale from HCMAces a portion of the price will go to the running costs of this forum.

For more information see www.alard.net/products.html.

Forum Stats
494 Members
48 Forums
1213 Topics
5734 Posts

Max Online: 51 @ 12/08/10 02:30 AM
Today's Birthdays
No Birthdays
Recent vacancies
Top Posters
bcooper 945
CT 820
Geoff Dixon 354
SBi 291
delboy 291
vkumar 223
kp_rapolu 211
cbrookes 197
Gavin Harris 111
jmoyano 96
September
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30