Oracle apps R12 Query to get the Credit Memo Balance Due

The below given query provides the SQL Data extract for Credit Memo Balance Due.

SELECT HZ_ACCT.ACCOUNT_NUMBER, NVL (SUM (AR_PAY_SCH.AMOUNT_DUE_REMAINING), 0) CM_BALANCE_DUE
FROM
HZ_CUST_ACCOUNTS_ALL HZ_ACCT,
HZ_CUST_ACCT_SITES_ALL HCASA,
HZ_CUST_SITE_USES_ALL HCSU,
HZ_PARTY_SITES HPS,
HZ_LOCATIONS LOC,
RA_CUSTOMER_TRX_ALL RCTA,
RA_CUST_TRX_LINE_GL_DIST_ALL RA_CUS_TRX_GL_DIST,
AR_PAYMENT_SCHEDULES_ALL AR_PAY_SCH,
GL_CODE_COMBINATIONS CC
WHERE 1=1
AND AR_PAY_SCH.CUSTOMER_ID = HZ_ACCT.CUST_ACCOUNT_ID
AND AR_PAY_SCH.CUST_TRX_TYPE_ID = RCTA.CUST_TRX_TYPE_ID
AND HCASA.PARTY_SITE_ID = HPS.PARTY_SITE_ID
AND LOC.LOCATION_ID = HPS.LOCATION_ID
AND HZ_ACCT.CUST_ACCOUNT_ID = HCASA.CUST_ACCOUNT_ID
AND HCASA.CUST_ACCT_SITE_ID = HCSU.CUST_ACCT_SITE_ID
AND AR_PAY_SCH.CUSTOMER_ID = HCASA.CUST_ACCOUNT_ID
AND AR_PAY_SCH.CUSTOMER_SITE_USE_ID = HCSU.SITE_USE_ID
AND RCTA.CUSTOMER_TRX_ID = AR_PAY_SCH.CUSTOMER_TRX_ID
AND RCTA.CUSTOMER_TRX_ID = RA_CUS_TRX_GL_DIST.CUSTOMER_TRX_ID
AND RA_CUS_TRX_GL_DIST.CODE_COMBINATION_ID = CC.CODE_COMBINATION_ID
AND RA_CUS_TRX_GL_DIST.ACCOUNT_CLASS = 'REV'
AND NVL (HCSU.STATUS, 'A') = 'A'
AND AR_PAY_SCH.CLASS = 'CM'
AND AR_PAY_SCH.status = 'OP'
AND HCSU.SITE_USE_CODE = 'BILL_TO'
AND TRUNC (AR_PAY_SCH.GL_DATE) <= :P_ENTER_DATE
AND AR_PAY_SCH.TRX_DATE <= :P_ENTER_DATE
AND HZ_ACCT.ACCOUNT_NUMBER = :P_ENTER_ACCT_NUMBER
GROUP BY HZ_ACCT.ACCOUNT_NUMBER,AR_PAY_SCH.AMOUNT_DUE_REMAINING

 


Oracle EBS R12 SQL to get Open Invoices Customer Transaction Balances

The blog provides the Oracle EBS R12 SQL to check Customer Transaction Balances. The Oracle EBS R12 Account Receivable AR Invoices with Outstanding Customer Transaction Balances, AR Invoices which Over Due date are retrieved for AR Reconciliation

The below given SQL Query provides the data extract to check Customer Transaction Balances

SELECT HZ_ACCT.ACCOUNT_NUMBER, NVL (SUM (AR_PAY_SCH.AMOUNT_DUE_REMAINING), 0) INVOICE_BALANCE
FROM
HZ_CUST_ACCOUNTS_ALL HZ_ACCT,
HZ_CUST_ACCT_SITES_ALL HCASA,
HZ_CUST_SITE_USES_ALL HCSU,
HZ_PARTY_SITES HPS,
HZ_LOCATIONS LOC,
RA_CUSTOMER_TRX_ALL RCTA,
RA_CUST_TRX_LINE_GL_DIST_ALL RA_CUS_TRX_GL_DIST,
AR_PAYMENT_SCHEDULES_ALL AR_PAY_SCH,
GL_CODE_COMBINATIONS CC
WHERE 1=1
AND AR_PAY_SCH.CUSTOMER_ID = HZ_ACCT.CUST_ACCOUNT_ID
AND AR_PAY_SCH.CUST_TRX_TYPE_ID = RCTA.CUST_TRX_TYPE_ID
AND HCASA.PARTY_SITE_ID = HPS.PARTY_SITE_ID
AND LOC.LOCATION_ID = HPS.LOCATION_ID
AND HZ_ACCT.CUST_ACCOUNT_ID = HCASA.CUST_ACCOUNT_ID
AND HCASA.CUST_ACCT_SITE_ID = HCSU.CUST_ACCT_SITE_ID
AND AR_PAY_SCH.CUSTOMER_ID = HCASA.CUST_ACCOUNT_ID
AND AR_PAY_SCH.CUSTOMER_SITE_USE_ID = HCSU.SITE_USE_ID
AND RCTA.CUSTOMER_TRX_ID = AR_PAY_SCH.CUSTOMER_TRX_ID
AND RCTA.CUSTOMER_TRX_ID = RA_CUS_TRX_GL_DIST.CUSTOMER_TRX_ID
AND RA_CUS_TRX_GL_DIST.CODE_COMBINATION_ID = CC.CODE_COMBINATION_ID
AND RA_CUS_TRX_GL_DIST.ACCOUNT_CLASS = 'REV'
AND NVL (HCSU.STATUS, 'A') = 'A'
AND AR_PAY_SCH.CLASS NOT IN ('CM', 'PMT')
AND HCSU.SITE_USE_CODE = 'BILL_TO'
AND TRUNC (AR_PAY_SCH.GL_DATE) <= :P_ENTER_DATE
AND AR_PAY_SCH.TRX_DATE <= :P_ENTER_DATE
AND HZ_ACCT.ACCOUNT_NUMBER = :P_ENTER_ACCT_NUMBER
GROUP BY HZ_ACCT.ACCOUNT_NUMBER,AR_PAY_SCH.AMOUNT_DUE_REMAINING

Oracle EBS R12 AR SQL to get Open Invoices with Customer payment status is Open

Hi All,

The below given SQL Query for Oracle Apps Receivables (AR)  provides the main columns from the table – RA_CUSTOMER_TRX_ALL and AR_PAYMENT_SCHEDULES_ALL to get the details for the Open Invoices for a particular Customer ( enter TRX_NUMBER) or for all Customers.

SELECT
RA_CUST_TRX.STATUS_TRX,
RA_CUST_TRX.TRX_NUMBER,
RA_CUST_TRX.TRX_DATE,
RA_CUST_TRX.BILLING_DATE,
RA_CUST_TRX.BATCH_ID,
RA_CUST_TRX.BATCH_SOURCE_ID,
RA_TERMS.NAME || '-' || RA_TERMS.DESCRIPTION   TERM_NAME,
RA_CUST_TRX.INVOICE_CURRENCY_CODE TRX_CURR,
APS.ORG_ID,
APS.CUSTOMER_ID,
APS.CUSTOMER_TRX_ID,
--APS.TRX_NUMBER,
--APS.TRX_DATE,
APS.GL_DATE,
APS.CLASS,
APS.GL_DATE_CLOSED,
APS.STATUS PAYMENT_STATUS,
APS.INVOICE_CURRENCY_CODE,
APS.EXCHANGE_DATE,
APS.EXCHANGE_RATE_TYPE,
APS.EXCHANGE_RATE,
APS.DUE_DATE,
APS.AMOUNT_DUE_ORIGINAL,
APS.AMOUNT_DUE_REMAINING,
APS.AMOUNT_LINE_ITEMS_REMAINING,
APS.AMOUNT_APPLIED,
APS.NUMBER_OF_DUE_DATES
FROM
HZ_CUST_ACCOUNTS HZ_ACCT,
HZ_PARTIES HP,
HZ_CUST_ACCT_SITES_ALL HCASA,
HZ_CUST_SITE_USES_ALL HCSUA,
HZ_PARTY_SITES HPS_BILL,
RA_CUST_TRX_LINE_GL_DIST_ALL RCT,
RA_TERMS RA_TERMS,
RA_CUSTOMER_TRX_ALL RA_CUST_TRX,
RA_CUSTOMER_TRX_LINES_ALL RA_TRX_LINES,
RA_CUST_TRX_TYPES_ALL RT,
AR_PAYMENT_SCHEDULES_ALL APS
WHERE 1 = 1
AND RA_CUST_TRX.CUSTOMER_TRX_ID = RA_TRX_LINES.CUSTOMER_TRX_ID
AND RA_CUST_TRX.CUSTOMER_TRX_ID = APS.CUSTOMER_TRX_ID
AND RA_CUST_TRX.CUST_TRX_TYPE_ID = RT.CUST_TRX_TYPE_ID
AND RA_CUST_TRX.BILL_TO_CUSTOMER_ID = HZ_ACCT.CUST_ACCOUNT_ID
AND RA_CUST_TRX.ORG_ID = APS.ORG_ID
AND RA_CUST_TRX.TERM_ID = RA_TERMS.TERM_ID
AND RCT.CUSTOMER_TRX_ID = APS.CUSTOMER_TRX_ID
AND RCT.CUSTOMER_TRX_ID = RA_CUST_TRX.CUSTOMER_TRX_ID
AND RCT.CUSTOMER_TRX_ID = RA_TRX_LINES.CUSTOMER_TRX_ID
AND RCT.CUSTOMER_TRX_LINE_ID = RA_TRX_LINES.CUSTOMER_TRX_LINE_ID
AND HP.PARTY_ID = HZ_ACCT.PARTY_ID
AND HCASA.CUST_ACCOUNT_ID = RA_CUST_TRX.BILL_TO_CUSTOMER_ID
AND HCASA.CUST_ACCT_SITE_ID = HCSUA.CUST_ACCT_SITE_ID
AND HCSUA.SITE_USE_ID = RA_CUST_TRX.BILL_TO_SITE_USE_ID
AND HPS_BILL.PARTY_SITE_ID = HCASA.PARTY_SITE_ID
AND APS.AMOUNT_DUE_REMAINING <> 0
AND APS.STATUS = 'OP'
AND HCSUA.SITE_USE_CODE = 'BILL_TO'
AND HZ_ACCT.STATUS = 'A'
AND HCASA.STATUS = 'A'
AND HCSUA.STATUS = 'A'
AND RA_CUST_TRX.COMPLETE_FLAG = 'Y'
AND RA_TRX_LINES.LINE_TYPE IN ('FREIGHT', 'LINE')
--AND HZ_ACCT.ACCOUNT_NUMBER = :P_ENTER_CUSTOMER_NUMBER
ORDER BY RA_CUST_TRX.TRX_NUMBER DESC,
RA_CUST_TRX.TRX_DATE DESC

Oracle EBS R12 AR transaction processing

The below given are the common AR setup to be done in Oracle Apps –  Oracle Receivables for the transaction processing.

Oracle Receivable Setup Description
Required ?
Define Sets Of Books Yes
Use The Account Generator Yes
Define System Item Flexfields Structure Yes
Define Organizations Yes
Define Territory Flexfield No
Define Sales Tax Location Flexfields structure Yes
Setup Flexible Address Formats No
Maintain Countries & Territories No
Define the Transaction Flexfield Structure No
Define AutoCash Rule Sets No
Define QuickCodes No
Define AutoInvoice Line Ordering Rules No
Define AutoInvoice Grouping Rules No
Define System Options Yes
Define Payment Terms Yes
Define Accounting Rules No
Maintain Accounting Periods Yes
Define AutoAccounting Yes
SetUpCash Basis Accounting No
Define Transaction Types Yes
Define Transaction Sources Yes
Define Collectors Yes
Define Adjustments Approval Limits Yes
Define remittance Banks Yes
Define distribution sets No
Define receivable activities Yes
Define receipts classes Yes
Define Payment Methods Yes
Define Receipts Sources Yes
Define aging buckets No
Define Statement cycles No
Define Statement messages No
Define dunning letters No
Define dunning letters Sets No
Define Territories No
Define Sales persons Yes
Define Profile options Yes
Define tax codes and rate Yes
Define customer profile classes Yes
Define Customer Yes
Define remit to address Yes
Define customer relationship No
Define Customer banks No
Define Lock Boxes No
Define the transmission formats No
Define receipt programmes No
Define UOM Classes No
Define UOM Yes
Define Standard memo lines No
Define Item tax rate exceptions No
Define tax exemptions No
Define document sequences No

Oracle EBS R12 Account Receivables (AR) Receipt Creation

The blog provides the steps to Create Oracle EBS R12 Account Receivables (AR) Receipt.

Oracle EBS R12 Account Receivables (AR) Receipt Types

In Oracle Receivables, Receipts can be created of 2 types:

  1. Standard Receipts: Standard Receipts includes Cash or Check received from the Customer in the exchange of goods or services provided. These are termed as ‘Cash Receipts’ also.
  2. Miscellaneous Receipts: Miscellaneous Receipts includes the revenue earned from the interest, refunds, investments or any other nonstandard item.

Points to Consider for Oracle EBS R12 AR Receipt Creation

  1. Receipts can be applied to the transactions in the Open or Future Accounting Periods.
  2. Charge back and adjustments can be created against the receipts
  3. Receipts can be applied to Invoices, Debit Memos, Credit Memos, on-account credits and chargebacks.
  4. Receipts can be applied partially or fully to a single Debit item or to several Debit items.
  5. Receipts can be applied to other open receipts

Oracle EBS R12 AR Receipt Status

The Oracle EBS R12 provides the different Account Receivables (AR) Receipt status to retrieve the current state of the created AR Receipts and its reconciliation.

The Oracle Apps AR Receipt Status can be referred here Oracle Apps R12 AR Receipt Status


Oracle EBS R12 Journal Import Validation Process

The Oracle Apps Journal Import validates the accounting data received from other systems in the GL_INTERFACE Table. The list of  journal error lines will be published in the Journal Import Execution Report.

Batch Level Validation:

Journal Import validates the below attributes so that the  batch name available for processing should not already exist for the same Ledger Id  Period in the Oracle Apps  General Ledger application for the particular Period

  • Ledger Id
  • Period Name
  • Batch Name

Journal Level Validation:

Journal Import validates the below attributes so that the journals available for processing should have the required accounting data

  • Ledger Id
  • Period Name
  • Journal Source Name
  • Journal Category Name
  • Currency Code
  • Encumbrance type ID
  • Actual Flag
  • User Conversion Type
  • Budget Version Id
  • Accounting Date

Journal Entry Line Level Validation:

Journal Import validates the below attributes so that the journals available for processing should have the required accounting data

Account Validation ( Code Combination) : 

Code Combinations will be considered valid and journal import will be processed successfully if the below validations exists:

  • If detail posting to segment combinations are allowed
  • If code combinations are enabled for the specified accounting date
  • If  code combinations does not include summary accounts

Effective Date Validation: 

Journal Import validates if the Accounting Date is a valid business day and thus General Ledger considers it as the transaction’s effective date.  Below are the Effective Date Rule defined in oracle apps for General Ledger Accounting Date:

  • Fail:   Journal Import will Reject the transactions
  • Leave Alone: Journal Import will consider transactions regardless of the Accounting Date
  • Roll Date:  Journal Import will roll the Accounting Date  to the nearest valid business day

Descriptive Flexfield Validation:

Journal Import validates the descriptive flexfield segments depending on the particular descriptive flexfield.

  • Journals – Journal Entry Line Descriptive Flexfield
    • The descriptive flexfield global segments have valid values
  • Journals – Captured Information Descriptive Flexfield
    • The descriptive flexfield context dependent segments , descriptive flexfield context  and descriptive flexfield context dependent segments  have valid values
  • Value Added Tax Descriptive Flexfield
    • The descriptive flexfield context is set to Yes or No and descriptive flexfield context dependent segments have valid values

USSGL Transaction Code:

In case of  Public  Sector General Ledger, Journal Import validates the USSGL Transaction Code


Oracle EBS R12 General ledger interface tables

The Oracle apps General Ledger Interface Table – GL_INTERFACE is the entry point for all journals accounting data which have been imported from other systems. The Journal Import Program validates the accounting data received in the GL_INTERFACE Table and imports the available data into Journal entries in the Oracle Apps GL Application.

The Journal Import Program uses the GL_INTERFACE Table Column data to store the accounting data into the Journal defined categories.

Below given are few of the main columns for which Journal Import uses during processing

Column Name  Column Description
STATUSValue could be ‘P’ – Posted , ‘U’ – Unposted or ERROR Number when returns Error while processing
LEDGER_IDLedger ID FROM gl_ledgers
USER_JE_SOURCE_NAMEProvide the Source for which Journal have been received ( Few Sources could be – REMEASUREMENT, Receivables, Global Intercompany, Cost Management, TRANSLATION, Spreadsheet, Payables, Global Intercompany RVRSE )
USER_JE_CATEGORY_NAMEProvide the Category  for which Journal have been received  ( Few categories could be – Travel , Inventory, Purchase Invoices, Reverse, AX Receivables, Payroll, Receiving, REMEASUREMENT, Statisticals, Sales Invoices )
ACCOUNTING_DATEDate when journal entries have been accounted in Oracle Apps GL Application
CURRENCY_CODEJournal Currency
ACCOUNTED_DRAccounted Debit Amount for journal
ACCOUNTED_CRAccounted Credit Amount for journal
JE_BATCH_IDJournal Batch ID
GROUP_IDJournal Group ID
     Interface Table Column Name      Null?           Date Type
STATUSNOT NULLVARCHAR2 (50)
LEDGER_IDNOT NULLNUMBER (15)
USER_JE_SOURCE_NAMENOT NULLVARCHAR2 (25)
USER_JE_CATEGORY_NAMENOT NULLVARCHAR2 (25)
ACCOUNTING_DATENOT NULLDATE
CURRENCY_CODENOT NULLVARCHAR2 (15)
DATE_CREATEDNOT NULLDATE
CREATED_BYNOT NULLNUMBER (15)
ACTUAL_FLAGNOT NULLVARCHAR2 (1)
ENCUMBRANCE_TYPE_ID NUMBER
BUDGET_VERSION_ID NUMBER
CURRENCY_ CONVERSION_DATE DATE
USER_CURRENCY_ CONVERSION_TYPE VARCHAR2 (30)
CURRENCY_ CONVERSION_RATE NUMBER
SEGMENT1 through SEGMENT30 VARCHAR (25)
ENTERED_DR NUMBER
ENTERED_CR NUMBER
ACCOUNTED_DR NUMBER
ACCOUNTED_CR NUMBER
TRANSACTION_DATE DATE
REFERENCE1 VARCHAR2 (100)
REFERENCE2 VARCHAR2 (240)
REFERENCE3 VARCHAR2 (100)
REFERENCE4 

VARCHAR2 (100)

 

REFERENCE5 VARCHAR2 (240)
REFERENCE6 through REFERENCE9 VARCHAR2 (100)
REFERENCE10 VARCHAR2 (240)
REFERENCE11 through REFERENCE20 VARCHAR2 (100)
REFERENCE21 through REFERENCE30 VARCHAR2 (240)
GROUP_ID NUMBER (15)
JE_BATCH_ID NUMBER (15)
PERIOD_NAME VARCHAR2 (15)
JE_HEADER_ID NUMBER (15)
JE_LINE_NUM NUMBER (15)
CHART_OF_ACCOUNTS_ID NUMBER (15)
FUNCTIONAL_ CURRENCY_CODE VARCHAR2 (15)
CODE_COMBINATION_ID NUMBER (15)
DATE_CREATED_IN_GL DATE
WARNING_CODE VARCHAR2 (4)
STATUS_DESCRIPTION VARCHAR2 (240)
DESCR_FLEX_ERROR_ MESSAGE VARCHAR2 (240)
STAT_AMOUNT NUMBER
REQUEST_ID NUMBER (15)
SUBLEDGER_DOC_ SEQUENCE_ID NUMBER
SUBLEDGER_DOC_ SEQUENCE_VALUE NUMBER
USSGL_TRANSACTION_CODE VARCHAR2 (30)
ATTRIBUTE1 through ATTRIBUTE20 VARCHAR2 (150)
CONTEXT , CONTEXT2, CONTEXT3 VARCHAR2 (150)
INVOICE_DATE DATE
INVOICE_AMOUNT NUMBER
INVOICE_IDENTIFIER VARCHAR2 (20)
TAX_CODE VARCHAR2 (15)