Saturday, 7 March 2020

SQL Query to get the Purchase Order(PO) FBDI Import Error details.

Here is the quick SQL Query to get the Purchase Order(PO) FBDI Import Error details for all the PO's which are errored out.

This is the sample query which can be used. Please use and modify accordingly for your convenience.

SQL Query

SELECT
POIE.BATCH_ID,
POIE.INTERFACE_TYPE,
PHI.DOCUMENT_NUM,
PLI.LINE_NUM,
PLLI.SHIPMENT_NUM,
PDI.DISTRIBUTION_NUM,
PHI.vendor_name,
phi.vendor_site_code,
phi.vendor_id,
phi.vendor_site_id,
PDI.PROJECT,
PDI.TASK,
PDI.EXPENDITURE,
pdi.PJC_EXPENDITURE_ITEM_DATE,
PDI.EXPENDITURE_ORGANIZATION,
POIE.COLUMN_NAME,
POIE.COLUMN_VALUE,
POIE.ERROR_MESSAGE,
POIE.ERROR_MESSAGE_NAME,
POIE.TABLE_NAME,
POIE.CREATED_BY,
poie.request_id
FROM
PO_INTERFACE_ERRORS POIE,
PO_HEADERS_INTERFACE PHI,
PO_LINES_INTERFACE PLI,
PO_LINE_LOCATIONS_INTERFACE PLLI,
PO_DISTRIBUTIONS_INTERFACE PDI
WHERE POIE.INTERFACE_HEADER_ID = PHI.INTERFACE_HEADER_ID(+)
AND POIE.INTERFACE_LINE_ID = PLI.INTERFACE_LINE_ID(+)
AND POIE.INTERFACE_LINE_LOCATION_ID = PLLI.INTERFACE_LINE_LOCATION_ID(+)
AND POIE.INTERFACE_DISTRIBUTION_ID = PDI.INTERFACE_DISTRIBUTION_ID(+) 

No comments:

Post a Comment