DBA Data[Home] [Help]

APPS.MSC_ATP_DB_UTILS dependencies on MSC_SCH_WB

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

41: l_stmt VARCHAR2(32767);
42:
43: BEGIN
44: IF PG_DEBUG in ('Y', 'C') THEN
45: msc_sch_wb.atp_debug('***** Begin Add_Mat_Demand *****');
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);

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

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

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

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

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

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

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

45: msc_sch_wb.atp_debug('***** Begin Add_Mat_Demand *****');
46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);

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

46: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.quantity_ordered '||p_atp_rec.quantity_ordered);
47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);

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

47: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.requested_ship_date '||p_atp_rec.requested_ship_date);
48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);

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

48: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.origination_type '||p_atp_rec.origination_type);
49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);

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

49: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.inventory_item_id '||p_atp_rec.inventory_item_id);
50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
57: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);

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

50: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.organization_id '||p_atp_rec.organization_id);
51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
57: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
58: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);

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

51: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_line '||p_atp_rec.demand_source_line);
52: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.demand_source_type '||p_atp_rec.demand_source_type);--cmro
53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
57: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
58: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
59: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);

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

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

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

53: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.instance_id '||p_atp_rec.instance_id);
54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
57: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
58: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
59: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
60: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);
61: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.MAND_COMP_FLAG := ' || p_atp_rec.MAND_COMP_FLAG); --Bug#6647536

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

54: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_plan_id = ' || p_plan_id);
55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
57: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
58: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
59: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
60: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);
61: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.MAND_COMP_FLAG := ' || p_atp_rec.MAND_COMP_FLAG); --Bug#6647536
62: END IF;

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

55: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.action '||p_atp_rec.action);
56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
57: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
58: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
59: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
60: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);
61: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.MAND_COMP_FLAG := ' || p_atp_rec.MAND_COMP_FLAG); --Bug#6647536
62: END IF;
63:

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

56: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'old_demand_id := ' || p_atp_rec.old_demand_id);
57: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
58: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
59: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
60: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);
61: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.MAND_COMP_FLAG := ' || p_atp_rec.MAND_COMP_FLAG); --Bug#6647536
62: END IF;
63:
64: -- time_phased_atp changes begin

Line 61: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.MAND_COMP_FLAG := ' || p_atp_rec.MAND_COMP_FLAG); --Bug#6647536

57: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'demand class := ' || p_atp_rec.demand_class);
58: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.request_item_id := ' || p_atp_rec.request_item_id);
59: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.atf_date := ' || p_atp_rec.atf_date);
60: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ato model line id := ' || p_atp_rec.ato_model_line_id);
61: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.MAND_COMP_FLAG := ' || p_atp_rec.MAND_COMP_FLAG); --Bug#6647536
62: END IF;
63:
64: -- time_phased_atp changes begin
65: IF (p_atp_rec.inventory_item_id <> p_atp_rec.request_item_id) and p_atp_rec.atf_date is not null THEN

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

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

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

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

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

79:
80: IF (p_plan_id = -1) THEN -- ods, put into ods tables
81:
82: IF PG_DEBUG in ('Y', 'C') THEN
83: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ODS based ATP, Add into MSC_SALES Orders');
84: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.original_request_ship_date: ' ||p_atp_rec.original_request_ship_date);
85: END IF;
86: --bug#12973673 -- enable the triple checkin for MSCDATPB.pls file
87: /* Design : read the patch_level in fnd_product_installations.

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

80: IF (p_plan_id = -1) THEN -- ods, put into ods tables
81:
82: IF PG_DEBUG in ('Y', 'C') THEN
83: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'ODS based ATP, Add into MSC_SALES Orders');
84: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'p_atp_rec.original_request_ship_date: ' ||p_atp_rec.original_request_ship_date);
85: END IF;
86: --bug#12973673 -- enable the triple checkin for MSCDATPB.pls file
87: /* Design : read the patch_level in fnd_product_installations.
88: If it is MSC.A --> We are in MSC120. If it is not null and some other value --> It is other than MSC120.

Line 100: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Could not get the source instance version..');

96: EXCEPTION
97: WHEN others THEN
98: lv_apps_ver := null;
99: IF PG_DEBUG in ('Y', 'C') THEN
100: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Could not get the source instance version..');
101: END IF;
102: END;
103:
104: IF (lv_apps_ver IS NOT NULL AND lv_apps_ver = 'R12.MSC.A') then

Line 117: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Row_type column doesnot exists in msc_sales_orders. So release is MSC120');

113: WHEN others THEN
114: IF SQLCODE IN (-00904) THEN
115: l_is_rel_120 := true;
116: IF PG_DEBUG in ('Y', 'C') THEN
117: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Row_type column doesnot exists in msc_sales_orders. So release is MSC120');
118: END IF;
119: END IF;
120: END;
121: END IF;

Line 124: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Source Instance Version : lv_apps_ver : ' || lv_apps_ver);

120: END;
121: END IF;
122:
123: IF PG_DEBUG in ('Y', 'C') THEN
124: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Source Instance Version : lv_apps_ver : ' || lv_apps_ver);
125: END IF;
126:
127: IF (l_is_rel_120) THEN
128: INSERT INTO MSC_SALES_ORDERS(

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

289: END IF;
290:
291: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN
292: IF PG_DEBUG in ('Y', 'C') THEN
293: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Insert into summary table');
294: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || ' update msc_atp_summary_so');
295: END IF;
296: -- use hint to do index search
297: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_rec.instance_id,

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

290:
291: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN
292: IF PG_DEBUG in ('Y', 'C') THEN
293: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Insert into summary table');
294: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || ' update msc_atp_summary_so');
295: END IF;
296: -- use hint to do index search
297: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_rec.instance_id,
298: -1,

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

315: and demand_class = Decode(p_dc_flag, 1, NVL(p_atp_rec.demand_class, '@@@'),'@@@');
316:
317: IF SQL%NOTFOUND THEN
318: IF PG_DEBUG in ('Y', 'C') THEN
319: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || ' insert into msc_atp_summary_so');
320: END IF;
321: BEGIN
322: --- use hint to do index search
323: insert /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ into msc_atp_summary_so

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

380: --as this code is redundent commenting it out avjain
381: /*IF (p_atp_rec.origination_type IN (6, 30)) AND NVL(p_atp_rec.old_demand_id, 0) > 0 THEN
382:
383: IF PG_DEBUG in ('Y', 'C') THEN
384: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'inside update of msc_demands');
385: END IF;
386:
387: -- For bug 2259824, move the demand to the end of day
388: UPDATE msc_demands

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

429: l_sqlfound := SQL%NOTFOUND;
430:
431: IF NOT l_sqlfound THEN
432: IF PG_DEBUG in ('Y', 'C') THEN
433: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'found demand and updated demand_id : ' || x_demand_id);
434: END IF;
435: -- Allocated ATP Based on Planning Details -- Agilent changes Begin
436:
437: IF ((MSC_ATP_PVT.G_INV_CTP = 4) AND

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

439: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
440: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
441:
442: IF PG_DEBUG in ('Y', 'C') THEN
443: msc_sch_wb.atp_debug('Add_Mat_Demand: before update of msc_alloc_demands');
444: END IF;
445:
446: UPDATE msc_alloc_demands
447: SET old_allocated_quantity = allocated_quantity,

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

465: AND sales_order_line_id = p_atp_rec.demand_source_line
466: AND parent_demand_id = p_atp_rec.old_demand_id;
467:
468: IF PG_DEBUG in ('Y', 'C') THEN
469: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'No of rows updated := ' || SQL%ROWCOUNT);
470: END IF;
471:
472: END IF;
473:

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

480: IF (SQL%NOTFOUND OR (p_atp_rec.origination_type NOT IN (6, 30)) OR
481: NVL(p_atp_rec.old_demand_id,0 ) = 0) THEN
482:
483: IF PG_DEBUG in ('Y', 'C') THEN
484: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'before insert into msc_demands');
485: END IF;
486:
487: INSERT INTO MSC_DEMANDS(
488: DEMAND_ID,

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

640:
641: -- time_phased_atp
642: IF l_time_phased_atp = 'Y' THEN
643: IF PG_DEBUG in ('Y', 'C') THEN
644: msc_sch_wb.atp_debug('Add_Mat_Demand: Time phased ATP = '|| l_time_phased_atp);
645: END IF;
646: MSC_ATP_PF.Add_PF_Bucketed_Demands(
647: p_atp_rec,
648: p_plan_id,

Line 660: msc_sch_wb.atp_debug('Add_Mat_Demand: MSC_ATP_PVT.G_DEMAND_ID = '|| MSC_ATP_PVT.G_DEMAND_ID);

656: MSC_ATP_PVT.G_DEMAND_ID := x_demand_id;
657: END IF;
658:
659: IF PG_DEBUG in ('Y', 'C') THEN
660: msc_sch_wb.atp_debug('Add_Mat_Demand: MSC_ATP_PVT.G_DEMAND_ID = '|| MSC_ATP_PVT.G_DEMAND_ID);
661: END IF;
662: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
663: IF PG_DEBUG in ('Y', 'C') THEN
664: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Error occured in procedure Add_PF_Bucketed_Demands');

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

660: msc_sch_wb.atp_debug('Add_Mat_Demand: MSC_ATP_PVT.G_DEMAND_ID = '|| MSC_ATP_PVT.G_DEMAND_ID);
661: END IF;
662: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
663: IF PG_DEBUG in ('Y', 'C') THEN
664: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Error occured in procedure Add_PF_Bucketed_Demands');
665: END IF;
666: RAISE FND_API.G_EXC_ERROR;
667: END IF;
668:

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

672: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
673: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
674:
675: IF PG_DEBUG in ('Y', 'C') THEN
676: msc_sch_wb.atp_debug('Add_Mat_Demand: before insert into msc_alloc_demands');
677: END IF;
678:
679: INSERT INTO MSC_ALLOC_DEMANDS(
680: PLAN_ID,

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

738:
739: -- Update summary records only in ODS - for summary enhancement
740: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
741: IF PG_DEBUG in ('Y', 'C') THEN
742: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'add demands to summary tables');
743: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'First try to update');
744: END IF;
745:
746: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_rec.instance_id,

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

739: -- Update summary records only in ODS - for summary enhancement
740: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
741: IF PG_DEBUG in ('Y', 'C') THEN
742: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'add demands to summary tables');
743: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'First try to update');
744: END IF;
745:
746: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_rec.instance_id,
747: p_plan_id,

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

764: and organization_id = p_atp_rec.organization_id
765: and sd_date = trunc(p_atp_rec.requested_ship_date);
766:
767: IF PG_DEBUG in ('Y', 'C') THEN
768: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'After update to summary table');
769: END IF;
770:
771: IF SQL%NOTFOUND THEN
772: IF PG_DEBUG in ('Y', 'C') THEN

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

769: END IF;
770:
771: IF SQL%NOTFOUND THEN
772: IF PG_DEBUG in ('Y', 'C') THEN
773: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Couldnt find a rec in summ table. Insert new rec');
774: END IF;
775:
776: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
777: p_atp_rec.instance_id,

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

785:
786: END IF;
787: my_sqlcode := SQLCODE;
788: IF PG_DEBUG in ('Y', 'C') THEN
789: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'x_demand_id '||x_demand_id);
790: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'insert row: sqlcode = '|| to_char(my_sqlcode));
791: END IF;
792:
793: -- Commit chenges only in PDS - for summary enhancement

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

786: END IF;
787: my_sqlcode := SQLCODE;
788: IF PG_DEBUG in ('Y', 'C') THEN
789: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'x_demand_id '||x_demand_id);
790: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'insert row: sqlcode = '|| to_char(my_sqlcode));
791: END IF;
792:
793: -- Commit chenges only in PDS - for summary enhancement
794: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND p_plan_id = -1 THEN

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

793: -- Commit chenges only in PDS - for summary enhancement
794: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND p_plan_id = -1 THEN
795: -- in case of summmary mode we always commit after each change
796: IF PG_DEBUG in ('Y', 'C') THEN
797: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'Commit in summary mode');
798: END IF;
799: commit;
800: END IF;
801:

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

799: commit;
800: END IF;
801:
802: IF PG_DEBUG in ('Y', 'C') THEN
803: msc_sch_wb.atp_debug('***** End Add_Mat_Demand *****');
804: END IF;
805:
806: EXCEPTION
807: WHEN OTHERS THEN

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

806: EXCEPTION
807: WHEN OTHERS THEN
808: my_sqlcode := SQLCODE;
809: IF PG_DEBUG in ('Y', 'C') THEN
810: msc_sch_wb.atp_debug('Add_Mat_Demand: ' || 'error in insert row: sqlcode = '|| to_char(my_sqlcode));
811: END IF;
812:
813: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
814: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Add_Mat_Demand');

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

824: IS
825: temp number;
826: BEGIN
827: IF PG_DEBUG in ('Y', 'C') THEN
828: msc_sch_wb.atp_debug('***** Begin Add_Pegging Procedure *****');
829: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
830: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
831: p_pegging_rec.component_identifier);
832: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);

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

825: temp number;
826: BEGIN
827: IF PG_DEBUG in ('Y', 'C') THEN
828: msc_sch_wb.atp_debug('***** Begin Add_Pegging Procedure *****');
829: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
830: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
831: p_pegging_rec.component_identifier);
832: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
833: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);

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

826: BEGIN
827: IF PG_DEBUG in ('Y', 'C') THEN
828: msc_sch_wb.atp_debug('***** Begin Add_Pegging Procedure *****');
829: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
830: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
831: p_pegging_rec.component_identifier);
832: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
833: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
834: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);

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

828: msc_sch_wb.atp_debug('***** Begin Add_Pegging Procedure *****');
829: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
830: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
831: p_pegging_rec.component_identifier);
832: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
833: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
834: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
835: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
836: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);

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

829: msc_sch_wb.atp_debug('Add_Pegging: ' || 'p_pegging_rec.ptf_date := ' || p_pegging_rec.ptf_date);
830: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
831: p_pegging_rec.component_identifier);
832: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
833: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
834: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
835: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
836: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
837: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);

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

830: msc_sch_wb.atp_debug('Add_Pegging: ' || 'pegging component_identifier : '||
831: p_pegging_rec.component_identifier);
832: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
833: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
834: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
835: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
836: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
837: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);
838:

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

831: p_pegging_rec.component_identifier);
832: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
833: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
834: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
835: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
836: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
837: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);
838:
839: END IF;

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

832: msc_sch_wb.atp_debug('Add_Pegging: ' || 'Parent peg id := ' || p_pegging_rec.parent_pegging_id);
833: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
834: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
835: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
836: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
837: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);
838:
839: END IF;
840:

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

833: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scaling_type := ' || p_pegging_rec.scaling_type);
834: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_multiple := ' || p_pegging_rec.scale_multiple);
835: msc_sch_wb.atp_debug('Add_Pegging: ' || 'scale_rounding_variance := ' || p_pegging_rec.scale_rounding_variance);
836: msc_sch_wb.atp_debug('Add_Pegging: ' || 'rounding_direction := ' || p_pegging_rec.rounding_direction);
837: msc_sch_wb.atp_debug('Add_Pegging: ' || 'component_yield_factor := ' || p_pegging_rec.component_yield_factor);
838:
839: END IF;
840:
841: INSERT into mrp_atp_details_temp

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

1059: )
1060: RETURNING pegging_id INTO x_pegging_id;
1061:
1062: IF PG_DEBUG in ('Y', 'C') THEN
1063: msc_sch_wb.atp_debug('Add_Pegging: ' || 'x_pegging_id = '||x_pegging_id);
1064: msc_sch_wb.atp_debug('***** End Add_Pegging Procedure *****');
1065: END IF;
1066:
1067: END Add_Pegging;

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

1060: RETURNING pegging_id INTO x_pegging_id;
1061:
1062: IF PG_DEBUG in ('Y', 'C') THEN
1063: msc_sch_wb.atp_debug('Add_Pegging: ' || 'x_pegging_id = '||x_pegging_id);
1064: msc_sch_wb.atp_debug('***** End Add_Pegging Procedure *****');
1065: END IF;
1066:
1067: END Add_Pegging;
1068:

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

1109: l_supply_rec MSC_ATP_DB_UTILS.Supply_Rec_Typ;
1110:
1111: BEGIN
1112: IF PG_DEBUG in ('Y', 'C') THEN
1113: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
1114: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
1115: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
1116: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1117: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);

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

1110:
1111: BEGIN
1112: IF PG_DEBUG in ('Y', 'C') THEN
1113: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
1114: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
1115: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
1116: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1117: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
1118: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);

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

1111: BEGIN
1112: IF PG_DEBUG in ('Y', 'C') THEN
1113: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
1114: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
1115: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
1116: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1117: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
1118: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1119: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);

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

1112: IF PG_DEBUG in ('Y', 'C') THEN
1113: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
1114: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
1115: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
1116: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1117: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
1118: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1119: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
1120: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);

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

1113: msc_sch_wb.atp_debug('***** Begin Add_Planned_Order Procedure *****');
1114: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
1115: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
1116: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1117: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
1118: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1119: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
1120: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
1121: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);

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

1114: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_quantity := ' || p_order_quantity);
1115: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
1116: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1117: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
1118: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1119: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
1120: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
1121: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
1122: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);

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

1115: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
1116: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1117: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
1118: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1119: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
1120: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
1121: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
1122: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
1123: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);

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

1116: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1117: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
1118: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1119: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
1120: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
1121: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
1122: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
1123: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
1124: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);

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

1117: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_organization_id := ' || p_organization_id);
1118: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1119: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
1120: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
1121: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
1122: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
1123: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
1124: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
1125: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);

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

1118: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_schedule_date := ' || p_schedule_date);
1119: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
1120: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
1121: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
1122: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
1123: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
1124: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
1125: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
1126: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);

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

1119: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_id := ' || p_supplier_id);
1120: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
1121: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
1122: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
1123: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
1124: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
1125: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
1126: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
1127: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);

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

1120: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
1121: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
1122: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
1123: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
1124: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
1125: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
1126: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
1127: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
1128: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);

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

1121: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_refresh_number := ' || p_refresh_number);
1122: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
1123: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
1124: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
1125: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
1126: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
1127: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
1128: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);
1129: END IF;

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

1122: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_request_item_id := ' || p_request_item_id);
1123: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
1124: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
1125: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
1126: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
1127: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
1128: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);
1129: END IF;
1130:

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

1123: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_atf_date := ' || p_atf_date);
1124: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
1125: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
1126: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
1127: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
1128: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);
1129: END IF;
1130:
1131: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

1124: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_dock_date := ' || p_new_dock_date);
1125: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_new_ship_date := ' || p_new_ship_date);
1126: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_start_date := ' || p_start_date);
1127: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_order_date := ' || p_order_date);
1128: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'p_intransit_lead_time := ' || p_intransit_lead_time);
1129: END IF;
1130:
1131: x_return_status := FND_API.G_RET_STS_SUCCESS;
1132:

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

1166: x_transaction_id := l_supply_rec.transaction_id;
1167: x_return_status := l_supply_rec.return_status;
1168:
1169: IF PG_DEBUG in ('Y', 'C') THEN
1170: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'x_transaction_id = '||x_transaction_id);
1171: msc_sch_wb.atp_debug('***** End Add_Planned_Order Procedure *****');
1172: END IF;
1173:
1174: END Add_Planned_Order;

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

1167: x_return_status := l_supply_rec.return_status;
1168:
1169: IF PG_DEBUG in ('Y', 'C') THEN
1170: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'x_transaction_id = '||x_transaction_id);
1171: msc_sch_wb.atp_debug('***** End Add_Planned_Order Procedure *****');
1172: END IF;
1173:
1174: END Add_Planned_Order;
1175:

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

1201: IS
1202: temp_sd_qty number;
1203: BEGIN
1204: IF PG_DEBUG in ('Y', 'C') THEN
1205: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1206: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1207: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1208: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1209: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);

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

1202: temp_sd_qty number;
1203: BEGIN
1204: IF PG_DEBUG in ('Y', 'C') THEN
1205: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1206: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1207: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1208: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1209: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1210: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);

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

1203: BEGIN
1204: IF PG_DEBUG in ('Y', 'C') THEN
1205: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1206: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1207: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1208: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1209: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1210: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1211: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);

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

1204: IF PG_DEBUG in ('Y', 'C') THEN
1205: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1206: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1207: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1208: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1209: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1210: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1211: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1212: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);

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

1205: msc_sch_wb.atp_debug('***** Begin Add_Resource_Demand Procedure *****');
1206: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1207: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1208: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1209: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1210: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1211: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1212: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1213: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);

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

1206: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_id := ' || p_resource_id);
1207: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1208: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1209: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1210: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1211: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1212: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1213: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1214: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);

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

1207: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_department_id := ' || p_department_id);
1208: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1209: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1210: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1211: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1212: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1213: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1214: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1215: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);

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

1208: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_hours := ' || p_resource_hours);
1209: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1210: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1211: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1212: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1213: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1214: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1215: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1216: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604

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

1209: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_resource_cap_hrs := ' || p_resource_cap_hrs);
1210: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1211: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1212: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1213: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1214: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1215: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1216: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1217: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604

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

1210: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_item_id := ' || p_item_id);
1211: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1212: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1213: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1214: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1215: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1216: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1217: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604
1218: END IF;

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

1211: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_start_date := ' || p_start_date);
1212: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1213: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1214: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1215: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1216: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1217: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604
1218: END IF;
1219:

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

1212: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_end_date := ' || p_end_date);
1213: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1214: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1215: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1216: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1217: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604
1218: END IF;
1219:
1220: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

1213: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_refresh_number := ' || p_refresh_number);
1214: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_basis_type := ' || p_basis_type);
1215: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_op_seq_num := ' || p_op_seq_num);
1216: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_unadj_resource_hours := ' || p_unadj_resource_hours); --5093604
1217: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'p_touch_time := ' || p_touch_time); --5093604
1218: END IF;
1219:
1220: x_return_status := FND_API.G_RET_STS_SUCCESS;
1221:

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

1287: -- Code to make summary updates and commit removed for summary enhancement
1288: /** code commented for time being. Will be removed after code review
1289: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
1290: IF PG_DEBUG in ('Y', 'C') THEN
1291: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || ' In summary mode update resource req');
1292: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'First update');
1293: END IF;
1294: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
1295: p_plan_id,

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

1288: /** code commented for time being. Will be removed after code review
1289: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
1290: IF PG_DEBUG in ('Y', 'C') THEN
1291: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || ' In summary mode update resource req');
1292: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'First update');
1293: END IF;
1294: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
1295: p_plan_id,
1296: p_organization_id,

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

1312: and resource_id = p_resource_id
1313: and department_id = p_department_id
1314: and sd_date = trunc(p_start_date);
1315: IF PG_DEBUG in ('Y', 'C') THEN
1316: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'after update qty := ' || temp_sd_qty);
1317: END IF;
1318:
1319:
1320: IF SQL%NOTFOUND THEN

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

1318:
1319:
1320: IF SQL%NOTFOUND THEN
1321: IF PG_DEBUG in ('Y', 'C') THEN
1322: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'Couldnt update. Inset the row');
1323: END IF;
1324: BEGIN
1325: INSERT /*+ INDEX(msc_atp_summary_RES MSC_ATP_SUMMARY_SD_RES) *//* INTO MSC_ATP_SUMMARY_RES
1326: (plan_id,

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

1373: and sd_date = trunc(p_start_date);
1374: END;
1375: END IF; --- if sql%notfound
1376: IF PG_DEBUG in ('Y', 'C') THEN
1377: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'Summary mode commit, in resource_req');
1378: END IF;
1379: commit;
1380: END IF; --- if MSC_ATP_PVT.SUMMARY_FLAG = 'Y'
1381: ***/

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

1380: END IF; --- if MSC_ATP_PVT.SUMMARY_FLAG = 'Y'
1381: ***/
1382:
1383: IF PG_DEBUG in ('Y', 'C') THEN
1384: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'x_transaction_id = '||x_transaction_id);
1385: msc_sch_wb.atp_debug('***** End Add_Resource_Demand Procedure *****');
1386: END IF;
1387:
1388: END Add_Resource_Demand;

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

1381: ***/
1382:
1383: IF PG_DEBUG in ('Y', 'C') THEN
1384: msc_sch_wb.atp_debug('Add_Resource_Demand: ' || 'x_transaction_id = '||x_transaction_id);
1385: msc_sch_wb.atp_debug('***** End Add_Resource_Demand Procedure *****');
1386: END IF;
1387:
1388: END Add_Resource_Demand;
1389:

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

1394: IS
1395:
1396: BEGIN
1397: IF PG_DEBUG in ('Y', 'C') THEN
1398: msc_sch_wb.atp_debug('Begin delete_pegging,p_pegging_id='||p_pegging_id);
1399: END IF;
1400:
1401: DELETE FROM mrp_atp_details_temp
1402: WHERE pegging_id = p_pegging_id

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

1402: WHERE pegging_id = p_pegging_id
1403: AND session_id = MSC_ATP_PVT.G_SESSION_ID;
1404:
1405: IF PG_DEBUG in ('Y', 'C') THEN
1406: msc_sch_wb.atp_debug('After delete_pegging,p_pegging_id='||p_pegging_id);
1407: END IF;
1408:
1409: EXCEPTION
1410: WHEN OTHERS THEN

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

1466: -- CTO ODR and Simplified Pegging
1467: l_return_status VARCHAR2(1);
1468: BEGIN
1469: IF PG_DEBUG in ('Y', 'C') THEN
1470: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1471: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1472: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1473: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1474: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);

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

1467: l_return_status VARCHAR2(1);
1468: BEGIN
1469: IF PG_DEBUG in ('Y', 'C') THEN
1470: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1471: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1472: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1473: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1474: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1475: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);

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

1468: BEGIN
1469: IF PG_DEBUG in ('Y', 'C') THEN
1470: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1471: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1472: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1473: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1474: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1475: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);
1476: END IF;

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

1469: IF PG_DEBUG in ('Y', 'C') THEN
1470: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1471: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1472: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1473: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1474: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1475: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);
1476: END IF;
1477: IF p_plan_id = -1 THEN

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

1470: msc_sch_wb.atp_debug('**********Begin Delete_Row Procedure************');
1471: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1472: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1473: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1474: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1475: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);
1476: END IF;
1477: IF p_plan_id = -1 THEN
1478:

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

1471: msc_sch_wb.atp_debug('Delete_Row: ' || 'p_plan_id := ' || p_plan_id);
1472: msc_sch_wb.atp_debug(' identifier := ' || p_identifier);
1473: msc_sch_wb.atp_debug(' p_config_line_id := ' || p_config_line_id);
1474: msc_sch_wb.atp_debug('Ato model line id := ' || p_ato_model_line_id);
1475: msc_sch_wb.atp_debug('p_source_organization id := ' || p_source_organization_Id);
1476: END IF;
1477: IF p_plan_id = -1 THEN
1478:
1479: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND G_ORIG_INV_CTP = 5 THEN

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

1523: -1);
1524:
1525:
1526: IF PG_DEBUG in ('Y', 'C') THEN
1527: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);
1528: --Bug 4336692, In case above queries donot return anything,
1529: -- following debug statement will cause an error.
1530: --msc_sch_wb.atp_debug( 'x_ods_atp_refresh_no' || x_ods_atp_refresh_no(1));
1531: msc_sch_wb.atp_debug('x_demand_id(1) ' ||x_demand_id.count);

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

1526: IF PG_DEBUG in ('Y', 'C') THEN
1527: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);
1528: --Bug 4336692, In case above queries donot return anything,
1529: -- following debug statement will cause an error.
1530: --msc_sch_wb.atp_debug( 'x_ods_atp_refresh_no' || x_ods_atp_refresh_no(1));
1531: msc_sch_wb.atp_debug('x_demand_id(1) ' ||x_demand_id.count);
1532: END IF;
1533:
1534: --s_cto_rearch: Now delete rows fpr CTO components

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

1527: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);
1528: --Bug 4336692, In case above queries donot return anything,
1529: -- following debug statement will cause an error.
1530: --msc_sch_wb.atp_debug( 'x_ods_atp_refresh_no' || x_ods_atp_refresh_no(1));
1531: msc_sch_wb.atp_debug('x_demand_id(1) ' ||x_demand_id.count);
1532: END IF;
1533:
1534: --s_cto_rearch: Now delete rows fpr CTO components
1535: IF p_ato_model_line_id is not null THEN

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

1564: bulk collect into x_ods_cto_demand_ids, x_ods_cto_inv_item_ids, x_ods_cto_atp_refresh_no ;
1565:
1566:
1567: IF PG_DEBUG in ('Y', 'C') THEN
1568: msc_sch_wb.atp_debug('Number of component lines updated := ' || SQL%ROWCOUNT);
1569: END IF;
1570:
1571: Update msc_sales_orders
1572: set atp_refresh_number = 10000000000 --3720018

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

1582:
1583: END IF;
1584: ELSE
1585: IF PG_DEBUG in ('Y', 'C') THEN
1586: msc_sch_wb.atp_debug('Delete_Row: ' || 'Deleting msc_demands with identifier = '||
1587: p_identifier ||' : plan id = '||p_plan_id);
1588: END IF;
1589:
1590: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN

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

1588: END IF;
1589:
1590: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
1591: IF PG_DEBUG in ('Y', 'C') THEN
1592: msc_sch_wb.atp_debug('Delete_Row: ' || 'Obtain the latest refresh number.');
1593: END IF;
1594:
1595: SELECT latest_refresh_number
1596: INTO l_current_refresh_number

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

1597: FROM MSC_PLANS
1598: WHERE plan_id = p_plan_id;
1599:
1600: IF PG_DEBUG in ('Y', 'C') THEN
1601: msc_sch_wb.atp_debug('Delete_Row: ' || 'l_current_refresh_number := ' || l_current_refresh_number);
1602: END IF;
1603: END IF;
1604:
1605: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'N') OR

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

1610: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
1611: -- If condition added for summary enhancement
1612: -- execute the old code non-summary cases and demand priority allocation cases
1613: IF PG_DEBUG in ('Y', 'C') THEN
1614: msc_sch_wb.atp_debug('Delete_Row: ' || 'Summary , PF or allocated.');
1615: END IF;
1616:
1617: -- Bug # 1868383, do not delete old demand records, rather just update qty = 0
1618: -- Bug 2738280. Club the 2 update SQL's into one.

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

1668: -- Returning clause changed for summary enhancement
1669:
1670: l_del_rows := SQL%ROWCOUNT;
1671: IF PG_DEBUG in ('Y', 'C') THEN
1672: msc_sch_wb.atp_debug('Delete_Row: ' || 'No. of demands updated = '|| l_del_rows);
1673: FOR i IN 1..x_demand_id.COUNT LOOP
1674: msc_sch_wb.atp_debug('Delete_Row i: ' || i || '; demand_id: '|| x_demand_id(i) || '; inv_item_id: '|| x_inv_item_id(i));
1675: END LOOP;
1676: END IF;

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

1670: l_del_rows := SQL%ROWCOUNT;
1671: IF PG_DEBUG in ('Y', 'C') THEN
1672: msc_sch_wb.atp_debug('Delete_Row: ' || 'No. of demands updated = '|| l_del_rows);
1673: FOR i IN 1..x_demand_id.COUNT LOOP
1674: msc_sch_wb.atp_debug('Delete_Row i: ' || i || '; demand_id: '|| x_demand_id(i) || '; inv_item_id: '|| x_inv_item_id(i));
1675: END LOOP;
1676: END IF;
1677:
1678: ELSE

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

1677:
1678: ELSE
1679:
1680: IF PG_DEBUG in ('Y', 'C') THEN
1681: msc_sch_wb.atp_debug('Delete_Row: ' || 'Unallocated summary');
1682: END IF;
1683:
1684: /*SELECT demand_id,
1685: inventory_item_id,

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

1725: ;*/ --commented out as now combining this with update and returning clause
1726:
1727: --IF x_demand_id IS NOT NULL AND x_demand_id.COUNT > 0 THEN
1728: -- IF PG_DEBUG in ('Y', 'C') THEN
1729: -- msc_sch_wb.atp_debug('Delete_Row: ' || 'x_demand_id.COUNT:' || x_demand_id.COUNT);
1730: --END IF;
1731:
1732: --FORALL i in 1..x_demand_id.COUNT --cmro
1733: UPDATE msc_demands

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

1755: 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
1756:
1757: IF x_demand_id IS NOT NULL AND x_demand_id.COUNT > 0 THEN
1758: IF PG_DEBUG in ('Y', 'C') THEN
1759: msc_sch_wb.atp_debug('Delete_Row: ' || 'x_demand_id.COUNT:' || x_demand_id.COUNT);
1760: END IF;
1761:
1762: FOR i IN 1..x_demand_id.COUNT LOOP
1763: IF l_current_refresh_number IS NULL -- summary has not run

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

1763: IF l_current_refresh_number IS NULL -- summary has not run
1764: OR l_refresh_number_tab(i) > l_current_refresh_number THEN -- SO being unscheduled has not been summarized
1765:
1766: IF PG_DEBUG in ('Y', 'C') THEN
1767: msc_sch_wb.atp_debug('Delete_Row: ' || 'Copy SO will be created for demand id ' || x_demand_id(i));
1768: END IF;
1769:
1770: i_ins_item_id_tab.Extend;
1771: l_ins_org_id_tab.Extend;

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

1788:
1789: IF i_ins_item_id_tab IS NOT NULL and i_ins_item_id_tab.COUNT > 0 THEN
1790: -- Insert copy sales orders
1791: IF PG_DEBUG in ('Y', 'C') THEN
1792: msc_sch_wb.atp_debug('Delete_Row: ' || 'i_ins_item_id_tab.COUNT:' || i_ins_item_id_tab.COUNT);
1793: END IF;
1794:
1795: FORALL i IN 1..i_ins_item_id_tab.COUNT
1796: INSERT INTO MSC_DEMANDS(

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

1828: l_ins_refresh_number_tab(i));
1829:
1830: ELSE
1831: IF PG_DEBUG in ('Y', 'C') THEN
1832: msc_sch_wb.atp_debug('Delete_Row: ' || 'No copy Sales Orders');
1833: END IF;
1834: END IF;
1835:
1836: x_copy_demand_id := l_copy_demand_id;

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

1836: x_copy_demand_id := l_copy_demand_id;
1837:
1838: ELSE -- IF x_demand_id IS NOT NULL AND x_demand_id.COUNT > 0 THEN
1839: IF PG_DEBUG in ('Y', 'C') THEN
1840: msc_sch_wb.atp_debug('Delete_Row: ' || 'No demands to be deleted');
1841: END IF;
1842: END IF;
1843:
1844: END IF;

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

1847: -- Code to update summary records removed for summary enhancement
1848: /** code commented for time being. Will be removed after code review
1849: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
1850: IF PG_DEBUG in ('Y', 'C') THEN
1851: msc_sch_wb.atp_debug('Delete_Row: ' || 'update Demands in summary mode');
1852: END IF;
1853: -- Bug 2738280. Change the input parameters of procedure call.
1854: -- MSC_ATP_DB_UTILS.UPDATE_PLAN_SUMMARY_ROW(p_identifier, p_plan_id, p_instance_id);
1855: MSC_ATP_DB_UTILS.UPDATE_PLAN_SUMMARY_ROW(x_inv_item_id, l_old_demand_date, l_old_demand_quantity,

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

1868: --(MSC_ATP_PVT.G_ALLOCATION_METHOD = 1))) AND p_ato_model_line_id is null THEN
1869: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1))) THEN
1870:
1871: IF PG_DEBUG in ('Y', 'C') THEN
1872: msc_sch_wb.atp_debug('Delete_Row: before update of msc_alloc_demands');
1873: END IF;
1874:
1875: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'N' THEN
1876: -- If condition added for summary enhancement

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

1877: -- For non summary case since no returning is required hence direct bulk update is used
1878:
1879: IF l_identifier_tab IS NOT NULL and l_identifier_tab.COUNT > 0 THEN
1880: IF PG_DEBUG in ('Y', 'C') THEN
1881: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);
1882: END IF;
1883:
1884: FORALL i IN 1..l_identifier_tab.COUNT
1885: UPDATE msc_alloc_demands

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

1970:
1971: IF l_identifier_tab IS NOT NULL and l_identifier_tab.COUNT > 0 THEN
1972:
1973: IF PG_DEBUG in ('Y', 'C') THEN
1974: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);
1975: END IF;
1976:
1977: FORALL i IN 1..l_identifier_tab.COUNT
1978: UPDATE msc_alloc_demands

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

1998: FOR i IN 1..i_item_id_tab.COUNT LOOP
1999: IF l_current_refresh_number IS NULL -- summary has not run
2000: OR l_refresh_number_tab(i) > l_current_refresh_number THEN
2001: IF PG_DEBUG in ('Y', 'C') THEN
2002: msc_sch_wb.atp_debug('Delete_Row: ' || 'Copy SO will be created for identifier ' || l_identifier_tab(i));
2003: END IF;
2004:
2005: i_ins_item_id_tab.Extend;
2006: l_ins_org_id_tab.Extend;

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

2072:
2073: IF l_identifier_tab IS NOT NULL and l_identifier_tab.COUNT > 0 THEN
2074:
2075: IF PG_DEBUG in ('Y', 'C') THEN
2076: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);
2077: END IF;
2078:
2079: FORALL i IN 1..l_identifier_tab.COUNT
2080: UPDATE msc_alloc_supplies

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

2102: IF l_current_refresh_number IS NULL -- summary has not run
2103: OR l_refresh_number_tab(i) > l_current_refresh_number THEN
2104:
2105: IF PG_DEBUG in ('Y', 'C') THEN
2106: msc_sch_wb.atp_debug('Delete_Row: ' || 'Copy stealing will be created for identifier ' || l_identifier_tab(i));
2107: END IF;
2108:
2109: i_ins_item_id_tab.Extend;
2110: l_ins_org_id_tab.Extend;

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

2131:
2132:
2133: IF i_ins_item_id_tab IS NOT NULL and i_ins_item_id_tab.COUNT > 0 THEN
2134: IF PG_DEBUG in ('Y', 'C') THEN
2135: msc_sch_wb.atp_debug('Delete_Row: i_ins_item_id_tab.COUNT ' || i_ins_item_id_tab.COUNT);
2136: END IF;
2137:
2138: FORALL i IN 1..i_ins_item_id_tab.COUNT
2139: INSERT INTO MSC_ALLOC_DEMANDS(

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

2195: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 AND G_ORIG_INV_CTP = 5 THEN
2196: -- Condition for INV_CTP added for bug 3295831 because summary
2197: -- is not supported in PDS-ODS switch.
2198: IF PG_DEBUG in ('Y', 'C') THEN
2199: msc_sch_wb.atp_debug('Summary mode commit, in Delete_Row');
2200: END IF;
2201: commit;
2202: END IF;
2203:

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

2201: commit;
2202: END IF;
2203:
2204: IF PG_DEBUG in ('Y', 'C') THEN
2205: msc_sch_wb.atp_debug('**********End Delete_Row Procedure************');
2206: END IF;
2207:
2208: EXCEPTION
2209: WHEN OTHERS THEN

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

2211: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME , 'Delete_Row');
2212: END IF;
2213:
2214: IF PG_DEBUG in ('Y', 'C') THEN
2215: msc_sch_wb.atp_debug('Delete_Row :' || sqlcode || ': ' || sqlerrm);
2216: END IF;
2217: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2218:
2219: END Delete_Row;

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

2271: l_allocated_atp varchar2(1):= MSC_ATP_PVT.G_ALLOCATED_ATP;
2272:
2273: BEGIN
2274: IF PG_DEBUG in ('Y', 'C') THEN
2275: msc_sch_wb.atp_debug('***** Begin Remove_Invalid_SD_Rec Procedure *****');
2276: END IF;
2277:
2278: -- for ods, just need to remove the record from msc_sales_orders
2279: -- initialize API return status to success

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

2279: -- initialize API return status to success
2280: x_return_status := FND_API.G_RET_STS_SUCCESS;
2281:
2282: -- rajjain 05/19/2003 bug 2959840
2283: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Reset all the global variables ');
2284: -- Begin ATP4drp Allocation not supported for DRP plans.
2285: IF (NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5) THEN
2286: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2287: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;

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

2285: IF (NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5) THEN
2286: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2287: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;
2288: IF PG_DEBUG in ('Y', 'C') THEN
2289: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2290: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'PF and Allocated ATP not applicable for DRP plans');
2291: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2292: END IF;
2293: ELSE

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

2286: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2287: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;
2288: IF PG_DEBUG in ('Y', 'C') THEN
2289: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2290: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'PF and Allocated ATP not applicable for DRP plans');
2291: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2292: END IF;
2293: ELSE
2294: -- ATP4drp set using the original value

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

2287: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;
2288: IF PG_DEBUG in ('Y', 'C') THEN
2289: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2290: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'PF and Allocated ATP not applicable for DRP plans');
2291: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2292: END IF;
2293: ELSE
2294: -- ATP4drp set using the original value
2295: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;

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

2298: -- End ATP4drp
2299: MSC_ATP_PVT.G_INV_CTP := FND_PROFILE.value('INV_CTP') ;
2300:
2301: IF PG_DEBUG in ('Y', 'C') THEN
2302: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2303: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2304: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2305: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2306: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);

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

2299: MSC_ATP_PVT.G_INV_CTP := FND_PROFILE.value('INV_CTP') ;
2300:
2301: IF PG_DEBUG in ('Y', 'C') THEN
2302: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2303: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2304: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2305: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2306: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2307: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);

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

2300:
2301: IF PG_DEBUG in ('Y', 'C') THEN
2302: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2303: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2304: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2305: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2306: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2307: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);
2308: END IF;

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

2301: IF PG_DEBUG in ('Y', 'C') THEN
2302: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2303: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2304: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2305: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2306: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2307: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);
2308: END IF;
2309:

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

2302: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATION_METHOD= ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
2303: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2304: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2305: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2306: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2307: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);
2308: END IF;
2309:
2310:

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

2303: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'G_ALLOCATED_ATP= ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2304: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'INV_CTP= ' || MSC_ATP_PVT.G_INV_CTP);
2305: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_mode= ' || p_mode);
2306: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_identifier= ' || p_identifier);
2307: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'p_instance_id = '||p_instance_id);
2308: END IF;
2309:
2310:
2311: OPEN pegging;

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

2315: EXIT WHEN pegging%NOTFOUND;
2316: ---set l_inventory_item_id back to null;
2317: l_inventory_item_id := null;
2318: IF PG_DEBUG in ('Y', 'C') THEN
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2321: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2322: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2323: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);

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

2316: ---set l_inventory_item_id back to null;
2317: l_inventory_item_id := null;
2318: IF PG_DEBUG in ('Y', 'C') THEN
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2321: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2322: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2323: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2324: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);

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

2317: l_inventory_item_id := null;
2318: IF PG_DEBUG in ('Y', 'C') THEN
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2321: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2322: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2323: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2324: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2325: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);

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

2318: IF PG_DEBUG in ('Y', 'C') THEN
2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2321: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2322: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2323: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2324: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2325: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2326: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);

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

2319: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'pegging_id = '||c1.pegging_id);
2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2321: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2322: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2323: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2324: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2325: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2326: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2327: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);

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

2320: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_type = '||c1.supply_demand_type);
2321: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2322: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2323: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2324: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2325: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2326: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2327: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2328: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);

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

2321: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'identifier3 = '||c1.identifier3);
2322: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2323: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2324: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2325: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2326: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2327: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2328: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2329: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);

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

2322: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'plan_id (identifier2) = '||c1.identifier2);
2323: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2324: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2325: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2326: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2327: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2328: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2329: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2330: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);

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

2323: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
2324: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2325: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2326: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2327: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2328: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2329: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2330: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);
2331: END IF;

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

2324: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_quantity := ' || c1.supply_demand_quantity);
2325: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2326: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2327: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2328: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2329: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2330: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);
2331: END IF;
2332: l_organization_id := null;

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

2325: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'organization_id := ' || c1.organization_id);
2326: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2327: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2328: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2329: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2330: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);
2331: END IF;
2332: l_organization_id := null;
2333:

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

2326: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2327: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_id := ' || c1.supplier_id);
2328: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_site_id := ' || c1.supplier_site_id);
2329: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supplier_atp_date := ' || c1.supplier_atp_date);
2330: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Destination inv_item id := ' || c1.dest_inv_item_id);
2331: END IF;
2332: l_organization_id := null;
2333:
2334: IF p_mode = MSC_ATP_PVT.INVALID or (p_mode=MSC_ATP_PVT.UNDO and p_instance_id is null) THEN

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

2335:
2336: MSC_ATP_DB_UTILS.Delete_Pegging(c1.pegging_id);
2337:
2338: IF PG_DEBUG in ('Y', 'C') THEN
2339: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete this pegging_id '||c1.pegging_id);
2340: END IF;
2341: END IF;
2342:
2343: IF c1.supply_demand_type = 2 THEN

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

2351: returning inventory_item_id, sr_instance_id,new_order_quantity, organization_id, supplier_id, supplier_site_id
2352: into l_inventory_item_id, l_instance_id, l_sd_qty, l_organization_id, l_supplier_id, l_supplier_site_id;
2353:
2354: IF PG_DEBUG in ('Y', 'C') THEN
2355: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2356: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2357: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2358: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2359: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);

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

2352: into l_inventory_item_id, l_instance_id, l_sd_qty, l_organization_id, l_supplier_id, l_supplier_site_id;
2353:
2354: IF PG_DEBUG in ('Y', 'C') THEN
2355: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2356: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2357: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2358: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2359: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2360: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);

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

2353:
2354: IF PG_DEBUG in ('Y', 'C') THEN
2355: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2356: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2357: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2358: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2359: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2360: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2361: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);

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

2354: IF PG_DEBUG in ('Y', 'C') THEN
2355: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2356: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2357: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2358: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2359: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2360: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2361: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);
2362: END IF;

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

2355: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := '|| l_inventory_item_id);
2356: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2357: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2358: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2359: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2360: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2361: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);
2362: END IF;
2363:

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

2356: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2357: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2358: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2359: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2360: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2361: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);
2362: END IF;
2363:
2364: -- time_phased_atp

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

2357: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2358: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2359: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_id := ' || l_supplier_id);
2360: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_supplier_site_id := ' || l_supplier_site_id);
2361: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary flag := ' || c1.summary_flag);
2362: END IF;
2363:
2364: -- time_phased_atp
2365: IF (c1.aggregate_time_fence_date is not null)

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

2369: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
2370: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
2371:
2372: IF PG_DEBUG in ('Y', 'C') THEN
2373: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: before delete of ' ||
2374: ' msc_alloc_supplies');
2375: END IF;
2376:
2377: DELETE FROM MSC_ALLOC_SUPPLIES

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

2378: WHERE parent_transaction_id = c1.identifier3
2379: AND plan_id = c1.identifier2;
2380:
2381: IF PG_DEBUG in ('Y', 'C') THEN
2382: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of supply deleted from msc_alloc_supplies = '|| SQL%ROWCOUNT);
2383: END IF;
2384: END IF;
2385: -- Allocated ATP Based on Planning Details -- Agilent changes End
2386:

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

2390: IF c1.summary_flag = 'Y' and (c1.identifier3 > 0) and (p_plan_id = -1) THEN
2391: -- Check for Plan_id=-1 added for summary enhancement
2392: --- update the MSC_ATP_SUMMARY_SD table
2393: IF PG_DEBUG in ('Y', 'C') THEN
2394: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'update summary table');
2395: END IF;
2396: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2397: p_plan_id,
2398: l_organization_id,

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

2413: inventory_item_id = l_inventory_item_id and
2414: organization_id = l_organization_id and
2415: sd_date = trunc(c1.supply_demand_date);
2416: IF PG_DEBUG in ('Y', 'C') THEN
2417: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'no of rows updated in summary mode := ' || SQL%ROWCOUNT);
2418: END IF;
2419:
2420: commit;
2421: END IF;

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

2428:
2429: IF NVL(c1.char1, '@@@') <> '@@@' THEN
2430:
2431: IF PG_DEBUG in ('Y', 'C') THEN
2432: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete stealing demand from msc_demands, demand_id = '||
2433: c1.identifier3);
2434: END IF;
2435:
2436: DELETE FROM MSC_DEMANDS

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

2446: IF NVL(c1.inventory_item_id, -1) > 0 AND c1.identifier3 is not null THEN
2447: IF c1.identifier2 <> -1 THEN
2448:
2449: IF PG_DEBUG in ('Y', 'C') THEN
2450: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_demand, demand_id = '||
2451: c1.identifier3);
2452: END IF;
2453:
2454: -- Bug 1661545, if scheduling was unsuccessful, old demand record needs to be

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

2467: l_sd_qty, l_organization_id,
2468: l_sd_date;
2469:
2470: IF PG_DEBUG in ('Y', 'C') THEN
2471: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2472: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2473: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2474: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2475: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);

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

2468: l_sd_date;
2469:
2470: IF PG_DEBUG in ('Y', 'C') THEN
2471: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2472: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2473: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2474: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2475: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2476: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);

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

2469:
2470: IF PG_DEBUG in ('Y', 'C') THEN
2471: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2472: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2473: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2474: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2475: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2476: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2477: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);

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

2470: IF PG_DEBUG in ('Y', 'C') THEN
2471: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2472: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2473: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2474: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2475: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2476: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2477: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2478: END IF;

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

2471: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
2472: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2473: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2474: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2475: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2476: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2477: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2478: END IF;
2479:

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

2472: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2473: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2474: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2475: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2476: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2477: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2478: END IF;
2479:
2480: -- time_phased_atp

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

2473: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2474: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2475: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id := ' || l_organization_id);
2476: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date :='||l_sd_date);
2477: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2478: END IF;
2479:
2480: -- time_phased_atp
2481: IF (c1.aggregate_time_fence_date is not null)

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

2485: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
2486: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
2487:
2488: IF PG_DEBUG in ('Y', 'C') THEN
2489: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: before delete of' ||
2490: ' msc_alloc_demands');
2491: END IF;
2492:
2493: DELETE FROM MSC_ALLOC_DEMANDS

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

2495: AND old_allocated_quantity IS NULL
2496: AND plan_id = c1.identifier2;
2497:
2498: IF PG_DEBUG in ('Y', 'C') THEN
2499: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_alloc_demands = '|| SQL%ROWCOUNT);
2500: END IF;
2501: END IF;
2502: -- Allocated ATP Based on Planning Details -- Agilent changes End
2503:

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

2506: /**
2507: IF (c1.summary_flag = 'Y') AND (c1.identifier3 > 0) and (p_plan_id = -1) THEN
2508: -- Check for Plan_id=-1 added for summary enhancement
2509: IF PG_DEBUG in ('Y', 'C') THEN
2510: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary mode, delete demand');
2511: END IF;
2512: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2513: p_plan_id,
2514: l_organization_id,

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

2529: AND organization_id = l_organization_id
2530: AND inventory_item_id = l_inventory_item_id
2531: AND sd_date = trunc(l_sd_date);
2532: IF PG_DEBUG in ('Y', 'C') THEN
2533: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'no of rows updated in summary mode := ' || SQL%ROWCOUNT);
2534: END IF;
2535:
2536: commit;
2537: END IF;

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

2541: -- Code to update summary records and committing removed for Bug 3295831
2542: /** code commented for time being. Will be removed after code review
2543: IF (c1.summary_flag = 'Y') AND (NVL(c1.supplier_id, -1) <> -1) THEN
2544: IF PG_DEBUG in ('Y', 'C') THEN
2545: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'update suppliers info ');
2546: END IF;
2547: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(c1.identifier1,
2548: p_plan_id,
2549: null,

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

2566: and supplier_site_id = c1.supplier_site_id
2567: and sd_date = trunc(c1.supplier_atp_date);
2568:
2569: IF PG_DEBUG in ('Y', 'C') THEN
2570: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Number of rows updated in SUMMARY_SUP := ' || SQL%ROWCOUNT);
2571: END IF;
2572:
2573: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(c1.identifier1,
2574: p_plan_id,

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

2589:
2590: ELSE -- IF c1.identifier2 <> -1 THEN
2591:
2592: IF PG_DEBUG in ('Y', 'C') THEN
2593: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_sales_orders, demand_id = '||
2594: c1.identifier3);
2595: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'demand_source_line := ' || to_char(c1.order_line_id));
2596: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'sr_instance_id := ' || c1.identifier1);
2597: END IF;

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

2591:
2592: IF PG_DEBUG in ('Y', 'C') THEN
2593: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_sales_orders, demand_id = '||
2594: c1.identifier3);
2595: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'demand_source_line := ' || to_char(c1.order_line_id));
2596: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'sr_instance_id := ' || c1.identifier1);
2597: END IF;
2598:
2599: DELETE from msc_sales_orders

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

2592: IF PG_DEBUG in ('Y', 'C') THEN
2593: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'delete demand from msc_sales_orders, demand_id = '||
2594: c1.identifier3);
2595: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'demand_source_line := ' || to_char(c1.order_line_id));
2596: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'sr_instance_id := ' || c1.identifier1);
2597: END IF;
2598:
2599: DELETE from msc_sales_orders
2600: WHERE demand_id = c1.identifier3

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

2607: into l_inventory_item_id, l_demand_class, l_instance_id,
2608: l_sd_qty, l_sd_date;
2609:
2610: IF PG_DEBUG in ('Y', 'C') THEN
2611: msc_sch_wb.atp_debug('Rows deleted := ' || SQL%ROWCOUNT);
2612: END IF;
2613:
2614: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND G_ORIG_INV_CTP = 5 THEN
2615: -- Condition for INV_CTP added for bug 3295831 because summary

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

2614: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND G_ORIG_INV_CTP = 5 THEN
2615: -- Condition for INV_CTP added for bug 3295831 because summary
2616: -- is not supported in PDS-ODS switch.
2617: IF PG_DEBUG in ('Y', 'C') THEN
2618: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2619: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2620: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2621: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2622: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);

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

2615: -- Condition for INV_CTP added for bug 3295831 because summary
2616: -- is not supported in PDS-ODS switch.
2617: IF PG_DEBUG in ('Y', 'C') THEN
2618: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2619: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2620: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2621: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2622: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2623: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);

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

2616: -- is not supported in PDS-ODS switch.
2617: IF PG_DEBUG in ('Y', 'C') THEN
2618: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2619: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2620: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2621: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2622: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2623: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2624: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);

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

2617: IF PG_DEBUG in ('Y', 'C') THEN
2618: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2619: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2620: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2621: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2622: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2623: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2624: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2625: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);

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

2618: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Update summary sales order tbale');
2619: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2620: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2621: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2622: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2623: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2624: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2625: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2626: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);

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

2619: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' supply_demand_quantity := '||c1.supply_demand_quantity);
2620: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2621: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2622: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2623: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2624: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2625: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2626: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);
2627: END IF;

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

2620: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' c1.inventory_item_id := ' || c1.inventory_item_id);
2621: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2622: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2623: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2624: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2625: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2626: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);
2627: END IF;
2628:

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

2621: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' instance_id := ' || p_instance_id);
2622: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2623: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2624: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2625: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2626: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);
2627: END IF;
2628:
2629: BEGIN

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

2622: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || ' organization_id := ' || c1.organization_id);
2623: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'supply_demand_date := ' || c1.supply_demand_date);
2624: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id := ' || l_instance_id);
2625: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_qty := ' || l_sd_qty);
2626: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_sd_date := ' || l_sd_date);
2627: END IF;
2628:
2629: BEGIN
2630: IF PG_DEBUG in ('Y', 'C') THEN

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

2627: END IF;
2628:
2629: BEGIN
2630: IF PG_DEBUG in ('Y', 'C') THEN
2631: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'inventory_item id after conversion := ' || l_inventory_item_id);
2632: END IF;
2633:
2634: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2635: -1,

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

2676:
2677: EXCEPTION
2678: WHEN OTHERS THEN
2679: IF PG_DEBUG in ('Y', 'C') THEN
2680: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || sqlerrm);
2681: END IF;
2682: END;
2683: END IF;
2684:

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

2693: returning department_id, resource_id, organization_id, start_date, sr_instance_id
2694: into l_department_id, l_resource_id, l_organization_id, l_start_date, l_instance_id;
2695:
2696: IF PG_DEBUG in ('Y', 'C') THEN
2697: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'summary_flag := ' || c1.summary_flag);
2698: END IF;
2699:
2700: -- Code to update summary records and committing removed for summary enhancement
2701: /** code commented for time being. Will be removed after code review

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

2700: -- Code to update summary records and committing removed for summary enhancement
2701: /** code commented for time being. Will be removed after code review
2702: IF c1.summary_flag = 'Y' THEN
2703: IF PG_DEBUG in ('Y', 'C') THEN
2704: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2705: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2706: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2707: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2708: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);

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

2701: /** code commented for time being. Will be removed after code review
2702: IF c1.summary_flag = 'Y' THEN
2703: IF PG_DEBUG in ('Y', 'C') THEN
2704: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2705: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2706: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2707: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2708: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);
2709: END IF;

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

2702: IF c1.summary_flag = 'Y' THEN
2703: IF PG_DEBUG in ('Y', 'C') THEN
2704: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2705: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2706: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2707: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2708: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);
2709: END IF;
2710:

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

2703: IF PG_DEBUG in ('Y', 'C') THEN
2704: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2705: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2706: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2707: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2708: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);
2709: END IF;
2710:
2711: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,

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

2704: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_department_id = ' || l_department_id);
2705: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_resource_id = ' || l_resource_id);
2706: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_organization_id = ' || l_organization_id);
2707: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_start_date = ' || l_start_date);
2708: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'l_instance_id = ' || l_instance_id);
2709: END IF;
2710:
2711: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2712: p_plan_id,

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

2730: and resource_id = l_resource_id
2731: and sd_date = trunc(l_start_date);
2732:
2733: IF PG_DEBUG in ('Y', 'C') THEN
2734: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Number of row updated in MSC_ATP_SUMMARY_RES := ' || SQL%ROWCOUNT);
2735: END IF;
2736:
2737: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
2738: p_plan_id,

Line 2761: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Reset G_INV_CTP and G_ALLOCATED_ATP to runtime changed values, if any');

2757: END LOOP;
2758: CLOSE pegging;
2759:
2760: -- bug 9911034, ALLOC ATP CHANGES, 12973673
2761: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'Reset G_INV_CTP and G_ALLOCATED_ATP to runtime changed values, if any');
2762: MSC_ATP_PVT.G_INV_CTP := nvl(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
2763: MSC_ATP_PVT.G_ALLOCATED_ATP := nvl(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);
2764:
2765: IF PG_DEBUG in ('Y', 'C') THEN

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

2762: MSC_ATP_PVT.G_INV_CTP := nvl(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
2763: MSC_ATP_PVT.G_ALLOCATED_ATP := nvl(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);
2764:
2765: IF PG_DEBUG in ('Y', 'C') THEN
2766: msc_sch_wb.atp_debug('***** End Remove_Invalid_SD_Rec Procedure *****');
2767: END IF;
2768:
2769: END Remove_Invalid_SD_Rec;
2770:

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

2777: IS
2778: BEGIN
2779:
2780: IF PG_DEBUG in ('Y', 'C') THEN
2781: msc_sch_wb.atp_debug('Begin Update_Pegging,p_pegging_id='||p_pegging_id);
2782: END IF;
2783:
2784: UPDATE mrp_atp_details_temp
2785: SET supply_demand_quantity = NVL(p_quantity, supply_demand_quantity),

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

2795: AND session_id = MSC_ATP_PVT.G_SESSION_ID
2796: AND record_type = 3;
2797:
2798: IF PG_DEBUG in ('Y', 'C') THEN
2799: msc_sch_wb.atp_debug('End Update_Pegging');
2800: END IF;
2801: EXCEPTION
2802: WHEN OTHERS THEN
2803: IF PG_DEBUG in ('Y', 'C') THEN

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

2800: END IF;
2801: EXCEPTION
2802: WHEN OTHERS THEN
2803: IF PG_DEBUG in ('Y', 'C') THEN
2804: msc_sch_wb.atp_debug('something wrong : Update_Pegging : ' || sqlcode);
2805: END IF;
2806: END Update_Pegging;
2807:
2808: PROCEDURE Update_Planned_Order(

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

2849:
2850: BEGIN
2851:
2852: IF PG_DEBUG in ('Y', 'C') THEN
2853: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2854: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2855: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2857: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);

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

2850: BEGIN
2851:
2852: IF PG_DEBUG in ('Y', 'C') THEN
2853: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2854: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2855: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2857: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2858: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);

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

2851:
2852: IF PG_DEBUG in ('Y', 'C') THEN
2853: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2854: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2855: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2857: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2858: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2859: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);

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

2852: IF PG_DEBUG in ('Y', 'C') THEN
2853: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2854: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2855: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2857: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2858: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2859: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2860: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);

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

2853: msc_sch_wb.atp_debug('***** Begin Update_Planned_Order Procedure *****');
2854: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2855: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2857: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2858: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2859: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2860: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2861: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);

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

2854: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pegging_id = '||p_pegging_id);
2855: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2857: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2858: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2859: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2860: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2861: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2862: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);

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

2855: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_plan_id = '||p_plan_id);
2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2857: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2858: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2859: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2860: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2861: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2862: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2863: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);

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

2856: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_date = '||p_date);
2857: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2858: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2859: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2860: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2861: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2862: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2863: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2864: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);

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

2857: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_quantity = '||p_quantity);
2858: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2859: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2860: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2861: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2862: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2863: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2864: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2865: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);

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

2858: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mode = '||p_mode);
2859: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2860: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2861: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2862: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2863: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2864: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2865: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);
2866: END IF;

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

2859: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_uom_conv_rate = '||p_uom_conv_rate);
2860: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2861: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2862: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2863: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2864: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2865: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);
2866: END IF;
2867:

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

2860: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_dock_date = '||p_dock_date);
2861: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2862: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2863: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2864: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2865: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);
2866: END IF;
2867:
2868: SELECT identifier3, supply_demand_date, supply_demand_quantity, summary_flag

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

2861: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_ship_date = '||p_ship_date);
2862: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_start_date = '||p_start_date);
2863: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_order_date = '||p_order_date);
2864: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_mem_item_id := ' || p_mem_item_id);
2865: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'p_pf_item_id := ' || p_pf_item_id);
2866: END IF;
2867:
2868: SELECT identifier3, supply_demand_date, supply_demand_quantity, summary_flag
2869: ,aggregate_time_fence_date -- for time_phased_atp

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

2876: AND record_type = 3
2877: AND session_id = MSC_ATP_PVT.G_SESSION_ID ;
2878:
2879: IF PG_DEBUG in ('Y', 'C') THEN
2880: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2881: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2882: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2883: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2884: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);

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

2877: AND session_id = MSC_ATP_PVT.G_SESSION_ID ;
2878:
2879: IF PG_DEBUG in ('Y', 'C') THEN
2880: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2881: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2882: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2883: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2884: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2885: -- ATP4drp print out organizations

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

2878:
2879: IF PG_DEBUG in ('Y', 'C') THEN
2880: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2881: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2882: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2883: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2884: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2885: -- ATP4drp print out organizations
2886: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

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

2879: IF PG_DEBUG in ('Y', 'C') THEN
2880: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2881: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2882: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2883: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2884: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2885: -- ATP4drp print out organizations
2886: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2887: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);

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

2880: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after select');
2881: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date := ' || l_sd_date);
2882: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2883: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2884: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2885: -- ATP4drp print out organizations
2886: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2887: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2888: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);

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

2882: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_po_qty := ' || l_po_qty);
2883: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2884: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2885: -- ATP4drp print out organizations
2886: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2887: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2888: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2889: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2890: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);

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

2883: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
2884: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2885: -- ATP4drp print out organizations
2886: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2887: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2888: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2889: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2890: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);
2891: -- ATP4drp print out organizations

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

2884: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_atf_date := ' || l_atf_date);
2885: -- ATP4drp print out organizations
2886: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2887: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2888: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2889: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2890: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);
2891: -- ATP4drp print out organizations
2892: END IF;

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

2885: -- ATP4drp print out organizations
2886: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2887: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2888: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2889: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2890: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);
2891: -- ATP4drp print out organizations
2892: END IF;
2893: --diag_ATP: Do not remove the planned order in diagnostic mode even if the quantity is zero

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

2886: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2887: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_receive_org_id := ' || l_receive_org_id);
2888: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
2889: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2890: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_transaction_id := ' || l_transaction_id);
2891: -- ATP4drp print out organizations
2892: END IF;
2893: --diag_ATP: Do not remove the planned order in diagnostic mode even if the quantity is zero
2894: IF NVL(p_quantity, -1) = 0 AND (MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 or p_mode = MSC_ATP_PVT.INVALID) THEN

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

2901: 0,
2902: l_return_status);
2903:
2904: IF PG_DEBUG in ('Y', 'C') THEN
2905: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after delete mrp_atp_details_temp by calling remove');
2906: END IF;
2907:
2908: --s_cto_rearch
2909: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN

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

2913: END IF;
2914: --e_cto_rearch
2915:
2916: IF PG_DEBUG in ('Y', 'C') THEN
2917: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after msc_supplies');
2918: END IF;
2919: ELSE
2920:
2921: -- dsting diag_atp.

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

2923: MSC_ATP_DB_UTILS.Update_Pegging(p_pegging_id, p_date, p_quantity);
2924: END IF;
2925:
2926: IF PG_DEBUG in ('Y', 'C') THEN
2927: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after first update to mrp_atp_details_temp');
2928: END IF;
2929:
2930: -- For bug 2259824, move the supply to the end of day
2931: --s_cto_rearch:

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

2968: END IF;
2969: --e_cto_rearch
2970:
2971: IF PG_DEBUG in ('Y', 'C') THEN
2972: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := '|| l_organization_id);
2973: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2974: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2975: END IF;
2976:

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

2969: --e_cto_rearch
2970:
2971: IF PG_DEBUG in ('Y', 'C') THEN
2972: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := '|| l_organization_id);
2973: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2974: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2975: END IF;
2976:
2977: -- time_phased_atp

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

2970:
2971: IF PG_DEBUG in ('Y', 'C') THEN
2972: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := '|| l_organization_id);
2973: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2974: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
2975: END IF;
2976:
2977: -- time_phased_atp
2978: IF (p_mem_item_id <> p_pf_item_id) and (l_atf_date is not null) THEN

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

2987: l_return_status
2988: );
2989: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2990: IF PG_DEBUG in ('Y', 'C') THEN
2991: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Error occured in procedure Update_PF_Rollup_Supplies');
2992: END IF;
2993: RAISE FND_API.G_EXC_ERROR;
2994: END IF;
2995:

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

2999: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
3000: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
3001:
3002: IF PG_DEBUG in ('Y', 'C') THEN
3003: msc_sch_wb.atp_debug('Update_Planned_Order: before update of' ||
3004: ' msc_alloc_supplies');
3005: END IF;
3006:
3007: UPDATE msc_alloc_supplies

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

3014: WHERE plan_id = p_plan_id
3015: AND parent_transaction_id = l_transaction_id;
3016:
3017: IF PG_DEBUG in ('Y', 'C') THEN
3018: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows updated := ' || SQL%ROWCOUNT);
3019: END IF;
3020: END IF;
3021:
3022: -- Allocated ATP Based on Planning Details -- Agilent changes End

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

3024: -- Code to update summary records and committing removed for summary enhancement
3025: /** code commented for time being. Will be removed after code review
3026: IF l_summary_flag = 'Y' THEN
3027: IF PG_DEBUG in ('Y', 'C') THEN
3028: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'in Summary mode, update planned orders');
3029: END IF;
3030: IF (p_date is NULL) THEN
3031:
3032: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,

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

3043: 2);
3044:
3045: --- old and new dates are same
3046: IF PG_DEBUG in ('Y', 'C') THEN
3047: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'old and new dates are same');
3048: END IF;
3049: update /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) *//* msc_atp_summary_sd
3050: set sd_qty = sd_qty - l_sd_qty + p_quantity
3051: where plan_id = p_plan_id

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

3068: 2);
3069:
3070: ELSE
3071: IF PG_DEBUG in ('Y', 'C') THEN
3072: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'old and new dates are not same');
3073: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Update summary for old date');
3074: END IF;
3075:
3076: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,

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

3069:
3070: ELSE
3071: IF PG_DEBUG in ('Y', 'C') THEN
3072: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'old and new dates are not same');
3073: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Update summary for old date');
3074: END IF;
3075:
3076: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
3077: p_plan_id,

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

3110:
3111: --- if record exists then update
3112: commit;
3113: IF PG_DEBUG in ('Y', 'C') THEN
3114: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'update the qty on new date ');
3115: END IF;
3116:
3117: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
3118: p_plan_id,

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

3137:
3138: IF SQL%NOTFOUND THEN
3139: -- record doesn't exists. insert the record
3140: IF PG_DEBUG in ('Y', 'C') THEN
3141: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'insert qty on new date');
3142: END IF;
3143:
3144: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
3145: l_instance_id,

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

3177: l_plan_id := NULL;
3178: END ;
3179:
3180: IF PG_DEBUG in ('Y', 'C') THEN
3181: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3182: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3183: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3184: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3185: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);

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

3178: END ;
3179:
3180: IF PG_DEBUG in ('Y', 'C') THEN
3181: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3182: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3183: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3184: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3185: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3186: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);

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

3179:
3180: IF PG_DEBUG in ('Y', 'C') THEN
3181: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3182: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3183: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3184: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3185: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3186: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3187: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);

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

3180: IF PG_DEBUG in ('Y', 'C') THEN
3181: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3182: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3183: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3184: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3185: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3186: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3187: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3188: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);

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

3181: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3182: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3183: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3184: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3185: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3186: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3187: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3188: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
3189: END IF;

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

3182: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_plan_id := '|| l_plan_id);
3183: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3184: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3185: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3186: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3187: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3188: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
3189: END IF;
3190:

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

3183: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_date :=' || l_sd_date);
3184: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3185: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3186: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3187: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3188: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
3189: END IF;
3190:
3191: --- update supplier info

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

3184: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_sd_qty :=' || l_sd_qty);
3185: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_organization_id := ' || l_organization_id);
3186: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3187: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_supplier_atp_date := ' || l_supplier_atp_date);
3188: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_summary_flag := ' || l_summary_flag);
3189: END IF;
3190:
3191: --- update supplier info
3192: IF l_demand_id is not null AND p_quantity IS NOT NULL THEN

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

3191: --- update supplier info
3192: IF l_demand_id is not null AND p_quantity IS NOT NULL THEN
3193:
3194: IF PG_DEBUG in ('Y', 'C') THEN
3195: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after 4');
3196: END IF;
3197: l_inventory_item_id := null;
3198:
3199: -- dsting diag_atp do not adjust demands

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

3209: AND plan_id = l_plan_id
3210: returning sr_instance_id, inventory_item_id into l_instance_id, l_inventory_item_id;
3211:
3212: IF PG_DEBUG in ('Y', 'C') THEN
3213: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3214: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3215: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3216: END IF;
3217:

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

3210: returning sr_instance_id, inventory_item_id into l_instance_id, l_inventory_item_id;
3211:
3212: IF PG_DEBUG in ('Y', 'C') THEN
3213: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3214: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3215: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3216: END IF;
3217:
3218: -- dsting 2754446. do i really want to do this

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

3211:
3212: IF PG_DEBUG in ('Y', 'C') THEN
3213: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3214: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_instance_id := ' || l_instance_id);
3215: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3216: END IF;
3217:
3218: -- dsting 2754446. do i really want to do this
3219: IF l_prim_uom_dmd_qty <> l_sd_qty THEN

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

3232: l_return_status
3233: );
3234: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3235: IF PG_DEBUG in ('Y', 'C') THEN
3236: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');
3237: END IF;
3238: RAISE FND_API.G_EXC_ERROR;
3239: END IF;
3240:

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

3244: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
3245: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
3246:
3247: IF PG_DEBUG in ('Y', 'C') THEN
3248: msc_sch_wb.atp_debug('Update_Planned_Order: before update of' ||
3249: ' msc_alloc_demands');
3250: END IF;
3251: UPDATE msc_alloc_demands
3252: SET allocated_quantity = MSC_ATP_UTILS.Truncate_Demand(l_prim_uom_dmd_qty) --5598066

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

3253: WHERE parent_demand_id = l_demand_id
3254: AND plan_id = l_plan_id;
3255:
3256: IF PG_DEBUG in ('Y', 'C') THEN
3257: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'No of rows updated := ' || SQL%ROWCOUNT);
3258: END IF;
3259:
3260: END IF;
3261:

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

3265: /** code commented for time being. Will be removed after code review
3266: IF l_summary_flag = 'Y' THEN
3267:
3268: IF PG_DEBUG in ('Y', 'C') THEN
3269: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'Summary Mode- update planned order demand');
3270: END IF;
3271: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(l_instance_id,
3272: l_plan_id,
3273: l_organization_id,

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

3296: END IF; -- if not DIAGNOSTIC ATP then update demands
3297: --5239441
3298: ELSIF p_quantity IS NOT NULL and NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5 THEN
3299: IF PG_DEBUG in ('Y', 'C') THEN
3300: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'l_demand_id := '|| l_demand_id);
3301: END IF;
3302: l_prim_uom_dmd_qty := p_quantity * nvl(p_uom_conv_rate, 1);
3303: IF l_prim_uom_dmd_qty <> l_sd_qty THEN
3304: MSC_ATP_DB_UTILS.UPDATE_PEGGING(l_child_pegging_id, null, l_prim_uom_dmd_qty);

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

3307:
3308: END IF;
3309:
3310: IF PG_DEBUG in ('Y', 'C') THEN
3311: msc_sch_wb.atp_debug('***** END Update_Planned_Order Procedure *****');
3312: END IF;
3313: EXCEPTION
3314: WHEN no_data_found THEN
3315: null;

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

3313: EXCEPTION
3314: WHEN no_data_found THEN
3315: null;
3316: IF PG_DEBUG in ('Y', 'C') THEN
3317: msc_sch_wb.atp_debug('No Data Found in Update_Planned_Order');
3318: END IF;
3319: END Update_Planned_Order;
3320:
3321: PROCEDURE Update_SD_Date(p_identifier IN NUMBER,

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

3359:
3360: BEGIN
3361:
3362: IF PG_DEBUG in ('Y', 'C') THEN
3363: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3364: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3365: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3366: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3367: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);

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

3360: BEGIN
3361:
3362: IF PG_DEBUG in ('Y', 'C') THEN
3363: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3364: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3365: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3366: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3367: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3368: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);

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

3361:
3362: IF PG_DEBUG in ('Y', 'C') THEN
3363: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3364: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3365: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3366: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3367: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3368: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3369: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);

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

3362: IF PG_DEBUG in ('Y', 'C') THEN
3363: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3364: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3365: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3366: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3367: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3368: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3369: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3370: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);

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

3363: msc_sch_wb.atp_debug('**********Begin Update_SD_Date Procedure************');
3364: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3365: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3366: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3367: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3368: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3369: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3370: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3371: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);

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

3364: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_date := ' || p_supply_demand_date);
3365: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3366: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3367: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3368: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3369: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3370: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3371: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3372: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);

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

3365: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_supply_demand_quantity := ' || p_supply_demand_qty);
3366: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3367: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3368: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3369: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3370: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3371: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3372: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);
3373: END IF;

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

3366: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_plan_id := ' || p_plan_id);
3367: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3368: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3369: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3370: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3371: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3372: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);
3373: END IF;
3374:

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

3367: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_date := ' || p_old_demand_date);
3368: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3369: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3370: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3371: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3372: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);
3373: END IF;
3374:
3375: IF MSC_ATP_PVT.G_HYBRID_ALLOC_ATP = 'Y' THEN

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

3368: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_old_demand_qty := ' || p_old_demand_qty);
3369: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_instance_id := ' || p_instance_id);
3370: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_dc_flag := ' || p_dc_flag);
3371: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_identifier := ' || p_identifier);
3372: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'p_atf_date := ' || p_atf_date);
3373: END IF;
3374:
3375: IF MSC_ATP_PVT.G_HYBRID_ALLOC_ATP = 'Y' THEN
3376: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;

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

3393: RETURN;
3394: END;
3395:
3396: IF PG_DEBUG in ('Y','C') THEN
3397: msc_sch_wb.atp_debug('ATO update pegging id ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
3398: END IF;
3399:
3400: IF p_plan_id = -1 THEN
3401: -- ngoel, changed for performance reason, don't

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

3421: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND NVL(l_inventory_item_id, 0) > 0
3422: AND G_ORIG_INV_CTP = 5 THEN -- Condition added for bug 3295831 because summary
3423: -- is not supported in PDS-ODS switch.
3424: IF PG_DEBUG in ('Y', 'C') THEN
3425: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Summary Flag is on');
3426: END IF;
3427: --- get the old quantity and other info from pegging
3428: BEGIN
3429: --- G_DEMAND_PEGGING_ID wil be null for non atpbale items

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

3442: END;
3443: ----update the quantity on old date
3444:
3445: IF PG_DEBUG in ('Y', 'C') THEN
3446: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3447: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3448: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3449: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3450: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);

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

3443: ----update the quantity on old date
3444:
3445: IF PG_DEBUG in ('Y', 'C') THEN
3446: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3447: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3448: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3449: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3450: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3451: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');

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

3444:
3445: IF PG_DEBUG in ('Y', 'C') THEN
3446: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3447: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3448: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3449: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3450: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3451: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3452: END IF;

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

3445: IF PG_DEBUG in ('Y', 'C') THEN
3446: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3447: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3448: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3449: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3450: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3451: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3452: END IF;
3453:

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

3446: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3447: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3448: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3449: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3450: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3451: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3452: END IF;
3453:
3454: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,

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

3447: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3448: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || l_sd_qty);
3449: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || l_sd_date);
3450: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3451: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3452: END IF;
3453:
3454: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3455: -1,

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

3476: ---check if record for new date exists in summary table
3477:
3478: --- if record exists then update
3479: IF PG_DEBUG in ('Y', 'C') THEN
3480: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'update the qty on new date ');
3481: END IF;
3482:
3483: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3484: -1,

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

3503:
3504: IF SQL%NOTFOUND THEN
3505: -- record doesn't exists. insert the record
3506: IF PG_DEBUG in ('Y', 'C') THEN
3507: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'insert qty on new date');
3508: END IF;
3509: BEGIN
3510: insert /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ into msc_atp_summary_so
3511: (plan_id,

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

3581: IF (p_supply_demand_qty IS NOT NULL OR p_supply_demand_date IS NOT NULL) THEN
3582:
3583: -- For bug 2259824, move the demand to the end of day
3584: IF PG_DEBUG in ('Y', 'C') THEN
3585: msc_sch_wb.atp_debug('Inside If of else p_plan_id = -1'); --bug3397904
3586: END IF;
3587:
3588: UPDATE MSC_DEMANDS
3589: SET

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

3657: p_atp_rec -- For bug 3226083
3658: );
3659: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3660: IF PG_DEBUG in ('Y', 'C') THEN
3661: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
3662: END IF;
3663: RAISE FND_API.G_EXC_ERROR;
3664: END IF;
3665: -- time_phased_atp changes end

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

3670: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
3671: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
3672:
3673: IF PG_DEBUG in ('Y', 'C') THEN
3674: msc_sch_wb.atp_debug('Update_SD_Date: before update of ' ||
3675: ' msc_alloc_demands');
3676: END IF;
3677:
3678: UPDATE MSC_ALLOC_DEMANDS

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

3686: AND INVENTORY_ITEM_ID = l_inventory_item_id
3687: AND ORGANIZATION_ID = l_org_id;
3688:
3689: IF PG_DEBUG in ('Y', 'C') THEN
3690: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'No of rows updated := ' || SQL%ROWCOUNT);
3691: END IF;
3692:
3693: END IF;
3694:

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

3698: /** code commented for time being. Will be removed after code review
3699: IF l_summary_flag = 'Y' AND NVL(l_inventory_item_id, 0) > 0 THEN
3700:
3701: IF PG_DEBUG in ('Y', 'C') THEN
3702: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Summary Flag is on');
3703: END IF;
3704: --update the quantity on old date
3705:
3706: IF PG_DEBUG in ('Y', 'C') THEN

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

3703: END IF;
3704: --update the quantity on old date
3705:
3706: IF PG_DEBUG in ('Y', 'C') THEN
3707: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3708: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3709: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3710: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3711: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);

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

3704: --update the quantity on old date
3705:
3706: IF PG_DEBUG in ('Y', 'C') THEN
3707: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3708: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3709: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3710: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3711: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3712: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');

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

3705:
3706: IF PG_DEBUG in ('Y', 'C') THEN
3707: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3708: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3709: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3710: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3711: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3712: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3713: END IF;

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

3706: IF PG_DEBUG in ('Y', 'C') THEN
3707: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3708: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3709: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3710: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3711: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3712: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3713: END IF;
3714:

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

3707: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
3708: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3709: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3710: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3711: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3712: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3713: END IF;
3714:
3715: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,

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

3708: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_demand_class := ' || l_demand_class);
3709: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_qty := ' || p_old_demand_date);
3710: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_sd_date := ' || p_old_demand_qty);
3711: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'l_org_id := ' || l_org_id);
3712: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'Update summary for old date');
3713: END IF;
3714:
3715: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3716: p_plan_id,

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

3733: sd_date = trunc(p_old_demand_date) and
3734: plan_id = p_plan_id;
3735:
3736: IF PG_DEBUG in ('Y', 'C') THEN
3737: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3738: END IF;
3739: commit;
3740: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3741: p_plan_id,

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

3751: 2);
3752:
3753: --- if record exists then update
3754: IF PG_DEBUG in ('Y', 'C') THEN
3755: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'update the qty on new date ');
3756: END IF;
3757: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_instance_id,
3758: p_plan_id,
3759: l_org_id,

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

3774: inventory_item_id = l_inventory_item_id and
3775: organization_id = l_org_id and
3776: sd_date = trunc(p_supply_demand_date);
3777: IF PG_DEBUG in ('Y', 'C') THEN
3778: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'No of rows update := ' || SQL%ROWCOUNT);
3779: END IF;
3780:
3781: IF SQL%NOTFOUND THEN
3782: -- record doesn't exists. insert the record

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

3780:
3781: IF SQL%NOTFOUND THEN
3782: -- record doesn't exists. insert the record
3783: IF PG_DEBUG in ('Y', 'C') THEN
3784: msc_sch_wb.atp_debug('Update_SD_Date: ' || 'insert qty on new date');
3785: END IF;
3786:
3787: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
3788: p_instance_id,

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

3807: -- is not supported in PDS-ODS switch.
3808: commit;
3809: END IF;
3810: IF PG_DEBUG in ('Y', 'C') THEN
3811: msc_sch_wb.atp_debug('**********End Update_SD_Date Procedure************');
3812: END IF;
3813: EXCEPTION
3814: WHEN OTHERS THEN
3815: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

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

3875: l_alloc_atp VARCHAR2(1) := MSC_ATP_PVT.G_ALLOCATED_ATP; --ALLOC ATP CHANGES -12973673
3876:
3877: BEGIN
3878: IF PG_DEBUG in ('Y', 'C') THEN
3879: msc_sch_wb.atp_debug('**********Begin Undo_Delete_Row Procedure************');
3880: END IF;
3881:
3882: IF MSC_ATP_PVT.G_HYBRID_ALLOC_ATP = 'Y' THEN
3883: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;

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

3899: p_del_ods_demand_src_type(m),
3900: -1);
3901: END LOOP;
3902: IF PG_DEBUG in ('Y', 'C') THEN
3903: msc_sch_wb.atp_debug('Number of SO lines updated := ' || SQL%ROWCOUNT);
3904: END IF;
3905: --5357370
3906: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
3907: IF PG_DEBUG in ('Y', 'C') THEN

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

3904: END IF;
3905: --5357370
3906: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
3907: IF PG_DEBUG in ('Y', 'C') THEN
3908: msc_sch_wb.atp_debug('Inside summary mode set to yes');
3909: msc_sch_wb.atp_debug('p_identifiers.count := ' || p_identifiers.count);
3910: END IF;
3911: FOR m in 1..p_identifiers.count LOOP
3912: MSC_ATP_DB_UTILS.UNDO_DELETE_SUMMARY_ROW(p_identifiers(m),

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

3905: --5357370
3906: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
3907: IF PG_DEBUG in ('Y', 'C') THEN
3908: msc_sch_wb.atp_debug('Inside summary mode set to yes');
3909: msc_sch_wb.atp_debug('p_identifiers.count := ' || p_identifiers.count);
3910: END IF;
3911: FOR m in 1..p_identifiers.count LOOP
3912: MSC_ATP_DB_UTILS.UNDO_DELETE_SUMMARY_ROW(p_identifiers(m),
3913: p_instance_id,

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

3932: p_del_ods_cto_dem_src_type(m),
3933: -1);
3934: END LOOP;
3935: IF PG_DEBUG in ('Y', 'C') THEN
3936: msc_sch_wb.atp_debug('Number of SO lines updated for CTO := ' || SQL%ROWCOUNT);
3937: END IF;
3938: END IF;
3939:
3940: -- Bug 2738280. For loop should be inside if condition.

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

3940: -- Bug 2738280. For loop should be inside if condition.
3941: IF ( p_del_demand_ids IS NOT NULL AND p_del_demand_ids.count > 0) THEN --3720018
3942: IF PG_DEBUG in ('Y', 'C') THEN
3943: FOR i in 1..p_del_demand_ids.COUNT LOOP
3944: msc_sch_wb.atp_debug('Undo_Delete_Row: ' || 'p_del_demand_ids('||i||') = '|| p_del_demand_ids(i)||
3945: 'p_inv_item_ids('||i||') = '|| p_inv_item_ids(i)||
3946: 'p_plan_ids('||i||') = '|| p_plan_ids(i)||
3947: 'p_identifiers('||i||') = '|| p_identifiers(i));
3948: END LOOP;

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

3973:
3974: /* commented for bug 2738280. We should use SQL%BULK_ROWCOUNT for FORALL statemenrs
3975: l_del_rows := SQL%ROWCOUNT;
3976: IF PG_DEBUG in ('Y', 'C') THEN
3977: msc_sch_wb.atp_debug('Undo_Delete_Row: ' || 'No. of demands updated = '|| l_del_rows);
3978: END IF;
3979: */
3980:
3981: -- Bug 2738280. Count how many rows were updated for each demand id

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

3980:
3981: -- Bug 2738280. Count how many rows were updated for each demand id
3982: IF PG_DEBUG in ('Y', 'C') THEN
3983: FOR m IN 1..p_del_demand_ids.COUNT LOOP
3984: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||
3985: SQL%BULK_ROWCOUNT(m)||' records');
3986: END LOOP;
3987: END IF;
3988:

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

3989: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') and (p_copy_demand_ids IS NOT NULL) and (p_copy_demand_ids.COUNT > 0) THEN
3990: -- Code to update summary records removed for summary enhancement
3991: /** code commented for time being. Will be removed after code review
3992: IF PG_DEBUG in ('Y', 'C') THEN
3993: msc_sch_wb.atp_debug('Undo_Delete_Row: ' || 'update Demands in summary mode');
3994: END IF;
3995:
3996: -- rajjain 11/05/2002 Now we pass reference to p_identifiers and p_plan_ids array
3997: -- and do bulk update in Undo_Plan_Summary_Row

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

4044: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
4045: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
4046:
4047: IF PG_DEBUG in ('Y', 'C') THEN
4048: msc_sch_wb.atp_debug('Undo_Delete_Row: before update of ' ||
4049: ' msc_alloc_demands');
4050: END IF;
4051:
4052: /*bug 6642564 we do no want inventory item id to be updated

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

4093:
4094: -- Bug 2738280. Count how many rows were updated for each demand id
4095: IF PG_DEBUG in ('Y', 'C') THEN
4096: FOR m IN 1..p_del_demand_ids.COUNT LOOP
4097: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||
4098: SQL%BULK_ROWCOUNT(m)||' records');
4099: END LOOP;
4100: END IF;
4101:

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

4103: UPDATE statement for comp demands was here
4104: */
4105:
4106: IF PG_DEBUG in ('Y', 'C') THEN
4107: msc_sch_wb.atp_debug('Undo_Delete_Row: before update of ' ||
4108: ' msc_alloc_supplies');
4109: END IF;
4110:
4111: FORALL m IN 1..p_del_demand_ids.COUNT

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

4129:
4130: -- Bug 2738280. Count how many rows were updated for each demand id
4131: IF PG_DEBUG in ('Y', 'C') THEN
4132: FOR m IN 1..p_del_demand_ids.COUNT LOOP
4133: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||
4134: SQL%BULK_ROWCOUNT(m)||' records');
4135: END LOOP;
4136: END IF;
4137:

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

4158: MSC_ATP_PVT.G_ALLOCATED_ATP := l_alloc_atp; --ALLOC ATP CHANGES, 12973673
4159: END IF;
4160:
4161: IF PG_DEBUG in ('Y', 'C') THEN
4162: msc_sch_wb.atp_debug('**********End Undo_Delete_Row Procedure************');
4163: END IF;
4164:
4165: EXCEPTION
4166: WHEN OTHERS THEN

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

4190: l_sysdate date;
4191:
4192: BEGIN
4193: IF PG_DEBUG in ('Y', 'C') THEN
4194: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
4195: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
4196: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4197: END IF;
4198: BEGIN

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

4191:
4192: BEGIN
4193: IF PG_DEBUG in ('Y', 'C') THEN
4194: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
4195: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
4196: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4197: END IF;
4198: BEGIN
4199: SELECT D.sr_instance_id,

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

4192: BEGIN
4193: IF PG_DEBUG in ('Y', 'C') THEN
4194: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
4195: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
4196: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4197: END IF;
4198: BEGIN
4199: SELECT D.sr_instance_id,
4200: D.organization_id,

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

4265:
4266: EXCEPTION
4267: WHEN NO_DATA_FOUND THEN
4268: IF PG_DEBUG in ('Y', 'C') THEN
4269: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'No row found that need to be deleted from summary table');
4270: END IF;
4271: END;
4272: -- 5357370: need user id for insert
4273: l_user_id := FND_GLOBAL.USER_ID;

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

4274: l_sysdate := sysdate;
4275:
4276:
4277: IF PG_DEBUG in ('Y', 'C') THEN
4278: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
4279: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
4280: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
4281:
4282: END IF;

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

4275:
4276:
4277: IF PG_DEBUG in ('Y', 'C') THEN
4278: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
4279: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
4280: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
4281:
4282: END IF;
4283:

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

4276:
4277: IF PG_DEBUG in ('Y', 'C') THEN
4278: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
4279: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
4280: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
4281:
4282: END IF;
4283:
4284: FOR i in 1..l_inventory_item_id.count LOOP

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

4282: END IF;
4283:
4284: FOR i in 1..l_inventory_item_id.count LOOP
4285: IF PG_DEBUG in ('Y', 'C') THEN
4286: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4287: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4288: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4289: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4290: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));

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

4283:
4284: FOR i in 1..l_inventory_item_id.count LOOP
4285: IF PG_DEBUG in ('Y', 'C') THEN
4286: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4287: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4288: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4289: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4290: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4291: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));

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

4284: FOR i in 1..l_inventory_item_id.count LOOP
4285: IF PG_DEBUG in ('Y', 'C') THEN
4286: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4287: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4288: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4289: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4290: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4291: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4292: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));

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

4285: IF PG_DEBUG in ('Y', 'C') THEN
4286: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4287: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4288: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4289: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4290: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4291: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4292: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
4293: END IF;

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

4286: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
4287: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4288: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4289: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4290: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4291: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4292: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
4293: END IF;
4294:

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

4287: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
4288: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4289: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4290: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4291: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4292: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
4293: END IF;
4294:
4295: update /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ msc_atp_summary_so

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

4288: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
4289: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
4290: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
4291: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
4292: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
4293: END IF;
4294:
4295: update /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ msc_atp_summary_so
4296: set sd_qty = (sd_qty - l_sd_qty(i))

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

4301: and demand_class = l_demand_class(i) ;
4302: -- 5357370: this is to handle that we have reservation on the past due date, and
4303: -- we won't be able to find record on sysdate to update.
4304: IF (SQL%NOTFOUND) THEN
4305: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: update failed, now try insert');
4306: --- Insert the new record
4307: BEGIN
4308: INSERT INTO MSC_ATP_SUMMARY_SO
4309: (plan_id,

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

4364: IS
4365: l_counter PLS_INTEGER;
4366: BEGIN
4367: IF PG_DEBUG in ('Y', 'C') THEN
4368: msc_sch_wb.atp_debug('******Begin Update_plan_summary_row *******');
4369: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4370: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4371:
4372: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP

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

4365: l_counter PLS_INTEGER;
4366: BEGIN
4367: IF PG_DEBUG in ('Y', 'C') THEN
4368: msc_sch_wb.atp_debug('******Begin Update_plan_summary_row *******');
4369: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4370: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4371:
4372: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4373: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);

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

4366: BEGIN
4367: IF PG_DEBUG in ('Y', 'C') THEN
4368: msc_sch_wb.atp_debug('******Begin Update_plan_summary_row *******');
4369: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4370: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4371:
4372: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4373: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4374: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));

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

4369: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4370: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4371:
4372: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4373: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4374: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4375: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4376: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4377: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));

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

4370: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id);
4371:
4372: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4373: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4374: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4375: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4376: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4377: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));
4378: END LOOP;

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

4371:
4372: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4373: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4374: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4375: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4376: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4377: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));
4378: END LOOP;
4379:

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

4372: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4373: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4374: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4375: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4376: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4377: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));
4378: END LOOP;
4379:
4380: END IF;

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

4373: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4374: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4375: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4376: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_date := ' || p_old_demand_date(l_counter));
4377: msc_sch_wb.atp_debug('UPDATE_PLAN_SUMMARY_ROW: ' || 'p_old_demand_quantity := ' || p_old_demand_quantity(l_counter));
4378: END LOOP;
4379:
4380: END IF;
4381:

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

4390:
4391: -- Count how many rows were updated for each item
4392: IF PG_DEBUG in ('Y', 'C') THEN
4393: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4394: msc_sch_wb.atp_debug('For inventory Item id '||p_inventory_item_id(l_counter)||': updated '||
4395: SQL%BULK_ROWCOUNT(l_counter)||' records');
4396: END LOOP;
4397: END IF;
4398:

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

4412: l_counter PLS_INTEGER;
4413: BEGIN
4414:
4415: IF PG_DEBUG in ('Y', 'C') THEN
4416: msc_sch_wb.atp_debug('******Begin Undo_plan_summary_row *******');
4417: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4418:
4419: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4420: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);

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

4413: BEGIN
4414:
4415: IF PG_DEBUG in ('Y', 'C') THEN
4416: msc_sch_wb.atp_debug('******Begin Undo_plan_summary_row *******');
4417: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4418:
4419: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4420: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4421: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));

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

4416: msc_sch_wb.atp_debug('******Begin Undo_plan_summary_row *******');
4417: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4418:
4419: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4420: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4421: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4422: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4423: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4424: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));

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

4417: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
4418:
4419: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4420: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4421: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4422: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4423: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4424: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4425: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));

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

4418:
4419: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4420: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4421: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4422: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4423: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4424: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4425: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));
4426: END LOOP;

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

4419: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4420: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4421: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4422: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4423: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4424: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4425: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));
4426: END LOOP;
4427:

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

4420: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'Input parameters loop : '|| l_counter);
4421: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4422: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4423: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4424: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4425: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));
4426: END LOOP;
4427:
4428: END IF;

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

4421: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id(l_counter));
4422: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_organization_id := ' || p_organization_id(l_counter));
4423: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_plan_id := ' || p_plan_id(l_counter));
4424: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_assembly_demand_date := ' || p_using_assembly_demand_date(l_counter));
4425: msc_sch_wb.atp_debug('UNDO_PLAN_SUMMARY_ROW: ' || 'p_using_requirement_quantity := ' || p_using_requirement_quantity(l_counter));
4426: END LOOP;
4427:
4428: END IF;
4429:

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

4438:
4439: -- Count how many rows were updated for each item
4440: IF PG_DEBUG in ('Y', 'C') THEN
4441: FOR l_counter IN 1..p_inventory_item_id.COUNT LOOP
4442: msc_sch_wb.atp_debug('For inventory Item id '||p_inventory_item_id(l_counter)||': updated '||
4443: SQL%BULK_ROWCOUNT(l_counter)||' records');
4444: END LOOP;
4445: END IF;
4446:

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

4459: IS
4460: BEGIN
4461:
4462: IF PG_DEBUG in ('Y', 'C') THEN
4463: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4464: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4465: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4466: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4467: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);

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

4460: BEGIN
4461:
4462: IF PG_DEBUG in ('Y', 'C') THEN
4463: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4464: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4465: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4466: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4467: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4468: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);

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

4461:
4462: IF PG_DEBUG in ('Y', 'C') THEN
4463: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4464: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4465: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4466: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4467: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4468: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4469: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);

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

4462: IF PG_DEBUG in ('Y', 'C') THEN
4463: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4464: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4465: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4466: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4467: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4468: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4469: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4470: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);

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

4463: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'insert into summary row');
4464: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4465: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4466: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4467: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4468: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4469: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4470: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);
4471: END IF;

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

4464: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_plan_id := ' || p_plan_id);
4465: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4466: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4467: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4468: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4469: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4470: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);
4471: END IF;
4472: BEGIN

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

4465: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_instance_id := ' || p_instance_id);
4466: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4467: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4468: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4469: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4470: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);
4471: END IF;
4472: BEGIN
4473: insert /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) */ into msc_atp_summary_sd

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

4466: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_organization_id := ' || p_organization_id);
4467: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4468: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_date := ' || p_date);
4469: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || ' p_quantity := ' || p_quantity);
4470: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'p_demand_class := ' || p_demand_class);
4471: END IF;
4472: BEGIN
4473: insert /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) */ into msc_atp_summary_sd
4474: (plan_id,

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

4510: null,
4511: 2);
4512:
4513: IF PG_DEBUG in ('Y', 'C') THEN
4514: msc_sch_wb.atp_debug('INSERT_SUMMARY_SD_ROW: ' || 'Row already exists in table. Update the row');
4515: END IF;
4516: update /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) */ msc_atp_summary_sd
4517: set sd_qty = sd_qty + p_quantity
4518: where plan_id = p_plan_id

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

4548:
4549: -- First add the Stealing Data.
4550:
4551: IF PG_DEBUG in ('Y', 'C') THEN
4552: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4553: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4554: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4555: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4556: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));

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

4549: -- First add the Stealing Data.
4550:
4551: IF PG_DEBUG in ('Y', 'C') THEN
4552: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4553: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4554: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4555: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4556: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4557: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));

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

4550:
4551: IF PG_DEBUG in ('Y', 'C') THEN
4552: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4553: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4554: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4555: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4556: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4557: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4558: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));

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

4551: IF PG_DEBUG in ('Y', 'C') THEN
4552: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4553: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4554: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4555: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4556: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4557: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4558: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4559: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));

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

4552: msc_sch_wb.atp_debug('*** Begin Add_Stealing_Supply_Details Procedure ***');
4553: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4554: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4555: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4556: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4557: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4558: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4559: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4560: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);

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

4553: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_plan_id ='||to_char(p_plan_id));
4554: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4555: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4556: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4557: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4558: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4559: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4560: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4561: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);

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

4554: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_identifier ='||to_char(p_identifier));
4555: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4556: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4557: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4558: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4559: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4560: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4561: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4562: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));

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

4555: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_demand_source_type ='||to_char(p_demand_source_type));
4556: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4557: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4558: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4559: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4560: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4561: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4562: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4563: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);

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

4556: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_inventory_item_id ='||to_char(p_inventory_item_id));
4557: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4558: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4559: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4560: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4561: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4562: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4563: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);
4564: END IF;

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

4557: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_organization_id = ' ||to_char(p_organization_id));
4558: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4559: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4560: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4561: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4562: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4563: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);
4564: END IF;
4565:

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

4558: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_instance_id = ' ||to_char(p_sr_instance_id));
4559: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4560: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4561: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4562: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4563: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);
4564: END IF;
4565:
4566: SELECT msc_supplies_s.nextval into p_transaction_id from dual;

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

4559: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_quantity ='||to_char(p_stealing_quantity));
4560: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stealing_demand_class = '||p_stealing_demand_class);
4561: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_stolen_demand_class = ' ||p_stolen_demand_class);
4562: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4563: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);
4564: END IF;
4565:
4566: SELECT msc_supplies_s.nextval into p_transaction_id from dual;
4567:

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

4565:
4566: SELECT msc_supplies_s.nextval into p_transaction_id from dual;
4567:
4568: IF PG_DEBUG in ('Y', 'C') THEN
4569: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'before insert into msc_alloc_supplies-Stealing Info');
4570: END IF;
4571:
4572: --ssurendr 25-NOV-2002: From_Demand_Class added in both the insert statements for alloc w/b drill down
4573: INSERT INTO MSC_ALLOC_SUPPLIES

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

4592:
4593: -- Next add the Stolen Data.
4594:
4595: IF PG_DEBUG in ('Y', 'C') THEN
4596: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'before insert into msc_alloc_supplies-Stolen Info');
4597: END IF;
4598:
4599: INSERT INTO MSC_ALLOC_SUPPLIES
4600: (plan_id, inventory_item_id, organization_id, sr_instance_id,

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

4615:
4616: l_rows_proc := l_rows_proc + SQL%ROWCOUNT;
4617:
4618: IF PG_DEBUG in ('Y', 'C') THEN
4619: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'Total Rows inserted ' || l_rows_proc);
4620: END IF;
4621:
4622: END Add_Stealing_Supply_Details;
4623:

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

4644: c1 pegging%ROWTYPE;
4645:
4646: BEGIN
4647: IF PG_DEBUG in ('Y', 'C') THEN
4648: msc_sch_wb.atp_debug('***** Begin Remove_Invalid_Future_SD Procedure *****');
4649: END IF;
4650:
4651: FOR i IN p_future_pegging_tab.FIRST..p_future_pegging_tab.COUNT LOOP
4652: OPEN pegging(p_future_pegging_tab(i));

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

4655: FETCH pegging INTO c1;
4656: EXIT WHEN pegging%NOTFOUND;
4657:
4658: IF PG_DEBUG in ('Y', 'C') THEN
4659: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'instance id = '||c1.identifier1);
4660: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'plan_id (identifier2) = '||c1.identifier2);
4661: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'identifier3 = '||c1.identifier3);
4662: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'delete pegging_id '||c1.pegging_id);
4663: END IF;

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

4656: EXIT WHEN pegging%NOTFOUND;
4657:
4658: IF PG_DEBUG in ('Y', 'C') THEN
4659: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'instance id = '||c1.identifier1);
4660: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'plan_id (identifier2) = '||c1.identifier2);
4661: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'identifier3 = '||c1.identifier3);
4662: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'delete pegging_id '||c1.pegging_id);
4663: END IF;
4664:

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

4657:
4658: IF PG_DEBUG in ('Y', 'C') THEN
4659: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'instance id = '||c1.identifier1);
4660: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'plan_id (identifier2) = '||c1.identifier2);
4661: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'identifier3 = '||c1.identifier3);
4662: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'delete pegging_id '||c1.pegging_id);
4663: END IF;
4664:
4665: MSC_ATP_DB_UTILS.Delete_Pegging(c1.pegging_id);

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

4658: IF PG_DEBUG in ('Y', 'C') THEN
4659: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'instance id = '||c1.identifier1);
4660: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'plan_id (identifier2) = '||c1.identifier2);
4661: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'identifier3 = '||c1.identifier3);
4662: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'delete pegging_id '||c1.pegging_id);
4663: END IF;
4664:
4665: MSC_ATP_DB_UTILS.Delete_Pegging(c1.pegging_id);
4666:

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

4669: AND plan_id = c1.identifier2
4670: AND sr_instance_id = c1.identifier1;
4671:
4672: IF PG_DEBUG in ('Y', 'C') THEN
4673: msc_sch_wb.atp_debug('Remove_Invalid_Future_SD: ' || 'Records deleted from msc_alloc_supplies = '|| SQL%ROWCOUNT);
4674: END IF;
4675:
4676: END LOOP;
4677: CLOSE pegging;

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

4677: CLOSE pegging;
4678: END LOOP; --FOR i IN p_future_pegging_tab.FIRST..p_future_pegging_tab.COUNT LOOP
4679:
4680: IF PG_DEBUG in ('Y', 'C') THEN
4681: msc_sch_wb.atp_debug('***** End Remove_Invalid_Future_SD Procedure *****');
4682: END IF;
4683:
4684: END Remove_Invalid_Future_SD;
4685:

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

4702: sql_stmt VARCHAR2(3000);
4703: who_cols VARCHAR2(100);
4704: BEGIN
4705: IF PG_DEBUG in ('Y', 'C') THEN
4706: msc_sch_wb.atp_debug('PROCEDURE move_SD_temp_into_mrp_details');
4707: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_pegging_id: ' || p_pegging_id);
4708: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_end_pegging_id: ' || p_end_pegging_id);
4709: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' session_id: ' || MSC_ATP_PVT.G_SESSION_ID);
4710: END IF;

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

4703: who_cols VARCHAR2(100);
4704: BEGIN
4705: IF PG_DEBUG in ('Y', 'C') THEN
4706: msc_sch_wb.atp_debug('PROCEDURE move_SD_temp_into_mrp_details');
4707: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_pegging_id: ' || p_pegging_id);
4708: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_end_pegging_id: ' || p_end_pegging_id);
4709: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' session_id: ' || MSC_ATP_PVT.G_SESSION_ID);
4710: END IF;
4711:

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

4704: BEGIN
4705: IF PG_DEBUG in ('Y', 'C') THEN
4706: msc_sch_wb.atp_debug('PROCEDURE move_SD_temp_into_mrp_details');
4707: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_pegging_id: ' || p_pegging_id);
4708: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_end_pegging_id: ' || p_end_pegging_id);
4709: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' session_id: ' || MSC_ATP_PVT.G_SESSION_ID);
4710: END IF;
4711:
4712: INSERT INTO mrp_atp_details_temp (

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

4705: IF PG_DEBUG in ('Y', 'C') THEN
4706: msc_sch_wb.atp_debug('PROCEDURE move_SD_temp_into_mrp_details');
4707: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_pegging_id: ' || p_pegging_id);
4708: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' p_end_pegging_id: ' || p_end_pegging_id);
4709: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' session_id: ' || MSC_ATP_PVT.G_SESSION_ID);
4710: END IF;
4711:
4712: INSERT INTO mrp_atp_details_temp (
4713: session_id,

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

4810: INVENTORY_ITEM_NAME --bug3579625
4811: FROM msc_atp_sd_details_temp;
4812:
4813: IF PG_DEBUG in ('Y', 'C') THEN
4814: msc_sch_wb.atp_debug('move_SD_temp_into_mrp_details: ' || ' Num rows dumped: ' || SQL%ROWCOUNT);
4815: END IF;
4816: END move_SD_temp_into_mrp_details;
4817:
4818: PROCEDURE Clear_SD_Details_Temp

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

4818: PROCEDURE Clear_SD_Details_Temp
4819: IS
4820: BEGIN
4821: IF PG_DEBUG in ('Y', 'C') THEN
4822: msc_sch_wb.atp_debug('PROCEDURE Clear_SD_Details_Temp');
4823: msc_sch_wb.atp_debug('PG_Clear_SD_Details_Temp: ' || PG_CLEAR_SD_DETAILS_TEMP);
4824: END IF;
4825:
4826: IF PG_CLEAR_SD_DETAILS_TEMP = 1 THEN

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

4819: IS
4820: BEGIN
4821: IF PG_DEBUG in ('Y', 'C') THEN
4822: msc_sch_wb.atp_debug('PROCEDURE Clear_SD_Details_Temp');
4823: msc_sch_wb.atp_debug('PG_Clear_SD_Details_Temp: ' || PG_CLEAR_SD_DETAILS_TEMP);
4824: END IF;
4825:
4826: IF PG_CLEAR_SD_DETAILS_TEMP = 1 THEN
4827: DELETE msc_atp_sd_details_temp;

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

4825:
4826: IF PG_CLEAR_SD_DETAILS_TEMP = 1 THEN
4827: DELETE msc_atp_sd_details_temp;
4828: IF PG_DEBUG in ('Y', 'C') THEN
4829: msc_sch_wb.atp_debug('Clear_SD_Details_Temp rows: ' || SQL%ROWCOUNT);
4830: END IF;
4831: END IF;
4832: PG_CLEAR_SD_DETAILS_TEMP := 1;
4833: END;

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

4841: x_return_status OUT NOCOPY VARCHAR2)
4842: IS
4843: BEGIN
4844: IF PG_DEBUG in ('Y', 'C') THEN
4845: msc_sch_wb.atp_debug(' ******** Delete_Copy_Demand Begin *************');
4846: END IF;
4847:
4848: x_return_status := FND_API.G_RET_STS_SUCCESS;
4849:

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

4846: END IF;
4847:
4848: x_return_status := FND_API.G_RET_STS_SUCCESS;
4849:
4850: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'p_copy_demand_ids.COUNT : ' || p_copy_demand_ids.COUNT);
4851:
4852: IF p_copy_demand_ids.COUNT > 0 THEN
4853: IF ((MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND
4854: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND

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

4854: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
4855: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) OR
4856: (p_time_phased_set = 'Y') THEN
4857:
4858: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'allocated ATP or time phased PF');
4859:
4860: FORALL i IN 1..p_copy_demand_ids.COUNT
4861: DELETE FROM msc_alloc_demands
4862: WHERE parent_demand_id = p_copy_demand_ids(i)

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

4870: IF NOT ((MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND
4871: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
4872: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
4873:
4874: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'unallocated ATP');
4875:
4876: FORALL i IN 1..p_copy_demand_ids.COUNT
4877: DELETE FROM msc_demands
4878: WHERE demand_id = p_copy_demand_ids(i)

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

4884: END IF;
4885: END IF;
4886:
4887: IF PG_DEBUG in ('Y', 'C') THEN
4888: msc_sch_wb.atp_debug(' ******** Delete_Copy_Demand End *************');
4889: END IF;
4890:
4891: EXCEPTION
4892: WHEN OTHERS THEN

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

4903: BEGIN
4904: x_return_status := FND_API.G_RET_STS_SUCCESS;
4905:
4906: IF PG_DEBUG in ('Y', 'C') THEN
4907: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4908: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4909: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4910: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4911: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);

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

4904: x_return_status := FND_API.G_RET_STS_SUCCESS;
4905:
4906: IF PG_DEBUG in ('Y', 'C') THEN
4907: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4908: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4909: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4910: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4911: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4912: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);

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

4905:
4906: IF PG_DEBUG in ('Y', 'C') THEN
4907: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4908: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4909: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4910: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4911: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4912: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4913: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);

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

4906: IF PG_DEBUG in ('Y', 'C') THEN
4907: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4908: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4909: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4910: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4911: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4912: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4913: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4914: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);

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

4907: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Pds Begin *************');
4908: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4909: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4910: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4911: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4912: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4913: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4914: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4915: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);

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

4908: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'sch arrival date: ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4909: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4910: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4911: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4912: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4913: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4914: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4915: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4916: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);

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

4909: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4910: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4911: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4912: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4913: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4914: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4915: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4916: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4917: END IF;

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

4910: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4911: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4912: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4913: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4914: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4915: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4916: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4917: END IF;
4918:

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

4911: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4912: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4913: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4914: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4915: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4916: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4917: END IF;
4918:
4919: -- Update PDS

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

4912: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4913: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4914: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4915: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'arrival_set_name: ' || p_ship_arrival_date_rec.arrival_set_name);
4916: msc_sch_wb.atp_debug('Flush_Data_In_Pds : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4917: END IF;
4918:
4919: -- Update PDS
4920: UPDATE MSC_DEMANDS

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

4932:
4933:
4934: EXCEPTION
4935: WHEN OTHERS THEN
4936: msc_sch_wb.atp_debug('Flush_Data_In_Pds : '||sqlerrm);
4937: x_return_status := FND_API.G_RET_STS_ERROR;
4938:
4939: END Flush_Data_In_Pds;
4940:

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

4949: x_return_status := FND_API.G_RET_STS_SUCCESS;
4950:
4951:
4952: IF PG_DEBUG in ('Y', 'C') THEN
4953: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4954: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4955: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4956: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);

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

4950:
4951:
4952: IF PG_DEBUG in ('Y', 'C') THEN
4953: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4954: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4955: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4956: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);

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

4951:
4952: IF PG_DEBUG in ('Y', 'C') THEN
4953: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4954: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4955: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4956: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);

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

4952: IF PG_DEBUG in ('Y', 'C') THEN
4953: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4954: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4955: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4956: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4960: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);

Line 4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);

4953: msc_sch_wb.atp_debug(' ******** Flush_Data_In_Ods Begin *************');
4954: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4955: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4956: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4960: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4961: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);

Line 4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);

4954: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'sch arrival date : ' || p_ship_arrival_date_rec.scheduled_arrival_date);
4955: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4956: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4960: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4961: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4962: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);

Line 4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);

4955: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'lat accep date : ' || p_ship_arrival_date_rec.latest_acceptable_date);
4956: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4960: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4961: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4962: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4963: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);

Line 4960: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);

4956: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'order_date_type : ' || p_ship_arrival_date_rec.order_date_type);
4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4960: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4961: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4962: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4963: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);
4964:

Line 4961: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);

4957: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'demand_id : ' || p_ship_arrival_date_rec.demand_id);
4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4960: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4961: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4962: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4963: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);
4964:
4965: END IF;

Line 4962: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);

4958: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'instance_id : ' || p_ship_arrival_date_rec.instance_id);
4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4960: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4961: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4962: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4963: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);
4964:
4965: END IF;
4966:

Line 4963: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);

4959: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'plan_id : ' || p_ship_arrival_date_rec.plan_id);
4960: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'ship_set_name : ' || p_ship_arrival_date_rec.ship_set_name);
4961: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'arrival_set_name : ' || p_ship_arrival_date_rec.arrival_set_name);
4962: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'override_flag : ' || p_ship_arrival_date_rec.atp_override_flag);
4963: msc_sch_wb.atp_debug('Flush_Data_In_Ods : ' || 'request arrival date: ' || p_ship_arrival_date_rec.request_arrival_date);
4964:
4965: END IF;
4966:
4967: -- Update PDS

Line 4981: msc_sch_wb.atp_debug('Flush_Data_In_Ods : '||sqlerrm);

4977: AND SR_INSTANCE_ID = p_ship_arrival_date_rec.instance_id;
4978:
4979: EXCEPTION
4980: WHEN OTHERS THEN
4981: msc_sch_wb.atp_debug('Flush_Data_In_Ods : '||sqlerrm);
4982: x_return_status := FND_API.G_RET_STS_ERROR;
4983:
4984: END Flush_Data_In_Ods;
4985:

Line 4998: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');

4994: l_insert_item_id number;
4995:
4996: BEGIN
4997: IF PG_DEBUG in ('Y', 'C') THEN
4998: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4999: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
5000: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
5001: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);

Line 4999: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);

4995:
4996: BEGIN
4997: IF PG_DEBUG in ('Y', 'C') THEN
4998: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4999: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
5000: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
5001: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);

Line 5000: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);

4996: BEGIN
4997: IF PG_DEBUG in ('Y', 'C') THEN
4998: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4999: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
5000: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
5001: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);

Line 5001: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);

4997: IF PG_DEBUG in ('Y', 'C') THEN
4998: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4999: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
5000: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
5001: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);

Line 5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);

4998: msc_sch_wb.atp_debug('***** Begin Add_Supplies Procedure *****');
4999: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
5000: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
5001: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);

Line 5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);

4999: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supply_rec_type.order_quantity := ' || p_supply_rec_type.order_quantity);
5000: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
5001: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);

Line 5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);

5000: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_inventory_item_id := ' || p_supply_rec_type.inventory_item_id);
5001: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);

Line 5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);

5001: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);

Line 5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);

5002: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_organization_id := ' || p_supply_rec_type.organization_id);
5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
5010: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);

Line 5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);

5003: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_schedule_date := ' || p_supply_rec_type.schedule_date);
5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
5010: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
5011: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);

Line 5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);

5004: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_id := ' || p_supply_rec_type.supplier_id);
5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
5010: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
5011: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
5012: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);

Line 5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);

5005: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_supplier_site_id := ' || p_supply_rec_type.supplier_site_id);
5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
5010: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
5011: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
5012: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
5013: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630

Line 5010: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);

5006: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_refresh_number := ' || p_supply_rec_type.refresh_number);
5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
5010: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
5011: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
5012: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
5013: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630
5014: END IF;

Line 5011: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);

5007: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_request_item_id := ' || p_supply_rec_type.request_item_id);
5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
5010: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
5011: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
5012: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
5013: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630
5014: END IF;
5015:

Line 5012: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);

5008: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_atf_date := ' || p_supply_rec_type.atf_date);
5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
5010: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
5011: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
5012: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
5013: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630
5014: END IF;
5015:
5016: p_supply_rec_type.return_status := FND_API.G_RET_STS_SUCCESS;

Line 5013: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630

5009: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_dock_date := ' || p_supply_rec_type.new_dock_date);
5010: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_new_ship_date := ' || p_supply_rec_type.new_ship_date);
5011: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_start_date := ' || p_supply_rec_type.start_date);
5012: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_order_date := ' || p_supply_rec_type.order_date);
5013: msc_sch_wb.atp_debug('Add_Supplies: ' || 'p_intransit_lead_time := ' || p_supply_rec_type.intransit_lead_time); --4127630
5014: END IF;
5015:
5016: p_supply_rec_type.return_status := FND_API.G_RET_STS_SUCCESS;
5017:

Line 5024: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Time Phased ATP = ' || l_time_phased_atp);

5020: l_time_phased_atp := 'Y';
5021: /* In time phased atp scenarios add planned order in msc_supplies for member item*/
5022: l_insert_item_id := p_supply_rec_type.request_item_id;
5023: IF PG_DEBUG in ('Y', 'C') THEN
5024: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Time Phased ATP = ' || l_time_phased_atp);
5025: END IF;
5026: ELSE
5027: l_insert_item_id := p_supply_rec_type.inventory_item_id;
5028: END IF;

Line 5030: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Insert planned order in msc_supplies for ' || l_insert_item_id);

5026: ELSE
5027: l_insert_item_id := p_supply_rec_type.inventory_item_id;
5028: END IF;
5029: IF PG_DEBUG in ('Y', 'C') THEN
5030: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Insert planned order in msc_supplies for ' || l_insert_item_id);
5031: END IF;
5032: -- time_phased_atp changes end
5033:
5034: -- Insert updated quantity as a Planned Order in msc_supplies

Line 5147: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Error occured in procedure Add_PF_Rollup_Supplies');

5143: p_supply_rec_type.return_status
5144: );
5145: IF p_supply_rec_type.return_status <> FND_API.G_RET_STS_SUCCESS THEN
5146: IF PG_DEBUG in ('Y', 'C') THEN
5147: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Error occured in procedure Add_PF_Rollup_Supplies');
5148: END IF;
5149: RAISE FND_API.G_EXC_ERROR;
5150: END IF;
5151:

Line 5159: msc_sch_wb.atp_debug('Add_Supplies: ' || ' before insert into' ||

5155: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
5156: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
5157:
5158: IF PG_DEBUG in ('Y', 'C') THEN
5159: msc_sch_wb.atp_debug('Add_Supplies: ' || ' before insert into' ||
5160: ' msc_alloc_supplies');
5161: END IF;
5162:
5163: INSERT INTO MSC_ALLOC_SUPPLIES(

Line 5202: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Create planned orders for summary mode');

5198: -- Code to make summary updates and commit removed for summary enhancement
5199: /** code commented for time being. Will be removed after code review
5200: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
5201: IF PG_DEBUG in ('Y', 'C') THEN
5202: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Create planned orders for summary mode');
5203: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'First try to update ');
5204: END IF;
5205:
5206: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_supply_rec_type.instance_id,

Line 5203: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'First try to update ');

5199: /** code commented for time being. Will be removed after code review
5200: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
5201: IF PG_DEBUG in ('Y', 'C') THEN
5202: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Create planned orders for summary mode');
5203: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'First try to update ');
5204: END IF;
5205:
5206: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_supply_rec_type.instance_id,
5207: p_supply_rec_type.plan_id,

Line 5229: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'After update to summary table');

5225: and sd_date = trunc(p_supply_rec_type.schedule_date);
5226: commit;
5227:
5228: IF PG_DEBUG in ('Y', 'C') THEN
5229: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'After update to summary table');
5230: END IF;
5231: IF SQL%NOTFOUND THEN
5232: IF PG_DEBUG in ('Y', 'C') THEN
5233: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Couldnt update try to insert');

Line 5233: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Couldnt update try to insert');

5229: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'After update to summary table');
5230: END IF;
5231: IF SQL%NOTFOUND THEN
5232: IF PG_DEBUG in ('Y', 'C') THEN
5233: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Couldnt update try to insert');
5234: END IF;
5235:
5236: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_supply_rec_type.plan_id,
5237: p_supply_rec_type.instance_id,

Line 5245: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'commit in summary mode');

5241: p_supply_rec_type.order_quantity,
5242: '@@@');
5243: END IF;
5244: IF PG_DEBUG in ('Y', 'C') THEN
5245: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'commit in summary mode');
5246: END IF;
5247: commit;
5248: END IF;
5249: ***/

Line 5252: msc_sch_wb.atp_debug('Add_Supplies: ' || 'transaction_id = '||p_supply_rec_type.transaction_id);

5248: END IF;
5249: ***/
5250:
5251: IF PG_DEBUG in ('Y', 'C') THEN
5252: msc_sch_wb.atp_debug('Add_Supplies: ' || 'transaction_id = '||p_supply_rec_type.transaction_id);
5253: msc_sch_wb.atp_debug('***** End Add_Supplies Procedure *****');
5254: END IF;
5255:
5256: END Add_Supplies;

Line 5253: msc_sch_wb.atp_debug('***** End Add_Supplies Procedure *****');

5249: ***/
5250:
5251: IF PG_DEBUG in ('Y', 'C') THEN
5252: msc_sch_wb.atp_debug('Add_Supplies: ' || 'transaction_id = '||p_supply_rec_type.transaction_id);
5253: msc_sch_wb.atp_debug('***** End Add_Supplies Procedure *****');
5254: END IF;
5255:
5256: END Add_Supplies;
5257:

Line 5329: msc_sch_wb.atp_debug('*** Begin Call_delete_row ***');

5325: l_alloc_atp varchar2(1) := MSC_ATP_PVT.G_ALLOCATED_ATP; -- ALLOC ATP CHANGES, 12973673
5326:
5327: BEGIN
5328: IF PG_DEBUG in ('Y', 'C') THEN
5329: msc_sch_wb.atp_debug('*** Begin Call_delete_row ***');
5330: END IF;
5331:
5332: x_return_status := FND_API.G_RET_STS_SUCCESS;
5333:

Line 5346: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_so_tbl_status = '||l_so_tbl_status);

5342: FROM msc_apps_instances
5343: WHERE instance_id = p_instance_id;
5344:
5345: IF PG_DEBUG in ('Y', 'C') THEN
5346: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_so_tbl_status = '||l_so_tbl_status);
5347: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_summary_flag = ' || l_summary_flag);
5348: END IF;
5349: IF NVL(l_so_tbl_status, 1) = 2 THEN
5350: -- not available for atp

Line 5347: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_summary_flag = ' || l_summary_flag);

5343: WHERE instance_id = p_instance_id;
5344:
5345: IF PG_DEBUG in ('Y', 'C') THEN
5346: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_so_tbl_status = '||l_so_tbl_status);
5347: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_summary_flag = ' || l_summary_flag);
5348: END IF;
5349: IF NVL(l_so_tbl_status, 1) = 2 THEN
5350: -- not available for atp
5351: IF PG_DEBUG in ('Y', 'C') THEN

Line 5352: msc_sch_wb.atp_debug('Call_delete_row: ' || 'ATP not available');

5348: END IF;
5349: IF NVL(l_so_tbl_status, 1) = 2 THEN
5350: -- not available for atp
5351: IF PG_DEBUG in ('Y', 'C') THEN
5352: msc_sch_wb.atp_debug('Call_delete_row: ' || 'ATP not available');
5353: END IF;
5354: x_delete_atp_rec.error_code(1) := MSC_ATP_PVT.TRY_ATP_LATER;
5355: RETURN;
5356:

Line 5360: msc_sch_wb.atp_debug('Call_delete_row: ' || ' summary table is not ready. Switch to detail tables');

5356:
5357: ELSIF l_summary_flag = 1 THEN
5358: ---- summary table is not ready. Switch to detail tables
5359: IF PG_DEBUG in ('Y', 'C') THEN
5360: msc_sch_wb.atp_debug('Call_delete_row: ' || ' summary table is not ready. Switch to detail tables');
5361: END IF;
5362: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
5363:
5364: ELSIF l_summary_flag = 2 THEN

Line 5366: msc_sch_wb.atp_debug('Call_delete_row: ' || 'Summary Concurrent program is running');

5362: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
5363:
5364: ELSIF l_summary_flag = 2 THEN
5365: IF PG_DEBUG in ('Y', 'C') THEN
5366: msc_sch_wb.atp_debug('Call_delete_row: ' || 'Summary Concurrent program is running');
5367: END IF;
5368: x_delete_atp_rec.error_code(1) := MSC_ATP_PVT.SUMM_CONC_PROG_RUNNING;
5369: RETURN;
5370: END IF;

Line 5399: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_old_pf_item_id := ' || l_old_pf_item_id);

5395: p_atp_table.old_inventory_item_id(m),
5396: p_atp_table.old_source_organization_id(m));
5397: END IF;
5398: IF PG_DEBUG in ('Y', 'C') THEN
5399: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_old_pf_item_id := ' || l_old_pf_item_id);
5400: END IF;
5401: END IF;
5402: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN --3720018, moved from above
5403: /* time_phased_atp changes begin

Line 5419: msc_sch_wb.atp_debug('Call_delete_row: l_return_status:= ' || l_return_status);

5415: NULL --bug3510475
5416: );
5417:
5418: IF PG_DEBUG in ('Y', 'C') THEN
5419: msc_sch_wb.atp_debug('Call_delete_row: l_return_status:= ' || l_return_status);
5420: END IF;
5421:
5422: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5423: IF PG_DEBUG in ('Y', 'C') THEN

Line 5424: msc_sch_wb.atp_debug('Call_delete_row: ' || 'ATP Downtime during Re-schedule');

5420: END IF;
5421:
5422: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5423: IF PG_DEBUG in ('Y', 'C') THEN
5424: msc_sch_wb.atp_debug('Call_delete_row: ' || 'ATP Downtime during Re-schedule');
5425: END IF;
5426: x_return_status := FND_API.G_RET_STS_ERROR;
5427: return; -- Return in case of error in get_pf_plan_info, no point in proceding further.
5428: END IF;

Line 5431: msc_sch_wb.atp_debug('Call_delete_row: ' || 'reached here2');

5427: return; -- Return in case of error in get_pf_plan_info, no point in proceding further.
5428: END IF;
5429: /* time_phased_atp changes end*/
5430: IF PG_DEBUG in ('Y', 'C') THEN
5431: msc_sch_wb.atp_debug('Call_delete_row: ' || 'reached here2');
5432: END IF;
5433:
5434: l_plan_info_rec := MSC_ATP_PVT.G_PLAN_INFO_REC;
5435:

Line 5437: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_plan_info_rec.plan_id = '||l_plan_info_rec.plan_id);

5433:
5434: l_plan_info_rec := MSC_ATP_PVT.G_PLAN_INFO_REC;
5435:
5436: IF PG_DEBUG in ('Y', 'C') THEN
5437: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_plan_info_rec.plan_id = '||l_plan_info_rec.plan_id);
5438: END IF;
5439:
5440: l_old_plan_id(m) := l_plan_info_rec.plan_id;
5441: l_temp_assign_set_id := l_plan_info_rec.assignment_set_id;

Line 5449: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_source_organization_id = '|| p_atp_table.old_source_organization_id(m));

5445: l_attribute_07(m) := l_plan_info_rec.plan_name;
5446: END IF; --3720018
5447:
5448: IF PG_DEBUG in ('Y', 'C') THEN
5449: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_source_organization_id = '|| p_atp_table.old_source_organization_id(m));
5450: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_demand_class = '|| p_atp_table.old_demand_class(m));
5451: END IF;
5452: END IF;
5453: ELSE

Line 5450: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_demand_class = '|| p_atp_table.old_demand_class(m));

5446: END IF; --3720018
5447:
5448: IF PG_DEBUG in ('Y', 'C') THEN
5449: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_source_organization_id = '|| p_atp_table.old_source_organization_id(m));
5450: msc_sch_wb.atp_debug('Call_delete_row: ' || 'old_demand_class = '|| p_atp_table.old_demand_class(m));
5451: END IF;
5452: END IF;
5453: ELSE
5454: IF p_atp_table.old_source_organization_id(m) IS NOT NULL THEN

Line 5460: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_old_plan_id = '||l_old_plan_id(m));

5456: END IF;
5457: END IF;
5458:
5459: IF PG_DEBUG in ('Y', 'C') THEN
5460: msc_sch_wb.atp_debug('Call_delete_row: ' || 'l_old_plan_id = '||l_old_plan_id(m));
5461: END IF;
5462:
5463: -- 2152184: We remove rows only if we have old plan id
5464: IF l_old_plan_id(m) IS NOT NULL THEN

Line 5473: -- msc_sch_wb.atp_debug('Call_delete_row: ' || 'demand has already been deleted');

5469: -- Chagned the following loop
5470: --FOR i in 1..l_del_demand_ids.count LOOP
5471: -- IF p_atp_table.Identifier(m) = l_del_identifiers(i) and l_old_plan_id(m) = l_del_plan_ids(i) THEN
5472: -- IF PG_DEBUG in ('Y', 'C') THEN
5473: -- msc_sch_wb.atp_debug('Call_delete_row: ' || 'demand has already been deleted');
5474: -- END IF;
5475: -- l_delete_demand_flag := 0;
5476: -- EXIT;
5477: -- END IF;

Line 5486: msc_sch_wb.atp_debug('Call_delete_row: ' || 'demand has already been deleted');

5482: IF p_atp_table.Identifier(m) = l_del_identifiers(i) THEN
5483: FOR i in 1..l_del_demand_ids.count LOOP
5484: IF l_old_plan_id(m) = l_del_plan_ids(i) THEN
5485: IF PG_DEBUG in ('Y', 'C') THEN
5486: msc_sch_wb.atp_debug('Call_delete_row: ' || 'demand has already been deleted');
5487: END IF;
5488: l_delete_demand_flag := 0;
5489: EXIT;
5490: END IF;

Line 5511: msc_sch_wb.atp_debug('Call_delete_row: ' || 'G_HYBRID_ALLOC_ATP is Y');

5507:
5508: -- ALLOC ATP CHANGES, 12973673
5509: IF (MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_HYBRID_ALLOC_ATP = 'Y') THEN
5510: IF PG_DEBUG in ('Y', 'C') THEN
5511: msc_sch_wb.atp_debug('Call_delete_row: ' || 'G_HYBRID_ALLOC_ATP is Y');
5512: END IF;
5513:
5514: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_FUNC.check_alloc_exists(p_instance_id,
5515: -1, --PLAN_ID

Line 5521: msc_sch_wb.atp_debug('Call_delete_row: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP = '||MSC_ATP_PVT.G_ALLOCATED_ATP);

5517: p_atp_table.old_source_organization_id(m),
5518: nvl(p_atp_table.Requested_Arrival_Date(m), p_atp_table.Requested_Ship_Date(m)));
5519:
5520: IF PG_DEBUG in ('Y', 'C') THEN
5521: msc_sch_wb.atp_debug('Call_delete_row: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP = '||MSC_ATP_PVT.G_ALLOCATED_ATP);
5522: END IF;
5523: END IF;
5524:
5525: MSC_ATP_DB_UTILS.Delete_Row(

Line 5558: msc_sch_wb.atp_debug('Call_delete_row: After call to Delete_Row' );

5554: );
5555: --l_demand_class_flag);
5556:
5557: IF PG_DEBUG in ('Y', 'C') THEN
5558: msc_sch_wb.atp_debug('Call_delete_row: After call to Delete_Row' );
5559: END IF;
5560:
5561: --IF MSC_ATP_PVT.G_INV_CTP = 4 and l_old_plan_id(m) <> -1 THEN --3720018
5562: IF (l_old_plan_id(m) = -1) THEN

Line 5639: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_items.count ' || l_atp_peg_items.count);

5635: -- CTO ODR and Simplified Pegging
5636:
5637: -- This check not necessary but used as an insurance.
5638: IF PG_DEBUG in ('Y', 'C') THEN
5639: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_items.count ' || l_atp_peg_items.count);
5640: END IF;
5641: IF l_atp_peg_items IS NOT NULL AND l_atp_peg_items.count > 0 THEN
5642: l_count := l_atp_peg_items.count;
5643: l_del_atp_peg_items.extend(l_count);

Line 5650: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_demands.count ' || l_atp_peg_demands.count);

5646: l_del_atp_peg_items(l_count + i) := l_atp_peg_items(i);
5647: END LOOP;
5648: END IF;
5649: IF PG_DEBUG in ('Y', 'C') THEN
5650: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_demands.count ' || l_atp_peg_demands.count);
5651: END IF;
5652: IF l_atp_peg_demands IS NOT NULL AND l_atp_peg_demands.count > 0 THEN
5653: l_count := l_atp_peg_demands.count;
5654: l_del_atp_peg_demands.extend(l_count);

Line 5665: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_supplies.count ' || l_atp_peg_supplies.count);

5661: l_off_demand_instance_id(l_count + i) := l_demand_instance_id(i); --Bug 3629191
5662: END LOOP;
5663: END IF;
5664: IF PG_DEBUG in ('Y', 'C') THEN
5665: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_supplies.count ' || l_atp_peg_supplies.count);
5666: END IF;
5667: IF l_atp_peg_supplies IS NOT NULL AND l_atp_peg_supplies.count > 0 THEN
5668: l_count := l_atp_peg_supplies.count;
5669: l_del_atp_peg_supplies.extend(l_count);

Line 5680: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_res_reqs.count ' || l_atp_peg_res_reqs.count);

5676: l_off_supply_instance_id(l_count + i) := l_supply_instance_id(i); --Bug 3629191
5677: END LOOP;
5678: END IF;
5679: IF PG_DEBUG in ('Y', 'C') THEN
5680: msc_sch_wb.atp_debug('Call_delete_row: l_atp_peg_res_reqs.count ' || l_atp_peg_res_reqs.count);
5681: END IF;
5682: IF l_atp_peg_res_reqs IS NOT NULL AND l_atp_peg_res_reqs.count > 0 THEN
5683: l_count := l_atp_peg_res_reqs.count;
5684: l_del_atp_peg_res_reqs.extend(l_count);

Line 5699: msc_sch_wb.atp_debug('Call_delete_row: ' || 'Count of records := ' || l_del_demand_ids.count);

5695: END IF; --3720018
5696: END IF; --- IF (MSC_ATP_PVT.G_INV_CTP = 5) or (MSC_ATP_PVT.G_INV_CTP = 4 and l_delete_demand_flag = 1)
5697: END IF;
5698: IF PG_DEBUG in ('Y', 'C') THEN
5699: msc_sch_wb.atp_debug('Call_delete_row: ' || 'Count of records := ' || l_del_demand_ids.count);
5700: END IF;
5701: --l_atp_table.Error_Code(m) := 0;
5702: x_delete_atp_rec.error_code(m) := 0;
5703:

Line 5744: msc_sch_wb.atp_debug('*** END Call_delete_row ***');

5740: MSC_ATP_PVT.G_ALLOCATED_ATP := l_alloc_atp; -- ALLOC ATP CHANGES, 12973673
5741: END IF;
5742:
5743: IF PG_DEBUG in ('Y', 'C') THEN
5744: msc_sch_wb.atp_debug('*** END Call_delete_row ***');
5745: END IF;
5746:
5747: END call_delete_row;
5748: --5357370 starts

Line 5767: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');

5763: l_sysdate date;
5764:
5765: BEGIN
5766: IF PG_DEBUG in ('Y', 'C') THEN
5767: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
5768: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
5769: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
5770: END IF;
5771: BEGIN

Line 5768: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);

5764:
5765: BEGIN
5766: IF PG_DEBUG in ('Y', 'C') THEN
5767: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
5768: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
5769: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
5770: END IF;
5771: BEGIN
5772: SELECT D.sr_instance_id,

Line 5769: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);

5765: BEGIN
5766: IF PG_DEBUG in ('Y', 'C') THEN
5767: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Inside delete summary row');
5768: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_identifier := ' || p_identifier);
5769: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'p_instance_id := ' || p_instance_id);
5770: END IF;
5771: BEGIN
5772: SELECT D.sr_instance_id,
5773: D.organization_id,

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

5835: AND C2.CALENDAR_DATE = TRUNC(sysdate);
5836: EXCEPTION
5837: WHEN NO_DATA_FOUND THEN
5838: IF PG_DEBUG in ('Y', 'C') THEN
5839: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'No row found that need to be deleted from summary table');
5840: END IF;
5841: END;
5842: -- 5357370: need user id for insert
5843: l_user_id := FND_GLOBAL.USER_ID;

Line 5847: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);

5843: l_user_id := FND_GLOBAL.USER_ID;
5844: l_sysdate := sysdate;
5845:
5846: IF PG_DEBUG in ('Y', 'C') THEN
5847: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
5848: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
5849: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
5850:
5851: END IF;

Line 5848: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);

5844: l_sysdate := sysdate;
5845:
5846: IF PG_DEBUG in ('Y', 'C') THEN
5847: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
5848: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
5849: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
5850:
5851: END IF;
5852: FOR i in 1..l_inventory_item_id.count LOOP

Line 5849: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);

5845:
5846: IF PG_DEBUG in ('Y', 'C') THEN
5847: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_inventory_item_id.count := ' || l_inventory_item_id.count);
5848: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_user_id := '|| l_user_id);
5849: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sysdate := '|| l_sysdate);
5850:
5851: END IF;
5852: FOR i in 1..l_inventory_item_id.count LOOP
5853: IF PG_DEBUG in ('Y', 'C') THEN

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

5850:
5851: END IF;
5852: FOR i in 1..l_inventory_item_id.count LOOP
5853: IF PG_DEBUG in ('Y', 'C') THEN
5854: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5855: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5856: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5857: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5858: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));

Line 5855: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));

5851: END IF;
5852: FOR i in 1..l_inventory_item_id.count LOOP
5853: IF PG_DEBUG in ('Y', 'C') THEN
5854: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5855: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5856: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5857: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5858: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5859: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));

Line 5856: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );

5852: FOR i in 1..l_inventory_item_id.count LOOP
5853: IF PG_DEBUG in ('Y', 'C') THEN
5854: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5855: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5856: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5857: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5858: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5859: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5860: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));

Line 5857: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));

5853: IF PG_DEBUG in ('Y', 'C') THEN
5854: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5855: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5856: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5857: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5858: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5859: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5860: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
5861: END IF;

Line 5858: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));

5854: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'Row found, delete it from summary');
5855: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5856: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5857: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5858: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5859: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5860: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
5861: END IF;
5862:

Line 5859: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));

5855: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_ivnevtory_item_id := ' || l_inventory_item_id(i));
5856: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5857: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5858: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5859: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5860: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
5861: END IF;
5862:
5863: update /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ msc_atp_summary_so

Line 5860: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));

5856: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_organization_id := ' || l_organization_id(i) );
5857: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_demand_class := ' || l_demand_class(i));
5858: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_date := ' || l_sd_date(i));
5859: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_sd_qty := ' || l_sd_qty(i));
5860: msc_sch_wb.atp_debug('UNDO_DELETE_SUMMARY_ROW: ' || 'l_instance_id := ' || l_instance_id(i));
5861: END IF;
5862:
5863: update /*+ INDEX(msc_atp_summary_so MSC_ATP_SUMMARY_SO_U1) */ msc_atp_summary_so
5864: set sd_qty = (sd_qty + l_sd_qty(i))

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

5870:
5871: -- 5357370: this is to handle that we have reservation on the past due date, and
5872: -- we won't be able to find record on sysdate to update.
5873: IF (SQL%NOTFOUND) THEN
5874: msc_sch_wb.atp_debug('DELETE_SUMMARY_ROW: update failed, now try insert');
5875: --- Insert the new record
5876: BEGIN
5877: INSERT INTO MSC_ATP_SUMMARY_SO
5878: (plan_id,

Line 5959: msc_sch_wb.atp_debug('***** Begin Hide_SD_Rec Procedure *****');

5955: c1 pegging%ROWTYPE;
5956: l_alloc_atp varchar2(1) := MSC_ATP_PVT.G_ALLOCATED_ATP; -- ALLOC ATP CHANGES, 12973673
5957: BEGIN
5958: IF PG_DEBUG in ('Y', 'C') THEN
5959: msc_sch_wb.atp_debug('***** Begin Hide_SD_Rec Procedure *****');
5960: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'Reset all the global variables ');
5961: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'p_identifier= ' || p_identifier);
5962: END IF;
5963:

Line 5960: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'Reset all the global variables ');

5956: l_alloc_atp varchar2(1) := MSC_ATP_PVT.G_ALLOCATED_ATP; -- ALLOC ATP CHANGES, 12973673
5957: BEGIN
5958: IF PG_DEBUG in ('Y', 'C') THEN
5959: msc_sch_wb.atp_debug('***** Begin Hide_SD_Rec Procedure *****');
5960: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'Reset all the global variables ');
5961: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'p_identifier= ' || p_identifier);
5962: END IF;
5963:
5964: -- for ods, just need to remove the record from msc_sales_orders

Line 5961: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'p_identifier= ' || p_identifier);

5957: BEGIN
5958: IF PG_DEBUG in ('Y', 'C') THEN
5959: msc_sch_wb.atp_debug('***** Begin Hide_SD_Rec Procedure *****');
5960: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'Reset all the global variables ');
5961: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'p_identifier= ' || p_identifier);
5962: END IF;
5963:
5964: -- for ods, just need to remove the record from msc_sales_orders
5965: -- initialize API return status to success

Line 5978: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);

5974: FETCH pegging INTO c1;
5975: EXIT WHEN pegging%NOTFOUND;
5976:
5977: IF PG_DEBUG in ('Y', 'C') THEN
5978: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
5979: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
5980: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
5981: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);

Line 5979: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);

5975: EXIT WHEN pegging%NOTFOUND;
5976:
5977: IF PG_DEBUG in ('Y', 'C') THEN
5978: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
5979: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
5980: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
5981: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
5983: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);

Line 5980: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);

5976:
5977: IF PG_DEBUG in ('Y', 'C') THEN
5978: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
5979: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
5980: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
5981: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
5983: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
5984: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'char1 := ' || c1.char1);

Line 5981: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);

5977: IF PG_DEBUG in ('Y', 'C') THEN
5978: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
5979: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
5980: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
5981: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
5983: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
5984: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'char1 := ' || c1.char1);
5985: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'resource_id := ' || c1.resource_id);

Line 5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);

5978: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
5979: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
5980: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
5981: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
5983: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
5984: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'char1 := ' || c1.char1);
5985: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
5986: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);

Line 5983: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);

5979: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
5980: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
5981: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
5983: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
5984: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'char1 := ' || c1.char1);
5985: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
5986: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
5987: END IF;

Line 5984: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'char1 := ' || c1.char1);

5980: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
5981: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
5983: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
5984: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'char1 := ' || c1.char1);
5985: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
5986: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
5987: END IF;
5988:

Line 5985: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'resource_id := ' || c1.resource_id);

5981: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
5983: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
5984: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'char1 := ' || c1.char1);
5985: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
5986: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
5987: END IF;
5988:
5989: IF c1.supply_demand_type = 2 THEN --This is supply line

Line 5986: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);

5982: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
5983: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
5984: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'char1 := ' || c1.char1);
5985: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
5986: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
5987: END IF;
5988:
5989: IF c1.supply_demand_type = 2 THEN --This is supply line
5990: IF NVL(c1.inventory_item_id, -1) > 0 THEN

Line 5999: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of supply updated from msc_supplies = '|| SQL%ROWCOUNT);

5995: AND plan_id = c1.identifier2
5996: AND inventory_item_id > 0;
5997:
5998: IF PG_DEBUG in ('Y', 'C') THEN
5999: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of supply updated from msc_supplies = '|| SQL%ROWCOUNT);
6000: END IF;
6001:
6002: -- time_phased_atp or demand priority AATP
6003: IF (c1.aggregate_time_fence_date is not null)

Line 6011: msc_sch_wb.atp_debug('Hide_SD_Rec: before update of msc_alloc_supplies');

6007: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
6008: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
6009:
6010: IF PG_DEBUG in ('Y', 'C') THEN
6011: msc_sch_wb.atp_debug('Hide_SD_Rec: before update of msc_alloc_supplies');
6012: END IF;
6013:
6014: UPDATE MSC_ALLOC_SUPPLIES
6015: SET inventory_item_id = -1*inventory_item_id

Line 6021: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of supply updated from msc_alloc_supplies = '|| SQL%ROWCOUNT);

6017: AND plan_id = c1.identifier2
6018: AND inventory_item_id > 0;
6019:
6020: IF PG_DEBUG in ('Y', 'C') THEN
6021: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of supply updated from msc_alloc_supplies = '|| SQL%ROWCOUNT);
6022: END IF;
6023: END IF;
6024: IF NVL(c1.char1, '@@@') <> '@@@' THEN
6025:

Line 6033: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of stealing demand updated from msc_alloc_supplies = '|| SQL%ROWCOUNT);

6029: AND plan_id = c1.identifier2
6030: AND inventory_item_id > 0;
6031:
6032: IF PG_DEBUG in ('Y', 'C') THEN
6033: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of stealing demand updated from msc_alloc_supplies = '|| SQL%ROWCOUNT);
6034: END IF;
6035: END IF;
6036: END IF; -- IF NVL(c1.inventory_item_id, -1) > 0 THEN
6037: ELSE -- IF c1.supply_demand_type = 2 THEN

Line 6049: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of demand updated from msc_demand = '|| SQL%ROWCOUNT);

6045: AND old_demand_quantity IS NULL
6046: AND inventory_item_id > 0;
6047:
6048: IF PG_DEBUG in ('Y', 'C') THEN
6049: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of demand updated from msc_demand = '|| SQL%ROWCOUNT);
6050: END IF;
6051:
6052: IF (c1.aggregate_time_fence_date is not null)
6053: OR

Line 6060: msc_sch_wb.atp_debug('Hide_SD_Rec: before update of' ||

6056: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
6057: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
6058:
6059: IF PG_DEBUG in ('Y', 'C') THEN
6060: msc_sch_wb.atp_debug('Hide_SD_Rec: before update of' ||
6061: ' msc_alloc_demands');
6062: END IF;
6063:
6064: UPDATE MSC_ALLOC_DEMANDS

Line 6072: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of demand updated from msc_alloc_demands = '|| SQL%ROWCOUNT);

6068: AND plan_id = c1.identifier2
6069: AND inventory_item_id > 0;
6070:
6071: IF PG_DEBUG in ('Y', 'C') THEN
6072: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of demand updated from msc_alloc_demands = '|| SQL%ROWCOUNT);
6073: END IF;
6074: END IF;
6075: ELSE -- IF NVL(c1.inventory_item_id, -1) > 0 THEN
6076:

Line 6085: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of demand deleted from msc_resource_requirements = '|| SQL%ROWCOUNT);

6081: AND sr_instance_id = c1.identifier1
6082: AND resource_id > 0;
6083:
6084: IF PG_DEBUG in ('Y', 'C') THEN
6085: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of demand deleted from msc_resource_requirements = '|| SQL%ROWCOUNT);
6086: END IF;
6087:
6088: END IF; -- IF NVL(c1.inventory_item_id, -1) > 0 THEN
6089: END IF; -- IF c1.supply_demand_type = 2 THEN

Line 6099: msc_sch_wb.atp_debug('***** End Hide_SD_Rec Procedure *****');

6095: MSC_ATP_PVT.G_ALLOCATED_ATP := l_alloc_atp; -- ALLOC ATP CHANGES, 12973673
6096: END IF;
6097:
6098: IF PG_DEBUG in ('Y', 'C') THEN
6099: msc_sch_wb.atp_debug('***** End Hide_SD_Rec Procedure *****');
6100: END IF;
6101: EXCEPTION
6102: WHEN OTHERS THEN
6103: IF PG_DEBUG in ('Y', 'C') THEN

Line 6104: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

6100: END IF;
6101: EXCEPTION
6102: WHEN OTHERS THEN
6103: IF PG_DEBUG in ('Y', 'C') THEN
6104: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
6105: END IF;
6106: x_return_status := FND_API.G_RET_STS_ERROR;
6107: END Hide_SD_Rec;
6108:

Line 6140: msc_sch_wb.atp_debug('***** Begin Delete_SD_Rec Procedure *****');

6136: c1 pegging%ROWTYPE;
6137: l_alloc_atp VARCHAR2(1) := MSC_ATP_PVT.G_ALLOCATED_ATP; --ALLOC ATP CHANGES, 12973673
6138: BEGIN
6139: IF PG_DEBUG in ('Y', 'C') THEN
6140: msc_sch_wb.atp_debug('***** Begin Delete_SD_Rec Procedure *****');
6141: END IF;
6142:
6143: x_return_status := FND_API.G_RET_STS_SUCCESS;
6144: MSC_ATP_PVT.G_ALLOCATION_METHOD := NVL(FND_PROFILE.VALUE('MSC_ALLOCATION_METHOD'),2);

Line 6150: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'p_pegging_tab(i) = ' || p_pegging_tab(i));

6146: MSC_ATP_PVT.G_INV_CTP := FND_PROFILE.value('INV_CTP') ;
6147:
6148: FOR i IN p_pegging_tab.FIRST..p_pegging_tab.COUNT LOOP
6149: IF PG_DEBUG in ('Y', 'C') THEN
6150: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'p_pegging_tab(i) = ' || p_pegging_tab(i));
6151: END IF;
6152: OPEN pegging(p_pegging_tab(i));
6153: LOOP
6154:

Line 6159: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);

6155: FETCH pegging INTO c1;
6156: EXIT WHEN pegging%NOTFOUND;
6157:
6158: IF PG_DEBUG in ('Y', 'C') THEN
6159: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6160: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6161: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6162: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);

Line 6160: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);

6156: EXIT WHEN pegging%NOTFOUND;
6157:
6158: IF PG_DEBUG in ('Y', 'C') THEN
6159: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6160: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6161: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6162: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6164: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);

Line 6161: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);

6157:
6158: IF PG_DEBUG in ('Y', 'C') THEN
6159: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6160: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6161: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6162: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6164: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6165: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'char1 := ' || c1.char1);

Line 6162: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);

6158: IF PG_DEBUG in ('Y', 'C') THEN
6159: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6160: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6161: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6162: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6164: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6165: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'char1 := ' || c1.char1);
6166: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'resource_id := ' || c1.resource_id);

Line 6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);

6159: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6160: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6161: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6162: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6164: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6165: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'char1 := ' || c1.char1);
6166: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6167: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);

Line 6164: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);

6160: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6161: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6162: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6164: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6165: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'char1 := ' || c1.char1);
6166: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6167: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
6168: END IF;

Line 6165: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'char1 := ' || c1.char1);

6161: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6162: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6164: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6165: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'char1 := ' || c1.char1);
6166: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6167: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
6168: END IF;
6169:

Line 6166: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'resource_id := ' || c1.resource_id);

6162: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6164: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6165: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'char1 := ' || c1.char1);
6166: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6167: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
6168: END IF;
6169:
6170: MSC_ATP_DB_UTILS.Delete_Pegging(c1.pegging_id);

Line 6167: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);

6163: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6164: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6165: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'char1 := ' || c1.char1);
6166: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6167: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
6168: END IF;
6169:
6170: MSC_ATP_DB_UTILS.Delete_Pegging(c1.pegging_id);
6171:

Line 6180: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of supply deleted from msc_supplies = '|| SQL%ROWCOUNT);

6176: WHERE transaction_id = c1.identifier3
6177: AND plan_id = c1.identifier2;
6178:
6179: IF PG_DEBUG in ('Y', 'C') THEN
6180: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of supply deleted from msc_supplies = '|| SQL%ROWCOUNT);
6181: END IF;
6182:
6183: -- time_phased_atp
6184: IF (c1.aggregate_time_fence_date is not null)

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

6192: WHERE parent_transaction_id = c1.identifier3
6193: AND plan_id = c1.identifier2;
6194:
6195: IF PG_DEBUG in ('Y', 'C') THEN
6196: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of supply deleted from msc_alloc_supplies = '|| SQL%ROWCOUNT);
6197: END IF;
6198: END IF;
6199: IF NVL(c1.char1, '@@@') <> '@@@' THEN
6200:

Line 6206: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of stealing demands deleted from msc_alloc_supplies = '|| SQL%ROWCOUNT);

6202: WHERE demand_id = c1.identifier3
6203: AND plan_id = c1.identifier2;
6204:
6205: IF PG_DEBUG in ('Y', 'C') THEN
6206: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of stealing demands deleted from msc_alloc_supplies = '|| SQL%ROWCOUNT);
6207: END IF;
6208: END IF;
6209: END IF; -- IF NVL(c1.inventory_item_id, -1) > 0 THEN
6210:

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

6217: AND plan_id = c1.identifier2
6218: AND old_demand_quantity IS NULL;
6219:
6220: IF PG_DEBUG in ('Y', 'C') THEN
6221: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of demand deleted from msc_demand = '|| SQL%ROWCOUNT);
6222: END IF;
6223:
6224: -- time_phased_atp
6225: IF (c1.aggregate_time_fence_date is not null)

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

6234: AND old_allocated_quantity IS NULL
6235: AND plan_id = c1.identifier2;
6236:
6237: IF PG_DEBUG in ('Y', 'C') THEN
6238: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of demand deleted from msc_alloc_demands = '|| SQL%ROWCOUNT);
6239: END IF;
6240: END IF;
6241:
6242: ELSE -- IF NVL(c1.inventory_item_id, -1) > 0 THEN

Line 6250: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of demand deleted from msc_resource_requirements = '|| SQL%ROWCOUNT);

6246: AND plan_id = c1.identifier2
6247: AND sr_instance_id = c1.identifier1;
6248:
6249: IF PG_DEBUG in ('Y', 'C') THEN
6250: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of demand deleted from msc_resource_requirements = '|| SQL%ROWCOUNT);
6251: END IF;
6252:
6253: END IF; -- IF NVL(c1.inventory_item_id, -1) > 0 THEN
6254: END IF; -- IF c1.supply_demand_type = 2 THEN

Line 6265: msc_sch_wb.atp_debug('***** End Delete_SD_Rec Procedure *****');

6261: MSC_ATP_PVT.G_ALLOCATED_ATP := l_alloc_atp; --ALLOC ATP CHANGES, 12973673
6262: END IF;
6263:
6264: IF PG_DEBUG in ('Y', 'C') THEN
6265: msc_sch_wb.atp_debug('***** End Delete_SD_Rec Procedure *****');
6266: END IF;
6267: EXCEPTION
6268: WHEN OTHERS THEN
6269: IF PG_DEBUG in ('Y', 'C') THEN

Line 6270: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

6266: END IF;
6267: EXCEPTION
6268: WHEN OTHERS THEN
6269: IF PG_DEBUG in ('Y', 'C') THEN
6270: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
6271: END IF;
6272: x_return_status := FND_API.G_RET_STS_ERROR;
6273: END Delete_SD_Rec;
6274:

Line 6306: msc_sch_wb.atp_debug('***** Begin Restore_SD_Rec Procedure *****');

6302: l_alloc_atp VARCHAR2(1) := MSC_ATP_PVT.G_ALLOCATED_ATP; --ALLOC ATP CHANGES, 12973673
6303:
6304: BEGIN
6305: IF PG_DEBUG in ('Y', 'C') THEN
6306: msc_sch_wb.atp_debug('***** Begin Restore_SD_Rec Procedure *****');
6307: END IF;
6308:
6309: -- for ods, just need to remove the record from msc_sales_orders
6310: -- initialize API return status to success

Line 6318: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'p_pegging_tab(i) = ' || p_pegging_tab(i));

6314: MSC_ATP_PVT.G_INV_CTP := FND_PROFILE.value('INV_CTP') ;
6315:
6316: FOR i IN p_pegging_tab.FIRST..p_pegging_tab.COUNT LOOP
6317: IF PG_DEBUG in ('Y', 'C') THEN
6318: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'p_pegging_tab(i) = ' || p_pegging_tab(i));
6319: END IF;
6320: OPEN pegging(p_pegging_tab(i));
6321: LOOP
6322:

Line 6328: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);

6324: FETCH pegging INTO c1;
6325: EXIT WHEN pegging%NOTFOUND;
6326:
6327: IF PG_DEBUG in ('Y', 'C') THEN
6328: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6329: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6330: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6331: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);

Line 6329: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);

6325: EXIT WHEN pegging%NOTFOUND;
6326:
6327: IF PG_DEBUG in ('Y', 'C') THEN
6328: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6329: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6330: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6331: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6333: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);

Line 6330: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);

6326:
6327: IF PG_DEBUG in ('Y', 'C') THEN
6328: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6329: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6330: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6331: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6333: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6334: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'char1 := ' || c1.char1);

Line 6331: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);

6327: IF PG_DEBUG in ('Y', 'C') THEN
6328: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6329: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6330: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6331: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6333: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6334: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'char1 := ' || c1.char1);
6335: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'resource_id := ' || c1.resource_id);

Line 6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);

6328: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'pegging_id = ' || c1.pegging_id);
6329: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6330: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6331: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6333: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6334: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'char1 := ' || c1.char1);
6335: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6336: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);

Line 6333: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);

6329: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier3 = ' || c1.identifier3);
6330: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6331: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6333: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6334: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'char1 := ' || c1.char1);
6335: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6336: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
6337: END IF;

Line 6334: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'char1 := ' || c1.char1);

6330: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'identifier1 = ' || c1.identifier1);
6331: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6333: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6334: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'char1 := ' || c1.char1);
6335: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6336: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
6337: END IF;
6338:

Line 6335: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'resource_id := ' || c1.resource_id);

6331: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'plan_id (identifier2) = ' || c1.identifier2);
6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6333: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6334: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'char1 := ' || c1.char1);
6335: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6336: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
6337: END IF;
6338:
6339: IF c1.supply_demand_type = 2 THEN

Line 6336: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);

6332: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'supply_demand_type = ' || c1.supply_demand_type);
6333: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'inventory_item_id := ' || c1.inventory_item_id);
6334: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'char1 := ' || c1.char1);
6335: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'resource_id := ' || c1.resource_id);
6336: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'aggregate_time_fence_date := ' || c1.aggregate_time_fence_date);
6337: END IF;
6338:
6339: IF c1.supply_demand_type = 2 THEN
6340: IF NVL(c1.inventory_item_id, -1) > 0 THEN

Line 6349: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of supply updated from msc_supplies = '|| SQL%ROWCOUNT);

6345: AND plan_id = c1.identifier2
6346: AND inventory_item_id < 0;
6347:
6348: IF PG_DEBUG in ('Y', 'C') THEN
6349: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of supply updated from msc_supplies = '|| SQL%ROWCOUNT);
6350: END IF;
6351:
6352: -- time_phased_atp
6353: IF (c1.aggregate_time_fence_date is not null)

Line 6367: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of supply updated from msc_alloc_supplies = '|| SQL%ROWCOUNT);

6363: AND plan_id = c1.identifier2
6364: AND inventory_item_id < 0;
6365:
6366: IF PG_DEBUG in ('Y', 'C') THEN
6367: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of supply updated from msc_alloc_supplies = '|| SQL%ROWCOUNT);
6368: END IF;
6369: END IF;
6370: IF NVL(c1.char1, '@@@') <> '@@@' THEN
6371:

Line 6379: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of stealing demands updated from msc_alloc_supplies = '|| SQL%ROWCOUNT);

6375: AND plan_id = c1.identifier2
6376: AND inventory_item_id < 0;
6377:
6378: IF PG_DEBUG in ('Y', 'C') THEN
6379: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of stealing demands updated from msc_alloc_supplies = '|| SQL%ROWCOUNT);
6380: END IF;
6381: END IF;
6382: END IF; -- IF NVL(c1.inventory_item_id, -1) > 0 THEN
6383:

Line 6396: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of demand updated from msc_demand = '|| SQL%ROWCOUNT);

6392: AND old_demand_quantity IS NULL
6393: AND inventory_item_id < 0;
6394:
6395: IF PG_DEBUG in ('Y', 'C') THEN
6396: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of demand updated from msc_demand = '|| SQL%ROWCOUNT);
6397: END IF;
6398:
6399: -- time_phased_atp
6400: IF (c1.aggregate_time_fence_date is not null)

Line 6415: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of demand updated from msc_alloc_demands = '|| SQL%ROWCOUNT);

6411: AND plan_id = c1.identifier2
6412: AND inventory_item_id < 0;
6413:
6414: IF PG_DEBUG in ('Y', 'C') THEN
6415: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of demand updated from msc_alloc_demands = '|| SQL%ROWCOUNT);
6416: END IF;
6417: END IF;
6418:
6419: ELSE -- IF NVL(c1.inventory_item_id, -1) > 0 THEN

Line 6429: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of demand updated from msc_resource_requirements = '|| SQL%ROWCOUNT);

6425: AND sr_instance_id = c1.identifier1
6426: AND resource_id < 0;
6427:
6428: IF PG_DEBUG in ('Y', 'C') THEN
6429: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'No. of demand updated from msc_resource_requirements = '|| SQL%ROWCOUNT);
6430: END IF;
6431: END IF; -- IF NVL(c1.inventory_item_id, -1) > 0 THEN
6432: END IF; -- IF c1.supply_demand_type = 2 THEN
6433: END LOOP;

Line 6442: msc_sch_wb.atp_debug('***** End Restore_SD_Rec Procedure *****');

6438: MSC_ATP_PVT.G_ALLOCATED_ATP := l_alloc_atp; --ALLOC ATP CHANGES, 12973673
6439: END IF;
6440:
6441: IF PG_DEBUG in ('Y', 'C') THEN
6442: msc_sch_wb.atp_debug('***** End Restore_SD_Rec Procedure *****');
6443: END IF;
6444: EXCEPTION
6445: WHEN OTHERS THEN
6446: IF PG_DEBUG in ('Y', 'C') THEN

Line 6447: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);

6443: END IF;
6444: EXCEPTION
6445: WHEN OTHERS THEN
6446: IF PG_DEBUG in ('Y', 'C') THEN
6447: msc_sch_wb.atp_debug('Restore_SD_Rec: ' || 'Error occurred: ' || to_char(sqlcode) || ':' || SQLERRM);
6448: END IF;
6449: x_return_status := FND_API.G_RET_STS_ERROR;
6450: END Restore_SD_Rec;
6451: