Вы находитесь на странице: 1из 28

Oracle Business Intelligence Applications Fusion Edition ETL Data Lineage Guide Release 7.9.

5
This document is provided for information purposes only, and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor is it subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This document may not be Copyright 2008, Oracle. All Rights Reserved.

How to use this guide

1 ETL mappings are split into two main mappings, SDE mappings and SIL mappings. 2 SDE mappings load the staging tables,then SIL mappings (SILOS, SIL_Vert, PLP) load the final physical warehouse tables 3 SILOS SIL mappings are for all sources except Siebel Verticals. SIL_Vert SIL mappings are for Siebel Verticals only 4 Staging tables are suffixed with S, so W_AP_XACTS_F is the final table and the staging table is W_AP_XACTS_FS 5 In general mappings are linear, however, some include more complex logic, e.g. Post Load Processing, combining temp tab 6 Start by looking at the mappings of product to DAC execution plans to physical warehouse table 7 Figure out the associate staging tables and look at the specific source system tab to review where the staging tables source 8 Select SQL Override ID and Click on "Go to SQL Override" button to navigate to SQL used to extract data which will include details on business logic, etc. 9 Universal Adapter does not have SQL Overrides 10 Select Target column and click on "Go to SIL" button to navigate to SIL where SDE Target = SIL Source 11 Review the Coverage Matrix to understand which adapters populate which parts of the physical data warehouse schema

hysical warehouse tables ebel Verticals only _AP_XACTS_FS sing, combining temp tables, etc.

the staging tables source data from

ata warehouse schema

Oracle BI Applications 7.9.5 Release


Data Lineage Sheet
The data lineage sheet below shows relationships between the ETL Folder, ETL Mapping, OLTP columns and Data Warehouse Columns. It only documents the Source Dependent Extract mappings (SDEs). It also displays which columns are populated with lookup, for FOLDER_NAME SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor SDE_ORAR12_Adaptor MAPPING_NAME SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension SDE_ORA_APTermsDimension

TARGET_TABLE W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS W_AP_TERMS_DS

TARGET_COL ACTIVE_FLG AP_TERM_CODE AP_TERM_DESC AP_TERM_DURATION AP_TERM_NAME AUX1_CHANGED_ON_DT AUX2_CHANGED_ON_DT AUX3_CHANGED_ON_DT AUX4_CHANGED_ON_DT CHANGED_BY_ID CHANGED_ON_DT CONDITION_10_TEXT CONDITION_10_TEXT CONDITION_10_TEXT CONDITION_10_TEXT CONDITION_10_TEXT CONDITION_10_TEXT CONDITION_10_TEXT CONDITION_1_TEXT CONDITION_1_TEXT CONDITION_1_TEXT CONDITION_1_TEXT CONDITION_1_TEXT

TARGET W_AP_TERMS_DS.ACTIVE_FLG W_AP_TERMS_DS.AP_TERM_CODE W_AP_TERMS_DS.AP_TERM_DESC W_AP_TERMS_DS.AP_TERM_DURATION W_AP_TERMS_DS.AP_TERM_NAME W_AP_TERMS_DS.AUX1_CHANGED_ON_DT W_AP_TERMS_DS.AUX2_CHANGED_ON_DT W_AP_TERMS_DS.AUX3_CHANGED_ON_DT W_AP_TERMS_DS.AUX4_CHANGED_ON_DT W_AP_TERMS_DS.CHANGED_BY_ID W_AP_TERMS_DS.CHANGED_ON_DT W_AP_TERMS_DS.CONDITION_10_TEXT W_AP_TERMS_DS.CONDITION_10_TEXT W_AP_TERMS_DS.CONDITION_10_TEXT W_AP_TERMS_DS.CONDITION_10_TEXT W_AP_TERMS_DS.CONDITION_10_TEXT W_AP_TERMS_DS.CONDITION_10_TEXT W_AP_TERMS_DS.CONDITION_10_TEXT W_AP_TERMS_DS.CONDITION_1_TEXT W_AP_TERMS_DS.CONDITION_1_TEXT W_AP_TERMS_DS.CONDITION_1_TEXT W_AP_TERMS_DS.CONDITION_1_TEXT W_AP_TERMS_DS.CONDITION_1_TEXT

SOURCE_TABLE AP_TERMS AP_TERMS AP_TERMS AP_TERMS AP_TERMS_LINES

AP_TERMS AP_TERMS AP_TERMS AP_TERMS_LINES AP_TERMS_LINES AP_TERMS_LINES AP_TERMS_LINES AP_TERMS_LINES AP_TERMS_LINES AP_TERMS AP_TERMS_LINES AP_TERMS_LINES AP_TERMS_LINES AP_TERMS_LINES

SOURCE_COL ENABLED_FLAG TERM_ID DESCRIPTION Not Populated - Not Connected NAME LAST_UPDATE_DATE Not Populated - Not Connected Not Populated - Not Connected Not Populated - Not Connected LAST_UPDATED_BY LAST_UPDATE_DATE TERM_ID DUE_AMOUNT DUE_DAYS DUE_DAY_OF_MONTH DUE_MONTHS_FORWARD DUE_PERCENT SEQUENCE_NUM TERM_ID DUE_AMOUNT DUE_DAYS DUE_DAY_OF_MONTH DUE_MONTHS_FORWARD

SQL_OVERRIDE_ID SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3

SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3 SDE_ORAR12_Adaptor.mplt_BC_ORA_APTermsDimension.4.SQ_RA_TERMS.3

Oracle BI Applications 7.9.5 Release


Data Lineage Sheet
The data lineage sheet below shows relationships between the ETL Folder, ETL Mapping, OLTP columns and Data Warehouse Columns. It only documents the Source Dependent Extract mappings (SDEs). It also displays which columns are populated with lookup, for FOLDER_NAME SILOS SILOS SILOS SILOS SILOS SILOS SILOS SILOS SILOS SILOS SILOS SILOS SILOS SILOS MAPPING_NAME SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact SIL_ACDEventFact

TARGET_TABLE W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F W_ACD_EVENT_F

TARGET_COL ANI_NUM AUX1_CHANGED_ON_DT AUX2_CHANGED_ON_DT AUX3_CHANGED_ON_DT AUX4_CHANGED_ON_DT CALLID_NUM CALL_EVNT_TYPE_WID CALL_EVNT_TYPE_WID CALL_EVNT_TYPE_WID CALL_REASON_WID CALL_REASON_WID CALL_REASON_WID CALL_TYPE_WID CALL_TYPE_WID

SOURCE W_ACD_EVENT_FS.ANI_NUM W_ACD_EVENT_FS.AUX1_CHANGED_ON_DT W_ACD_EVENT_FS.AUX2_CHANGED_ON_DT W_ACD_EVENT_FS.AUX3_CHANGED_ON_DT W_ACD_EVENT_FS.AUX4_CHANGED_ON_DT W_ACD_EVENT_FS.CALLID_NUM W_ACD_EVENT_FS.CALL_EVNT_TYPE_ID W_ACD_EVENT_FS.DATASOURCE_NUM_ID W_EVENT_TYPE_D.ROW_WID W_ACD_EVENT_FS.CALL_REASON_ID W_ACD_EVENT_FS.DATASOURCE_NUM_ID W_REASON_D.ROW_WID W_ACD_EVENT_FS.CALL_TYPE_ID W_ACD_EVENT_FS.DATASOURCE_NUM_ID

SOURCE_TABLE W_ACD_EVENT_FS W_ACD_EVENT_FS W_ACD_EVENT_FS W_ACD_EVENT_FS W_ACD_EVENT_FS W_ACD_EVENT_FS W_ACD_EVENT_FS W_ACD_EVENT_FS W_EVENT_TYPE_D W_ACD_EVENT_FS W_ACD_EVENT_FS W_REASON_D W_ACD_EVENT_FS W_ACD_EVENT_FS

SOURCE_COL ANI_NUM AUX1_CHANGED_ON_DT AUX2_CHANGED_ON_DT AUX3_CHANGED_ON_DT AUX4_CHANGED_ON_DT CALLID_NUM CALL_EVNT_TYPE_ID DATASOURCE_NUM_ID ROW_WID CALL_REASON_ID DATASOURCE_NUM_ID ROW_WID CALL_TYPE_ID DATASOURCE_NUM_ID

SQL_OVERRIDE_ID SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.mplt_SIL_ACDEventFact.12.Lkp_W_Event_Type_D_Call_Event_Type_Wid.11 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.mplt_SIL_ACDEventFact.9.Lkp_W_REASON_D_Call_Reason_Wid.11 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3 SILOS.SIL_ACDEventFact.8.Sq_W_ACD_EVENT_FS.3

Oracle BI Applications 7.9.5 Release


SQL Overrides
This sheet below shows the full SQL Override statement contents of the SQL Override IDs from the lineage sheets. SQL_OVERRIDE_ID PLP.MPLT_GET_ETL_PROC_WID.1.LKP_ETL_PROC_WID.11 PLP.mplt_GLBalanceAggrByAcctSegCodes.6.SQ_W_GL_BALANCE_F.3 PLP.mplt_PLP_Aggregates.5.LKP_IA_GL_GROUP_ACCTS.11 PLP.MPLT_TIME_PERIOD_AGG.1.LKP_PERIOD_START_END_DT.11 PLP.MPLT_UNSPECIFIED.3.LKP_ETL_PROC_WID.11 PLP.MPLT_UNSPECIFIED.4.LKP_W_PARAM_G_LANG_ID.11 PLP.MPLT_UNSPECIFIED.6.LKP_W_PARAM_G.11 PLP.MPLT_UNSPECIFIED.9.SQ_W_LST_OF_VAL_G.3 PLP.PLP_APBalanceCurrentActivityLoad.5.SQ_W_AP_BALANCE.3 PLP.PLP_APBalanceDateUpdate.4.SQ_W_AP_BALANCE.3 PLP.PLP_APBalanceFutureActivityLoad.7.SQ_W_AP_BALANCE.3 PLP.PLP_APBalanceFutureActivityUpdate.6.SQ_W_AP_BALANCE.3 PLP.PLP_APFutureActivityDelete.3.SQ_NU_AP_FUACT.3 PLP.PLP_APFutureActivityDerive.11.LKP_AP_FUACT_F_TMP.11 PLP.PLP_APFutureActivityDerive.6.SQ_W_AP_BALANCE.3 PLP.PLP_APFutureActivityUpdate.4.SQ_W_AP_FUACT.3 PLP.PLP_APIncrActivityLoad.6.SQ_PLP_AP_INCR_ACTIVITY_LOAD.3 PLP.PLP_APIncrActivityLoad.7.LKP_W_EXCH_RATE_G.11 PLP.PLP_APSnapshotInvoiceAging.10.LKP_CUT_OF_DK.11 PLP.PLP_APSnapshotInvoiceAging.13.SQ_IA_AP_AGING_INV.3 PLP.PLP_APSnapshotInvoiceAging.14.SQ_IA_AP_XACTS.3 PLP.PLP_APSnapshotSupplierAgingAggregate.10.SQ_IA_AP_AGING_AGG.3 PLP.PLP_APSnapshotSupplierAgingAggregate.8.SQ_IA_AP_AGING_INV.3

neage sheets. SQL_OVERRIDE SELECT W_GL_BALANCE_F.LEDGER_WID, W_GL_BALANCE_F.PROFIT_CENTER_WID,

W_GL_BALANCE

SELECT MAX(W_AP_BALANCE_F_TMP.OPERATING_UNIT_ORG_WID), MAX(W_AP_BALANCE_F_TMP.PAYABLES_ORG SELECT W_AP_BALANCE_F.INTEGRATION_ID, W_AP_BALANCE_F.DATASOURCE_NUM_ID, W_DAY_D.ROW_WIDFRO SELECT MAX(W_AP_BALANCE_F_TMP.OPERATING_UNIT_ORG_WID), MAX(W_AP_BALANCE_F_TMP.PAYABLES_ORG SELECT MAX(W_AP_FUACT_F_TMP.OPERATING_UNIT_ORG_WID), MAX(W_AP_FUACT_F_TMP.PAYABLES_ORG_WID SELECT W_AP_FUACT_F_TMP.ACTIVITY_DT_WID,W_AP_FUACT_F_TMP.INTEGRATION_ID,W_AP_FUACT_F_TMP.DAT

SELECT W_AP_BALANCE_F_TMP.OPERATING_UNIT_ORG_WID, W_AP_BALANCE_F_TMP.PAYABLES_ORG_WID, W_A SELECT W_AP_FUACT_F_TMP.ACTIVITY_DT_WID,W_AP_FUACT_F_TMP. INTEGRATION_ID, W_AP_FUACT_F_TMP. D SELECT W_AP_XACT_F.BALANCE_ID, W_AP_XACT_F.DATASOURCE_NUM_ID, W_AP_XACT_F.POSTED_ON_DT_WID,

SELECT D1.W_CURRENT_CAL_DAY_CODE as W_CURRENT_CAL_DAY_CODE, D.ROW_WID as ROW_WIDFROM W_D SELECT DISTINCT W_AP_AGING_INVOICE_A.SNAPSHOT_DT_WID, W_DAY_D.LAST_DAY_CAL_MNTH_FLG, W_DAY_D SELECTW_DAY_D.ROW_WID SNAPSHOT_DT_WID,W_AP_XACT_F.PURCH_INVOICE_NUM,W_AP_XACT_F.SUPPLIER_ SELECT DISTINCT W_AP_AGING_SUPPLIER_A.SNAPSHOT_DT_WID, W_DAY_D.ROW_WID FROM W_AP_AGING_SUP SELECT W_DAY_D.ROW_WID SNAPSHOT_DT_WID, W_AP_AGING_INVOICE_A.SUPPLIER_WID,W_AP_AGING_INVOIC

D,

W_GL_BALANCE_F.COMPANY_ORG_WID,

W_GL_BALANCE_F.BUSN_AREA_ORG_WID,

W_GL_ACCOUNT_D.GROU

F_TMP.PAYABLES_ORG_WID), MAX(W_AP_BALANCE_F_TMP.LEDGER_WID),MAX(W_AP_BALANCE_F_TMP.PROFIT_CENTER_WID _DAY_D.ROW_WIDFROMW_DAY_D, W_AP_BALANCE_FWHERE W_DAY_D.ROW_WID = (SELECT W_DAY_D.ROW_WID FROM W_D F_TMP.PAYABLES_ORG_WID), MAX(W_AP_BALANCE_F_TMP.LEDGER_WID), MAX(W_AP_BALANCE_F_TMP.PROFIT_CENTER_WI P.PAYABLES_ORG_WID), MAX(W_AP_FUACT_F_TMP.LEDGER_WID), MAX(W_AP_FUACT_F_TMP.PROFIT_CENTER_WID), MAX(W_ _AP_FUACT_F_TMP.DATASOURCE_NUM_IDFROM W_AP_FUACT_F_TMPWHERE W_AP_FUACT_F_TMP.BAL_XFER_FLG = 'Y' ANDW

ABLES_ORG_WID, W_AP_BALANCE_F_TMP.LEDGER_WID, W_AP_BALANCE_F_TMP.PROFIT_CENTER_WID, W_AP_BALANCE_F_ W_AP_FUACT_F_TMP. DATASOURCE_NUM_ID FROMW_AP_FUACT_F_TMPWHEREW_AP_FUACT_F_TMP.ACTIVITY_DT_WID <= (S .POSTED_ON_DT_WID, MAX(W_AP_XACT_F.GL_ACCOUNT_WID), MAX(W_AP_XACT_F.SUPPLIER_WID), MAX(W_AP_XACT_F.SPL

as ROW_WIDFROM W_DAY_D D, W_DAY_D D1WHERE D1.W_CURRENT_CAL_DAY_CODE = 'Current'AND D.JULIAN_MONTH_NUM L_MNTH_FLG, W_DAY_D.W_CURRENT_CAL_DAY_CODEFROM W_AP_AGING_INVOICE_A, W_DAY_D WHERE W_AP_AGING_INVO AP_XACT_F.SUPPLIER_WID,W_AP_XACT_F.SPLR_ACCT_WID, W_AP_XACT_F.PURCH_REP_WID,W_AP_XACT_F.PRODUCT_WID, ROM W_AP_AGING_SUPPLIER_A, W_DAY_D WHEREW_AP_AGING_SUPPLIER_A.SNAPSHOT_DT_WID = W_DAY_D.ROW_WID AND D,W_AP_AGING_INVOICE_A.SPLR_ACCT_WID,W_AP_AGING_INVOICE_A.OPERATING_UNIT_ORG_WID,W_AP_AGING_INVOICE_A

D,

W_GL_ACCOUNT_D.GROUP_ACCT_WID,

W_GL_BALANCE_F.BALANCE_DT_WID,

W_GL_BALANCE_F.BALANCE_TM

NCE_F_TMP.PROFIT_CENTER_WID),MAX(W_AP_BALANCE_F_TMP.COMPANY_ORG_WID), MAX(W_AP_BALANCE_F_TMP.BUSN_AR T W_DAY_D.ROW_WID FROM W_DAY_D WHERE W_CURRENT_CAL_DAY_CODE = 'Current') NCE_F_TMP.PROFIT_CENTER_WID), MAX(W_AP_BALANCE_F_TMP.COMPANY_ORG_WID), MAX(W_AP_BALANCE_F_TMP.BUSN_A P.PROFIT_CENTER_WID), MAX(W_AP_FUACT_F_TMP.COMPANY_ORG_WID), MAX(W_AP_FUACT_F_TMP.BUSN_AREA_ORG_WID _F_TMP.BAL_XFER_FLG = 'Y' ANDW_AP_FUACT_F_TMP.ACTIVITY_DT_WID <= (SELECT FSCL_MNTH_END_DT_WID FROM W_FSC

ENTER_WID, W_AP_BALANCE_F_TMP.COMPANY_ORG_WID, W_AP_BALANCE_F_TMP.BUSN_AREA_ORG_WID, W_AP_BALANCE_ T_F_TMP.ACTIVITY_DT_WID <= (SELECT FSCL_MNTH_END_DT_WID FROM W_FSCL_MONTH_D WHERE W_CURRENT_FSCL_MO ER_WID), MAX(W_AP_XACT_F.SPLR_ACCT_WID), MAX(W_AP_XACT_F.OPERATING_UNIT_ORG_WID),MAX(W_AP_XACT_F.PAYABL

rent'AND D.JULIAN_MONTH_NUM = (D1.JULIAN_MONTH_NUM - $$HISTORY_MONTHS)AND D.LAST_DAY_CAL_MNTH_FLG = 'Y'ORD AY_D WHERE W_AP_AGING_INVOICE_A.SNAPSHOT_DT_WID = W_DAY_D.ROW_WID D,W_AP_XACT_F.PRODUCT_WID, W_AP_XACT_F.INVENTORY_PROD_WID, W_AP_XACT_F.SUPPLIER_PROD_WID, W_AP_XACT_ T_WID = W_DAY_D.ROW_WID AND(W_DAY_D.W_CURRENT_CAL_DAY_CODE = 'Current' ORW_DAY_D.LAST_DAY_CAL_MNTH_FLG RG_WID,W_AP_AGING_INVOICE_A.PAYABLES_ORG_WID,W_AP_AGING_INVOICE_A.LEDGER_WID,W_AP_AGING_INVOICE_A.COM

W_GL_BALANCE_F.BALANCE_TM_WID,

W_GL_BALANCE_F.DB_CR_IND,

SUM(W_GL_BALANCE_F.BALANCE_ACCT_AMT

W_AP_BALANCE_F_TMP.BUSN_AREA_ORG_WID), MAX(W_AP_BALANCE_F_TMP.SUPPLIER_WID),MAX(W_AP_BALANCE_F_TMP.S

(W_AP_BALANCE_F_TMP.BUSN_AREA_ORG_WID),MAX(W_AP_BALANCE_F_TMP.SUPPLIER_WID), MAX(W_AP_BALANCE_F_TMP T_F_TMP.BUSN_AREA_ORG_WID), MAX(W_AP_FUACT_F_TMP.SUPPLIER_WID),MAX(W_AP_FUACT_F_TMP.SPLR_ACCT_WID),MA NTH_END_DT_WID FROM W_FSCL_MONTH_D WHERE W_CURRENT_FSCL_MONTH_CODE = 'Current')

REA_ORG_WID, W_AP_BALANCE_F_TMP.SUPPLIER_WID, W_AP_BALANCE_F_TMP.SPLR_ACCT_WID, W_AP_BALANCE_F_TMP.G WHERE W_CURRENT_FSCL_MONTH_CODE = 'Current') WID),MAX(W_AP_XACT_F.PAYABLES_ORG_WID),MAX(W_AP_XACT_F.LEDGER_WID),MAX(W_AP_XACT_F.COMPANY_ORG_WID),

ST_DAY_CAL_MNTH_FLG = 'Y'ORDER BY D1.W_CURRENT_CAL_DAY_CODE,D.ROW_WID --

PLIER_PROD_WID, W_AP_XACT_F.COMPANY_LOC_WID,W_AP_XACT_F.PLANT_LOC_WID, W_AP_XACT_F.OPERATING_UNIT_OR AY_D.LAST_DAY_CAL_MNTH_FLG = 'N') WID,W_AP_AGING_INVOICE_A.COMPANY_ORG_WID,W_AP_AGING_INVOICE_A.COMPANY_LOC_WID,W_AP_AGING_INVOICE_A.B

BALANCE_F.BALANCE_ACCT_AMT) BALANCE_ACCT_AMT,

SUM(W_GL_BALANCE_F.BALANCE_LOC_AMT) BALANCE_LOC_AM

D),MAX(W_AP_BALANCE_F_TMP.SPLR_ACCT_WID),MAX(W_AP_BALANCE_F_TMP.GL_ACCT_WID), MIN(W_AP_BALANCE_F_TMP.

D), MAX(W_AP_BALANCE_F_TMP.SPLR_ACCT_WID), MAX(W_AP_BALANCE_F_TMP.GL_ACCT_WID), MAX(W_AP_BALANCE_F_TM ACT_F_TMP.SPLR_ACCT_WID),MAX(W_AP_FUACT_F_TMP.GL_ACCT_WID), MAX(W_AP_FUACT_F_TMP.ACTIVITY_DT_WID),MAX(W Current')

_WID, W_AP_BALANCE_F_TMP.GL_ACCT_WID, W_AP_BALANCE_F_TMP.ACTIVITY_DT_WID, W_AP_BALANCE_F_TMP.ACTIVITY_

P_XACT_F.COMPANY_ORG_WID), MAX(W_AP_XACT_F.BUSN_AREA_ORG_WID), MAX(W_AP_XACT_F.PROFIT_CENTER_WID),MA

AP_XACT_F.OPERATING_UNIT_ORG_WID, W_AP_XACT_F.PAYABLES_ORG_WID, W_AP_XACT_F.LEDGER_WID, W_AP_XACT_F.CO

_WID,W_AP_AGING_INVOICE_A.BUSN_AREA_ORG_WID,W_AP_AGING_INVOICE_A.LOC_CURR_CODE,SUM(CASE WHEN W_AP_A

CE_LOC_AMT) BALANCE_LOC_AMT,

SUM(W_GL_BALANCE_F.BALANCE_GLOBAL1_AMT) BALANCE_GLOBAL1_AMT,

SUM(W

D), MIN(W_AP_BALANCE_F_TMP.ACTIVITY_DT_WID),SUM(W_AP_BALANCE_F_TMP.DEBIT_ACCT_AMT),SUM(W_AP_BALANCE_F_

WID), MAX(W_AP_BALANCE_F_TMP.ACTIVITY_DT_WID), W_AP_BALANCE_F_TMP.ACCT_CURR_CODE, W_AP_BALANCE_F_TMP.L _F_TMP.ACTIVITY_DT_WID),MAX(W_AP_FUACT_F_TMP.ACTIVITY_TM_WID),SUM(W_AP_FUACT_F_TMP.DEBIT_ACCT_AMT), SUM

_AP_BALANCE_F_TMP.ACTIVITY_TM_WID, W_AP_BALANCE_F_TMP.DEBIT_ACCT_AMT, W_AP_BALANCE_F_TMP.CREDIT_ACCT_

ACT_F.PROFIT_CENTER_WID),MAX(W_AP_XACT_F.POSTED_ON_TM_WID), SUM(CASE WHEN W_AP_XACT_F.DB_CR_IND = 'DEBI

F.LEDGER_WID, W_AP_XACT_F.COMPANY_ORG_WID, W_AP_XACT_F.BUSN_AREA_ORG_WID, W_AP_XACT_F.CTRL_AREA_ORG

_CODE,SUM(CASE WHEN W_AP_AGING_INVOICE_A.OVERDUE_FLG = 'N' AND W_AP_AGING_INVOICE_A.AGING_BUCKET = 1 THE

LANCE_GLOBAL1_AMT,

SUM(W_GL_BALANCE_F.BALANCE_GLOBAL2_AMT) BALANCE_GLOBAL2_AMT,

SUM(W_GL_BALA

T_AMT),SUM(W_AP_BALANCE_F_TMP.CREDIT_ACCT_AMT),SUM(W_AP_BALANCE_F_TMP.DEBIT_LOC_AMT),SUM(W_AP_BALAN

CODE, W_AP_BALANCE_F_TMP.LOC_CURR_CODE, W_AP_BALANCE_F_TMP.INTEGRATION_ID, W_AP_BALANCE_F_TMP.DATASO _F_TMP.DEBIT_ACCT_AMT), SUM(W_AP_FUACT_F_TMP.CREDIT_ACCT_AMT), SUM(W_AP_FUACT_F_TMP.DEBIT_LOC_AMT), SUM

BALANCE_F_TMP.CREDIT_ACCT_AMT, W_AP_BALANCE_F_TMP.DEBIT_LOC_AMT, W_AP_BALANCE_F_TMP.CREDIT_LOC_AMT, W

W_AP_XACT_F.DB_CR_IND = 'DEBIT' THEN W_AP_XACT_F.AP_LOC_AMT ELSE 0.0 END ) DEBIT_LOC_AMT,SUM(CASE WHEN W_AP

W_AP_XACT_F.CTRL_AREA_ORG_WID, W_AP_XACT_F.PURCHASE_ORG_WID, W_AP_XACT_F.ISSUE_ORG_WID, W_AP_XACT_F

VOICE_A.AGING_BUCKET = 1 THEN W_AP_AGING_INVOICE_A.REMAINING_LOC_AMT ELSE 0 END) DUE_1_LOC_AMT,SUM(CAS

BAL2_AMT,

SUM(W_GL_BALANCE_F.BALANCE_GLOBAL3_AMT) BALANCE_GLOBAL3_AMT,

SUM(W_GL_BALANCE_F.ACTIV

IT_LOC_AMT),SUM(W_AP_BALANCE_F_TMP.CREDIT_LOC_AMT),SUM(W_AP_BALANCE_F_TMP.DEBIT_GLOBAL1_AMT),SUM(W_A

, W_AP_BALANCE_F_TMP.DATASOURCE_NUM_ID,W_AP_BALANCE_F_TMP.TENANT_ID ,MAX(W_AP_BALANCE_F.INTEGRATION_I CT_F_TMP.DEBIT_LOC_AMT), SUM(W_AP_FUACT_F_TMP.CREDIT_LOC_AMT), SUM(W_AP_FUACT_F_TMP.DEBIT_GLOBAL1_AMT

NCE_F_TMP.CREDIT_LOC_AMT, W_AP_BALANCE_F_TMP.DEBIT_GLOBAL1_AMT, W_AP_BALANCE_F_TMP.CREDIT_GLOBAL1_AMT

LOC_AMT,SUM(CASE WHEN W_AP_XACT_F.DB_CR_IND = 'CREDIT' THEN W_AP_XACT_F.AP_LOC_AMT ELSE 0.0 END) CREDIT_L

ISSUE_ORG_WID, W_AP_XACT_F.DOC_TYPE_WID, W_AP_XACT_F.REF_DOC_TYPE_WID, W_AP_XACT_F.POSTING_TYPE_WID, W

END) DUE_1_LOC_AMT,SUM(CASE WHEN W_AP_AGING_INVOICE_A.OVERDUE_FLG = 'N' AND W_AP_AGING_INVOICE_A.AGING_

SUM(W_GL_BALANCE_F.ACTIVITY_ACCT_AMT) ACTIVITY_ACCT_AMT,

SUM(W_GL_BALANCE_F.ACTIVITY_LOC_AMT) ACT

DEBIT_GLOBAL1_AMT),SUM(W_AP_BALANCE_F_TMP.CREDIT_GLOBAL1_AMT),SUM(W_AP_BALANCE_F_TMP.DEBIT_GLOBAL2_A

_AP_BALANCE_F.INTEGRATION_ID) ,MAX(W_AP_BALANCE_F.ETL_PROC_WID) FROM W_AP_BALANCE_F_TMP, W_AP_BALANCE CT_F_TMP.DEBIT_GLOBAL1_AMT), SUM(W_AP_FUACT_F_TMP.CREDIT_GLOBAL1_AMT), SUM(W_AP_FUACT_F_TMP.DEBIT_GLO

CE_F_TMP.CREDIT_GLOBAL1_AMT,W_AP_BALANCE_F_TMP.DEBIT_GLOBAL2_AMT, W_AP_BALANCE_F_TMP.CREDIT_GLOBAL2_A

OC_AMT ELSE 0.0 END) CREDIT_LOC_AMT, SUM($$Hint_Tera_Pre_Cast CASE WHEN W_AP_XACT_F.DB_CR_IND = 'DEBIT' THEN $

P_XACT_F.POSTING_TYPE_WID, W_AP_XACT_F.COST_CENTER_WID, W_AP_XACT_F.PROFIT_CENTER_WID, W_AP_XACT_F.DO

W_AP_AGING_INVOICE_A.AGING_BUCKET = 2 THEN W_AP_AGING_INVOICE_A.REMAINING_LOC_AMT ELSE 0 END) DUE_2_LOC

ANCE_F.ACTIVITY_LOC_AMT) ACTIVITY_LOC_AMT,

SUM(W_GL_BALANCE_F.ACTIVITY_GLOBAL1_AMT) ACTIVITY_GLOBAL1_A

LANCE_F_TMP.DEBIT_GLOBAL2_AMT),SUM(W_AP_BALANCE_F_TMP.CREDIT_GLOBAL2_AMT),SUM(W_AP_BALANCE_F_TMP.DEB

ALANCE_F_TMP, W_AP_BALANCE_FWHERE{W_AP_BALANCE_F_TMP LEFT OUTER JOIN W_AP_BALANCE_F ON W_AP_BALANC W_AP_FUACT_F_TMP.DEBIT_GLOBAL2_AMT), SUM(W_AP_FUACT_F_TMP.CREDIT_GLOBAL2_AMT), SUM(W_AP_FUACT_F_TMP.D

NCE_F_TMP.CREDIT_GLOBAL2_AMT,W_AP_BALANCE_F_TMP.DEBIT_GLOBAL3_AMT, W_AP_BALANCE_F_TMP.CREDIT_GLOBAL3

T_F.DB_CR_IND = 'DEBIT' THEN $$Hint_Tera_Pre_Cast W_AP_XACT_F.AP_DOC_AMT* GLOBAL1_EXCHANGE_RATE $$Hint_Tera_P

CENTER_WID, W_AP_XACT_F.DOC_STATUS_WID, W_AP_XACT_F.TAX_TYPE_WID, W_AP_XACT_F.PAY_TERMS_WID, W_AP_XAC

C_AMT ELSE 0 END) DUE_2_LOC_AMT,SUM(CASE WHEN W_AP_AGING_INVOICE_A.OVERDUE_FLG = 'N' AND W_AP_AGING_INV

BAL1_AMT) ACTIVITY_GLOBAL1_AMT,

SUM(W_GL_BALANCE_F.ACTIVITY_GLOBAL2_AMT) ACTIVITY_GLOBAL2_AMT,

SUM

SUM(W_AP_BALANCE_F_TMP.DEBIT_GLOBAL3_AMT),SUM(W_AP_BALANCE_F_TMP.CREDIT_GLOBAL3_AMT),W_AP_BALANCE_F_

_BALANCE_F ON W_AP_BALANCE_F_TMP.INTEGRATION_ID = W_AP_BALANCE_F.INTEGRATION_ID AND W_AP_BALANCE_F_TM MT), SUM(W_AP_FUACT_F_TMP.DEBIT_GLOBAL3_AMT), SUM(W_AP_FUACT_F_TMP.CREDIT_GLOBAL3_AMT), W_AP_FUACT_F_T

ALANCE_F_TMP.CREDIT_GLOBAL3_AMT, W_AP_BALANCE_F_TMP.ACCT_CURR_CODE, W_AP_BALANCE_F_TMP.LOC_CURR_COD

_EXCHANGE_RATE $$Hint_Tera_Post_Cast ELSE 0.0 END $$Hint_Tera_Post_Cast) DEBIT_GLOBAL1_AMT,SUM($$Hint_Tera_Pre_Ca

T_F.PAY_TERMS_WID, W_AP_XACT_F.PAY_METHOD_WID, W_AP_XACT_F.CREATED_BY_WID, W_AP_XACT_F.CHANGED_BY_WID

E_FLG = 'N' AND W_AP_AGING_INVOICE_A.AGING_BUCKET = 3 THEN W_AP_AGING_INVOICE_A.REMAINING_LOC_AMT ELSE 0 E

CTIVITY_GLOBAL2_AMT,

SUM(W_GL_BALANCE_F.ACTIVITY_GLOBAL3_AMT) ACTIVITY_GLOBAL3_AMT,

W_GL_B

OBAL3_AMT),W_AP_BALANCE_F_TMP.ACCT_CURR_CODE, W_AP_BALANCE_F_TMP.LOC_CURR_CODE, W_AP_BALANCE_F_TM

N_ID AND W_AP_BALANCE_F_TMP.DATASOURCE_NUM_ID = W_AP_BALANCE_F.DATASOURCE_NUM_ID}AND W_AP_BALANCE_F LOBAL3_AMT), W_AP_FUACT_F_TMP.ACCT_CURR_CODE, W_AP_FUACT_F_TMP.LOC_CURR_CODE, W_AP_FUACT_F_TMP.INTEG

BALANCE_F_TMP.LOC_CURR_CODE, W_AP_BALANCE_F_TMP.INTEGRATION_ID, W_AP_BALANCE_F_TMP.DATASOURCE_NUM_ID

AL1_AMT,SUM($$Hint_Tera_Pre_Cast CASE WHEN W_AP_XACT_F.DB_CR_IND = 'CREDIT' THEN $$Hint_Tera_Pre_Cast W_AP_XAC

W_AP_XACT_F.CHANGED_BY_WID, W_AP_XACT_F.CREATED_ON_DT, W_AP_XACT_F.CHANGED_ON_DT, W_AP_XACT_F.TRANSA

A.REMAINING_LOC_AMT ELSE 0 END) DUE_3_LOC_AMT,SUM(CASE WHEN W_AP_AGING_INVOICE_A.OVERDUE_FLG = 'N' AND W

OBAL3_AMT,

W_GL_B

R_CODE, W_AP_BALANCE_F_TMP.INTEGRATION_ID, W_AP_BALANCE_F_TMP.DATASOURCE_NUM_ID, W_AP_BALANC

_NUM_ID}AND W_AP_BALANCE_F_TMP.ACTIVITY_DT_WID > (SELECT FSCL_MNTH_END_DT_WID FROM W_ ODE, W_AP_FUACT_F_TMP.INTEGRATION_ID, W_AP_FUACT_F_TMP.DATASOURCE_NUM_ID, W_AP_FU

CE_F_TMP.DATASOURCE_NUM_ID,W_AP_BALANCE_F_TMP. TENANT_IDFROMW_AP_BALANCE_F_TMPWHER

$$Hint_Tera_Pre_Cast W_AP_XACT_F.AP_DOC_AMT* GLOBAL1_E

D_ON_DT, W_AP_XACT_F.TRANSACTION_DT_WID, W_AP_XACT_F.POSTED_ON_DT_WID, W_

OICE_A.OVERDUE_FLG = 'N' AND W_AP_AGING_INVOICE_A.AGING_BUCKET = 4 THEN W_AP_AGING_INVOICE_A.REM

NUM_ID, W_AP_BALANC

ID FROM W_ W_AP_FU

_F_TMPWHER

GING_INVOICE_A.REM