Previous  Next          Contents  Index  Glossary  Library

Writing Accounting Entry Extensions for Standard Costing

Cost Management provides a template package and function that you use as the basis of your accounting entry extension functions. The name of the template package is CSTPSCHK.

Print out the following files before you begin writing Accounting Entry type extensions. The files are located in the Cost Management admin/sql directory.

CSTSCHKS.pls Accounting Entry Type Extension Package Specification Template. If you create functions outside the predefined function within the CSTPSCHK package, you must also modify this file to include those new functions.
CSTSCHKB.pls Accounting Entry Type Extension Package Body Template. This file contains the function that you can modify to implement the Accounting Entry type extension.

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

Package Function for Material and Scrap Transactions

std_cost_dist_hook

You can use this function for either material or scrap transactions. Table 3 - 6 lists the parameters for the Accounting Entry extension.

Parameter Usage Type Description
i_org_id IN NUMBER The organization that the current transaction is done in
i_txn_id IN NUMBER Transaction identifier
i_user_id IN NUMBER User identifier
i_login_id IN NUMBER Login identifier
i_req_id IN NUMBER Request ID of the program
i_prg_appl_id IN NUMBER Application ID of the program
i_prg_id IN NUMBER Program identifier
o_error_code
 
OUT VARCHAR2 Output error code. Can be any SQL code.
o_error_num OUT NUMBER Output error number
o_error_msg OUT VARCHAR2 Error message

Error Handling

o_err_num This parameter indicates the processing status of your extension as follows:

o_error_num = 0 The extension executed successfully.
o_error_num <> 0 An error condition has occurred and the extension did not process successfully.
o_err_code and o_err_msg Values for error_code, o_err_code, and error_explanation, o_err_msg, are stored in the MTL_MATERIAL_TRANSACTIONS table.

See Also

Oracle Cost Management Technical Reference Manual, Release 11

Package Function for Standard Cost Update Transactions

std_cost_update_hook

Table 3 - 6 lists the parameters for Accounting Entry type extensions that redistribute cost update transactions in standard costing organizations.

Parameter Usage Type Description
i_org_id IN NUMBER The organization that the actual cost work is running in
i_cost_update_id IN NUMBER Cost update identifier
i_user_id IN NUMBER User identifier
i_login_id IN NUMBER Login identifier
i_req_id IN NUMBER Request ID of the program
i_prg_appl_id IN NUMBER Application ID of the program
i_prg_id IN NUMBER Program identifier
o_error_code
 
OUT VARCHAR2 Output error code
o_error_num OUT NUMBER Output error number
o_error_msg OUT VARCHAR2 Error message

Error Handling

o_err_num This parameter indicates the processing status of your extension as follows:

o_error_num = 0 The extension executed successfully.
o_error_num <> 0 An error condition has occurred and the extension did not process successfully.
o_err_code and o_err_msg Values for error_code, o_error_code, and error_explanation, o_error_msg, are stored in the MTL_MATERIAL_TRANSACTIONS table.

See Also

Client Extensions

Accounting Entry Extension

Writing Accounting Entry Extensions for Standard Costing

Oracle Cost Management Technical Reference Manual, Release 11


         Previous  Next          Contents  Index  Glossary  Library