Previous  Next          Contents  Index  Glossary  Library

Writing Accounting Entry Extensions for Average 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 CSTPACHK.

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

CSTACHKS.pls Accounting Entry Type Extension Package Specification Template. If you create functions outside the predefined function within the CSTPACHK package, you must also modify this file to include those new functions.
CSTACHKB.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 Transactions

cost_dist_hook

Table 3 - 6 lists the parameters for Accounting Entry type extensions that redistribute material transaction in average costing organizations.

Parameter Usage Type Description
i_org_id IN NUMBER The organization that the actual cost worker is running in
i_txn_id IN NUMBER Transaction identifier for the current
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
l_error_num OUT NUMBER Output error number
l_error_code
 
OUT VARCHAR2 Output error code. Can be any SQL code.
l_error_msg OUT VARCHAR2 Error message

Error Handling

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

l_error_num = 0 The extension executed successfully.
l_error_num <> 0 An error condition has occurred and the extension did not process successfully.
l_error_code and l_error_msg Values for error_code, l_error_code, and error_explanation, l_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