DBA Data[Home] [Help]

APPS.MSC_POST_PRO dependencies on MSC_ALLOC_SUPPLIES

Line 4304: DELETE MSC_ALLOC_SUPPLIES where plan_id = p_plan_id;

4300:
4301: DELETE MSC_ALLOC_DEMANDS where plan_id = p_plan_id;
4302: msc_util.msc_log('After deleting data from MSC_ALLOC_DEMANDS table');
4303:
4304: DELETE MSC_ALLOC_SUPPLIES where plan_id = p_plan_id;
4305: msc_util.msc_log('After deleting data from MSC_ALLOC_SUPPLIES table');
4306:
4307: /* --------------------------------------------------------------- */
4308: -- 2566795

Line 4305: msc_util.msc_log('After deleting data from MSC_ALLOC_SUPPLIES table');

4301: DELETE MSC_ALLOC_DEMANDS where plan_id = p_plan_id;
4302: msc_util.msc_log('After deleting data from MSC_ALLOC_DEMANDS table');
4303:
4304: DELETE MSC_ALLOC_SUPPLIES where plan_id = p_plan_id;
4305: msc_util.msc_log('After deleting data from MSC_ALLOC_SUPPLIES table');
4306:
4307: /* --------------------------------------------------------------- */
4308: -- 2566795
4309: -- 2623646 Modified to join with msc_trading_partners/ msc_calendar_dates

Line 4748: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_SUPPLIES(

4744:
4745: -- 2623646 Modified to join with msc_trading_partners/ msc_calendar_dates
4746: -- to move demand on non-working day to prior working day.
4747:
4748: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_SUPPLIES(
4749: plan_id,
4750: inventory_item_id,
4751: organization_id,
4752: sr_instance_id,

Line 4872: msc_util.msc_log('After inserting in msc_alloc_supplies part 1');

4868: msc_util.msc_log('After executing first supplies cursor');
4869:
4870: msc_util.msc_log('rows processed: ' || rows_processed);
4871:
4872: msc_util.msc_log('After inserting in msc_alloc_supplies part 1');
4873:
4874: -- parallel hint can't be used with union all. Use two query instead
4875:
4876: --UNION ALL

Line 4891: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_SUPPLIES(

4887: * o If supply does not have a demand class present, allocate the supply
4888: * to 'OTHER'.
4889: * Else: Allocate the supply to 'OTHER'*/
4890: IF l_excess_supply_by_dc = 'Y' THEN
4891: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_SUPPLIES(
4892: plan_id,
4893: inventory_item_id,
4894: organization_id,
4895: sr_instance_id,

Line 4975: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_SUPPLIES(

4971: :l_user_id,
4972: :l_sysdate)';
4973:
4974: ELSE
4975: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_SUPPLIES(
4976: plan_id,
4977: inventory_item_id,
4978: organization_id,
4979: sr_instance_id,

Line 5074: msc_util.msc_log('After inserting in msc_alloc_supplies part 2');

5070: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
5071: msc_util.msc_log('After executing second supplies cursor');
5072:
5073: msc_util.msc_log('rows processed: ' || rows_processed);
5074: msc_util.msc_log('After inserting in msc_alloc_supplies part 2');
5075:
5076: msc_util.msc_log('after inserting item data into MSC_ALLOC_SUPPLIES tables');
5077:
5078: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_DEMANDS');

Line 5076: msc_util.msc_log('after inserting item data into MSC_ALLOC_SUPPLIES tables');

5072:
5073: msc_util.msc_log('rows processed: ' || rows_processed);
5074: msc_util.msc_log('After inserting in msc_alloc_supplies part 2');
5075:
5076: msc_util.msc_log('after inserting item data into MSC_ALLOC_SUPPLIES tables');
5077:
5078: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_DEMANDS');
5079: fnd_stats.gather_table_stats(ownname=>l_msc_schema,tabname=>'MSC_ALLOC_DEMANDS',
5080: partname=>'ALLOC_DEMANDS_999999',

Line 5084: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_SUPPLIES');

5080: partname=>'ALLOC_DEMANDS_999999',
5081: granularity=>'PARTITION',
5082: percent =>10);
5083:
5084: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_SUPPLIES');
5085: fnd_stats.gather_table_stats(ownname=>l_msc_schema,tabname=>'MSC_ALLOC_SUPPLIES',
5086: partname=>'ALLOC_SUPPLIES_999999',
5087: granularity=>'PARTITION',
5088: percent =>10);

Line 5085: fnd_stats.gather_table_stats(ownname=>l_msc_schema,tabname=>'MSC_ALLOC_SUPPLIES',

5081: granularity=>'PARTITION',
5082: percent =>10);
5083:
5084: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_SUPPLIES');
5085: fnd_stats.gather_table_stats(ownname=>l_msc_schema,tabname=>'MSC_ALLOC_SUPPLIES',
5086: partname=>'ALLOC_SUPPLIES_999999',
5087: granularity=>'PARTITION',
5088: percent =>10);
5089: ELSE

Line 5657: AND t.table_name = 'MSC_ALLOC_SUPPLIES'

5653: -- dba_part_indexes i
5654: FROM all_tab_partitions t,
5655: all_part_indexes i
5656: WHERE t.table_owner = l_msc_schema
5657: AND t.table_name = 'MSC_ALLOC_SUPPLIES'
5658: AND t.partition_name = 'ALLOC_SUPPLIES_' || to_char(l_plan_id)
5659: AND i.owner (+) = t.table_owner
5660: AND i.table_name (+) = t.table_name
5661: AND rownum = 1;

Line 5670: || ' as select * from msc_alloc_supplies where 1=2 ';

5666: --bug 6113544
5667: l_insert_stmt := 'CREATE TABLE ' || l_temp_table
5668: || ' TABLESPACE ' || l_tbspace
5669: || ' PCTFREE 0 STORAGE(INITIAL 40K NEXT 5M PCTINCREASE 0)'
5670: || ' as select * from msc_alloc_supplies where 1=2 ';
5671:
5672: /*
5673: l_insert_stmt := 'CREATE TABLE ' || l_temp_table || '(
5674: PLAN_ID NUMBER NOT NULL,

Line 5867: msc_util.msc_log('After inserting in msc_alloc_supplies part 1');

5863: -- Execute the cursor
5864: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
5865: msc_util.msc_log('After executing first supplies cursor');
5866:
5867: msc_util.msc_log('After inserting in msc_alloc_supplies part 1');
5868:
5869: -- parallel hint can't be used with union all. Use two query instead */
5870:
5871: -- UNION ALL

Line 6070: msc_util.msc_log('After inserting in msc_alloc_supplies part 2');

6066: -- Execute the cursor
6067: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
6068: msc_util.msc_log('After executing second supplies cursor');
6069:
6070: msc_util.msc_log('After inserting in msc_alloc_supplies part 2');
6071: commit;
6072:
6073: msc_util.msc_log('before creating indexes on temp supply table');
6074: l_sql_stmt_1 := 'CREATE INDEX ' || l_temp_table || '_N1 ON ' || l_temp_table || '

Line 6152: msc_util.msc_log('Partition name for msc_alloc_supplies table : ' || l_partition_name);

6148:
6149: msc_util.msc_log('swap partition for supplies');
6150: l_partition_name := 'ALLOC_SUPPLIES_' || to_char(l_plan_id);
6151:
6152: msc_util.msc_log('Partition name for msc_alloc_supplies table : ' || l_partition_name);
6153:
6154: l_sql_stmt := 'ALTER TABLE msc_alloc_supplies EXCHANGE PARTITION ' || l_partition_name ||
6155: ' with table MSC_TEMP_ALLOC_SUP_'|| to_char(l_plan_id) ||
6156: ' including indexes without validation';

Line 6154: l_sql_stmt := 'ALTER TABLE msc_alloc_supplies EXCHANGE PARTITION ' || l_partition_name ||

6150: l_partition_name := 'ALLOC_SUPPLIES_' || to_char(l_plan_id);
6151:
6152: msc_util.msc_log('Partition name for msc_alloc_supplies table : ' || l_partition_name);
6153:
6154: l_sql_stmt := 'ALTER TABLE msc_alloc_supplies EXCHANGE PARTITION ' || l_partition_name ||
6155: ' with table MSC_TEMP_ALLOC_SUP_'|| to_char(l_plan_id) ||
6156: ' including indexes without validation';
6157:
6158: BEGIN

Line 6159: msc_util.msc_log('Before alter table msc_alloc_supplies');

6155: ' with table MSC_TEMP_ALLOC_SUP_'|| to_char(l_plan_id) ||
6156: ' including indexes without validation';
6157:
6158: BEGIN
6159: msc_util.msc_log('Before alter table msc_alloc_supplies');
6160: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
6161: APPLICATION_SHORT_NAME => 'MSC',
6162: STATEMENT_TYPE => ad_ddl.alter_table,
6163: STATEMENT => l_sql_stmt,

Line 6164: OBJECT_NAME => 'MSC_ALLOC_SUPPLIES');

6160: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
6161: APPLICATION_SHORT_NAME => 'MSC',
6162: STATEMENT_TYPE => ad_ddl.alter_table,
6163: STATEMENT => l_sql_stmt,
6164: OBJECT_NAME => 'MSC_ALLOC_SUPPLIES');
6165: END;
6166:
6167: msc_util.msc_log('Call procedure clean_temp_tables');
6168:

Line 6982: FROM MSC_ALLOC_SUPPLIES SA

6978: p_sys_date last_update_date,
6979: l_user_id last_updated_by,
6980: p_sys_date creation_date,
6981: l_user_id created_by
6982: FROM MSC_ALLOC_SUPPLIES SA
6983: WHERE SA.PLAN_ID = p_plan_id
6984: AND SA.allocated_quantity <> 0
6985: AND SA.refresh_number IS NULL -- consider only planning records in full summation - summary enhancement
6986: )

Line 7238: FROM MSC_ALLOC_SUPPLIES SA

7234: p_sys_date last_update_date,
7235: l_user_id last_updated_by,
7236: p_sys_date creation_date,
7237: l_user_id created_by
7238: FROM MSC_ALLOC_SUPPLIES SA
7239: WHERE SA.PLAN_ID = p_plan_id
7240: AND SA.allocated_quantity <> 0
7241: AND SA.refresh_number IS NULL -- consider only planning records in full summation - summary enhancement
7242: )

Line 7323: FROM MSC_ALLOC_SUPPLIES SA

7319: p_sys_date last_update_date,
7320: l_user_id last_updated_by,
7321: p_sys_date creation_date,
7322: l_user_id created_by
7323: FROM MSC_ALLOC_SUPPLIES SA
7324: WHERE SA.PLAN_ID = p_plan_id
7325: AND SA.allocated_quantity <> 0
7326: AND SA.refresh_number IS NULL -- consider only planning records in full summation - summary enhancement
7327: )

Line 7491: FROM MSC_ALLOC_SUPPLIES SA

7487: SA.organization_id,
7488: SA.inventory_item_id,
7489: TRUNC(SA.supply_date) SD_DATE,
7490: SA.allocated_quantity SD_QTY
7491: FROM MSC_ALLOC_SUPPLIES SA
7492: WHERE SA.PLAN_ID = p_plan_id
7493: AND SA.allocated_quantity <> 0
7494: AND SA.REFRESH_NUMBER BETWEEN (p_last_refresh_number + 1) and p_new_refresh_number
7495: )

Line 7656: FROM MSC_ALLOC_SUPPLIES SA

7652: TRUNC(SA.supply_date) SD_DATE,
7653: decode(SA.ALLOCATED_QUANTITY, -- Consider deleted stealing records as dummy demands
7654: 0, -1 * OLD_ALLOCATED_QUANTITY, -- For summary enhancement
7655: SA.ALLOCATED_QUANTITY) SD_QTY
7656: FROM MSC_ALLOC_SUPPLIES SA
7657: WHERE SA.PLAN_ID = p_plan_id
7658: AND SA.REFRESH_NUMBER BETWEEN (p_last_refresh_number + 1) and p_new_refresh_number
7659: )
7660: GROUP BY inventory_item_id, organization_id, sr_instance_id, demand_class, sd_date;