ECC Payables, Installments, SQL2

Description
Categories: Enterprise Command Center
Columns: Ecc Spec Id, Attribute Category, Attribute1, Attribute2, Attribute3, Attribute4, Attribute5, Attribute6, Attribute7, Attribute8 ...
Imported from Enterprise Command Center
Dataset Key: ap-trx
Query Procedure: AP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: AP_ECC_DATASECURITY_PKG_PUB.GetFilterAttributeValues
select
x.*
from
(
select * from (SELECT ECC_SPEC_ID,
ATTRIBUTE_CATEGORY,
ATTRIBUTE1,
ATTRIBUTE2,
ATTRIBUTE3,
ATTRIBUTE4,
ATTRIBUTE5,
ATTRIBUTE6,
ATTRIBUTE7,
ATTRIBUTE8,
ATTRIBUTE9,
ATTRIBUTE10,
ATTRIBUTE11,
ATTRIBUTE12,
ATTRIBUTE13,
ATTRIBUTE14,
ATTRIBUTE15,
  RECORD_TYPE,
  OPERATING_UNIT,
  ORG_ID,
  INVOICE_ID,
  INVOICE_TYPE_LOOKUP_CODE,
  INVOICE_TYPE,
  INVOICE_NUMBER,
  LEGAL_ENTITY,
  VALIDATION_STATUS,
  INVOICE_AMOUNT,
  INV_CURRENCY,
  INV_CURRENCY_CODE,
  INVOICE_DATE,
  PO_NUMBERS,
  VOUCHER_NUM,
  SOURCE,
  BASE_AMOUNT,
  PAYMENT_TERM,
  GL_DATE,
  EXCHANGE_RATE,
  DUE_DATE,
  PAYMENT_STATUS_FLAG,
  PAYMENT_STATUS,
  AMOUNT_REMAINING,
  AMOUNT_REMAINING_BASE,
  INSTALLMENT,
  SUPPLIER_TYPE,
  SUPPLIER_TYPE_CODE,
  VENDOR_ID,
  SUPPLIER_NAME,
  SUPPLIER_NUMBER,
  SITE_CODE,
  LEDGER_ID,
  LEDGER,
  GL_CURRENCY,
  GL_CURRENCY_CODE,
  LANGUAGE
FROM
  AP_ECC_PREPAYMENT_V
WHERE VALIDATION_STATUS = 'AVAILABLE' and language in ('US'))
PIVOT (max(OPERATING_UNIT) as OPERATING_UNIT , max(INVOICE_TYPE) as INVOICE_TYPE,max(PAYMENT_STATUS) as PAYMENT_STATUS,
 max(SUPPLIER_TYPE) as SUPPLIER_TYPE, max(PAYMENT_TERM) as PAYMENT_TERM,max (INV_CURRENCY) as INV_CURRENCY, max(GL_CURRENCY) as GL_CURRENCY
 for LANGUAGE in ('US' "US"))
) x
where
2=2
Parameter Name SQL text Validation
Operating Unit
x.org_id in (select haouv.organization_id from hr_all_organization_units_vl haouv where haouv.name=:operating_unit)
LOV