Search Results cpg_cp_po_hdr_mch_v
Overview
CPG_CP_PO_HDR_MCH_V is a read-only database view owned by the APPS schema in Oracle E-Business Suite, registered under the product GML - Process Manufacturing Logistics (Process Manufacturing Logistics). The view is described in the ETRM repository simply as a "PO Header view." Its functional purpose is to reconcile and compare purchase order header data originating in Oracle Purchasing (Oracle Financials) against the corresponding purchase order records that were created or migrated into the Process Manufacturing Logistics (GML) schema, which stores its own PO header information in PO_ORDR_HDR.
The view is essentially a mismatch and discrepancy report generator. Rather than presenting a single clean list of purchase orders, it returns the union of four distinct result sets, each tagged with a numeric MSG_CODE that identifies the nature of the problem or condition detected. This makes the view useful for data migration validation, integration troubleshooting, and audit reporting between the Oracle Purchasing and Process Manufacturing Logistics applications after an upgrade or migration.
Underlying Base Objects
The documented base objects referenced by this view are:
- PO_HEADERS_ALL (SYNONYM) — the standard Oracle Purchasing PO header table, providing SEGMENT1, PO_HEADER_ID, TYPE_LOOKUP_CODE, and APPROVED_DATE.
- PO_ORDR_HDR (SYNONYM) — the Process Manufacturing Logistics purchase order header table, providing PO_NO, PO_ID, ORGN_CODE, and PO_DATE.
- CPG_ORAGEMS_MAPPING (SYNONYM) — the mapping table linking the Oracle Purchasing PO_HEADER_ID to the GML PO_ID and TRANSACTION_TYPE, enabling cross-system correlation.
- GML_AUDIT_REPORTS (PACKAGE) — supplies the helper functions GET_OFI_LINE_COUNT, GET_GEMMS_LINE_COUNT, GET_OFI_TOTAL_COST, and GET_GEMMS_TOTAL_COST used to compare line counts and total costs between the two systems.
The view text joins these objects through a series of NOT EXISTS and EXISTS subqueries plus an inner join on CPG_ORAGEMS_MAPPING, and uses UNION (not UNION ALL) to combine the four selection branches.
Key Columns
- PO_NO — the purchase order number. For Oracle Purchasing rows it is SEGMENT1; for GML-only rows the leading zeros are stripped with LTRIM.
- ORA_LINE / GMS_LINE — placeholders, both returned as a single blank space, reserved for line-level reporting.
- ORA_INT / GMS_INT — the Oracle Purchasing PO_HEADER_ID and the GML PO_ID respectively. A value of 0 indicates the record is absent from that system.
- PO_DATE — the order date. For Oracle Purchasing rows this is APPS.PO_HEADERS_ALL.APPROVED_DATE. The search term "approved_date" maps directly to this column, which is the Oracle Purchasing approval timestamp. For GML-originated rows the column is instead populated from PO_ORDR_HDR.PO_DATE.
- MSG_CODE — a numeric indicator of the discrepancy category: 1, 2, 3, or 4.
Common Use Cases and Queries
Typical scenarios include post-migration validation, reconciliation of purchase orders between Oracle Purchasing and GML, and locating orders whose approval date or line/cost totals diverge. MSG_CODE 1 flags standard PO headers in Oracle Purchasing with a CPG mapping but no matching GML record; MSG_CODE 2 flags GML records with no matching Oracle Purchasing header; MSG_CODE 3 flags matched records whose line counts differ (via GML_AUDIT_REPORTS.GET_OFI_LINE_COUNT vs. GET_GEMMS_LINE_COUNT); MSG_CODE 4 flags matched records whose total costs differ.
Sample query listing all mismatches, ordered by the approval-based PO_DATE:
SELECT po_no, ora_int, gms_int, po_date, msg_code FROM apps.cpg_cp_po_hdr_mch_v ORDER BY msg_code, po_date;SELECT po_no, po_date FROM apps.cpg_cp_po_hdr_mch_v WHERE msg_code = 1 AND po_date >= SYSDATE - 30;SELECT msg_code, COUNT(*) FROM apps.cpg_cp_po_hdr_mch_v GROUP BY msg_code;
The first two queries leverage the APPROVED_DATE-derived PO_DATE column exposed by the view, directly serving users searching on "approved_date."
-
View: CPG_CP_PO_HDR_MCH_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:GML.CPG_CP_PO_HDR_MCH_V, object_name:CPG_CP_PO_HDR_MCH_V, status:VALID, product: GML - Process Manufacturing Logistics , description: PO Header view , implementation_dba_data: APPS.CPG_CP_PO_HDR_MCH_V ,
-
View: CPG_CP_PO_HDR_MCH_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:GML.CPG_CP_PO_HDR_MCH_V, object_name:CPG_CP_PO_HDR_MCH_V, status:VALID, product: GML - Process Manufacturing Logistics , description: PO Header view , implementation_dba_data: APPS.CPG_CP_PO_HDR_MCH_V ,
-
12.2.2 FND Design Data
12.2.2
-
PACKAGE: APPS.GML_AUDIT_REPORTS
12.1.1
owner:APPS, object_type:PACKAGE, object_name:GML_AUDIT_REPORTS, status:VALID,
-
PACKAGE: APPS.GML_AUDIT_REPORTS
12.2.2
owner:APPS, object_type:PACKAGE, object_name:GML_AUDIT_REPORTS, status:VALID,
-
SYNONYM: APPS.CPG_ORAGEMS_MAPPING
12.2.2
owner:APPS, object_type:SYNONYM, object_name:CPG_ORAGEMS_MAPPING, status:VALID,
-
12.1.1 FND Design Data
12.1.1
-
SYNONYM: APPS.PO_ORDR_HDR
12.2.2
owner:APPS, object_type:SYNONYM, object_name:PO_ORDR_HDR, status:VALID,
-
SYNONYM: APPS.PO_ORDR_HDR
12.1.1
owner:APPS, object_type:SYNONYM, object_name:PO_ORDR_HDR, status:VALID,
-
SYNONYM: APPS.CPG_ORAGEMS_MAPPING
12.1.1
owner:APPS, object_type:SYNONYM, object_name:CPG_ORAGEMS_MAPPING, status:VALID,
-
VIEW: APPS.CPG_CP_PO_HDR_MCH_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:GML.CPG_CP_PO_HDR_MCH_V, object_name:CPG_CP_PO_HDR_MCH_V, status:VALID,
-
VIEW: APPS.CPG_CP_PO_HDR_MCH_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:GML.CPG_CP_PO_HDR_MCH_V, object_name:CPG_CP_PO_HDR_MCH_V, status:VALID,
-
SYNONYM: APPS.PO_HEADERS_ALL
12.1.1
owner:APPS, object_type:SYNONYM, object_name:PO_HEADERS_ALL, status:VALID,
-
SYNONYM: APPS.PO_HEADERS_ALL
12.2.2
owner:APPS, object_type:SYNONYM, object_name:PO_HEADERS_ALL, status:VALID,
-
eTRM - GML Tables and Views
12.2.2
description: Tax reporting classes. ,
-
eTRM - GML Tables and Views
12.1.1
description: Tax reporting classes. ,
-
12.2.2 DBA Data
12.2.2
-
12.1.1 DBA Data
12.1.1
-
eTRM - GML Tables and Views
12.2.2
description: Tax reporting classes. ,
-
eTRM - GML Tables and Views
12.1.1
description: Tax reporting classes. ,