DBA Data[Home] [Help]

APPS.MSC_ATP_DB_UTILS dependencies on MSC_SCH_WB

Line 41: msc_sch_wb.atp_debug('***** Begin Add_Mat_Demand *****');

37: l_return_status varchar2(1);
38:
39: BEGIN
40: IF PG_DEBUG in ('Y', 'C') THEN
41: msc_sch_wb.atp_debug('***** Begin Add_Mat_Demand *****');
42: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);
43: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
44: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);

Line 42: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);

38:
39: BEGIN
40: IF PG_DEBUG in ('Y', 'C') THEN
41: msc_sch_wb.atp_debug('***** Begin Add_Mat_Demand *****');
42: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);
43: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
44: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);

Line 43: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);

39: BEGIN
40: IF PG_DEBUG in ('Y', 'C') THEN
41: msc_sch_wb.atp_debug('***** Begin Add_Mat_Demand *****');
42: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);
43: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
44: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);

Line 44: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);

40: IF PG_DEBUG in ('Y', 'C') THEN
41: msc_sch_wb.atp_debug('***** Begin Add_Mat_Demand *****');
42: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);
43: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
44: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro

Line 45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);

41: msc_sch_wb.atp_debug('***** Begin Add_Mat_Demand *****');
42: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);
43: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
44: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);

Line 46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);

42: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);
43: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
44: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);

Line 47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);

43: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
44: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);

Line 48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro

44: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);

Line 49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);

45: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);

Line 50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);

46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);

Line 51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);

47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);

Line 52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);

48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);

Line 53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);

49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);
57: END IF;

Line 54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);

50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);
57: END IF;
58:

Line 55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);

51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);
57: END IF;
58:
59: -- time_phased_atp changes begin

Line 56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);

52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);
57: END IF;
58:
59: -- time_phased_atp changes begin
60: IF (p_atp_rec.inventory_item_id <> p_atp_rec.request_item_id) and p_atp_rec.atf_date is not null THEN

Line 65: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Time Phased ATP = ' || l_time_phased_atp);

61: l_time_phased_atp := 'Y';
62: /* In time phased atp scenarios add demand in msc_demands for member item*/
63: l_insert_item_id := p_atp_rec.request_item_id;
64: IF PG_DEBUG in ('Y', 'C') THEN
65: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Time Phased ATP = ' || l_time_phased_atp);
66: END IF;
67: ELSE
68: l_insert_item_id := p_atp_rec.inventory_item_id;
69: END IF;

Line 71: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Insert demand in msc_demands for ' || l_insert_item_id);

67: ELSE
68: l_insert_item_id := p_atp_rec.inventory_item_id;
69: END IF;
70: IF PG_DEBUG in ('Y', 'C') THEN
71: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Insert demand in msc_demands for ' || l_insert_item_id);
72: END IF;
73: -- time_phased_atp changes end
74:
75: IF (p_plan_id = -1) THEN -- ods, put into ods tables

Line 78: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ODS based ATP, Add into MSC_SALES Orders');

74:
75: IF (p_plan_id = -1) THEN -- ods, put into ods tables
76:
77: IF PG_DEBUG in ('Y', 'C') THEN
78: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ODS based ATP, Add into MSC_SALES Orders');
79: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.original_request_ship_date: ' ||p_atp_rec.original_request_ship_date);
80: END IF;
81:
82: INSERT INTO MSC_SALES_ORDERS(

Line 79: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.original_request_ship_date: ' ||p_atp_rec.original_request_ship_date);

75: IF (p_plan_id = -1) THEN -- ods, put into ods tables
76:
77: IF PG_DEBUG in ('Y', 'C') THEN
78: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ODS based ATP, Add into MSC_SALES Orders');
79: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.original_request_ship_date: ' ||p_atp_rec.original_request_ship_date);
80: END IF;
81:
82: INSERT INTO MSC_SALES_ORDERS(
83: DEMAND_ID,

Line 149: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Insert into summary table');

145: RETURNING DEMAND_ID INTO x_demand_id;
146:
147: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN
148: IF PG_DEBUG in ('Y', 'C') THEN
149: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Insert into summary table');
150: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || ' update msc_atp_summary_so');
151: END IF;
152: -- use hint to do index search
153: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_rec.instance_id,

Line 150: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || ' update msc_atp_summary_so');

146:
147: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN
148: IF PG_DEBUG in ('Y', 'C') THEN
149: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Insert into summary table');
150: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || ' update msc_atp_summary_so');
151: END IF;
152: -- use hint to do index search
153: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_rec.instance_id,
154: -1,

Line 175: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || ' insert into msc_atp_summary_so');

171: and demand_class = Decode(p_dc_flag, 1, NVL(p_atp_rec.demand_class, '@@@'),'@@@');
172:
173: IF SQL%NOTFOUND THEN
174: IF PG_DEBUG in ('Y', 'C') THEN
175: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || ' insert into msc_atp_summary_so');
176: END IF;
177: BEGIN
178: --- use hint to do index search
179: insert /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ into msc_atp_summary_so

Line 240: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'inside update of msc_demands');

236: --as this code is redundent commenting it out avjain
237: /*IF (p_atp_rec.origination_type IN (6, 30)) AND NVL(p_atp_rec.old_demand_id, 0) > 0 THEN
238:
239: IF PG_DEBUG in ('Y', 'C') THEN
240: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'inside update of msc_demands');
241: END IF;
242:
243: -- For bug 2259824, move the demand to the end of day
244: UPDATE msc_demands

Line 289: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'found demand and updated demand_id : ' || x_demand_id);

285: l_sqlfound := SQL%NOTFOUND;
286:
287: IF NOT l_sqlfound THEN
288: IF PG_DEBUG in ('Y', 'C') THEN
289: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'found demand and updated demand_id : ' || x_demand_id);
290: END IF;
291: -- Allocated ATP Based on Planning Details -- Agilent changes Begin
292:
293: IF ((MSC_ATP_PVT.G_INV_CTP = 4) AND

Line 299: msc_sch_wb.atp_debug('Add_Mat_Demand: before update of msc_alloc_demands');

295: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
296: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
297:
298: IF PG_DEBUG in ('Y', 'C') THEN
299: msc_sch_wb.atp_debug('Add_Mat_Demand: before update of msc_alloc_demands');
300: END IF;
301:
302: UPDATE msc_alloc_demands
303: SET old_allocated_quantity = allocated_quantity,

Line 325: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'No of rows updated := ' || SQL%ROWCOUNT);

321: AND sales_order_line_id = p_atp_rec.demand_source_line
322: AND parent_demand_id = p_atp_rec.old_demand_id;
323:
324: IF PG_DEBUG in ('Y', 'C') THEN
325: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'No of rows updated := ' || SQL%ROWCOUNT);
326: END IF;
327:
328: END IF;
329:

Line 340: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'before insert into msc_demands');

336: IF (SQL%NOTFOUND OR (p_atp_rec.origination_type NOT IN (6, 30)) OR
337: NVL(p_atp_rec.old_demand_id,0 ) = 0) THEN
338:
339: IF PG_DEBUG in ('Y', 'C') THEN
340: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'before insert into msc_demands');
341: END IF;
342:
343: INSERT INTO MSC_DEMANDS(
344: DEMAND_ID,

Line 500: msc_sch_wb.atp_debug('Add_Mat_Demand: Time phased ATP = '|| l_time_phased_atp);

496:
497: -- time_phased_atp
498: IF l_time_phased_atp = 'Y' THEN
499: IF PG_DEBUG in ('Y', 'C') THEN
500: msc_sch_wb.atp_debug('Add_Mat_Demand: Time phased ATP = '|| l_time_phased_atp);
501: END IF;
502: MSC_ATP_PF.Add_PF_Bucketed_Demands(
503: p_atp_rec,
504: p_plan_id,

Line 511: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Error occured in procedure Add_PF_Bucketed_Demands');

507: l_return_status
508: );
509: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
510: IF PG_DEBUG in ('Y', 'C') THEN
511: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Error occured in procedure Add_PF_Bucketed_Demands');
512: END IF;
513: RAISE FND_API.G_EXC_ERROR;
514: END IF;
515:

Line 523: msc_sch_wb.atp_debug('Add_Mat_Demand: before insert into msc_alloc_demands');

519: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
520: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
521:
522: IF PG_DEBUG in ('Y', 'C') THEN
523: msc_sch_wb.atp_debug('Add_Mat_Demand: before insert into msc_alloc_demands');
524: END IF;
525:
526: INSERT INTO MSC_ALLOC_DEMANDS(
527: PLAN_ID,

Line 589: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'add demands to summary tables');

585:
586: -- Update summary records only in ODS - for summary enhancement
587: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
588: IF PG_DEBUG in ('Y', 'C') THEN
589: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'add demands to summary tables');
590: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'First try to update');
591: END IF;
592:
593: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_rec.instance_id,

Line 590: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'First try to update');

586: -- Update summary records only in ODS - for summary enhancement
587: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
588: IF PG_DEBUG in ('Y', 'C') THEN
589: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'add demands to summary tables');
590: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'First try to update');
591: END IF;
592:
593: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_rec.instance_id,
594: p_plan_id,

Line 615: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'After update to summary table');

611: and organization_id = p_atp_rec.organization_id
612: and sd_date = trunc(p_atp_rec.requested_ship_date);
613:
614: IF PG_DEBUG in ('Y', 'C') THEN
615: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'After update to summary table');
616: END IF;
617:
618: IF SQL%NOTFOUND THEN
619: IF PG_DEBUG in ('Y', 'C') THEN

Line 620: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Couldnt find a rec in summ table. Insert new rec');

616: END IF;
617:
618: IF SQL%NOTFOUND THEN
619: IF PG_DEBUG in ('Y', 'C') THEN
620: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Couldnt find a rec in summ table. Insert new rec');
621: END IF;
622:
623: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
624: p_atp_rec.instance_id,

Line 636: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'x_demand_id '||x_demand_id);

632:
633: END IF;
634: my_sqlcode := SQLCODE;
635: IF PG_DEBUG in ('Y', 'C') THEN
636: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'x_demand_id '||x_demand_id);
637: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'insert row: sqlcode = '|| to_char(my_sqlcode));
638: END IF;
639:
640: -- Commit chenges only in PDS - for summary enhancement

Line 637: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'insert row: sqlcode = '|| to_char(my_sqlcode));

633: END IF;
634: my_sqlcode := SQLCODE;
635: IF PG_DEBUG in ('Y', 'C') THEN
636: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'x_demand_id '||x_demand_id);
637: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'insert row: sqlcode = '|| to_char(my_sqlcode));
638: END IF;
639:
640: -- Commit chenges only in PDS - for summary enhancement
641: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND p_plan_id = -1 THEN

Line 644: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Commit in summary mode');

640: -- Commit chenges only in PDS - for summary enhancement
641: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND p_plan_id = -1 THEN
642: -- in case of summmary mode we always commit after each change
643: IF PG_DEBUG in ('Y', 'C') THEN
644: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Commit in summary mode');
645: END IF;
646: commit;
647: END IF;
648:

Line 650: msc_sch_wb.atp_debug('***** End Add_Mat_Demand *****');

646: commit;
647: END IF;
648:
649: IF PG_DEBUG in ('Y', 'C') THEN
650: msc_sch_wb.atp_debug('***** End Add_Mat_Demand *****');
651: END IF;
652:
653: EXCEPTION
654: WHEN OTHERS THEN

Line 657: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'error in insert row: sqlcode = '|| to_char(my_sqlcode));

653: EXCEPTION
654: WHEN OTHERS THEN
655: my_sqlcode := SQLCODE;
656: IF PG_DEBUG in ('Y', 'C') THEN
657: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'error in insert row: sqlcode = '|| to_char(my_sqlcode));
658: END IF;
659:
660: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
661: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Add_Mat_Demand');

Line 675: msc_sch_wb.atp_debug('***** Begin Add_Pegging Procedure *****');

671: IS
672: temp number;
673: BEGIN
674: IF PG_DEBUG in ('Y', 'C') THEN
675: msc_sch_wb.atp_debug('***** Begin Add_Pegging Procedure *****');
676: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
677: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
678: p_pegging_rec.component_identifier);
679: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);

Line 676: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);

672: temp number;
673: BEGIN
674: IF PG_DEBUG in ('Y', 'C') THEN
675: msc_sch_wb.atp_debug('***** Begin Add_Pegging Procedure *****');
676: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
677: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
678: p_pegging_rec.component_identifier);
679: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
680: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);

Line 677: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||

673: BEGIN
674: IF PG_DEBUG in ('Y', 'C') THEN
675: msc_sch_wb.atp_debug('***** Begin Add_Pegging Procedure *****');
676: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
677: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
678: p_pegging_rec.component_identifier);
679: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
680: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
681: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);

Line 679: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);

675: msc_sch_wb.atp_debug('***** Begin Add_Pegging Procedure *****');
676: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
677: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
678: p_pegging_rec.component_identifier);
679: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
680: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
681: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
682: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
683: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);

Line 680: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);

676: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
677: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
678: p_pegging_rec.component_identifier);
679: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
680: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
681: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
682: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
683: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
684: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);

Line 681: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);

677: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
678: p_pegging_rec.component_identifier);
679: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
680: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
681: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
682: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
683: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
684: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);
685:

Line 682: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);

678: p_pegging_rec.component_identifier);
679: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
680: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
681: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
682: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
683: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
684: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);
685:
686: END IF;

Line 683: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);

679: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
680: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
681: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
682: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
683: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
684: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);
685:
686: END IF;
687:

Line 684: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);

680: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
681: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
682: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
683: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
684: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);
685:
686: END IF;
687:
688: INSERT into mrp_atp_details_temp

Line 910: msc_sch_wb.atp_debug('Add_Pegging: ' || 'x_pegging_id = '||x_pegging_id);

906: )
907: RETURNING pegging_id INTO x_pegging_id;
908:
909: IF PG_DEBUG in ('Y', 'C') THEN
910: msc_sch_wb.atp_debug('Add_Pegging: ' || 'x_pegging_id = '||x_pegging_id);
911: msc_sch_wb.atp_debug('***** End Add_Pegging Procedure *****');
912: END IF;
913:
914: END Add_Pegging;

Line 911: msc_sch_wb.atp_debug('***** End Add_Pegging Procedure *****');

907: RETURNING pegging_id INTO x_pegging_id;
908:
909: IF PG_DEBUG in ('Y', 'C') THEN
910: msc_sch_wb.atp_debug('Add_Pegging: ' || 'x_pegging_id = '||x_pegging_id);
911: msc_sch_wb.atp_debug('***** End Add_Pegging Procedure *****');
912: END IF;
913:
914: END Add_Pegging;
915:

Line 960: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');

956: l_supply_rec MSC_ATP_DB_UTILS.Supply_Rec_Typ;
957:
958: BEGIN
959: IF PG_DEBUG in ('Y', 'C') THEN
960: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
961: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
962: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
963: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);

Line 961: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);

957:
958: BEGIN
959: IF PG_DEBUG in ('Y', 'C') THEN
960: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
961: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
962: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
963: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);

Line 962: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);

958: BEGIN
959: IF PG_DEBUG in ('Y', 'C') THEN
960: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
961: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
962: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
963: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);

Line 963: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);

959: IF PG_DEBUG in ('Y', 'C') THEN
960: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
961: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
962: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
963: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);

Line 964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);

960: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
961: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
962: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
963: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);

Line 965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);

961: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
962: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
963: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);

Line 966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);

962: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
963: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);

Line 967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);

963: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);

Line 968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);

964: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
972: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);

Line 969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);

965: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
972: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
973: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);

Line 970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);

966: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
972: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
973: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
974: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);

Line 971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);

967: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
972: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
973: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
974: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
975: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);

Line 972: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);

968: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
972: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
973: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
974: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
975: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);
976: END IF;

Line 973: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);

969: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
972: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
973: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
974: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
975: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);
976: END IF;
977:

Line 974: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);

970: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
972: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
973: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
974: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
975: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);
976: END IF;
977:
978: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 975: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);

971: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
972: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
973: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
974: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
975: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);
976: END IF;
977:
978: x_return_status := FND_API.G_RET_STS_SUCCESS;
979:

Line 1017: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'x_transaction_id = '||x_transaction_id);

1013: x_transaction_id := l_supply_rec.transaction_id;
1014: x_return_status := l_supply_rec.return_status;
1015:
1016: IF PG_DEBUG in ('Y', 'C') THEN
1017: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'x_transaction_id = '||x_transaction_id);
1018: msc_sch_wb.atp_debug('***** End Add_Planned_Order Procedure *****');
1019: END IF;
1020:
1021: END Add_Planned_Order;

Line 1018: msc_sch_wb.atp_debug('***** End Add_Planned_Order Procedure *****');

1014: x_return_status := l_supply_rec.return_status;
1015:
1016: IF PG_DEBUG in ('Y', 'C') THEN
1017: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'x_transaction_id = '||x_transaction_id);
1018: msc_sch_wb.atp_debug('***** End Add_Planned_Order Procedure *****');
1019: END IF;
1020:
1021: END Add_Planned_Order;
1022:

Line 1052: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');

1048: IS
1049: temp_sd_qty number;
1050: BEGIN
1051: IF PG_DEBUG in ('Y', 'C') THEN
1052: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1053: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1054: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1055: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);

Line 1053: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);

1049: temp_sd_qty number;
1050: BEGIN
1051: IF PG_DEBUG in ('Y', 'C') THEN
1052: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1053: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1054: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1055: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);

Line 1054: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);

1050: BEGIN
1051: IF PG_DEBUG in ('Y', 'C') THEN
1052: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1053: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1054: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1055: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);

Line 1055: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);

1051: IF PG_DEBUG in ('Y', 'C') THEN
1052: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1053: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1054: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1055: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);

Line 1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);

1052: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1053: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1054: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1055: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);

Line 1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);

1053: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1054: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1055: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1061: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);

Line 1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);

1054: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1055: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1061: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1062: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);

Line 1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);

1055: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1061: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1062: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1063: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604

Line 1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);

1056: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1061: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1062: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1063: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1064: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604

Line 1061: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);

1057: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1061: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1062: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1063: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1064: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604
1065: END IF;

Line 1062: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);

1058: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1061: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1062: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1063: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1064: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604
1065: END IF;
1066:

Line 1063: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604

1059: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1061: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1062: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1063: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1064: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604
1065: END IF;
1066:
1067: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1064: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604

1060: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1061: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1062: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1063: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1064: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604
1065: END IF;
1066:
1067: x_return_status := FND_API.G_RET_STS_SUCCESS;
1068:

Line 1138: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || ' In summary mode update resource req');

1134: -- Code to make summary updates and commit removed for summary enhancement
1135: /** code commented for time being. Will be removed after code review
1136: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
1137: IF PG_DEBUG in ('Y', 'C') THEN
1138: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || ' In summary mode update resource req');
1139: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'First update');
1140: END IF;
1141: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
1142: p_plan_id,

Line 1139: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'First update');

1135: /** code commented for time being. Will be removed after code review
1136: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
1137: IF PG_DEBUG in ('Y', 'C') THEN
1138: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || ' In summary mode update resource req');
1139: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'First update');
1140: END IF;
1141: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
1142: p_plan_id,
1143: p_organization_id,

Line 1163: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'after update qty := ' || temp_sd_qty);

1159: and resource_id = p_resource_id
1160: and department_id = p_department_id
1161: and sd_date = trunc(p_start_date);
1162: IF PG_DEBUG in ('Y', 'C') THEN
1163: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'after update qty := ' || temp_sd_qty);
1164: END IF;
1165:
1166:
1167: IF SQL%NOTFOUND THEN

Line 1169: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'Couldnt update. Inset the row');

1165:
1166:
1167: IF SQL%NOTFOUND THEN
1168: IF PG_DEBUG in ('Y', 'C') THEN
1169: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'Couldnt update. Inset the row');
1170: END IF;
1171: BEGIN
1172: INSERT /*+ INDEX(msc_atp_summary_RES MSC_ATP_SUMMARY_SD_RES) *//* INTO MSC_ATP_SUMMARY_RES
1173: (plan_id,

Line 1224: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'Summary mode commit, in resource_req');

1220: and sd_date = trunc(p_start_date);
1221: END;
1222: END IF; --- if sql%notfound
1223: IF PG_DEBUG in ('Y', 'C') THEN
1224: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'Summary mode commit, in resource_req');
1225: END IF;
1226: commit;
1227: END IF; --- if MSC_ATP_PVT.SUMMARY_FLAG = 'Y'
1228: ***/

Line 1231: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'x_transaction_id = '||x_transaction_id);

1227: END IF; --- if MSC_ATP_PVT.SUMMARY_FLAG = 'Y'
1228: ***/
1229:
1230: IF PG_DEBUG in ('Y', 'C') THEN
1231: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'x_transaction_id = '||x_transaction_id);
1232: msc_sch_wb.atp_debug('***** End Add_Resource_Demand Procedure *****');
1233: END IF;
1234:
1235: END Add_Resource_Demand;

Line 1232: msc_sch_wb.atp_debug('***** End Add_Resource_Demand Procedure *****');

1228: ***/
1229:
1230: IF PG_DEBUG in ('Y', 'C') THEN
1231: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'x_transaction_id = '||x_transaction_id);
1232: msc_sch_wb.atp_debug('***** End Add_Resource_Demand Procedure *****');
1233: END IF;
1234:
1235: END Add_Resource_Demand;
1236:

Line 1245: msc_sch_wb.atp_debug('Begin delete_pegging,p_pegging_id='||p_pegging_id);

1241: IS
1242:
1243: BEGIN
1244: IF PG_DEBUG in ('Y', 'C') THEN
1245: msc_sch_wb.atp_debug('Begin delete_pegging,p_pegging_id='||p_pegging_id);
1246: END IF;
1247:
1248: DELETE FROM mrp_atp_details_temp
1249: WHERE pegging_id = p_pegging_id

Line 1253: msc_sch_wb.atp_debug('After delete_pegging,p_pegging_id='||p_pegging_id);

1249: WHERE pegging_id = p_pegging_id
1250: AND session_id = MSC_ATP_PVT.G_SESSION_ID;
1251:
1252: IF PG_DEBUG in ('Y', 'C') THEN
1253: msc_sch_wb.atp_debug('After delete_pegging,p_pegging_id='||p_pegging_id);
1254: END IF;
1255:
1256: EXCEPTION
1257: WHEN OTHERS THEN

Line 1317: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');

1313: -- CTO ODR and Simplified Pegging
1314: l_return_status VARCHAR2(1);
1315: BEGIN
1316: IF PG_DEBUG in ('Y', 'C') THEN
1317: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1318: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1319: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1320: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1321: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);

Line 1318: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);

1314: l_return_status VARCHAR2(1);
1315: BEGIN
1316: IF PG_DEBUG in ('Y', 'C') THEN
1317: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1318: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1319: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1320: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1321: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1322: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);

Line 1319: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);

1315: BEGIN
1316: IF PG_DEBUG in ('Y', 'C') THEN
1317: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1318: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1319: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1320: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1321: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1322: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);
1323: END IF;

Line 1320: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);

1316: IF PG_DEBUG in ('Y', 'C') THEN
1317: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1318: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1319: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1320: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1321: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1322: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);
1323: END IF;
1324: IF p_plan_id = -1 THEN

Line 1321: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);

1317: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1318: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1319: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1320: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1321: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1322: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);
1323: END IF;
1324: IF p_plan_id = -1 THEN
1325:

Line 1322: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);

1318: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1319: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1320: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1321: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1322: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);
1323: END IF;
1324: IF p_plan_id = -1 THEN
1325:
1326: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND G_ORIG_INV_CTP = 5 THEN

Line 1374: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);

1370: -1);
1371:
1372:
1373: IF PG_DEBUG in ('Y', 'C') THEN
1374: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);
1375: --Bug 4336692, In case above queries donot return anything,
1376: -- following debug statement will cause an error.
1377: --msc_sch_wb.atp_debug( 'x_ods_atp_refresh_no' || x_ods_atp_refresh_no(1));
1378: msc_sch_wb.atp_debug('x_demand_id(1) ' ||x_demand_id.count);

Line 1377: --msc_sch_wb.atp_debug( 'x_ods_atp_refresh_no' || x_ods_atp_refresh_no(1));

1373: IF PG_DEBUG in ('Y', 'C') THEN
1374: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);
1375: --Bug 4336692, In case above queries donot return anything,
1376: -- following debug statement will cause an error.
1377: --msc_sch_wb.atp_debug( 'x_ods_atp_refresh_no' || x_ods_atp_refresh_no(1));
1378: msc_sch_wb.atp_debug('x_demand_id(1) ' ||x_demand_id.count);
1379: END IF;
1380:
1381: --s_cto_rearch: Now delete rows fpr CTO components

Line 1378: msc_sch_wb.atp_debug('x_demand_id(1) ' ||x_demand_id.count);

1374: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);
1375: --Bug 4336692, In case above queries donot return anything,
1376: -- following debug statement will cause an error.
1377: --msc_sch_wb.atp_debug( 'x_ods_atp_refresh_no' || x_ods_atp_refresh_no(1));
1378: msc_sch_wb.atp_debug('x_demand_id(1) ' ||x_demand_id.count);
1379: END IF;
1380:
1381: --s_cto_rearch: Now delete rows fpr CTO components
1382: IF p_ato_model_line_id is not null THEN

Line 1415: msc_sch_wb.atp_debug('Number of component lines updated := ' || SQL%ROWCOUNT);

1411: bulk collect into x_ods_cto_demand_ids, x_ods_cto_inv_item_ids, x_ods_cto_atp_refresh_no ;
1412:
1413:
1414: IF PG_DEBUG in ('Y', 'C') THEN
1415: msc_sch_wb.atp_debug('Number of component lines updated := ' || SQL%ROWCOUNT);
1416: END IF;
1417:
1418: Update msc_sales_orders
1419: set atp_refresh_number = 10000000000 --3720018

Line 1433: msc_sch_wb.atp_debug('Delete_Row: ' || 'Deleting msc_demands with identifier = '||

1429:
1430: END IF;
1431: ELSE
1432: IF PG_DEBUG in ('Y', 'C') THEN
1433: msc_sch_wb.atp_debug('Delete_Row: ' || 'Deleting msc_demands with identifier = '||
1434: p_identifier ||' : plan id = '||p_plan_id);
1435: END IF;
1436:
1437: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN

Line 1439: msc_sch_wb.atp_debug('Delete_Row: ' || 'Obtain the latest refresh number.');

1435: END IF;
1436:
1437: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
1438: IF PG_DEBUG in ('Y', 'C') THEN
1439: msc_sch_wb.atp_debug('Delete_Row: ' || 'Obtain the latest refresh number.');
1440: END IF;
1441:
1442: SELECT latest_refresh_number
1443: INTO l_current_refresh_number

Line 1448: msc_sch_wb.atp_debug('Delete_Row: ' || 'l_current_refresh_number := ' || l_current_refresh_number);

1444: FROM MSC_PLANS
1445: WHERE plan_id = p_plan_id;
1446:
1447: IF PG_DEBUG in ('Y', 'C') THEN
1448: msc_sch_wb.atp_debug('Delete_Row: ' || 'l_current_refresh_number := ' || l_current_refresh_number);
1449: END IF;
1450: END IF;
1451:
1452: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'N') OR

Line 1461: msc_sch_wb.atp_debug('Delete_Row: ' || 'Summary , PF or allocated.');

1457: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
1458: -- If condition added for summary enhancement
1459: -- execute the old code non-summary cases and demand priority allocation cases
1460: IF PG_DEBUG in ('Y', 'C') THEN
1461: msc_sch_wb.atp_debug('Delete_Row: ' || 'Summary , PF or allocated.');
1462: END IF;
1463:
1464: -- Bug # 1868383, do not delete old demand records, rather just update qty = 0
1465: -- Bug 2738280. Club the 2 update SQL's into one.

Line 1519: msc_sch_wb.atp_debug('Delete_Row: ' || 'No. of demands updated = '|| l_del_rows);

1515: -- Returning clause changed for summary enhancement
1516:
1517: l_del_rows := SQL%ROWCOUNT;
1518: IF PG_DEBUG in ('Y', 'C') THEN
1519: msc_sch_wb.atp_debug('Delete_Row: ' || 'No. of demands updated = '|| l_del_rows);
1520: FOR i IN 1..x_demand_id.COUNT LOOP
1521: msc_sch_wb.atp_debug('Delete_Row i: ' || i || '; demand_id: '|| x_demand_id(i) || '; inv_item_id: '|| x_inv_item_id(i));
1522: END LOOP;
1523: END IF;

Line 1521: msc_sch_wb.atp_debug('Delete_Row i: ' || i || '; demand_id: '|| x_demand_id(i) || '; inv_item_id: '|| x_inv_item_id(i));

1517: l_del_rows := SQL%ROWCOUNT;
1518: IF PG_DEBUG in ('Y', 'C') THEN
1519: msc_sch_wb.atp_debug('Delete_Row: ' || 'No. of demands updated = '|| l_del_rows);
1520: FOR i IN 1..x_demand_id.COUNT LOOP
1521: msc_sch_wb.atp_debug('Delete_Row i: ' || i || '; demand_id: '|| x_demand_id(i) || '; inv_item_id: '|| x_inv_item_id(i));
1522: END LOOP;
1523: END IF;
1524:
1525: ELSE

Line 1528: msc_sch_wb.atp_debug('Delete_Row: ' || 'Unallocated summary');

1524:
1525: ELSE
1526:
1527: IF PG_DEBUG in ('Y', 'C') THEN
1528: msc_sch_wb.atp_debug('Delete_Row: ' || 'Unallocated summary');
1529: END IF;
1530:
1531: /*SELECT demand_id,
1532: inventory_item_id,

Line 1576: -- msc_sch_wb.atp_debug('Delete_Row: ' || 'x_demand_id.COUNT:' || x_demand_id.COUNT);

1572: ;*/ --commented out as now combining this with update and returning clause
1573:
1574: --IF x_demand_id IS NOT NULL AND x_demand_id.COUNT > 0 THEN
1575: -- IF PG_DEBUG in ('Y', 'C') THEN
1576: -- msc_sch_wb.atp_debug('Delete_Row: ' || 'x_demand_id.COUNT:' || x_demand_id.COUNT);
1577: --END IF;
1578:
1579: --FORALL i in 1..x_demand_id.COUNT --cmro
1580: UPDATE msc_demands

Line 1606: msc_sch_wb.atp_debug('Delete_Row: ' || 'x_demand_id.COUNT:' || x_demand_id.COUNT);

1602: BULK COLLECT INTO x_demand_id,x_inv_item_id,l_organization_id,l_refresh_number_tab,l_qty_tab,l_old_demand_date;--cmro
1603:
1604: IF x_demand_id IS NOT NULL AND x_demand_id.COUNT > 0 THEN
1605: IF PG_DEBUG in ('Y', 'C') THEN
1606: msc_sch_wb.atp_debug('Delete_Row: ' || 'x_demand_id.COUNT:' || x_demand_id.COUNT);
1607: END IF;
1608:
1609: FOR i IN 1..x_demand_id.COUNT LOOP
1610: IF l_current_refresh_number IS NULL -- summary has not run

Line 1614: msc_sch_wb.atp_debug('Delete_Row: ' || 'Copy SO will be created for demand id ' || x_demand_id(i));

1610: IF l_current_refresh_number IS NULL -- summary has not run
1611: OR l_refresh_number_tab(i) > l_current_refresh_number THEN -- SO being unscheduled has not been summarized
1612:
1613: IF PG_DEBUG in ('Y', 'C') THEN
1614: msc_sch_wb.atp_debug('Delete_Row: ' || 'Copy SO will be created for demand id ' || x_demand_id(i));
1615: END IF;
1616:
1617: i_ins_item_id_tab.Extend;
1618: l_ins_org_id_tab.Extend;

Line 1639: msc_sch_wb.atp_debug('Delete_Row: ' || 'i_ins_item_id_tab.COUNT:' || i_ins_item_id_tab.COUNT);

1635:
1636: IF i_ins_item_id_tab IS NOT NULL and i_ins_item_id_tab.COUNT > 0 THEN
1637: -- Insert copy sales orders
1638: IF PG_DEBUG in ('Y', 'C') THEN
1639: msc_sch_wb.atp_debug('Delete_Row: ' || 'i_ins_item_id_tab.COUNT:' || i_ins_item_id_tab.COUNT);
1640: END IF;
1641:
1642: FORALL i IN 1..i_ins_item_id_tab.COUNT
1643: INSERT INTO MSC_DEMANDS(

Line 1679: msc_sch_wb.atp_debug('Delete_Row: ' || 'No copy Sales Orders');

1675: l_ins_refresh_number_tab(i));
1676:
1677: ELSE
1678: IF PG_DEBUG in ('Y', 'C') THEN
1679: msc_sch_wb.atp_debug('Delete_Row: ' || 'No copy Sales Orders');
1680: END IF;
1681: END IF;
1682:
1683: x_copy_demand_id := l_copy_demand_id;

Line 1687: msc_sch_wb.atp_debug('Delete_Row: ' || 'No demands to be deleted');

1683: x_copy_demand_id := l_copy_demand_id;
1684:
1685: ELSE -- IF x_demand_id IS NOT NULL AND x_demand_id.COUNT > 0 THEN
1686: IF PG_DEBUG in ('Y', 'C') THEN
1687: msc_sch_wb.atp_debug('Delete_Row: ' || 'No demands to be deleted');
1688: END IF;
1689: END IF;
1690:
1691: END IF;

Line 1698: msc_sch_wb.atp_debug('Delete_Row: ' || 'update Demands in summary mode');

1694: -- Code to update summary records removed for summary enhancement
1695: /** code commented for time being. Will be removed after code review
1696: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
1697: IF PG_DEBUG in ('Y', 'C') THEN
1698: msc_sch_wb.atp_debug('Delete_Row: ' || 'update Demands in summary mode');
1699: END IF;
1700: -- Bug 2738280. Change the input parameters of procedure call.
1701: -- MSC_ATP_DB_UTILS.UPDATE_PLAN_SUMMARY_ROW(p_identifier, p_plan_id, p_instance_id);
1702: MSC_ATP_DB_UTILS.UPDATE_PLAN_SUMMARY_ROW(x_inv_item_id, l_old_demand_date, l_old_demand_quantity,

Line 1719: msc_sch_wb.atp_debug('Delete_Row: before update of msc_alloc_demands');

1715: --(MSC_ATP_PVT.G_ALLOCATION_METHOD = 1))) AND p_ato_model_line_id is null THEN
1716: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1))) THEN
1717:
1718: IF PG_DEBUG in ('Y', 'C') THEN
1719: msc_sch_wb.atp_debug('Delete_Row: before update of msc_alloc_demands');
1720: END IF;
1721:
1722: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'N' THEN
1723: -- If condition added for summary enhancement

Line 1728: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);

1724: -- For non summary case since no returning is required hence direct bulk update is used
1725:
1726: IF l_identifier_tab IS NOT NULL and l_identifier_tab.COUNT > 0 THEN
1727: IF PG_DEBUG in ('Y', 'C') THEN
1728: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);
1729: END IF;
1730:
1731: FORALL i IN 1..l_identifier_tab.COUNT
1732: UPDATE msc_alloc_demands

Line 1821: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);

1817:
1818: IF l_identifier_tab IS NOT NULL and l_identifier_tab.COUNT > 0 THEN
1819:
1820: IF PG_DEBUG in ('Y', 'C') THEN
1821: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);
1822: END IF;
1823:
1824: FORALL i IN 1..l_identifier_tab.COUNT
1825: UPDATE msc_alloc_demands

Line 1849: msc_sch_wb.atp_debug('Delete_Row: ' || 'Copy SO will be created for identifier ' || l_identifier_tab(i));

1845: FOR i IN 1..i_item_id_tab.COUNT LOOP
1846: IF l_current_refresh_number IS NULL -- summary has not run
1847: OR l_refresh_number_tab(i) > l_current_refresh_number THEN
1848: IF PG_DEBUG in ('Y', 'C') THEN
1849: msc_sch_wb.atp_debug('Delete_Row: ' || 'Copy SO will be created for identifier ' || l_identifier_tab(i));
1850: END IF;
1851:
1852: i_ins_item_id_tab.Extend;
1853: l_ins_org_id_tab.Extend;

Line 1923: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);

1919:
1920: IF l_identifier_tab IS NOT NULL and l_identifier_tab.COUNT > 0 THEN
1921:
1922: IF PG_DEBUG in ('Y', 'C') THEN
1923: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);
1924: END IF;
1925:
1926: FORALL i IN 1..l_identifier_tab.COUNT
1927: UPDATE msc_alloc_supplies

Line 1953: msc_sch_wb.atp_debug('Delete_Row: ' || 'Copy stealing will be created for identifier ' || l_identifier_tab(i));

1949: IF l_current_refresh_number IS NULL -- summary has not run
1950: OR l_refresh_number_tab(i) > l_current_refresh_number THEN
1951:
1952: IF PG_DEBUG in ('Y', 'C') THEN
1953: msc_sch_wb.atp_debug('Delete_Row: ' || 'Copy stealing will be created for identifier ' || l_identifier_tab(i));
1954: END IF;
1955:
1956: i_ins_item_id_tab.Extend;
1957: l_ins_org_id_tab.Extend;

Line 1982: msc_sch_wb.atp_debug('Delete_Row: i_ins_item_id_tab.COUNT ' || i_ins_item_id_tab.COUNT);

1978:
1979:
1980: IF i_ins_item_id_tab IS NOT NULL and i_ins_item_id_tab.COUNT > 0 THEN
1981: IF PG_DEBUG in ('Y', 'C') THEN
1982: msc_sch_wb.atp_debug('Delete_Row: i_ins_item_id_tab.COUNT ' || i_ins_item_id_tab.COUNT);
1983: END IF;
1984:
1985: FORALL i IN 1..i_ins_item_id_tab.COUNT
1986: INSERT INTO MSC_ALLOC_DEMANDS(

Line 2046: msc_sch_wb.atp_debug('Summary mode commit, in Delete_Row');

2042: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 AND G_ORIG_INV_CTP = 5 THEN
2043: -- Condition for INV_CTP added for bug 3295831 because summary
2044: -- is not supported in PDS-ODS switch.
2045: IF PG_DEBUG in ('Y', 'C') THEN
2046: msc_sch_wb.atp_debug('Summary mode commit, in Delete_Row');
2047: END IF;
2048: commit;
2049: END IF;
2050:

Line 2052: msc_sch_wb.atp_debug('**********End Delete_Row Procedure************');

2048: commit;
2049: END IF;
2050:
2051: IF PG_DEBUG in ('Y', 'C') THEN
2052: msc_sch_wb.atp_debug('**********End Delete_Row Procedure************');
2053: END IF;
2054:
2055: EXCEPTION
2056: WHEN OTHERS THEN

Line 2062: msc_sch_wb.atp_debug('Delete_Row :' || sqlcode || ': ' || sqlerrm);

2058: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME , 'Delete_Row');
2059: END IF;
2060:
2061: IF PG_DEBUG in ('Y', 'C') THEN
2062: msc_sch_wb.atp_debug('Delete_Row :' || sqlcode || ': ' || sqlerrm);
2063: END IF;
2064: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2065:
2066: END Delete_Row;

Line 2118: msc_sch_wb.atp_debug('***** Begin Remove_Invalid_SD_Rec Procedure *****');

2114: l_atf_date date;
2115:
2116: BEGIN
2117: IF PG_DEBUG in ('Y', 'C') THEN
2118: msc_sch_wb.atp_debug('***** Begin Remove_Invalid_SD_Rec Procedure *****');
2119: END IF;
2120:
2121: -- for ods, just need to remove the record from msc_sales_orders
2122: -- initialize API return status to success

Line 2126: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Reset all the global variables ');

2122: -- initialize API return status to success
2123: x_return_status := FND_API.G_RET_STS_SUCCESS;
2124:
2125: -- rajjain 05/19/2003 bug 2959840
2126: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Reset all the global variables ');
2127: -- Begin ATP4drp Allocation not supported for DRP plans.
2128: IF (NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5) THEN
2129: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2130: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;

Line 2132: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

2128: IF (NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5) THEN
2129: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2130: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;
2131: IF PG_DEBUG in ('Y', 'C') THEN
2132: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2133: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'PF and Allocated ATP not applicable for DRP plans');
2134: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2135: END IF;
2136: ELSE

Line 2133: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'PF and Allocated ATP not applicable for DRP plans');

2129: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2130: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;
2131: IF PG_DEBUG in ('Y', 'C') THEN
2132: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2133: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'PF and Allocated ATP not applicable for DRP plans');
2134: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2135: END IF;
2136: ELSE
2137: -- ATP4drp set using the original value

Line 2134: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

2130: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;
2131: IF PG_DEBUG in ('Y', 'C') THEN
2132: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2133: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'PF and Allocated ATP not applicable for DRP plans');
2134: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2135: END IF;
2136: ELSE
2137: -- ATP4drp set using the original value
2138: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;

Line 2145: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);

2141: -- End ATP4drp
2142: MSC_ATP_PVT.G_INV_CTP := FND_PROFILE.value('INV_CTP') ;
2143:
2144: IF PG_DEBUG in ('Y', 'C') THEN
2145: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2146: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2147: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2148: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2149: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);

Line 2146: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);

2142: MSC_ATP_PVT.G_INV_CTP := FND_PROFILE.value('INV_CTP') ;
2143:
2144: IF PG_DEBUG in ('Y', 'C') THEN
2145: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2146: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2147: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2148: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2149: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2150: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);

Line 2147: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);

2143:
2144: IF PG_DEBUG in ('Y', 'C') THEN
2145: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2146: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2147: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2148: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2149: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2150: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);
2151: END IF;

Line 2148: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);

2144: IF PG_DEBUG in ('Y', 'C') THEN
2145: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2146: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2147: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2148: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2149: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2150: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);
2151: END IF;
2152:

Line 2149: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);

2145: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2146: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2147: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2148: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2149: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2150: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);
2151: END IF;
2152:
2153:

Line 2150: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);

2146: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2147: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2148: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2149: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2150: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);
2151: END IF;
2152:
2153:
2154: OPEN pegging;

Line 2162: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);

2158: EXIT WHEN pegging%NOTFOUND;
2159: ---set l_inventory_item_id back to null;
2160: l_inventory_item_id := null;
2161: IF PG_DEBUG in ('Y', 'C') THEN
2162: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2163: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2164: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2165: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);

Line 2163: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);

2159: ---set l_inventory_item_id back to null;
2160: l_inventory_item_id := null;
2161: IF PG_DEBUG in ('Y', 'C') THEN
2162: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2163: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2164: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2165: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);

Line 2164: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);

2160: l_inventory_item_id := null;
2161: IF PG_DEBUG in ('Y', 'C') THEN
2162: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2163: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2164: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2165: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);

Line 2165: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);

2161: IF PG_DEBUG in ('Y', 'C') THEN
2162: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2163: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2164: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2165: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);

Line 2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);

2162: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2163: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2164: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2165: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2170: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);

Line 2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);

2163: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2164: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2165: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2170: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2171: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);

Line 2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);

2164: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2165: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2170: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2171: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2172: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);

Line 2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);

2165: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2170: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2171: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2172: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2173: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);

Line 2170: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);

2166: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2170: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2171: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2172: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2173: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);
2174: END IF;

Line 2171: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);

2167: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2170: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2171: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2172: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2173: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);
2174: END IF;
2175: l_organization_id := null;

Line 2172: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);

2168: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2170: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2171: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2172: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2173: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);
2174: END IF;
2175: l_organization_id := null;
2176:

Line 2173: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);

2169: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2170: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2171: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2172: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2173: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);
2174: END IF;
2175: l_organization_id := null;
2176:
2177: IF p_mode = MSC_ATP_PVT.INVALID or (p_mode=MSC_ATP_PVT.UNDO and p_instance_id is null) THEN

Line 2182: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete this pegging_id '||c1.pegging_id);

2178:
2179: MSC_ATP_DB_UTILS.Delete_Pegging(c1.pegging_id);
2180:
2181: IF PG_DEBUG in ('Y', 'C') THEN
2182: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete this pegging_id '||c1.pegging_id);
2183: END IF;
2184: END IF;
2185:
2186: IF c1.supply_demand_type = 2 THEN

Line 2198: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);

2194: returning inventory_item_id, sr_instance_id,new_order_quantity, organization_id, supplier_id, supplier_site_id
2195: into l_inventory_item_id, l_instance_id, l_sd_qty, l_organization_id, l_supplier_id, l_supplier_site_id;
2196:
2197: IF PG_DEBUG in ('Y', 'C') THEN
2198: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2199: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2200: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2201: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2202: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);

Line 2199: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);

2195: into l_inventory_item_id, l_instance_id, l_sd_qty, l_organization_id, l_supplier_id, l_supplier_site_id;
2196:
2197: IF PG_DEBUG in ('Y', 'C') THEN
2198: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2199: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2200: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2201: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2202: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2203: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);

Line 2200: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);

2196:
2197: IF PG_DEBUG in ('Y', 'C') THEN
2198: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2199: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2200: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2201: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2202: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2203: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2204: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);

Line 2201: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);

2197: IF PG_DEBUG in ('Y', 'C') THEN
2198: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2199: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2200: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2201: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2202: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2203: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2204: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);
2205: END IF;

Line 2202: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);

2198: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2199: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2200: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2201: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2202: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2203: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2204: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);
2205: END IF;
2206:

Line 2203: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);

2199: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2200: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2201: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2202: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2203: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2204: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);
2205: END IF;
2206:
2207: -- time_phased_atp

Line 2204: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);

2200: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2201: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2202: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2203: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2204: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);
2205: END IF;
2206:
2207: -- time_phased_atp
2208: IF (c1.aggregate_time_fence_date is not null)

Line 2216: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: before delete of ' ||

2212: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
2213: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
2214:
2215: IF PG_DEBUG in ('Y', 'C') THEN
2216: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: before delete of ' ||
2217: ' msc_alloc_supplies');
2218: END IF;
2219:
2220: DELETE FROM MSC_ALLOC_SUPPLIES

Line 2225: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of supply deleted from msc_alloc_supplies = '|| SQL%ROWCOUNT);

2221: WHERE parent_transaction_id = c1.identifier3
2222: AND plan_id = c1.identifier2;
2223:
2224: IF PG_DEBUG in ('Y', 'C') THEN
2225: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of supply deleted from msc_alloc_supplies = '|| SQL%ROWCOUNT);
2226: END IF;
2227: END IF;
2228: -- Allocated ATP Based on Planning Details -- Agilent changes End
2229:

Line 2237: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'update summary table');

2233: IF c1.summary_flag = 'Y' and (c1.identifier3 > 0) and (p_plan_id = -1) THEN
2234: -- Check for Plan_id=-1 added for summary enhancement
2235: --- update the MSC_ATP_SUMMARY_SD table
2236: IF PG_DEBUG in ('Y', 'C') THEN
2237: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'update summary table');
2238: END IF;
2239: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2240: p_plan_id,
2241: l_organization_id,

Line 2260: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'no of rows updated in summary mode := ' || SQL%ROWCOUNT);

2256: inventory_item_id = l_inventory_item_id and
2257: organization_id = l_organization_id and
2258: sd_date = trunc(c1.supply_demand_date);
2259: IF PG_DEBUG in ('Y', 'C') THEN
2260: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'no of rows updated in summary mode := ' || SQL%ROWCOUNT);
2261: END IF;
2262:
2263: commit;
2264: END IF;

Line 2275: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete stealing demand from msc_demands, demand_id = '||

2271:
2272: IF NVL(c1.char1, '@@@') <> '@@@' THEN
2273:
2274: IF PG_DEBUG in ('Y', 'C') THEN
2275: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete stealing demand from msc_demands, demand_id = '||
2276: c1.identifier3);
2277: END IF;
2278:
2279: DELETE FROM MSC_DEMANDS

Line 2293: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_demand, demand_id = '||

2289: IF NVL(c1.inventory_item_id, -1) > 0 AND c1.identifier3 is not null THEN
2290: IF c1.identifier2 <> -1 THEN
2291:
2292: IF PG_DEBUG in ('Y', 'C') THEN
2293: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_demand, demand_id = '||
2294: c1.identifier3);
2295: END IF;
2296:
2297: -- Bug 1661545, if scheduling was unsuccessful, old demand record needs to be

Line 2314: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);

2310: l_sd_qty, l_organization_id,
2311: l_sd_date;
2312:
2313: IF PG_DEBUG in ('Y', 'C') THEN
2314: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2315: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2316: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2317: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2318: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);

Line 2315: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

2311: l_sd_date;
2312:
2313: IF PG_DEBUG in ('Y', 'C') THEN
2314: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2315: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2316: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2317: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2318: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);

Line 2316: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);

2312:
2313: IF PG_DEBUG in ('Y', 'C') THEN
2314: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2315: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2316: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2317: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2318: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);

Line 2317: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);

2313: IF PG_DEBUG in ('Y', 'C') THEN
2314: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2315: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2316: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2317: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2318: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2321: END IF;

Line 2318: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);

2314: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2315: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2316: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2317: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2318: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2321: END IF;
2322:

Line 2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);

2315: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2316: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2317: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2318: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2321: END IF;
2322:
2323: -- time_phased_atp

Line 2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);

2316: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2317: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2318: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2321: END IF;
2322:
2323: -- time_phased_atp
2324: IF (c1.aggregate_time_fence_date is not null)

Line 2332: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: before delete of' ||

2328: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
2329: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
2330:
2331: IF PG_DEBUG in ('Y', 'C') THEN
2332: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: before delete of' ||
2333: ' msc_alloc_demands');
2334: END IF;
2335:
2336: DELETE FROM MSC_ALLOC_DEMANDS

Line 2342: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_alloc_demands = '|| SQL%ROWCOUNT);

2338: AND old_allocated_quantity IS NULL
2339: AND plan_id = c1.identifier2;
2340:
2341: IF PG_DEBUG in ('Y', 'C') THEN
2342: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_alloc_demands = '|| SQL%ROWCOUNT);
2343: END IF;
2344: END IF;
2345: -- Allocated ATP Based on Planning Details -- Agilent changes End
2346:

Line 2353: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary mode, delete demand');

2349: /**
2350: IF (c1.summary_flag = 'Y') AND (c1.identifier3 > 0) and (p_plan_id = -1) THEN
2351: -- Check for Plan_id=-1 added for summary enhancement
2352: IF PG_DEBUG in ('Y', 'C') THEN
2353: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary mode, delete demand');
2354: END IF;
2355: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2356: p_plan_id,
2357: l_organization_id,

Line 2376: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'no of rows updated in summary mode := ' || SQL%ROWCOUNT);

2372: AND organization_id = l_organization_id
2373: AND inventory_item_id = l_inventory_item_id
2374: AND sd_date = trunc(l_sd_date);
2375: IF PG_DEBUG in ('Y', 'C') THEN
2376: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'no of rows updated in summary mode := ' || SQL%ROWCOUNT);
2377: END IF;
2378:
2379: commit;
2380: END IF;

Line 2388: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'update suppliers info ');

2384: -- Code to update summary records and committing removed for Bug 3295831
2385: /** code commented for time being. Will be removed after code review
2386: IF (c1.summary_flag = 'Y') AND (NVL(c1.supplier_id, -1) <> -1) THEN
2387: IF PG_DEBUG in ('Y', 'C') THEN
2388: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'update suppliers info ');
2389: END IF;
2390: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(c1.identifier1,
2391: p_plan_id,
2392: null,

Line 2413: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Number of rows updated in SUMMARY_SUP := ' || SQL%ROWCOUNT);

2409: and supplier_site_id = c1.supplier_site_id
2410: and sd_date = trunc(c1.supplier_atp_date);
2411:
2412: IF PG_DEBUG in ('Y', 'C') THEN
2413: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Number of rows updated in SUMMARY_SUP := ' || SQL%ROWCOUNT);
2414: END IF;
2415:
2416: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(c1.identifier1,
2417: p_plan_id,

Line 2436: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_sales_orders, demand_id = '||

2432:
2433: ELSE -- IF c1.identifier2 <> -1 THEN
2434:
2435: IF PG_DEBUG in ('Y', 'C') THEN
2436: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_sales_orders, demand_id = '||
2437: c1.identifier3);
2438: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'demand_source_line := ' || to_char(c1.order_line_id));
2439: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'sr_instance_id := ' || c1.identifier1);
2440: END IF;

Line 2438: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'demand_source_line := ' || to_char(c1.order_line_id));

2434:
2435: IF PG_DEBUG in ('Y', 'C') THEN
2436: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_sales_orders, demand_id = '||
2437: c1.identifier3);
2438: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'demand_source_line := ' || to_char(c1.order_line_id));
2439: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'sr_instance_id := ' || c1.identifier1);
2440: END IF;
2441:
2442: DELETE from msc_sales_orders

Line 2439: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'sr_instance_id := ' || c1.identifier1);

2435: IF PG_DEBUG in ('Y', 'C') THEN
2436: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_sales_orders, demand_id = '||
2437: c1.identifier3);
2438: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'demand_source_line := ' || to_char(c1.order_line_id));
2439: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'sr_instance_id := ' || c1.identifier1);
2440: END IF;
2441:
2442: DELETE from msc_sales_orders
2443: WHERE demand_id = c1.identifier3

Line 2454: msc_sch_wb.atp_debug('Rows deleted := ' || SQL%ROWCOUNT);

2450: into l_inventory_item_id, l_demand_class, l_instance_id,
2451: l_sd_qty, l_sd_date;
2452:
2453: IF PG_DEBUG in ('Y', 'C') THEN
2454: msc_sch_wb.atp_debug('Rows deleted := ' || SQL%ROWCOUNT);
2455: END IF;
2456:
2457: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND G_ORIG_INV_CTP = 5 THEN
2458: -- Condition for INV_CTP added for bug 3295831 because summary

Line 2461: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');

2457: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND G_ORIG_INV_CTP = 5 THEN
2458: -- Condition for INV_CTP added for bug 3295831 because summary
2459: -- is not supported in PDS-ODS switch.
2460: IF PG_DEBUG in ('Y', 'C') THEN
2461: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2462: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2463: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2464: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);

Line 2462: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);

2458: -- Condition for INV_CTP added for bug 3295831 because summary
2459: -- is not supported in PDS-ODS switch.
2460: IF PG_DEBUG in ('Y', 'C') THEN
2461: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2462: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2463: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2464: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2466: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);

Line 2463: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);

2459: -- is not supported in PDS-ODS switch.
2460: IF PG_DEBUG in ('Y', 'C') THEN
2461: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2462: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2463: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2464: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2466: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2467: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);

Line 2464: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);

2460: IF PG_DEBUG in ('Y', 'C') THEN
2461: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2462: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2463: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2464: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2466: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2467: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2468: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);

Line 2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);

2461: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2462: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2463: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2464: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2466: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2467: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2468: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2469: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);

Line 2466: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);

2462: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2463: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2464: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2466: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2467: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2468: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2469: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);
2470: END IF;

Line 2467: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);

2463: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2464: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2466: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2467: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2468: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2469: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);
2470: END IF;
2471:

Line 2468: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);

2464: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2466: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2467: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2468: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2469: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);
2470: END IF;
2471:
2472: BEGIN

Line 2469: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);

2465: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2466: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2467: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2468: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2469: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);
2470: END IF;
2471:
2472: BEGIN
2473: IF PG_DEBUG in ('Y', 'C') THEN

Line 2474: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item id after conversion := ' || l_inventory_item_id);

2470: END IF;
2471:
2472: BEGIN
2473: IF PG_DEBUG in ('Y', 'C') THEN
2474: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item id after conversion := ' || l_inventory_item_id);
2475: END IF;
2476:
2477: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2478: -1,

Line 2523: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || sqlerrm);

2519:
2520: EXCEPTION
2521: WHEN OTHERS THEN
2522: IF PG_DEBUG in ('Y', 'C') THEN
2523: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || sqlerrm);
2524: END IF;
2525: END;
2526: END IF;
2527:

Line 2540: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);

2536: returning department_id, resource_id, organization_id, start_date, sr_instance_id
2537: into l_department_id, l_resource_id, l_organization_id, l_start_date, l_instance_id;
2538:
2539: IF PG_DEBUG in ('Y', 'C') THEN
2540: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2541: END IF;
2542:
2543: -- Code to update summary records and committing removed for summary enhancement
2544: /** code commented for time being. Will be removed after code review

Line 2547: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);

2543: -- Code to update summary records and committing removed for summary enhancement
2544: /** code commented for time being. Will be removed after code review
2545: IF c1.summary_flag = 'Y' THEN
2546: IF PG_DEBUG in ('Y', 'C') THEN
2547: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2548: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2549: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2550: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2551: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);

Line 2548: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);

2544: /** code commented for time being. Will be removed after code review
2545: IF c1.summary_flag = 'Y' THEN
2546: IF PG_DEBUG in ('Y', 'C') THEN
2547: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2548: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2549: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2550: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2551: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);
2552: END IF;

Line 2549: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);

2545: IF c1.summary_flag = 'Y' THEN
2546: IF PG_DEBUG in ('Y', 'C') THEN
2547: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2548: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2549: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2550: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2551: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);
2552: END IF;
2553:

Line 2550: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);

2546: IF PG_DEBUG in ('Y', 'C') THEN
2547: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2548: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2549: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2550: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2551: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);
2552: END IF;
2553:
2554: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,

Line 2551: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);

2547: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2548: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2549: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2550: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2551: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);
2552: END IF;
2553:
2554: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2555: p_plan_id,

Line 2577: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Number of row updated in MSC_ATP_SUMMARY_RES := ' || SQL%ROWCOUNT);

2573: and resource_id = l_resource_id
2574: and sd_date = trunc(l_start_date);
2575:
2576: IF PG_DEBUG in ('Y', 'C') THEN
2577: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Number of row updated in MSC_ATP_SUMMARY_RES := ' || SQL%ROWCOUNT);
2578: END IF;
2579:
2580: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2581: p_plan_id,

Line 2604: msc_sch_wb.atp_debug('***** End Remove_Invalid_SD_Rec Procedure *****');

2600: END LOOP;
2601: CLOSE pegging;
2602:
2603: IF PG_DEBUG in ('Y', 'C') THEN
2604: msc_sch_wb.atp_debug('***** End Remove_Invalid_SD_Rec Procedure *****');
2605: END IF;
2606:
2607: END Remove_Invalid_SD_Rec;
2608:

Line 2619: msc_sch_wb.atp_debug('Begin Update_Pegging,p_pegging_id='||p_pegging_id);

2615: IS
2616: BEGIN
2617:
2618: IF PG_DEBUG in ('Y', 'C') THEN
2619: msc_sch_wb.atp_debug('Begin Update_Pegging,p_pegging_id='||p_pegging_id);
2620: END IF;
2621:
2622: UPDATE mrp_atp_details_temp
2623: SET supply_demand_quantity = NVL(p_quantity, supply_demand_quantity),

Line 2637: msc_sch_wb.atp_debug('End Update_Pegging');

2633: AND session_id = MSC_ATP_PVT.G_SESSION_ID
2634: AND record_type = 3;
2635:
2636: IF PG_DEBUG in ('Y', 'C') THEN
2637: msc_sch_wb.atp_debug('End Update_Pegging');
2638: END IF;
2639: EXCEPTION
2640: WHEN OTHERS THEN
2641: IF PG_DEBUG in ('Y', 'C') THEN

Line 2642: msc_sch_wb.atp_debug('something wrong : Update_Pegging : ' || sqlcode);

2638: END IF;
2639: EXCEPTION
2640: WHEN OTHERS THEN
2641: IF PG_DEBUG in ('Y', 'C') THEN
2642: msc_sch_wb.atp_debug('something wrong : Update_Pegging : ' || sqlcode);
2643: END IF;
2644: END Update_Pegging;
2645:
2646: PROCEDURE Update_Planned_Order(

Line 2691: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');

2687:
2688: BEGIN
2689:
2690: IF PG_DEBUG in ('Y', 'C') THEN
2691: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2692: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2693: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2694: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);

Line 2692: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);

2688: BEGIN
2689:
2690: IF PG_DEBUG in ('Y', 'C') THEN
2691: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2692: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2693: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2694: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);

Line 2693: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);

2689:
2690: IF PG_DEBUG in ('Y', 'C') THEN
2691: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2692: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2693: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2694: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);

Line 2694: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);

2690: IF PG_DEBUG in ('Y', 'C') THEN
2691: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2692: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2693: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2694: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);

Line 2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);

2691: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2692: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2693: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2694: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);

Line 2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);

2692: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2693: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2694: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2700: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);

Line 2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);

2693: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2694: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2700: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2701: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);

Line 2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);

2694: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2700: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2701: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2702: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);

Line 2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);

2695: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2700: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2701: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2702: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2703: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);

Line 2700: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);

2696: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2700: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2701: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2702: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2703: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);
2704: END IF;

Line 2701: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);

2697: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2700: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2701: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2702: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2703: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);
2704: END IF;
2705:

Line 2702: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);

2698: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2700: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2701: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2702: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2703: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);
2704: END IF;
2705:
2706: SELECT identifier3, supply_demand_date, supply_demand_quantity, summary_flag

Line 2703: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);

2699: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2700: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2701: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2702: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2703: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);
2704: END IF;
2705:
2706: SELECT identifier3, supply_demand_date, supply_demand_quantity, summary_flag
2707: ,aggregate_time_fence_date -- for time_phased_atp

Line 2718: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');

2714: AND record_type = 3
2715: AND session_id = MSC_ATP_PVT.G_SESSION_ID ;
2716:
2717: IF PG_DEBUG in ('Y', 'C') THEN
2718: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2719: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2720: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2721: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2722: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);

Line 2719: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);

2715: AND session_id = MSC_ATP_PVT.G_SESSION_ID ;
2716:
2717: IF PG_DEBUG in ('Y', 'C') THEN
2718: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2719: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2720: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2721: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2722: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2723: -- ATP4drp print out organizations

Line 2720: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);

2716:
2717: IF PG_DEBUG in ('Y', 'C') THEN
2718: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2719: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2720: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2721: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2722: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2723: -- ATP4drp print out organizations
2724: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

Line 2721: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);

2717: IF PG_DEBUG in ('Y', 'C') THEN
2718: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2719: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2720: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2721: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2722: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2723: -- ATP4drp print out organizations
2724: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2725: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);

Line 2722: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);

2718: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2719: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2720: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2721: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2722: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2723: -- ATP4drp print out organizations
2724: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2725: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2726: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);

Line 2724: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

2720: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2721: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2722: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2723: -- ATP4drp print out organizations
2724: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2725: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2726: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2727: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2728: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);

Line 2725: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);

2721: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2722: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2723: -- ATP4drp print out organizations
2724: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2725: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2726: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2727: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2728: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);
2729: -- ATP4drp print out organizations

Line 2726: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);

2722: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2723: -- ATP4drp print out organizations
2724: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2725: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2726: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2727: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2728: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);
2729: -- ATP4drp print out organizations
2730: END IF;

Line 2727: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);

2723: -- ATP4drp print out organizations
2724: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2725: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2726: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2727: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2728: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);
2729: -- ATP4drp print out organizations
2730: END IF;
2731: --diag_ATP: Do not remove the planned order in diagnostic mode even if the quantity is zero

Line 2728: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);

2724: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2725: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2726: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2727: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2728: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);
2729: -- ATP4drp print out organizations
2730: END IF;
2731: --diag_ATP: Do not remove the planned order in diagnostic mode even if the quantity is zero
2732: IF NVL(p_quantity, -1) = 0 AND (MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 or p_mode = MSC_ATP_PVT.INVALID) THEN

Line 2743: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after delete mrp_atp_details_temp by calling remove');

2739: 0,
2740: l_return_status);
2741:
2742: IF PG_DEBUG in ('Y', 'C') THEN
2743: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after delete mrp_atp_details_temp by calling remove');
2744: END IF;
2745:
2746: --s_cto_rearch
2747: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN

Line 2755: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after msc_supplies');

2751: END IF;
2752: --e_cto_rearch
2753:
2754: IF PG_DEBUG in ('Y', 'C') THEN
2755: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after msc_supplies');
2756: END IF;
2757: ELSE
2758:
2759: -- dsting diag_atp.

Line 2765: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after first update to mrp_atp_details_temp');

2761: MSC_ATP_DB_UTILS.Update_Pegging(p_pegging_id, p_date, p_quantity);
2762: END IF;
2763:
2764: IF PG_DEBUG in ('Y', 'C') THEN
2765: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after first update to mrp_atp_details_temp');
2766: END IF;
2767:
2768: -- For bug 2259824, move the supply to the end of day
2769: --s_cto_rearch:

Line 2810: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := '|| l_organization_id);

2806: END IF;
2807: --e_cto_rearch
2808:
2809: IF PG_DEBUG in ('Y', 'C') THEN
2810: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := '|| l_organization_id);
2811: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2812: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2813: END IF;
2814:

Line 2811: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

2807: --e_cto_rearch
2808:
2809: IF PG_DEBUG in ('Y', 'C') THEN
2810: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := '|| l_organization_id);
2811: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2812: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2813: END IF;
2814:
2815: -- time_phased_atp

Line 2812: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);

2808:
2809: IF PG_DEBUG in ('Y', 'C') THEN
2810: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := '|| l_organization_id);
2811: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2812: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2813: END IF;
2814:
2815: -- time_phased_atp
2816: IF (p_mem_item_id <> p_pf_item_id) and (l_atf_date is not null) THEN

Line 2829: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Error occured in procedure Update_PF_Rollup_Supplies');

2825: l_return_status
2826: );
2827: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2828: IF PG_DEBUG in ('Y', 'C') THEN
2829: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Error occured in procedure Update_PF_Rollup_Supplies');
2830: END IF;
2831: RAISE FND_API.G_EXC_ERROR;
2832: END IF;
2833:

Line 2841: msc_sch_wb.atp_debug('Update_Planned_Order: before update of' ||

2837: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
2838: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
2839:
2840: IF PG_DEBUG in ('Y', 'C') THEN
2841: msc_sch_wb.atp_debug('Update_Planned_Order: before update of' ||
2842: ' msc_alloc_supplies');
2843: END IF;
2844:
2845: UPDATE msc_alloc_supplies

Line 2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows updated := ' || SQL%ROWCOUNT);

2852: WHERE plan_id = p_plan_id
2853: AND parent_transaction_id = l_transaction_id;
2854:
2855: IF PG_DEBUG in ('Y', 'C') THEN
2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows updated := ' || SQL%ROWCOUNT);
2857: END IF;
2858: END IF;
2859:
2860: -- Allocated ATP Based on Planning Details -- Agilent changes End

Line 2866: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'in Summary mode, update planned orders');

2862: -- Code to update summary records and committing removed for summary enhancement
2863: /** code commented for time being. Will be removed after code review
2864: IF l_summary_flag = 'Y' THEN
2865: IF PG_DEBUG in ('Y', 'C') THEN
2866: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'in Summary mode, update planned orders');
2867: END IF;
2868: IF (p_date is NULL) THEN
2869:
2870: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,

Line 2885: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'old and new dates are same');

2881: 2);
2882:
2883: --- old and new dates are same
2884: IF PG_DEBUG in ('Y', 'C') THEN
2885: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'old and new dates are same');
2886: END IF;
2887: update /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) *//* msc_atp_summary_sd
2888: set sd_qty = sd_qty - l_sd_qty + p_quantity
2889: where plan_id = p_plan_id

Line 2910: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'old and new dates are not same');

2906: 2);
2907:
2908: ELSE
2909: IF PG_DEBUG in ('Y', 'C') THEN
2910: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'old and new dates are not same');
2911: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Update summary for old date');
2912: END IF;
2913:
2914: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,

Line 2911: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Update summary for old date');

2907:
2908: ELSE
2909: IF PG_DEBUG in ('Y', 'C') THEN
2910: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'old and new dates are not same');
2911: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Update summary for old date');
2912: END IF;
2913:
2914: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2915: p_plan_id,

Line 2952: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'update the qty on new date ');

2948:
2949: --- if record exists then update
2950: commit;
2951: IF PG_DEBUG in ('Y', 'C') THEN
2952: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'update the qty on new date ');
2953: END IF;
2954:
2955: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2956: p_plan_id,

Line 2979: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'insert qty on new date');

2975:
2976: IF SQL%NOTFOUND THEN
2977: -- record doesn't exists. insert the record
2978: IF PG_DEBUG in ('Y', 'C') THEN
2979: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'insert qty on new date');
2980: END IF;
2981:
2982: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
2983: l_instance_id,

Line 3019: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);

3015: l_plan_id := NULL;
3016: END ;
3017:
3018: IF PG_DEBUG in ('Y', 'C') THEN
3019: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3020: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3021: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3022: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3023: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);

Line 3020: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);

3016: END ;
3017:
3018: IF PG_DEBUG in ('Y', 'C') THEN
3019: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3020: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3021: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3022: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3023: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3024: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);

Line 3021: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);

3017:
3018: IF PG_DEBUG in ('Y', 'C') THEN
3019: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3020: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3021: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3022: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3023: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3024: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3025: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);

Line 3022: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);

3018: IF PG_DEBUG in ('Y', 'C') THEN
3019: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3020: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3021: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3022: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3023: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3024: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3025: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3026: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);

Line 3023: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);

3019: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3020: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3021: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3022: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3023: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3024: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3025: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3026: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
3027: END IF;

Line 3024: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);

3020: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3021: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3022: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3023: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3024: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3025: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3026: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
3027: END IF;
3028:

Line 3025: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);

3021: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3022: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3023: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3024: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3025: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3026: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
3027: END IF;
3028:
3029: --- update supplier info

Line 3026: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);

3022: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3023: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3024: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3025: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3026: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
3027: END IF;
3028:
3029: --- update supplier info
3030: IF l_demand_id is not null AND p_quantity IS NOT NULL THEN

Line 3033: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after 4');

3029: --- update supplier info
3030: IF l_demand_id is not null AND p_quantity IS NOT NULL THEN
3031:
3032: IF PG_DEBUG in ('Y', 'C') THEN
3033: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after 4');
3034: END IF;
3035: l_inventory_item_id := null;
3036:
3037: -- dsting diag_atp do not adjust demands

Line 3051: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows update := ' || SQL%ROWCOUNT);

3047: AND plan_id = l_plan_id
3048: returning sr_instance_id, inventory_item_id into l_instance_id, l_inventory_item_id;
3049:
3050: IF PG_DEBUG in ('Y', 'C') THEN
3051: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3052: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3053: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3054: END IF;
3055:

Line 3052: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);

3048: returning sr_instance_id, inventory_item_id into l_instance_id, l_inventory_item_id;
3049:
3050: IF PG_DEBUG in ('Y', 'C') THEN
3051: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3052: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3053: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3054: END IF;
3055:
3056: -- dsting 2754446. do i really want to do this

Line 3053: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

3049:
3050: IF PG_DEBUG in ('Y', 'C') THEN
3051: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3052: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3053: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3054: END IF;
3055:
3056: -- dsting 2754446. do i really want to do this
3057: IF l_prim_uom_dmd_qty <> l_sd_qty THEN

Line 3074: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');

3070: l_return_status
3071: );
3072: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3073: IF PG_DEBUG in ('Y', 'C') THEN
3074: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');
3075: END IF;
3076: RAISE FND_API.G_EXC_ERROR;
3077: END IF;
3078:

Line 3086: msc_sch_wb.atp_debug('Update_Planned_Order: before update of' ||

3082: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
3083: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
3084:
3085: IF PG_DEBUG in ('Y', 'C') THEN
3086: msc_sch_wb.atp_debug('Update_Planned_Order: before update of' ||
3087: ' msc_alloc_demands');
3088: END IF;
3089: UPDATE msc_alloc_demands
3090: SET allocated_quantity = MSC_ATP_UTILS.Truncate_Demand(l_prim_uom_dmd_qty) --5598066

Line 3095: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows updated := ' || SQL%ROWCOUNT);

3091: WHERE parent_demand_id = l_demand_id
3092: AND plan_id = l_plan_id;
3093:
3094: IF PG_DEBUG in ('Y', 'C') THEN
3095: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows updated := ' || SQL%ROWCOUNT);
3096: END IF;
3097:
3098: END IF;
3099:

Line 3107: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Summary Mode- update planned order demand');

3103: /** code commented for time being. Will be removed after code review
3104: IF l_summary_flag = 'Y' THEN
3105:
3106: IF PG_DEBUG in ('Y', 'C') THEN
3107: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Summary Mode- update planned order demand');
3108: END IF;
3109: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
3110: l_plan_id,
3111: l_organization_id,

Line 3138: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);

3134: END IF; -- if not DIAGNOSTIC ATP then update demands
3135: --5239441
3136: ELSIF p_quantity IS NOT NULL and NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5 THEN
3137: IF PG_DEBUG in ('Y', 'C') THEN
3138: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3139: END IF;
3140: l_prim_uom_dmd_qty := p_quantity * nvl(p_uom_conv_rate, 1);
3141: IF l_prim_uom_dmd_qty <> l_sd_qty THEN
3142: MSC_ATP_DB_UTILS.UPDATE_PEGGING(l_child_pegging_id, null, l_prim_uom_dmd_qty);

Line 3149: msc_sch_wb.atp_debug('***** END Update_Planned_Order Procedure *****');

3145:
3146: END IF;
3147:
3148: IF PG_DEBUG in ('Y', 'C') THEN
3149: msc_sch_wb.atp_debug('***** END Update_Planned_Order Procedure *****');
3150: END IF;
3151: EXCEPTION
3152: WHEN no_data_found THEN
3153: null;

Line 3155: msc_sch_wb.atp_debug('No Data Found in Update_Planned_Order');

3151: EXCEPTION
3152: WHEN no_data_found THEN
3153: null;
3154: IF PG_DEBUG in ('Y', 'C') THEN
3155: msc_sch_wb.atp_debug('No Data Found in Update_Planned_Order');
3156: END IF;
3157: END Update_Planned_Order;
3158:
3159: PROCEDURE Update_SD_Date(p_identifier IN NUMBER,

Line 3200: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');

3196:
3197: BEGIN
3198:
3199: IF PG_DEBUG in ('Y', 'C') THEN
3200: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3201: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3202: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3203: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);

Line 3201: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);

3197: BEGIN
3198:
3199: IF PG_DEBUG in ('Y', 'C') THEN
3200: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3201: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3202: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3203: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);

Line 3202: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);

3198:
3199: IF PG_DEBUG in ('Y', 'C') THEN
3200: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3201: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3202: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3203: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3206: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);

Line 3203: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);

3199: IF PG_DEBUG in ('Y', 'C') THEN
3200: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3201: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3202: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3203: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3206: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3207: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);

Line 3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);

3200: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3201: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3202: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3203: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3206: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3207: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3208: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);

Line 3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);

3201: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3202: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3203: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3206: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3207: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3208: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3209: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);

Line 3206: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);

3202: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3203: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3206: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3207: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3208: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3209: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);
3210: END IF;

Line 3207: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);

3203: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3206: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3207: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3208: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3209: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);
3210: END IF;
3211:

Line 3208: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);

3204: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3206: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3207: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3208: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3209: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);
3210: END IF;
3211:
3212: -- dsting ATO 2465370

Line 3209: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);

3205: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3206: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3207: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3208: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3209: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);
3210: END IF;
3211:
3212: -- dsting ATO 2465370
3213: BEGIN

Line 3230: msc_sch_wb.atp_debug('ATO update pegging id ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);

3226: RETURN;
3227: END;
3228:
3229: IF PG_DEBUG in ('Y','C') THEN
3230: msc_sch_wb.atp_debug('ATO update pegging id ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
3231: END IF;
3232:
3233: IF p_plan_id = -1 THEN
3234: -- ngoel, changed for performance reason, don't

Line 3258: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Summary Flag is on');

3254: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND NVL(l_inventory_item_id, 0) > 0
3255: AND G_ORIG_INV_CTP = 5 THEN -- Condition added for bug 3295831 because summary
3256: -- is not supported in PDS-ODS switch.
3257: IF PG_DEBUG in ('Y', 'C') THEN
3258: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Summary Flag is on');
3259: END IF;
3260: --- get the old quantity and other info from pegging
3261: BEGIN
3262: --- G_DEMAND_PEGGING_ID wil be null for non atpbale items

Line 3279: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

3275: END;
3276: ----update the quantity on old date
3277:
3278: IF PG_DEBUG in ('Y', 'C') THEN
3279: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3280: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3281: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3282: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3283: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);

Line 3280: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);

3276: ----update the quantity on old date
3277:
3278: IF PG_DEBUG in ('Y', 'C') THEN
3279: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3280: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3281: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3282: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3283: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3284: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');

Line 3281: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);

3277:
3278: IF PG_DEBUG in ('Y', 'C') THEN
3279: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3280: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3281: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3282: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3283: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3284: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3285: END IF;

Line 3282: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);

3278: IF PG_DEBUG in ('Y', 'C') THEN
3279: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3280: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3281: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3282: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3283: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3284: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3285: END IF;
3286:

Line 3283: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);

3279: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3280: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3281: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3282: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3283: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3284: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3285: END IF;
3286:
3287: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,

Line 3284: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');

3280: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3281: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3282: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3283: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3284: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3285: END IF;
3286:
3287: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3288: -1,

Line 3313: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'update the qty on new date ');

3309: ---check if record for new date exists in summary table
3310:
3311: --- if record exists then update
3312: IF PG_DEBUG in ('Y', 'C') THEN
3313: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'update the qty on new date ');
3314: END IF;
3315:
3316: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3317: -1,

Line 3340: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'insert qty on new date');

3336:
3337: IF SQL%NOTFOUND THEN
3338: -- record doesn't exists. insert the record
3339: IF PG_DEBUG in ('Y', 'C') THEN
3340: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'insert qty on new date');
3341: END IF;
3342: BEGIN
3343: insert /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ into msc_atp_summary_so
3344: (plan_id,

Line 3418: msc_sch_wb.atp_debug('Inside If of else p_plan_id = -1'); --bug3397904

3414: IF (p_supply_demand_qty IS NOT NULL OR p_supply_demand_date IS NOT NULL) THEN
3415:
3416: -- For bug 2259824, move the demand to the end of day
3417: IF PG_DEBUG in ('Y', 'C') THEN
3418: msc_sch_wb.atp_debug('Inside If of else p_plan_id = -1'); --bug3397904
3419: END IF;
3420:
3421: UPDATE MSC_DEMANDS
3422: SET

Line 3494: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');

3490: p_atp_rec -- For bug 3226083
3491: );
3492: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3493: IF PG_DEBUG in ('Y', 'C') THEN
3494: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
3495: END IF;
3496: RAISE FND_API.G_EXC_ERROR;
3497: END IF;
3498: -- time_phased_atp changes end

Line 3507: msc_sch_wb.atp_debug('Update_SD_Date: before update of ' ||

3503: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
3504: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
3505:
3506: IF PG_DEBUG in ('Y', 'C') THEN
3507: msc_sch_wb.atp_debug('Update_SD_Date: before update of ' ||
3508: ' msc_alloc_demands');
3509: END IF;
3510:
3511: UPDATE MSC_ALLOC_DEMANDS

Line 3523: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'No of rows updated := ' || SQL%ROWCOUNT);

3519: AND INVENTORY_ITEM_ID = l_inventory_item_id
3520: AND ORGANIZATION_ID = l_org_id;
3521:
3522: IF PG_DEBUG in ('Y', 'C') THEN
3523: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'No of rows updated := ' || SQL%ROWCOUNT);
3524: END IF;
3525:
3526: END IF;
3527:

Line 3535: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Summary Flag is on');

3531: /** code commented for time being. Will be removed after code review
3532: IF l_summary_flag = 'Y' AND NVL(l_inventory_item_id, 0) > 0 THEN
3533:
3534: IF PG_DEBUG in ('Y', 'C') THEN
3535: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Summary Flag is on');
3536: END IF;
3537: --update the quantity on old date
3538:
3539: IF PG_DEBUG in ('Y', 'C') THEN

Line 3540: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

3536: END IF;
3537: --update the quantity on old date
3538:
3539: IF PG_DEBUG in ('Y', 'C') THEN
3540: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3541: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3542: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3543: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3544: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);

Line 3541: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);

3537: --update the quantity on old date
3538:
3539: IF PG_DEBUG in ('Y', 'C') THEN
3540: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3541: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3542: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3543: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3544: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3545: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');

Line 3542: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);

3538:
3539: IF PG_DEBUG in ('Y', 'C') THEN
3540: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3541: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3542: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3543: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3544: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3545: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3546: END IF;

Line 3543: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);

3539: IF PG_DEBUG in ('Y', 'C') THEN
3540: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3541: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3542: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3543: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3544: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3545: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3546: END IF;
3547:

Line 3544: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);

3540: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3541: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3542: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3543: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3544: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3545: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3546: END IF;
3547:
3548: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,

Line 3545: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');

3541: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3542: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3543: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3544: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3545: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3546: END IF;
3547:
3548: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3549: p_plan_id,

Line 3570: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'No of rows update := ' || SQL%ROWCOUNT);

3566: sd_date = trunc(p_old_demand_date) and
3567: plan_id = p_plan_id;
3568:
3569: IF PG_DEBUG in ('Y', 'C') THEN
3570: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3571: END IF;
3572: commit;
3573: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3574: p_plan_id,

Line 3588: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'update the qty on new date ');

3584: 2);
3585:
3586: --- if record exists then update
3587: IF PG_DEBUG in ('Y', 'C') THEN
3588: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'update the qty on new date ');
3589: END IF;
3590: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3591: p_plan_id,
3592: l_org_id,

Line 3611: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'No of rows update := ' || SQL%ROWCOUNT);

3607: inventory_item_id = l_inventory_item_id and
3608: organization_id = l_org_id and
3609: sd_date = trunc(p_supply_demand_date);
3610: IF PG_DEBUG in ('Y', 'C') THEN
3611: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3612: END IF;
3613:
3614: IF SQL%NOTFOUND THEN
3615: -- record doesn't exists. insert the record

Line 3617: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'insert qty on new date');

3613:
3614: IF SQL%NOTFOUND THEN
3615: -- record doesn't exists. insert the record
3616: IF PG_DEBUG in ('Y', 'C') THEN
3617: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'insert qty on new date');
3618: END IF;
3619:
3620: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
3621: p_instance_id,

Line 3641: msc_sch_wb.atp_debug('**********End Update_SD_Date Procedure************');

3637: -- is not supported in PDS-ODS switch.
3638: commit;
3639: END IF;
3640: IF PG_DEBUG in ('Y', 'C') THEN
3641: msc_sch_wb.atp_debug('**********End Update_SD_Date Procedure************');
3642: END IF;
3643: EXCEPTION
3644: WHEN OTHERS THEN
3645: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 3708: msc_sch_wb.atp_debug('**********Begin Undo_Delete_Row Procedure************');

3704: l_return_status VARCHAR2(1);
3705:
3706: BEGIN
3707: IF PG_DEBUG in ('Y', 'C') THEN
3708: msc_sch_wb.atp_debug('**********Begin Undo_Delete_Row Procedure************');
3709: END IF;
3710:
3711: --3720018, reverting back incase, rescheduling fails
3712: IF (p_del_ods_demand_ids IS NOT NULL AND p_del_ods_demand_ids.count > 0) THEN

Line 3728: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);

3724: p_del_ods_demand_src_type(m),
3725: -1);
3726: END LOOP;
3727: IF PG_DEBUG in ('Y', 'C') THEN
3728: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);
3729: END IF;
3730: --5357370
3731: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
3732: IF PG_DEBUG in ('Y', 'C') THEN

Line 3733: msc_sch_wb.atp_debug('Inside summary mode set to yes');

3729: END IF;
3730: --5357370
3731: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
3732: IF PG_DEBUG in ('Y', 'C') THEN
3733: msc_sch_wb.atp_debug('Inside summary mode set to yes');
3734: msc_sch_wb.atp_debug('p_identifiers.count := ' || p_identifiers.count);
3735: END IF;
3736: FOR m in 1..p_identifiers.count LOOP
3737: MSC_ATP_DB_UTILS.UNDO_DELETE_SUMMARY_ROW(p_identifiers(m),

Line 3734: msc_sch_wb.atp_debug('p_identifiers.count := ' || p_identifiers.count);

3730: --5357370
3731: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
3732: IF PG_DEBUG in ('Y', 'C') THEN
3733: msc_sch_wb.atp_debug('Inside summary mode set to yes');
3734: msc_sch_wb.atp_debug('p_identifiers.count := ' || p_identifiers.count);
3735: END IF;
3736: FOR m in 1..p_identifiers.count LOOP
3737: MSC_ATP_DB_UTILS.UNDO_DELETE_SUMMARY_ROW(p_identifiers(m),
3738: p_instance_id,

Line 3761: msc_sch_wb.atp_debug('Number of SO lines updated for CTO := ' || SQL%ROWCOUNT);

3757: p_del_ods_cto_dem_src_type(m),
3758: -1);
3759: END LOOP;
3760: IF PG_DEBUG in ('Y', 'C') THEN
3761: msc_sch_wb.atp_debug('Number of SO lines updated for CTO := ' || SQL%ROWCOUNT);
3762: END IF;
3763: END IF;
3764:
3765: -- Bug 2738280. For loop should be inside if condition.

Line 3769: msc_sch_wb.atp_debug('Undo_Delete_Row: ' || 'p_del_demand_ids('||i||') = '|| p_del_demand_ids(i)||

3765: -- Bug 2738280. For loop should be inside if condition.
3766: IF ( p_del_demand_ids IS NOT NULL AND p_del_demand_ids.count > 0) THEN --3720018
3767: IF PG_DEBUG in ('Y', 'C') THEN
3768: FOR i in 1..p_del_demand_ids.COUNT LOOP
3769: msc_sch_wb.atp_debug('Undo_Delete_Row: ' || 'p_del_demand_ids('||i||') = '|| p_del_demand_ids(i)||
3770: 'p_inv_item_ids('||i||') = '|| p_inv_item_ids(i)||
3771: 'p_plan_ids('||i||') = '|| p_plan_ids(i)||
3772: 'p_identifiers('||i||') = '|| p_identifiers(i));
3773: END LOOP;

Line 3802: msc_sch_wb.atp_debug('Undo_Delete_Row: ' || 'No. of demands updated = '|| l_del_rows);

3798:
3799: /* commented for bug 2738280. We should use SQL%BULK_ROWCOUNT for FORALL statemenrs
3800: l_del_rows := SQL%ROWCOUNT;
3801: IF PG_DEBUG in ('Y', 'C') THEN
3802: msc_sch_wb.atp_debug('Undo_Delete_Row: ' || 'No. of demands updated = '|| l_del_rows);
3803: END IF;
3804: */
3805:
3806: -- Bug 2738280. Count how many rows were updated for each demand id

Line 3809: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||

3805:
3806: -- Bug 2738280. Count how many rows were updated for each demand id
3807: IF PG_DEBUG in ('Y', 'C') THEN
3808: FOR m IN 1..p_del_demand_ids.COUNT LOOP
3809: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||
3810: SQL%BULK_ROWCOUNT(m)||' records');
3811: END LOOP;
3812: END IF;
3813:

Line 3818: msc_sch_wb.atp_debug('Undo_Delete_Row: ' || 'update Demands in summary mode');

3814: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') and (p_copy_demand_ids IS NOT NULL) and (p_copy_demand_ids.COUNT > 0) THEN
3815: -- Code to update summary records removed for summary enhancement
3816: /** code commented for time being. Will be removed after code review
3817: IF PG_DEBUG in ('Y', 'C') THEN
3818: msc_sch_wb.atp_debug('Undo_Delete_Row: ' || 'update Demands in summary mode');
3819: END IF;
3820:
3821: -- rajjain 11/05/2002 Now we pass reference to p_identifiers and p_plan_ids array
3822: -- and do bulk update in Undo_Plan_Summary_Row

Line 3873: msc_sch_wb.atp_debug('Undo_Delete_Row: before update of ' ||

3869: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
3870: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
3871:
3872: IF PG_DEBUG in ('Y', 'C') THEN
3873: msc_sch_wb.atp_debug('Undo_Delete_Row: before update of ' ||
3874: ' msc_alloc_demands');
3875: END IF;
3876:
3877: /*bug 6642564 we do no want inventory item id to be updated

Line 3920: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||

3916:
3917: -- Bug 2738280. Count how many rows were updated for each demand id
3918: IF PG_DEBUG in ('Y', 'C') THEN
3919: FOR m IN 1..p_del_demand_ids.COUNT LOOP
3920: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||
3921: SQL%BULK_ROWCOUNT(m)||' records');
3922: END LOOP;
3923: END IF;
3924:

Line 3930: msc_sch_wb.atp_debug('Undo_Delete_Row: before update of ' ||

3926: UPDATE statement for comp demands was here
3927: */
3928:
3929: IF PG_DEBUG in ('Y', 'C') THEN
3930: msc_sch_wb.atp_debug('Undo_Delete_Row: before update of ' ||
3931: ' msc_alloc_supplies');
3932: END IF;
3933:
3934: FORALL m IN 1..p_del_demand_ids.COUNT

Line 3956: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||

3952:
3953: -- Bug 2738280. Count how many rows were updated for each demand id
3954: IF PG_DEBUG in ('Y', 'C') THEN
3955: FOR m IN 1..p_del_demand_ids.COUNT LOOP
3956: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||
3957: SQL%BULK_ROWCOUNT(m)||' records');
3958: END LOOP;
3959: END IF;
3960:

Line 3980: msc_sch_wb.atp_debug('**********End Undo_Delete_Row Procedure************');

3976: l_return_status);
3977: -- End CTO ODR and Simplified Pegging
3978: END IF; --3720018
3979: IF PG_DEBUG in ('Y', 'C') THEN
3980: msc_sch_wb.atp_debug('**********End Undo_Delete_Row Procedure************');
3981: END IF;
3982:
3983: EXCEPTION
3984: WHEN OTHERS THEN

Line 4012: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');

4008: l_sysdate date;
4009:
4010: BEGIN
4011: IF PG_DEBUG in ('Y', 'C') THEN
4012: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
4013: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
4014: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4015: END IF;
4016: BEGIN

Line 4013: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);

4009:
4010: BEGIN
4011: IF PG_DEBUG in ('Y', 'C') THEN
4012: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
4013: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
4014: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4015: END IF;
4016: BEGIN
4017: SELECT D.sr_instance_id,

Line 4014: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);

4010: BEGIN
4011: IF PG_DEBUG in ('Y', 'C') THEN
4012: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
4013: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
4014: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4015: END IF;
4016: BEGIN
4017: SELECT D.sr_instance_id,
4018: D.organization_id,

Line 4087: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'No row found that need to be deleted from summary table');

4083:
4084: EXCEPTION
4085: WHEN NO_DATA_FOUND THEN
4086: IF PG_DEBUG in ('Y', 'C') THEN
4087: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'No row found that need to be deleted from summary table');
4088: END IF;
4089: END;
4090: -- 5357370: need user id for insert
4091: l_user_id := FND_GLOBAL.USER_ID;

Line 4096: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);

4092: l_sysdate := sysdate;
4093:
4094:
4095: IF PG_DEBUG in ('Y', 'C') THEN
4096: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
4097: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
4098: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
4099:
4100: END IF;

Line 4097: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);

4093:
4094:
4095: IF PG_DEBUG in ('Y', 'C') THEN
4096: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
4097: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
4098: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
4099:
4100: END IF;
4101:

Line 4098: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);

4094:
4095: IF PG_DEBUG in ('Y', 'C') THEN
4096: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
4097: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
4098: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
4099:
4100: END IF;
4101:
4102: FOR i in 1..l_inventory_item_id.count LOOP

Line 4104: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');

4100: END IF;
4101:
4102: FOR i in 1..l_inventory_item_id.count LOOP
4103: IF PG_DEBUG in ('Y', 'C') THEN
4104: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4105: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4106: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4107: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4108: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));

Line 4105: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));

4101:
4102: FOR i in 1..l_inventory_item_id.count LOOP
4103: IF PG_DEBUG in ('Y', 'C') THEN
4104: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4105: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4106: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4107: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4108: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4109: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));

Line 4106: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );

4102: FOR i in 1..l_inventory_item_id.count LOOP
4103: IF PG_DEBUG in ('Y', 'C') THEN
4104: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4105: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4106: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4107: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4108: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4109: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4110: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));

Line 4107: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));

4103: IF PG_DEBUG in ('Y', 'C') THEN
4104: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4105: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4106: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4107: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4108: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4109: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4110: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
4111: END IF;

Line 4108: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));

4104: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4105: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4106: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4107: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4108: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4109: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4110: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
4111: END IF;
4112:

Line 4109: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));

4105: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4106: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4107: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4108: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4109: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4110: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
4111: END IF;
4112:
4113: update /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ msc_atp_summary_so

Line 4110: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));

4106: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4107: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4108: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4109: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4110: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
4111: END IF;
4112:
4113: update /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ msc_atp_summary_so
4114: set sd_qty = (sd_qty - l_sd_qty(i))

Line 4123: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: update failed, now try insert');

4119: and demand_class = l_demand_class(i) ;
4120: -- 5357370: this is to handle that we have reservation on the past due date, and
4121: -- we won't be able to find record on sysdate to update.
4122: IF (SQL%NOTFOUND) THEN
4123: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: update failed, now try insert');
4124: --- Insert the new record
4125: BEGIN
4126: INSERT INTO MSC_ATP_SUMMARY_SO
4127: (plan_id,

Line 4186: msc_sch_wb.atp_debug('******Begin Update_plan_summary_row *******');

4182: IS
4183: l_counter PLS_INTEGER;
4184: BEGIN
4185: IF PG_DEBUG in ('Y', 'C') THEN
4186: msc_sch_wb.atp_debug('******Begin Update_plan_summary_row *******');
4187: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4188: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4189:
4190: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP

Line 4187: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);

4183: l_counter PLS_INTEGER;
4184: BEGIN
4185: IF PG_DEBUG in ('Y', 'C') THEN
4186: msc_sch_wb.atp_debug('******Begin Update_plan_summary_row *******');
4187: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4188: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4189:
4190: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4191: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);

Line 4188: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);

4184: BEGIN
4185: IF PG_DEBUG in ('Y', 'C') THEN
4186: msc_sch_wb.atp_debug('******Begin Update_plan_summary_row *******');
4187: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4188: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4189:
4190: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4191: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4192: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));

Line 4191: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);

4187: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4188: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4189:
4190: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4191: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4192: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4193: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4194: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4195: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));

Line 4192: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));

4188: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4189:
4190: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4191: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4192: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4193: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4194: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4195: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));
4196: END LOOP;

Line 4193: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));

4189:
4190: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4191: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4192: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4193: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4194: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4195: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));
4196: END LOOP;
4197:

Line 4194: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));

4190: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4191: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4192: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4193: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4194: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4195: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));
4196: END LOOP;
4197:
4198: END IF;

Line 4195: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));

4191: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4192: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4193: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4194: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4195: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));
4196: END LOOP;
4197:
4198: END IF;
4199:

Line 4212: msc_sch_wb.atp_debug('For inventory Item id '||p_inventory_item_id(l_counter)||': updated '||

4208:
4209: -- Count how many rows were updated for each item
4210: IF PG_DEBUG in ('Y', 'C') THEN
4211: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4212: msc_sch_wb.atp_debug('For inventory Item id '||p_inventory_item_id(l_counter)||': updated '||
4213: SQL%BULK_ROWCOUNT(l_counter)||' records');
4214: END LOOP;
4215: END IF;
4216:

Line 4234: msc_sch_wb.atp_debug('******Begin Undo_plan_summary_row *******');

4230: l_counter PLS_INTEGER;
4231: BEGIN
4232:
4233: IF PG_DEBUG in ('Y', 'C') THEN
4234: msc_sch_wb.atp_debug('******Begin Undo_plan_summary_row *******');
4235: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4236:
4237: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4238: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);

Line 4235: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);

4231: BEGIN
4232:
4233: IF PG_DEBUG in ('Y', 'C') THEN
4234: msc_sch_wb.atp_debug('******Begin Undo_plan_summary_row *******');
4235: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4236:
4237: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4238: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4239: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));

Line 4238: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);

4234: msc_sch_wb.atp_debug('******Begin Undo_plan_summary_row *******');
4235: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4236:
4237: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4238: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4239: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4240: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4241: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4242: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));

Line 4239: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));

4235: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4236:
4237: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4238: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4239: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4240: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4241: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4242: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4243: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));

Line 4240: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));

4236:
4237: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4238: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4239: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4240: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4241: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4242: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4243: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));
4244: END LOOP;

Line 4241: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));

4237: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4238: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4239: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4240: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4241: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4242: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4243: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));
4244: END LOOP;
4245:

Line 4242: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));

4238: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4239: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4240: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4241: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4242: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4243: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));
4244: END LOOP;
4245:
4246: END IF;

Line 4243: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));

4239: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4240: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4241: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4242: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4243: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));
4244: END LOOP;
4245:
4246: END IF;
4247:

Line 4260: msc_sch_wb.atp_debug('For inventory Item id '||p_inventory_item_id(l_counter)||': updated '||

4256:
4257: -- Count how many rows were updated for each item
4258: IF PG_DEBUG in ('Y', 'C') THEN
4259: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4260: msc_sch_wb.atp_debug('For inventory Item id '||p_inventory_item_id(l_counter)||': updated '||
4261: SQL%BULK_ROWCOUNT(l_counter)||' records');
4262: END LOOP;
4263: END IF;
4264:

Line 4281: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');

4277: IS
4278: BEGIN
4279:
4280: IF PG_DEBUG in ('Y', 'C') THEN
4281: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4282: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4283: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4284: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4285: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);

Line 4282: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);

4278: BEGIN
4279:
4280: IF PG_DEBUG in ('Y', 'C') THEN
4281: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4282: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4283: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4284: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4285: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4286: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);

Line 4283: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);

4279:
4280: IF PG_DEBUG in ('Y', 'C') THEN
4281: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4282: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4283: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4284: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4285: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4286: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4287: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);

Line 4284: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);

4280: IF PG_DEBUG in ('Y', 'C') THEN
4281: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4282: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4283: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4284: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4285: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4286: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4287: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4288: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);

Line 4285: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);

4281: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4282: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4283: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4284: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4285: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4286: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4287: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4288: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);
4289: END IF;

Line 4286: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);

4282: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4283: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4284: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4285: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4286: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4287: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4288: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);
4289: END IF;
4290: BEGIN

Line 4287: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);

4283: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4284: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4285: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4286: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4287: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4288: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);
4289: END IF;
4290: BEGIN
4291: insert /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) */ into msc_atp_summary_sd

Line 4288: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);

4284: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4285: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4286: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4287: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4288: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);
4289: END IF;
4290: BEGIN
4291: insert /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) */ into msc_atp_summary_sd
4292: (plan_id,

Line 4332: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'Row already exists in table. Update the row');

4328: null,
4329: 2);
4330:
4331: IF PG_DEBUG in ('Y', 'C') THEN
4332: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'Row already exists in table. Update the row');
4333: END IF;
4334: update /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) */ msc_atp_summary_sd
4335: set sd_qty = sd_qty + p_quantity
4336: where plan_id = p_plan_id

Line 4370: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');

4366:
4367: -- First add the Stealing Data.
4368:
4369: IF PG_DEBUG in ('Y', 'C') THEN
4370: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4371: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4372: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4373: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));

Line 4371: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));

4367: -- First add the Stealing Data.
4368:
4369: IF PG_DEBUG in ('Y', 'C') THEN
4370: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4371: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4372: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4373: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));

Line 4372: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));

4368:
4369: IF PG_DEBUG in ('Y', 'C') THEN
4370: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4371: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4372: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4373: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));

Line 4373: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));

4369: IF PG_DEBUG in ('Y', 'C') THEN
4370: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4371: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4372: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4373: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));

Line 4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));

4370: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4371: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4372: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4373: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4378: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);

Line 4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));

4371: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4372: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4373: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4378: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4379: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);

Line 4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));

4372: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4373: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4378: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4379: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4380: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));

Line 4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));

4373: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4378: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4379: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4380: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4381: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);

Line 4378: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);

4374: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4378: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4379: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4380: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4381: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);
4382: END IF;

Line 4379: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);

4375: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4378: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4379: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4380: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4381: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);
4382: END IF;
4383:

Line 4380: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));

4376: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4378: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4379: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4380: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4381: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);
4382: END IF;
4383:
4384: SELECT msc_supplies_s.nextval into p_transaction_id from dual;

Line 4381: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);

4377: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4378: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4379: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4380: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4381: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);
4382: END IF;
4383:
4384: SELECT msc_supplies_s.nextval into p_transaction_id from dual;
4385:

Line 4387: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'before insert into msc_alloc_supplies-Stealing Info');

4383:
4384: SELECT msc_supplies_s.nextval into p_transaction_id from dual;
4385:
4386: IF PG_DEBUG in ('Y', 'C') THEN
4387: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'before insert into msc_alloc_supplies-Stealing Info');
4388: END IF;
4389:
4390: --ssurendr 25-NOV-2002: From_Demand_Class added in both the insert statements for alloc w/b drill down
4391: INSERT INTO MSC_ALLOC_SUPPLIES

Line 4414: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'before insert into msc_alloc_supplies-Stolen Info');

4410:
4411: -- Next add the Stolen Data.
4412:
4413: IF PG_DEBUG in ('Y', 'C') THEN
4414: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'before insert into msc_alloc_supplies-Stolen Info');
4415: END IF;
4416:
4417: INSERT INTO MSC_ALLOC_SUPPLIES
4418: (plan_id, inventory_item_id, organization_id, sr_instance_id,

Line 4437: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'Total Rows inserted ' || l_rows_proc);

4433:
4434: l_rows_proc := l_rows_proc + SQL%ROWCOUNT;
4435:
4436: IF PG_DEBUG in ('Y', 'C') THEN
4437: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'Total Rows inserted ' || l_rows_proc);
4438: END IF;
4439:
4440: END Add_Stealing_Supply_Details;
4441:

Line 4466: msc_sch_wb.atp_debug('***** Begin Remove_Invalid_Future_SD Procedure *****');

4462: c1 pegging%ROWTYPE;
4463:
4464: BEGIN
4465: IF PG_DEBUG in ('Y', 'C') THEN
4466: msc_sch_wb.atp_debug('***** Begin Remove_Invalid_Future_SD Procedure *****');
4467: END IF;
4468:
4469: FOR i IN p_future_pegging_tab.FIRST..p_future_pegging_tab.COUNT LOOP
4470: OPEN pegging(p_future_pegging_tab(i));

Line 4477: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'instance id = '||c1.identifier1);

4473: FETCH pegging INTO c1;
4474: EXIT WHEN pegging%NOTFOUND;
4475:
4476: IF PG_DEBUG in ('Y', 'C') THEN
4477: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'instance id = '||c1.identifier1);
4478: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'plan_id (identifier2) = '||c1.identifier2);
4479: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'identifier3 = '||c1.identifier3);
4480: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'delete pegging_id '||c1.pegging_id);
4481: END IF;

Line 4478: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'plan_id (identifier2) = '||c1.identifier2);

4474: EXIT WHEN pegging%NOTFOUND;
4475:
4476: IF PG_DEBUG in ('Y', 'C') THEN
4477: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'instance id = '||c1.identifier1);
4478: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'plan_id (identifier2) = '||c1.identifier2);
4479: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'identifier3 = '||c1.identifier3);
4480: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'delete pegging_id '||c1.pegging_id);
4481: END IF;
4482:

Line 4479: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'identifier3 = '||c1.identifier3);

4475:
4476: IF PG_DEBUG in ('Y', 'C') THEN
4477: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'instance id = '||c1.identifier1);
4478: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'plan_id (identifier2) = '||c1.identifier2);
4479: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'identifier3 = '||c1.identifier3);
4480: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'delete pegging_id '||c1.pegging_id);
4481: END IF;
4482:
4483: MSC_ATP_DB_UTILS.Delete_Pegging(c1.pegging_id);

Line 4480: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'delete pegging_id '||c1.pegging_id);

4476: IF PG_DEBUG in ('Y', 'C') THEN
4477: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'instance id = '||c1.identifier1);
4478: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'plan_id (identifier2) = '||c1.identifier2);
4479: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'identifier3 = '||c1.identifier3);
4480: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'delete pegging_id '||c1.pegging_id);
4481: END IF;
4482:
4483: MSC_ATP_DB_UTILS.Delete_Pegging(c1.pegging_id);
4484:

Line 4491: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'Records deleted from msc_alloc_supplies = '|| SQL%ROWCOUNT);

4487: AND plan_id = c1.identifier2
4488: AND sr_instance_id = c1.identifier1;
4489:
4490: IF PG_DEBUG in ('Y', 'C') THEN
4491: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'Records deleted from msc_alloc_supplies = '|| SQL%ROWCOUNT);
4492: END IF;
4493:
4494: END LOOP;
4495: CLOSE pegging;

Line 4499: msc_sch_wb.atp_debug('***** End Remove_Invalid_Future_SD Procedure *****');

4495: CLOSE pegging;
4496: END LOOP; --FOR i IN p_future_pegging_tab.FIRST..p_future_pegging_tab.COUNT LOOP
4497:
4498: IF PG_DEBUG in ('Y', 'C') THEN
4499: msc_sch_wb.atp_debug('***** End Remove_Invalid_Future_SD Procedure *****');
4500: END IF;
4501:
4502: END Remove_Invalid_Future_SD;
4503:

Line 4524: msc_sch_wb.atp_debug('PROCEDURE move_SD_temp_into_mrp_details');

4520: sql_stmt VARCHAR2(3000);
4521: who_cols VARCHAR2(100);
4522: BEGIN
4523: IF PG_DEBUG in ('Y', 'C') THEN
4524: msc_sch_wb.atp_debug('PROCEDURE move_SD_temp_into_mrp_details');
4525: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_pegging_id: ' || p_pegging_id);
4526: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_end_pegging_id: ' || p_end_pegging_id);
4527: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' session_id: ' || MSC_ATP_PVT.G_SESSION_ID);
4528: END IF;

Line 4525: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_pegging_id: ' || p_pegging_id);

4521: who_cols VARCHAR2(100);
4522: BEGIN
4523: IF PG_DEBUG in ('Y', 'C') THEN
4524: msc_sch_wb.atp_debug('PROCEDURE move_SD_temp_into_mrp_details');
4525: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_pegging_id: ' || p_pegging_id);
4526: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_end_pegging_id: ' || p_end_pegging_id);
4527: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' session_id: ' || MSC_ATP_PVT.G_SESSION_ID);
4528: END IF;
4529:

Line 4526: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_end_pegging_id: ' || p_end_pegging_id);

4522: BEGIN
4523: IF PG_DEBUG in ('Y', 'C') THEN
4524: msc_sch_wb.atp_debug('PROCEDURE move_SD_temp_into_mrp_details');
4525: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_pegging_id: ' || p_pegging_id);
4526: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_end_pegging_id: ' || p_end_pegging_id);
4527: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' session_id: ' || MSC_ATP_PVT.G_SESSION_ID);
4528: END IF;
4529:
4530: INSERT INTO mrp_atp_details_temp (

Line 4527: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' session_id: ' || MSC_ATP_PVT.G_SESSION_ID);

4523: IF PG_DEBUG in ('Y', 'C') THEN
4524: msc_sch_wb.atp_debug('PROCEDURE move_SD_temp_into_mrp_details');
4525: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_pegging_id: ' || p_pegging_id);
4526: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_end_pegging_id: ' || p_end_pegging_id);
4527: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' session_id: ' || MSC_ATP_PVT.G_SESSION_ID);
4528: END IF;
4529:
4530: INSERT INTO mrp_atp_details_temp (
4531: session_id,

Line 4632: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' Num rows dumped: ' || SQL%ROWCOUNT);

4628: INVENTORY_ITEM_NAME --bug3579625
4629: FROM msc_atp_sd_details_temp;
4630:
4631: IF PG_DEBUG in ('Y', 'C') THEN
4632: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' Num rows dumped: ' || SQL%ROWCOUNT);
4633: END IF;
4634: END move_SD_temp_into_mrp_details;
4635:
4636: PROCEDURE Clear_SD_Details_Temp

Line 4640: msc_sch_wb.atp_debug('PROCEDURE Clear_SD_Details_Temp');

4636: PROCEDURE Clear_SD_Details_Temp
4637: IS
4638: BEGIN
4639: IF PG_DEBUG in ('Y', 'C') THEN
4640: msc_sch_wb.atp_debug('PROCEDURE Clear_SD_Details_Temp');
4641: msc_sch_wb.atp_debug('PG_Clear_SD_Details_Temp: ' || PG_CLEAR_SD_DETAILS_TEMP);
4642: END IF;
4643:
4644: IF PG_CLEAR_SD_DETAILS_TEMP = 1 THEN

Line 4641: msc_sch_wb.atp_debug('PG_Clear_SD_Details_Temp: ' || PG_CLEAR_SD_DETAILS_TEMP);

4637: IS
4638: BEGIN
4639: IF PG_DEBUG in ('Y', 'C') THEN
4640: msc_sch_wb.atp_debug('PROCEDURE Clear_SD_Details_Temp');
4641: msc_sch_wb.atp_debug('PG_Clear_SD_Details_Temp: ' || PG_CLEAR_SD_DETAILS_TEMP);
4642: END IF;
4643:
4644: IF PG_CLEAR_SD_DETAILS_TEMP = 1 THEN
4645: DELETE msc_atp_sd_details_temp;

Line 4647: msc_sch_wb.atp_debug('Clear_SD_Details_Temp rows: ' || SQL%ROWCOUNT);

4643:
4644: IF PG_CLEAR_SD_DETAILS_TEMP = 1 THEN
4645: DELETE msc_atp_sd_details_temp;
4646: IF PG_DEBUG in ('Y', 'C') THEN
4647: msc_sch_wb.atp_debug('Clear_SD_Details_Temp rows: ' || SQL%ROWCOUNT);
4648: END IF;
4649: END IF;
4650: PG_CLEAR_SD_DETAILS_TEMP := 1;
4651: END;

Line 4663: msc_sch_wb.atp_debug(' ******** Delete_Copy_Demand Begin *************');

4659: x_return_status OUT NOCOPY VARCHAR2)
4660: IS
4661: BEGIN
4662: IF PG_DEBUG in ('Y', 'C') THEN
4663: msc_sch_wb.atp_debug(' ******** Delete_Copy_Demand Begin *************');
4664: END IF;
4665:
4666: x_return_status := FND_API.G_RET_STS_SUCCESS;
4667:

Line 4668: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'p_copy_demand_ids.COUNT : ' || p_copy_demand_ids.COUNT);

4664: END IF;
4665:
4666: x_return_status := FND_API.G_RET_STS_SUCCESS;
4667:
4668: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'p_copy_demand_ids.COUNT : ' || p_copy_demand_ids.COUNT);
4669:
4670: IF p_copy_demand_ids.COUNT > 0 THEN
4671: IF ((MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND
4672: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND

Line 4676: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'allocated ATP or time phased PF');

4672: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
4673: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) OR
4674: (p_time_phased_set = 'Y') THEN
4675:
4676: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'allocated ATP or time phased PF');
4677:
4678: FORALL i IN 1..p_copy_demand_ids.COUNT
4679: DELETE FROM msc_alloc_demands
4680: WHERE parent_demand_id = p_copy_demand_ids(i)

Line 4692: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'unallocated ATP');

4688: IF NOT ((MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND
4689: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
4690: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
4691:
4692: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'unallocated ATP');
4693:
4694: FORALL i IN 1..p_copy_demand_ids.COUNT
4695: DELETE FROM msc_demands
4696: WHERE demand_id = p_copy_demand_ids(i)

Line 4706: msc_sch_wb.atp_debug(' ******** Delete_Copy_Demand End *************');

4702: END IF;
4703: END IF;
4704:
4705: IF PG_DEBUG in ('Y', 'C') THEN
4706: msc_sch_wb.atp_debug(' ******** Delete_Copy_Demand End *************');
4707: END IF;
4708:
4709: EXCEPTION
4710: WHEN OTHERS THEN

Line 4725: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');

4721: BEGIN
4722: x_return_status := FND_API.G_RET_STS_SUCCESS;
4723:
4724: IF PG_DEBUG in ('Y', 'C') THEN
4725: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4726: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4727: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4728: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);

Line 4726: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);

4722: x_return_status := FND_API.G_RET_STS_SUCCESS;
4723:
4724: IF PG_DEBUG in ('Y', 'C') THEN
4725: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4726: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4727: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4728: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);

Line 4727: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);

4723:
4724: IF PG_DEBUG in ('Y', 'C') THEN
4725: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4726: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4727: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4728: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4731: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);

Line 4728: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);

4724: IF PG_DEBUG in ('Y', 'C') THEN
4725: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4726: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4727: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4728: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4731: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4732: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);

Line 4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);

4725: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4726: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4727: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4728: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4731: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4732: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4733: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);

Line 4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);

4726: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4727: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4728: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4731: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4732: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4733: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4734: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);

Line 4731: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);

4727: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4728: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4731: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4732: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4733: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4734: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4735: END IF;

Line 4732: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);

4728: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4731: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4732: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4733: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4734: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4735: END IF;
4736:

Line 4733: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);

4729: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4731: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4732: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4733: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4734: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4735: END IF;
4736:
4737: -- Update PDS

Line 4734: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);

4730: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4731: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4732: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4733: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4734: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4735: END IF;
4736:
4737: -- Update PDS
4738: UPDATE MSC_DEMANDS

Line 4754: msc_sch_wb.atp_debug('Flush_Data_In_Pds : '||sqlerrm);

4750:
4751:
4752: EXCEPTION
4753: WHEN OTHERS THEN
4754: msc_sch_wb.atp_debug('Flush_Data_In_Pds : '||sqlerrm);
4755: x_return_status := FND_API.G_RET_STS_ERROR;
4756:
4757: END Flush_Data_In_Pds;
4758:

Line 4771: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');

4767: x_return_status := FND_API.G_RET_STS_SUCCESS;
4768:
4769:
4770: IF PG_DEBUG in ('Y', 'C') THEN
4771: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4772: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4773: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4774: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);

Line 4772: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);

4768:
4769:
4770: IF PG_DEBUG in ('Y', 'C') THEN
4771: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4772: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4773: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4774: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);

Line 4773: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);

4769:
4770: IF PG_DEBUG in ('Y', 'C') THEN
4771: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4772: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4773: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4774: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);

Line 4774: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);

4770: IF PG_DEBUG in ('Y', 'C') THEN
4771: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4772: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4773: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4774: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4778: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);

Line 4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);

4771: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4772: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4773: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4774: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4778: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4779: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);

Line 4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);

4772: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4773: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4774: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4778: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4779: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4780: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);

Line 4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);

4773: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4774: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4778: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4779: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4780: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4781: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);

Line 4778: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);

4774: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4778: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4779: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4780: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4781: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);
4782:

Line 4779: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);

4775: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4778: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4779: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4780: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4781: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);
4782:
4783: END IF;

Line 4780: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);

4776: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4778: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4779: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4780: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4781: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);
4782:
4783: END IF;
4784:

Line 4781: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);

4777: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4778: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4779: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4780: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4781: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);
4782:
4783: END IF;
4784:
4785: -- Update PDS

Line 4799: msc_sch_wb.atp_debug('Flush_Data_In_Ods : '||sqlerrm);

4795: AND SR_INSTANCE_ID = p_ship_arrival_date_rec.instance_id;
4796:
4797: EXCEPTION
4798: WHEN OTHERS THEN
4799: msc_sch_wb.atp_debug('Flush_Data_In_Ods : '||sqlerrm);
4800: x_return_status := FND_API.G_RET_STS_ERROR;
4801:
4802: END Flush_Data_In_Ods;
4803:

Line 4816: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');

4812: l_insert_item_id number;
4813:
4814: BEGIN
4815: IF PG_DEBUG in ('Y', 'C') THEN
4816: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4817: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
4818: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
4819: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);

Line 4817: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);

4813:
4814: BEGIN
4815: IF PG_DEBUG in ('Y', 'C') THEN
4816: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4817: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
4818: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
4819: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);

Line 4818: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);

4814: BEGIN
4815: IF PG_DEBUG in ('Y', 'C') THEN
4816: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4817: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
4818: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
4819: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);

Line 4819: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);

4815: IF PG_DEBUG in ('Y', 'C') THEN
4816: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4817: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
4818: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
4819: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);

Line 4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);

4816: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4817: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
4818: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
4819: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);

Line 4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);

4817: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
4818: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
4819: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);

Line 4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);

4818: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
4819: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);

Line 4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);

4819: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);

Line 4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);

4820: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
4828: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);

Line 4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);

4821: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
4828: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
4829: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);

Line 4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);

4822: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
4828: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
4829: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
4830: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);

Line 4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);

4823: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
4828: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
4829: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
4830: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
4831: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630

Line 4828: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);

4824: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
4828: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
4829: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
4830: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
4831: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630
4832: END IF;

Line 4829: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);

4825: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
4828: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
4829: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
4830: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
4831: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630
4832: END IF;
4833:

Line 4830: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);

4826: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
4828: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
4829: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
4830: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
4831: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630
4832: END IF;
4833:
4834: p_supply_rec_type.return_status := FND_API.G_RET_STS_SUCCESS;

Line 4831: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630

4827: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
4828: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
4829: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
4830: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
4831: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630
4832: END IF;
4833:
4834: p_supply_rec_type.return_status := FND_API.G_RET_STS_SUCCESS;
4835:

Line 4842: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Time Phased ATP = ' || l_time_phased_atp);

4838: l_time_phased_atp := 'Y';
4839: /* In time phased atp scenarios add planned order in msc_supplies for member item*/
4840: l_insert_item_id := p_supply_rec_type.request_item_id;
4841: IF PG_DEBUG in ('Y', 'C') THEN
4842: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Time Phased ATP = ' || l_time_phased_atp);
4843: END IF;
4844: ELSE
4845: l_insert_item_id := p_supply_rec_type.inventory_item_id;
4846: END IF;

Line 4848: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Insert planned order in msc_supplies for ' || l_insert_item_id);

4844: ELSE
4845: l_insert_item_id := p_supply_rec_type.inventory_item_id;
4846: END IF;
4847: IF PG_DEBUG in ('Y', 'C') THEN
4848: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Insert planned order in msc_supplies for ' || l_insert_item_id);
4849: END IF;
4850: -- time_phased_atp changes end
4851:
4852: -- Insert updated quantity as a Planned Order in msc_supplies

Line 4965: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Error occured in procedure Add_PF_Rollup_Supplies');

4961: p_supply_rec_type.return_status
4962: );
4963: IF p_supply_rec_type.return_status <> FND_API.G_RET_STS_SUCCESS THEN
4964: IF PG_DEBUG in ('Y', 'C') THEN
4965: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Error occured in procedure Add_PF_Rollup_Supplies');
4966: END IF;
4967: RAISE FND_API.G_EXC_ERROR;
4968: END IF;
4969:

Line 4977: msc_sch_wb.atp_debug('Add_Supplies: ' || ' before insert into' ||

4973: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
4974: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
4975:
4976: IF PG_DEBUG in ('Y', 'C') THEN
4977: msc_sch_wb.atp_debug('Add_Supplies: ' || ' before insert into' ||
4978: ' msc_alloc_supplies');
4979: END IF;
4980:
4981: INSERT INTO MSC_ALLOC_SUPPLIES(

Line 5020: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Create planned orders for summary mode');

5016: -- Code to make summary updates and commit removed for summary enhancement
5017: /** code commented for time being. Will be removed after code review
5018: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
5019: IF PG_DEBUG in ('Y', 'C') THEN
5020: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Create planned orders for summary mode');
5021: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'First try to update ');
5022: END IF;
5023:
5024: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_supply_rec_type.instance_id,

Line 5021: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'First try to update ');

5017: /** code commented for time being. Will be removed after code review
5018: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
5019: IF PG_DEBUG in ('Y', 'C') THEN
5020: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Create planned orders for summary mode');
5021: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'First try to update ');
5022: END IF;
5023:
5024: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_supply_rec_type.instance_id,
5025: p_supply_rec_type.plan_id,

Line 5047: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'After update to summary table');

5043: and sd_date = trunc(p_supply_rec_type.schedule_date);
5044: commit;
5045:
5046: IF PG_DEBUG in ('Y', 'C') THEN
5047: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'After update to summary table');
5048: END IF;
5049: IF SQL%NOTFOUND THEN
5050: IF PG_DEBUG in ('Y', 'C') THEN
5051: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Couldnt update try to insert');

Line 5051: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Couldnt update try to insert');

5047: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'After update to summary table');
5048: END IF;
5049: IF SQL%NOTFOUND THEN
5050: IF PG_DEBUG in ('Y', 'C') THEN
5051: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Couldnt update try to insert');
5052: END IF;
5053:
5054: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_supply_rec_type.plan_id,
5055: p_supply_rec_type.instance_id,

Line 5063: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'commit in summary mode');

5059: p_supply_rec_type.order_quantity,
5060: '@@@');
5061: END IF;
5062: IF PG_DEBUG in ('Y', 'C') THEN
5063: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'commit in summary mode');
5064: END IF;
5065: commit;
5066: END IF;
5067: ***/

Line 5070: msc_sch_wb.atp_debug('Add_Supplies: ' || 'transaction_id = '||p_supply_rec_type.transaction_id);

5066: END IF;
5067: ***/
5068:
5069: IF PG_DEBUG in ('Y', 'C') THEN
5070: msc_sch_wb.atp_debug('Add_Supplies: ' || 'transaction_id = '||p_supply_rec_type.transaction_id);
5071: msc_sch_wb.atp_debug('***** End Add_Supplies Procedure *****');
5072: END IF;
5073:
5074: END Add_Supplies;

Line 5071: msc_sch_wb.atp_debug('***** End Add_Supplies Procedure *****');

5067: ***/
5068:
5069: IF PG_DEBUG in ('Y', 'C') THEN
5070: msc_sch_wb.atp_debug('Add_Supplies: ' || 'transaction_id = '||p_supply_rec_type.transaction_id);
5071: msc_sch_wb.atp_debug('***** End Add_Supplies Procedure *****');
5072: END IF;
5073:
5074: END Add_Supplies;
5075:

Line 5146: msc_sch_wb.atp_debug('*** Begin Call_delete_row ***');

5142: l_attribute_07 MRP_ATP_PUB.char30_Arr := MRP_ATP_PUB.char30_Arr();
5143:
5144: BEGIN
5145: IF PG_DEBUG in ('Y', 'C') THEN
5146: msc_sch_wb.atp_debug('*** Begin Call_delete_row ***');
5147: END IF;
5148:
5149: x_return_status := FND_API.G_RET_STS_SUCCESS;
5150:

Line 5163: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_so_tbl_status = '||l_so_tbl_status);

5159: FROM msc_apps_instances
5160: WHERE instance_id = p_instance_id;
5161:
5162: IF PG_DEBUG in ('Y', 'C') THEN
5163: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_so_tbl_status = '||l_so_tbl_status);
5164: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_summary_flag = ' || l_summary_flag);
5165: END IF;
5166: IF NVL(l_so_tbl_status, 1) = 2 THEN
5167: -- not available for atp

Line 5164: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_summary_flag = ' || l_summary_flag);

5160: WHERE instance_id = p_instance_id;
5161:
5162: IF PG_DEBUG in ('Y', 'C') THEN
5163: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_so_tbl_status = '||l_so_tbl_status);
5164: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_summary_flag = ' || l_summary_flag);
5165: END IF;
5166: IF NVL(l_so_tbl_status, 1) = 2 THEN
5167: -- not available for atp
5168: IF PG_DEBUG in ('Y', 'C') THEN

Line 5169: msc_sch_wb.atp_debug('Call_delete_row: ' || 'ATP not available');

5165: END IF;
5166: IF NVL(l_so_tbl_status, 1) = 2 THEN
5167: -- not available for atp
5168: IF PG_DEBUG in ('Y', 'C') THEN
5169: msc_sch_wb.atp_debug('Call_delete_row: ' || 'ATP not available');
5170: END IF;
5171: x_delete_atp_rec.error_code(1) := MSC_ATP_PVT.TRY_ATP_LATER;
5172: RETURN;
5173:

Line 5177: msc_sch_wb.atp_debug('Call_delete_row: ' || ' summary table is not ready. Switch to detail tables');

5173:
5174: ELSIF l_summary_flag = 1 THEN
5175: ---- summary table is not ready. Switch to detail tables
5176: IF PG_DEBUG in ('Y', 'C') THEN
5177: msc_sch_wb.atp_debug('Call_delete_row: ' || ' summary table is not ready. Switch to detail tables');
5178: END IF;
5179: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
5180:
5181: ELSIF l_summary_flag = 2 THEN

Line 5183: msc_sch_wb.atp_debug('Call_delete_row: ' || 'Summary Concurrent program is running');

5179: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
5180:
5181: ELSIF l_summary_flag = 2 THEN
5182: IF PG_DEBUG in ('Y', 'C') THEN
5183: msc_sch_wb.atp_debug('Call_delete_row: ' || 'Summary Concurrent program is running');
5184: END IF;
5185: x_delete_atp_rec.error_code(1) := MSC_ATP_PVT.SUMM_CONC_PROG_RUNNING;
5186: RETURN;
5187: END IF;

Line 5216: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_old_pf_item_id := ' || l_old_pf_item_id);

5212: p_atp_table.old_inventory_item_id(m),
5213: p_atp_table.old_source_organization_id(m));
5214: END IF;
5215: IF PG_DEBUG in ('Y', 'C') THEN
5216: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_old_pf_item_id := ' || l_old_pf_item_id);
5217: END IF;
5218: END IF;
5219: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN --3720018, moved from above
5220: /* time_phased_atp changes begin

Line 5236: msc_sch_wb.atp_debug('Call_delete_row: l_return_status:= ' || l_return_status);

5232: NULL --bug3510475
5233: );
5234:
5235: IF PG_DEBUG in ('Y', 'C') THEN
5236: msc_sch_wb.atp_debug('Call_delete_row: l_return_status:= ' || l_return_status);
5237: END IF;
5238:
5239: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5240: IF PG_DEBUG in ('Y', 'C') THEN

Line 5241: msc_sch_wb.atp_debug('Call_delete_row: ' || 'ATP Downtime during Re-schedule');

5237: END IF;
5238:
5239: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5240: IF PG_DEBUG in ('Y', 'C') THEN
5241: msc_sch_wb.atp_debug('Call_delete_row: ' || 'ATP Downtime during Re-schedule');
5242: END IF;
5243: x_return_status := FND_API.G_RET_STS_ERROR;
5244: return; -- Return in case of error in get_pf_plan_info, no point in proceding further.
5245: END IF;

Line 5248: msc_sch_wb.atp_debug('Call_delete_row: ' || 'reached here2');

5244: return; -- Return in case of error in get_pf_plan_info, no point in proceding further.
5245: END IF;
5246: /* time_phased_atp changes end*/
5247: IF PG_DEBUG in ('Y', 'C') THEN
5248: msc_sch_wb.atp_debug('Call_delete_row: ' || 'reached here2');
5249: END IF;
5250:
5251: l_plan_info_rec := MSC_ATP_PVT.G_PLAN_INFO_REC;
5252:

Line 5254: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_plan_info_rec.plan_id = '||l_plan_info_rec.plan_id);

5250:
5251: l_plan_info_rec := MSC_ATP_PVT.G_PLAN_INFO_REC;
5252:
5253: IF PG_DEBUG in ('Y', 'C') THEN
5254: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_plan_info_rec.plan_id = '||l_plan_info_rec.plan_id);
5255: END IF;
5256:
5257: l_old_plan_id(m) := l_plan_info_rec.plan_id;
5258: l_temp_assign_set_id := l_plan_info_rec.assignment_set_id;

Line 5266: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_source_organization_id = '|| p_atp_table.old_source_organization_id(m));

5262: l_attribute_07(m) := l_plan_info_rec.plan_name;
5263: END IF; --3720018
5264:
5265: IF PG_DEBUG in ('Y', 'C') THEN
5266: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_source_organization_id = '|| p_atp_table.old_source_organization_id(m));
5267: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_demand_class = '|| p_atp_table.old_demand_class(m));
5268: END IF;
5269: END IF;
5270: ELSE

Line 5267: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_demand_class = '|| p_atp_table.old_demand_class(m));

5263: END IF; --3720018
5264:
5265: IF PG_DEBUG in ('Y', 'C') THEN
5266: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_source_organization_id = '|| p_atp_table.old_source_organization_id(m));
5267: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_demand_class = '|| p_atp_table.old_demand_class(m));
5268: END IF;
5269: END IF;
5270: ELSE
5271: IF p_atp_table.old_source_organization_id(m) IS NOT NULL THEN

Line 5277: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_old_plan_id = '||l_old_plan_id(m));

5273: END IF;
5274: END IF;
5275:
5276: IF PG_DEBUG in ('Y', 'C') THEN
5277: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_old_plan_id = '||l_old_plan_id(m));
5278: END IF;
5279:
5280: -- 2152184: We remove rows only if we have old plan id
5281: IF l_old_plan_id(m) IS NOT NULL THEN

Line 5290: -- msc_sch_wb.atp_debug('Call_delete_row: ' || 'demand has already been deleted');

5286: -- Chagned the following loop
5287: --FOR i in 1..l_del_demand_ids.count LOOP
5288: -- IF p_atp_table.Identifier(m) = l_del_identifiers(i) and l_old_plan_id(m) = l_del_plan_ids(i) THEN
5289: -- IF PG_DEBUG in ('Y', 'C') THEN
5290: -- msc_sch_wb.atp_debug('Call_delete_row: ' || 'demand has already been deleted');
5291: -- END IF;
5292: -- l_delete_demand_flag := 0;
5293: -- EXIT;
5294: -- END IF;

Line 5303: msc_sch_wb.atp_debug('Call_delete_row: ' || 'demand has already been deleted');

5299: IF p_atp_table.Identifier(m) = l_del_identifiers(i) THEN
5300: FOR i in 1..l_del_demand_ids.count LOOP
5301: IF l_old_plan_id(m) = l_del_plan_ids(i) THEN
5302: IF PG_DEBUG in ('Y', 'C') THEN
5303: msc_sch_wb.atp_debug('Call_delete_row: ' || 'demand has already been deleted');
5304: END IF;
5305: l_delete_demand_flag := 0;
5306: EXIT;
5307: END IF;

Line 5358: msc_sch_wb.atp_debug('Call_delete_row: After call to Delete_Row' );

5354: );
5355: --l_demand_class_flag);
5356:
5357: IF PG_DEBUG in ('Y', 'C') THEN
5358: msc_sch_wb.atp_debug('Call_delete_row: After call to Delete_Row' );
5359: END IF;
5360:
5361: --IF MSC_ATP_PVT.G_INV_CTP = 4 and l_old_plan_id(m) <> -1 THEN --3720018
5362: IF (l_old_plan_id(m) = -1) THEN

Line 5439: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_items.count ' || l_atp_peg_items.count);

5435: -- CTO ODR and Simplified Pegging
5436:
5437: -- This check not necessary but used as an insurance.
5438: IF PG_DEBUG in ('Y', 'C') THEN
5439: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_items.count ' || l_atp_peg_items.count);
5440: END IF;
5441: IF l_atp_peg_items IS NOT NULL AND l_atp_peg_items.count > 0 THEN
5442: l_count := l_atp_peg_items.count;
5443: l_del_atp_peg_items.extend(l_count);

Line 5450: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_demands.count ' || l_atp_peg_demands.count);

5446: l_del_atp_peg_items(l_count + i) := l_atp_peg_items(i);
5447: END LOOP;
5448: END IF;
5449: IF PG_DEBUG in ('Y', 'C') THEN
5450: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_demands.count ' || l_atp_peg_demands.count);
5451: END IF;
5452: IF l_atp_peg_demands IS NOT NULL AND l_atp_peg_demands.count > 0 THEN
5453: l_count := l_atp_peg_demands.count;
5454: l_del_atp_peg_demands.extend(l_count);

Line 5465: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_supplies.count ' || l_atp_peg_supplies.count);

5461: l_off_demand_instance_id(l_count + i) := l_demand_instance_id(i); --Bug 3629191
5462: END LOOP;
5463: END IF;
5464: IF PG_DEBUG in ('Y', 'C') THEN
5465: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_supplies.count ' || l_atp_peg_supplies.count);
5466: END IF;
5467: IF l_atp_peg_supplies IS NOT NULL AND l_atp_peg_supplies.count > 0 THEN
5468: l_count := l_atp_peg_supplies.count;
5469: l_del_atp_peg_supplies.extend(l_count);

Line 5480: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_res_reqs.count ' || l_atp_peg_res_reqs.count);

5476: l_off_supply_instance_id(l_count + i) := l_supply_instance_id(i); --Bug 3629191
5477: END LOOP;
5478: END IF;
5479: IF PG_DEBUG in ('Y', 'C') THEN
5480: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_res_reqs.count ' || l_atp_peg_res_reqs.count);
5481: END IF;
5482: IF l_atp_peg_res_reqs IS NOT NULL AND l_atp_peg_res_reqs.count > 0 THEN
5483: l_count := l_atp_peg_res_reqs.count;
5484: l_del_atp_peg_res_reqs.extend(l_count);

Line 5499: msc_sch_wb.atp_debug('Call_delete_row: ' || 'Count of records := ' || l_del_demand_ids.count);

5495: END IF; --3720018
5496: END IF; --- IF (MSC_ATP_PVT.G_INV_CTP = 5) or (MSC_ATP_PVT.G_INV_CTP = 4 and l_delete_demand_flag = 1)
5497: END IF;
5498: IF PG_DEBUG in ('Y', 'C') THEN
5499: msc_sch_wb.atp_debug('Call_delete_row: ' || 'Count of records := ' || l_del_demand_ids.count);
5500: END IF;
5501: --l_atp_table.Error_Code(m) := 0;
5502: x_delete_atp_rec.error_code(m) := 0;
5503:

Line 5540: msc_sch_wb.atp_debug('*** END Call_delete_row ***');

5536: x_delete_atp_rec.del_ods_cto_atp_refresh_no := l_del_ods_cto_atp_refresh_no;
5537: END IF;
5538:
5539: IF PG_DEBUG in ('Y', 'C') THEN
5540: msc_sch_wb.atp_debug('*** END Call_delete_row ***');
5541: END IF;
5542:
5543: END call_delete_row;
5544: --5357370 starts

Line 5563: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');

5559: l_sysdate date;
5560:
5561: BEGIN
5562: IF PG_DEBUG in ('Y', 'C') THEN
5563: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
5564: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
5565: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
5566: END IF;
5567: BEGIN

Line 5564: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);

5560:
5561: BEGIN
5562: IF PG_DEBUG in ('Y', 'C') THEN
5563: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
5564: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
5565: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
5566: END IF;
5567: BEGIN
5568: SELECT D.sr_instance_id,

Line 5565: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);

5561: BEGIN
5562: IF PG_DEBUG in ('Y', 'C') THEN
5563: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
5564: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
5565: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
5566: END IF;
5567: BEGIN
5568: SELECT D.sr_instance_id,
5569: D.organization_id,

Line 5635: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'No row found that need to be deleted from summary table');

5631: AND C2.CALENDAR_DATE = TRUNC(sysdate);
5632: EXCEPTION
5633: WHEN NO_DATA_FOUND THEN
5634: IF PG_DEBUG in ('Y', 'C') THEN
5635: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'No row found that need to be deleted from summary table');
5636: END IF;
5637: END;
5638: -- 5357370: need user id for insert
5639: l_user_id := FND_GLOBAL.USER_ID;

Line 5643: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);

5639: l_user_id := FND_GLOBAL.USER_ID;
5640: l_sysdate := sysdate;
5641:
5642: IF PG_DEBUG in ('Y', 'C') THEN
5643: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
5644: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
5645: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
5646:
5647: END IF;

Line 5644: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);

5640: l_sysdate := sysdate;
5641:
5642: IF PG_DEBUG in ('Y', 'C') THEN
5643: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
5644: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
5645: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
5646:
5647: END IF;
5648: FOR i in 1..l_inventory_item_id.count LOOP

Line 5645: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);

5641:
5642: IF PG_DEBUG in ('Y', 'C') THEN
5643: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
5644: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
5645: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
5646:
5647: END IF;
5648: FOR i in 1..l_inventory_item_id.count LOOP
5649: IF PG_DEBUG in ('Y', 'C') THEN

Line 5650: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');

5646:
5647: END IF;
5648: FOR i in 1..l_inventory_item_id.count LOOP
5649: IF PG_DEBUG in ('Y', 'C') THEN
5650: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5651: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5652: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5653: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5654: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));

Line 5651: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));

5647: END IF;
5648: FOR i in 1..l_inventory_item_id.count LOOP
5649: IF PG_DEBUG in ('Y', 'C') THEN
5650: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5651: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5652: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5653: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5654: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5655: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));

Line 5652: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );

5648: FOR i in 1..l_inventory_item_id.count LOOP
5649: IF PG_DEBUG in ('Y', 'C') THEN
5650: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5651: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5652: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5653: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5654: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5655: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5656: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));

Line 5653: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));

5649: IF PG_DEBUG in ('Y', 'C') THEN
5650: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5651: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5652: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5653: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5654: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5655: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5656: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
5657: END IF;

Line 5654: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));

5650: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5651: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5652: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5653: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5654: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5655: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5656: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
5657: END IF;
5658:

Line 5655: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));

5651: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5652: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5653: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5654: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5655: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5656: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
5657: END IF;
5658:
5659: update /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ msc_atp_summary_so

Line 5656: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));

5652: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5653: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5654: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5655: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5656: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
5657: END IF;
5658:
5659: update /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ msc_atp_summary_so
5660: set sd_qty = (sd_qty + l_sd_qty(i))

Line 5670: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: update failed, now try insert');

5666:
5667: -- 5357370: this is to handle that we have reservation on the past due date, and
5668: -- we won't be able to find record on sysdate to update.
5669: IF (SQL%NOTFOUND) THEN
5670: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: update failed, now try insert');
5671: --- Insert the new record
5672: BEGIN
5673: INSERT INTO MSC_ATP_SUMMARY_SO
5674: (plan_id,