Search Results get_salesrep_rev_derived
Overview
WSH_FLEX_PKG_COGS is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports the Shipping Execution (WSH) module. Its core purpose is to generate the default Cost of Goods Sold (COGS) Accounting Flexfield combination — the COGS Account — that is stamped against shipped sales order lines when accounting entries are created. The package resolves the appropriate General Ledger code combination by evaluating customer, item, order type, transaction type, operating unit, and picking line detail context, and it participates in an Oracle Workflow-driven flexfield derivation process. The package is declared AUTHID CURRENT_USER, meaning its unqualified references resolve under the privileges of the calling user rather than the definer, and it has an early lineage originating in 1997 (per the embedded source header). It is a self-contained derivation utility: the ETRM metadata records zero dependent packages that reference it, so it is invoked directly by shipping/accounting flexfield workflows rather than being called by other PL/SQL APIs.
Key Procedures and Functions
The package exposes eleven documented routines, of which the primary entry point is START_PROCESS. START_PROCESS launches the Workflow process that constructs the COGS Account combination; it accepts the customer, order type, order line header, order line, picking line detail, organization, flexfield structure number, and related identifiers, and returns the resulting code combination ID along with concatenated segment values, segment IDs, segment descriptions, and an error message, returning a BOOLEAN success indicator.
- START_PROCESS — Runs the Workflow process that creates the COGS Account combination and returns the CCID and concatenated segments.
- GET_COST_SALE_ITEM_DERIVED — Derives the COGS account for a line item regardless of the option flag; invoked as a Workflow function activity and returning a result code.
- GET_COST_SALE_MODEL_DERIVED — Derives the COGS account for a configured model item, following the same Workflow function signature pattern.
- GET_ORDER_TYPE_DERIVED — Resolves order-type-derived COGS flexfield segment values used during account generation.
- GET_SALESREP_REV_DERIVED — Derives the sales representative revenue-related segment used in the accounting combination.
- GET_SALESREP_ID — Retrieves the sales representative identifier associated with the transaction context.
- GET_COST_SALE — Central logic for computing the cost-of-sale account value for the processed line.
- GET_INV_ITEM_ID — Returns the inventory item identifier for the line being costed.
- GET_TRX_TYPE — Determines the transaction type used to drive COGS account derivation; this is the routine most commonly targeted by developers searching for transaction-type resolution logic in the COGS flow.
- GET_OPERATING_UNIT — Resolves the operating unit (org) context that scopes the accounting flexfield combination.
- GET_PARENT_LINE — Identifies the parent order line for child/configuration lines when deriving the account.
Tables Accessed
The package reads reference and transactional data through APPS synonyms. MTL_SYSTEM_ITEMS supplies inventory item attributes for costing; RA_CUSTOMER_TRX and RA_CUST_TRX_TYPES provide receivable transaction and transaction type context used by GET_TRX_TYPE and related derivation logic. SO_HEADERS_ALL, SO_ORDER_TYPES, SO_LINE_DETAILS, and SO_PICKING_LINE_DETAILS furnish the sales order header, order type, line, and picking line detail data that ground the COGS derivation. DBMS_OUTPUT is referenced for diagnostic output during development and troubleshooting. Collectively these tables let the package resolve the customer, item, order, transaction type, and operating unit inputs required to build the COGS Accounting Flexfield combination.
Usage Notes
WSH_FLEX_PKG_COGS is typically invoked during shipping and inventory accounting processing — for example, from Oracle Workflow function activities attached to the shipping COGS flexfield derivation process, and from forms or concurrent programs that create COGS accounting for shipped sales order lines. Because the ETRM metadata records no other packages referencing it, integration is normally direct: standard shipping/accounting flows call START_PROCESS or the Workflow-facing GET_COST_SALE_* activities, while customizations may call the individual getter routines such as GET_TRX_TYPE, GET_OPERATING_UNIT, or GET_SALESREP_ID to reuse its resolution logic. Custom code should treat the return of the code combination ID and concatenated segments as the authoritative output and handle the OUT error message parameter for diagnostics.
-
PACKAGE: APPS.WSH_FLEX_PKG_COGS
12.2.2
-
PACKAGE: APPS.WSH_FLEX_PKG_COGS
12.1.1
-
PACKAGE: APPS.OE_FLEX_COGS_PUB
12.2.2
-
PACKAGE: APPS.OE_FLEX_COGS_PUB
12.1.1
-
PACKAGE BODY: APPS.WSH_FLEX_PKG_COGS
12.1.1
-
PACKAGE BODY: APPS.WSH_FLEX_PKG_COGS
12.2.2
-
PACKAGE BODY: APPS.OE_FLEX_COGS_PUB
12.1.1
-
PACKAGE BODY: APPS.OE_FLEX_COGS_PUB
12.2.2
-
APPS.WSH_FLEX_PKG_COGS dependencies on WF_CORE
12.1.1
-
APPS.WSH_FLEX_PKG_COGS dependencies on WF_CORE
12.2.2
-
APPS.WSH_FLEX_PKG_COGS dependencies on WSH_FLEX_PKG_COGS
12.2.2
-
APPS.WSH_FLEX_PKG_COGS dependencies on WSH_FLEX_PKG_COGS
12.1.1
-
APPS.OE_FLEX_COGS_PUB dependencies on WF_CORE
12.1.1
-
APPS.OE_FLEX_COGS_PUB dependencies on WF_CORE
12.2.2
-
APPS.OE_FLEX_COGS_PUB dependencies on STANDARD
12.1.1
-
APPS.OE_FLEX_COGS_PUB dependencies on STANDARD
12.2.2
-
APPS.OE_FLEX_COGS_PUB dependencies on OE_STANDARD_WF
12.2.2
-
APPS.OE_FLEX_COGS_PUB dependencies on OE_STANDARD_WF
12.1.1
-
APPS.OE_FLEX_COGS_PUB dependencies on OE_FLEX_COGS_PUB
12.2.2
-
APPS.OE_FLEX_COGS_PUB dependencies on OE_FLEX_COGS_PUB
12.1.1