Search Results msc_import_onhand




Overview

MSC_IMPORT_ONHAND is an Oracle Applications (APPS) PL/SQL package belonging to the MSC product family, which supports Oracle Advanced Supply Chain Planning (ASCP) and related planning modules. Its principal business purpose is to load on-hand inventory quantities into the MSC planning schema so that the planning engine can consider current stock positions when generating supply chain plans. On-hand balances originate in inventory organizations and must be staged in the MSC tables (in particular the MSC_SUPPLIES family) before the plan is run. This package provides the interface that performs that import, and it also exposes a retrieval function that returns an on-hand quantity for a given plan, organization, instance, and item. The package is classified in the ETRM repository as API classification OTHER, indicating it is an internal utility rather than a formally published public API, though it is exposed in the APPS schema.

Key Procedures and Functions

Two entry points are documented for this package:

  • IMPORT_ONHAND — The primary procedure. It accepts an error buffer, a return code, and a request identifier. The ERRBUF and RETCODE parameters follow the standard concurrent program convention, allowing the procedure to report success or failure back to the concurrent manager, while v_req_id links the execution to a specific concurrent request. Its role is to read source on-hand data and populate the MSC supply records used by the planning engine.
  • GET_ONHAND — A function returning a numeric on-hand quantity. Based on the ETRM header and the parameter naming, it resolves an on-hand value for a specific plan identifier, organization identifier, instance, and item identifier. This function is the target of the user's search term "get_onhand"; it is typically used to query the imported on-hand position for a particular item within a given plan and organization context rather than to load data.

Tables Accessed

The documented tables referenced through APPS synonyms reflect the package's role in loading and reading planning data:

  • MSC_SUPPLIES and MSC_SUPPLIES_S — the core supply tables where on-hand quantities are written or read as supply records for the planning engine.
  • MSC_ST_DEMANDS — the staging table for demands, consulted to reconcile supply and demand during import processing.
  • MSC_ITEMS and MSC_ITEMS_S — item master information in the planning schema, used to validate and resolve the items whose on-hand is being imported or queried.
  • MSC_SYSTEM_ITEMS — system-level item definitions that anchor items to their source instance and organization.
  • HZ_PARTIES — party information, reflecting that some on-hand or supply records carry an owning or trading partner association.

Usage Notes

MSC_IMPORT_ONHAND is normally invoked as part of the ASCP data collection and on-hand loading cycle. The IMPORT_ONHAND procedure, with its ERRBUF, RETCODE, and request ID signature, is suited to execution from a concurrent program registered in Oracle EBS, where the concurrent manager supplies these parameters and captures the outcome. Administrators and planners trigger it when refreshing planning data so that current inventory balances are reflected before a plan is launched. GET_ONHAND, by contrast, is a lookup utility used from custom PL/SQL, reports, or diagnostic scripts to retrieve a specific on-hand figure for a plan, organization, and item. The ETRM metadata records that the package is referenced by zero other packages, so its usage is expected to be through direct invocation (concurrent programs, forms, or custom code) rather than as a dependency of other MSC packages. Because it is classified as OTHER and carries an Oracle proprietary header, customization should be limited to calling the documented entry points rather than altering package logic.