DBA Data[Home] [Help]

APPS.MSC_ATP_PF dependencies on MSC_UTIL

Line 8882: msc_util.msc_log('*********Begin procedure Populate_ATF_Dates ********');

8878: --bug3663487 end
8879:
8880: BEGIN
8881: IF PG_DEBUG in ('Y', 'C') THEN
8882: msc_util.msc_log('*********Begin procedure Populate_ATF_Dates ********');
8883: msc_util.msc_log('Populate_ATF_Dates: ' || 'p_plan_id = ' ||to_char(p_plan_id));
8884: END IF;
8885:
8886: -- initialize API return status to success

Line 8883: msc_util.msc_log('Populate_ATF_Dates: ' || 'p_plan_id = ' ||to_char(p_plan_id));

8879:
8880: BEGIN
8881: IF PG_DEBUG in ('Y', 'C') THEN
8882: msc_util.msc_log('*********Begin procedure Populate_ATF_Dates ********');
8883: msc_util.msc_log('Populate_ATF_Dates: ' || 'p_plan_id = ' ||to_char(p_plan_id));
8884: END IF;
8885:
8886: -- initialize API return status to success
8887: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 8927: msc_util.msc_log('Populate_ATF_Dates: ' || 'l_inventory_item_id.COUNT = ' ||l_inventory_item_id.COUNT);

8923: AND c2.calendar_code = c1.calendar_code
8924: AND c2.exception_set_id = -1;
8925:
8926: IF PG_DEBUG in ('Y', 'C') THEN
8927: msc_util.msc_log('Populate_ATF_Dates: ' || 'l_inventory_item_id.COUNT = ' ||l_inventory_item_id.COUNT);
8928: END IF;
8929:
8930: IF l_inventory_item_id IS NOT NULL AND l_inventory_item_id.COUNT > 0 THEN
8931:

Line 9023: msc_util.msc_log('Populate_ATF_Dates: ' || 'Member Count = ' ||to_char(x_member_count));

9019: );
9020: */
9021:
9022: IF PG_DEBUG in ('Y', 'C') THEN
9023: msc_util.msc_log('Populate_ATF_Dates: ' || 'Member Count = ' ||to_char(x_member_count));
9024: msc_util.msc_log('*********End of procedure Populate_ATF_Dates ********');
9025: END IF;
9026:
9027: EXCEPTION

Line 9024: msc_util.msc_log('*********End of procedure Populate_ATF_Dates ********');

9020: */
9021:
9022: IF PG_DEBUG in ('Y', 'C') THEN
9023: msc_util.msc_log('Populate_ATF_Dates: ' || 'Member Count = ' ||to_char(x_member_count));
9024: msc_util.msc_log('*********End of procedure Populate_ATF_Dates ********');
9025: END IF;
9026:
9027: EXCEPTION
9028: WHEN OTHERS THEN

Line 9030: msc_util.msc_log('Populate_ATF_Dates: ' || 'Exception: ' || sqlerrm);

9026:
9027: EXCEPTION
9028: WHEN OTHERS THEN
9029: IF PG_DEBUG in ('Y', 'C') THEN
9030: msc_util.msc_log('Populate_ATF_Dates: ' || 'Exception: ' || sqlerrm);
9031: msc_util.msc_log('Populate_ATF_Dates: ' || 'Error code:' || to_char(sqlcode));
9032: END IF;
9033: x_return_status := FND_API.G_RET_STS_ERROR;
9034:

Line 9031: msc_util.msc_log('Populate_ATF_Dates: ' || 'Error code:' || to_char(sqlcode));

9027: EXCEPTION
9028: WHEN OTHERS THEN
9029: IF PG_DEBUG in ('Y', 'C') THEN
9030: msc_util.msc_log('Populate_ATF_Dates: ' || 'Exception: ' || sqlerrm);
9031: msc_util.msc_log('Populate_ATF_Dates: ' || 'Error code:' || to_char(sqlcode));
9032: END IF;
9033: x_return_status := FND_API.G_RET_STS_ERROR;
9034:
9035: END Populate_ATF_Dates;

Line 9081: msc_util.msc_log('*********Begin procedure Calculate_Alloc_Percentages ********');

9077:
9078:
9079: BEGIN
9080: IF PG_DEBUG in ('Y', 'C') THEN
9081: msc_util.msc_log('*********Begin procedure Calculate_Alloc_Percentages ********');
9082: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'p_plan_id = ' ||to_char(p_plan_id));
9083: END IF;
9084:
9085: -- initialize API return status to success

Line 9082: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'p_plan_id = ' ||to_char(p_plan_id));

9078:
9079: BEGIN
9080: IF PG_DEBUG in ('Y', 'C') THEN
9081: msc_util.msc_log('*********Begin procedure Calculate_Alloc_Percentages ********');
9082: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'p_plan_id = ' ||to_char(p_plan_id));
9083: END IF;
9084:
9085: -- initialize API return status to success
9086: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 9144: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Row Count in MSC_ALLOC_TEMP = '|| SQL%ROWCOUNT);

9140: where mat2.transaction_id = mat1.transaction_id
9141: );
9142:
9143: IF PG_DEBUG in ('Y', 'C') THEN
9144: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Row Count in MSC_ALLOC_TEMP = '|| SQL%ROWCOUNT);
9145: msc_util.msc_log('*********End of procedure Calculate_Alloc_Percentages ********');
9146: END IF;
9147:
9148: EXCEPTION

Line 9145: msc_util.msc_log('*********End of procedure Calculate_Alloc_Percentages ********');

9141: );
9142:
9143: IF PG_DEBUG in ('Y', 'C') THEN
9144: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Row Count in MSC_ALLOC_TEMP = '|| SQL%ROWCOUNT);
9145: msc_util.msc_log('*********End of procedure Calculate_Alloc_Percentages ********');
9146: END IF;
9147:
9148: EXCEPTION
9149: WHEN OTHERS THEN

Line 9151: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Exception: ' || sqlerrm);

9147:
9148: EXCEPTION
9149: WHEN OTHERS THEN
9150: IF PG_DEBUG in ('Y', 'C') THEN
9151: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Exception: ' || sqlerrm);
9152: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Error code:' || to_char(sqlcode));
9153: END IF;
9154: x_return_status := FND_API.G_RET_STS_ERROR;
9155:

Line 9152: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Error code:' || to_char(sqlcode));

9148: EXCEPTION
9149: WHEN OTHERS THEN
9150: IF PG_DEBUG in ('Y', 'C') THEN
9151: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Exception: ' || sqlerrm);
9152: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Error code:' || to_char(sqlcode));
9153: END IF;
9154: x_return_status := FND_API.G_RET_STS_ERROR;
9155:
9156: END Calculate_Alloc_Percentages;

Line 9237: msc_util.msc_log('*********Begin procedure Pf_Post_Plan_Proc ********');

9233: l_yes VARCHAR2(1) := 'Y';
9234: l_excess_dc VARCHAR2(30) := '-2';
9235:
9236: BEGIN
9237: msc_util.msc_log('*********Begin procedure Pf_Post_Plan_Proc ********');
9238:
9239: --project atp
9240: l_excess_supply_by_dc := NVL(FND_PROFILE.VALUE('MSC_EXCESS_SUPPLY_BY_DC'), 'N');
9241: msc_util.msc_log('l_excess_supply_by_dc := ' || l_excess_supply_by_dc);

Line 9241: msc_util.msc_log('l_excess_supply_by_dc := ' || l_excess_supply_by_dc);

9237: msc_util.msc_log('*********Begin procedure Pf_Post_Plan_Proc ********');
9238:
9239: --project atp
9240: l_excess_supply_by_dc := NVL(FND_PROFILE.VALUE('MSC_EXCESS_SUPPLY_BY_DC'), 'N');
9241: msc_util.msc_log('l_excess_supply_by_dc := ' || l_excess_supply_by_dc);
9242:
9243: BEGIN
9244: msc_util.msc_log('Calling custom procedure MSC_ATP_CUSTOM.Custom_Pre_Allocation...');
9245: MSC_ATP_CUSTOM.Custom_Pre_Allocation(p_plan_id);

Line 9244: msc_util.msc_log('Calling custom procedure MSC_ATP_CUSTOM.Custom_Pre_Allocation...');

9240: l_excess_supply_by_dc := NVL(FND_PROFILE.VALUE('MSC_EXCESS_SUPPLY_BY_DC'), 'N');
9241: msc_util.msc_log('l_excess_supply_by_dc := ' || l_excess_supply_by_dc);
9242:
9243: BEGIN
9244: msc_util.msc_log('Calling custom procedure MSC_ATP_CUSTOM.Custom_Pre_Allocation...');
9245: MSC_ATP_CUSTOM.Custom_Pre_Allocation(p_plan_id);
9246: msc_util.msc_log('End MSC_ATP_CUSTOM.Custom_Pre_Allocation.');
9247: EXCEPTION
9248: WHEN OTHERS THEN

Line 9246: msc_util.msc_log('End MSC_ATP_CUSTOM.Custom_Pre_Allocation.');

9242:
9243: BEGIN
9244: msc_util.msc_log('Calling custom procedure MSC_ATP_CUSTOM.Custom_Pre_Allocation...');
9245: MSC_ATP_CUSTOM.Custom_Pre_Allocation(p_plan_id);
9246: msc_util.msc_log('End MSC_ATP_CUSTOM.Custom_Pre_Allocation.');
9247: EXCEPTION
9248: WHEN OTHERS THEN
9249: msc_util.msc_log('Error in custom procedure call');
9250: msc_util.msc_log('Error Code: '|| sqlerrm);

Line 9249: msc_util.msc_log('Error in custom procedure call');

9245: MSC_ATP_CUSTOM.Custom_Pre_Allocation(p_plan_id);
9246: msc_util.msc_log('End MSC_ATP_CUSTOM.Custom_Pre_Allocation.');
9247: EXCEPTION
9248: WHEN OTHERS THEN
9249: msc_util.msc_log('Error in custom procedure call');
9250: msc_util.msc_log('Error Code: '|| sqlerrm);
9251: END;
9252: --project atp
9253:

Line 9250: msc_util.msc_log('Error Code: '|| sqlerrm);

9246: msc_util.msc_log('End MSC_ATP_CUSTOM.Custom_Pre_Allocation.');
9247: EXCEPTION
9248: WHEN OTHERS THEN
9249: msc_util.msc_log('Error in custom procedure call');
9250: msc_util.msc_log('Error Code: '|| sqlerrm);
9251: END;
9252: --project atp
9253:
9254: msc_util.msc_log('begin Loading pre-allocation demand/supply data for plan: ' || p_plan_id);

Line 9254: msc_util.msc_log('begin Loading pre-allocation demand/supply data for plan: ' || p_plan_id);

9250: msc_util.msc_log('Error Code: '|| sqlerrm);
9251: END;
9252: --project atp
9253:
9254: msc_util.msc_log('begin Loading pre-allocation demand/supply data for plan: ' || p_plan_id);
9255: RETCODE := G_SUCCESS;
9256:
9257: l_share_partition := fnd_profile.value('MSC_SHARE_PARTITIONS');
9258:

Line 9259: msc_util.msc_log('l_share_partition := ' || l_share_partition);

9255: RETCODE := G_SUCCESS;
9256:
9257: l_share_partition := fnd_profile.value('MSC_SHARE_PARTITIONS');
9258:
9259: msc_util.msc_log('l_share_partition := ' || l_share_partition);
9260:
9261: SELECT NVL(summary_flag,1), compile_designator
9262: INTO l_summary_flag, l_plan_name
9263: FROM msc_plans

Line 9267: msc_util.msc_log('Another session is running post-plan allocation program for this plan');

9263: FROM msc_plans
9264: WHERE plan_id = p_plan_id;
9265:
9266: IF NVL(l_summary_flag,1) = 2 THEN
9267: msc_util.msc_log('Another session is running post-plan allocation program for this plan');
9268: RETCODE := G_ERROR;
9269: RETURN;
9270: END IF;
9271:

Line 9295: msc_util.msc_log('l_partition_name := ' || l_partition_name);

9291: l_plan_id := p_plan_id;
9292: END IF;
9293:
9294: l_partition_name := atp_summ_tab(i)|| '_' || l_plan_id;
9295: msc_util.msc_log('l_partition_name := ' || l_partition_name);
9296:
9297: BEGIN
9298: SELECT count(*)
9299: INTO l_count

Line 9306: msc_util.msc_log('Inside Exception');

9302: AND partition_name = l_partition_name
9303: AND table_owner = l_msc_schema;
9304: EXCEPTION
9305: WHEN OTHERS THEN
9306: msc_util.msc_log('Inside Exception');
9307: l_count := 0;
9308: END;
9309:
9310: IF (l_count = 0) THEN

Line 9314: msc_util.msc_log(FND_MESSAGE.GET);

9310: IF (l_count = 0) THEN
9311: FND_MESSAGE.SET_NAME('MSC', 'MSC_ATP_PLAN_PARTITION_MISSING');
9312: FND_MESSAGE.SET_TOKEN('PLAN_NAME', l_plan_name);
9313: FND_MESSAGE.SET_TOKEN('TABLE_NAME', 'MSC_' || atp_summ_tab(i));
9314: msc_util.msc_log(FND_MESSAGE.GET);
9315: RETCODE := G_ERROR;
9316: RETURN;
9317: END IF;
9318: END LOOP;

Line 9332: msc_util.msc_log('l_share_partition := ' || l_share_partition);

9328: RETCODE := G_ERROR;
9329: RETURN;
9330: END;
9331:
9332: msc_util.msc_log('l_share_partition := ' || l_share_partition);
9333:
9334: BEGIN
9335: SELECT NVL(pre_alloc_hash_size, -1),
9336: NVL(pre_alloc_sort_size, -1),

Line 9345: msc_util.msc_log('Error getting performance param: ' || sqlcode || ': ' || sqlerrm);

9341: FROM msc_atp_parameters
9342: WHERE rownum = 1;
9343: EXCEPTION
9344: WHEN others THEN
9345: msc_util.msc_log('Error getting performance param: ' || sqlcode || ': ' || sqlerrm);
9346: l_hash_size := -1;
9347: l_sort_size := -1;
9348: l_parallel_degree := 1;
9349: END;

Line 9351: msc_util.msc_log('Hash: ' || l_hash_size || ' Sort: ' || l_sort_size || ' Parallel: ' || l_parallel_degree);

9347: l_sort_size := -1;
9348: l_parallel_degree := 1;
9349: END;
9350:
9351: msc_util.msc_log('Hash: ' || l_hash_size || ' Sort: ' || l_sort_size || ' Parallel: ' || l_parallel_degree);
9352:
9353: IF NVL(l_hash_size, -1) <> -1 THEN
9354: l_sql_stmt_1 := 'alter session set hash_area_size = ' || to_char(l_hash_size);
9355: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);

Line 9355: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);

9351: msc_util.msc_log('Hash: ' || l_hash_size || ' Sort: ' || l_sort_size || ' Parallel: ' || l_parallel_degree);
9352:
9353: IF NVL(l_hash_size, -1) <> -1 THEN
9354: l_sql_stmt_1 := 'alter session set hash_area_size = ' || to_char(l_hash_size);
9355: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);
9356: execute immediate l_sql_stmt_1;
9357: END IF;
9358:
9359: IF NVL(l_sort_size, -1) <> -1 THEN

Line 9361: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);

9357: END IF;
9358:
9359: IF NVL(l_sort_size, -1) <> -1 THEN
9360: l_sql_stmt_1 := 'alter session set sort_area_size = ' || to_char(l_sort_size);
9361: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);
9362: execute immediate l_sql_stmt_1;
9363: END IF;
9364:
9365: /* forecast at PF changes begin

Line 9370: msc_util.msc_log('temp table : ' || l_alloc_temp_table);

9366: Changes to populate demand class allocation information in a temp table*/
9367: IF p_demand_priority = 'Y' THEN
9368: l_alloc_temp_table := 'MSC_ALLOC_TEMP_' || to_char(p_plan_id);
9369:
9370: msc_util.msc_log('temp table : ' || l_alloc_temp_table);
9371:
9372: /* Create temp table in tablespace of MSC_ALLOC_DEMANDS*/
9373: SELECT t.tablespace_name, NVL(i.def_tablespace_name, t.tablespace_name)
9374: INTO l_tbspace, l_ind_tbspace

Line 9384: msc_util.msc_log('tb space : ' || l_tbspace);

9380: AND i.owner (+) = t.table_owner
9381: AND i.table_name (+) = t.table_name
9382: AND rownum = 1;
9383:
9384: msc_util.msc_log('tb space : ' || l_tbspace);
9385: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);
9386:
9387: l_insert_stmt := 'CREATE TABLE ' || l_alloc_temp_table || '(
9388: PEGGING_ID NUMBER,

Line 9385: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);

9381: AND i.table_name (+) = t.table_name
9382: AND rownum = 1;
9383:
9384: msc_util.msc_log('tb space : ' || l_tbspace);
9385: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);
9386:
9387: l_insert_stmt := 'CREATE TABLE ' || l_alloc_temp_table || '(
9388: PEGGING_ID NUMBER,
9389: DEMAND_CLASS VARCHAR2(30),

Line 9394: msc_util.msc_log('before creating table : ' || l_alloc_temp_table);

9390: ALLOCATION_PERCENT NUMBER)
9391: TABLESPACE ' || l_tbspace || '
9392: PCTFREE 0 STORAGE(INITIAL 40K NEXT 5M PCTINCREASE 0)';
9393:
9394: msc_util.msc_log('before creating table : ' || l_alloc_temp_table);
9395:
9396: BEGIN
9397: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9398: APPLICATION_SHORT_NAME => 'MSC',

Line 9402: msc_util.msc_log('after creating table : ' || l_alloc_temp_table);

9398: APPLICATION_SHORT_NAME => 'MSC',
9399: STATEMENT_TYPE => ad_ddl.create_table,
9400: STATEMENT => l_insert_stmt,
9401: OBJECT_NAME => l_alloc_temp_table);
9402: msc_util.msc_log('after creating table : ' || l_alloc_temp_table);
9403:
9404: EXCEPTION
9405: WHEN others THEN
9406: msc_util.msc_log(sqlcode || ': ' || sqlerrm);

Line 9406: msc_util.msc_log(sqlcode || ': ' || sqlerrm);

9402: msc_util.msc_log('after creating table : ' || l_alloc_temp_table);
9403:
9404: EXCEPTION
9405: WHEN others THEN
9406: msc_util.msc_log(sqlcode || ': ' || sqlerrm);
9407: msc_util.msc_log('Exception of create table : ' || l_alloc_temp_table);
9408:
9409: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9410: APPLICATION_SHORT_NAME => 'MSC',

Line 9407: msc_util.msc_log('Exception of create table : ' || l_alloc_temp_table);

9403:
9404: EXCEPTION
9405: WHEN others THEN
9406: msc_util.msc_log(sqlcode || ': ' || sqlerrm);
9407: msc_util.msc_log('Exception of create table : ' || l_alloc_temp_table);
9408:
9409: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9410: APPLICATION_SHORT_NAME => 'MSC',
9411: STATEMENT_TYPE => ad_ddl.drop_table,

Line 9415: msc_util.msc_log('After Drop table : ' ||l_alloc_temp_table);

9411: STATEMENT_TYPE => ad_ddl.drop_table,
9412: STATEMENT => 'DROP TABLE ' || l_alloc_temp_table,
9413: OBJECT_NAME => l_alloc_temp_table);
9414:
9415: msc_util.msc_log('After Drop table : ' ||l_alloc_temp_table);
9416: msc_util.msc_log('Before exception create table : ' ||l_alloc_temp_table);
9417:
9418: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9419: APPLICATION_SHORT_NAME => 'MSC',

Line 9416: msc_util.msc_log('Before exception create table : ' ||l_alloc_temp_table);

9412: STATEMENT => 'DROP TABLE ' || l_alloc_temp_table,
9413: OBJECT_NAME => l_alloc_temp_table);
9414:
9415: msc_util.msc_log('After Drop table : ' ||l_alloc_temp_table);
9416: msc_util.msc_log('Before exception create table : ' ||l_alloc_temp_table);
9417:
9418: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9419: APPLICATION_SHORT_NAME => 'MSC',
9420: STATEMENT_TYPE => ad_ddl.create_table,

Line 9424: msc_util.msc_log('After exception create table : ' ||l_alloc_temp_table);

9420: STATEMENT_TYPE => ad_ddl.create_table,
9421: STATEMENT => l_insert_stmt,
9422: OBJECT_NAME => l_alloc_temp_table);
9423:
9424: msc_util.msc_log('After exception create table : ' ||l_alloc_temp_table);
9425: END;
9426:
9427: Calculate_Alloc_Percentages(p_plan_id, l_return_status);
9428:

Line 9431: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Calculate_Alloc_Percentages');

9427: Calculate_Alloc_Percentages(p_plan_id, l_return_status);
9428:
9429: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9430: IF PG_DEBUG in ('Y', 'C') THEN
9431: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Calculate_Alloc_Percentages');
9432: END IF;
9433: RAISE FND_API.G_EXC_ERROR;
9434: END IF;
9435:

Line 9436: msc_util.msc_log('Before generating the SQL');

9432: END IF;
9433: RAISE FND_API.G_EXC_ERROR;
9434: END IF;
9435:
9436: msc_util.msc_log('Before generating the SQL');
9437:
9438: l_insert_stmt := 'insert into '|| l_alloc_temp_table ||'(
9439: pegging_id,
9440: demand_class,

Line 9468: msc_util.msc_log(l_insert_stmt);

9464: and peg1.plan_id = d.plan_id
9465: and d.disposition_id = mat.transaction_id (+)
9466: )';
9467:
9468: msc_util.msc_log(l_insert_stmt);
9469: msc_util.msc_log('After generating the SQL');
9470:
9471: -- Obtain cursor handler for sql_stmt
9472: cur_handler := DBMS_SQL.OPEN_CURSOR;

Line 9469: msc_util.msc_log('After generating the SQL');

9465: and d.disposition_id = mat.transaction_id (+)
9466: )';
9467:
9468: msc_util.msc_log(l_insert_stmt);
9469: msc_util.msc_log('After generating the SQL');
9470:
9471: -- Obtain cursor handler for sql_stmt
9472: cur_handler := DBMS_SQL.OPEN_CURSOR;
9473:

Line 9476: msc_util.msc_log('After parsing the SQL');

9472: cur_handler := DBMS_SQL.OPEN_CURSOR;
9473:
9474: DBMS_SQL.PARSE(cur_handler, l_insert_stmt, DBMS_SQL.NATIVE);
9475:
9476: msc_util.msc_log('After parsing the SQL');
9477:
9478: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_excess_dc', l_excess_dc);
9479: DBMS_SQL.BIND_VARIABLE(cur_handler, ':p_plan_id', p_plan_id);
9480:

Line 9481: msc_util.msc_log('after binding the variables');

9477:
9478: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_excess_dc', l_excess_dc);
9479: DBMS_SQL.BIND_VARIABLE(cur_handler, ':p_plan_id', p_plan_id);
9480:
9481: msc_util.msc_log('after binding the variables');
9482:
9483: -- Execute the cursor
9484: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9485:

Line 9486: msc_util.msc_log('After executing the cursor');

9482:
9483: -- Execute the cursor
9484: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9485:
9486: msc_util.msc_log('After executing the cursor');
9487:
9488: commit;
9489:
9490: msc_util.msc_log('before creating indexes on temp table');

Line 9490: msc_util.msc_log('before creating indexes on temp table');

9486: msc_util.msc_log('After executing the cursor');
9487:
9488: commit;
9489:
9490: msc_util.msc_log('before creating indexes on temp table');
9491:
9492: l_sql_stmt_1 := 'CREATE INDEX ' || l_alloc_temp_table || '_N1 ON ' || l_alloc_temp_table || '
9493: (pegging_id)
9494: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;

Line 9496: msc_util.msc_log('Before index : ' || l_alloc_temp_table || '.' || l_alloc_temp_table || '_N1');

9492: l_sql_stmt_1 := 'CREATE INDEX ' || l_alloc_temp_table || '_N1 ON ' || l_alloc_temp_table || '
9493: (pegging_id)
9494: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;
9495:
9496: msc_util.msc_log('Before index : ' || l_alloc_temp_table || '.' || l_alloc_temp_table || '_N1');
9497:
9498: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9499: APPLICATION_SHORT_NAME => 'MSC',
9500: STATEMENT_TYPE => ad_ddl.create_index,

Line 9504: msc_util.msc_log('After index : ' || l_alloc_temp_table || '.' || l_alloc_temp_table || '_N1');

9500: STATEMENT_TYPE => ad_ddl.create_index,
9501: STATEMENT => l_sql_stmt_1,
9502: OBJECT_NAME => l_alloc_temp_table);
9503:
9504: msc_util.msc_log('After index : ' || l_alloc_temp_table || '.' || l_alloc_temp_table || '_N1');
9505: msc_util.msc_log('Done creating indexes on temp table');
9506: msc_util.msc_log('Gather Table Stats');
9507:
9508: -- Use p_plan_id instead of l_plan_id

Line 9505: msc_util.msc_log('Done creating indexes on temp table');

9501: STATEMENT => l_sql_stmt_1,
9502: OBJECT_NAME => l_alloc_temp_table);
9503:
9504: msc_util.msc_log('After index : ' || l_alloc_temp_table || '.' || l_alloc_temp_table || '_N1');
9505: msc_util.msc_log('Done creating indexes on temp table');
9506: msc_util.msc_log('Gather Table Stats');
9507:
9508: -- Use p_plan_id instead of l_plan_id
9509: --fnd_stats.gather_table_stats('MSC', 'MSC_ALLOC_TEMP_' || to_char(l_plan_id), granularity => 'ALL');

Line 9506: msc_util.msc_log('Gather Table Stats');

9502: OBJECT_NAME => l_alloc_temp_table);
9503:
9504: msc_util.msc_log('After index : ' || l_alloc_temp_table || '.' || l_alloc_temp_table || '_N1');
9505: msc_util.msc_log('Done creating indexes on temp table');
9506: msc_util.msc_log('Gather Table Stats');
9507:
9508: -- Use p_plan_id instead of l_plan_id
9509: --fnd_stats.gather_table_stats('MSC', 'MSC_ALLOC_TEMP_' || to_char(l_plan_id), granularity => 'ALL');
9510: fnd_stats.gather_table_stats('MSC', l_alloc_temp_table, granularity => 'ALL');

Line 9516: msc_util.msc_log('Inside shared partition');

9512: /* forecast at PF changes end*/
9513:
9514: IF l_share_partition = 'Y' THEN
9515:
9516: msc_util.msc_log('Inside shared partition');
9517:
9518: -- first delete the existing data from tables
9519: msc_util.msc_log('before deleteing data from the table');
9520:

Line 9519: msc_util.msc_log('before deleteing data from the table');

9515:
9516: msc_util.msc_log('Inside shared partition');
9517:
9518: -- first delete the existing data from tables
9519: msc_util.msc_log('before deleteing data from the table');
9520:
9521: DELETE MSC_ALLOC_DEMANDS where plan_id = p_plan_id;
9522: msc_util.msc_log('After deleting data from MSC_ALLOC_DEMANDS table');
9523:

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

9518: -- first delete the existing data from tables
9519: msc_util.msc_log('before deleteing data from the table');
9520:
9521: DELETE MSC_ALLOC_DEMANDS where plan_id = p_plan_id;
9522: msc_util.msc_log('After deleting data from MSC_ALLOC_DEMANDS table');
9523:
9524: DELETE MSC_ALLOC_SUPPLIES where plan_id = p_plan_id;
9525: msc_util.msc_log('After deleting data from MSC_ALLOC_SUPPLIES table');
9526:

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

9521: DELETE MSC_ALLOC_DEMANDS where plan_id = p_plan_id;
9522: msc_util.msc_log('After deleting data from MSC_ALLOC_DEMANDS table');
9523:
9524: DELETE MSC_ALLOC_SUPPLIES where plan_id = p_plan_id;
9525: msc_util.msc_log('After deleting data from MSC_ALLOC_SUPPLIES table');
9526:
9527: /*--------------------------------------------------------------------------
9528: | <<<<<<<<<<<<<<<<<<<<<<< Begin Demands SQL1 >>>>>>>>>>>>>>>>>>>>>>>>>>>
9529: +-------------------------------------------------------------------------*/

Line 9530: msc_util.msc_log('Before generating Demands SQL1');

9526:
9527: /*--------------------------------------------------------------------------
9528: | <<<<<<<<<<<<<<<<<<<<<<< Begin Demands SQL1 >>>>>>>>>>>>>>>>>>>>>>>>>>>
9529: +-------------------------------------------------------------------------*/
9530: msc_util.msc_log('Before generating Demands SQL1');
9531:
9532: /* forecast at PF changes begin*/
9533: Prepare_Demands_Stmt(l_share_partition, p_demand_priority, l_excess_supply_by_dc,
9534: NULL, l_alloc_temp_table, l_parallel_degree, l_sql_stmt_1, l_return_status);

Line 9537: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Prepare_Demands_Stmt');

9533: Prepare_Demands_Stmt(l_share_partition, p_demand_priority, l_excess_supply_by_dc,
9534: NULL, l_alloc_temp_table, l_parallel_degree, l_sql_stmt_1, l_return_status);
9535: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9536: IF PG_DEBUG in ('Y', 'C') THEN
9537: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Prepare_Demands_Stmt');
9538: END IF;
9539: RAISE FND_API.G_EXC_ERROR;
9540: END IF;
9541:

Line 9542: msc_util.msc_log('After generating Demands SQL1');

9538: END IF;
9539: RAISE FND_API.G_EXC_ERROR;
9540: END IF;
9541:
9542: msc_util.msc_log('After generating Demands SQL1');
9543: msc_util.msc_log(l_sql_stmt_1);
9544:
9545: -- Obtain cursor handler for sql_stmt
9546: cur_handler := DBMS_SQL.OPEN_CURSOR;

Line 9543: msc_util.msc_log(l_sql_stmt_1);

9539: RAISE FND_API.G_EXC_ERROR;
9540: END IF;
9541:
9542: msc_util.msc_log('After generating Demands SQL1');
9543: msc_util.msc_log(l_sql_stmt_1);
9544:
9545: -- Obtain cursor handler for sql_stmt
9546: cur_handler := DBMS_SQL.OPEN_CURSOR;
9547:

Line 9549: msc_util.msc_log('After parsing Demands SQL1');

9545: -- Obtain cursor handler for sql_stmt
9546: cur_handler := DBMS_SQL.OPEN_CURSOR;
9547:
9548: DBMS_SQL.PARSE(cur_handler, l_sql_stmt_1, DBMS_SQL.NATIVE);
9549: msc_util.msc_log('After parsing Demands SQL1');
9550:
9551: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_user_id', l_user_id);
9552: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_sysdate', l_sysdate);
9553: DBMS_SQL.BIND_VARIABLE(cur_handler, ':p_plan_id', p_plan_id);

Line 9560: msc_util.msc_log('after binding the variables');

9556: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_excess_dc', l_excess_dc);
9557: DBMS_SQL.BIND_VARIABLE(cur_handler, ':p_excess_supply_by_dc', l_excess_supply_by_dc);
9558: DBMS_SQL.BIND_VARIABLE(cur_handler, ':def_num', '-1');
9559: END IF;
9560: msc_util.msc_log('after binding the variables');
9561:
9562: -- Execute the cursor
9563: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9564: msc_util.msc_log('After executing the cursor');

Line 9564: msc_util.msc_log('After executing the cursor');

9560: msc_util.msc_log('after binding the variables');
9561:
9562: -- Execute the cursor
9563: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9564: msc_util.msc_log('After executing the cursor');
9565:
9566: msc_util.msc_log('rows processed: ' || rows_processed);
9567: msc_util.msc_log('after inserting item data into MSC_ALLOC_DEMANDS tables');
9568:

Line 9566: msc_util.msc_log('rows processed: ' || rows_processed);

9562: -- Execute the cursor
9563: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9564: msc_util.msc_log('After executing the cursor');
9565:
9566: msc_util.msc_log('rows processed: ' || rows_processed);
9567: msc_util.msc_log('after inserting item data into MSC_ALLOC_DEMANDS tables');
9568:
9569: /*--------------------------------------------------------------------------
9570: | <<<<<<<<<<<<<<<<<<<<<<< Begin Supplies SQL1 >>>>>>>>>>>>>>>>>>>>>>>>>>>

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

9563: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9564: msc_util.msc_log('After executing the cursor');
9565:
9566: msc_util.msc_log('rows processed: ' || rows_processed);
9567: msc_util.msc_log('after inserting item data into MSC_ALLOC_DEMANDS tables');
9568:
9569: /*--------------------------------------------------------------------------
9570: | <<<<<<<<<<<<<<<<<<<<<<< Begin Supplies SQL1 >>>>>>>>>>>>>>>>>>>>>>>>>>>
9571: +-------------------------------------------------------------------------*/

Line 9572: msc_util.msc_log('Before generating Supplies SQL1');

9568:
9569: /*--------------------------------------------------------------------------
9570: | <<<<<<<<<<<<<<<<<<<<<<< Begin Supplies SQL1 >>>>>>>>>>>>>>>>>>>>>>>>>>>
9571: +-------------------------------------------------------------------------*/
9572: msc_util.msc_log('Before generating Supplies SQL1');
9573:
9574: Prepare_Supplies_Stmt(l_share_partition, p_demand_priority,
9575: l_excess_supply_by_dc, NULL, l_alloc_temp_table, l_parallel_degree, l_sql_stmt_1, l_return_status);
9576:

Line 9579: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Prepare_Supplies_Stmt');

9575: l_excess_supply_by_dc, NULL, l_alloc_temp_table, l_parallel_degree, l_sql_stmt_1, l_return_status);
9576:
9577: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9578: IF PG_DEBUG in ('Y', 'C') THEN
9579: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Prepare_Supplies_Stmt');
9580: END IF;
9581: RAISE FND_API.G_EXC_ERROR;
9582: END IF;
9583:

Line 9584: msc_util.msc_log(l_sql_stmt_1);

9580: END IF;
9581: RAISE FND_API.G_EXC_ERROR;
9582: END IF;
9583:
9584: msc_util.msc_log(l_sql_stmt_1);
9585: msc_util.msc_log('After Generating Supplies SQL1');
9586:
9587: -- Parse cursor handler for sql_stmt: Don't open as its already opened
9588:

Line 9585: msc_util.msc_log('After Generating Supplies SQL1');

9581: RAISE FND_API.G_EXC_ERROR;
9582: END IF;
9583:
9584: msc_util.msc_log(l_sql_stmt_1);
9585: msc_util.msc_log('After Generating Supplies SQL1');
9586:
9587: -- Parse cursor handler for sql_stmt: Don't open as its already opened
9588:
9589: DBMS_SQL.PARSE(cur_handler, l_sql_stmt_1, DBMS_SQL.NATIVE);

Line 9590: msc_util.msc_log('After parsing Supplies SQL1');

9586:
9587: -- Parse cursor handler for sql_stmt: Don't open as its already opened
9588:
9589: DBMS_SQL.PARSE(cur_handler, l_sql_stmt_1, DBMS_SQL.NATIVE);
9590: msc_util.msc_log('After parsing Supplies SQL1');
9591:
9592: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_user_id', l_user_id);
9593: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_sysdate', l_sysdate);
9594: DBMS_SQL.BIND_VARIABLE(cur_handler, ':p_plan_id', p_plan_id);

Line 9603: msc_util.msc_log('after binding the variables');

9599: DBMS_SQL.BIND_VARIABLE(cur_handler, ':def_num', '-1');
9600: END IF;
9601: /* forecast at PF changes end*/
9602:
9603: msc_util.msc_log('after binding the variables');
9604:
9605: -- Execute the cursor
9606: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9607: msc_util.msc_log('After executing first supplies cursor');

Line 9607: msc_util.msc_log('After executing first supplies cursor');

9603: msc_util.msc_log('after binding the variables');
9604:
9605: -- Execute the cursor
9606: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9607: msc_util.msc_log('After executing first supplies cursor');
9608:
9609: msc_util.msc_log('rows processed: ' || rows_processed);
9610: msc_util.msc_log('after inserting item data into MSC_ALLOC_SUPPLIES tables');
9611:

Line 9609: msc_util.msc_log('rows processed: ' || rows_processed);

9605: -- Execute the cursor
9606: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9607: msc_util.msc_log('After executing first supplies cursor');
9608:
9609: msc_util.msc_log('rows processed: ' || rows_processed);
9610: msc_util.msc_log('after inserting item data into MSC_ALLOC_SUPPLIES tables');
9611:
9612: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_DEMANDS');
9613: fnd_stats.gather_table_stats(ownname=>'MSC',tabname=>'MSC_ALLOC_DEMANDS',

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

9606: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9607: msc_util.msc_log('After executing first supplies cursor');
9608:
9609: msc_util.msc_log('rows processed: ' || rows_processed);
9610: msc_util.msc_log('after inserting item data into MSC_ALLOC_SUPPLIES tables');
9611:
9612: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_DEMANDS');
9613: fnd_stats.gather_table_stats(ownname=>'MSC',tabname=>'MSC_ALLOC_DEMANDS',
9614: partname=>'ALLOC_DEMANDS_999999',

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

9608:
9609: msc_util.msc_log('rows processed: ' || rows_processed);
9610: msc_util.msc_log('after inserting item data into MSC_ALLOC_SUPPLIES tables');
9611:
9612: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_DEMANDS');
9613: fnd_stats.gather_table_stats(ownname=>'MSC',tabname=>'MSC_ALLOC_DEMANDS',
9614: partname=>'ALLOC_DEMANDS_999999',
9615: granularity=>'PARTITION',
9616: percent =>10);

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

9614: partname=>'ALLOC_DEMANDS_999999',
9615: granularity=>'PARTITION',
9616: percent =>10);
9617:
9618: msc_util.msc_log('Analyze Plan partition for MSC_ALLOC_SUPPLIES');
9619: fnd_stats.gather_table_stats(ownname=>'MSC',tabname=>'MSC_ALLOC_SUPPLIES',
9620: partname=>'ALLOC_SUPPLIES_999999',
9621: granularity=>'PARTITION',
9622: percent =>10);

Line 9626: msc_util.msc_log('not a shared plan partition, insert data into temp tables');

9622: percent =>10);
9623:
9624: ELSE
9625:
9626: msc_util.msc_log('not a shared plan partition, insert data into temp tables');
9627:
9628: l_temp_table := 'MSC_TEMP_ALLOC_DEM_' || to_char(l_plan_id);
9629:
9630: msc_util.msc_log('temp table : ' || l_temp_table);

Line 9630: msc_util.msc_log('temp table : ' || l_temp_table);

9626: msc_util.msc_log('not a shared plan partition, insert data into temp tables');
9627:
9628: l_temp_table := 'MSC_TEMP_ALLOC_DEM_' || to_char(l_plan_id);
9629:
9630: msc_util.msc_log('temp table : ' || l_temp_table);
9631:
9632: IF p_demand_priority <> 'Y' THEN
9633: SELECT t.tablespace_name, NVL(i.def_tablespace_name, t.tablespace_name)
9634: INTO l_tbspace, l_ind_tbspace

Line 9644: msc_util.msc_log('tb space : ' || l_tbspace);

9640: AND i.owner (+) = t.table_owner
9641: AND i.table_name (+) = t.table_name
9642: AND rownum = 1;
9643:
9644: msc_util.msc_log('tb space : ' || l_tbspace);
9645: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);
9646: END IF;
9647:
9648: --bug 6113544

Line 9645: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);

9641: AND i.table_name (+) = t.table_name
9642: AND rownum = 1;
9643:
9644: msc_util.msc_log('tb space : ' || l_tbspace);
9645: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);
9646: END IF;
9647:
9648: --bug 6113544
9649: l_insert_stmt := 'CREATE TABLE ' || l_temp_table

Line 9690: msc_util.msc_log('before creating table : ' || l_temp_table);

9686: TABLESPACE ' || l_tbspace || '
9687: PCTFREE 0 STORAGE(INITIAL 40K NEXT 5M PCTINCREASE 0)';
9688: */
9689:
9690: msc_util.msc_log('before creating table : ' || l_temp_table);
9691: BEGIN
9692: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9693: APPLICATION_SHORT_NAME => 'MSC',
9694: STATEMENT_TYPE => ad_ddl.create_table,

Line 9697: msc_util.msc_log('after creating table : ' || l_temp_table);

9693: APPLICATION_SHORT_NAME => 'MSC',
9694: STATEMENT_TYPE => ad_ddl.create_table,
9695: STATEMENT => l_insert_stmt,
9696: OBJECT_NAME => l_temp_table);
9697: msc_util.msc_log('after creating table : ' || l_temp_table);
9698:
9699: EXCEPTION
9700: WHEN others THEN
9701: msc_util.msc_log(sqlcode || ': ' || sqlerrm);

Line 9701: msc_util.msc_log(sqlcode || ': ' || sqlerrm);

9697: msc_util.msc_log('after creating table : ' || l_temp_table);
9698:
9699: EXCEPTION
9700: WHEN others THEN
9701: msc_util.msc_log(sqlcode || ': ' || sqlerrm);
9702: msc_util.msc_log('Exception of create table : ' || l_temp_table);
9703:
9704: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9705: APPLICATION_SHORT_NAME => 'MSC',

Line 9702: msc_util.msc_log('Exception of create table : ' || l_temp_table);

9698:
9699: EXCEPTION
9700: WHEN others THEN
9701: msc_util.msc_log(sqlcode || ': ' || sqlerrm);
9702: msc_util.msc_log('Exception of create table : ' || l_temp_table);
9703:
9704: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9705: APPLICATION_SHORT_NAME => 'MSC',
9706: STATEMENT_TYPE => ad_ddl.drop_table,

Line 9710: msc_util.msc_log('After Drop table : ' ||l_temp_table);

9706: STATEMENT_TYPE => ad_ddl.drop_table,
9707: STATEMENT => 'DROP TABLE ' || l_temp_table,
9708: OBJECT_NAME => l_temp_table);
9709:
9710: msc_util.msc_log('After Drop table : ' ||l_temp_table);
9711: msc_util.msc_log('Before exception create table : ' ||l_temp_table);
9712:
9713: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9714: APPLICATION_SHORT_NAME => 'MSC',

Line 9711: msc_util.msc_log('Before exception create table : ' ||l_temp_table);

9707: STATEMENT => 'DROP TABLE ' || l_temp_table,
9708: OBJECT_NAME => l_temp_table);
9709:
9710: msc_util.msc_log('After Drop table : ' ||l_temp_table);
9711: msc_util.msc_log('Before exception create table : ' ||l_temp_table);
9712:
9713: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9714: APPLICATION_SHORT_NAME => 'MSC',
9715: STATEMENT_TYPE => ad_ddl.create_table,

Line 9718: msc_util.msc_log('After exception create table : ' ||l_temp_table);

9714: APPLICATION_SHORT_NAME => 'MSC',
9715: STATEMENT_TYPE => ad_ddl.create_table,
9716: STATEMENT => l_insert_stmt,
9717: OBJECT_NAME => l_temp_table);
9718: msc_util.msc_log('After exception create table : ' ||l_temp_table);
9719: END;
9720:
9721: /*--------------------------------------------------------------------------
9722: | <<<<<<<<<<<<<<<<<<<<<<< Begin Demands SQL1 >>>>>>>>>>>>>>>>>>>>>>>>>>>

Line 9724: msc_util.msc_log('Before generating Demands SQL1');

9720:
9721: /*--------------------------------------------------------------------------
9722: | <<<<<<<<<<<<<<<<<<<<<<< Begin Demands SQL1 >>>>>>>>>>>>>>>>>>>>>>>>>>>
9723: +-------------------------------------------------------------------------*/
9724: msc_util.msc_log('Before generating Demands SQL1');
9725:
9726: /* forecast at PF changes begin*/
9727: Prepare_Demands_Stmt(l_share_partition, p_demand_priority, l_excess_supply_by_dc,
9728: l_temp_table, l_alloc_temp_table, l_parallel_degree, l_sql_stmt_1, l_return_status);

Line 9732: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Prepare_Demands_Stmt');

9728: l_temp_table, l_alloc_temp_table, l_parallel_degree, l_sql_stmt_1, l_return_status);
9729:
9730: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9731: IF PG_DEBUG in ('Y', 'C') THEN
9732: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Prepare_Demands_Stmt');
9733: END IF;
9734: RAISE FND_API.G_EXC_ERROR;
9735: END IF;
9736:

Line 9737: msc_util.msc_log(l_sql_stmt_1);

9733: END IF;
9734: RAISE FND_API.G_EXC_ERROR;
9735: END IF;
9736:
9737: msc_util.msc_log(l_sql_stmt_1);
9738: msc_util.msc_log('After generating Demands SQL1');
9739:
9740: -- Obtain cursor handler for sql_stmt
9741: cur_handler := DBMS_SQL.OPEN_CURSOR;

Line 9738: msc_util.msc_log('After generating Demands SQL1');

9734: RAISE FND_API.G_EXC_ERROR;
9735: END IF;
9736:
9737: msc_util.msc_log(l_sql_stmt_1);
9738: msc_util.msc_log('After generating Demands SQL1');
9739:
9740: -- Obtain cursor handler for sql_stmt
9741: cur_handler := DBMS_SQL.OPEN_CURSOR;
9742:

Line 9744: msc_util.msc_log('After parsing Demands SQL1');

9740: -- Obtain cursor handler for sql_stmt
9741: cur_handler := DBMS_SQL.OPEN_CURSOR;
9742:
9743: DBMS_SQL.PARSE(cur_handler, l_sql_stmt_1, DBMS_SQL.NATIVE);
9744: msc_util.msc_log('After parsing Demands SQL1');
9745:
9746: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_user_id', l_user_id);
9747: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_sysdate', l_sysdate);
9748: DBMS_SQL.BIND_VARIABLE(cur_handler, ':p_plan_id', p_plan_id);

Line 9757: msc_util.msc_log('after binding the variables');

9753: DBMS_SQL.BIND_VARIABLE(cur_handler, ':def_num', '-1');
9754: END IF;
9755: /* forecast at PF changes end*/
9756:
9757: msc_util.msc_log('after binding the variables');
9758:
9759: -- Execute the cursor
9760: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9761: msc_util.msc_log('After executing the cursor');

Line 9761: msc_util.msc_log('After executing the cursor');

9757: msc_util.msc_log('after binding the variables');
9758:
9759: -- Execute the cursor
9760: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9761: msc_util.msc_log('After executing the cursor');
9762: msc_util.msc_log('after inserting item data into MSC_TEMP_ALLOC_DEMANDS table');
9763:
9764: commit;
9765:

Line 9762: msc_util.msc_log('after inserting item data into MSC_TEMP_ALLOC_DEMANDS table');

9758:
9759: -- Execute the cursor
9760: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9761: msc_util.msc_log('After executing the cursor');
9762: msc_util.msc_log('after inserting item data into MSC_TEMP_ALLOC_DEMANDS table');
9763:
9764: commit;
9765:
9766: msc_util.msc_log('before creating indexes on temp demand table');

Line 9766: msc_util.msc_log('before creating indexes on temp demand table');

9762: msc_util.msc_log('after inserting item data into MSC_TEMP_ALLOC_DEMANDS table');
9763:
9764: commit;
9765:
9766: msc_util.msc_log('before creating indexes on temp demand table');
9767: l_sql_stmt_1 := 'CREATE INDEX ' || l_temp_table || '_N1 ON ' || l_temp_table || '
9768: --NOLOGGING
9769: (plan_id, inventory_item_id, organization_id, sr_instance_id, demand_class, demand_date)
9770: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;

Line 9772: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N1');

9768: --NOLOGGING
9769: (plan_id, inventory_item_id, organization_id, sr_instance_id, demand_class, demand_date)
9770: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;
9771:
9772: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N1');
9773:
9774: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9775: APPLICATION_SHORT_NAME => 'MSC',
9776: STATEMENT_TYPE => ad_ddl.create_index,

Line 9780: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N1');

9776: STATEMENT_TYPE => ad_ddl.create_index,
9777: STATEMENT => l_sql_stmt_1,
9778: OBJECT_NAME => l_temp_table);
9779:
9780: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N1');
9781:
9782: l_sql_stmt_1 := 'CREATE INDEX ' || l_temp_table || '_N2 ON ' || l_temp_table || '
9783: -- NOLOGGING
9784: --Bug 3629191

Line 9789: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N2');

9785: (plan_id,
9786: sales_order_line_id)
9787: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;
9788:
9789: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N2');
9790:
9791: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9792: APPLICATION_SHORT_NAME => 'MSC',
9793: STATEMENT_TYPE => ad_ddl.create_index,

Line 9797: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N2');

9793: STATEMENT_TYPE => ad_ddl.create_index,
9794: STATEMENT => l_sql_stmt_1,
9795: OBJECT_NAME => l_temp_table);
9796:
9797: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N2');
9798:
9799: l_sql_stmt_1 := 'CREATE INDEX ' || l_temp_table || '_N3 ON ' || l_temp_table || '
9800: -- NOLOGGING
9801: --Bug 3629191

Line 9806: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N3');

9802: (plan_id,
9803: parent_demand_id)
9804: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;
9805:
9806: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N3');
9807:
9808: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9809: APPLICATION_SHORT_NAME => 'MSC',
9810: STATEMENT_TYPE => ad_ddl.create_index,

Line 9814: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N3');

9810: STATEMENT_TYPE => ad_ddl.create_index,
9811: STATEMENT => l_sql_stmt_1,
9812: OBJECT_NAME => l_temp_table);
9813:
9814: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N3');
9815: msc_util.msc_log('Done creating indexes on temp demand table');
9816:
9817: l_temp_table := 'MSC_TEMP_ALLOC_SUP_' || to_char(l_plan_id);
9818:

Line 9815: msc_util.msc_log('Done creating indexes on temp demand table');

9811: STATEMENT => l_sql_stmt_1,
9812: OBJECT_NAME => l_temp_table);
9813:
9814: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N3');
9815: msc_util.msc_log('Done creating indexes on temp demand table');
9816:
9817: l_temp_table := 'MSC_TEMP_ALLOC_SUP_' || to_char(l_plan_id);
9818:
9819: SELECT t.tablespace_name, NVL(i.def_tablespace_name, t.tablespace_name)

Line 9830: msc_util.msc_log('tb space : ' || l_tbspace);

9826: AND i.owner (+) = t.table_owner
9827: AND i.table_name (+) = t.table_name
9828: AND rownum = 1;
9829:
9830: msc_util.msc_log('tb space : ' || l_tbspace);
9831: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);
9832:
9833: --bug 6113544
9834: l_insert_stmt := 'CREATE TABLE ' || l_temp_table

Line 9831: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);

9827: AND i.table_name (+) = t.table_name
9828: AND rownum = 1;
9829:
9830: msc_util.msc_log('tb space : ' || l_tbspace);
9831: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);
9832:
9833: --bug 6113544
9834: l_insert_stmt := 'CREATE TABLE ' || l_temp_table
9835: || ' TABLESPACE ' || l_tbspace

Line 9875: msc_util.msc_log('before creating table : ' || l_temp_table);

9871: TABLESPACE ' || l_tbspace || '
9872: PCTFREE 0 STORAGE(INITIAL 40K NEXT 5M PCTINCREASE 0)';
9873: */
9874:
9875: msc_util.msc_log('before creating table : ' || l_temp_table);
9876: BEGIN
9877: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9878: APPLICATION_SHORT_NAME => 'MSC',
9879: STATEMENT_TYPE => ad_ddl.create_table,

Line 9882: msc_util.msc_log('after creating table : ' || l_temp_table);

9878: APPLICATION_SHORT_NAME => 'MSC',
9879: STATEMENT_TYPE => ad_ddl.create_table,
9880: STATEMENT => l_insert_stmt,
9881: OBJECT_NAME => l_temp_table);
9882: msc_util.msc_log('after creating table : ' || l_temp_table);
9883:
9884: EXCEPTION
9885: WHEN others THEN
9886: msc_util.msc_log(sqlcode || ': ' || sqlerrm);

Line 9886: msc_util.msc_log(sqlcode || ': ' || sqlerrm);

9882: msc_util.msc_log('after creating table : ' || l_temp_table);
9883:
9884: EXCEPTION
9885: WHEN others THEN
9886: msc_util.msc_log(sqlcode || ': ' || sqlerrm);
9887: msc_util.msc_log('Exception of create table : ' || l_temp_table);
9888:
9889: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9890: APPLICATION_SHORT_NAME => 'MSC',

Line 9887: msc_util.msc_log('Exception of create table : ' || l_temp_table);

9883:
9884: EXCEPTION
9885: WHEN others THEN
9886: msc_util.msc_log(sqlcode || ': ' || sqlerrm);
9887: msc_util.msc_log('Exception of create table : ' || l_temp_table);
9888:
9889: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9890: APPLICATION_SHORT_NAME => 'MSC',
9891: STATEMENT_TYPE => ad_ddl.drop_table,

Line 9895: msc_util.msc_log('After Drop table : ' ||l_temp_table);

9891: STATEMENT_TYPE => ad_ddl.drop_table,
9892: STATEMENT => 'DROP TABLE ' || l_temp_table,
9893: OBJECT_NAME => l_temp_table);
9894:
9895: msc_util.msc_log('After Drop table : ' ||l_temp_table);
9896: msc_util.msc_log('Before exception create table : ' ||l_temp_table);
9897:
9898: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9899: APPLICATION_SHORT_NAME => 'MSC',

Line 9896: msc_util.msc_log('Before exception create table : ' ||l_temp_table);

9892: STATEMENT => 'DROP TABLE ' || l_temp_table,
9893: OBJECT_NAME => l_temp_table);
9894:
9895: msc_util.msc_log('After Drop table : ' ||l_temp_table);
9896: msc_util.msc_log('Before exception create table : ' ||l_temp_table);
9897:
9898: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9899: APPLICATION_SHORT_NAME => 'MSC',
9900: STATEMENT_TYPE => ad_ddl.create_table,

Line 9903: msc_util.msc_log('After exception create table : ' ||l_temp_table);

9899: APPLICATION_SHORT_NAME => 'MSC',
9900: STATEMENT_TYPE => ad_ddl.create_table,
9901: STATEMENT => l_insert_stmt,
9902: OBJECT_NAME => l_temp_table);
9903: msc_util.msc_log('After exception create table : ' ||l_temp_table);
9904: END;
9905:
9906: /*--------------------------------------------------------------------------
9907: | <<<<<<<<<<<<<<<<<<<<<<< Begin Supplies SQL1 >>>>>>>>>>>>>>>>>>>>>>>>>>>

Line 9909: msc_util.msc_log('Before generating Supplies SQL1');

9905:
9906: /*--------------------------------------------------------------------------
9907: | <<<<<<<<<<<<<<<<<<<<<<< Begin Supplies SQL1 >>>>>>>>>>>>>>>>>>>>>>>>>>>
9908: +-------------------------------------------------------------------------*/
9909: msc_util.msc_log('Before generating Supplies SQL1');
9910:
9911: /* forecast at PF changes begin*/
9912: Prepare_Supplies_Stmt(l_share_partition, p_demand_priority, l_excess_supply_by_dc,
9913: l_temp_table, l_alloc_temp_table, l_parallel_degree, l_sql_stmt_1, l_return_status);

Line 9917: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Prepare_Supplies_Stmt');

9913: l_temp_table, l_alloc_temp_table, l_parallel_degree, l_sql_stmt_1, l_return_status);
9914:
9915: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9916: IF PG_DEBUG in ('Y', 'C') THEN
9917: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Prepare_Supplies_Stmt');
9918: END IF;
9919: RAISE FND_API.G_EXC_ERROR;
9920: END IF;
9921:

Line 9922: msc_util.msc_log(l_sql_stmt_1);

9918: END IF;
9919: RAISE FND_API.G_EXC_ERROR;
9920: END IF;
9921:
9922: msc_util.msc_log(l_sql_stmt_1);
9923: msc_util.msc_log('After Generating Supplies SQL1');
9924:
9925: -- Parse cursor handler for sql_stmt: Don't open as its already opened
9926:

Line 9923: msc_util.msc_log('After Generating Supplies SQL1');

9919: RAISE FND_API.G_EXC_ERROR;
9920: END IF;
9921:
9922: msc_util.msc_log(l_sql_stmt_1);
9923: msc_util.msc_log('After Generating Supplies SQL1');
9924:
9925: -- Parse cursor handler for sql_stmt: Don't open as its already opened
9926:
9927: DBMS_SQL.PARSE(cur_handler, l_sql_stmt_1, DBMS_SQL.NATIVE);

Line 9928: msc_util.msc_log('After parsing Supplies SQL1');

9924:
9925: -- Parse cursor handler for sql_stmt: Don't open as its already opened
9926:
9927: DBMS_SQL.PARSE(cur_handler, l_sql_stmt_1, DBMS_SQL.NATIVE);
9928: msc_util.msc_log('After parsing Supplies SQL1');
9929:
9930: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_user_id', l_user_id);
9931: DBMS_SQL.BIND_VARIABLE(cur_handler, ':l_sysdate', l_sysdate);
9932: DBMS_SQL.BIND_VARIABLE(cur_handler, ':p_plan_id', p_plan_id);

Line 9941: msc_util.msc_log('after binding the variables');

9937: DBMS_SQL.BIND_VARIABLE(cur_handler, ':def_num', '-1');
9938: END IF;
9939: /* forecast at PF changes end*/
9940:
9941: msc_util.msc_log('after binding the variables');
9942:
9943: -- Execute the cursor
9944: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9945: msc_util.msc_log('After executing first supplies cursor');

Line 9945: msc_util.msc_log('After executing first supplies cursor');

9941: msc_util.msc_log('after binding the variables');
9942:
9943: -- Execute the cursor
9944: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9945: msc_util.msc_log('After executing first supplies cursor');
9946: msc_util.msc_log('after inserting item data into MSC_TEMP_ALLOC_SUPPLIES table');
9947:
9948: commit;
9949:

Line 9946: msc_util.msc_log('after inserting item data into MSC_TEMP_ALLOC_SUPPLIES table');

9942:
9943: -- Execute the cursor
9944: rows_processed := DBMS_SQL.EXECUTE(cur_handler);
9945: msc_util.msc_log('After executing first supplies cursor');
9946: msc_util.msc_log('after inserting item data into MSC_TEMP_ALLOC_SUPPLIES table');
9947:
9948: commit;
9949:
9950: msc_util.msc_log('before creating indexes on temp supply table');

Line 9950: msc_util.msc_log('before creating indexes on temp supply table');

9946: msc_util.msc_log('after inserting item data into MSC_TEMP_ALLOC_SUPPLIES table');
9947:
9948: commit;
9949:
9950: msc_util.msc_log('before creating indexes on temp supply table');
9951: l_sql_stmt_1 := 'CREATE INDEX ' || l_temp_table || '_N1 ON ' || l_temp_table || '
9952: -- NOLOGGING
9953: (plan_id, inventory_item_id, organization_id, sr_instance_id, demand_class, supply_date)
9954: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;

Line 9956: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N1');

9952: -- NOLOGGING
9953: (plan_id, inventory_item_id, organization_id, sr_instance_id, demand_class, supply_date)
9954: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;
9955:
9956: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N1');
9957:
9958: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9959: APPLICATION_SHORT_NAME => 'MSC',
9960: STATEMENT_TYPE => ad_ddl.create_index,

Line 9964: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N1');

9960: STATEMENT_TYPE => ad_ddl.create_index,
9961: STATEMENT => l_sql_stmt_1,
9962: OBJECT_NAME => l_temp_table);
9963:
9964: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N1');
9965:
9966: l_sql_stmt_1 := 'CREATE INDEX ' || l_temp_table || '_N2 ON ' || l_temp_table || '
9967: -- NOLOGGING
9968: --Bug 3629191

Line 9973: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N2');

9969: (plan_id,
9970: parent_transaction_id)
9971: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;
9972:
9973: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N2');
9974:
9975: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9976: APPLICATION_SHORT_NAME => 'MSC',
9977: STATEMENT_TYPE => ad_ddl.create_index,

Line 9981: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N2');

9977: STATEMENT_TYPE => ad_ddl.create_index,
9978: STATEMENT => l_sql_stmt_1,
9979: OBJECT_NAME => l_temp_table);
9980:
9981: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N2');
9982:
9983: l_sql_stmt_1 := 'CREATE INDEX ' || l_temp_table || '_N3 ON ' || l_temp_table || '
9984: -- NOLOGGING
9985: --Bug 3629191

Line 9990: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N3');

9986: (plan_id,
9987: sales_order_line_id)
9988: STORAGE(INITIAL 40K NEXT 2M PCTINCREASE 0) tablespace ' || l_ind_tbspace;
9989:
9990: msc_util.msc_log('Before index : ' || l_temp_table || '.' || l_temp_table || '_N3');
9991:
9992: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
9993: APPLICATION_SHORT_NAME => 'MSC',
9994: STATEMENT_TYPE => ad_ddl.create_index,

Line 9998: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N3');

9994: STATEMENT_TYPE => ad_ddl.create_index,
9995: STATEMENT => l_sql_stmt_1,
9996: OBJECT_NAME => l_temp_table);
9997:
9998: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N3');
9999:
10000: msc_util.msc_log('Gather Table Stats for Allocated S/D Tables');
10001:
10002: fnd_stats.gather_table_stats('MSC', 'MSC_TEMP_ALLOC_DEM_' || to_char(l_plan_id), granularity => 'ALL');

Line 10000: msc_util.msc_log('Gather Table Stats for Allocated S/D Tables');

9996: OBJECT_NAME => l_temp_table);
9997:
9998: msc_util.msc_log('After index : ' || l_temp_table || '.' || l_temp_table || '_N3');
9999:
10000: msc_util.msc_log('Gather Table Stats for Allocated S/D Tables');
10001:
10002: fnd_stats.gather_table_stats('MSC', 'MSC_TEMP_ALLOC_DEM_' || to_char(l_plan_id), granularity => 'ALL');
10003: fnd_stats.gather_table_stats('MSC', 'MSC_TEMP_ALLOC_SUP_' || to_char(l_plan_id), granularity => 'ALL');
10004:

Line 10005: msc_util.msc_log('swap partition for demands');

10001:
10002: fnd_stats.gather_table_stats('MSC', 'MSC_TEMP_ALLOC_DEM_' || to_char(l_plan_id), granularity => 'ALL');
10003: fnd_stats.gather_table_stats('MSC', 'MSC_TEMP_ALLOC_SUP_' || to_char(l_plan_id), granularity => 'ALL');
10004:
10005: msc_util.msc_log('swap partition for demands');
10006: l_partition_name := 'ALLOC_DEMANDS_' || to_char(l_plan_id);
10007:
10008: msc_util.msc_log('Partition name for msc_alloc_demands table : ' || l_partition_name);
10009:

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

10004:
10005: msc_util.msc_log('swap partition for demands');
10006: l_partition_name := 'ALLOC_DEMANDS_' || to_char(l_plan_id);
10007:
10008: msc_util.msc_log('Partition name for msc_alloc_demands table : ' || l_partition_name);
10009:
10010: -- swap partiton for supplies and demand part
10011:
10012: l_sql_stmt := 'ALTER TABLE msc_alloc_demands EXCHANGE PARTITION ' || l_partition_name ||

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

10013: ' with table MSC_TEMP_ALLOC_DEM_'|| to_char(l_plan_id) ||
10014: ' including indexes without validation';
10015:
10016: BEGIN
10017: msc_util.msc_log('Before alter table msc_alloc_demands');
10018: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
10019: APPLICATION_SHORT_NAME => 'MSC',
10020: STATEMENT_TYPE => ad_ddl.alter_table,
10021: STATEMENT => l_sql_stmt,

Line 10025: msc_util.msc_log('swap partition for supplies');

10021: STATEMENT => l_sql_stmt,
10022: OBJECT_NAME => 'MSC_ALLOC_DEMANDS');
10023: END;
10024:
10025: msc_util.msc_log('swap partition for supplies');
10026: l_partition_name := 'ALLOC_SUPPLIES_' || to_char(l_plan_id);
10027:
10028: msc_util.msc_log('Partition name for msc_alloc_supplies table : ' || l_partition_name);
10029:

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

10024:
10025: msc_util.msc_log('swap partition for supplies');
10026: l_partition_name := 'ALLOC_SUPPLIES_' || to_char(l_plan_id);
10027:
10028: msc_util.msc_log('Partition name for msc_alloc_supplies table : ' || l_partition_name);
10029:
10030: l_sql_stmt := 'ALTER TABLE msc_alloc_supplies EXCHANGE PARTITION ' || l_partition_name ||
10031: ' with table MSC_TEMP_ALLOC_SUP_'|| to_char(l_plan_id) ||
10032: ' including indexes without validation';

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

10031: ' with table MSC_TEMP_ALLOC_SUP_'|| to_char(l_plan_id) ||
10032: ' including indexes without validation';
10033:
10034: BEGIN
10035: msc_util.msc_log('Before alter table msc_alloc_supplies');
10036: ad_ddl.do_ddl(APPLSYS_SCHEMA => l_applsys_schema,
10037: APPLICATION_SHORT_NAME => 'MSC',
10038: STATEMENT_TYPE => ad_ddl.alter_table,
10039: STATEMENT => l_sql_stmt,

Line 10047: msc_util.msc_log('Call procedure clean_temp_tables');

10043: END IF; -- IF l_share_partition = 'Y'
10044:
10045: /* forecast at PF changes begin*/
10046: -- clean temp tables after exchanging partitions
10047: msc_util.msc_log('Call procedure clean_temp_tables');
10048:
10049: MSC_POST_PRO.clean_temp_tables(l_applsys_schema, l_plan_id, p_plan_id, p_demand_priority);
10050:
10051: msc_util.msc_log('After procedure clean_temp_tables');

Line 10051: msc_util.msc_log('After procedure clean_temp_tables');

10047: msc_util.msc_log('Call procedure clean_temp_tables');
10048:
10049: MSC_POST_PRO.clean_temp_tables(l_applsys_schema, l_plan_id, p_plan_id, p_demand_priority);
10050:
10051: msc_util.msc_log('After procedure clean_temp_tables');
10052: /* forecast at PF changes end*/
10053:
10054: /* Call Update_Pf_Display_Flags to update Pf_Display_Flag in msc_alloc_demands*/
10055: Update_Pf_Display_Flag(p_plan_id, l_return_status);

Line 10059: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Update_Pf_Display_Flag');

10055: Update_Pf_Display_Flag(p_plan_id, l_return_status);
10056:
10057: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
10058: IF PG_DEBUG in ('Y', 'C') THEN
10059: msc_util.msc_log('Pf_Post_Plan_Proc: ' || 'Error occured in procedure Update_Pf_Display_Flag');
10060: END IF;
10061: RAISE FND_API.G_EXC_ERROR;
10062: END IF;
10063:

Line 10073: msc_util.msc_log('End procedure Pf_Post_Plan_Proc');

10069:
10070: RETCODE := G_SUCCESS;
10071: commit;
10072:
10073: msc_util.msc_log('End procedure Pf_Post_Plan_Proc');
10074:
10075: EXCEPTION
10076: WHEN OTHERS THEN
10077: msc_util.msc_log('Inside main exception of Pf_Post_Plan_Proc');

Line 10077: msc_util.msc_log('Inside main exception of Pf_Post_Plan_Proc');

10073: msc_util.msc_log('End procedure Pf_Post_Plan_Proc');
10074:
10075: EXCEPTION
10076: WHEN OTHERS THEN
10077: msc_util.msc_log('Inside main exception of Pf_Post_Plan_Proc');
10078: msc_util.msc_log(sqlerrm);
10079: ERRBUF := sqlerrm;
10080:
10081: BEGIN

Line 10078: msc_util.msc_log(sqlerrm);

10074:
10075: EXCEPTION
10076: WHEN OTHERS THEN
10077: msc_util.msc_log('Inside main exception of Pf_Post_Plan_Proc');
10078: msc_util.msc_log(sqlerrm);
10079: ERRBUF := sqlerrm;
10080:
10081: BEGIN
10082: update msc_plans

Line 10092: msc_util.msc_log('Call procedure clean_temp_tables in exception');

10088: RETCODE := G_ERROR;
10089: IF (l_share_partition = 'Y') THEN
10090: ROLLBACK;
10091: ELSE
10092: msc_util.msc_log('Call procedure clean_temp_tables in exception');
10093:
10094: /* forecast at PF changes*/
10095: MSC_POST_PRO.clean_temp_tables(l_applsys_schema, l_plan_id, p_plan_id, p_demand_priority);
10096:

Line 10097: msc_util.msc_log('After procedure clean_temp_tables in exception');

10093:
10094: /* forecast at PF changes*/
10095: MSC_POST_PRO.clean_temp_tables(l_applsys_schema, l_plan_id, p_plan_id, p_demand_priority);
10096:
10097: msc_util.msc_log('After procedure clean_temp_tables in exception');
10098: END IF;
10099: END Pf_Post_Plan_Proc;
10100:
10101: -- New private procedure added for forecast at PF

Line 10127: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_share_partition : ' || p_share_partition);

10123:
10124: BEGIN
10125:
10126: IF PG_DEBUG in ('Y', 'C') THEN
10127: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10128: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10129: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10130: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10131: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);

Line 10128: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);

10124: BEGIN
10125:
10126: IF PG_DEBUG in ('Y', 'C') THEN
10127: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10128: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10129: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10130: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10131: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10132: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);

Line 10129: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);

10125:
10126: IF PG_DEBUG in ('Y', 'C') THEN
10127: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10128: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10129: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10130: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10131: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10132: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);
10133: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF : ' || MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);

Line 10130: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_temp_table : ' || p_temp_table);

10126: IF PG_DEBUG in ('Y', 'C') THEN
10127: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10128: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10129: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10130: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10131: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10132: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);
10133: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF : ' || MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
10134: END IF;

Line 10131: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);

10127: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10128: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10129: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10130: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10131: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10132: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);
10133: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF : ' || MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
10134: END IF;
10135:

Line 10132: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);

10128: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10129: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10130: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10131: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10132: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);
10133: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF : ' || MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
10134: END IF;
10135:
10136: -- Initializing API return code

Line 10133: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF : ' || MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);

10129: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10130: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10131: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10132: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);
10133: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF : ' || MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
10134: END IF;
10135:
10136: -- Initializing API return code
10137: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 10534: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

10530:
10531: EXCEPTION
10532: WHEN OTHERS THEN
10533: IF PG_DEBUG in ('Y', 'C') THEN
10534: msc_util.msc_log('Prepare_Demands_Stmt: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
10535: END IF;
10536: x_return_status := FND_API.G_RET_STS_ERROR;
10537:
10538: END Prepare_Demands_Stmt;

Line 10566: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_share_partition : ' || p_share_partition);

10562:
10563: BEGIN
10564:
10565: IF PG_DEBUG in ('Y', 'C') THEN
10566: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10567: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10568: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10569: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10570: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);

Line 10567: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);

10563: BEGIN
10564:
10565: IF PG_DEBUG in ('Y', 'C') THEN
10566: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10567: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10568: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10569: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10570: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10571: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);

Line 10568: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);

10564:
10565: IF PG_DEBUG in ('Y', 'C') THEN
10566: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10567: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10568: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10569: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10570: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10571: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);
10572: END IF;

Line 10569: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_temp_table : ' || p_temp_table);

10565: IF PG_DEBUG in ('Y', 'C') THEN
10566: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10567: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10568: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10569: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10570: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10571: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);
10572: END IF;
10573:

Line 10570: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);

10566: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_share_partition : ' || p_share_partition);
10567: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10568: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10569: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10570: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10571: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);
10572: END IF;
10573:
10574: -- Initializing API return code

Line 10571: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);

10567: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_demand_priority : ' || p_demand_priority);
10568: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10569: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_temp_table : ' || p_temp_table);
10570: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_alloc_temp_table : ' || p_alloc_temp_table);
10571: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'p_parallel_degree : ' || p_parallel_degree);
10572: END IF;
10573:
10574: -- Initializing API return code
10575: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 10766: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

10762:
10763: EXCEPTION
10764: WHEN OTHERS THEN
10765: IF PG_DEBUG in ('Y', 'C') THEN
10766: msc_util.msc_log('Prepare_Supplies_Stmt: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
10767: END IF;
10768: x_return_status := FND_API.G_RET_STS_ERROR;
10769:
10770: END Prepare_Supplies_Stmt;

Line 10797: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_share_partition : ' || p_share_partition);

10793:
10794: BEGIN
10795:
10796: IF PG_DEBUG in ('Y', 'C') THEN
10797: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_share_partition : ' || p_share_partition);
10798: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_demand_priority : ' || p_demand_priority);
10799: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10800: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_temp_table : ' || p_temp_table);
10801: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_parallel_degree : ' || p_parallel_degree);

Line 10798: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_demand_priority : ' || p_demand_priority);

10794: BEGIN
10795:
10796: IF PG_DEBUG in ('Y', 'C') THEN
10797: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_share_partition : ' || p_share_partition);
10798: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_demand_priority : ' || p_demand_priority);
10799: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10800: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_temp_table : ' || p_temp_table);
10801: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_parallel_degree : ' || p_parallel_degree);
10802: END IF;

Line 10799: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);

10795:
10796: IF PG_DEBUG in ('Y', 'C') THEN
10797: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_share_partition : ' || p_share_partition);
10798: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_demand_priority : ' || p_demand_priority);
10799: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10800: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_temp_table : ' || p_temp_table);
10801: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_parallel_degree : ' || p_parallel_degree);
10802: END IF;
10803:

Line 10800: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_temp_table : ' || p_temp_table);

10796: IF PG_DEBUG in ('Y', 'C') THEN
10797: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_share_partition : ' || p_share_partition);
10798: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_demand_priority : ' || p_demand_priority);
10799: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10800: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_temp_table : ' || p_temp_table);
10801: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_parallel_degree : ' || p_parallel_degree);
10802: END IF;
10803:
10804: -- Initializing API return code

Line 10801: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_parallel_degree : ' || p_parallel_degree);

10797: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_share_partition : ' || p_share_partition);
10798: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_demand_priority : ' || p_demand_priority);
10799: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_excess_supply_by_dc : ' || p_excess_supply_by_dc);
10800: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_temp_table : ' || p_temp_table);
10801: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'p_parallel_degree : ' || p_parallel_degree);
10802: END IF;
10803:
10804: -- Initializing API return code
10805: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 11404: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

11400:
11401: EXCEPTION
11402: WHEN OTHERS THEN
11403: IF PG_DEBUG in ('Y', 'C') THEN
11404: msc_util.msc_log('Prepare_Demands_Stmt1: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
11405: END IF;
11406: x_return_status := FND_API.G_RET_STS_ERROR;
11407:
11408: END Prepare_Demands_Stmt1;

Line 11632: msc_util.msc_log('Prepare_Demands_Stmt2: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

11628:
11629: EXCEPTION
11630: WHEN OTHERS THEN
11631: IF PG_DEBUG in ('Y', 'C') THEN
11632: msc_util.msc_log('Prepare_Demands_Stmt2: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
11633: END IF;
11634: x_return_status := FND_API.G_RET_STS_ERROR;
11635:
11636: END Prepare_Demands_Stmt2;

Line 11960: msc_util.msc_log('Prepare_Supplies_Stmt1: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

11956:
11957: EXCEPTION
11958: WHEN OTHERS THEN
11959: IF PG_DEBUG in ('Y', 'C') THEN
11960: msc_util.msc_log('Prepare_Supplies_Stmt1: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
11961: END IF;
11962: x_return_status := FND_API.G_RET_STS_ERROR;
11963:
11964: END Prepare_Supplies_Stmt1;

Line 12123: msc_util.msc_log('Prepare_Supplies_Stmt2: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

12119:
12120: EXCEPTION
12121: WHEN OTHERS THEN
12122: IF PG_DEBUG in ('Y', 'C') THEN
12123: msc_util.msc_log('Prepare_Supplies_Stmt2: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
12124: END IF;
12125: x_return_status := FND_API.G_RET_STS_ERROR;
12126:
12127: END Prepare_Supplies_Stmt2;

Line 12143: msc_util.msc_log('Update_Pf_Display_Flag: ' || 'p_plan_id: ' || p_plan_id);

12139: l_return_status VARCHAR2(1);
12140:
12141: BEGIN
12142: IF PG_DEBUG in ('Y', 'C') THEN
12143: msc_util.msc_log('Update_Pf_Display_Flag: ' || 'p_plan_id: ' || p_plan_id);
12144: END IF;
12145:
12146: -- Initializing API return code
12147: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 12192: msc_util.msc_log('Update_Pf_Display_Flag: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

12188: AND I.aggregate_time_fence_date is not null);
12189: EXCEPTION
12190: WHEN OTHERS THEN
12191: IF PG_DEBUG in ('Y', 'C') THEN
12192: msc_util.msc_log('Update_Pf_Display_Flag: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
12193: END IF;
12194: x_return_status := FND_API.G_RET_STS_ERROR;
12195:
12196: END Update_Pf_Display_Flag;