Home » Applications » Oracle Fusion Apps & E-Business Suite » hrms api (r12)
hrms api [message #408944] |
Thu, 18 June 2009 07:21 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
i have to override this api. here i have not given any validations but this procedure is not working fine. can any one please let em know where i am going wrong
CREATE OR REPLACE PACKAGE BODY SON_CREATE_ASSGMT_PKG
AS
/***************************************************************
**
**
** Package : SON_CREATE_ASSGMT_PKG .pkb(package body)
** $Logfile : $
** $Creation Date : 18/06/2009
** $Author : Monika Bhakuni
**
** (C) Copyright:
**
** ------------------------------------------------------------
**
** Description : The package body contains procedure for
** Creating employee asignments data to Apps
** tables using the API procedure
**
** EQHDOK
** ------------------------------------------------------------
**
** $Log: $
**
**************************************************************/
PROCEDURE Create_assignment(errbuf out varchar2,retcode out varchar2)
IS
l_total_records NUMBER;
l_success_records NUMBER := 0;
l_failure_records NUMBER := 0;
l_flag CHAR := 'Y';
l_organisation_id Number;
l_organisation_name Varchar2(100);
l_Job_id NUmber;
l_Job_name Varchar2(100);
l_grade_id Number;
l_Grade_name Varchar2(100);
l_Location_id Number;
l_Location_name Varchar2(100);
l_Group_id Number;
l_Person_id Number;
l_Group_name Varchar2(100);
l_Position_id Number;
l_Position_name Varchar2(100);
l_Payroll_id Number;
l_Payroll_name Varchar2(100);
l_status Varchar2(100);
l_Assignment_number Number;
l_Assignment_type Varchar2(10);
l_Salary_basis Varchar2(100);
l_supervisor_id Number;
l_supervisor_name Varchar2(100);
l_supervisor_assignment_id Number;
l_effective_date Date;
l_working_hours Varchar2(10);
l_frequency Varchar2(100);
l_Time_normal_start Varchar2(10);
l_Time_normal_finish Varchar2(10);
l_Probation_Unit Varchar2(100);
l_Probation_Period Number;
l_Date_Probation_end Date;
l_Notice_period Number;
l_Notice_Period_UOM Varchar2(30);
--l_mar_status_code varchar2(100);
/* Cusror to get records from the temporary table */
CURSOR assn
IS
SELECT LINEID,table_STATUS,ERROR_MESSAGE,assignment_id,organisation_id,organisation_name,Job_id,Job_name,grade_id,Grade_name,Location_id,Loc ation_name,Group_id,
Group_name,Position_id,Position_name,Payroll_id,Payroll_name,status,Assignment_number,Assignment_type,Salary_basis,supervisor_id,
supervisor_name ,supervisor_assignment_id,effective_date,working_hours,frequency,Time_normal_start,Time_normal_finish, Probation_Unit,
Probation_Period,Date_Probation_end,Notice_period,Notice_Period_UOM
FROM xx_assignment_api_test;
BEGIN
SELECT COUNT (*)
INTO l_total_records
FROM xx_assignment_api_test;
FOR i IN assn
LOOP
/* The API is called with the relevent parameters */
BEGIN
--l_assignment_number :=i.assignment_number;
hr_assignment_api.update_emp_asg_criteria
(hr_assignment_api.update_emp_asg_criteria
(p_effective_date => i.effective_date,
p_datetrack_update_mode => 'CORRECTION',
p_assignment_id => i.assignment_id,
-- p_called_from_mass_update => NULL, -- commented the following as null value updated for emploment category #479488
-- p_grade_id => i.grade_id, -- commented for Iltis #522390 -- Added for Iltis#515268
p_position_id => i.position_id,
p_job_id => i.job_id,
p_payroll_id => i.payroll_id,
p_location_id => i.location_id,
p_organization_id =>i.organization_id,
p_pay_basis_id => NULL,
p_segment2 => NULL,
p_segment3 => NULL,
p_segment4 => NULL,
-- p_employment_category => NULL, -- commented the following as null value updated for emploment category #479488
-- p_concat_segments => NULL,
-- p_contract_id => NULL,
-- p_establishment_id => NULL,
-- p_scl_segment1 => NULL,
-- p_grade_ladder_pgm_id => NULL,
-- p_supervisor_assignment_id => NULL,
p_object_version_number => NULL,
p_special_ceiling_step_id => NULL,
p_people_group_id => 225,
p_soft_coding_keyflex_id => 1043,
p_group_name => i.group_name,
p_effective_start_date => to_date(sysdate),
p_effective_end_date => to_date(sysdate+10),
p_org_now_no_manager_warning => 'ABC',
p_other_manager_warning => 'XYZ',
p_spp_delete_warning => 'DEF',
p_entries_changed_warning => 'NULL',
p_tax_district_changed_warning => 'WARN',
p_concatenated_segments => NULL,
p_gsp_post_process_warning => 'WASN'
);
END;
END LOOP;
commit;
END Create_assignment;
/*--End of package--------*/
END SON_CREATE_ASSGMT_PKG;
/
|
|
|
|
Re: hrms api [message #409287 is a reply to message #408963] |
Mon, 22 June 2009 00:07 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
hi,
can you please let me know the mandatory parameters as
i am geting the error
Please find the attached txt document.. and please let me know where i am going wrong.. or what i am missing
|
|
|
|
Re: hrms api [message #409334 is a reply to message #409314] |
Mon, 22 June 2009 03:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
Hi Santosh,
Thanks a lot it is working now.
I had a doubt that i need to take values from the temporary table that i will be creating. I just wanted to know if it will work or not. As in the procedure provided by you we are taking values from the base tables.
can you please tell me the the mandatory parameters for hr_assignment_api.update_gb_emp_asg as i need to override this also.
Best Regards,
Monika
|
|
|
|
Re: hrms api [message #409343 is a reply to message #409340] |
Mon, 22 June 2009 04:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
monikabhakuni
Messages: 110 Registered: September 2008 Location: India
|
Senior Member |
|
|
hi santosh,
this is my temporary table structure.
create table xx_assignment_api_test(
LINEID NUMBER(10),
table_STATUS VARCHAR2(1000 BYTE),
ERROR_MESSAGE VARCHAR2(1000 BYTE),
Assignment_id Number(10),
organisation_id Number(10),
organisation_name Varchar2(1000 BYTE),
Job_id Number(10),
Job_name Varchar2(1000 BYTE),
grade_id Number(10),
Grade_name Varchar2(1000 BYTE),
Location_id Number(10),
Location_name Varchar2(1000 BYTE),
Group_id Number(10),
Group_name Varchar2(1000 BYTE),
Position_id Number(10),
Position_name Varchar2(1000 BYTE),
Payroll_id Number(10),
Payroll_name Varchar2(1000 BYTE),
status Varchar2(1000 BYTE),
Assignment_number Number(10),
Assignment_type Varchar2(1000 BYTE),
Salary_basis Varchar2(1000 BYTE),
supervisor_id Number(10),
supervisor_name Varchar2(1000 BYTE),
supervisor_assignment_id Number(10),
effective_date Date default sysdate,
working_hours Varchar2(1000 BYTE),
frequency Varchar2(1000 BYTE),
Time_normal_start Varchar2(1000 BYTE),
Time_normal_finish Varchar2(1000 BYTE),
Probation_Unit Varchar2(1000 BYTE),
Probation_Period Number(10),
Date_Probation_end Date,
Notice_period Number(10),
Notice_Period_UOM Varchar2(1000 BYTE)
)
and this is the package i m running.
CREATE OR REPLACE PACKAGE BODY SON_CREATE_ASSGMT_PKG
AS
/***************************************************************
**
**
** Package : SON_CREATE_ASSGMT_PKG .pkb(package body)
** $Logfile : $
** $Creation Date : 18/06/2009
** $Author : Monika Bhakuni
**
** (C) Copyright:
**
** ------------------------------------------------------------
**
** Description : The package body contains procedure for
** Creating employee asignments data to Apps
** tables using the API procedure
**
** EQHDOK
** ------------------------------------------------------------
**
** $Log: $
**
**************************************************************/
PROCEDURE Create_assignment(errbuf out varchar2,retcode out varchar2)
IS
l_total_records NUMBER;
l_success_records NUMBER := 0;
l_failure_records NUMBER := 0;
l_flag CHAR := 'Y';
l_organisation_id Number;
l_organisation_name Varchar2(100);
l_Job_id NUmber;
l_Job_name Varchar2(100);
l_grade_id Number;
l_Grade_name Varchar2(100);
l_Location_id Number;
l_Location_name Varchar2(100);
l_Group_id Number;
l_Person_id Number;
l_Group_name Varchar2(100);
l_Position_id Number;
l_Position_name Varchar2(100);
l_Payroll_id Number;
l_Payroll_name Varchar2(100);
l_status Varchar2(100);
l_Assignment_number Number;
l_Assignment_type Varchar2(10);
l_Salary_basis Varchar2(100);
l_supervisor_id Number;
l_supervisor_name Varchar2(100);
l_supervisor_assignment_id Number;
l_effective_date Date;
l_working_hours Varchar2(10);
l_frequency Varchar2(100);
l_Time_normal_start Varchar2(10);
l_Time_normal_finish Varchar2(10);
l_Probation_Unit Varchar2(100);
l_Probation_Period Number;
l_Date_Probation_end Date;
l_Notice_period Number;
l_Notice_Period_UOM Varchar2(30);
--l_mar_status_code varchar2(100);
x_object_version_number NUMBER;
x_people_group_id NUMBER;
x_soft_coding_keyflex_id NUMBER;
x_concatenated_segments VARCHAR2 (500);
x_special_ceiling_step_id NUMBER;
x_group_name VARCHAR2 (500);
x_effective_start_date DATE;
x_effective_end_date DATE;
x_other_manager_warning BOOLEAN;
x_org_now_no_manager_warning BOOLEAN;
x_spp_delete_warning BOOLEAN;
x_entries_changed_warning VARCHAR2 (500);
x_tax_district_changed_warning BOOLEAN;
x_assignment_id NUMBER;
x_assignment_number Varchar2(50);
x_cagr_grade_def_id NUMBER;
/* Cusror to get records from the temporary table */
CURSOR assn
IS
SELECT LINEID,table_STATUS,ERROR_MESSAGE,assignment_id,organisation_id,organisation_name,Job_id,Job_name,grade_id,Grade_name,Location_id,Loc ation_name,Group_id,
Group_name,Position_id,Position_name,Payroll_id,Payroll_name,status,Assignment_number,Assignment_type,Salary_basis,supervisor_id,
supervisor_name ,supervisor_assignment_id,effective_date,working_hours,frequency,Time_normal_start,Time_normal_finish, Probation_Unit,
Probation_Period,Date_Probation_end,Notice_period,Notice_Period_UOM
FROM xx_assignment_api_test;
BEGIN
/*
SELECT paaf.effective_start_date
,paaf.object_version_number
,paaf.assignment_id
,paaf.assignment_number
,paaf.cagr_grade_def_id
,paaf.soft_coding_keyflex_id
,paaf.people_group_id
,paaf.special_ceiling_step_id
INTO x_effective_start_date
,x_object_version_number
,x_assignment_id
,x_assignment_number
,x_cagr_grade_def_id
,x_soft_coding_keyflex_id
,x_people_group_id
,x_special_ceiling_step_id
FROM per_all_people_f ppf, per_all_assignments_f paaf
WHERE ppf.person_id = paaf.person_id
AND TRUNC (SYSDATE) BETWEEN ppf.effective_start_date AND ppf.effective_end_date
AND ppf.current_employee_flag = 'Y'
AND ppf.person_type_id = (SELECT person_type_id
FROM per_person_types
WHERE user_person_type = 'Employee')
AND paaf.object_version_number = (SELECT MAX (object_version_number)
FROM per_all_assignments_f
WHERE assignment_number = '4')
AND ppf.employee_number = '12345';
*/
FOR i IN assn
LOOP
/* The API is called with the relevent parameters */
BEGIN
hr_assignment_api.update_emp_asg_criteria
(p_validate => FALSE
,p_effective_date => TRUNC (SYSDATE) -- Mandatory
,p_datetrack_update_mode => 'CORRECTION' -- Mandatory
,p_assignment_id => i.assignment_id -- Mandatory
-- ,p_job_id => i.job_id
-- ,p_position_id => i.position_id -- OPTIONAL
-- ,p_location_id => i.location_id -- OPTIONAL
-- ,p_organization_id => i.organisation_id -- OPTIONAL
--,p_people_group_id => x_people_group_id
--,p_soft_coding_keyflex_id => x_soft_coding_keyflex_id
--,p_concatenated_segments => x_concatenated_segments
,p_object_version_number =>13
-- Mandatory
--,p_special_ceiling_step_id => x_special_ceiling_step_id
-- ,p_group_name => x_group_name
--,p_effective_start_date => x_effective_start_date
--,p_effective_end_date => x_effective_end_date
-- ,p_org_now_no_manager_warning => x_org_now_no_manager_warning
-- ,p_other_manager_warning => x_other_manager_warning
-- ,p_spp_delete_warning => x_spp_delete_warning
-- ,p_entries_changed_warning => x_entries_changed_warning
-- ,p_tax_district_changed_warning => x_tax_district_changed_warning
);
DBMS_OUTPUT.put_line ('SUCCESS');
/*
SELECT COUNT (*)
INTO l_total_records
FROM xx_assignment_api_test;
FOR i IN assn
LOOP
/* The API is called with the relevent parameters */
/* BEGIN
--l_assignment_number :=i.assignment_number;
hr_assignment_api.update_emp_asg_criteria
(p_effective_date => TO_DATE(i.effective_date,'DD-Mon-RRRR'),
p_datetrack_update_mode =>to_date(sysdate,'DD-Mon-RRRR'),
p_assignment_id => i.assignment_id,
--p_called_from_mass_update => NULL,
p_organisation_id => i.organisation_id,
--p_organisation_name => i.organisation_name,
p_job_id => i.job_id,
--p_job_name => i.job_name,
p_grade_id => i.grade_id,
--p_grade_name => i.grade_name,
p_location_id => i.location_id,
--p_location_name => i.location_name,
--p_group_id =>i.group_id,
p_group_name =>i.group_name,
p_position_id =>i.position_id,
--p_position_name =>i.position_name,
p_payroll_id =>i.payroll_id,
--p_payroll_name =>i.payroll_name,
p_pay_basis_id =>412,
p_segment4 =>NULL,
p_segment2 =>NULL,
p_segment3 =>NULL
--p_concat_segments => NULL
--,p_contract_id => NULL
--,p_establishment_id => NULL
--,p_scl_segment1 => NULL
--,p_grade_ladder_pgm_id => NULL,
--p_status =>i.status,
--p_assignment_number =>i.assignment_number,
--p_salary_basis =>i.salary_basis,
--p_supervisor_id =>i.supervisor_id,
--p_supervisor_name =>i.supervisor_name,
p_supervisor_assignment_id =>i.supervisor_assignment_id
--p_working_hours =>i.working_hours,
--p_frequency =>i.frequency,
--p_time_normal_start =>i.p_time_normal_start,
--p_time_normal_finish =>i.time_normal_finish,
--p_probation_unit =>i.probation_unit,
--p_probation_period =>i.probation_period,
--p.date_probation_end =>i.date_probation_end,
--p_Notice_period =>i.notice_period,
--p_notice_period_UOM =>i.notice_period_UOM
,p_object_version_number => NULL
,p_special_ceiling_step_id => NULL
,p_people_group_id => NULL
,p_soft_coding_keyflex_id => NULL
,p_effective_start_date => NULL
,p_effective_end_date => NULL
,p_org_now_no_manager_warning => NULL
,p_other_manager_warning => NULL
,p_spp_delete_warning => NULL
,p_entries_changed_warning =>NULL
,p_tax_district_changed_warning => NULL
,p_concatenated_segments => NULL
,p_gsp_post_process_warning => NULL
);
END;
-- END LOOP;
commit;
*/
END;
END LOOP;
END Create_assignment;
/*--End of package--------*/
END SON_CREATE_ASSGMT_PKG;
/
can you please guide me on this.
|
|
|
|
Re: hrms api [message #410394 is a reply to message #409352] |
Fri, 26 June 2009 15:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/45399.jpg) |
vamsi kasina
Messages: 2112 Registered: October 2003 Location: Cincinnati, OH
|
Senior Member |
|
|
Quote: | if u wish, you can pm or call me so that i can just guide u.
| If you want to entertain this, please reply to the topic with the content after your discussion.
It may be useful for others, who are searching for it.
By
Vamsi
|
|
|
Goto Forum:
Current Time: Tue Sep 10 09:15:50 CDT 2024
|