Академический Документы
Профессиональный Документы
Культура Документы
CONTENTS
--------
1. What is an API?
2. How do I use an API to upload data?
3. Where are APIs located on my system?
4. How do I identify the package name and version of the API?
5. Where can I find information on an API, what it does, and its parameters contained in an API?
6. How do I identify and work with the required parameters for an API?
7. What is the Object Version Number and how do I assign values for it in an API?
8. What is the p_validate Control Parameter?
9. Where may I find information about available APIs in the HR and PAYROLL systems?
10. Can APIs be used in an HR Shared installation?
11. What is the relationship between Initial Balance Upload and Data Pump?
12. When an amployee is terminated using the HR_EX_EMPLOYEE_API, the employee type is not changing
to Ex-Employee.
13. In Release 11i, why is the HR_EX_EMPLOYEE_API looking for a payroll for benefits assignment?
14. What is the difference between the Salary Upload API and the Maintain Salary Proposals API?
15. Can I use an API on an applications table on which an event-based Alert is defined?
16. What is the difference between an API and a publically callable API?
Answer
------
The Application Programming Interface or API is a PL/SQL packaged procedure which
can be used as an alternative to traditional Application online forms as an entry
point into the Application.
The advantage of using an API as a means of adding data to the system is that you
can enter new information or alter existing data without having to manually enter
the information into the application.
APIs allow users to maintain HRMS information without using Oracle application forms.
Answer
------
While the API package contains many procedures to insert, update, or delete
application data, the API is not executed on its own. The API must be called, or
executed, by other PL/SQL modules, by a direct SQL*Plus call, or through a front end
such as the Data Pump.
The API package should never be modified for specific custom use. If modified,
Oracle will not be able to support them. If you need additional functionality, APIs
can be used as building blocks, to be called within a more extensive package that
you may build to address the unique functionality you desire.
None of the HRMS APIs issue commits. The calling module should manage the commit of
the transaction. The calling module should also address exception handling and the
actual logging of exceptions to exception tables.
3. Where are APIs located on my system?
Answer
------
For Oracle release 10.7, the APIs are located in the operating system directories:
$PER_TOP/patchsc/107/sql and $PAY_TOP/patchsc/107/sql,
Refer to filenames like pe???bpi.pkh, py???bpi.pkh, and hr???bpi.pkh,
where the ??? represents wildcard characters.
For Oracle release 11 and release 11i, the APIs are located in the operating system
directories:
$PER_TOP/patch/xxx/sql and $PAY_TOP/patch/xxx/sql,
where xxx represents the release 110 or 115.
Refer to filenames like pe???api.pkh, py???api.pkh, and hr???api.pkh,
where ??? represents wildcard characters.
Answer
------
To identify the package name of an API as compiled into the Oracle database, in
SQL*Plus enter the following select statement (logged in as APPS)
>SELECT text
FROM all_source
WHERE name like '%your_api_name%' (example: HR_POSITION_API)
AND text like '%Header%';
This will return the header line of the package and package body showing the package
name and current version number.
To compare the version of the API package in your operating system directory to the
one compiled in your database and to check for synchronization, execute the following
from the command line in the API directory:
This will return all occurrences of the package, package body and the version
number of the file. Version numbers should match what is compiled in the database.
Answer
------
Review the package header file for the particular API file (.pkh).
6. How do I identify and work with the required parameters for an API?
Answer
------
The parameters for each API can be found in the documentation of the package header
or by using SQL*Plus to describe the API. Each API has a set of parameters that may
or may not be specified. Most of the parameters map to a database column in the HR
schema. There will be some control parameters that will control processing within
the API but will not map to a database column.
Each parameter name in the API will be prefixed with p_. If the parameter maps to
a database column, the remainder of the name will usually be the same as the table
column name.
When calling an API, you may not need to specify every parameter in the call. It
is optional to assign values to PL/SQL variables with default values specified in
the declaration. Therefore, those parameters without default values specified in
the declaration are considered required parameters and must always be passed in
the API call. Also, any variable tagged as an IN OUT parameter must be included
in the calling parameter list. If you do not wish to assign a value to an IN OUT
parameter, you may assign it a null value.
Those parameters defined with default values may have other values passed as you
determine are needed for your business process. You may wish to compare how the
Oracle Application updates the table to help you decide on overriding the
defaulted parameters.
Finally, if you do not directly assign variables within your API parameter list in
your API call, then number and sequence of parameters must match between the
calling and the called procedures.
7. What is the Object Version Number and how do I assign values for it in an API?
Answer
------
Object Version Number is an assigned number to a row in a database table. When a
new row is inserted, its number is set to 1. As updates are performed on the row,
the object version number is incremented. Object Version Number is transferred
with the row when a query is performed on it. If an update is made to the
transaction and saved back to the table, then the current object version number is
compared with the value being passed back from the transaction.
If the two are the same, the update can be committed to the table. If the two are
different, the update is rejected and flagged with an error. The transaction
should be re-queried, and the update made again to the more current version of the
row.
The API treats object version numbers similarly. Every published API has the
p_object version_number control parameters.
For Create APIs, this parameter is defined as an OUT - the API assigns the object
version number to be 1 for row inserts. For Update APIs, the parameter is defined
as IN OUT. For Update APIs, the object version number is mandatory.
The current value must be passed in the API call and it is compared to the version
on the row in the table. If the versions are different, the error
HR_7155_OBJECT_LOCKED is raised. The information can be re-queried for a more
current version.
Answer
------
Every API has a p_validate control parameter. When the parameter is set to FALSE,
all business function validation is performed. If everything is validated, rows
can be inserted, updated, or deleted. Non warning UT parameters, warning OUT
parameters and IN OUT parameters will be returned with set values.
Answer
------
A list of Oracle supported APIs and information about them can be found online in
the Oracle Application Library in your application.
In addition, the document "Publicly Callable Business Process APIs in Release 11i"
can be found in the HRMS API Toolkit on Metalink.
This document lists the public APIs as are currently delivered in release 11i.
-- "Understanding and Using the HRMS Data Pump", Document 72564.1, Metalink
Answer
------
In releases 10.7 and 11 the use of APIs is not supported because a Full
installation of HR uses the date tracking capabilities of the HR tables.
Shared installations do not. Since the tables that hold people and
assignment information are date tracked and these are common tables populated
by APIs, there is a real danger of data corruption since tables operate in
Correct mode only.
11. What is the relationship between Initial Balance Upload and Data Pump?
Answer
------
There is no relationship between Initial Balance Upload and Data Pump. They are two
separate processes. Initial Balance Upload is not used with Data Pump at all. Below
you will find a short description of each.
A procedure used to transfer accumulated seeded and user balance values into Oracle
Payroll for use by implementations. The procedure is usually run from the Concurrent
Manager.
Navigation: HRMS application > Processes and Reports > Submit Processes and Reports >
Initial Balance Upload
Data Pump
A utility which facilitates the loading and updating of data for Oracle HRMS. It does
this by allowing the user to load data from an existing HRMS system into a single
batch interface table using a set of supplied PL/SQL routines that map the data
against the appropriate Application Programming Interface (API). This data can then
be uploaded into the Oracle HRMS system using the Data Pump Engine.
12. When an amployee is terminated using the HR_EX_EMPLOYEE_API, the employee type
is not changing to Ex-Employee.
Answer
------
Be sure to date track forward through the application via the date track button to
at least one day past the date that was passed in the API.
13. In Release 11i, why is the HR_EX_EMPLOYEE_API looking for a payroll for benefits
assignment?
Answer
------
When using the HR_EX_EMPLOYEE_API.actual_termination_emp procedure to terminate
employees in Release 11i, the following error message may be received, which
suggests a default payroll for the benefits assignment.
ORA-20001: Cannot default the monthly payroll for the benefits assignment. The
business group must have a default monthly payroll assigned. Define a default
monthly payroll for the business.
14. What is the Difference between the Salary Upload API and the Maintain Salary Proposals API?
Answer
------
Although both APIs are supported APIs, The Salary Upload API does not support salary admin
approvals. There is no associated security for the API as there is via the application. If
the API allowed salary upload then anyone with SQL*Plus access could approve salary changes.
For this reason, the Salary Maintain Proposal API is the preferred API to use for uploading
salary proposal information.
15. Can I use an API on an applications table on which an event-based Alert is defined?
Answer
------
No, on an applications table that has an event-based Alert defined, the API will error.
To run the API, the Alert will have to be disabled and then re-enabled after the API has
been executed.
16. What is the difference between an API and a publically callable API?
Answer
------
An Application Program Interface is an alternate entry point for data to
be inserted, updated, or deleted from the Application. The Oracle HRMS
Application contains many APIs, but not all of the APIs delivered in
the Application are considered supported, or Publicly Callable APIs.
Publicly Callable APIs are those that engage in validation in the same
manner as the forms do within the application. Validation is performed
in terms of data integrity, insuring that data relationships exist
properly between related tables. Validation is also performed against
business functionality as the application form would enforce it.