You are on page 1of 9

Database Development and Administration Home About Us Contact Us

For Business Intelligence, Cloud Computing, Database.

Categories
How to create a report which shows leave entitlement balances on a eff date - Human Resource Managem
ORACLE DATABASE (HRMS)
DISCUSS
Server & Storage Systems
Forms
Search ERP Consultant Jobs On LinkedIn. Find Yo
Oracle Application Exp...
Identity Management Ad From millions of jobs, nd the ones meant for you and ap
Workflow
Ad
Database Security
LinkedIn
Object-Relational Capa...
Oracle Database Archiv...
SOA & Process Learn More
Manageme...
Oracle By Example (OBE... Hi,
Secure Backup customer would like to get a report, or sql statement, which shows employees net entitlements for an accrual plan. Because it is a calculated amount, I
Backup & Recovery (Kor... able to get my own quick paint or standard report.
EJB (Korean) Who can help?
Migration and Moderniz... ruud
Siebel
Coherence You can do this in 3 steps.
Business Process Manag... 1) First of all you'll need a package that wraps one of the Oracle-delivered PLSQL procedures into a SQL-callable function:
WebCenter - Interaction create or replace package xx_pto_balance AS
weblogic.developer.int... FUNCTION get_net_entitlement
Oracle on Amazon Web S... (p_assignment_id in number
weblogic.developer.int... ,p_plan_id in number
Pages(Archived) ,p_calculation_date in date) return number;
ALUI CodeShare(Archived) end xx_pto_balance;
Industries /
EJB Development create or replace package body xx_pto_balance AS
(Chinese) FUNCTION get_net_entitlement
版务 (p_assignment_id in number
weblogic.network.gatek... ,p_plan_id in number
Order Management(Archi... ,p_calculation_date in date) return number IS
Communications Data l_net_entitlement number;
Model l_last_accrual_date date;
New To Java BEGIN
Servers hr_pto_views.get_pto_ytd_net_entitlement
Sun Java System Identi... (p_assignment_id => p_assignment_id
Storage ,p_plan_id => p_plan_id
Developing Application... ,p_calculation_date => p_calculation_date
Java Servlet ,p_net_entitlement => l_net_entitlement
Solaris 11 ,p_last_accrual_date => l_last_accrual_date);
New To Java Technology... RETURN l_net_entitlement;
Bug Examples(Archived) END get_net_entitlement;
AVK Portability(Archived) end xx_pto_balance;
Oracle Communications ... /
Oracle Communications ... 2) Next you'll need to initialize your apps session (if calling from SQL):
Java System Mobile Ent... exec fnd_global.apps_initialize(<user_id>, <responsibility_id>, <responsibility_application_id>, <security_group_id>);
Japanese insert into fnd_sessions values (userenv('sessionid'), trunc(sysdate));
General Java Developme... 3) Then you can you use a SQL statement like this one (noting the call to the above package function):
Java编程开发 SELECT papf.employee_number
Oracle Database 11g Ex... ,papf.full_name
CRM On Demand ,pap.accrual_plan_name
Marketin... ,xx_pto_balance.get_net_entitlement
Business (paaf.assignment_id
Enterprise Gateway ,pap.accrual_plan_id
Oracle Application Ser... ,trunc(sysdate)) net_entitlement
Mix Feedback(Archived) FROM per_all_people_f papf
Talent Management ,per_all_assignments_f paaf
Peoplesoft应用产品 ,pay_element_entries_f pee
Oracle Servlet Develop... ,pay_accrual_plans pap
Israel Oracle User Gro... WHERE papf.person_id = paaf.person_id
Oracle Coherence AND nvl(papf.current_employee_flag, 'N') = 'Y'
(MOSC... AND paaf.assignment_type = 'E'
*Getting Started (MOSC) AND paaf.primary_flag = 'Y'
Peer_Review AND paaf.assignment_id = pee.assignment_id
Utah Eloqua Users AND pee.element_type_id = pap.accrual_plan_element_type_id
Webcast Central AND trunc(sysdate) BETWEEN
SFDC Integration papf.effective_start_date AND papf.effective_end_date
Solver AND trunc(sysdate) BETWEEN
Cloud Infrastructure C... paaf.effective_start_date AND paaf.effective_end_date
Oracle Marketing Cloud... AND trunc(sysdate) BETWEEN
API Management pee.effective_start_date AND pee.effective_end_date
Orphan Threads ORDER BY papf.full_name;
Process Cloud Service This gets the net entitlement for all employees' accrual plans. You can of course tweak this as you like.
Oracle x86 Servers Don't expect this to be fast! In fact, expect it to be painfully slow: because balances are calculated on-the-fly and run Fast Formula it takes a couple of s
OMC - Industry Solutio... per person, depending on your Fast Formula code. To improve performance these are some things you can do:
Oracle Marketing Cloud... a) Put the above SQL into a materialized view and refresh it regularly (eg, daily)
Oracle Cloud Applicati... b) Build a Concurrent Program that populates a 'snapshot' table of balances and then report off that
Argentina c) Use the Accrual Plan Payroll Balance architecture to store entitlements in payroll balances and then retrieve the payroll balances
Move Goods I hope that helps.
Supply and Demand
Manufacturing Intellig...
GlassFish(Archived)
Java SE (Archived)
NetBeans
Middleware Partner Com...
Data Visualization
Korea Engineered Syste...
México
DBA Gruppe
SouthEast China Oracle...
Day by Day
Java Virtual Machine T...
PL/SQL Fundamentals Related
Oracle Linux for Oracl...
Spotlight on Success W...
Professional Services ... Manager Self Service Absence Management
Oracle Marketing Cloud... Dear Gurus,
Application Developmen... I have one problem in Manager Self Service Absence Management.
Business Intelligence ... Here is the requirements:
Warehouse Builder I have define a AME rule for HR_LOA_JSP_PRC for employee condition: HR_POSITION_LEVEL : Require approvals up to first position
Life Sciences(Archived) When an employee 'X ' creates an absence it goes to his reporting Manager 'Y' which is correct.
Business Intelligence ... but when a manager creates an absence on behalf of his employee . it goes to reporting manager of 'Y'. which is not needed. It will approve automatic
On Demand: E-Business ... stop right there.
Communications Converg... please can anyone help me regarding this.
Install/Upgrade/Manage ex: position hierarchy look likes this
Tuxedo Employee (IT Engineer) --> reports to (IT Manager) --> reports to (CEO)
weblogic.developer.int... When IT Engineer creates an absence request , it goes to IT Manager for approval which is correct according to AME rule.
Primavera P6 EPPM User... But when IT Manager creates an absence for his employee (behalf) (IT Engineer) It is going to CEO for approval. which i don't want to. I need the abs
JavaServer Faces will approved automatically & stop. when IT Manager creates absence behalf of his employee (IT Engineer).
Java Native Interface ... but When IT Manager creates his own absence then it will goes to CEO for approval but not for his employee (IT Engineer).
Solaris Archived Forum... This will implement in oracle R12.1.2
AutoVue Integrations Hope you understand my requirements.
Your solution will be highly appreciated.
Thank You
Shariff
Hi,
In ur case approval hierarchy is using the person_id of a person who is initiating the request, what you want is to get the person_id of a person who is
selected for the transaction.
Unfortunately, the seeded AME rules picks up initiator person_id and not the selected person_id (engineer in ur case).
To resolve this, make ur own AME rule and condition as per ur requirement.
Regards
Ayaz
Hi,
Thanks for reply.. Can u just provide the query for this..
Thanks & regards
Mohsin
Hi,
Query should look like this:---
select paaf.supervisor_id
from apps.per_all_people_f papf
, apps.per_all_assignments_f paaf
,apps.hr_api_transactions hat
where hat.transaction_id = :Transaction_id
and hat.selected_person_id = papf.person_id
and papf.person_id = paaf.person_id
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
and trunc(sysdate) between paaf.effective_start_date and paaf.effective_end_date
Thanks,
Avinash
Hi,
You can use this function to get selected user id:
Please find the required fucntion to be added to our database:
CREATE OR REPLACE FUNCTION TYR_GET_SUPERVISOR(p_transaction_id IN NUMBER
)
/---Returns the person_id of the head of department------/
RETURN VARCHAR2
AS
L_person_id NUMBER(10);
L_selected_person_id hr_api_transactions.selected_person_id%TYPE;
L_creator_person_id hr_api_transactions.creator_person_id%TYPE;
l_business_group_id NUMBER;
BEGIN
fnd_profile.get ('PER_BUSINESS_GROUP_ID', l_business_group_id);
BEGIN
SELECT selected_person_id,creator_person_id
INTO L_selected_person_id,L_creator_person_id
FROM hr_api_transactions
WHERE transaction_id = p_transaction_id;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END;
BEGIN
SELECT paaf.supervisor_id
INTO l_person_id
FROM per_all_people_f papf,
per_all_assignments_f paaf
WHERE papf.person_id=paaf.person_id
and papf.person_id=l_selected_person_id
AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date;
EXCEPTION
WHEN NO_DATA_FOUND THEN
l_person_id :=null;
END;
IF (L_selected_person_id = L_person_id) OR (l_creator_person_id = l_person_id) THEN
RETURN NULL;
ELSE
RETURN 'PER:'||to_char(L_person_id);
END IF;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END TYR_GET_SUPERVISOR;
Then You can use it like this directly as a dynamic query in approvers group:
SELECT TYR_GET_SUPERVISOR(:transactionId) FROM DUAL
BR
Akram
Thank You very much. But I'm not using supervisor hierarchy and assigning any supervisor to any employee,
i'm using position hierarchy in AME Rule.then how will i get this.
Edited by: NEWHCM on Nov 21, 2012 4:37 PM
I need Position Hieararchy. Not Supervisor hierarchy
Try with the below query , u need position id'd , so this query must survive ur purpose
SELECT pse.parent_position_id parent_position_id,
pse.subordinate_position_id position_id,
LEVEL hier_level
FROM per_pos_structure_elements pse
START WITH pse.parent_position_id = :p_1
AND pse.pos_structure_version_id =
(SELECT psv.pos_structure_version_id
FROM per_pos_structure_versions psv,
per_position_structures pps
WHERE pps.position_structure_id =
psv.position_structure_id
AND NVL (pps.primary_position_flag, 'N') = 'Y'
AND pps.business_group_id = :p_2
AND TRUNC (SYSDATE) BETWEEN psv.date_from
AND NVL (
psv.date_to,
TRUNC (SYSDATE)
))
CONNECT BY parent_position_id = PRIOR subordinate_position_id
AND pse.pos_structure_version_id =
(SELECT psv.pos_structure_version_id
FROM per_pos_structure_versions psv,
per_position_structures pps
WHERE pps.position_structure_id =
psv.position_structure_id
AND NVL (pps.primary_position_flag, 'N') = 'Y'
AND pps.business_group_id = :p_2
AND TRUNC (SYSDATE) BETWEEN psv.date_from
AND NVL (
psv.date_to,
TRUNC (SYSDATE)
))
Thanks

Custom Function Issue in Fast Formula


Hi all,
I have a custom function in a formula that returns the previous 3 months' Taxable Earnings. When the formula is processed in a payroll run, the functio
works as expected and returns the correct value. The functions also works correctly when run via SQL PLUS.
However when the formula is processed through Retropay by Element, a different value is calculated. To complicate matters further, when I process re
using different start/end dates the value returned by the function varies.
The sql code I am using is below:
SELECT sum(TO_NUMBER(prrv.result_value))
FROM apps.pay_run_results prr,
apps.pay_run_result_values prrv,
apps.pay_assignment_actions paa,
apps.pay_payroll_actions ppa,
apps.pay_input_values_f piv,
apps.pay_element_types_f pet,
apps.pay_element_classifications pec,
apps.per_all_assignments_f asg,
apps.per_all_people_f per,
apps.pay_payrolls_f pay
WHERE prrv.run_result_id = prr.run_result_id
AND asg.assignment_id = paa.assignment_id
AND asg.business_group_id = c_business_group_id
AND pay.payroll_name = c_payroll_name
AND per.person_id = asg.person_id
AND asg.payroll_id = pay.payroll_id
AND prr.assignment_action_id = paa.assignment_action_id
AND paa.payroll_action_id = ppa.payroll_action_id
AND piv.input_value_id = prrv.input_value_id
AND piv.NAME = 'Pay Value'
AND ppa.action_type IN ('Q','R','V')
AND ppa.action_status = 'C'
AND paa.action_status = 'C'
AND nvl(paa.source_action_id,0) <> 0
AND pet.element_type_id = piv.element_type_id
AND pec.classification_id = pet.classification_id
AND TRUNC (ppa.date_earned) >= last_day(add_months(c_end_date,-3))+1
AND TRUNC (ppa.date_earned) <= c_end_date
and asg.assignment_id = c_assignment_id
and piv.input_value_id IN (
select distinct pbf.input_value_id
from pay_balance_feeds_f pbf
, pay_balance_types pbt
where pbf.balance_type_id = pbt.balance_type_id
and pbt.balance_name IN ('Taxable Pay','NIable Pay')
and c_end_date between pbf.effective_start_date and pbf.effective_end_date
)
AND ppa.date_earned BETWEEN asg.effective_start_date
AND asg.effective_end_date
AND ppa.date_earned BETWEEN per.effective_start_date
AND per.effective_end_date
AND ppa.date_earned BETWEEN pay.effective_start_date
AND pay.effective_end_date
AND ppa.date_earned BETWEEN pet.effective_start_date
AND pet.effective_end_date
AND ppa.date_earned BETWEEN piv.effective_start_date
AND piv.effective_end_date;
Has anyone come across this before, or can you see anything in the SQL code that may cause problems with Retropay?
Thanks in advance,
Jon
What value are you passing against c_end_date
'30-Apr-2009'
I mean what value are you passing to this Parameter via Formula Function . Have you hard coded this value even in production ?
In the formula I have a local variable:
l_last_period_end_date = ADD_DAYS(PAY_PROC_PERIOD_START_DATE,-1)
This is essentially the last day of the previous period and this value is passed to the function.
I have also tried hard-coding the value but get the same result.
Try the following Solution.
1. Instead of passing the ADD_DAYS(PAY_PROC_PERIOD_START_DATE,-1) as a "parameter" to the Formula Function, pass the Date Earned as th
"Context Usage" to the Formula Function.
2. Just before firing the sql statement you mentioned, populate the c_end_date with the following query.
select ptp2.end_date
from per_time_periods ptp1,
per_time_periods ptp2,
pay_all_payrolls_f papf
where ptp1.payroll_id = ptp2.payroll_id
and :p_date_earned between ptp1.start_date and ptp1.end_date
and ptp1.start_date - 1 between ptp2.start_date and ptp2.start_date
and papf.payroll_id = ptp1.payroll_id
and :p_date_earned between papf.effective_start_date and papf.effective_end_date
and papf.payroll_name = c_payroll_name
Hi, thanks for the update. I have tried your suggested fix but it hasn't worked - the same value is returned from the function.
Regards,
Jon
That is strange...
Can you try this.
1. Remove the conditions ppa.action_status = 'C' and paa.action_status = 'C'.
2. Add the condition prr.status in ('P','PA')
3. Pass the Assignment Action Id as a context to the Formula Function and derive the Date_Earned of the Payroll Action of the Assignment Action
(pay_payroll_actions ppa, pay_assignment_actions paa where ppa.payroll_action_id = paa.payroll_action_id and paa.assignment_action_id =
p_assignment_action_id)
Do not use the payroll action id as the context directly.
Use the Date Earned in the query I have posted in previous post.
If the issue is still not resolved, can you do some analysis on the value that was returned by the query with Retropay ( which period fugures were inclu
and which were excluded) so that we get better idea to resolve the issue.
Hi, I have tried that also, but I am still getting the incorrect value.
The value I am expecting is £1191.70, but Retropay is returning £1066.69 - that leaves a discrepancy of £125.01. However, I have checked the individ
element results and none equate to this value, so it is not like the query is missing 1 element or anything.
This is very strange!
For easier debugging, you should try with only one element (entry for the employee to be tested) which feeds the Balance 'Taxable Pay' / 'NIable Pay'
The basic underlying fact you need to understand with Retropay is, When Retropay is run Contexts are set with the following Values.
Payroll Action Id - Payroll Action Id of Retropay Action
Assignment Action Id - Assignment Action Id of Original Payroll Run.
So in the Formula, if any of the Database Items are used which has context of Payroll Action Id, then you might get different results)
Always drive your queries / Logic based on the Assignment Action Id.
While Running Retropay, are you including all the elements (which feed Taxable Pay / NIable Pay ) in the Element Set or excluding any ?
the condition prr.status in ('P','PA') is crucial. Retropay generates run results with a different status.
Thanks for the update - I have put this condition in to the query following Sharath's previous update.
I am going to create a test record with just 1 taxable element, so that debugging the function will be easier.
I will provide a further update once this testing is complete
Hi,
OK I have finally found out what is going on - when Retropay is running the custom function it is not including any Retro elements that have an origina
date_eared prior to the 3 months calculation. e.g. if the calculation period is January - March, if there are any taxable earnings processed in these per
that were generated by Retropay and were originally entered prior to January, these are not being picked up by the query.
Do you have any ideas how I can amend the query so that Retropay doesn't exclude such elements?
Thanks,
Jon
Try including the Taxable Earnings Element for which the Retro Results are broght forward in Jan in the Retropay Element Set. This should make the
Retropay process to do Leaf Frogging.
Hi,
The element is already in the Retropay element set - hence it is picked up when Retropay runs.
Thanks,
Jon
my function does not going else block, could you please check any one, why
Hey My function does not go to the else block any time it will returns if block could you please check any one
my function
-----------------
CREATE OR REPLACE PACKAGE BODY XX_ASSG_CHANGE_FIELD_SUMMARY
IS
FUNCTION CHANGE_FIELD_SUMMARY(
P_business_group_id IN NUMBER
,P_person_id IN NUMBER
)
RETURN VARCHAR2
IS
CURSOR C_change_field IS
SELECT paaf.LAST_UPDATE_DATE Change_date
,paaf.Job_id Job_id
,LAG(paaf.Job_id,1,0) OVER (PARTITION BY paaf.person_id ORDER BY paaf.effective_start_date) Prev_job
,paaf.grade_id Grade
,LAG(paaf.grade_id,1,0) OVER (PARTITION BY paaf.person_id ORDER BY paaf.effective_start_date) Prev_grade
,paaf.position_id Position
,LAG(paaf.position_id,1,0) OVER (PARTITION BY paaf.person_id ORDER BY paaf.effective_start_date ) Prev_Position
,paaf.organization_id Organization
,LAG(paaf.organization_id,1,0) OVER (PARTITION BY paaf.person_id ORDER BY paaf.effective_start_date ) Prev_Organization
,paaf.location_id Location
,LAG(paaf.location_id,1,0) OVER (PARTITION BY paaf.person_id ORDER BY paaf.effective_start_date) Prev_location
,paaf.people_group_id
,LAG(paaf.people_group_id,1,0) OVER (PARTITION BY paaf.person_id ORDER BY paaf.effective_start_date) Prev_Group
,paaf.payroll_id payroll
,LAG(paaf.payroll_id,1,0) OVER (PARTITION BY paaf.person_id ORDER BY paaf.effective_start_date) Prev_payroll
,paaf.assignment_status_type_id
,LAG(paaf.assignment_status_type_id,1,0) OVER (PARTITION BY paaf.person_id ORDER BY paaf.effective_start_date) Prev_assig_status
,paaf.employment_category Ass_category
,LAG(paaf.employment_category,1,0) OVER (PARTITION BY paaf.person_id ORDER BY paaf.effective_start_date ) Prev_ass_category
FROM Per_all_assignments_f paaf
WHERE paaf.business_group_id = P_business_group_id
AND paaf.person_id = P_person_id
ORDER BY paaf.effective_end_date;
V_Job VARCHAR2(100);
V_PJOB VARCHAR2(100);
BEGIN
FOR I IN C_change_field LOOP
IF (I.Job_id = I.Prev_job)
THEN
V_Job := 'Same Job';
ELSE
V_PJOB := 'Job Chang';
END IF;
END LOOP;
RETURN V_Job||V_PJOB;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR (-20001,'An error was encountered CHANGE_FIELD_SUMMARY - '||SQLCODE||' -ERROR- '||SQLERRM);
END CHANGE_FIELD_SUMMARY;
END XX_ASSG_CHANGE_FIELD_SUMMARY;
Sir, without having sample data, table structure, required output, how can you expect forum members to do homework?
Hi,
Rama Krishna Rao.Inala wrote:
Hey My function does not go to the else block any time it will returns if block could you please check any one
my functionPost CREATE TABLE table and INSERT statements for some sample data.
Aso, post a few sets of parmameters, including some that cause the function to return the wrong results. What are the correct results in each case?
Whenever you post code, indent it to show the structure of BEGIN, LOOP, IF, and so on.
When posting formatted code on this site, type these 6 characters
\(all small letters, inside curly brackets) before and after each section of formatted text, to preserve the
spacing.

What you can do to figure this out:


1. Does the query return any rows? Put a debugging display statement (dbms_output.put_line) inside the loop or to see
2. Put debugging display statemetns in each part of the IF block to see which (if either) is being executed
You can find out about dbms_output in the on-line documentation if you need more information
hi
this is my executed statement
SELECT X.JOB_ID,XX_ASSG_CHANGE_FIELD_SUMMARY.CHANGE_FIELD_SUMMARY(X.BUSINESS_GROUP_ID,X.PERSON_ID) CHANGEJO
FROM PER_ALL_ASSIGNMENTS_F X
WHERE X.BUSINESS_GROUP_ID = 162
AND X.PERSON_ID = 20020
the data changejob not display
hi
this is my executed statement
SELECT X.JOB_ID,XX_ASSG_CHANGE_FIELD_SUMMARY.CHANGE_FIELD_SUMMARY(X.BUSINESS_GROUP_ID,X.PERSON_ID) CHANGEJO
FROM PER_ALL_ASSIGNMENTS_F X
WHERE X.BUSINESS_GROUP_ID = 162
AND X.PERSON_ID = 20020
the data changejob not display
but this program am converted to anonmous block then it will work fine, why function it is work?

Error in Update Timekeeper API ORA-20001: HR_7155_OBJECT_INVALID: ORA-06512:


Hi,I was attempting to make an API to edit the People included in a Timekeeper group. The code is pasted below: CREATE OR REPLACE PROCED
MJ_TK_GROUP_ENTRYIS CURSOR new_emp IS SELECT PPD.SEGMENT1, papf.PERSON_ID DESIGNATION FROM per_all_people_f papf,
per_all_Assignments_f paaf, PER_POSITIONS PP, PER_POSITION_DEFINITIONS PPDWHERE 1=1AND papf.PERSON_ID = paaf.PERSON_IDAN
SYSDATE BETWEEN papf.EFFECTIVE_START_DATE AND papf.EFFECTIVE_END_DATEAND SYSDATE BETWEEN PAAF.EFFECTIVE_START_
AND PAAF.EFFECTIVE_END_DATEAND PAAF.ASSIGNMENT_NUMBER IS NOT NULLAND PAAF.POSITION_ID = PP.POSITION_IDAND
PP.POSITION_DEFINITION_ID = PPD.POSITION_DEFINITION_IDAND PPD.ENABLED_FLAG = 'Y'AND paaf.person_id IN (SELECT paaf.PERSON
FROM per_all_assignments_f paafWHERE SYSDATE BETWEEN paaf.EFFECTIVE_START_DATE AND paaf.EFFECTIVE_END_DATE--AND
paaf.PAYROLL_ID IS NOT NULL--AND (paaf.DATE_PROBATION_END <= SYSDATE OR paaf.DATE_PROBATION_END IS NULL)MINUSSELECT
HTGQC.CRITERIA_ID from hxc_tk_group_query_criteria htgqc); l_object_version_number hxc_tk_groups.object_version_number%TYPE := 1; -----
on the hxc_tk_groups TABLEl_business_group_id NUMBER := 0; BEGIN FOR rec in new_emp LOOP IF rec.SEGMENT1 = 'Security Guard' THEN
DBMS_OUTPUT.PUT_LINE(11); HXC_TIMEKEEPER_GROUP_API.update_timekeeper_group (p_validate =>
false ---in boolean default false ,p_tk_group_id => 2 ---in number
,p_object_version_number => l_object_version_number ---in out nocopy number ,p_tk_group_name
'MJ_Security Guards' ---in varchar2 ,p_tk_resource_id => 66 ----------Resource ID atta
in HXC_TK_GROUPS TABLE ---in number ,p_business_group_id =>
l_business_group_id ---in number ); DBMS_OUTPUT.PUT_LINE(12); END IF; END
LOOP;END;/ /**********************************************************************************************************************************/I believe the proble
in the Object_Number, though I can't point it out. Also, and this is strange, where do I add the people in the Timekeeper Group. Savez.
Hi, I am not an expert in OTL, but that error is returned because you are not passing the correct value for object_version_number. Given that you are
updating an existing row, you need to first query that row to determine the current value for object_version_number. I don't know the name of the table
the row you need to query has timekeeper_group_id = 2. Also, I am confused as this api is being called potentially multiple times, but none of the in
parameters is populated from the driving query. So my question is, what are you actually trying to do with all these people from your driving
query? Regards, Clive Tucker
To your last query, I was using the wrong API. This API is used to update Timekeeper Groups. I wanted to update the people in it. So obviously, there
no way I could use any of the Employees that I wanted to attach to the Group. It was quite hilarious when I discovered what the problem was.As for th
of it, Thanks for everything. I'm going to go ahead and close this. Should've done it earlier. Thanks!Savez.
How to find arrearage (deductions arrears balance) from backend?
We want to create a report which captures employee deductions with values in arrears. The values I am looking for can be found in the front-end by g
View > Employee Balances, query for an employee, and hit Balances. Unfortunately, I haven't been able to find where these values are stored in the
backend, and I cannot pull the query from the Forms help dialog. Does anyone know where I can find this sort of information? Thank you in advanced
Hi, I can't see any such navigation in my Standard Vision instance (R12) ... what I have is View > Assignment process results (I suppose this has bee
personalized in your instance). Anyway, if you want to get the figures displayed in the balances screen, you could make use of the "hr_dirbal.get_bala
API. Here's how to proceed:1) Get the assignment_id of your employee2) Get the defined_balance_id from the table pay_defined_balances, based on
balance dimension (for ex. '_ASG_YTD', '_ASG_PTD', ...) from table pay_balance_dimensions and balance type/name (for ex. Salary, OT, Transport,
from table pay_balance_types.3) Call function to get balance:
select
hr_dirbal.get_balance(
p_assignment_id => <assignment_id >,
p_defined_balance_id => <defined_balance_id >,
p_effective_date => <payroll period earned date>
)
from dual;
HTH.Regards,Rajen
Hi RajenB, What we are looking for is really a list of arrears balances <> zero, over the entire organization. From looking at the tables used in the pay
processing, it seems like the values I'm looking for are stored in PAY_RUN_BALANCES after each payroll run. If I sum these values, I think I should h
the current balance value. Please see my SQL below, and let me know if there is something wrong with my logic. Thanks select papf.person_id
paaf.ASSIGNMENT_ID , sum(prb.BALANCE_VALUE) Balance , pbt.balance_namefrom hr.pay_balance_types pbt ,
hr.PAY_DEFINED_BALANCES pdb , hr.PAY_BALANCE_DIMENSIONS pbd , HR.PAY_RUN_BALANCES prb , hr.pay_assignment_actions p
, hr.per_all_assignments_f paaf , hr.per_all_people_f papfwhere pbt.balance_name like '%Arrears%' and pdb.BALANCE_TYPE_ID =
pbt.BALANCE_TYPE_ID and pbd.BALANCE_DIMENSION_ID = pdb.BALANCE_DIMENSION_ID and PRB.DEFINED_BALANCE_ID =
PDB.DEFINED_BALANCE_ID --and prb.effective_date between '01-MAY-2015' and '12-JUN-2015' and paa.ASSIGNMENT_ACTION_ID =
prb.ASSIGNMENT_ACTION_ID and PAA.ACTION_STATUS not like 'S' and paaf.ASSIGNMENT_ID = paa.ASSIGNMENT_ID and
prb.effective_date between PAAF.EFFECTIVE_START_DATE and PAAF.EFFECTIVE_END_DATE and prb.balance_value <> 0 and papf.perso
paaf.person_id and prb.effective_date between PApF.EFFECTIVE_START_DATE and PApF.EFFECTIVE_END_DATEgroup by papf.person_id,
paaf.ASSIGNMENT_ID, pbt.balance_name;
Hi, According to Oracle documentation:PAY_RUN_BALANCES holds run balance values calculated during the Payroll Run. It is intended to enhance
balance reporting performance. It will hold values only for those defined balances that have been identified as required for balance reporting.1) So this
doesn't hold all the balances...2) Your query sums up ALL the balance amount: if PAY_RUN_BALANCES has multiple balances defined for the same
(date earned), then you may end up with incorrect results. I would suggest you work with the API - I've never used this table directly
personally. Regards,Rajen
Copyright © 2018 www.databaseadm.com

You might also like