DBA Data[Home] [Help]

APPS.BIC_SUMMARY_EXTRACT_PKG dependencies on BIC_TEMP_PERIODS

Line 219: rec_temp bic_temp_periods%ROWTYPE;

215: TYPE curTyp IS REF CURSOR;
216: per_cur curTyp;
217: org_str varchar2(3000);
218: n_org_str varchar2(3000);
219: rec_temp bic_temp_periods%ROWTYPE;
220: rec bic_dimv_time%ROWTYPE;
221: i number;
222: errcode number;
223: errmesg varchar2(200);

Line 256: delete from bic_temp_periods;

252: if (p_delete_flag = 'Y' ) then
253: write_log('Exiting from fill_dates as delete flag is Y');
254: return ;
255: end if;
256: delete from bic_temp_periods;
257: if ( p_org_flag = 'Y' ) then
258: OPEN per_cur FOR org_str
259: USING p_start_date,
260: p_end_date,

Line 265: insert into bic_temp_periods

261: p_org_id;
262: LOOP
263: FETCH per_cur INTO rec_temp ;
264: EXIT WHEN per_cur%NOTFOUND;
265: insert into bic_temp_periods
266: ( ACT_PERIOD_NAME, START_DATE, ACT_PERIOD_START_DATE, ACT_PERIOD_END_DATE, ACT_YEAR,
267: ACT_PERIOD_NUM, ACT_QUARTER, ACT_YEAR_START_DATE, ACT_QUARTER_START_DATE, ACT_HALF_YEAR , ORG_ID ) values
268: ( rec_temp.ACT_PERIOD_NAME, rec_temp.START_DATE, rec_temp.ACT_PERIOD_START_DATE, rec_temp.ACT_PERIOD_END_DATE, rec_temp.ACT_YEAR,
269: rec_temp.ACT_PERIOD_NUM, rec_temp.ACT_QUARTER, rec_temp.ACT_YEAR_START_DATE, rec_temp.ACT_QUARTER_START_DATE, rec_temp.ACT_HALF_YEAR, rec_temp.ORG_ID ) ;

Line 279: insert into bic_temp_periods

275: p_end_date ;
276: LOOP
277: FETCH per_cur INTO rec ;
278: EXIT WHEN per_cur%NOTFOUND;
279: insert into bic_temp_periods
280: ( ACT_PERIOD_NAME, START_DATE, ACT_PERIOD_START_DATE, ACT_PERIOD_END_DATE, ACT_YEAR,
281: ACT_PERIOD_NUM, ACT_QUARTER, ACT_YEAR_START_DATE, ACT_QUARTER_START_DATE, ACT_HALF_YEAR ) values
282: ( rec.ACT_PERIOD_NAME, rec.START_DATE, rec.ACT_PERIOD_START_DATE, rec.ACT_PERIOD_END_DATE, rec.ACT_YEAR,
283: rec.ACT_PERIOD_NUM, rec.ACT_QUARTER, rec.ACT_YEAR_START_DATE, rec.ACT_QUARTER_START_DATE, rec.ACT_HALF_YEAR ) ;

Line 293: delete from bic_temp_periods;

289:
290: procedure extract_all_periods ( p_start_date date,
291: p_end_date date ) IS
292: begin
293: delete from bic_temp_periods;
294: insert into bic_temp_periods (
295: SELECT bdt.act_period_name , bdt.start_date , bdt.act_period_start_date ,
296: bdt.act_period_end_date , bdt.act_year , bdt.act_period_num ,
297: bdt.act_quarter , bdt.act_year_start_date , bdt.act_quarter_start_date ,

Line 294: insert into bic_temp_periods (

290: procedure extract_all_periods ( p_start_date date,
291: p_end_date date ) IS
292: begin
293: delete from bic_temp_periods;
294: insert into bic_temp_periods (
295: SELECT bdt.act_period_name , bdt.start_date , bdt.act_period_start_date ,
296: bdt.act_period_end_date , bdt.act_year , bdt.act_period_num ,
297: bdt.act_quarter , bdt.act_year_start_date , bdt.act_quarter_start_date ,
298: bdt.act_half_year , null

Line 727: x_extra_cond := 'exists (select 1 from bic_temp_periods btp where btp.start_date = bdt.start_date) and';

723: --be selected easily for update of scores and bucket ids in update_score
724: --procedure.
725: x_bucket_id := -1;
726:
727: x_extra_cond := 'exists (select 1 from bic_temp_periods btp where btp.start_date = bdt.start_date) and';
728:
729: if g_delete_flag = 'N' then
730:
731: x_extra_cond := 'exists (select 1 from bic_temp_periods btp where btp.start_date = bdt.start_date and btp.org_id = bma.org_id) and ';

Line 731: x_extra_cond := 'exists (select 1 from bic_temp_periods btp where btp.start_date = bdt.start_date and btp.org_id = bma.org_id) and ';

727: x_extra_cond := 'exists (select 1 from bic_temp_periods btp where btp.start_date = bdt.start_date) and';
728:
729: if g_delete_flag = 'N' then
730:
731: x_extra_cond := 'exists (select 1 from bic_temp_periods btp where btp.start_date = bdt.start_date and btp.org_id = bma.org_id) and ';
732: end if;
733:
734: if g_org_id is not null then
735: x_extra_cond := x_extra_cond || ':p_org_id = bma.org_id and ';

Line 996: from bic_temp_periods

992:
993: -- 1 is added in following query so that 1/31/99 - 1/1/99 gives 31
994: -- not 30
995: select act_period_end_date - act_period_start_date +1 into x_days
996: from bic_temp_periods
997: where trunc(start_date) = trunc(x_period_start_date)
998: and nvl(org_id,x_org_id) = x_org_id;
999:
1000: x_value := x_value1/x_days;

Line 1229: from bic_temp_periods;

1225:
1226: write_log('Extracted Periods Successfully In Extract_satisfaction...');
1227:
1228: select count(*) into rec_count
1229: from bic_temp_periods;
1230:
1231: if rec_count = 0 then
1232: write_log('data already exists');
1233: return;

Line 1271: from bic_temp_periods;

1267:
1268: write_log('Extracted Periods Successfully In Extract_Loyalty...');
1269:
1270: select count(*) into rec_count
1271: from bic_temp_periods;
1272:
1273: if rec_count = 0 then
1274: write_log('Data already extracted');
1275: return;

Line 1429: from bic_temp_periods bdt

1425: ,g_program_id
1426: ,sysdate
1427: ,null
1428: ,'RETENTION'
1429: from bic_temp_periods bdt
1430: where trunc(bdt.start_date)
1431: --Ex: if the start date is 1-mar-2003 and the attrition period is 2 months then calculate retention retained from
1432: --1-jan-2003 inorder to calculate retention_churned
1433: between trunc(add_months(g_period_start_date,g_attrition_period*-1)) and trunc(g_period_end_date)

Line 1529: from bic_temp_periods bdt

1525: ,g_program_id
1526: ,sysdate
1527: ,null
1528: ,'RETENTION'
1529: from bic_temp_periods bdt
1530: where trunc(bdt.start_date)
1531: --Ex: if the start date is 1-mar-2003 and the attrition period is 2 months then
1532: --calculate retention reactivated from
1533: --1-jan-2003 inorder to calculate retention_churned

Line 1638: from bic_temp_periods bdt

1634: ,g_program_id
1635: ,sysdate
1636: ,null
1637: ,'RETENTION'
1638: from bic_temp_periods bdt
1639: where trunc(bdt.start_date)
1640: --Ex: if the start date is 1-mar-2003 and the attrition period is 2 months
1641: --then calculate retention new from
1642: --1-jan-2003 inorder to calculate retention_churned

Line 1698: from bic_temp_periods;

1694:
1695: debug('Extracted Periods Successfully In Extract_Retention...');
1696:
1697: select count(*) into rec_count
1698: from bic_temp_periods;
1699:
1700: if rec_count = 0 then
1701: write_log('Data already extracted for these periods');
1702: return;

Line 1770: from bic_temp_periods;

1766: g_org_id);
1767: end if;
1768: write_log('Extracted Periods Successfully In Extract_Sales...');
1769: select count(*) into rec_count
1770: from bic_temp_periods;
1771:
1772: if rec_count = 0 then
1773: write_log('sales data already extracted');
1774: return;

Line 1809: bic_temp_periods bdt,

1805: g_program_id,
1806: g_last_update_login,
1807: 'SALES'
1808: from hz_cust_accounts hca,
1809: bic_temp_periods bdt,
1810: bic_measures_all bma,
1811: ra_customer_trx_all trx,
1812: ra_customer_trx_lines_all lines,
1813: ra_cust_trx_line_gl_dist_all gl,

Line 1879: from bic_temp_periods;

1875: g_org_id);
1876:
1877:
1878: select count(*) into rec_count
1879: from bic_temp_periods;
1880:
1881: if rec_count = 0 then
1882: write_log('COGS data already extracted');
1883: return;

Line 1921: bic_temp_periods bdt,

1917: g_program_id,
1918: g_last_update_login,
1919: 'COGS'
1920: from hz_cust_accounts hca,
1921: bic_temp_periods bdt,
1922: bic_measures_all bma,
1923: cst_bis_margin_summary cmt,
1924: hr_organization_information hoi,
1925: gl_sets_of_books gsb

Line 2016: from bic_temp_periods;

2012: g_delete_flag,
2013: g_org_id);
2014:
2015: select count(*) into rec_count
2016: from bic_temp_periods;
2017:
2018: if rec_count = 0 then
2019: write_log('acquitistion data already extracted');
2020: return;

Line 2063: from bic_temp_periods bdt

2059: g_program_application_id,
2060: g_program_id,
2061: g_last_update_login,
2062: 'ACQUISITION'
2063: from bic_temp_periods bdt
2064: where x_account_established_date
2065: between bdt.act_period_start_date and
2066: bdt.act_period_end_date ;
2067: /* and trunc(bdt.start_date)