Professional Documents
Culture Documents
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