Search Results get_expense_account
Overview
INV_ITEM_ORG_ASSIGN_CP is an Oracle EBS PL/SQL package owned by the APPS schema and classified under the ETRM as an OTHER API. Despite the misleading header reference to INVCOSGS.pls, which originated from the cost-of-goods-sales development lineage, the package's substantive purpose is to support the assignment of inventory items to organizations and the concurrent processing of associated item-organization data. The package is declared with AUTHID CURRENT_USER, meaning that its procedures execute with the privileges of the calling user rather than the definer, so callers must themselves possess the necessary object grants and direct access to the underlying tables. The package provides both utility functions used during item definition and account determination, and the central ITEM_ORG_ASSIGNMENT procedure used to drive item-to-organization association logic. It is closely tied to the standard concurrent program return-code conventions, exposing the constants RETCODE_SUCCESS ('0'), RETCODE_WARNING ('1'), and RETCODE_ERROR ('2'), which indicates that its primary procedure is designed to run inside a concurrent manager request and report status through the standard x_errbuff and x_retcode out parameters.
Key Procedures and Functions
The ETRM documents seven procedures and functions for this package. ITEM_ORG_ASSIGNMENT is the principal entry point and performs item-to-organization assignment processing; its signature was revised over the package's history to add a source organization identifier (bug# 3306087) and to change the category set parameter from a VARCHAR2 name to a numeric p_category_set_id (bug# 2642331), reflecting a shift from name-based to ID-based category set references. GET_COST_OF_SALES_ACCOUNT, GET_ENCUMBRANCE_ACCOUNT, GET_SALES_ACCOUNT, and GET_EXPENSE_ACCOUNT are account-derivation functions used to return the appropriate general ledger accounts for cost of sales, encumbrance, sales, and expense, and they typically resolve those accounts by consulting item, category, and organization accounting rules. GET_START_REVISION returns the starting revision for an item, supporting revision-controlled item definition. SET_UNIT_TEST is a testing hook used to toggle unit-test behavior within the package. As a group, these procedures support both the account determination required during organization assignment and the revision and validation logic that surrounds item creation.
Tables Accessed
The package reads and writes a substantial set of interface and setup tables through APPS synonyms. MTL_SYSTEM_ITEMS, MTL_SYSTEM_ITEMS_B, MTL_SYSTEM_ITEMS_INTERFACE, MTL_SYSTEM_ITEMS_INTERFACE_S, and MTL_SYSTEM_ITEMS_INTF_SETS_S are used to read item master data and to stage and process item imports. MTL_ITEM_REVISIONS_B_S, MTL_ITEM_REVISIONS_INTERFACE, and MTL_UNITS_OF_MEASURE supply revision and unit-of-measure information. MTL_PARAMETERS provides organization-level inventory parameters. HR_ORGANIZATION_INFORMATION and PER_ORGANIZATION_STRUCTURES supply organization hierarchy and classification data used to determine which organizations receive an item. GL_CODE_COMBINATIONS is queried to resolve the account IDs returned by the GET_*_ACCOUNT functions. FND_CONCURRENT_REQUESTS is used to track concurrent program context, and DBMS_LOCK and DUAL are used for serialization and simple single-row evaluation respectively.
Usage Notes
INV_ITEM_ORG_ASSIGN_CP is typically invoked from the standard item definition and item-organization assignment flows, including concurrent programs submitted through the concurrent manager, where its return constants and x_errbuff/x_retcode out parameters are consumed by the request framework. Because it is declared AUTHID CURRENT_USER and is referenced by no other packages, it is generally called directly by Oracle forms, by the concurrent program layer, or by custom code that needs to programmatically assign items to organizations. Custom integrations should pass the numeric p_category_set_id rather than a category set name, observe the documented parameter ordering, and honor the standard return codes when interpreting results.
-
PACKAGE: APPS.INV_ITEM_ORG_ASSIGN_CP
12.1.1
-
PACKAGE: APPS.INV_ITEM_ORG_ASSIGN_CP
12.2.2
-
APPS.INV_ITEM_ORG_ASSIGN_CP SQL Statements
12.2.2
-
APPS.INV_ITEM_ORG_ASSIGN_CP SQL Statements
12.1.1
-
PACKAGE BODY: APPS.INV_ITEM_ORG_ASSIGN_CP
12.1.1
-
PACKAGE BODY: APPS.INV_ITEM_ORG_ASSIGN_CP
12.2.2
-
APPS.INV_ITEM_ORG_ASSIGN_CP dependencies on FND_GLOBAL
12.1.1
-
APPS.INV_ITEM_ORG_ASSIGN_CP dependencies on FND_GLOBAL
12.2.2