DBA Data[Home] [Help]

APPS.PV_PARTNER_TREND_PVT dependencies on PV_ENTITY_ATTR_TRENDS

Line 229: select nvl(max(attribute_trend_id),0) + 1 into l_next_trend_id from pv_entity_attr_trends;

225:
226: g_period_set_name := FND_PROFILE.Value('AS_FORECAST_CALENDAR');
227: Debug('The Period Set Name is: ' || g_period_set_name);
228:
229: select nvl(max(attribute_trend_id),0) + 1 into l_next_trend_id from pv_entity_attr_trends;
230: Debug('Next available attribute_trend_id: ' || l_next_trend_id);
231:
232: l_last_incr_refresh_str := FND_PROFILE.VALUE('PV_PT_TREND_LAST_UPDATE');
233:

Line 329: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'

325: Debug('Adding to partner trend table for partner_id: ' || l_new_pt_rec.partner_id);
326:
327: begin
328: savepoint current_partner;
329: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
330: and entity_id = l_new_pt_rec.partner_id
331: and attribute_id in ( select b.attribute_id from pv_entity_attrs a, pv_attributes_b b
332: where a.entity = 'PARTNER_TREND' and a.attribute_id = b.attribute_id
333: and b.performance_flag = 'Y' and b.additive_flag = 'Y')

Line 336: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'

332: where a.entity = 'PARTNER_TREND' and a.attribute_id = b.attribute_id
333: and b.performance_flag = 'Y' and b.additive_flag = 'Y')
334: and trend_timeline between l_from_date and l_to_date;
335:
336: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
337: and attribute_id in ( select b.attribute_id from pv_entity_attrs a, pv_attributes_b b
338: where a.entity = 'PARTNER_TREND' and a.attribute_id = b.attribute_id
339: and b.performance_flag = 'Y' and b.additive_flag = 'N')
340: and entity_id = l_new_pt_rec.partner_id and trend_timeline = trunc(l_run_date, 'MM');

Line 351: insert into pv_entity_attr_trends

347: l_next_trend_id := l_next_trend_id + 1;
348: end loop;
349:
350: forall i in l_partner_id_tbl.first .. l_partner_id_tbl.last
351: insert into pv_entity_attr_trends
352: (ATTRIBUTE_TREND_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,
353: LAST_UPDATE_LOGIN,OBJECT_VERSION_NUMBER,ENTITY,ENTITY_ID,ATTRIBUTE_ID,ATTR_VALUE,
354: CURRENCY_CODE,CURRENCY_DATE,TREND_TIMELINE,TIME_UOM) values
355: (l_attr_trend_id_tbl(i), sysdate, 1, sysdate, 1, 1, 1, 'PARTNER',

Line 455: Debug('Deleting from pv_entity_attr_trends for attribute: ' || lc_attr_rec.name);

451: l_next_trend_id := l_next_trend_id + 1;
452: end loop;
453:
454: if not l_attr_has_data then
455: Debug('Deleting from pv_entity_attr_trends for attribute: ' || lc_attr_rec.name);
456:
457: if lc_attr_rec.additive_flag = 'Y' then
458: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
459: and attribute_id = lc_attr_rec.attribute_id

Line 458: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'

454: if not l_attr_has_data then
455: Debug('Deleting from pv_entity_attr_trends for attribute: ' || lc_attr_rec.name);
456:
457: if lc_attr_rec.additive_flag = 'Y' then
458: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
459: and attribute_id = lc_attr_rec.attribute_id
460: and trend_timeline between l_from_date and l_to_date;
461: ELSE
462: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'

Line 462: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'

458: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
459: and attribute_id = lc_attr_rec.attribute_id
460: and trend_timeline between l_from_date and l_to_date;
461: ELSE
462: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
463: and attribute_id = lc_attr_rec.attribute_id and trend_timeline = trunc(l_run_date, 'MM');
464: END IF;
465: l_attr_has_data := true;
466: end if;

Line 471: insert into pv_entity_attr_trends

467:
468: Debug('Adding to partner trend table for attribute: ' || lc_attr_rec.name);
469:
470: forall i in l_partner_id_tbl.first .. l_partner_id_tbl.last
471: insert into pv_entity_attr_trends
472: (ATTRIBUTE_TREND_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,
473: LAST_UPDATE_LOGIN,OBJECT_VERSION_NUMBER,ENTITY,ENTITY_ID,ATTRIBUTE_ID,ATTR_VALUE,
474: CURRENCY_CODE,CURRENCY_DATE,TREND_TIMELINE,TIME_UOM) values
475: (l_attr_trend_id_tbl(i), sysdate, 1, sysdate, 1, 1, 1, 'PARTNER', l_partner_id_tbl(i),

Line 498: Debug('Deleting from pv_entity_attr_trends for attribute: ' || lc_attr_rec.name);

494: l_next_trend_id := l_next_trend_id + 1;
495: end loop;
496:
497: if not l_attr_has_data then
498: Debug('Deleting from pv_entity_attr_trends for attribute: ' || lc_attr_rec.name);
499: if lc_attr_rec.additive_flag = 'Y' then
500: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
501: and attribute_id = lc_attr_rec.attribute_id
502: and trend_timeline between l_from_date and l_to_date;

Line 500: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'

496:
497: if not l_attr_has_data then
498: Debug('Deleting from pv_entity_attr_trends for attribute: ' || lc_attr_rec.name);
499: if lc_attr_rec.additive_flag = 'Y' then
500: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
501: and attribute_id = lc_attr_rec.attribute_id
502: and trend_timeline between l_from_date and l_to_date;
503: ELSE
504: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'

Line 504: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'

500: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
501: and attribute_id = lc_attr_rec.attribute_id
502: and trend_timeline between l_from_date and l_to_date;
503: ELSE
504: delete from pv_entity_attr_trends where entity = 'PARTNER' and time_uom = 'MONTH'
505: and attribute_id = lc_attr_rec.attribute_id and trend_timeline = trunc(l_run_date, 'MM');
506: END IF;
507: l_attr_has_data := true;
508: END IF;

Line 512: insert into pv_entity_attr_trends

508: END IF;
509:
510: Debug('Adding to partner trend table for attribute: ' || lc_attr_rec.name);
511: forall i in l_partner_id_tbl.first .. l_partner_id_tbl.last
512: insert into pv_entity_attr_trends
513: (ATTRIBUTE_TREND_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,
514: LAST_UPDATE_LOGIN,OBJECT_VERSION_NUMBER,ENTITY,ENTITY_ID,ATTRIBUTE_ID,ATTR_VALUE,
515: CURRENCY_CODE,CURRENCY_DATE,TREND_TIMELINE,TIME_UOM) values
516: (l_attr_trend_id_tbl(i), sysdate, 1, sysdate, 1, 1, 1, 'PARTNER', l_partner_id_tbl(i),