Search Results accp_add_loc
Overview
APPS.PO_SGD_MOD_LINES_UDA_V is a reporting and integration view in Oracle E-Business Suite that exposes user-defined attribute (UDA) values captured against purchasing document lines, presented in a pivoted, name/value form. The view name references the Supplier Goods Directory modification context (SGD/MOD) and combines data from the descriptive flexfield extension infrastructure with purchasing line draft records. Its principal role is to make flexfield-based descriptive attributes — including country-of-origin, inspection, acceptance, and classification values — available in a flattened, denormalized shape suitable for downstream reporting, extracts, and interface programs.
Although users frequently reach this object while investigating the field token ACCP_ADD_CODE (acceptance additional office code), the view is not limited to that attribute. It decodes a broad set of flexfield segment values into their human-readable equivalents, which makes it a convenient single source for purchasing line attribute reporting.
Underlying Base Objects
The view is owned by APPS and is defined over the following documented objects:
- PO_LINES_DRAFT_ALL and PO_LINES_ALL_EXT_B — the purchasing line draft and its flexfield extension table, supplying the primary keys (po_header_id, draft_id, po_line_id) and the raw attribute column values.
- EGO_FND_DSC_FLX_CTX_EXT and FND_DESCR_FLEX_COLUMN_USAGES — descriptive flexfield context and column-usage metadata that map internal column names to attribute names (for example, UOM, ACCP_ADD_CODE).
- FND_LOOKUP_VALUES and PO_LOOKUP_CODES — lookup sources used to translate coded values into displayed meanings, including PO_CLM_INSPECTION_LOC, PO_CLM_PROGRAM_CODES, PO_CLM_MDAPS/MAIS and PO_CLM_CUSTOMER_PROJECT_CODE.
- HR_LOCATIONS_ALL and HR_LOCATION_EXTRA_INFO — location and location extra information, used to resolve inspection and acceptance location codes and office codes.
- MTL_UNITS_OF_MEASURE_VL — unit-of-measure validation for UOM attributes.
- FND_GLOBAL (package) and PO_GEN_DIFF_PKG (package) — session context (NLS language via userenv) and purchasing flexfield utility logic.
The view therefore joins purchasing draft line data to flexfield metadata and then applies DECODE-based lookups against each referenced base object.
Key Columns
- pk1_value, pk2_value, pk3_value — po_header_id, draft_id, and po_line_id respectively; the primary key columns identifying the parent header and line.
- pk4_value, pk5_value — reserved and returned as NULL.
- col_name — the flexfield column name from EGO_FND_DSC_FLX_CTX_EXT, combined with attr_name to drive conditional decoding.
- col_value — the stored attribute value before decoding.
- The decoded expression returns the resolved value: a UOM description for UOM, a displayed field for MDAPS_MAIS, PRGM_CODE, CUST_PRJ_CODE, INSP_RESP, INSP_LOC, ACCP_LOC, a location code for INSP_ADD_LOC and ACCP_ADD_LOC, an office code for INSP_ADD_CODE and ACCP_ADD_CODE, and meanings for FSC_PSC and NAICS.
Common Use Cases and Queries
Typical uses include extracting all user-defined attributes for a purchasing line, or isolating a single attribute such as the acceptance additional office code:
- Line-attribute extract:
SELECT pk1_value, pk3_value, col_name, col_value FROM apps.po_sgd_mod_lines_uda_v WHERE pk1_value = :po_header_id; - Acceptance office lookup:
SELECT pk3_value, col_value FROM apps.po_sgd_mod_lines_uda_v WHERE col_name = 'ACCP_ADD_CODE'; - Inspection/acceptance location reporting:
SELECT pk3_value, col_name, col_value FROM apps.po_sgd_mod_lines_uda_v WHERE col_name IN ('INSP_LOC','ACCP_LOC');
Because the view already resolves codes to displayed values and respects userenv('lang'), it is well suited to multilingual reporting and to interface extracts requiring human-readable attribute text rather than internal codes.