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=>'MSC',tabname=>'MSC_ALLOC_DEMANDS',
5080: partname=>'ALLOC_DEMANDS_999999',
5081: granularity=>'PARTITION',
5082: percent =>10);

Line 5079: fnd_stats.gather_table_stats(ownname=>'MSC',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=>'MSC',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 6219: msc_util.msc_log('inserted reservation rows in msc_alloc_demands :' || SQL%ROWCOUNT);

6215: where plan_id = p_plan_id
6216: and origination_type in (30,6)
6217: and RESERVED_QUANTITY <> 0
6218: );
6219: msc_util.msc_log('inserted reservation rows in msc_alloc_demands :' || SQL%ROWCOUNT);
6220:
6221: BEGIN
6222: update msc_plans
6223: set summary_flag = 3

Line 6934: FROM MSC_ALLOC_DEMANDS AD

6930: p_sys_date last_update_date,
6931: l_user_id last_updated_by,
6932: p_sys_date creation_date,
6933: l_user_id created_by
6934: FROM MSC_ALLOC_DEMANDS AD
6935: WHERE AD.PLAN_ID = p_plan_id
6936: AND AD.allocated_quantity <> 0
6937: AND AD.refresh_number IS NULL -- consider only planning records in full summation - summary enhancement
6938:

Line 7190: FROM MSC_ALLOC_DEMANDS AD

7186: p_sys_date last_update_date,
7187: l_user_id last_updated_by,
7188: p_sys_date creation_date,
7189: l_user_id created_by
7190: FROM MSC_ALLOC_DEMANDS AD
7191: WHERE AD.PLAN_ID = p_plan_id
7192: AND AD.allocated_quantity <> 0
7193: AND AD.refresh_number IS NULL -- consider only planning records in full summation - summary enhancement
7194:

Line 7275: FROM MSC_ALLOC_DEMANDS AD

7271: p_sys_date last_update_date,
7272: l_user_id last_updated_by,
7273: p_sys_date creation_date,
7274: l_user_id created_by
7275: FROM MSC_ALLOC_DEMANDS AD
7276: WHERE AD.PLAN_ID = p_plan_id
7277: AND AD.allocated_quantity <> 0
7278: AND AD.refresh_number IS NULL -- consider only planning records in full summation - summary enhancement
7279:

Line 7451: FROM MSC_ALLOC_DEMANDS AD

7447: TRUNC(AD.demand_date) SD_DATE,
7448: decode(AD.allocated_quantity,
7449: 0, AD.old_allocated_quantity,
7450: -1 * AD.allocated_quantity) SD_QTY
7451: FROM MSC_ALLOC_DEMANDS AD
7452: WHERE AD.PLAN_ID = p_plan_id
7453: AND AD.REFRESH_NUMBER BETWEEN (p_last_refresh_number + 1) and p_new_refresh_number
7454:
7455: UNION ALL

Line 7613: FROM MSC_ALLOC_DEMANDS AD

7609: TRUNC(AD.demand_date) SD_DATE,
7610: decode(AD.allocated_quantity,
7611: 0, AD.old_allocated_quantity,
7612: -1 * AD.allocated_quantity) SD_QTY
7613: FROM MSC_ALLOC_DEMANDS AD
7614: WHERE AD.PLAN_ID = p_plan_id
7615: AND AD.REFRESH_NUMBER BETWEEN (p_last_refresh_number + 1) and p_new_refresh_number
7616:
7617: UNION ALL