Search Results assign_location_rec




Overview

HZ_LOCATION_BO_PUB is a public PL/SQL package in the Oracle E-Business Suite Receivables/HZ (Trading Community Architecture) schema that implements the business object (BO) layer for location records. Its central role is to encapsulate the create, update, save, and retrieval logic for location business objects, shielding callers from the underlying HZ_LOCATIONS table and the associated TCA (Trading Community Architecture) object structures. By exposing a controlled, API-based interface, the package enforces validation, message handling, and object versioning rules consistently across all callers.

The package operates on HZ_LOCATION_OBJ, a record-based business object that carries location attribute values in memory. Each public procedure accepts this object, applies the appropriate persistence or transformation action, and returns standard FND message-handling parameters (x_return_status, x_msg_count, x_msg_data) together with object version and location identifier outputs. The documented header comment block ($Header: ARHBLCBB.pls 120.5) confirms the package's long-standing presence in the AR/HZ code line and its classification as a public (PUB) API.

Key Procedures and Functions

The package documents nine procedures and functions in total. The principal public entry points are:

  • CREATE_LOCATION_BO — Creates a new location business object, persisting it and returning the generated location identifier along with object version information. It supports a validation flag and an initialization message list flag.
  • UPDATE_LOCATION_BO — Applies changes carried in a location object to an existing location record, returning the location identifier and updated object version.
  • SAVE_LOCATION_BO — Performs an insert-or-update operation based on the state of the supplied location object, combining validation and persistence in a single call.
  • GET_LOCATION_BO — Retrieves a location business object by its identifier or key, populating the object structure for downstream processing.
  • ASSIGN_LOCATION_REC — Assigns attribute values from the location object to a PL/SQL record. Its documented description states: "Assign attribute value from location object to plsql record." Documented arguments include p_location_obj (the location object), p_loc_os (location original system), p_loc_osr (location original system reference), p_create_or_update (create or update flag), and an IN/OUT location record parameter. This procedure is used internally to translate between the object representation and the tabular record representation.

Tables Accessed

The package reads and writes the following tables through APPS synonyms:

  • HZ_LOCATIONS — The primary TCA location table. All create, update, save, and retrieval operations ultimately read from or write to this table, storing address and location attribute values.
  • PLITBLM — A generic PL/SQL table used for message handling and collection storage. It supports the FND message stack management that underpins the x_msg_count and x_msg_data output parameters.

Usage Notes

HZ_LOCATION_BO_PUB is typically invoked from Oracle Forms, concurrent programs, and custom PL/SQL code that needs to create or maintain location records through the supported TCA API layer rather than direct DML against HZ_LOCATIONS. The ETRM metadata indicates the package is referenced by one other package, confirming its role as a shared utility within the HZ/AR business object framework.

Callers should supply properly initialized location objects, set p_init_msg_list to FND_API.G_TRUE when a clean message stack is required, and always inspect x_return_status for FND_API.G_RET_STS_SUCCESS, G_RET_STS_ERROR, or G_RET_STS_UNEXP_ERROR. When the user search term "assign_location_rec" is relevant, it indicates interest in the object-to-record mapping step; this is an internal helper that most external integrators will not call directly, but understanding it clarifies how attribute values flow from the business object into the persistence layer.