"ORA-20001: OTA_443321_EVT_OFF_INVALID_ACT: in the ota_event_api.create_class API
Hi all
I write scripts for an Oracle OLM implementation project. Converting data via the API "ota_event_api.create_class", I get the error "ORA-20001: OTA_443321_EVT_OFF_INVALID_ACT: I have looked for help on the forums, but so far I am unable to get any relevant information. On some sites it says that we should pass a value non-zero to 'p_offering_id '. I do the same thing and passing a value to this parameter but I get the same error.
The script is can be to find the attached word file.
Kind regards
Natacha Amal Khan
Dear Natasha
- You must ensure that your class shoud be created under a valid course and offer.
- Further, use Parent_Offering_Id instead of the Offering_Id parameter.
Make those changes and try again, Hope it works
Concerning
Fasquel
Tags: Oracle Applications
Similar Questions
-
ORA-20001: GET_BLOCK error. ORA-20001: Execution of the statement was due
Hello
We did an upgrade to 3.0 APEX to APEX 3.2.
When I tried to import an application I got the following error:
ORA-20001: GET_BLOCK error. ORA-20001: Execution of the statement was not successful. ORA-01756: Anfa¼hrungsstrich fehlt EIB Zeichenfolge & lt; pre & gt; Start run immediately "alter session set nls_numeric_characters =" ' | " wwv_flow_api.g_nls_numeric_chars | " ' ; end; & lt; / pre & gt;
I got the same error when I tried to import another APEX 3.2 application.
What I did wrong?
Thank you for your help.
Concerning
SiegwinHi Siegwin,
No, the language should not be a problem...?
Was the file transferred by FTP...? CR information can be a problem here when
Export on Unix/Linux and import on windows (or vice versa). You might consider re-export
He (note not only characters, but also the "File Format" setting) and be careful when
FTP file transfer (ascii / binary mode).If this does not work, you can try the following approach:
Import the file using SQL * Plus - you need to manually adjust space of work-ID and application ID.
at the beginning of the script. You will see the same error in SQL * Plus, but then it is easier to
find the position corrupted in the script and fix.Does that help?
Carsten-
-
error when using Ota_Event_Api.Create_class
the testingtab table has below the columns
EVENT,
COURSE_NAME,
EVENT_STATUS,
USER_STATUS,
EVENT_DATE,
LEARNER_STAFFNR,
LEARNER_NAME,
ENROLLMENT_STATUS,
UPLOAD_STATUS,
ERROR_MESSAGE
declare
loading of cursor is
Select *.
of testingtab t
where t.upload_status is null
AND UPPER (T.LEARNER_STAFFNR) = "S267455".
;
number of p_object_version_number;
number of p_event_id;
p_finance_line_id NUMBER;
NUMBER OF V_PERSON_ID;
v_err_message varchAr2 (2000);
p_booking_id NUMBER;
Start
I'm in loading
loop
Start
dbms_output.put_line ('staffno' |) ' ' || i.LEARNER_STAFFNR);
APPS. Ota_Event_Api.Create_class (p_effective_date = > i.Event_Date,)
p_event_id = > p_event_id,
p_vendor_id = > null,
p_activity_version_id = > null,
p_business_group_id = > 61
p_organization_id = > null,
p_event_type = > "REGULAR."
p_object_version_number = > p_object_version_number,
p_title = > APPS. OTA_EVENTS_S.NEXTVAL | '-' ||
"Project portfolio of training tool."
p_budget_cost = > null,
p_actual_cost = > null,
p_budget_currency_code = > null,
p_centre = > null,
p_comments = > null,
p_course_end_date = > null,
p_course_end_time = > null,
p_course_start_date = > null,
p_course_start_time = > null,
p_duration = > null,
p_duration_units = > null,
p_enrolment_end_date = > null,
p_enrolment_start_date = > null,
p_language_id = > null,
p_user_status = > null,
p_development_event_type = > null,
p_event_status = > null,
p_price_basis = > null,
p_currency_code = > null,
p_maximum_attendees = > null,
p_maximum_internal_attendees = > null,
p_minimum_attendees = > null,
p_standard_price = > null,
p_category_code = > null,
p_parent_event_id = > null,
p_book_independent_flag = > null,
p_public_event_flag = > null,
p_secure_event_flag = > null,
p_evt_information_category = > null,
p_evt_information1 = > null,
p_evt_information2 = > null,
p_evt_information3 = > null,
p_evt_information4 = > null,
p_evt_information5 = > null,
p_evt_information6 = > null,
p_evt_information7 = > null,
p_evt_information8 = > null,
p_evt_information9 = > null,
p_evt_information10 = > null,
p_evt_information11 = > null,
p_evt_information12 = > null,
p_evt_information13 = > null,
p_evt_information14 = > null,
p_evt_information15 = > null,
p_evt_information16 = > null,
p_evt_information17 = > null,
p_evt_information18 = > null,
p_evt_information19 = > null,
p_evt_information20 = > null,
p_project_id = > null,
p_owner_id = > null,
p_line_id = > null,
p_org_id = > null,
p_training_center_id = > null,
p_location_id = > null,
p_offering_id = > null,
p_timezone = > null,
p_parent_offering_id = > null,
p_data_source = > null,
p_validate = > false);
dbms_output.put_line ('ID' |) ' ' || p_event_id);
dbms_output.put_line ('objverno' |) ' ' ||
p_object_version_number);
dbms_output.put_line ('staffno' |) ' ' || i.LEARNER_STAFFNR);
dbms_output.put_line('---');
UPDATE testingtab T
SET T.EVENT_TITLE = p_event_id
WHERE T.LEARNER_STAFFNR = i.LEARNER_STAFFNR;
SELECT DISTINCT T.PERSON_ID
IN V_PERSON_ID
OF apps.per_all_people_f T
WHERE T.EMPLOYEE_NUMBER =
(SELECT SUBSTR (LEARNER_STAFFNR, 2))
OF testingtab
WHERE LEARNER_STAFFNR = i.LEARNER_STAFFNR);
APPS.ota_delegate_booking_api.create_delegate_booking (p_validate = > NULL,)
p_effective_date = > i.Event_Date,
p_booking_id = > p_booking_id,
p_booking_status_type_id = > 14,
p_delegate_person_id = > V_PERSON_ID,
p_contact_id = > 271010,
p_business_group_id = > 61
p_event_id = > p_event_id,
p_customer_id = > NULL,
p_authorizer_person_id = > NULL,
p_date_booking_placed = > i.Event_Date,
p_corespondent = > NULL,
p_internal_booking_flag = > 'Y ',.
p_number_of_places = > 1,
p_object_version_number = > p_object_version_number,
p_administrator = > NULL,
p_booking_priority = > NULL,
p_comments = > NULL,
p_contact_address_id = > NULL,
p_delegate_contact_phone = > NULL,
p_delegate_contact_fax = > NULL,
p_third_party_customer_id = > NULL,
p_third_party_contact_id = > NULL,
p_third_party_address_id = > NULL,
p_third_party_contact_phone = > NULL,
p_third_party_contact_fax = > NULL,
p_date_status_changed = > NULL,
p_failure_reason = > NULL,
p_attendance_result = > NULL,
p_language_id = > NULL,
p_source_of_booking = > null,
p_special_booking_instructions = > null,
p_successful_attendance_flag = > null,
p_tdb_information_category = > null,
p_tdb_information1 = > null,
p_tdb_information2 = > null,
p_tdb_information3 = > null,
p_tdb_information4 = > null,
p_tdb_information5 = > null,
p_tdb_information6 = > null,
p_tdb_information7 = > null,
p_tdb_information8 = > null,
p_tdb_information9 = > null,
p_tdb_information10 = > null,
p_tdb_information11 = > null,
p_tdb_information12 = > null,
p_tdb_information13 = > null,
p_tdb_information14 = > null,
p_tdb_information15 = > null,
p_tdb_information16 = > null,
p_tdb_information17 = > null,
p_tdb_information18 = > null,
p_tdb_information19 = > null,
p_tdb_information20 = > null,
p_create_finance_line = > null,
p_finance_header_id = > null,
p_currency_code = > null,
p_standard_amount = > null,
p_unitary_amount = > null,
p_money_amount = > null,
p_booking_deal_id = > null,
p_booking_deal_type = > null,
p_finance_line_id = > p_finance_line_id,
p_enrollment_type = > null,
p_organization_id = > null,
p_sponsor_person_id = > null,
p_sponsor_assignment_id = > null,
p_person_address_id = > null,
p_delegate_assignment_id = > null,
p_delegate_contact_id = > null,
p_delegate_contact_email = > null,
p_third_party_email = > null,
p_person_address_type = > null,
p_line_id = > null,
p_org_id = > null,
p_daemon_flag = > null,
p_daemon_type = > null,
p_old_event_id = > null,
p_quote_line_id = > null,
p_interface_source = > null,
p_total_training_time = > null,
p_content_player_status = > null,
p_score = > null,
p_completed_content = > null,
p_total_content = > null,
p_booking_justification_id = > null,
p_is_history_flag = > null,
p_override_prerequisites = > null,
p_override_learner_access = > null,
p_book_from = > null);
dbms_output.put_line ('p_booking_id' |) ' ' || p_booking_id);
dbms_output.put_line ('p_object_version_number' |) ' ' ||
p_object_version_number);
dbms_output.put_line ('p_finance_line_id' |) ' ' ||
p_finance_line_id);
UPDATE testingtab T
SET T.USER_STATUS = "DOWNLOADED".
WHERE T.LEARNER_STAFFNR = i.LEARNER_STAFFNR;
EXCEPTION
WHILE OTHERS THEN
v_err_message: = SQLERRM;
UPDATE testingtab T
SET T.USER_STATUS = 'ERROR', t.error_message is v_err_message
WHERE T.LEARNER_STAFFNR = i.LEARNER_STAFFNR;
dbms_output.put_line ('ERROD WHILE UPLOADINGstaffno' |) ' ' ||
i.LEARNER_STAFFNR);
dbms_output.put_line ('ERRORMESAGE' |) ' ' || v_err_message);
end;
end loop;
end;
his mistake by giving as ORA-20001: OTA_443321_EVT_OFF_INVALID_ACT
How to solve this problem.Classes cannot be created without a call to the savings.
p_offering_id is out of date according to the API, or it is used a replacement in case class is created.
Int he API, we need to specify p_parent_offering_id - although not a required parameter.To check to provide value and run the script.
Rajiv
Published by: 959323 on September 15, 2012 12:31 AM
-
error ORA-20001: in the window of the geolocation
When to access addresses, in packed geolocation application, I receive the following error message:
ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
Is this a bug in the application packed?
I use apex.oracle.com to test this packaged application...
Also not able to save an area of interest with a polygon
1 error has occurred
- Polygon of area of interest must be drawn on the map. (Go to the error)
Hello
In general, it should work - I have also tested the app on apex.oracle.com.
First question:
from your description, it seems that the packaged application installation did not create all or part required correctly tables.
Can you check (via SQL Workshop) that the tables EBA_SPATIAL_ADDRESSES, EBA_SPATIAL_IMAGES and EBA_SPATIAL_AOI exist...?
If this is not the case, try to remove and reinstall the application. One reason might be that your workspace quota is already maxed out and who
There is simply no space left for the required tables...
Question 2: the steps are:
1) click the icon 'blue' polygon on the map
2) click on the points of the polygon you want to draw
3) click 'Finish' in the lower corner of the map
(4) specify a name for the 'area of interest '.
5) click "Save".
Of course, this also requires the tables to be present...
Hope this helps
Best regards
Carsten-
-
Error ORA-20001 while trying to reset the password of Admin 4.2 Apex
Hello
I had to reset my password admin apex and tried to launch as below mentioned the apxchpwd.sql script, but I got an ORA-20001.
I checked in my console (OEM) the status of the user apex_040200 and status is expired, but not locked...
Any idea of the reason for the error?
This is the result I got while running the script:
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL > connect sys@mars as sysdba
Enter password: *.
Connected.
SQL > @apxchpwd
Syntax: SET SERVEROUTPUT {ON |} {OFF} [SIZE n]
[[MAST] {WRA [DETERIORATED] |}] WOR [D_WRAPPED] | TRU [NCATED]}]
Enter a lower value for the password for the user of the Application ADMIN Express.
Enter a password for the user ADMIN [] *.
Modified session.
.. .the ADMIN password
declare
*
ERROR on line 1:
ORA-20001: password validation failure
ORA-06512: at line 33 level
Hello
In fact, it seems to be a known issue with Apex 4.2.2 and there is a note in Metalink (support.oracle.com) on this subject:Doc ID 1579712.1
Although it is not documented while the script asks you a new password, you must keep in mind the following:
Password is not consistent with the rules of this site password complexity.
* Password must contain at least one alphabetic character ().
* Password must contain at least one punctuation character ().
* Password must contain at least one uppercase alphabetic character.
* Password must contain at least one alphabetic character tiny. -
Internal error in the routine mru: ORA-20001
Hello
I have a tabular presentation, what ointment to data, works very well. But what update of data following error occurs: error in routine internal mru: ORA-20001: current version of the data in the database has changed since the user has launched the process of update. current checksum.
Thanks for help e time.Happy to read that you have solved the problem
Please, mark the question as answered
-
I'm creating an application that uses the authentication of the APEX and characteristics (work) registration and forgot password forms (does not work).
My I forgot the password is public (requires authentication). The user provides the user name and a secret answer, which are validated and then provides the new password. I try to use htmldb_util.reset_pw to reset the password of the user, but it does not work.
I have a process on the new password page call a PL/SQL anonymous block that looks like this (see below), where username = P16_ITEM1 and P18_ITEM1 = new password.
BEGIN
apex_040000.htmldb_util.reset_pw (V ('P16_ITEM1'), V ('P18_ITEM1'));
END;
I don't know how to send a message of success/failure of such PL/SQL block to the APEX, but that's a separate issue, I guess.
In any case, during the trial through SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:
ORA-20001: unauthorized access (package for the undefined security group variable).
ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 22
ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 1220
ORA-06512: at "APEX_040000.HTMLDB_UTIL", line 1253
ORA-06512: at line 8 level
I've searched previous discussions and tried different suggestions with no luck.
I'm on Oracle DB 11g XE and APEX 4.x.
Any help will be appreciated. Thank you
Alex.In any case, during the trial through SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:
ORA-20001: unauthorized access (package for the undefined security group variable).
When executing code outside the Apex which depends on the security defined Apex group, perform the following steps before your own code:
wwv_flow_api.set_security_group_id(apex_util.find_security_group_id('YOUR_SCHEMA_NAME'));
Google "wwv_flow_api.set_security_group_id" for more details, like this blog:
http://www.easyapex.com/index.php?p=502
-Morten
http://ORA-00001.blogspot.com
-
ORA-20001: APP-FND-02604: one or more of the following data are not valid
Hello
I use the fnd_user_pkg.addResp procedure to add the responsibility of self-service to a group of users with the script below:
Start
for e in loop (SELECT a domain NAME)
-dbms_output.put_line (e.name); just to confirm the names are there
fnd_user_pkg.addResp (e.name, 'BY', 'CBK_EMPLOYEE_DIRECT_ACCESS', 'STANDARD', 'CBK Employee Self Service', sysdate, null);
end loop;
end;
*/*
eld table contains the names of users to add, in capital letters. When I try to run the script, it fails with the error:
ERROR on line 1:
ORA-20001: APP-FND-02604: one or more of the following data are not valid:
APPLICATION_SHORT_NAME =, RESPONSIBILITY_KEY = CBK_EMPLOYEE_DIRECT_ACCESS,
SECURITY_GROUP = STANDARD.
ORA-06512: at the 'APPS '. APP_EXCEPTION", line 72
ORA-06512: at the 'APPS '. FND_USER_PKG', line 2713
ORA-06512: at line 4 level
However when I run the procedure of inserting a single user at a time, it ends without error. A popular thought.
DulaHello
User_id = this will come from the fnd_user table?
Fix.
responsibility_application_id and responsibility_id = this will be retrieved through a query joining the tables?
You can find it in the FND_RESPONSIBILITY, FND_RESPONSIBILITY_TL tables... See the site for more details--> http://etrm.oracle.com eTRM
Thank you
Hussein -
Hi, I get this error msg
Internal error in the routine mru: ORA-20001: error in MRU: line = 1, ORA-20001: ORA-20001: current version of the data in the database has changed since the user has launched the process of update. current checksum
I'll try to show a picture of the form in which I can edit and add data
When I use the wizzard that's fine with editing but I cant creat a new element because I insert my primary key and that shoud be done automatically.
New on OK
My PK is the first col1 and col2 second
I got a drop-down list in which I choose an item in col1 to just display items in my form with this value, here is a possible results more
No, I want to change until col4 col2
or add a line with the same col1 col2 different and some values for col3 col4
But if I add a line I want to insert col2 to until col4 (and the PK of col1 shoud be automatically insert in my list of dropwdown I chose before)
I want to col2, a drop-down list
so it all works very well I got all the changes I want, but when I try register or update my changes I got the error above frome
I think the problem is the primary cause key thing I want to choose a part manually but I
to get the new line u uses the line link add but I use rather after my statement select one
Select Union: P62_PNR_VOll, null, null, null from double
to get my first pk automatically of my item in the drop-down list (in my case: P62_PNR_VOLL)
How can I solve this error?
thx for your help
regadrs
FalkHi Falk,
I ask you if there is already data in the table. You said no. :D
If you do not need the data, you can delete it. Otherwise, you will need to change your number sequence from 41 instead of 1.
To change your dialing sequence, you must file the sequence and recreate it. Run these two statements, one at a time.
DROP SEQUENCE "E_BEDARFSTRAEGER_ID_SEQ"
CREATE SEQUENCE "E_BEDARFSTRAEGER_ID_SEQ" MINVALUE 41 MAXVALUE 99999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE
Sometimes the trigger can become invalid by doing this, if yes, just run the following again:
ALTER TRIGGER "E_Bedarfstraeger_BI" ENABLE
Andy
-
Dear friends,
I get the error report:
ORA-20001: the print engine could not be reached because the URL is incorrect or a proxy URL must be specified.
then click on the link to print the report.
Print server the value-> advanced
Protocol-> Http
Host-> bieeserver
The printing-> 7877 server port
and the script->/xmlpserver/convert print server
I'm sure that the settings are correct, but I get the error
someone has an idea?
concerningHello
No problem, happy to help.
John.
--------------------------------------------
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
AWARDS: Don't forget to mark correct or useful posts on the forum, not only for my answers, but for everyone! -
ORA-20001: you cannot cancel termination that they did not yet end
Hi all
I'm trying to rehire an employee who stopped. This is the API that I use:
declare
date of ld_hr_termination_date: =' 31-DEC-4712;
Start
APPS.hr_ex_employee_api.reverse_terminate_employee
(p_validate = > false - Boolean false by default)
p_person_id = > 1059 - number
, p_actual_termination_date = > ld_hr_termination_date - ld_actual_termination_date - in date
, p_clear_details = > "n" - in varchar2
);
exception
while others then
dbms_output.put_line (' error: ' |) SQLERRM);
end;
Error: ORA-20001: you cannot cancel termination that they did not yet end
I checked in hr.per_all_people_f and the employee is laid off.
I checked in human resources. PER_PERIODS_OF_SERVICE and the ACTUAL_TERMINATION_DATE corresponding to its expiry date in hr.per_all_people_f.
I checked in hr.per_all_assignments_f and has an effective end date that corresponds.
Can you please tell me where I could look at to fix this error.
Thank you
Harsha.
Hello
You will need to move the effective date of the employee for the p_actual_termination_date parameter and not 31-Dec-4712.
Thank you
Mudassir
-
ORA-20001 FLEX-ID DOES NOT EXIST
Hi Experts,
Please experience this problem when you run create api Grade for HCM of Oracle EBS.
When I run this script below for business group (1759 University of Vision or Vision Corporation 202) data is transferred to the per_grades and per_grade_definitions tables
But when I run this same script pointing to a group of companies (TEST BG 7891) we created by us - even it gives ORA-20001 FLEX-ID DO NOT EXIST error code
I have a strong feeling that the creation of our group of companies and the setting up of the rank of Flexfield has a problem, but I can ' t trace the fault, am not an expert EBS
Please can you please advice if mistaken!
Thank you
Kwesi
SCRIPT BELOW:
Procedure Create_Grade
is
l_Validate Boolean: = FALSE;
l_Business_Group_id Number (15.2);
l_Date_From Date;
l_Sequence Number (15.2);
l_Grade_id Number (15.2);
l_Object_Version_Number Number (15.2);
l_Grade_Definition_id Number (15.2);
l_Name Varchar2 (100);
l_OVN Number (15.2): = 1;
I have several;
Begin
For Grad In (Select * from chr_Grades where FULL-TIME IN l_OVN) loop
Begin
Apps.hr_grade_api. () Create_Grade
p_Validate = > l_Validate,
p_Business_Group_id = > 7891,
p_Date_From = > to_Date(sysdate,'DD-MM-YYYY'),
p_Sequence = > 11,
p_Grade_id = > l_Grade_id,
p_Object_Version_Number = > l_Object_Version_Number,
p_Grade_Definition_id = > l_Grade_Definition_id,
p_Name = > l_Name,.
p_segment1 = > Grad.Grade_id,
p_segment2 = > Grad.Grade_Name,
p_segment3 = > Grad.Grade_Description
);
Update chr_Grades Set FULL-TIME = 2
where Grade_id = Grad.Grade_id;
End;
End of loop;
Commit;
End Create_Grade;
Well, I found the solution to my problem and is simply create the segment you want to use in your flexfield without VALUESET ALL IN PASSING.
-
ORA-20001: DateTrack update not allowed for a record that started today
Hello
We are working on the package of integration of data for employees in our project and we fail to create the back-end employee by calling hr_employee_api.create_employee.
When we try to update we have a flag that defines datetrack_update_mode as 'UPDATE' flag 'U' and 'CORRECTION' to report as 'C', we call hr_person_api.update_person to add more details of employee.
I'm trying to update an old record flagged as 'U' and to the below error
Error in the API in update employee ORA-20001: DateTrack update not allowed for a record that started today
Cause: You tried to perform an effective update date of registration which begins the same day.
Action: Change your mode of DateTrack of correction or to change your date of entry into force.
But I'm trying to update the record with effective date which does not have sysdate and logically I implement to pass the datetrack_update_mode as "UPDATE" fails with the above error.
Pointers on this is much appreciated.
Thanks in advance.
Kind regards
Rekha.OK, so the effective_start_date of the line you are trying to edit is 21/03/2012
You specify the parameter p_effective_date in 21/03/2012, i.e. the same day!
So, you cannot use the track date "UPDATE" mode, as the smallest length of the change of the date of the AMT is 1 day. To do this, like Gillies at in an earlier answer, is to use a date-track of "CORRECTION" mode, or use another date for your p_effective_date parameter if it is appropriate.
When the error message refers to "todays", means in fact "entry into force you have chosen.
Hope that clarifies things for you.
Clive
Published by: clive_t on April 4, 2012 08:40
-
Hello
Requirement: I call the hr_employee_api.create_employee API. I need fill a value in any attribute (specific or Global context).
I've defined attribute11 as FDF - global data item. But while calling the API, I get the error message like
ORA-20001: HR_52994_NON_EXIST_SEG_NAME: N, N, SEGMENT, VALUE, ATTRIBUTE11
Thanks in advance,
AryaI thing you have to insert at least a record of form (Fron end) and then check the value of the ATTRIBUTE_CATEGORY column in the per_all_people_f, may be you do not pass actegoary attribute correct as required for the FDF.
-Try.
-
Hello.
I hope someone can help. My script below takes the records to a temporary table and load it into ORACLE Financials via several API but on an initial test (using 1 NEW Record), it fails with the error message:
Employee no.: 00020206
ORACLE file processing error... ORA-20001: PAY_7599_SYS_SUP_DT_OUTDATE
Ive tried google, the error message but nothing - can suggest someone either what this may be or shsow me another way to get a more specific reason for the problem?
Thank you very much/* Formatted on 2009/04/29 11:52 (Formatter Plus v4.8.7) */ SET serveroutput ON SIZE 1000000 FORMAT WRAPPED SET verify OFF SET feedback OFF DECLARE -- ********* -- Debugging/error handling -- ********* -- ********* -- Work variables -- ********* l_employ_start_date DATE:= TO_DATE ('01-APR-1999', 'DD-MON-YYYY'); v_ora_loc_code number := 0; p_emp_number VARCHAR2 (14); v_rec_cnt NUMBER := 0; insert_flag VARCHAR2 (8); err_num NUMBER; err_msg VARCHAR2 (150); err_line VARCHAR2 (350); err_seq NUMBER := 0; l_validate BOOLEAN DEFAULT FALSE; l_std_business_group_id NUMBER := '0'; l_default_code_comb_id NUMBER := '218048'; l_organization_id NUMBER := '0'; l_set_of_books_id NUMBER := '1'; l_job_id NUMBER := '10'; l_obj NUMBER; l_datetrack_update_mode VARCHAR2 (30) := 'CORRECTION'; l_assignment_sequence NUMBER; l_name_combination_warning BOOLEAN := FALSE; l_assign_payroll_warning BOOLEAN := FALSE; l_org_now_no_manager_warning BOOLEAN; l_other_manager_warning BOOLEAN; l_spp_delete_warning BOOLEAN; l_entries_changed_warning VARCHAR2 (30); l_tax_district_changed_warning BOOLEAN; l_person_id NUMBER; l_assignment_id NUMBER; l_assignment_id2 NUMBER; -- := '28262'; l_special_ceiling_step_id NUMBER; l_per_effective_end_date DATE:= TO_DATE ('11-Jul-2049', 'DD-MON-YYYY'); l_people_group_id NUMBER; l_group_name VARCHAR2 (30); l_assignment_number VARCHAR2 (35); l_effective_end_date DATE := TO_DATE ('11-Jul-2049', 'DD-MON-YYYY'); l_date DATE := SYSDATE; ip_p_address_id per_addresses.address_id%TYPE; ip_p_object_version_number NUMBER; ip_p_party_id per_addresses.party_id%TYPE; l_per_object_version_number NUMBER; l_asg_object_version_number NUMBER; l_full_name VARCHAR2 (240); l_per_comment_id NUMBER; l_per_effective_start_date DATE; l_concatenated_segments VARCHAR2 (240); l_soft_coding_keyflex_id NUMBER; l_comment_id NUMBER; l_no_managers_warning BOOLEAN; -- *********************************** -- Get employee details info from work table -- *********************************** CURSOR get_employee_details IS SELECT std_hire_date, std_last_name, std_sex, std_date_of_birth, std_email_address, std_emp_status, LPAD (std_employee_number, 8, '0') std_employee_number, std_first_name, std_marital_status, std_middle_names, std_nationality, std_title, std_national_identifier, std_address_line1, std_address_line2, std_address_line3, std_address_line4, std_post_code, std_telephone_1, std_country, std_region, std_location_id, std_organization_id, std_supervisor_id, std_person_id, std_position_id FROM SU_TEMPLOYEE_DETAILS; -- *********************************** -- Get EXISTING employee details info from ORACLE tables -- *********************************** CURSOR get_existing_employee_details IS SELECT per.person_id, per.business_group_id, per.last_name, per.start_date, per.date_of_birth, per.email_address, per.employee_number, per.first_name, per.marital_status, per.middle_names, per.nationality, per.national_identifier, per.sex, per.title, padd.address_id, padd.primary_flag, padd.address_line1, padd.address_line2, padd.address_line3, padd.town_or_city, padd.postal_code, padd.telephone_number_1, paas.assignment_id, paas.assignment_number, paas.object_version_number, paas.EFFECTIVE_START_DATE, paas.job_id, paas.position_id, paas.location_id, paas.organization_id, paas.assignment_type, paas.supervisor_id, paas.default_code_comb_id, paas.set_of_books_id, paas.period_of_service_id FROM per_all_people_f per, per_all_assignments_f paas, per_addresses padd WHERE per.person_id = padd.person_id -- AND paas.person_id(+) = per.person_id; AND paas.person_id(+) = per.person_id; -- ***************************************** -- checks employee details info from PER_ALL_PEOPLE_F table -- ***************************************** CURSOR c_check_employee (p_emp_number VARCHAR2) IS SELECT per.person_id, per.business_group_id, per.last_name, per.start_date, per.date_of_birth, per.email_address, per.employee_number, per.first_name, per.marital_status, per.middle_names, per.nationality, per.national_identifier, per.sex, per.title, padd.address_id, padd.primary_flag, padd.address_line1, padd.address_line2, padd.address_line3, padd.town_or_city, padd.postal_code, padd.telephone_number_1, paas.assignment_id, paas.assignment_number, paas.object_version_number, paas.EFFECTIVE_START_DATE, paas.job_id, paas.position_id, paas.location_id, paas.organization_id, paas.assignment_type, paas.supervisor_id, paas.default_code_comb_id, paas.set_of_books_id, paas.period_of_service_id FROM per_all_people_f per, per_all_assignments_f paas, per_addresses padd WHERE per.employee_number = p_emp_number AND per.person_id = padd.person_id AND paas.person_id(+) = per.person_id; emp_rec c_check_employee%ROWTYPE; -- *************************************************** -- Cursor retrieves latest Object Version Number from per_assignments_f table.. -- *************************************************** CURSOR csr_ovn (cp_person_id IN per_all_people_f.person_id%TYPE) IS SELECT MAX (paas.object_version_number) FROM per_assignments_f paas, per_all_people_f per WHERE paas.person_id = per.person_id AND per.employee_number = paas.assignment_number AND per.person_id = cp_person_id; -- *************************************************** -- Cursor to get Oracle_Loc_Code from SU CHRIS vs ORACLE Locations Table into a variable.. -- *************************************************** CURSOR csr_ora_loc_code (cp_location_id IN SU_TEMPLOYEE_DETAILS.std_location_id%TYPE) IS SELECT sil.ORACLE_LOC_CODE FROM SU_TEMPLOYEE_DETAILS std, SU_IEXP_LOCATIONS sil WHERE std.STD_LOCATION_ID = sil.CHRIS_LOC_code AND std.STD_LOCATION_ID = cp_location_id; BEGIN -- *********************************** -- Process each record in the work table -- *********************************** FOR v_emp IN get_employee_details LOOP -- ************************************ -- determine whether customer already exists -- ************************************ OPEN c_check_employee (v_emp.std_employee_number); FETCH c_check_employee INTO emp_rec; l_assignment_id2 := emp_rec.assignment_id; IF v_emp.std_emp_status = 'N' and c_check_employee%NOTFOUND THEN insert_flag := 'I'; DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number); ELSIF v_emp.std_emp_status = 'C' THEN -- if c_check_employee%NOTFOUND then raise no_data_found; -- elsif l_assignment_id2 is null then if l_assignment_id2 is null then raise_application_error (-20010, 'Employee No: ' || v_emp.std_employee_number || ' exists but has no assignment id!'); end if; DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number || ' already exists, making changes.. ' ); insert_flag := 'C'; -- RAISE_APPLICATION_ERROR (-20001, 'Employee No: ' || v_emp.std_employee_number || ' already exists ' ); END IF; CLOSE c_check_employee; -- ************************************ -- Obtain the most recent Object Version Number.. -- ************************************ OPEN csr_ovn (v_emp.std_person_id); FETCH csr_ovn INTO l_obj; -- IF csr_ovn%NOTFOUND THEN RAISE NO_DATA_FOUND; END IF; CLOSE csr_ovn; -- ************************************ -- Open Oracle Location Code cursor -- ************************************ OPEN csr_ora_loc_code(v_emp.std_location_id); FETCH csr_ora_loc_code INTO v_ora_loc_code; CLOSE csr_ora_loc_code; -- *********************************** -- Create new PER_ALL_PEOPLE_F and PER_ADDRESSES record from -- info in table record -- *********************************** IF insert_flag = 'I' THEN -- -- Importing Employee Procedure -- Hr_Employee_Api.create_gb_employee (p_validate => l_validate, p_hire_date => l_employ_start_date, p_business_group_id => l_std_business_group_id, p_date_of_birth => v_emp.std_date_of_birth, p_email_address => v_emp.std_email_address, p_first_name => v_emp.std_first_name, p_middle_names => v_emp.std_middle_names, p_last_name => v_emp.std_last_name, p_sex => v_emp.std_sex, p_ni_number => v_emp.std_national_identifier, p_employee_number => v_emp.std_employee_number, p_person_id => l_person_id, p_title => v_emp.std_title, p_assignment_id => l_assignment_id, p_per_object_version_number => l_per_object_version_number, p_asg_object_version_number => l_asg_object_version_number, p_per_effective_start_date => l_per_effective_start_date, p_per_effective_end_date => l_per_effective_end_date, p_full_name => l_full_name, p_per_comment_id => l_per_comment_id, p_assignment_sequence => l_assignment_sequence, p_assignment_number => l_assignment_number, p_name_combination_warning => l_name_combination_warning, p_assign_payroll_warning => l_assign_payroll_warning ); Hr_Person_Address_Api.create_person_address (p_validate => l_validate, -- p_effective_date => v_emp.std_hire_date, p_effective_date => l_employ_start_date, p_pradd_ovlapval_override => NULL, p_validate_county => NULL, p_person_id => l_person_id, p_primary_flag => 'Y', p_style => 'GB_GLB', p_date_from => SYSDATE, p_date_to => NULL, p_address_type => NULL, p_comments => NULL, p_address_line1 => v_emp.std_address_line1, p_address_line2 => v_emp.std_address_line2, p_address_line3 => v_emp.std_address_line3, p_town_or_city => v_emp.std_address_line4, p_region_1 => NULL, p_region_2 => NULL, p_region_3 => NULL, p_postal_code => v_emp.std_post_code, p_country => v_emp.std_nationality, p_telephone_number_1 => NULL, p_telephone_number_2 => NULL, p_telephone_number_3 => NULL, p_party_id => ip_p_party_id, p_address_id => ip_p_address_id, p_object_version_number => l_obj ); Hr_Assignment_Api.update_emp_asg (p_validate => l_validate, p_effective_date => SYSDATE, -- l_date, p_datetrack_update_mode => l_datetrack_update_mode, p_assignment_id => l_assignment_id, p_object_version_number => l_obj, p_supervisor_id => v_emp.std_supervisor_id, p_default_code_comb_id => l_default_code_comb_id, p_set_of_books_id => l_set_of_books_id, p_concatenated_segments => l_concatenated_segments, --IN/OUT p_soft_coding_keyflex_id => l_soft_coding_keyflex_id, --IN/OUT p_comment_id => l_comment_id, --IN/OUT p_effective_start_date => l_date, --IN/OUT p_effective_end_date => l_effective_end_date, --IN/OUT p_no_managers_warning => l_no_managers_warning, --IN/OUT p_other_manager_warning => l_other_manager_warning --IN/OUT ); Hr_Assignment_Api.update_emp_asg_criteria (p_validate => l_validate, p_effective_date => SYSDATE, -- l_date, p_datetrack_update_mode => l_datetrack_update_mode, p_assignment_id => l_assignment_id, p_object_version_number => l_obj, p_organization_id => l_organization_id, p_location_id => v_ora_loc_code, p_job_id => l_job_id, p_position_id => v_emp.std_position_id, p_special_ceiling_step_id => l_special_ceiling_step_id, p_effective_start_date => l_date, --per_effective_start_date, p_effective_end_date => l_effective_end_date, --IN/OUT p_people_group_id => l_people_group_id, --IN/OUT p_group_name => l_group_name, --IN/OUT p_org_now_no_manager_warning => l_org_now_no_manager_warning, --IN/OUT p_other_manager_warning => l_other_manager_warning, --IN/OUT p_spp_delete_warning => l_spp_delete_warning, --IN/OUT p_entries_changed_warning => l_entries_changed_warning, --IN/OUT p_tax_district_changed_warning => l_tax_district_changed_warning --IN/OUT ); v_rec_cnt := v_rec_cnt + 1; DBMS_OUTPUT.PUT (CHR (10)); DBMS_OUTPUT.PUT_LINE ( 'There were ' || v_rec_cnt || ' records read in..' ); -- *********************************** -- Updating PER_ALL_PEOPLE_F and PER_ADDRESSES record from -- info in table record -- *********************************** ELSE IF insert_flag = 'C' THEN -- =================================================== -- these next 6 lines is for the initial mass update of existing employee records only -- =================================================== /*IF emp_rec.default_code_comb_id is NULL THEN l_default_code_comb_id = 218048; END IF; IF emp_rec.job_id is NULL THEN l_job_id = 10; END IF; */ -- ========= -- Section end -- ========= Hr_Assignment_Api.update_emp_asg (p_validate => l_validate, p_effective_date => emp_rec.EFFECTIVE_START_DATE, p_datetrack_update_mode => l_datetrack_update_mode, p_assignment_id => l_assignment_id2, p_object_version_number => l_obj, p_supervisor_id => v_emp.std_supervisor_id, p_default_code_comb_id => emp_rec.default_code_comb_id, p_set_of_books_id => emp_rec.set_of_books_id, p_concatenated_segments => l_concatenated_segments, --IN/OUT p_soft_coding_keyflex_id => l_soft_coding_keyflex_id, --IN/OUT p_comment_id => l_comment_id, --IN/OUT p_effective_start_date => l_date, --IN/OUT p_effective_end_date => l_effective_end_date, --IN/OUT p_no_managers_warning => l_no_managers_warning, --IN/OUT p_other_manager_warning => l_other_manager_warning --IN/OUT ); Hr_Assignment_Api.update_emp_asg_criteria (p_validate => l_validate, p_effective_date => emp_rec.EFFECTIVE_START_DATE, p_datetrack_update_mode => l_datetrack_update_mode, p_assignment_id => l_assignment_id2, p_object_version_number => l_obj, p_organization_id => emp_rec.organization_id, p_location_id => v_ora_loc_code, p_job_id => emp_rec.job_id, p_position_id => emp_rec.position_id, p_special_ceiling_step_id => l_special_ceiling_step_id, p_effective_start_date => emp_rec.EFFECTIVE_START_DATE, p_effective_end_date => l_effective_end_date, --IN/OUT p_people_group_id => l_people_group_id, --IN/OUT p_group_name => l_group_name, --IN/OUT p_org_now_no_manager_warning => l_org_now_no_manager_warning, --IN/OUT p_other_manager_warning => l_other_manager_warning, --IN/OUT p_spp_delete_warning => l_spp_delete_warning, --IN/OUT p_entries_changed_warning => l_entries_changed_warning, --IN/OUT p_tax_district_changed_warning => l_tax_district_changed_warning --IN/OUT ); v_rec_cnt := v_rec_cnt + 1; DBMS_OUTPUT.PUT (CHR (10)); DBMS_OUTPUT.PUT_LINE ( 'There were ' || v_rec_cnt || ' records read in..' ); DBMS_OUTPUT.PUT (CHR (10)); -- ****************************** -- End of customer related details -- ****************************** END IF; END IF; END LOOP; COMMIT; EXCEPTION WHEN NO_DATA_FOUND THEN ROLLBACK; err_num := TO_CHAR (SQLCODE); err_msg := SUBSTR (SQLERRM, 1, 150); err_line := 'ORACLE error occurred processing record.. ' || err_msg; DBMS_OUTPUT.PUT_LINE (err_line); INSERT INTO SU_ERROR_LOG VALUES (err_msg, 'TEMPLOYEE_DTLS.sql', SYSTIMESTAMP); WHEN OTHERS THEN ROLLBACK; err_num := TO_CHAR (SQLCODE); err_msg := SUBSTR (SQLERRM, 1, 150); err_line := 'ORACLE error occurred processing record.. ' || err_msg; DBMS_OUTPUT.PUT_LINE (err_line); INSERT INTO SU_ERROR_LOG VALUES (err_msg, 'TEMPLOYEE_DTLS.sql', SYSTIMESTAMP); END; / EXIT;
StevenIt seems that the employee supervisor is not active for the duration of the employee record.
Recording using correct supervisor should solve the problem.
Maybe you are looking for
-
How can I open firefox in safe mode?
I can find is no longer a way to open firefox in safe mode, I was able to before the latest version
-
Portege R930 - 14 X and additional software
Hello I recently acquired a Toshiba Portege R930 - 14 X, a friend. It is running Windows Pro 8.1, it came with any disks etc. It does not seem to have any of the supplied software, he would come with out of the box. Please excuse that my ignorance, b
-
Please contact me. IPhone4 ignited and burned!
Dear Apple support, Please contact me. My Iphone 4S selfigniting this morning around 06:00 h. Burns like *. Had to run outside with him, all open windows, and we had to sleep somewhere else (children's room). We were lucky because we woke up! A comp
-
My Synaptics Touchpad some time become automatically more sensitive. I don't know how. Adjustment I make sensitive average but it automatically after that some time, become more sensitive because what I can't select anything correctly. I recentl
-
I am trying to install the update of security for the Microsoft.NET Framework 1.1 SP1 on Windows Vista (13.7 MB) I get an error code 643. I followed all the methods listed in Windows Support and this update continues to not settle. Does anyone know h