DBA Data[Home] [Help]

APPS.FII_AR_FACTS_AGING_PKG dependencies on FII_AR_AGING_RECEIVABLES

Line 2039: -- This procedure inserts records in FII_AR_AGING_RECEIVABLES

2035:
2036: ------------------------------------------------------------------
2037: -- Procedure POPULATE_RECEIVABLES_AGING
2038: -- Purpose
2039: -- This procedure inserts records in FII_AR_AGING_RECEIVABLES
2040: ------------------------------------------------------------------
2041: PROCEDURE POPULATE_RECEIVABLES_AGING IS
2042:
2043: BEGIN

Line 2045: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIVABLES';

2041: PROCEDURE POPULATE_RECEIVABLES_AGING IS
2042:
2043: BEGIN
2044:
2045: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIVABLES';
2046: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIVABLES');
2047: g_state := 'Truncating table FII_AR_AGING_RECEIVABLES';
2048: TRUNCATE_TABLE('FII_AR_AGING_RECEIVABLES');
2049:

Line 2046: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIVABLES');

2042:
2043: BEGIN
2044:
2045: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIVABLES';
2046: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIVABLES');
2047: g_state := 'Truncating table FII_AR_AGING_RECEIVABLES';
2048: TRUNCATE_TABLE('FII_AR_AGING_RECEIVABLES');
2049:
2050: g_state := 'Truncating table FII_AR_MARKER_GT';

Line 2047: g_state := 'Truncating table FII_AR_AGING_RECEIVABLES';

2043: BEGIN
2044:
2045: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIVABLES';
2046: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIVABLES');
2047: g_state := 'Truncating table FII_AR_AGING_RECEIVABLES';
2048: TRUNCATE_TABLE('FII_AR_AGING_RECEIVABLES');
2049:
2050: g_state := 'Truncating table FII_AR_MARKER_GT';
2051: TRUNCATE_TABLE('FII_AR_MARKER_GT');

Line 2048: TRUNCATE_TABLE('FII_AR_AGING_RECEIVABLES');

2044:
2045: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIVABLES';
2046: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIVABLES');
2047: g_state := 'Truncating table FII_AR_AGING_RECEIVABLES';
2048: TRUNCATE_TABLE('FII_AR_AGING_RECEIVABLES');
2049:
2050: g_state := 'Truncating table FII_AR_MARKER_GT';
2051: TRUNCATE_TABLE('FII_AR_MARKER_GT');
2052:

Line 2066: g_state := 'Populating FII_AR_AGING_RECEIVABLES';

2062: SELECT 8 marker FROM DUAL WHERE g_past_due_bucket_5_low is not null UNION ALL
2063: SELECT 9 marker FROM DUAL WHERE g_past_due_bucket_6_low is not null UNION ALL
2064: SELECT 10 marker FROM DUAL WHERE g_past_due_bucket_7_low is not null);
2065:
2066: g_state := 'Populating FII_AR_AGING_RECEIVABLES';
2067: if g_debug_flag = 'Y' then
2068: FII_UTIL.put_line(g_state);
2069: FII_UTIL.start_timer;
2070: FII_UTIL.put_line('');

Line 2073: INSERT /*+ append parallel(F) */ INTO FII_AR_AGING_RECEIVABLES F

2069: FII_UTIL.start_timer;
2070: FII_UTIL.put_line('');
2071: end if;
2072:
2073: INSERT /*+ append parallel(F) */ INTO FII_AR_AGING_RECEIVABLES F
2074: (time_id,
2075: time_id_date,
2076: event_date,
2077: next_aging_date,

Line 3268: FII_UTIL.put_line('Inserted ' ||SQL%ROWCOUNT|| ' records into FII_AR_AGING_RECEIVABLES');

3264: aging_flag;
3265:
3266:
3267: if g_debug_flag = 'Y' then
3268: FII_UTIL.put_line('Inserted ' ||SQL%ROWCOUNT|| ' records into FII_AR_AGING_RECEIVABLES');
3269: FII_UTIL.stop_timer;
3270: FII_UTIL.print_timer('Duration');
3271: FII_UTIL.put_line('');
3272: end if;

Line 3274: g_state := 'Analyzing FII_AR_AGING_RECEIVABLES table';

3270: FII_UTIL.print_timer('Duration');
3271: FII_UTIL.put_line('');
3272: end if;
3273:
3274: g_state := 'Analyzing FII_AR_AGING_RECEIVABLES table';
3275: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'FII_AR_AGING_RECEIVABLES');
3276:
3277: EXCEPTION
3278: WHEN OTHERS THEN

Line 3275: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'FII_AR_AGING_RECEIVABLES');

3271: FII_UTIL.put_line('');
3272: end if;
3273:
3274: g_state := 'Analyzing FII_AR_AGING_RECEIVABLES table';
3275: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'FII_AR_AGING_RECEIVABLES');
3276:
3277: EXCEPTION
3278: WHEN OTHERS THEN
3279: g_errbuf:=sqlerrm;

Line 6713: -- This procedure inserts records in fii_ar_aging_receivables

6709:
6710: ------------------------------------------------------------------
6711: -- Procedure Inc_RECEIVABLES_AGING
6712: -- Purpose
6713: -- This procedure inserts records in fii_ar_aging_receivables
6714: -- for incremental load
6715: ------------------------------------------------------------------
6716: PROCEDURE Inc_RECEIVABLES_AGING IS
6717: BEGIN

Line 6719: g_state := 'Populating fii_ar_aging_receivables in incremental mode';

6715: ------------------------------------------------------------------
6716: PROCEDURE Inc_RECEIVABLES_AGING IS
6717: BEGIN
6718:
6719: g_state := 'Populating fii_ar_aging_receivables in incremental mode';
6720: if g_debug_flag = 'Y' then
6721: FII_UTIL.put_line(g_state);
6722: FII_UTIL.start_timer;
6723: FII_UTIL.put_line('');

Line 6727: INSERT INTO fii_ar_aging_receivables

6723: FII_UTIL.put_line('');
6724: end if;
6725:
6726: --Remove 3
6727: INSERT INTO fii_ar_aging_receivables
6728: (time_id,
6729: time_id_date,
6730: event_date,
6731: next_aging_date,

Line 7899: FROM fii_ar_aging_receivables ag

7895: )
7896: ) inc_ag
7897: WHERE NOT EXISTS
7898: (SELECT 1
7899: FROM fii_ar_aging_receivables ag
7900: WHERE ag.time_id = inc_ag.time_id
7901: AND ag.customer_trx_id = inc_ag.customer_trx_id
7902: AND ag.payment_schedule_id = inc_ag.payment_schedule_id
7903: AND nvl(ag.adjustment_id,-1) = nvl(inc_ag.adjustment_id,-1)

Line 7936: FII_UTIL.put_line('Inserted ' ||SQL%ROWCOUNT|| ' records into fii_ar_aging_receivables in incremental mode');

7932: action,
7933: aging_flag;
7934:
7935: if g_debug_flag = 'Y' then
7936: FII_UTIL.put_line('Inserted ' ||SQL%ROWCOUNT|| ' records into fii_ar_aging_receivables in incremental mode');
7937: FII_UTIL.stop_timer;
7938: FII_UTIL.print_timer('Duration');
7939: FII_UTIL.put_line('');
7940: end if;

Line 7942: g_state := 'Analyzing fii_ar_aging_receivables table';

7938: FII_UTIL.print_timer('Duration');
7939: FII_UTIL.put_line('');
7940: end if;
7941:
7942: g_state := 'Analyzing fii_ar_aging_receivables table';
7943: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'fii_ar_aging_receivables');
7944:
7945: EXCEPTION
7946: WHEN OTHERS THEN

Line 7943: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'fii_ar_aging_receivables');

7939: FII_UTIL.put_line('');
7940: end if;
7941:
7942: g_state := 'Analyzing fii_ar_aging_receivables table';
7943: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'fii_ar_aging_receivables');
7944:
7945: EXCEPTION
7946: WHEN OTHERS THEN
7947: g_errbuf:=sqlerrm;

Line 8702: -- This procedure deletes records from fii_ar_aging_receivables

8698:
8699: ------------------------------------------------------------------
8700: -- Procedure CLEAN_REC_AGING
8701: -- Purpose
8702: -- This procedure deletes records from fii_ar_aging_receivables
8703: -- that comply with either one of the following cases:
8704: -- 1- Records with customer_trx_id corresponding to an incompleted trx
8705: -- 2- Records that correspond to transactions that have passed from
8706: -- a state of complete to incomplete and then back to complete since the

Line 8753: g_state := 'Deleting from fii_ar_aging_receivables';

8749: group by customer_trx_id
8750: );
8751:
8752:
8753: g_state := 'Deleting from fii_ar_aging_receivables';
8754: if g_debug_flag = 'Y' then
8755: FII_UTIL.put_line(g_state);
8756: end if;
8757:

Line 8761: DELETE FROM fii_ar_aging_receivables ag

8757:
8758: IF trx_id_array.First is not null Then
8759:
8760: FORALL i in trx_id_array.First..trx_id_array.Last
8761: DELETE FROM fii_ar_aging_receivables ag
8762: WHERE (sch_id_array(i) is not null
8763: and ag.payment_schedule_id = sch_id_array(i))
8764: OR (sch_id_array(i) is null
8765: and ag.customer_trx_id = trx_id_array(i)

Line 8770: FII_UTIL.put_line('Deleted ' ||SQL%ROWCOUNT|| ' records from fii_ar_aging_receivables.');

8766: and ag.event_date >= min_date_array(i));
8767: End If;
8768:
8769: if g_debug_flag = 'Y' then
8770: FII_UTIL.put_line('Deleted ' ||SQL%ROWCOUNT|| ' records from fii_ar_aging_receivables.');
8771: FII_UTIL.stop_timer;
8772: FII_UTIL.print_timer('Duration');
8773: FII_UTIL.put_line('');
8774: end if;

Line 8964: -- It also detects records in fii_ar_aging_receivables that have not been

8960: ------------------------------------------------------------------
8961: -- Procedure POPULATE_INCREMENTAL_IDS
8962: -- Purpose
8963: -- This procedure detects new/updated receipts and adjustments.
8964: -- It also detects records in fii_ar_aging_receivables that have not been
8965: -- completely aged.
8966: -- Corresponding customer_trx_id(s) are populated in FII_AR_PAYSCH_MERGE_GT
8967: ------------------------------------------------------------------
8968: PROCEDURE POPULATE_INCREMENTAL_IDS IS

Line 8972: g_state := 'Populating FII_AR_PAYSCH_MERGE_GT from fii_ar_aging_receivables';

8968: PROCEDURE POPULATE_INCREMENTAL_IDS IS
8969:
8970: BEGIN
8971:
8972: g_state := 'Populating FII_AR_PAYSCH_MERGE_GT from fii_ar_aging_receivables';
8973: if g_debug_flag = 'Y' then
8974: FII_UTIL.put_line(g_state);
8975: end if;
8976:

Line 8986: from fii_ar_aging_receivables ag

8982: --Insert trx ids that are already in aging table but not yet aged completely
8983: INSERT INTO FII_AR_PAYSCH_MERGE_GT
8984: (customer_trx_id)
8985: (select distinct ag.customer_trx_id
8986: from fii_ar_aging_receivables ag
8987: where ag.next_aging_date > G_LAST_UPDATE_DATE --'15-APR-2005'
8988: and ag.next_aging_date <= g_sysdate --'20-MAY-2005'
8989: and not exists
8990: (select 1

Line 9385: ---------- Inc load of FII_AR_AGING_RECEIVABLES-----------

9381: POPULATE_SCHEDULED_DISCOUNTS;
9382: */
9383:
9384: ----------------------------------------------------------
9385: ---------- Inc load of FII_AR_AGING_RECEIVABLES-----------
9386: ----------------------------------------------------------
9387: if g_debug_flag = 'Y' then
9388: FII_UTIL.put_line('-------------------------------------------------');
9389: FII_UTIL.put_line('Calling the CLEAN_REC_AGING procedure to delete from fii_ar_aging_receivables');

Line 9389: FII_UTIL.put_line('Calling the CLEAN_REC_AGING procedure to delete from fii_ar_aging_receivables');

9385: ---------- Inc load of FII_AR_AGING_RECEIVABLES-----------
9386: ----------------------------------------------------------
9387: if g_debug_flag = 'Y' then
9388: FII_UTIL.put_line('-------------------------------------------------');
9389: FII_UTIL.put_line('Calling the CLEAN_REC_AGING procedure to delete from fii_ar_aging_receivables');
9390: FII_UTIL.put_line('-------------------------------------------------');
9391: end if;
9392: CLEAN_REC_AGING;
9393: