Doubt in Monthly reconciliation report

This forum is to discuss different features/issues of Oracle Financials modules ( GL - General Ledger, AP - Accounts Payable, AR - Accounts Receivable, FA - Fixed Assets & CM - Cash Management ).
Post Reply
keshavkovela
Posts: 19
Joined: Sun May 07, 2006 7:16 am
Location: India

Doubt in Monthly reconciliation report

Post by keshavkovela »

I have on Monthly reconciliation report. I'm not getting any output from payroll section. Please correct the query, i would highly appreciate him.
Folowing is the code for the Monthly reconciliation report:

SELECT TO_NUMBER(a.trx_number) AS "Check Number",
a.trx_date AS "Check Date",
b.bank_account_num AS "Account",
'Interface' AS "Source",
a.amount AS "Amount"
FROM ce_999_interface_v a,
ap.ap_bank_accounts_all b
WHERE b.bank_account_id = a.bank_account_id
AND b.bank_account_num = :p_account_number
AND (a.trx_date <= :p_cutoff)
UNION all
SELECT a.check_number AS "Check Number",
a.check_date AS "Check Date",
b.bank_account_num "Account",
'AP' AS "Source",
a.amount AS "Amount"
FROM ap.ap_checks_all a,
ap.ap_bank_accounts_all b
WHERE b.bank_account_id = a.bank_account_id
AND (a.void_date IS NULL OR a.void_date > :p_cutoff)
AND (a.cleared_date IS NULL OR a.cleared_date > :p_cutoff)
AND (a.check_date <= :p_cutoff)
AND a.payment_method_lookup_code = 'CHECK'
AND b.bank_account_num = :p_account_number
MINUS
SELECT TO_NUMBER(a.trx_number) AS "Check Number",
a.trx_date AS "Check Date",
b.bank_account_num AS "Account",
'Interface' AS "Source",
a.amount AS "Amount"
FROM ce_999_interface_v a,
ce.ce_statement_lines s,
ce_statement_headers_all h,
ap_bank_accounts_all b
WHERE a.bank_account_id = h.bank_account_id
AND a.trx_number = s.bank_trx_number
AND s.status = 'RECONCILED' /* match 999 interface to a statement Account and check */
AND h.bank_account_id = b.bank_account_id /* Only unreconciled ones wanted */
AND b.bank_account_num = :p_account_number /*get bank account number from the header*/
AND s.trx_date <= :p_cutoff
UNION
SELECT TO_NUMBER(a.trx_number) AS "Check Number",
a.trx_date AS "Check Date",
b.segment3 AS "Account",
'Payroll' AS "Source",
a.amount AS "Amount"
FROM ce_999_interface_v a,
ce.ce_statement_lines s,
ce_statement_headers_all h,
pay_external_accounts b
WHERE a.bank_account_id = h.bank_account_id
AND a.trx_number = s.bank_trx_number
AND s.status = 'RECONCILED' /* match 999 interface to a statement Account and check*/
AND h.bank_account_id = b.external_account_id /* Only unreconciled ones wanted */
AND b.segment3 = :p_account_number /* get bank account number from the header*/
AND s.trx_date <= :p_cutoff
UNION ALL
SELECT TO_NUMBER(a.trx_number) AS "Check Number",
a.trx_date AS "Check Date",
b.bank_account_num AS "Account",
'NGS' AS "Source",
a.amount AS "Amount"
FROM ce_999_interface_v a,
ce.ce_statement_lines s,
ce_statement_headers_all h,
ap_bank_accounts_all b,
gl_je_lines g
WHERE a.bank_account_id = h.bank_account_id
AND g.description = a.trx_number
AND a.trx_number = s.bank_trx_number
AND s.status = 'RECONCILED'
AND h.bank_account_id = b.bank_account_id
AND b.bank_account_num = :p_account_number
AND s.trx_date <= :p_cutoff
ORDER BY 3,
1,
2


thanks
keshav
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests