DBA Data[Home] [Help]

APPS.MSC_POST_PRO dependencies on MSC_ALLOC_DEMANDS

Line 4301: DELETE MSC_ALLOC_DEMANDS where plan_id = p_plan_id;

4297:
4298: -- first delete the existing data from tables
4299: msc_util.msc_log('before deleteing data from the table');
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');

Line 4302: msc_util.msc_log('After deleting data from MSC_ALLOC_DEMANDS table');

4298: -- first delete the existing data from tables
4299: msc_util.msc_log('before deleteing data from the table');
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:

Line 4312: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_DEMANDS(

4308: -- 2566795
4309: -- 2623646 Modified to join with msc_trading_partners/ msc_calendar_dates
4310: -- to move demand on non-working day to prior working day.
4311:
4312: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_DEMANDS(
4313: plan_id,
4314: inventory_item_id,
4315: organization_id,
4316: sr_instance_id,

Line 4491: msc_util.msc_log('After inserting in msc_alloc_demands part 1');

4487: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
4488: msc_util.msc_log('After executing the cursor');
4489:
4490: msc_util.msc_log('rows processed: ' || rows_processed);
4491: msc_util.msc_log('After inserting in msc_alloc_demands part 1');
4492:
4493: -- 2623646 Modified to join with msc_trading_partners/ msc_calendar_dates
4494: -- to move demand on non-working day to prior working day.
4495:

Line 4506: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_DEMANDS(

4502: * o If the supply pegged to the demand does not have a demand class present, allocate the demand
4503: * to 'OTHER'.
4504: * Else: Allocate the demand to 'OTHER'*/
4505: IF l_excess_supply_by_dc = 'Y' THEN
4506: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_DEMANDS(
4507: plan_id,
4508: inventory_item_id,
4509: organization_id,
4510: sr_instance_id,

Line 4614: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_DEMANDS(

4610: :l_user_id,
4611: :l_sysdate,
4612: pegging_v.request_date)';
4613: ELSE
4614: l_sql_stmt_1 := 'INSERT INTO MSC_ALLOC_DEMANDS(
4615: plan_id,
4616: inventory_item_id,
4617: organization_id,
4618: sr_instance_id,

Line 4741: msc_util.msc_log('after inserting item data into MSC_ALLOC_DEMANDS tables');

4737: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
4738: msc_util.msc_log('After executing the cursor');
4739:
4740: msc_util.msc_log('rows processed: ' || rows_processed);
4741: msc_util.msc_log('after inserting item data into MSC_ALLOC_DEMANDS tables');
4742:
4743: /* ------------------------------------------------------------------ */
4744:
4745: -- 2623646 Modified to join with msc_trading_partners/ msc_calendar_dates

Line 5078: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_DEMANDS');

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',
5081: granularity=>'PARTITION',
5082: percent =>10);

Line 5079: fnd_stats.gather_table_stats(ownname=>l_msc_schema,tabname=>'MSC_ALLOC_DEMANDS',

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',
5081: granularity=>'PARTITION',
5082: percent =>10);
5083:

Line 5105: AND t.table_name = 'MSC_ALLOC_DEMANDS'

5101: -- dba_part_indexes i
5102: FROM all_tab_partitions t,
5103: all_part_indexes i
5104: WHERE t.table_owner = l_msc_schema
5105: AND t.table_name = 'MSC_ALLOC_DEMANDS'
5106: AND t.partition_name = 'ALLOC_DEMANDS_' || to_char(l_plan_id)
5107: AND i.owner (+) = t.table_owner
5108: AND i.table_name (+) = t.table_name
5109: AND rownum = 1;

Line 5118: || ' as select * from MSC_ALLOC_DEMANDS where 1=2 ';

5114: --bug 6113544
5115: l_insert_stmt := 'CREATE TABLE ' || l_temp_table
5116: || ' TABLESPACE ' || l_tbspace
5117: || ' PCTFREE 0 STORAGE(INITIAL 40K NEXT 5M PCTINCREASE 0)'
5118: || ' as select * from MSC_ALLOC_DEMANDS where 1=2 ';
5119:
5120: /*
5121: l_insert_stmt := 'CREATE TABLE ' || l_temp_table || '(
5122: PLAN_ID NUMBER NOT NULL,

Line 6132: msc_util.msc_log('Partition name for msc_alloc_demands table : ' || l_partition_name);

6128:
6129: msc_util.msc_log('swap partition for demands');
6130: l_partition_name := 'ALLOC_DEMANDS_' || to_char(l_plan_id);
6131:
6132: msc_util.msc_log('Partition name for msc_alloc_demands table : ' || l_partition_name);
6133:
6134: -- swap partiton for supplies and demand part
6135:
6136: l_sql_stmt := 'ALTER TABLE msc_alloc_demands EXCHANGE PARTITION ' || l_partition_name ||

Line 6136: l_sql_stmt := 'ALTER TABLE msc_alloc_demands EXCHANGE PARTITION ' || l_partition_name ||

6132: msc_util.msc_log('Partition name for msc_alloc_demands table : ' || l_partition_name);
6133:
6134: -- swap partiton for supplies and demand part
6135:
6136: l_sql_stmt := 'ALTER TABLE msc_alloc_demands EXCHANGE PARTITION ' || l_partition_name ||
6137: ' with table MSC_TEMP_ALLOC_DEM_'|| to_char(l_plan_id) ||
6138: ' including indexes without validation';
6139:
6140: BEGIN

Line 6141: msc_util.msc_log('Before alter table msc_alloc_demands');

6137: ' with table MSC_TEMP_ALLOC_DEM_'|| to_char(l_plan_id) ||
6138: ' including indexes without validation';
6139:
6140: BEGIN
6141: msc_util.msc_log('Before alter table msc_alloc_demands');
6142: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
6143: APPLICATION_SHORT_NAME => 'MSC',
6144: STATEMENT_TYPE => ad_ddl.alter_table,
6145: STATEMENT => l_sql_stmt,

Line 6146: OBJECT_NAME => 'MSC_ALLOC_DEMANDS');

6142: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
6143: APPLICATION_SHORT_NAME => 'MSC',
6144: STATEMENT_TYPE => ad_ddl.alter_table,
6145: STATEMENT => l_sql_stmt,
6146: OBJECT_NAME => 'MSC_ALLOC_DEMANDS');
6147: END;
6148:
6149: msc_util.msc_log('swap partition for supplies');
6150: l_partition_name := 'ALLOC_SUPPLIES_' || to_char(l_plan_id);

Line 6177: --insert reservation_records to msc_alloc_demands.

6173:
6174: END IF; -- IF l_share_partition = 'Y'
6175:
6176: --5027568
6177: --insert reservation_records to msc_alloc_demands.
6178: msc_util.msc_log('inserting reservation rows in msc_alloc_demands');
6179: INSERT INTO MSC_ALLOC_DEMANDS(
6180: plan_id,
6181: inventory_item_id,

Line 6178: msc_util.msc_log('inserting reservation rows in msc_alloc_demands');

6174: END IF; -- IF l_share_partition = 'Y'
6175:
6176: --5027568
6177: --insert reservation_records to msc_alloc_demands.
6178: msc_util.msc_log('inserting reservation rows in msc_alloc_demands');
6179: INSERT INTO MSC_ALLOC_DEMANDS(
6180: plan_id,
6181: inventory_item_id,
6182: organization_id,

Line 6179: INSERT INTO MSC_ALLOC_DEMANDS(

6175:
6176: --5027568
6177: --insert reservation_records to msc_alloc_demands.
6178: msc_util.msc_log('inserting reservation rows in msc_alloc_demands');
6179: INSERT INTO MSC_ALLOC_DEMANDS(
6180: plan_id,
6181: inventory_item_id,
6182: organization_id,
6183: sr_instance_id,

Line 6227: msc_util.msc_log('inserted reservation rows in msc_alloc_demands :' || SQL%ROWCOUNT);

6223: where plan_id = p_plan_id
6224: and origination_type = -100
6225: and using_requirement_quantity <> 0
6226: );
6227: msc_util.msc_log('inserted reservation rows in msc_alloc_demands :' || SQL%ROWCOUNT);
6228:
6229: BEGIN
6230: update msc_plans
6231: set summary_flag = 3

Line 6963: FROM MSC_ALLOC_DEMANDS AD

6959: p_sys_date last_update_date,
6960: l_user_id last_updated_by,
6961: p_sys_date creation_date,
6962: l_user_id created_by
6963: FROM MSC_ALLOC_DEMANDS AD
6964: WHERE AD.PLAN_ID = p_plan_id
6965: AND AD.allocated_quantity <> 0
6966: AND AD.refresh_number IS NULL -- consider only planning records in full summation - summary enhancement
6967:

Line 7219: FROM MSC_ALLOC_DEMANDS AD

7215: p_sys_date last_update_date,
7216: l_user_id last_updated_by,
7217: p_sys_date creation_date,
7218: l_user_id created_by
7219: FROM MSC_ALLOC_DEMANDS AD
7220: WHERE AD.PLAN_ID = p_plan_id
7221: AND AD.allocated_quantity <> 0
7222: AND AD.refresh_number IS NULL -- consider only planning records in full summation - summary enhancement
7223:

Line 7304: FROM MSC_ALLOC_DEMANDS AD

7300: p_sys_date last_update_date,
7301: l_user_id last_updated_by,
7302: p_sys_date creation_date,
7303: l_user_id created_by
7304: FROM MSC_ALLOC_DEMANDS AD
7305: WHERE AD.PLAN_ID = p_plan_id
7306: AND AD.allocated_quantity <> 0
7307: AND AD.refresh_number IS NULL -- consider only planning records in full summation - summary enhancement
7308:

Line 7480: FROM MSC_ALLOC_DEMANDS AD

7476: TRUNC(AD.demand_date) SD_DATE,
7477: decode(AD.allocated_quantity,
7478: 0, AD.old_allocated_quantity,
7479: -1 * AD.allocated_quantity) SD_QTY
7480: FROM MSC_ALLOC_DEMANDS AD
7481: WHERE AD.PLAN_ID = p_plan_id
7482: AND AD.REFRESH_NUMBER BETWEEN (p_last_refresh_number + 1) and p_new_refresh_number
7483:
7484: UNION ALL

Line 7642: FROM MSC_ALLOC_DEMANDS AD

7638: TRUNC(AD.demand_date) SD_DATE,
7639: decode(AD.allocated_quantity,
7640: 0, AD.old_allocated_quantity,
7641: -1 * AD.allocated_quantity) SD_QTY
7642: FROM MSC_ALLOC_DEMANDS AD
7643: WHERE AD.PLAN_ID = p_plan_id
7644: AND AD.REFRESH_NUMBER BETWEEN (p_last_refresh_number + 1) and p_new_refresh_number
7645:
7646: UNION ALL