Professional Documents
Culture Documents
Document 2873631.1
Document 2873631.1
Document 2873631.1
1
Copy right (c) 2024, Oracle. A ll rights reserv ed. Oracle Confidential.
AR GDF: AR_DFS_CREATE_MISSING_EVENTS.sql
AR_S_00015,AR_00032,AR_S_00014,AR_00137,AR_00002,AR_S_00013,AR_00045,AR_00046
Unable To Close Period Due To Items Missing Events (Doc ID 2873631.1)
In this Document
Symptoms
Cause
Solution
Scripts to Identify the Corruption
ODM Tags
References
APPLIES TO:
SYMPTOMS
BEST PRACTICES:
1. Run the Receivables Period Close Analyzer before closing the period to proactively identify this issue, as well as
many other issues that will prevent you from closing the period.
2. If you post to multiple EBS subledgers, use the EBS Period Close Process Analyzer for a smoother period close.
There are various reasons why an item is created missing the necessary event to post.
The Receivables Period Close Analyzer will identify the items that cannot post due to missing events.
CAUSE
There are various reasons why an item is created missing the necessary event to post.
SOLUTION
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=13a55zks76_168&id=2873631.1 1/6
4/14/24, 11:36 AM Document 2873631.1
SELECT DISTINCT
ra.receivable_application_id receivable_application_id
,ra.cash_receipt_id cash_receipt_id
,ra.event_id
FROM ar_receivable_applications ra
WHERE ra.cash_receipt_id IS NOT NULL
AND ra.posting_control_id = - 3
AND ra.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND ra.event_id IS NULL
AND ra.application_type = 'CASH'
UNION All
SELECT DISTINCT
ra.receivable_application_id receivable_application_id
,ra.cash_receipt_id cash_receipt_id
,ra.event_id
FROM ar_receivable_applications ra
WHERE ra.cash_receipt_id IS NOT NULL
AND ra.posting_control_id = - 3
AND ra.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND ra.event_id IS not NULL
AND ra.application_type = 'CASH'
AND NOT EXISTS
(
SELECT 1
FROM xla_events xe
WHERE xe.application_id = 222
AND xe.event_id = ra.event_id
);
SELECT DISTINCT
crh.cash_receipt_history_id cash_receipt_history_id
,crh.cash_receipt_id cash_receipt_id
,crh.event_id
FROM ar_cash_receipt_history crh
WHERE crh.posting_control_id = - 3
AND crh.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND crh.event_id IS NULL
UNION
SELECT DISTINCT
crh.cash_receipt_history_id cash_receipt_history_id
,crh.cash_receipt_id cash_receipt_id
,crh.event_id
FROM ar_cash_receipt_history crh
WHERE crh.posting_control_id = - 3
AND crh.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND crh.event_id IS NOT NULL
AND NOT EXISTS
(
SELECT 1
FROM xla_events xe
WHERE xe.application_id = 222
AND xe.event_id = crh.event_id
);
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=13a55zks76_168&id=2873631.1 2/6
4/14/24, 11:36 AM Document 2873631.1
SELECT DISTINCT
mcd.misc_cash_distribution_id
,mcd.cash_receipt_id cash_receipt_id
,mcd.event_id
FROM ar_misc_cash_distributions mcd
WHERE mcd.posting_control_id = - 3
AND mcd.gl_date BETWEEN l_start_gl_date
AND l_end_gl_date
AND mcd.event_id IS NULL
UNION ALL
SELECT DISTINCT
mcd.misc_cash_distribution_id
,mcd.cash_receipt_id cash_receipt_id
,mcd.event_id
FROM ar_misc_cash_distributions mcd
WHERE mcd.posting_control_id = - 3
AND mcd.gl_date BETWEEN l_start_gl_date
AND l_end_gl_date
AND mcd.event_id IS NOT NULL
AND NOT EXISTS
(
SELECT 1
FROM xla_events xe
WHERE xe.application_id = 222
AND xe.event_id = mcd.event_id
);
(D) Transaction:
SELECT DISTINCT
ct.customer_trx_id customer_trx_id
,gld.cust_trx_line_gl_dist_id
,gld.event_id
FROM ra_cust_trx_line_gl_dist gld
,ra_customer_trx ct
WHERE ct.customer_trx_id = gld.customer_trx_id
AND gld.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND gld.posting_control_id = - 3
AND gld.account_set_flag = 'N'
AND gld.event_id IS NULL
UNION ALL
SELECT DISTINCT
ct.customer_trx_id customer_trx_id
,gld.cust_trx_line_gl_dist_id
,gld.event_id
FROM ra_cust_trx_line_gl_dist gld
,ra_customer_trx ct
WHERE ct.customer_trx_id = gld.customer_trx_id
AND gld.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND gld.posting_control_id = - 3
AND gld.account_set_flag = 'N'
AND gld.event_id IS NOT NULL
AND NOT EXISTS
(
SELECT 1
FROM xla_events xe
WHERE xe.application_id = 222
AND xe.event_id = gld.event_id
) ;
SELECT ra.receivable_application_id
,ct.customer_trx_id
,ct.trx_number
,ra.event_id
FROM ar_receivable_applications ra
,ra_customer_trx ct
WHERE ra.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND ra.application_type = 'CM'
AND ra.posting_control_id = - 3
AND ra.event_id IS NULL
AND ra.customer_trx_id = ct.customer_trx_id
UNION ALL
SELECT ra.receivable_application_id
,ct.customer_trx_id
,ct.trx_number
,ra.event_id
FROM ar_receivable_applications ra
,ra_customer_trx ct
WHERE ra.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND ra.application_type = 'CM'
AND ra.posting_control_id = - 3
AND ra.event_id IS NOT NULL
AND ra.customer_trx_id = ct.customer_trx_id
AND NOT EXISTS
(
SELECT 1
FROM xla_events xe
WHERE xe.application_id = 222
AND xe.event_id = ra.event_id
) ;
SELECT trh.transaction_history_id
,customer_trx_id
,trh.event_id
FROM ar_transaction_history trh
WHERE nvl (trh.postable_flag
,'N') = 'Y'
AND trh.posting_control_id = - 3
AND trh.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND trh.event_id IS NULL
UNION
SELECT transaction_history_id
,customer_trx_id
,trh.event_id
FROM ar_transaction_history trh
WHERE nvl (trh.postable_flag
,'N') = 'Y'
AND trh.posting_control_id = - 3
AND trh.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND trh.event_id IS NOT NULL
AND NOT EXISTS
(
SELECT 1
FROM xla_events xe
WHERE xe.application_id = 222
AND xe.event_id = trh.event_id
) ;
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=13a55zks76_168&id=2873631.1 4/6
4/14/24, 11:36 AM Document 2873631.1
(G) Adjustment:
SELECT adj.adjustment_id
,customer_trx_id
,adj.event_id
FROM ar_adjustments adj
WHERE adj.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND adj.posting_control_id = - 3
AND nvl (adj.postable ,'N') = 'Y'
AND adj.event_id IS NULL
UNION
SELECT adj.adjustment_id
,customer_trx_id
,adj.event_id
FROM ar_adjustments adj
WHERE adj.gl_date BETWEEN l_start_gl_date AND l_end_gl_date
AND adj.posting_control_id = - 3
AND nvl (adj.postable ,'N') = 'Y'
AND adj.event_id IS NOT NULL
AND NOT EXISTS
(
SELECT 1
FROM xla_events xe
WHERE xe.application_id = 222
AND xe.event_id = adj.adjustment_id
) ;
OR
GDF Script
1.
IMPORTANT: Before running the following script, please review Note 2792843.1 AR GDF: Oracle Receivables Overview and
Usage Instructions for AR Generic Data Fix (GDF) Scripts.
* If you run the Receipt Analyzer for the receipt with corruption, the parameter values can be found under the Data Integrity
section in 'Script Parameters'.
Parameters:
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=13a55zks76_168&id=2873631.1 5/6
4/14/24, 11:36 AM Document 2873631.1
1) p_org_id (REQUIRED) - Enter the Org ID
2) p_user_id (REQUIRED) - Enter User ID
3) p_resp_id (REQUIRED) - Enter Responsibility ID
4) p_debug_mode (OPTIONAL) - Enter Y or N (default is N)
5) p_email_id (OPTIONAL) - Enter Email address
6) p_run_mode (REQUIRED) - Enter Run Mode: SEL
7) p_gl_date_start - For SEL mode: Enter Start GL Date
8) p_gl_date_end - For SEL mode: Enter High GL Date
9) p_fix_type - Enter the Fix Type: "RCT" For Receipt , "TRX" For Invoice or Credit memo , "BR" for BillS Rec, "ADJ" for
Adjustment - "Mandatory"
10) p_seq_no - leave blank
3. Review output and confirm data, then run script with following parameters in FIX mode:
Parameters:
commit;
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=13a55zks76_168&id=2873631.1 6/6