Search This Blog

Friday, June 7, 2013

Script to find singing/approval limits assigned to employees

Background: 
  • Create employee signing limits for expense report approvals. Managers(Who is an employee) can approve an expense report only if the total amount of the expense report does not exceed their pre-defined signing limit. 
  • When you assign signing limits to a manager, you also specify a cost center to which this signing limit applies and you can give managers signing limits for multiple cost centers.
  • Navigation: Payables Manager: Employees > Signing Limits

What the following script does?
Use the following sql script/query to find Signing Limits you assign to employees who are responsible for approving expense reports entered in Oracle Self-Service Expenses

SQL Query/Script:

  SELECT pap.full_name,
         awsla.cost_center,
         awsla.org_id,
         hou.name organization_name,
         awsla.signing_limit
    FROM ap_web_signing_limits_all awsla,
         per_all_people_f pap,
         hr_organization_units hou
   WHERE     awsla.employee_id = pap.person_id
         AND awsla.org_id = hou.organization_id
         AND pap.effective_start_date = (SELECT max(pap1.effective_start_date)
                                         FROM apps.per_all_people_f pap1
                                        WHERE pap1.person_id = pap.person_id)
         AND awsla.document_type = 'APEXP'
ORDER BY hou.name,
         pap.full_name,
         awsla.cost_center,
         awsla.signing_limit;

Additional Info:
1. The columns START_DATE, EFFECTIVE_START_DATE and EFFECTIVE_END_DATE of per_all_people_f table are all maintained by DateTrack.
The START_DATE is the date when the first record for this person was created.
The earliest EFFECTIVE_START_DATE for a person is equal to the START_DATE.

2. Table ap_web_signing_limits_all corresponds to the Signing Limits window
Payables Manager: Employees > Signing Limits

No comments:

Post a Comment