Previous  Next          Contents  Index  Navigation  Glossary  Library

Writing Budget Calculation Extensions

Oracle Projects provides a template package that contains the procedures that you modify to control the rules used for calculating a budget.

The name of the package is PA_Client_Extn_Budget. The names of the procedures are:

Print out and review the following files before you begin writing budget calculation extensions. These files are located in the Oracle Projects admin/sql directory.

PAXBCECB.pls Budget Calculation Extension Package Body Template. This file contains the procedure that you modify to implement budget calculation extensions. You can define as many procedures as you want within this package or within the predefined procedure.
PAXBCECS.pls Budget Calculation Extension Package Specification Template. If you create procedures outside the predefined procedure within the PA_Client_Extn_Budget package, you must also modify this file to include those new procedures.

Warning: Do not change the name of the budget calculation extension procedure. In addition, do not change the parameter names, parameter types, or parameter order in your procedure.

Suggestion: After you write the procedure, do not forget to compile it and store it in the database. See: Writing PL/SQL Procedures.

We recommend that you keep the following documentation on hand as reference material while defining procedures: the PL/SQL User's Guide and Reference Manual and the Oracle Projects Technical Reference Manual.

Package Procedures

calc_raw_cost

Table 1 - 102 lists the parameters that Oracle Projects provides for the budget calculation extension for raw cost.

Parameter Usage Type Description
X_budget_version_id IN NUMBER The identifier of the budget version.
X_project_id IN NUMBER The identifier of the project.
X_task_id IN NUMBER The identifier of the task. Set to zero if budgeting at the project level.
X_resource_list_member_id IN NUMBER The identifier of the resource list member.
X_resource_list_id IN NUMBER The identifier of the resource list.
X_resource_id IN NUMBER The identifier of the resource.
X_start_date IN DATE The start date of the budget line.
X_end_date IN DATE The end date of the budget line.
X_period_name IN VARCHAR2 The effective period of the budget line (if any).
X_quantity IN NUMBER The quantity of the budget line.
X_raw_cost IN OUT NUMBER The raw cost of the budget line. Oracle Projects passes in the raw cost from the Budgets form. An amount is then returned by the extension.
X_product_code IN VARCHAR2 The product code of the product where the budget line originated.
X_error_code OUT NUMBER Error handling code.
X_error_message OUT VARCHAR2 User-defined error message.

calc_burdened_cost

Table 1 - 103 lists the parameters that Oracle Projects provides for the budget calculation extension for burdened cost.

Parameter Usage Type Description
X_budget_version_id IN NUMBER The identifier of the budget version.
X_project_id IN NUMBER The identifier of the project.
X_task_id IN NUMBER The identifier of the task. Set to zero if budgeting at the project level
X_resource_list_member_id IN NUMBER The identifier of the resource list member.
X_resource_list_id IN NUMBER The identifier of the resource list.
X_resource_id IN NUMBER The identifier of the resource.
X_start_date IN DATE The start date of the budget line.
X_end_date IN DATE The end date of the budget line.
X_period_name IN VARCHAR2 The effective period of the budget line (if any).
X_quantity IN NUMBER The quantity of the budget line.
X_raw_cost IN NUMBER The raw cost of the budget line.
X_burdened_cost IN OUT NUMBER The burdened cost of the budget line. Oracle Projects passes in the raw cost from the Budgets form. An amount is then returned by the extension.
X_product_code IN VARCHAR2 The product code of the product where the budget line originated.
X_error_code OUT NUMBER Error handling code.
X_error_message OUT VARCHAR2 User-defined error message.

Suggestion: Use the Cost Plus API to calculate the burdened cost amount using the burdened multipliers you have defined for the project or task. See: Cost Plus API.

calc_revenue

Table 1 - 104 lists the parameter that Oracle Projects provides for the budget calculation extension for revenue.

Parameter Usage Type Description
X_budget_version_id IN NUMBER The identifier of the budget version.
X_project_id IN NUMBER The identifier of the project.
X_task_id IN NUMBER The identifier of the task. Set to zero if budgeting at the project level.
X_resource_list_member_id IN NUMBER The identifier of the resource list member.
X_resource_list_id IN NUMBER The identifier of the resource list.
X_resource_id IN NUMBER The identifier of the resource.
X_start_date IN DATE The start date of the budget line.
X_end_date IN DATE The end date of the budget line.
X_period_name IN VARCHAR2 The effective period of the budget line (if any).
X_quantity IN NUMBER The quantity of the budget line.
X_revenue IN OUT NUMBER The revenue of the budget line. Oracle Projects passes in the raw cost from the Budgets form. An amount is then returned by the extension.
X_product_code IN VARCHAR2 The product code of the product where the budget line originated.
X_error_code OUT NUMBER Error handling code.
X_error_message OUT VARCHAR2 User-defined error message.

Additional Information About Parameters

Error Handling

Use the x_error_code, x_error_message, p_error_code, and p_error message parameters to help resolve error conditions should your procedure fail.

The x_err_code or p_error_code parameter indicates the processing status of your procedure as follows:

Suggestion: Ensure that you are returning the status of the budget calculation procedure to the procedure that you are calling the budget calculation extension from to help resolve error conditions.

x_error_code = 0 The procedure executed successfully.
x_error_code < 0 An Oracle8 error occurred and the process did not complete.
x_error_code > 0 An application error occurred and the process did not complete
If x_error_code or p_error_code is set to a nonzero value in the client extension, then the following message is displayed in the form:


         Previous  Next          Contents  Index  Navigation  Glossary  Library