DBA Data[Home] [Help]

APPS.BIC_SUMMARY_EXTRACT_PKG dependencies on BIC_SUMMARY_EXTRACT_PKG

Line 1: package body bic_summary_extract_pkg as

1: package body bic_summary_extract_pkg as
2: /* $Header: bicsummb.pls 120.8 2006/08/17 07:18:24 vsegu ship $ */
3:
4: -- following two variable are used for debugging purpose.
5: -- g_proc_name is set to procedure name in a procedure and g_srl_no

Line 882: bic_summary_extract_pkg.write_log('First child of '|| p_measure_code || ' Not found...');

878: open childs_cur(p_measure_code);
879: -- Get first child
880: fetch childs_cur into x_measure_code1, x_operation_code1;
881: if childs_cur % notfound then
882: bic_summary_extract_pkg.write_log('First child of '|| p_measure_code || ' Not found...');
883: close childs_cur;
884: return;
885: end if;
886: -- Get second child

Line 889: bic_summary_extract_pkg.write_log('Second child of '|| p_measure_code || ' Not found...');

885: end if;
886: -- Get second child
887: fetch childs_cur into x_measure_code2, x_operation_code2;
888: if childs_cur % notfound then
889: bic_summary_extract_pkg.write_log('Second child of '|| p_measure_code || ' Not found...');
890: close childs_cur;
891: return;
892: end if;
893: close childs_cur;

Line 918: bic_summary_extract_pkg.write_log('Value of second measure is 0:');

914: x_customer_id,
915: x_measure_id2,
916: x_value2);
917: if x_value2 = 0 then
918: bic_summary_extract_pkg.write_log('Value of second measure is 0:');
919: elsif x_operation_code1 = '/' then
920: x_value := x_value1*p_mult_factor/x_value2;
921: else
922: bic_summary_extract_pkg.write_log('No procedure to handle operation_code:'||

Line 922: bic_summary_extract_pkg.write_log('No procedure to handle operation_code:'||

918: bic_summary_extract_pkg.write_log('Value of second measure is 0:');
919: elsif x_operation_code1 = '/' then
920: x_value := x_value1*p_mult_factor/x_value2;
921: else
922: bic_summary_extract_pkg.write_log('No procedure to handle operation_code:'||
923: x_operation_code1);
924: end if;
925: insert_record(p_measure_code ,
926: x_period_start_date ,

Line 937: bic_summary_extract_pkg.write_log('No of Recrods Inserted='||to_char(cust_and_dates%rowcount));

933: rollback;
934: exit;
935: end if;*/
936: end loop;
937: bic_summary_extract_pkg.write_log('No of Recrods Inserted='||to_char(cust_and_dates%rowcount));
938: close cust_and_dates;
939: --write_log(' procedure '||g_proc_name || ' exited at : '||sysdate);
940: debug(' exited -');
941:

Line 1012: bic_summary_extract_pkg.write_log('No of Recrods Inserted='||to_char(cust_and_dates%rowcount));

1008: rollback;
1009: exit;
1010: end if;*/
1011: end loop;
1012: bic_summary_extract_pkg.write_log('No of Recrods Inserted='||to_char(cust_and_dates%rowcount));
1013: close cust_and_dates;
1014: --write_log(' procedure '||g_proc_name || ' entered at : '||sysdate);
1015: bic_summary_extract_pkg.debug('exited - ');
1016:

Line 1015: bic_summary_extract_pkg.debug('exited - ');

1011: end loop;
1012: bic_summary_extract_pkg.write_log('No of Recrods Inserted='||to_char(cust_and_dates%rowcount));
1013: close cust_and_dates;
1014: --write_log(' procedure '||g_proc_name || ' entered at : '||sysdate);
1015: bic_summary_extract_pkg.debug('exited - ');
1016:
1017: g_proc_name := g_proc_name_old;
1018:
1019: end run_fmd;

Line 1051: bic_summary_extract_pkg.debug(' entered + ');

1047: begin
1048: g_proc_name_old := g_proc_name;
1049: g_proc_name := 'run_index';
1050: --write_log(' procedure '||g_proc_name || ' entered at : '||sysdate);
1051: bic_summary_extract_pkg.debug(' entered + ');
1052:
1053: open index_recs;
1054: loop
1055: fetch index_recs into x_customer_id, x_org_id, x_period_start_date,

Line 1078: bic_summary_extract_pkg.write_log('No of Recrods Inserted='||to_char(index_recs%rowcount));

1074: rollback;
1075: exit;
1076: end if;*/
1077: end loop;
1078: bic_summary_extract_pkg.write_log('No of Recrods Inserted='||to_char(index_recs%rowcount));
1079: close index_recs;
1080: g_proc_name := g_proc_name_old;
1081: --write_log(' procedure '||g_proc_name || ' exited at : '||sysdate);
1082: bic_summary_extract_pkg.debug(g_proc_name || ' exited at : '|| sysdate);

Line 1082: bic_summary_extract_pkg.debug(g_proc_name || ' exited at : '|| sysdate);

1078: bic_summary_extract_pkg.write_log('No of Recrods Inserted='||to_char(index_recs%rowcount));
1079: close index_recs;
1080: g_proc_name := g_proc_name_old;
1081: --write_log(' procedure '||g_proc_name || ' exited at : '||sysdate);
1082: bic_summary_extract_pkg.debug(g_proc_name || ' exited at : '|| sysdate);
1083:
1084: -- if any exception occurs entire satisfaction should not be calculated
1085: /* exception
1086: when others then

Line 1109: bic_summary_extract_pkg.write_log(' Measure Code:'|| p_measure_code || 'might be disabled or there is no entry in Bic_measure_attribs for');

1105: debug('exited +');
1106: g_proc_name := g_proc_name_old;
1107: exception
1108: when no_data_found then
1109: bic_summary_extract_pkg.write_log(' Measure Code:'|| p_measure_code || 'might be disabled or there is no entry in Bic_measure_attribs for');
1110: g_proc_name := g_proc_name_old;
1111: end;
1112: -- This procedure extracts data for SATISFACTION and/or LOYALTY measure codes
1113: procedure extract_proc(p_measure_code varchar2) is

Line 1388: bic_summary_extract_pkg.debug(' entered + ');

1384: g_proc_name := 'retention_retained';
1385:
1386: -- g_tot_recs_added := 0;
1387: --write_log(' procedure '||g_proc_name || ' entered at : '||sysdate);
1388: bic_summary_extract_pkg.debug(' entered + ');
1389:
1390: open party_cur;
1391: loop
1392: fetch party_cur into x_party_id, x_account_established_date;

Line 1467: bic_summary_extract_pkg.debug(' exited - ');

1463: close party_cur;
1464: write_log('Total Records Added for Retention Retained:'||
1465: to_char(g_tot_recs_added));
1466: --write_log(' procedure '||g_proc_name || ' exited at : '||sysdate);
1467: bic_summary_extract_pkg.debug(' exited - ');
1468:
1469: g_proc_name := g_proc_name_old;
1470:
1471: end retention_retained;

Line 1486: bic_summary_extract_pkg.debug(' entered +');

1482: g_proc_name_old := g_proc_name;
1483: g_proc_name := 'retention_reactivated';
1484: write_log('retention_reactivated entered');
1485: --write_log(' procedure '||g_proc_name || ' entered at : '||sysdate);
1486: bic_summary_extract_pkg.debug(' entered +');
1487:
1488: -- g_tot_recs_added := 0;
1489: open party_cur;
1490: loop

Line 1567: bic_summary_extract_pkg.debug( ' exited - ');

1563: end loop;
1564: close party_cur;
1565: -- write_log('Total Records Added for Retention Reactivated:'||to_char(g_tot_recs_added));
1566: --write_log(' procedure '||g_proc_name || ' exited at : '||sysdate);
1567: bic_summary_extract_pkg.debug( ' exited - ');
1568:
1569: g_proc_name := g_proc_name_old;
1570:
1571: end retention_reactivated;

Line 1595: bic_summary_extract_pkg.debug(g_proc_name || ' entered at : '|| sysdate);

1591: debug(' entered +');
1592: g_tot_recs_added := 0;
1593: write_log('retention_new entered');
1594: --write_log(' procedure '||g_proc_name || ' entered at : '||sysdate);
1595: bic_summary_extract_pkg.debug(g_proc_name || ' entered at : '|| sysdate);
1596:
1597: open party_cur;
1598: loop
1599: fetch party_cur into x_party_id, x_account_established_date;

Line 1654: bic_summary_extract_pkg.debug(' exited - ');

1650: close party_cur;
1651: write_log('retention new extracted');
1652: write_log('Total Records Added for Retention New:'|| to_char(g_tot_recs_added));
1653: --write_log(' procedure '||g_proc_name || ' exited at : '||sysdate);
1654: bic_summary_extract_pkg.debug(' exited - ');
1655:
1656: g_proc_name := g_proc_name_old;
1657:
1658: end retention_new;

Line 1670: bic_summary_extract_pkg.debug(' entered + : ');

1666: g_proc_name := 'Extract_retention_data';
1667: g_proc_name := 'Extract_Retention';
1668: write_log('Before Retention Extraction...');
1669: --write_log(' procedure '||g_proc_name || ' entered at : '||sysdate);
1670: bic_summary_extract_pkg.debug(' entered + : ');
1671:
1672: bic_consolidate_cust_data_pkg.purge_party_summary_data;
1673: g_measure_id_for_retn := get_measure_id('RETENTION');
1674: if g_measure_id_for_retn = 0 then

Line 1723: bic_summary_extract_pkg.debug(' exited - ');

1719: Commit;
1720:
1721: write_log('Total Records Added for retention:'||to_char(g_tot_recs_added) );
1722: --write_log(' procedure '||g_proc_name || ' exited at : '||sysdate);
1723: bic_summary_extract_pkg.debug(' exited - ');
1724:
1725: g_proc_name := 'Extract_Main';
1726:
1727: Exception

Line 1754: bic_summary_extract_pkg.debug(g_proc_name||' entered + ');

1750: bic_consolidate_cust_data_pkg.purge_customer_summary_data;
1751: g_proc_name_old := g_proc_name;
1752: g_proc_name := 'Extract_sales_data';
1753:
1754: bic_summary_extract_pkg.debug(g_proc_name||' entered + ');
1755: write_log('Before Sales/Revenue Extraction...');
1756:
1757: write_log('Before Extracting Periods In Extract_Sales...');
1758: write_log('g_delete_flag : ' || g_delete_flag);

Line 1797: sum( bic_summary_extract_pkg.convert_amt( gsb.currency_code, gl.gl_date, gl.acctd_amount) ) ,

1793: select bma.measure_id,
1794: hca.party_id,
1795: bdt.act_period_start_date,
1796: bma.org_id,
1797: sum( bic_summary_extract_pkg.convert_amt( gsb.currency_code, gl.gl_date, gl.acctd_amount) ) ,
1798: sysdate,
1799: sysdate,
1800: sysdate,
1801: g_last_updated_by,

Line 1845: bic_summary_extract_pkg.debug(g_proc_name||' exited - ');

1841:
1842:
1843: Commit;
1844: end if;
1845: bic_summary_extract_pkg.debug(g_proc_name||' exited - ');
1846: g_proc_name := g_proc_name_old;
1847: write_log('Total Records Added for Sales:'|| rec_count);
1848: g_proc_name := 'Extract_Main';
1849:

Line 1865: bic_summary_extract_pkg.debug(g_proc_name||' entered + ');

1861: g_proc_name := 'Extract_cogs_data';
1862: --g_proc_name := 'Extract_Main';
1863: write_log('Before Cogs Extraction...');
1864: bic_consolidate_cust_data_pkg.purge_customer_summary_data;
1865: bic_summary_extract_pkg.debug(g_proc_name||' entered + ');
1866: if( fnd_log.test(1,g_proc_name) = false ) then
1867: write_log('logging not enabled');
1868: end if;
1869:

Line 1906: sum(bic_summary_extract_pkg.convert_amt(gsb.currency_code,

1902: select bma.measure_id,
1903: hca.party_id,
1904: bdt.act_period_start_date,
1905: bma.org_id,
1906: sum(bic_summary_extract_pkg.convert_amt(gsb.currency_code,
1907: cmt.gl_date,
1908: cogs_amount)
1909: ),
1910: sysdate,

Line 1951: bic_summary_extract_pkg.debug(g_proc_name||' exited -');

1947:
1948: Commit;
1949:
1950: write_log('Total Records Added for COGS:'|| rec_count);
1951: bic_summary_extract_pkg.debug(g_proc_name||' exited -');
1952: g_proc_name := 'Extract_Main';
1953:
1954: Exception
1955: when others then

Line 2007: bic_summary_extract_pkg.extract_periods (

2003: end if;
2004:
2005: -- write_log ( 'values of passed params for acquistion ' || g_period_start_date ||
2006: -- g_delete_flag || g_org_id );
2007: bic_summary_extract_pkg.extract_periods (
2008: g_period_start_date - g_activation_period,
2009: g_period_end_date,
2010: 'ACQUISITION',
2011: 'N',

Line 2324: bic_summary_extract_pkg.convert_amt(

2320: null
2321: )) returns,
2322: sum((decode(ool.line_category_code,'ORDER',
2323: ool.ordered_quantity - nvl(ool.cancelled_quantity,0)) *
2324: bic_summary_extract_pkg.convert_amt(
2325: ooh.transactional_curr_code,
2326: ooh.ordered_date,
2327: ool.unit_selling_price))
2328: ) order_amt,

Line 2331: bic_summary_extract_pkg.convert_amt(

2327: ool.unit_selling_price))
2328: ) order_amt,
2329: sum((decode(ool.line_category_code,'RETURN',
2330: ool.ordered_quantity - nvl(ool.cancelled_quantity,0)) *
2331: bic_summary_extract_pkg.convert_amt(
2332: ooh.transactional_curr_code,
2333: ooh.ordered_date,
2334: ool.unit_selling_price))
2335: ) return_amt,

Line 2402: bic_summary_extract_pkg.convert_amt(ooh.transactional_curr_code,

2398: count(decode(ool.line_category_code,'ORDER', ool.line_id,null)) line_dl,
2399: count(decode(sign(ool.request_date-ool.actual_shipment_date),
2400: 1,null, 1)) line_ot,
2401: sum(ool.shipped_quantity *
2402: bic_summary_extract_pkg.convert_amt(ooh.transactional_curr_code,
2403: ooh.ordered_date,
2404: ool.unit_selling_price)
2405: ) del_val,
2406: sum(decode(sign(ool.request_date-ool.actual_shipment_date),

Line 2409: bic_summary_extract_pkg.convert_amt(ooh.transactional_curr_code,

2405: ) del_val,
2406: sum(decode(sign(ool.request_date-ool.actual_shipment_date),
2407: 1,0,
2408: ool.shipped_quantity *
2409: bic_summary_extract_pkg.convert_amt(ooh.transactional_curr_code,
2410: ooh.ordered_date,
2411: ool.unit_selling_price)
2412: )) ontime_val
2413: from

Line 2569: end bic_summary_extract_pkg; -- package body

2565: bulk_insert_sql_measures(x_str);
2566: end loop;
2567: close c_sql_measures;
2568: end process_sql_type_measures;
2569: end bic_summary_extract_pkg; -- package body