DBA Data[Home] [Help]

APPS.FII_AR_FACTS_AGING_PKG dependencies on FII_AR_AGING_RECEIPTS

Line 3292: -- This procedure inserts records in FII_AR_AGING_RECEIPTS

3288:
3289: ------------------------------------------------------------------
3290: -- Procedure POPULATE_RECEIPTS_AGING
3291: -- Purpose
3292: -- This procedure inserts records in FII_AR_AGING_RECEIPTS
3293: ------------------------------------------------------------------
3294: PROCEDURE POPULATE_RECEIPTS_AGING IS
3295:
3296: BEGIN

Line 3298: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIPTS';

3294: PROCEDURE POPULATE_RECEIPTS_AGING IS
3295:
3296: BEGIN
3297:
3298: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIPTS';
3299: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIPTS');
3300: g_state := 'Truncating table FII_AR_AGING_RECEIPTS';
3301: TRUNCATE_TABLE('FII_AR_AGING_RECEIPTS');
3302:

Line 3299: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIPTS');

3295:
3296: BEGIN
3297:
3298: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIPTS';
3299: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIPTS');
3300: g_state := 'Truncating table FII_AR_AGING_RECEIPTS';
3301: TRUNCATE_TABLE('FII_AR_AGING_RECEIPTS');
3302:
3303: g_state := 'Truncating table FII_AR_MARKER_GT';

Line 3300: g_state := 'Truncating table FII_AR_AGING_RECEIPTS';

3296: BEGIN
3297:
3298: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIPTS';
3299: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIPTS');
3300: g_state := 'Truncating table FII_AR_AGING_RECEIPTS';
3301: TRUNCATE_TABLE('FII_AR_AGING_RECEIPTS');
3302:
3303: g_state := 'Truncating table FII_AR_MARKER_GT';
3304: TRUNCATE_TABLE('FII_AR_MARKER_GT');

Line 3301: TRUNCATE_TABLE('FII_AR_AGING_RECEIPTS');

3297:
3298: g_state := 'Truncating table MLOG$_FII_AR_AGING_RECEIPTS';
3299: TRUNCATE_TABLE('MLOG$_FII_AR_AGING_RECEIPTS');
3300: g_state := 'Truncating table FII_AR_AGING_RECEIPTS';
3301: TRUNCATE_TABLE('FII_AR_AGING_RECEIPTS');
3302:
3303: g_state := 'Truncating table FII_AR_MARKER_GT';
3304: TRUNCATE_TABLE('FII_AR_MARKER_GT');
3305:

Line 3312: g_state := 'Populating FII_AR_AGING_RECEIPTS';

3308: (SELECT 1 marker FROM DUAL UNION ALL
3309: SELECT 2 marker FROM DUAL WHERE g_rct_bucket_2_low is not null UNION ALL
3310: SELECT 3 marker FROM DUAL WHERE g_rct_bucket_3_low is not null);
3311:
3312: g_state := 'Populating FII_AR_AGING_RECEIPTS';
3313: if g_debug_flag = 'Y' then
3314: FII_UTIL.put_line(g_state);
3315: FII_UTIL.start_timer;
3316: FII_UTIL.put_line('');

Line 3320: INSERT /*+ append parallel(F) */ INTO FII_AR_AGING_RECEIPTS F

3316: FII_UTIL.put_line('');
3317: end if;
3318:
3319:
3320: INSERT /*+ append parallel(F) */ INTO FII_AR_AGING_RECEIPTS F
3321: (time_id,
3322: event_date,
3323: next_aging_date,
3324: bill_to_customer_id,

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

3613: or
3614: sum(aging_bucket_3_amount_func) <>0;
3615:
3616: if g_debug_flag = 'Y' then
3617: FII_UTIL.put_line('Inserted ' ||SQL%ROWCOUNT|| ' records into FII_AR_AGING_RECEIPTS');
3618: FII_UTIL.stop_timer;
3619: FII_UTIL.print_timer('Duration');
3620: FII_UTIL.put_line('');
3621: end if;

Line 3623: g_state := 'Analyzing FII_AR_AGING_RECEIPTS table';

3619: FII_UTIL.print_timer('Duration');
3620: FII_UTIL.put_line('');
3621: end if;
3622:
3623: g_state := 'Analyzing FII_AR_AGING_RECEIPTS table';
3624: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'FII_AR_AGING_RECEIPTS');
3625:
3626: EXCEPTION
3627: WHEN OTHERS THEN

Line 3624: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'FII_AR_AGING_RECEIPTS');

3620: FII_UTIL.put_line('');
3621: end if;
3622:
3623: g_state := 'Analyzing FII_AR_AGING_RECEIPTS table';
3624: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'FII_AR_AGING_RECEIPTS');
3625:
3626: EXCEPTION
3627: WHEN OTHERS THEN
3628: g_errbuf:=sqlerrm;

Line 7960: -- This procedure inserts records in fii_ar_aging_receipts

7956:
7957: ------------------------------------------------------------------
7958: -- Procedure Inc_RECEIPTS_AGING
7959: -- Purpose
7960: -- This procedure inserts records in fii_ar_aging_receipts
7961: ------------------------------------------------------------------
7962: PROCEDURE Inc_RECEIPTS_AGING IS
7963:
7964: type time_id_type IS TABLE OF fii_ar_aging_receipts.time_id%type;

Line 7964: type time_id_type IS TABLE OF fii_ar_aging_receipts.time_id%type;

7960: -- This procedure inserts records in fii_ar_aging_receipts
7961: ------------------------------------------------------------------
7962: PROCEDURE Inc_RECEIPTS_AGING IS
7963:
7964: type time_id_type IS TABLE OF fii_ar_aging_receipts.time_id%type;
7965: type event_date_type IS TABLE OF fii_ar_aging_receipts.event_date%type;
7966: type bill_to_customer_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_customer_id%type;
7967: type bill_to_site_use_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_site_use_id%type;
7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;

Line 7965: type event_date_type IS TABLE OF fii_ar_aging_receipts.event_date%type;

7961: ------------------------------------------------------------------
7962: PROCEDURE Inc_RECEIPTS_AGING IS
7963:
7964: type time_id_type IS TABLE OF fii_ar_aging_receipts.time_id%type;
7965: type event_date_type IS TABLE OF fii_ar_aging_receipts.event_date%type;
7966: type bill_to_customer_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_customer_id%type;
7967: type bill_to_site_use_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_site_use_id%type;
7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;
7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;

Line 7966: type bill_to_customer_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_customer_id%type;

7962: PROCEDURE Inc_RECEIPTS_AGING IS
7963:
7964: type time_id_type IS TABLE OF fii_ar_aging_receipts.time_id%type;
7965: type event_date_type IS TABLE OF fii_ar_aging_receipts.event_date%type;
7966: type bill_to_customer_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_customer_id%type;
7967: type bill_to_site_use_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_site_use_id%type;
7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;
7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;
7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;

Line 7967: type bill_to_site_use_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_site_use_id%type;

7963:
7964: type time_id_type IS TABLE OF fii_ar_aging_receipts.time_id%type;
7965: type event_date_type IS TABLE OF fii_ar_aging_receipts.event_date%type;
7966: type bill_to_customer_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_customer_id%type;
7967: type bill_to_site_use_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_site_use_id%type;
7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;
7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;
7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;
7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;

Line 7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;

7964: type time_id_type IS TABLE OF fii_ar_aging_receipts.time_id%type;
7965: type event_date_type IS TABLE OF fii_ar_aging_receipts.event_date%type;
7966: type bill_to_customer_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_customer_id%type;
7967: type bill_to_site_use_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_site_use_id%type;
7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;
7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;
7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;
7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;
7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;

Line 7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;

7965: type event_date_type IS TABLE OF fii_ar_aging_receipts.event_date%type;
7966: type bill_to_customer_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_customer_id%type;
7967: type bill_to_site_use_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_site_use_id%type;
7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;
7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;
7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;
7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;
7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;
7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;

Line 7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;

7966: type bill_to_customer_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_customer_id%type;
7967: type bill_to_site_use_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_site_use_id%type;
7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;
7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;
7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;
7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;
7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;
7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;
7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;

Line 7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;

7967: type bill_to_site_use_id_type IS TABLE OF fii_ar_aging_receipts.bill_to_site_use_id%type;
7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;
7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;
7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;
7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;
7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;
7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;
7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;
7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;

Line 7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;

7968: type org_id_type IS TABLE OF fii_ar_aging_receipts.org_id%type;
7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;
7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;
7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;
7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;
7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;
7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;
7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;
7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;

Line 7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;

7969: type cash_receipt_id_type IS TABLE OF fii_ar_aging_receipts.cash_receipt_id%type;
7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;
7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;
7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;
7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;
7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;
7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;
7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;
7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;

Line 7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;

7970: type bucket_1_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_func%type;
7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;
7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;
7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;
7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;
7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;
7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;
7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;
7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;

Line 7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;

7971: type bucket_1_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_prim%type;
7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;
7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;
7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;
7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;
7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;
7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;
7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;
7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;

Line 7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;

7972: type bucket_1_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_amount_sec%type;
7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;
7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;
7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;
7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;
7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;
7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;
7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;
7980: type bucket_3_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_sec%type;

Line 7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;

7973: type bucket_1_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_1_count%type;
7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;
7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;
7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;
7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;
7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;
7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;
7980: type bucket_3_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_sec%type;
7981: type bucket_3_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_count%type;

Line 7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;

7974: type bucket_2_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_func%type;
7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;
7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;
7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;
7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;
7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;
7980: type bucket_3_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_sec%type;
7981: type bucket_3_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_count%type;
7982: type total_unapplied_count_type IS TABLE OF fii_ar_aging_receipts.total_unapplied_count%type;

Line 7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;

7975: type bucket_2_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_prim%type;
7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;
7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;
7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;
7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;
7980: type bucket_3_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_sec%type;
7981: type bucket_3_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_count%type;
7982: type total_unapplied_count_type IS TABLE OF fii_ar_aging_receipts.total_unapplied_count%type;
7983: type next_aging_date_type IS TABLE OF fii_ar_aging_receipts.next_aging_date%type;

Line 7980: type bucket_3_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_sec%type;

7976: type bucket_2_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_amount_sec%type;
7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;
7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;
7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;
7980: type bucket_3_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_sec%type;
7981: type bucket_3_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_count%type;
7982: type total_unapplied_count_type IS TABLE OF fii_ar_aging_receipts.total_unapplied_count%type;
7983: type next_aging_date_type IS TABLE OF fii_ar_aging_receipts.next_aging_date%type;
7984: time_id_MS time_id_type;

Line 7981: type bucket_3_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_count%type;

7977: type bucket_2_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_2_count%type;
7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;
7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;
7980: type bucket_3_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_sec%type;
7981: type bucket_3_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_count%type;
7982: type total_unapplied_count_type IS TABLE OF fii_ar_aging_receipts.total_unapplied_count%type;
7983: type next_aging_date_type IS TABLE OF fii_ar_aging_receipts.next_aging_date%type;
7984: time_id_MS time_id_type;
7985: event_date_MS event_date_type;

Line 7982: type total_unapplied_count_type IS TABLE OF fii_ar_aging_receipts.total_unapplied_count%type;

7978: type bucket_3_amount_func_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_func%type;
7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;
7980: type bucket_3_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_sec%type;
7981: type bucket_3_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_count%type;
7982: type total_unapplied_count_type IS TABLE OF fii_ar_aging_receipts.total_unapplied_count%type;
7983: type next_aging_date_type IS TABLE OF fii_ar_aging_receipts.next_aging_date%type;
7984: time_id_MS time_id_type;
7985: event_date_MS event_date_type;
7986: bill_to_customer_id_MS bill_to_customer_id_type;

Line 7983: type next_aging_date_type IS TABLE OF fii_ar_aging_receipts.next_aging_date%type;

7979: type bucket_3_amount_prim_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_prim%type;
7980: type bucket_3_amount_sec_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_amount_sec%type;
7981: type bucket_3_count_type IS TABLE OF fii_ar_aging_receipts.aging_bucket_3_count%type;
7982: type total_unapplied_count_type IS TABLE OF fii_ar_aging_receipts.total_unapplied_count%type;
7983: type next_aging_date_type IS TABLE OF fii_ar_aging_receipts.next_aging_date%type;
7984: time_id_MS time_id_type;
7985: event_date_MS event_date_type;
7986: bill_to_customer_id_MS bill_to_customer_id_type;
7987: bill_to_site_use_id_MS bill_to_site_use_id_type;

Line 8007: g_state := 'Populating memory structures for fii_ar_aging_receipts';

8003: next_aging_date_MS next_aging_date_type;
8004:
8005: BEGIN
8006:
8007: g_state := 'Populating memory structures for fii_ar_aging_receipts';
8008: if g_debug_flag = 'Y' then
8009: FII_UTIL.put_line(g_state);
8010: FII_UTIL.start_timer;
8011: FII_UTIL.put_line('');

Line 8014: --INSERT INTO fii_ar_aging_receipts_t

8010: FII_UTIL.start_timer;
8011: FII_UTIL.put_line('');
8012: end if;
8013:
8014: --INSERT INTO fii_ar_aging_receipts_t
8015: SELECT time_id,
8016: event_date,
8017: next_aging_date,
8018: bill_to_customer_id,

Line 8301: FII_UTIL.put_line('Inserted ' ||SQL%ROWCOUNT|| ' records into memory structures related to fii_ar_aging_receipts.');

8297: or
8298: sum(aging_bucket_3_amount_func) <>0;
8299:
8300: if g_debug_flag = 'Y' then
8301: FII_UTIL.put_line('Inserted ' ||SQL%ROWCOUNT|| ' records into memory structures related to fii_ar_aging_receipts.');
8302: FII_UTIL.stop_timer;
8303: FII_UTIL.print_timer('Duration');
8304: FII_UTIL.put_line('');
8305: end if;

Line 8307: g_state := 'Updating fii_ar_aging_receipts';

8303: FII_UTIL.print_timer('Duration');
8304: FII_UTIL.put_line('');
8305: end if;
8306:
8307: g_state := 'Updating fii_ar_aging_receipts';
8308: if g_debug_flag = 'Y' then
8309: FII_UTIL.put_line(g_state);
8310: FII_UTIL.start_timer;
8311: FII_UTIL.put_line('');

Line 8317: UPDATE fii_ar_aging_receipts ag

8313:
8314: IF time_id_MS.First is not null Then
8315:
8316: FORALL i in time_id_MS.First..time_id_MS.Last
8317: UPDATE fii_ar_aging_receipts ag
8318: SET ag.aging_bucket_1_amount_func = bucket_1_amount_func_MS(i),
8319: ag.aging_bucket_1_amount_prim = bucket_1_amount_prim_MS(i),
8320: ag.aging_bucket_1_amount_sec = bucket_1_amount_sec_MS(i),
8321: ag.aging_bucket_1_count = bucket_1_count_MS(i),

Line 8342: FII_UTIL.put_line('Updated ' ||SQL%ROWCOUNT|| ' records in fii_ar_aging_receipts');

8338:
8339: End If;
8340:
8341: if g_debug_flag = 'Y' then
8342: FII_UTIL.put_line('Updated ' ||SQL%ROWCOUNT|| ' records in fii_ar_aging_receipts');
8343: FII_UTIL.stop_timer;
8344: FII_UTIL.print_timer('Duration');
8345: FII_UTIL.put_line('');
8346: end if;

Line 8348: g_state := 'Inserting into fii_ar_aging_receipts';

8344: FII_UTIL.print_timer('Duration');
8345: FII_UTIL.put_line('');
8346: end if;
8347:
8348: g_state := 'Inserting into fii_ar_aging_receipts';
8349: if g_debug_flag = 'Y' then
8350: FII_UTIL.put_line(g_state);
8351: FII_UTIL.start_timer;
8352: FII_UTIL.put_line('');

Line 8358: INSERT INTO fii_ar_aging_receipts ag

8354:
8355: IF time_id_MS.First is not null Then
8356:
8357: FORALL i in time_id_MS.First..time_id_MS.Last
8358: INSERT INTO fii_ar_aging_receipts ag
8359: SELECT time_id_MS(i), event_date_MS(i), next_aging_date_MS(i), bill_to_customer_id_MS(i),
8360: bill_to_site_use_id_MS(i), org_id_MS(i), cash_receipt_id_MS(i),
8361: bucket_1_amount_func_MS(i), bucket_1_amount_prim_MS(i), bucket_1_amount_sec_MS(i), bucket_1_count_MS(i),
8362: bucket_2_amount_func_MS(i), bucket_2_amount_prim_MS(i), bucket_2_amount_sec_MS(i), bucket_2_count_MS(i),

Line 8368: FROM fii_ar_aging_receipts ag

8364: total_unapplied_count_MS(i), sysdate, g_fii_user_id, sysdate, g_fii_user_id, g_fii_login_id
8365: FROM DUAL
8366: WHERE NOT EXISTS
8367: (SELECT 1
8368: FROM fii_ar_aging_receipts ag
8369: WHERE ag.time_id = time_id_MS(i)
8370: AND ag.cash_receipt_id = cash_receipt_id_MS(i));
8371:
8372: End If;

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

8371:
8372: End If;
8373:
8374: if g_debug_flag = 'Y' then
8375: FII_UTIL.put_line('Inserted ' ||SQL%ROWCOUNT|| ' records into fii_ar_aging_receipts');
8376: FII_UTIL.stop_timer;
8377: FII_UTIL.print_timer('Duration');
8378: FII_UTIL.put_line('');
8379: end if;

Line 8381: g_state := 'Analyzing fii_ar_aging_receipts table';

8377: FII_UTIL.print_timer('Duration');
8378: FII_UTIL.put_line('');
8379: end if;
8380:
8381: g_state := 'Analyzing fii_ar_aging_receipts table';
8382: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'fii_ar_aging_receipts');
8383:
8384: EXCEPTION
8385: WHEN OTHERS THEN

Line 8382: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'fii_ar_aging_receipts');

8378: FII_UTIL.put_line('');
8379: end if;
8380:
8381: g_state := 'Analyzing fii_ar_aging_receipts table';
8382: FND_STATS.GATHER_TABLE_STATS(g_fii_schema,'fii_ar_aging_receipts');
8383:
8384: EXCEPTION
8385: WHEN OTHERS THEN
8386: g_errbuf:=sqlerrm;

Line 8398: -- This procedure inserts records in fii_ar_aging_receipts

8394:
8395: ------------------------------------------------------------------
8396: -- Procedure Inc_DISPUTES_AGING
8397: -- Purpose
8398: -- This procedure inserts records in fii_ar_aging_receipts
8399: ------------------------------------------------------------------
8400: PROCEDURE Inc_DISPUTES_AGING IS
8401:
8402: BEGIN

Line 8793: -- This procedure deletes records from fii_ar_aging_receipts

8789:
8790: ------------------------------------------------------------------
8791: -- Procedure CLEAN_RCT_AGING
8792: -- Purpose
8793: -- This procedure deletes records from fii_ar_aging_receipts
8794: -- that comply with either one of the following cases:
8795: -- 1- Deleted receipts
8796: -- 2- event_date > actual_date_closed of closed receipts
8797: -- 3- Bug 5862579: Receipts in aging table that are now reveresed.

Line 8824: fii_ar_aging_receipts ag

8820:
8821: --Cases 2
8822: select distinct ag.cash_receipt_id, to_number(to_char(rct.rct_actual_date_closed, 'J')) actual_date_closed
8823: from fii_ar_receipts_f rct,
8824: fii_ar_aging_receipts ag
8825: where rct.cash_receipt_id = ag.cash_receipt_id
8826: and rct.receivable_application_id <= G_MAX_RECEIVABLE_APPL_ID
8827: and to_number(to_char(rct.rct_actual_date_closed, 'J')) < ag.time_id
8828:

Line 8834: fii_ar_aging_receipts ag

8830:
8831: --Case 3
8832: select ag.cash_receipt_id, 1 actual_date_closed
8833: from fii_ar_receipts_f rct,
8834: fii_ar_aging_receipts ag
8835: where rct.cash_receipt_id = ag.cash_receipt_id
8836: and rct.receivable_application_id <= G_MAX_RECEIVABLE_APPL_ID
8837: and rct.header_status in ('REV','NSF','STOP') );
8838:

Line 8839: g_state := 'Deleting from fii_ar_aging_receipts';

8835: where rct.cash_receipt_id = ag.cash_receipt_id
8836: and rct.receivable_application_id <= G_MAX_RECEIVABLE_APPL_ID
8837: and rct.header_status in ('REV','NSF','STOP') );
8838:
8839: g_state := 'Deleting from fii_ar_aging_receipts';
8840: if g_debug_flag = 'Y' then
8841: FII_UTIL.put_line(g_state);
8842: end if;
8843:

Line 8847: DELETE FROM fii_ar_aging_receipts ag

8843:
8844: If rct_id_array.First is not null Then
8845:
8846: FORALL i in rct_id_array.First..rct_id_array.Last
8847: DELETE FROM fii_ar_aging_receipts ag
8848: WHERE ag.cash_receipt_id = rct_id_array(i)
8849: AND ag.time_id > date_closed_array(i);
8850:
8851: End If;

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

8850:
8851: End If;
8852:
8853: if g_debug_flag = 'Y' then
8854: FII_UTIL.put_line('Deleted ' ||SQL%ROWCOUNT|| ' records from fii_ar_aging_receipts.');
8855: FII_UTIL.stop_timer;
8856: FII_UTIL.print_timer('Duration');
8857: FII_UTIL.put_line('');
8858: end if;

Line 9017: -- It also detects records in fii_ar_aging_receipts that have not been

9013: ------------------------------------------------------------------
9014: -- Procedure POPULATE_INCREMENTAL_RCT_IDS
9015: -- Purpose
9016: -- This procedure detects new unapplied receipts.
9017: -- It also detects records in fii_ar_aging_receipts that have not been
9018: -- completely aged.
9019: -- Corresponding cash_receipt_id(s) are populated in FII_AR_RECAPP_MERGE_GT
9020: ------------------------------------------------------------------
9021: PROCEDURE POPULATE_INCREMENTAL_RCT_IDS IS

Line 9033: g_state := 'Populating FII_AR_RECAPP_MERGE_GT from fii_ar_aging_receipts';

9029:
9030: --trx_ids that have new applications
9031: --These are already in FII_AR_RECAPP_MERGE_GT
9032:
9033: g_state := 'Populating FII_AR_RECAPP_MERGE_GT from fii_ar_aging_receipts';
9034: if g_debug_flag = 'Y' then
9035: FII_UTIL.put_line(g_state);
9036: end if;
9037:

Line 9147: from fii_ar_aging_receipts ag

9143: last_updated_by,
9144: last_update_login
9145: from fii_ar_receipts_f rct,
9146: (select distinct ag.cash_receipt_id
9147: from fii_ar_aging_receipts ag
9148: where ag.next_aging_date > G_LAST_UPDATE_DATE --'15-APR-2005'
9149: and ag.next_aging_date <= g_sysdate --'20-MAY-2005'
9150: and not exists
9151: (select 1

Line 9409: ---------- Inc load of FII_AR_AGING_RECEIPTS--------------

9405: end if;
9406: Inc_RECEIVABLES_AGING;
9407:
9408: ----------------------------------------------------------
9409: ---------- Inc load of FII_AR_AGING_RECEIPTS--------------
9410: ----------------------------------------------------------
9411: if g_debug_flag = 'Y' then
9412: FII_UTIL.put_line('-------------------------------------------------');
9413: FII_UTIL.put_line('Calling the CLEAN_RCT_AGING procedure to delete from fii_ar_aging_receipts');

Line 9413: FII_UTIL.put_line('Calling the CLEAN_RCT_AGING procedure to delete from fii_ar_aging_receipts');

9409: ---------- Inc load of FII_AR_AGING_RECEIPTS--------------
9410: ----------------------------------------------------------
9411: if g_debug_flag = 'Y' then
9412: FII_UTIL.put_line('-------------------------------------------------');
9413: FII_UTIL.put_line('Calling the CLEAN_RCT_AGING procedure to delete from fii_ar_aging_receipts');
9414: FII_UTIL.put_line('-------------------------------------------------');
9415: end if;
9416: CLEAN_RCT_AGING;
9417: