74:
75: IF (p_type = 1) THEN
76:
77: IF (FND_INSTALLATION.GET_APP_INFO('POA', l_status, l_industry, l_poa_schema)) THEN
78: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_PDIST';
79: EXECUTE IMMEDIATE l_stmt;
80: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_PDIST1';
81: EXECUTE IMMEDIATE l_stmt;
82: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_PDIST2';
76:
77: IF (FND_INSTALLATION.GET_APP_INFO('POA', l_status, l_industry, l_poa_schema)) THEN
78: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_PDIST';
79: EXECUTE IMMEDIATE l_stmt;
80: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_PDIST1';
81: EXECUTE IMMEDIATE l_stmt;
82: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_PDIST2';
83: EXECUTE IMMEDIATE l_stmt;
84: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_SPERF';
78: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_PDIST';
79: EXECUTE IMMEDIATE l_stmt;
80: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_PDIST1';
81: EXECUTE IMMEDIATE l_stmt;
82: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_PDIST2';
83: EXECUTE IMMEDIATE l_stmt;
84: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_SPERF';
85: EXECUTE IMMEDIATE l_stmt;
86: l_stmt := 'TRUNCATE TABLE ' || l_poa_schema ||'.POA_PORTAL_RISK_IND';
277: 0,
278: 0,
279: 0,
280: 0
281: from poa_portal_pdist
282: where Quarter = 'C'
283: group by operating_unit_pk_key,
284: operating_unit_name
285: UNION ALL
295: 0,
296: 0,
297: sum(cnt_late_supplier_conf),
298: avg(AVG_LATE_SUP_CONF_AGE)
299: from poa_portal_pdist
300: where Quarter = 'C'
301: and AVG_LATE_SUP_CONF_AGE <> 0
302: group by operating_unit_pk_key,
303: operating_unit_name
354: p_count OUT NOCOPY NUMBER,
355: success OUT NOCOPY varchar2) IS
356: BEGIN
357:
358: insert into POA_PORTAL_PDIST (
359: SUM_PURCHASES,
360: SUM_LEAKAGE,
361: SUM_NON_CONTRACT,
362: SUM_CONTRACT,
463: item.IORG_Purchaseable_Flag;
464:
465: p_count := sql%rowcount;
466:
467: insert into POA_PORTAL_PDIST1 (
468: SUM_PURCHASES,
469: SUM_LEAKAGE,
470: SUM_NON_CONTRACT,
471: SUM_CONTRACT,
523: item.IORG_Purchaseable_Flag;
524:
525: p_count := p_count + sql%rowcount;
526:
527: insert into POA_PORTAL_PDIST2 (
528: SUM_PURCHASES,
529: SUM_LEAKAGE,
530: SUM_NON_CONTRACT,
531: SUPPLIER_PK_KEY,