ZX Tax Reconciliation by Taxable Account - draft

Description
Categories: BI Publisher
Columns: C Rep Context Id, C Rep Entity Id, C Org Information2, C Rep Context Entity Loc Id, C Rep Context Entity Name, C Rep Context Entity City, C Rep Context Entity County, C Rep Context Entity State, C Rep Context Entity Province, C Rep Context Entity Address1 ...
Application: E-Business Tax
Source: Tax Reconciliation by Taxable Account Report (XML) - Not Supported: Reserved For Future Use
Short Name: ZXJGTAX_XML
DB package: ZX_ZXJGTAX_XMLP_PKG
SELECT
        CON.REP_CONTEXT_ID                      C_REP_CONTEXT_ID,
        CON.REP_ENTITY_ID                       C_REP_ENTITY_ID,
        CON.ORG_INFORMATION2                    C_ORG_INFORMATION2,
        CON.REP_CONTEXT_ENTITY_LOCATION_ID      C_REP_CONTEXT_ENTITY_LOC_ID,
        CON.REP_CONTEXT_ENTITY_NAME             C_REP_CONTEXT_ENTITY_NAME,
        CON.REP_CONTEXT_ENTITY_CITY             C_REP_CONTEXT_ENTITY_CITY,
        CON.REP_CONTEXT_ENTITY_COUNTY           C_REP_CONTEXT_ENTITY_COUNTY,
        CON.REP_CONTEXT_ENTITY_STATE            C_REP_CONTEXT_ENTITY_STATE,
        CON.REP_CONTEXT_ENTITY_PROVINCE         C_REP_CONTEXT_ENTITY_PROVINCE,
        CON.REP_CONTEXT_ENTITY_ADDRESS1         C_REP_CONTEXT_ENTITY_ADDRESS1,
        CON.REP_CONTEXT_ENTITY_ADDRESS2         C_REP_CONTEXT_ENTITY_ADDRESS2,
        CON.REP_CONTEXT_ENTITY_ADDRESS3         C_REP_CONTEXT_ENTITY_ADDRESS3,
        CON.REP_CONTEXT_ENTITY_COUNTRY          C_REP_CONTEXT_ENTITY_COUNTRY,
        CON.REP_CONTEXT_ENTITY_POSTAL_CODE      C_REP_CONTEXT_ENTITY_POST_CODE,
        CON.REP_CONTEXT_ENTITY_TEL_NUMBER       C_REP_CONTEXT_ENTITY_TEL_NUM,
        CON.REP_CONTEXT_LVL_MNG                 C_REP_CONTEXT_LVL_MNG,
        CON.REP_CONTEXT_LVL_CODE                C_REP_CONTEXT_LVL_CODE,
        CON.EXTRACT_SUMMARY_CODE                C_EXTRACT_SUMMARY_CODE,
        CON.MATRIX_REPORT_FLAG                  C_MATRIX_REPORT_FLAG,
        CON.LEGAL_CONTACT_PRE_NAME_ADJUNCT      C_LEGAL_CONTACT_PRE_NAME_ADJUN,
        CON.LEGAL_CONTACT_PARTY_NAME            C_LEGAL_CONTACT_PARTY_NAME,
        CON.TAXPAYER_ID                         C_TAXPAYER_ID,
        CON.LEGAL_CONTACT_TITLE                 C_LEGAL_CONTACT_TITLE,
        CON.ACTIVITY_CODE                       C_ACTIVITY_CODE,
        CON.SUB_ACTIVITY_CODE                   C_SUB_ACTIVITY_CODE,
        CON.INCEPTION_DATE                      C_INCEPTION_DATE,
        CON.LEGAL_CONTACT_PARTY_NUM             C_LEGAL_CONTACT_PARTY_NUM,
        CON.LEGAL_AUTH_ADDRESS_LINE2            C_LEGAL_AUTH_ADDRESS_LINE2,
        CON.LEGAL_AUTH_ADDRESS_LINE3            C_LEGAL_AUTH_ADDRESS_LINE3,
        CON.LEGAL_AUTH_CITY                     C_LEGAL_AUTH_CITY,
        DET.DETAIL_TAX_LINE_ID                  C_DETAIL_TAX_LINE_ID,
        DET.EXTRACT_LINE_ID                     C_EXTRACT_LINE_ID,
        DET.EXTRACT_REPORT_LINE_NUMBER          C_EXTRACT_REPORT_LINE_NUMBER,
        DET.LEDGER_ID                           C_LEDGER_ID,
        DET.LEDGER_NAME                         C_LEDGER_NAME,
        DET.CHART_OF_ACCOUNTS_ID                C_CHART_OF_ACCOUNTS_ID,
        DET.EXTRACT_SOURCE_LEDGER               C_EXTRACT_SOURCE_LEDGER,
        DET.EVENT_CLASS_CODE                    C_EVENT_CLASS_CODE,
        DET.DOC_EVENT_STATUS                    C_DOC_EVENT_STATUS,
        DET.APPLICATION_DOC_STATUS              C_APPLICATION_DOC_STATUS,
        DET.ESTABLISHMENT_ID                    C_ESTABLISHMENT_ID,
        DET.INTERNAL_ORGANIZATION_ID            C_INTERNAL_ORGANIZATION_ID,
        DET.TRX_ID                              C_TRX_ID,
        DET.TRX_NUMBER                          C_TRX_NUMBER,
        DET.TRX_DESCRIPTION                     C_TRX_DESCRIPTION,
        DET.TRX_CURRENCY_CODE                   C_TRX_CURRENCY_CODE,
        DET.TRX_LINE_ID                         C_TRX_LINE_ID,
        DET.TRX_LINE_NUMBER                     C_TRX_LINE_NUMBER,
        DET.TRX_LINE_DESCRIPTION                C_TRX_LINE_DESCRIPTION,
        DET.TRX_LINE_TYPE                       C_TRX_LINE_TYPE,
        DET.TRX_DATE                            C_TRX_DATE,
        DET.DEPOSIT_DATE                        C_DEPOSIT_DATE,
        DET.TRX_DUE_DATE                        C_TRX_DUE_DATE,
        DET.TRX_SHIPPING_DATE                   C_TRX_SHIPPING_DATE,
        DET.TRX_COMMUNICATED_DATE               C_TRX_COMMUNICATED_DATE,
        DET.TRX_TYPE_DESCRIPTION                C_TRX_TYPE_DESCRIPTION,
        DET.TRX_TYPE_ID                         C_TRX_TYPE_ID,
        DET.TRX_BATCH_SOURCE_NAME               C_TRX_BATCH_SOURCE_NAME,
        DET.TRX_SIC_CODE                        C_TRX_SIC_CODE,
        DET.FOB_POINT                           C_FOB_POINT,
        DET.TRX_WAYBILL_NUMBER                  C_TRX_WAYBILL_NUMBER,
        DET.TRX_LINE_CLASS                      C_TRX_LINE_CLASS,
        DET.PRODUCT_ID                          C_PRODUCT_ID,
        DET.PRODUCT_DESCRIPTION                 C_PRODUCT_DESCRIPTION,
        DET.FUNCTIONAL_CURRENCY_CODE            C_FUNCTIONAL_CURRENCY_CODE,
        DET.CURRENCY_CONVERSION_TYPE            C_CURRENCY_CONVERSION_TYPE,
        DET.CURRENCY_CONVERSION_DATE            C_CURRENCY_CONVERSION_DATE,
        DET.CURRENCY_CONVERSION_RATE            C_CURRENCY_CONVERSION_RATE,
        DET.PRECISION                           C_PRECISION,
        DET.MINIMUM_ACCOUNTABLE_UNIT            C_MINIMUM_ACCOUNTABLE_UNIT,
        DET.GDF_FND_CURRENCIES_ATT1             C_GDF_FND_CURRENCIES_ATT1,
        DET.CURRENCY_CODE_DESC                  C_CURRENCY_CODE_DESC,
        DET.TERRITORY_SHORT_NAME                C_TERRITORY_SHORT_NAME,
        DET.DOC_SEQ_ID                          C_DOC_SEQ_ID,
        DET.DOC_SEQ_NAME                        C_DOC_SEQ_NAME,
        DET.DOC_SEQ_VALUE                       C_DOC_SEQ_VALUE,
        DET.TRX_LINE_QUANTITY                   C_TRX_LINE_QUANTITY,
        DET.TRX_LINE_AMT                        C_TRX_LINE_AMT,
        DET.UOM_CODE                            C_UOM_CODE,
        DET.RECEIPT_CLASS_ID                    C_RECEIPT_CLASS_ID,
        DET.TRX_BATCH_SOURCE_ID                 C_TRX_BATCH_SOURCE_ID,
        DET.TRX_BATCH_SOURCE_DATE               C_TRX_BATCH_SOURCE_DATE,
        DET.RELATED_DOC_APPLICATION_ID          C_RELATED_DOC_APPLICATION_ID,
        DET.RELATED_DOC_ENTITY_CODE             C_RELATED_DOC_ENTITY_CODE,
        DET.RELATED_DOC_EVENT_CLASS_CODE        C_RELATED_DOC_EVENT_CLASS_CODE,
        DET.RELATED_DOC_TRX_ID                  C_RELATED_DOC_TRX_ID,
        DET.RELATED_DOC_NUMBER                  C_RELATED_DOC_NUMBER,
        DET.RELATED_DOC_DATE                    C_RELATED_DOC_DATE,
        DET.APPLIED_FROM_APPLICATION_ID         C_APPLIED_FROM_APPLICATION_ID,
        DET.APPLIED_FROM_LINE_ID                C_APPLIED_FROM_LINE_ID,
        DET.APPLIED_FROM_ENTITY_CODE            C_APPLIED_FROM_ENTITY_CODE,
        DET.APPLIED_FROM_TRX_ID                 C_APPLIED_FROM_TRX_ID,
        DET.APPLIED_FROM_EVENT_CLASS_CODE       C_APPLIED_FROM_EVENT_CLS_CODE,
        DET.APPLIED_FROM_TRX_NUMBER             C_APPLIED_FROM_TRX_NUMBER,
        DET.TRX_APPLIED_FROM_CLASS_MNG          C_TRX_APPLIED_FROM_CLASS_MNG,
        DET.ADJUSTED_DOC_APPLICATION_ID         C_ADJUSTED_DOC_APPLICATION_ID,
        DET.ADJUSTED_DOC_ENTITY_CODE            C_ADJUSTED_DOC_ENTITY_CODE,
        DET.ADJUSTED_DOC_EVENT_CLASS_CODE       C_ADJUSTED_DOC_EVENT_CLS_CODE,
        DET.ADJUSTED_DOC_TRX_ID                 C_ADJUSTED_DOC_TRX_ID,
        DET.ADJUSTED_DOC_NUMBER                 C_ADJUSTED_DOC_NUMBER,
        DET.ADJUSTED_DOC_DATE                   C_ADJUSTED_DOC_DATE,
        DET.APPLIED_TO_APPLICATION_ID           C_APPLIED_TO_APPLICATION_ID,
        DET.APPLIED_TO_TRX_ID                   C_APPLIED_TO_TRX_ID,
        DET.APPLIED_TO_TRX_LINE_ID              C_APPLIED_TO_TRX_LINE_ID,
        DET.APPLIED_TO_ENTITY_CODE              C_APPLIED_TO_ENTITY_CODE,
        DET.APPLIED_TO_EVENT_CLASS_CODE         C_APPLIED_TO_EVENT_CLASS_CODE,
        DET.APPLIED_TO_TRX_NUMBER               C_APPLIED_TO_TRX_NUMBER,
        DET.TRX_APPLIED_TO_CLASS_MNG            C_TRX_APPLIED_TO_CLASS_MNG,
        DET.REF_DOC_APPLICATION_ID              C_REF_DOC_APPLICATION_ID,
        DET.REF_DOC_ENTITY_CODE                 C_REF_DOC_ENTITY_CODE,
        DET.REF_DOC_EVENT_CLASS_CODE            C_REF_DOC_EVENT_CLASS_CODE,
        DET.REF_DOC_TRX_ID                      C_REF_DOC_TRX_ID,
        DET.REF_DOC_LINE_ID                     C_REF_DOC_LINE_ID,
        DET.REF_DOC_LINE_QUANTITY               C_REF_DOC_LINE_QUANTITY,
        DET.MERCHANT_PARTY_DOCUMENT_NUMBER      C_MERCHANT_PARTY_DOC_NUMBER,
        DET.MERCHANT_PARTY_NAME                 C_MERCHANT_PARTY_NAME,
        DET.MERCHANT_PARTY_REFERENCE            C_MERCHANT_PARTY_REFERENCE,
        DET.MERCHANT_PARTY_TAX_REG_NUMBER       C_MERCHANT_PARTY_TAX_REG_NUM,
        DET.MERCHANT_PARTY_TAXPAYER_ID          C_MERCHANT_PARTY_TAXPAYER_ID,
        DET.COUNTRY_OF_SUPPLY                   C_COUNTRY_OF_SUPPLY,
        DET.START_EXPENSE_DATE                  C_START_EXPENSE_DATE,
        DET.DEFAULT_TAXATION_COUNTRY            C_DEFAULT_TAXATION_COUNTRY,
        DET.TRX_CLASS_MNG                       C_TRX_CLASS_MNG,
        DET.TRX_TYPE_MNG                       C_TRX_TYPE_MNG,
        DET.TAX_RATE_CODE_REG_TYPE_MNG          C_TAX_RATE_CODE_REG_TYPE_MNG,
        DET.TAX_EXEMPT_REASON_MNG               C_TAX_EXEMPT_REASON_MNG,
        DET.TAX_EXCEPTION_REASON_MNG            C_TAX_EXCEPTION_REASON_MNG, 
        DET.TAX_RATE_CODE_VAT_TRX_TYPE_MNG      C_TAX_RATE_CDE_VAT_TRX_TYP_MNG,
        DET.DOCUMENT_SUB_TYPE                   C_DOCUMENT_SUB_TYPE,
        DET.SUPPLIER_TAX_INVOICE_NUMBER         C_SUPPLIER_TAX_INVOICE_NUMBER,
        DET.SUPPLIER_TAX_INVOICE_DATE           C_SUPPLIER_TAX_INVOICE_DATE,
        DET.SUPPLIER_EXCHANGE_RATE              C_SUPPLIER_EXCHANGE_RATE,
        DET.TAX_INVOICE_DATE                    C_TAX_INVOICE_DATE,
        DET.TAX_INVOICE_NUMBER                  C_TAX_INVOICE_NUMBER,
        DET.LINE_INTENDED_USE                   C_LINE_INTENDED_USE,
        DET.PRODUCT_FISC_CLASSIFICATION         C_PRODUCT_FISC_CLASSIFICATION,
        DET.PRODUCT_CATEGORY                    C_PRODUCT_CATEGORY,
        DET.USER_DEFINED_FISC_CLASS             C_USER_DEFINED_FISC_CLASS,
        DET.TRX_BUSINESS_CATEGORY               C_TRX_BUSINESS_CATEGORY,
        DET.ASSESSABLE_VALUE                    C_ASSESSABLE_VALUE,
        DET.PORT_OF_ENTRY_CODE                  C_PORT_OF_ENTRY_CODE,
        DET.TAXABLE_LINE_ITEM_FLEXFIELD         C_TAXABLE_LINE_ITEM_FLEXFIELD,
        DET.TAXABLE_LINE_SOURCE_TABLE           C_TAXABLE_LINE_SOURCE_TABLE,
        DET.TAXABLE_LINE_TOTAL_AMOUNT           C_TAXABLE_LINE_TOTAL_AMOUNT,
        DET.TAX_LINE_ID                         C_TAX_LINE_ID,
        DET.TAX_LINE_NUMBER                     C_TAX_LINE_NUMBER,
        DET.TAX_AMT                             C_TAX_AMT,
        DET.TAX_AMT_FUNCL_CURR                  C_TAX_AMT_FUNCL_CURR,
        DET.TAXABLE_AMT                         C_TAXABLE_AMT,
        DET.TAXABLE_AMT_FUNCL_CURR              C_TAXABLE_AMT_FUNCL_CURR,
        DET.TAXABLE_DISC_AMT                    C_TAXABLE_DISC_AMT,
        DET.TAXABLE_DISC_AMT_FUNCL_CURR         C_TAXABLE_DISC_AMT_FUNCL_CURR,
        DET.TAX_RATE_CODE                       C_TAX_RATE_CODE,
        DET.TAX_RATE                            C_TAX_RATE,
        DET.TAX_RATE_VAT_TRX_TYPE_CODE          C_TAX_RATE_VAT_TRX_TYPE_CODE,
        DET.TAX_RATE_VAT_TRX_TYPE_DESC          C_TAX_RATE_VAT_TRX_TYPE_DESC,
        DET.TAX_TYPE_CODE                       C_TAX_TYPE_CODE,
        DET.TAX_TYPE_MNG                        C_TAX_TYPE_MNG,
        DET.TAX_STATUS_ID                       C_TAX_STATUS_ID,
        DET.TAX_RATE_CODE_NAME                  C_TAX_RATE_CODE_NAME,
        DET.TAX_RATE_CODE_DESCRIPTION           C_TAX_RATE_CODE_DESCRIPTION,
        DET.TAX_RATE_ID                         C_TAX_RATE_ID,
        DET.TAX_RATE_REGISTER_TYPE_CODE         C_TAX_RATE_REGISTER_TYPE_CODE,
        DET.TAX_APPLIED                         C_TAX_APPLIED,
        DET.DEF_REC_SETTLEMENT_OPTION_CODE      C_DEF_REC_SETTLEMENT_OPT_CODE,
        DET.OFFSET_TAX_RATE_CODE                C_OFFSET_TAX_RATE_CODE,
        DET.EXEMPT_CERTIFICATE_NUMBER           C_EXEMPT_CERTIFICATE_NUMBER,
        DET.EXEMPT_REASON_CODE                  C_EXEMPT_REASON_CODE,
        DET.TAX_EXCEPTION_REASON_CODE           C_TAX_EXCEPTION_REASON_CODE,
        DET.TAX_EXEMPTION_ID                    C_TAX_EXEMPTION_ID,
        DET.TAX_EXCEPTION_ID                    C_TAX_EXCEPTION_ID,
        DET.TAX_RECOVERY_RATE                   C_TAX_RECOVERY_RATE,
        DET.TAX_REGIME_CODE                     C_TAX_REGIME_CODE,
        DET.TAX                                 C_TAX,
        DET.TAX_JURISDICTION_CODE               C_TAX_JURISDICTION_CODE,
        DET.TAX_STATUS_CODE                     C_TAX_STATUS_CODE,
        DET.TAX_CURRENCY_CODE                   C_TAX_CURRENCY_CODE,
        DET.EXCEPTION_RATE                      C_EXCEPTION_RATE,
        DET.EXEMPT_RATE_MODIFIER                C_EXEMPT_RATE_MODIFIER,
        DET.TAX_DATE                            C_TAX_DATE,
        DET.TAX_DETERMINE_DATE                  C_TAX_DETERMINE_DATE,
        DET.TAX_APPORTIONMENT_LINE_NUMBER       C_TAX_APPORTIONMENT_LINE_NUM,
        DET.TAX_AMT_TAX_CURR                    C_TAX_AMT_TAX_CURR,
        DET.TAXABLE_AMT_TAX_CURR                C_TAXABLE_AMT_TAX_CURR,
        DET.ORIG_TAXABLE_AMT                    C_ORIG_TAXABLE_AMT,
        DET.ORIG_TAXABLE_AMT_TAX_CURR           C_ORIG_TAXABLE_AMT_TAX_CURR,
        DET.ORIG_TAX_AMT                        C_ORIG_TAX_AMT,
        DET.ORIG_TAX_AMT_TAX_CURR               C_ORIG_TAX_AMT_TAX_CURR,
        DET.ORIG_REC_NREC_TAX_AMT               C_ORIG_REC_NREC_TAX_AMT,
        DET.REC_TAX_AMT_TAX_CURR                C_REC_TAX_AMT_TAX_CURR,
        DET.NREC_TAX_AMT_TAX_CURR               C_NREC_TAX_AMT_TAX_CURR,
        DET.TAX_LINE_USER_CATEGORY              C_TAX_LINE_USER_CATEGORY,
        DET.TAX_LINE_USER_ATTRIBUTE1            C_TAX_LINE_USER_ATTRIBUTE1,
        DET.TAX_LINE_USER_ATTRIBUTE2            C_TAX_LINE_USER_ATTRIBUTE2,
        DET.TAX_LINE_USER_ATTRIBUTE3            C_TAX_LINE_USER_ATTRIBUTE3,
        DET.TAX_LINE_USER_ATTRIBUTE4            C_TAX_LINE_USER_ATTRIBUTE4,
        DET.TAX_LINE_USER_ATTRIBUTE5            C_TAX_LINE_USER_ATTRIBUTE5,
        DET.TAX_LINE_USER_ATTRIBUTE6            C_TAX_LINE_USER_ATTRIBUTE6,
        DET.TAX_LINE_USER_ATTRIBUTE7            C_TAX_LINE_USER_ATTRIBUTE7,
        DET.TAX_LINE_USER_ATTRIBUTE8            C_TAX_LINE_USER_ATTRIBUTE8,
        DET.TAX_LINE_USER_ATTRIBUTE9            C_TAX_LINE_USER_ATTRIBUTE9,
        DET.TAX_LINE_USER_ATTRIBUTE10           C_TAX_LINE_USER_ATTRIBUTE10,
        DET.TAX_LINE_USER_ATTRIBUTE11           C_TAX_LINE_USER_ATTRIBUTE11,
        DET.TAX_LINE_USER_ATTRIBUTE12           C_TAX_LINE_USER_ATTRIBUTE12,
        DET.TAX_LINE_USER_ATTRIBUTE13           C_TAX_LINE_USER_ATTRIBUTE13,
        DET.TAX_LINE_USER_ATTRIBUTE14           C_TAX_LINE_USER_ATTRIBUTE14,
        DET.TAX_LINE_USER_ATTRIBUTE15           C_TAX_LINE_USER_ATTRIBUTE15,
        DET.RECOVERY_TYPE_CODE                  C_RECOVERY_TYPE_CODE,
        DET.RECOVERY_RATE_CODE                  C_RECOVERY_RATE_CODE,
        DET.BILLING_TP_NAME                     C_BILLING_TP_NAME,
        DET.BILLING_TP_NUMBER                   C_BILLING_TP_NUMBER,
        DET.BILLING_TP_TAX_REG_NUM              C_BILLING_TP_TAX_REG_NUM,
        DET.BILLING_TP_TAXPAYER_ID              C_BILLING_TP_TAXPAYER_ID,
        DET.BILLING_TP_SITE_NAME_ALT            C_BILLING_TP_SITE_NAME_ALT,
        DET.BILLING_TP_NAME_ALT                 C_BILLING_TP_NAME_ALT,
        DET.BILLING_TP_SIC_CODE                 C_BILLING_TP_SIC_CODE,
        DET.BILLING_TP_CITY                     C_BILLING_TP_CITY,
        DET.BILLING_TP_COUNTY                   C_BILLING_TP_COUNTY,
        DET.BILLING_TP_STATE                    C_BILLING_TP_STATE,
        DET.BILLING_TP_PROVINCE                 C_BILLING_TP_PROVINCE,
        DET.BILLING_TP_ADDRESS1                 C_BILLING_TP_ADDRESS1,
        DET.BILLING_TP_ADDRESS2                 C_BILLING_TP_ADDRESS2,
        DET.BILLING_TP_ADDRESS3                 C_BILLING_TP_ADDRESS3,
        DET.BILLING_TP_ADDRESS_LINES_ALT        C_BILLING_TP_ADDRESS_LINES_ALT,
        DET.BILLING_TP_COUNTRY                  C_BILLING_TP_COUNTRY,
        DET.BILLING_TP_POSTAL_CODE              C_BILLING_TP_POSTAL_CODE,
        DET.SHIPPING_TP_NUMBER                  C_SHIPPING_TP_NUMBER,
        DET.SHIPPING_TP_TAX_REG_NUM             C_SHIPPING_TP_TAX_REG_NUM,
        DET.SHIPPING_TP_TAXPAYER_ID             C_SHIPPING_TP_TAXPAYER_ID,
        DET.SHIPPING_TP_NAME                    C_SHIPPING_TP_NAME,
        DET.SHIPPING_TP_NAME_ALT                C_SHIPPING_TP_NAME_ALT,
        DET.SHIPPING_TP_SIC_CODE                C_SHIPPING_TP_SIC_CODE,
        DET.SHIPPING_TP_CITY                    C_SHIPPING_TP_CITY,
        DET.SHIPPING_TP_COUNTY                  C_SHIPPING_TP_COUNTY,
        DET.SHIPPING_TP_STATE                   C_SHIPPING_TP_STATE,
        DET.SHIPPING_TP_PROVINCE                C_SHIPPING_TP_PROVINCE,
        DET.SHIPPING_TP_ADDRESS1                C_SHIPPING_TP_ADDRESS1,
        DET.SHIPPING_TP_ADDRESS2                C_SHIPPING_TP_ADDRESS2,
        DET.SHIPPING_TP_ADDRESS3                C_SHIPPING_TP_ADDRESS3,
        DET.SHIPPING_TP_ADDRESS_LINES_ALT       C_SHIPPING_TP_ADRS_LINES_ALT,
        DET.SHIPPING_TP_COUNTRY                 C_SHIPPING_TP_COUNTRY,
        DET.SHIPPING_TP_POSTAL_CODE             C_SHIPPING_TP_POSTAL_CODE,
        DET.BILLING_TP_PARTY_NUMBER             C_BILLING_TP_PARTY_NUMBER,
        DET.BANK_ACCOUNT_NAME                   C_BANK_ACCOUNT_NAME,
        DET.BANK_ACCOUNT_NUM                    C_BANK_ACCOUNT_NUM,
        DET.BILLING_TRADING_PARTNER_ID          C_BILLING_TRADING_PARTNER_ID,
        DET.BILLING_TP_SITE_ID                  C_BILLING_TP_SITE_ID,
        DET.BILLING_TP_ADDRESS_ID               C_BILLING_TP_ADDRESS_ID,
        DET.BILLING_TP_TAX_REPORTING_FLAG       C_BILLING_TP_TAX_REP_FLAG,
        DET.SHIPPING_TRADING_PARTNER_ID         C_SHIPPING_TRADING_PARTNER_ID,
        DET.SHIPPING_TP_SITE_ID                 C_SHIPPING_TP_SITE_ID,
        DET.SHIPPING_TP_ADDRESS_ID              C_SHIPPING_TP_ADDRESS_ID,
        DET.BANKING_TP_NAME                     C_BANKING_TP_NAME,
        DET.BANKING_TP_TAXPAYER_ID              C_BANKING_TP_TAXPAYER_ID,
        DET.BANK_ACCOUNT_ID                     C_BANK_ACCOUNT_ID,
        DET.BANK_BRANCH_ID                      C_BANK_BRANCH_ID,
        DET.BILLING_TP_SITE_NAME                C_BILLING_TP_SITE_NAME,
        DET.BILLING_TP_SITE_TAX_REG_NUM         C_BILLING_TP_SITE_TAX_REG_NUM,
        DET.SHIPPING_TP_SITE_NAME               C_SHIPPING_TP_SITE_NAME,
        DET.SHIPPING_TP_SITE_TAX_REG_NUM        C_SHIPPING_TP_SITE_TAX_REG_NUM,
        DET.OFFICE_SITE_FLAG                    C_OFFICE_SITE_FLAG,
        DET.SHIP_TO_LOCATION_ID                 C_SHIP_TO_LOCATION_ID,
        DET.SHIP_FROM_LOCATION_ID               C_SHIP_FROM_LOCATION_ID,
        DET.BILL_TO_LOCATION_ID                 C_BILL_TO_LOCATION_ID,
        DET.BILL_FROM_LOCATION_ID               C_BILL_FROM_LOCATION_ID,
        DET.SHIP_TO_PARTY_TAX_PROF_ID           C_SHIP_TO_PARTY_TAX_PROF_ID,
        DET.SHIP_FROM_PARTY_TAX_PROF_ID         C_SHIP_FROM_PARTY_TAX_PROF_ID,
        DET.BILL_TO_PARTY_TAX_PROF_ID           C_BILL_TO_PARTY_TAX_PROF_ID,
        DET.BILL_FROM_PARTY_TAX_PROF_ID         C_BILL_FROM_PARTY_TAX_PROF_ID,
        DET.OWN_HQ_PARTY_TAX_PROF_ID            C_OWN_HQ_PARTY_TAX_PROF_ID,
        DET.SHIP_TO_SITE_TAX_PROF_ID            C_SHIP_TO_SITE_TAX_PROF_ID,
        DET.BILL_TO_SITE_TAX_PROF_ID            C_BILL_TO_SITE_TAX_PROF_ID,
        DET.SHIP_FROM_SITE_TAX_PROF_ID          C_SHIP_FROM_SITE_TAX_PROF_ID,
        DET.BILL_FROM_SITE_TAX_PROF_ID          C_BILL_FROM_SITE_TAX_PROF_ID,
        DET.OWN_HQ_PARTY_SITE_PROF_ID           C_OWN_HQ_PARTY_SITE_PROF_ID,
        DET.SHIP_TO_PARTY_ID                    C_SHIP_TO_PARTY_ID,
        DET.SHIP_FROM_PARTY_ID                  C_SHIP_FROM_PARTY_ID,
        DET.BILL_TO_PARTY_ID                    C_BILL_TO_PARTY_ID,
        DET.BILL_FROM_PARTY_ID                  C_BILL_FROM_PARTY_ID,
        DET.OWN_HQ_PARTY_ID                     C_OWN_HQ_PARTY_ID,
        DET.SHIP_TO_PARTY_SITE_ID               C_SHIP_TO_PARTY_SITE_ID,
        DET.SHIP_FROM_PARTY_SITE_ID             C_SHIP_FROM_PARTY_SITE_ID,
        DET.BILL_TO_PARTY_SITE_ID               C_BILL_TO_PARTY_SITE_ID,
        DET.BILL_FROM_PARTY_SITE_ID             C_BILL_FROM_PARTY_SITE_ID,
        DET.REGISTRATION_STATUS_CODE            C_REGISTRATION_STATUS_CODE,
        DET.REG_PARTY_TAX_PROF_ID               C_REG_PARTY_TAX_PROF_ID,
        DET.REG_PARTY_TAX_SITE_PROF_ID          C_REG_PARTY_TAX_SITE_PROF_ID,
        DET.POS_TAX_PARTY_PROF_ID               C_POS_TAX_PARTY_PROF_ID,
        DET.POS_TAX_PARTY_SITE_PROF_ID          C_POS_TAX_PARTY_SITE_PROF_ID,
        DET.LEGAL_ENTITY_TAX_REG_NUMBER         C_LEGAL_ENTITY_TAX_REG_NUMBER,
        DET.HQ_ESTB_REG_NUMBER                  C_HQ_ESTB_REG_NUMBER,
        DET.TAX_LINE_REGISTRATION_NUMBER        C_TAX_LINE_REGISTRATION_NUMBER,
        DET.REGISTRATION_PARTY_TYPE             C_REGISTRATION_PARTY_TYPE,
        DET.BALANCING_SEGMENT_VALUE             C_BALANCING_SEGMENT_VALUE,
        DET.BALANCING_SEGMENT_DESC              C_BALANCING_SEGMENT_DESC,
        DET.CANCELLED_DATE                      C_CANCELLED_DATE,
        DET.HISTORICAL_FLAG                     C_HISTORICAL_FLAG,
        DET.CANCEL_FLAG                         C_CANCEL_FLAG,
        DET.SELF_ASSESSED_FLAG                  C_SELF_ASSESSED_FLAG,
        DET.REPORTING_ONLY_FLAG                 C_REPORTING_ONLY_FLAG,
        DET.TAX_ONLY_FLAG                       C_TAX_ONLY_FLAG,
        DET.OFFSET_FLAG                         C_OFFSET_FLAG,
        DET.POSTED_FLAG                         C_POSTED_FLAG,
        DET.MRC_TAX_LINE_FLAG                   C_MRC_TAX_LINE_FLAG,
        DET.SMALL_BUSINESS_FLAG                 C_SMALL_BUSINESS_FLAG,
        DET.RECONCILIATION_FLAG                 C_RECONCILIATION_FLAG,
        DET.TAX_RECOVERABLE_FLAG                C_TAX_RECOVERABLE_FLAG,
        DET.REVERSE_FLAG                        C_REVERSE_FLAG,
        DET.AR_CASH_RECEIPT_REVERSE_STATUS      C_AR_CASH_RECEIPT_REVRS_STATUS,
        DET.AR_CASH_RECEIPT_REVERSE_DATE        C_AR_CASH_RECEIPT_REVERSE_DATE,
        DET.TAXABLE_ITEM_SOURCE_ID              C_TAXABLE_ITEM_SOURCE_ID,
        DET.AMOUNT_APPLIED                      C_AMOUNT_APPLIED,
        DET.BR_REF_CUSTOMER_TRX_ID              C_BR_REF_CUSTOMER_TRX_ID,
        DET.TAX_AMT_INCLUDED_FLAG               C_TAX_AMT_INCLUDED_FLAG,
        DET.GDF_PARTY_SITES_BILL_ATT8           C_GDF_PARTY_SITES_BILL_ATT8,
        DET.GDF_RA_CUST_BILL_ATT10              C_GDF_RA_CUST_BILL_ATT10,
        DET.GDF_RA_CUST_BILL_ATT12              C_GDF_RA_CUST_BILL_ATT12,
        DET.GDF_RA_ADDRESSES_BILL_ATT8          C_GDF_RA_ADDRESSES_BILL_ATT8,
        DET.GDF_RA_ADDRESSES_BILL_ATT9          C_GDF_RA_ADDRESSES_BILL_ATT9,
        DET.GDF_PARTY_SITES_SHIP_ATT8           C_GDF_PARTY_SITES_SHIP_ATT8,
        DET.GDF_RA_CUST_SHIP_ATT10              C_GDF_RA_CUST_SHIP_ATT10,
        DET.GDF_RA_CUST_SHIP_ATT12              C_GDF_RA_CUST_SHIP_ATT12,
        DET.GDF_RA_ADDRESSES_SHIP_ATT8          C_GDF_RA_ADDRESSES_SHIP_ATT8,
        DET.GDF_RA_ADDRESSES_SHIP_ATT9          C_GDF_RA_ADDRESSES_SHIP_ATT9,
        DET.GDF_PO_VENDOR_SITE_ATT17            C_GDF_PO_VENDOR_SITE_ATT17,
        EXT.DETAIL_TAX_LINE_EXT_ID              C_DETAIL_TAX_LINE_EXT_ID,
        EXT.NUMERIC1                            C_TAXABLE_AMT_JG,
        EXT.NUMERIC2                            C_TAXABLE_AMT_FUNCL_CURR_JG,
        EXT.NUMERIC3                            C_TAX_AMT_JG,
        EXT.NUMERIC4                            C_TAX_AMT_FUCNL_CURR_JG,
        EXT.NUMERIC1 + EXT.NUMERIC3 C_GROSS_AMT_JG,
        EXT.NUMERIC2 + EXT.NUMERIC4  C_GROSS_AMT_FUNCL_CURR_JG,
        ACT.ACTG_EXT_LINE_ID                    C_ACTG_EXT_LINE_ID,
        ACT.ACTG_EVENT_TYPE_CODE                C_ACTG_EVENT_TYPE_CODE,
        ACT.ACTG_EVENT_TYPE_MNG                 C_ACTG_EVENT_TYPE_MNG,
        ACT.ACTG_EVENT_NUMBER                   C_ACTG_EVENT_NUMBER,
        ACT.ACTG_EVENT_STATUS_FLAG              C_ACTG_EVENT_STATUS_FLAG,
        ACT.ACTG_EVENT_STATUS_MNG               C_ACTG_EVENT_STATUS_MNG,
        ACT.ACTG_CATEGORY_CODE                  C_ACTG_CATEGORY_CODE,
        ACT.ACTG_CATEGORY_MNG                   C_ACTG_CATEGORY_MNG,
        ACT.ACCOUNTING_DATE                     C_ACCOUNTING_DATE,
        ACT.GL_TRANSFER_FLAG                    C_GL_TRANSFER_FLAG,
        ACT.GL_TRANSFER_RUN_ID                  C_GL_TRANSFER_RUN_ID,
        ACT.ACTG_HEADER_DESCRIPTION             C_ACTG_HEADER_DESCRIPTION,
        ACT.ACTG_LINE_TYPE_CODE                 C_ACTG_LINE_TYPE_CODE,
        ACT.ACTG_LINE_TYPE_MNG                  C_ACTG_LINE_TYPE_MNG,
        ACT.ACTG_STAT_AMT                       C_ACTG_STAT_AMT,
        ACT.ACTG_ERROR_CODE                     C_ACTG_ERROR_CODE,
        ACT.GL_TRANSFER_CODE                    C_GL_TRANSFER_CODE,
        ACT.ACTG_DOC_SEQUENCE_ID                C_ACTG_DOC_SEQUENCE_ID,
        ACT.ACTG_DOC_SEQUENCE_NAME              C_ACTG_DOC_SEQUENCE_NAME,
        ACT.ACTG_DOC_SEQUENCE_VALUE             C_ACTG_DOC_SEQUENCE_VALUE,
        ACT.ACTG_PARTY_ID                       C_ACTG_PARTY_ID,
        ACT.ACTG_PARTY_SITE_ID                  C_ACTG_PARTY_SITE_ID,
        ACT.ACTG_PARTY_TYPE                     C_ACTG_PARTY_TYPE,
        ACT.ACTG_EVENT_ID                       C_ACTG_EVENT_ID,
        ACT.ACTG_HEADER_ID                      C_ACTG_HEADER_ID,
        ACT.ACTG_SOURCE_ID                      C_ACTG_SOURCE_ID,
        ACT.ACTG_SOURCE_TABLE                   C_ACTG_SOURCE_TABLE,
        ACT.ACTG_LINE_CCID                      C_ACTG_LINE_CCID,
        ACT.ACCOUNT_FLEXFIELD                   C_ACCOUNT_FLEXFIELD,
        ACT.ACCOUNT_DESCRIPTION                 C_ACCOUNT_DESCRIPTION,
        ACT.PERIOD_NAME                         C_PERIOD_NAME,
        ACT.TRX_ARAP_BALANCING_SEGMENT          C_TRX_ARAP_BALANCING_SEGMENT,
        ACT.TRX_ARAP_NATURAL_ACCOUNT            C_TRX_ARAP_NATURAL_ACCOUNT,
        ACT.TRX_TAXABLE_ACCOUNT                 C_TRX_TAXABLE_ACCOUNT,
        ACT.TRX_TAXABLE_ACCOUNT_DESC            C_TRX_TAXABLE_ACCOUNT_DESC,
        ACT.TRX_TAXABLE_BALANCING_SEGMENT       C_TRX_TAXABLE_BAL_SEGMENT,
        ACT.TRX_TAXABLE_BALSEG_DESC             C_TAXABLE_BALSEG_DESC,
        ACT.TRX_TAXABLE_NATURAL_ACCOUNT         C_TRX_TAXABLE_NATURAL_ACCOUNT,
        ACT.TRX_TAXABLE_NATACCT_SEG_DESC        C_TRX_TAXABLE_NATACCT_SEG_DESC,
        ACT.TRX_TAX_BALANCING_SEGMENT           C_TRX_TAX_BALANCING_SEGMENT,
        ACT.TRX_TAX_NATURAL_ACCOUNT             C_TRX_TAX_NATURAL_ACCOUNT,
        ACT.TRX_CONTROL_ACCOUNT_FLEXFIELD       C_TRX_CONTROL_ACCT_FLEXFIELD
FROM	ZX_REP_CONTEXT_T	                CON,
	ZX_REP_TRX_DETAIL_T	                DET,
	ZX_REP_TRX_JX_EXT_T	                EXT,
	ZX_REP_ACTG_EXT_T	                ACT
WHERE	CON.REQUEST_ID         = :P_CONC_REQUEST_ID
  AND   DET.REQUEST_ID         = CON.REQUEST_ID
  AND   nvl(DET.REP_CONTEXT_ID,CON.REP_CONTEXT_ID)     = CON.REP_CONTEXT_ID
  AND   EXT.DETAIL_TAX_LINE_ID(+) = DET.DETAIL_TAX_LINE_ID
  AND   ACT.DETAIL_TAX_LINE_ID(+) = DET.DETAIL_TAX_LINE_ID
ORDER BY DET.TRX_ID,DET.TRX_LINE_ID