You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Get the correct PO Number for an Invoice Number

Received Response
86
Views
9
Comments
edited Sep 6, 2019 1:04PM in Reporting and Analytics for ERP 9 comments

Content

Hi,

We had some consultants in they wrote a large piece of SQL, of which the below is a small part. It's looking to get the correct PO number for a specific invoice number. Specifically the code in bold

XTE = XLA_TRANSACTION_ENTITIES

(
CASE
WHEN
GJH.JE_SOURCE IN 
(
'Purchasing', 'Payables'
)
THEN
(
SELECT DISTINCT
PHA.SEGMENT1 
FROM
AP_INVOICES_ALL AIA, PO_HEADERS_ALL PHA 
WHERE
AIA.PO_HEADER_ID = PHA.PO_HEADER_ID 
AND AIA.PO_HEADER_ID IS NOT NULL 
AND AIA.INVOICE_NUM = XTE.TRANSACTION_NUMBER 
AND AIA.INVOICE_ID = XTE.SOURCE_ID_INT_1) 
WHEN
GJH.JE_SOURCE IN 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!