DBA Data[Home] [Help]

APPS.MSC_AATP_REQ dependencies on MSC_ATP_PVT

Line 83: l_pf_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id;

79:
80: /* time_phased_atp changes begin*/
81: IF (p_inventory_item_id <> p_request_item_id and p_atf_date is not null) THEN
82: l_time_phased_atp := 'Y';
83: l_pf_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id;
84: END IF;
85:
86: IF PG_DEBUG in ('Y', 'C') THEN
87: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'Time Phased ATP = ' || l_time_phased_atp );

Line 105: l_inv_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.inventory_item_id;

101: IF PG_DEBUG in ('Y', 'C') THEN
102: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'Error selecting uom_code for the item');
103: END IF;
104: END;*/
105: l_inv_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.inventory_item_id;
106: l_uom_code := MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code;
107: -- time_phased_atp changes end
108:
109: -- get the infinite time fence date if it exists

Line 106: l_uom_code := MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code;

102: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'Error selecting uom_code for the item');
103: END IF;
104: END;*/
105: l_inv_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.inventory_item_id;
106: l_uom_code := MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code;
107: -- time_phased_atp changes end
108:
109: -- get the infinite time fence date if it exists
110: --diag_atp

Line 129: IF MSC_ATP_PVT.G_SUMMARY_SQL = 'Y' THEN -- For summary enhancement

125: IF PG_DEBUG in ('Y', 'C') THEN
126: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'p_insert_flag : 0');
127: END IF;
128:
129: IF MSC_ATP_PVT.G_SUMMARY_SQL = 'Y' THEN -- For summary enhancement
130: IF PG_DEBUG in ('Y', 'C') THEN
131: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'MSC_ATP_PVT.G_SUMMARY_SQL := ' || MSC_ATP_PVT.G_SUMMARY_SQL);
132: END IF;
133:

Line 131: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'MSC_ATP_PVT.G_SUMMARY_SQL := ' || MSC_ATP_PVT.G_SUMMARY_SQL);

127: END IF;
128:
129: IF MSC_ATP_PVT.G_SUMMARY_SQL = 'Y' THEN -- For summary enhancement
130: IF PG_DEBUG in ('Y', 'C') THEN
131: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'MSC_ATP_PVT.G_SUMMARY_SQL := ' || MSC_ATP_PVT.G_SUMMARY_SQL);
132: END IF;
133:
134: -- time_phased_atp
135: IF l_time_phased_atp = 'N' THEN

Line 228: ELSE -- IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN -- For summary enhancement

224:
225: END IF; -- IF Not_PF_Case THEN
226:
227:
228: ELSE -- IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN -- For summary enhancement
229:
230: IF PG_DEBUG in ('Y', 'C') THEN
231: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'MSC_ATP_PVT.G_SUMMARY_SQL := ' || MSC_ATP_PVT.G_SUMMARY_SQL);
232: END IF;

Line 231: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'MSC_ATP_PVT.G_SUMMARY_SQL := ' || MSC_ATP_PVT.G_SUMMARY_SQL);

227:
228: ELSE -- IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN -- For summary enhancement
229:
230: IF PG_DEBUG in ('Y', 'C') THEN
231: msc_sch_wb.atp_debug('Item_Pre_Allocated_Atp: ' || 'MSC_ATP_PVT.G_SUMMARY_SQL := ' || MSC_ATP_PVT.G_SUMMARY_SQL);
232: END IF;
233:
234: -- time_phased_atp
235: IF l_time_phased_atp = 'N' THEN

Line 293: END IF; -- IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN -- For summary enhancement

289: RAISE FND_API.G_EXC_ERROR;
290: END IF;
291: END IF; -- IF Not_PF_Case THEN
292:
293: END IF; -- IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN -- For summary enhancement
294:
295: ELSE -- IF (NVL(p_insert_flag, 0) = 0 ) THEN
296: -- IF (NVL(p_insert_flag, 0) <> 0 )
297: -- OR p_scenario_id = -1

Line 600: x_atp_info.atp_qty(i) := MSC_ATP_PVT.INFINITE_NUMBER;

596: x_atp_info.atp_period.EXTEND;
597:
598: i := x_atp_info.atp_qty.COUNT;
599: x_atp_info.atp_period(i) := l_infinite_time_fence_date;
600: x_atp_info.atp_qty(i) := MSC_ATP_PVT.INFINITE_NUMBER;
601: --x_atp_info.limit_qty(i) := MSC_ATP_PVT.INFINITE_NUMBER;
602:
603: IF NVL(p_insert_flag, 0) <> 0 THEN
604: -- add one more entry to indicate infinite time fence date and quantity.

Line 601: --x_atp_info.limit_qty(i) := MSC_ATP_PVT.INFINITE_NUMBER;

597:
598: i := x_atp_info.atp_qty.COUNT;
599: x_atp_info.atp_period(i) := l_infinite_time_fence_date;
600: x_atp_info.atp_qty(i) := MSC_ATP_PVT.INFINITE_NUMBER;
601: --x_atp_info.limit_qty(i) := MSC_ATP_PVT.INFINITE_NUMBER;
602:
603: IF NVL(p_insert_flag, 0) <> 0 THEN
604: -- add one more entry to indicate infinite time fence date and quantity.
605: x_atp_period.Cumulative_Quantity := x_atp_info.atp_qty;

Line 816: -- This will be called from MSC_ATP_PVT.ATP_Check for forward scheduling instead of Get_Material_Atp_Info

812: END Atp_Alloc_Consume;
813:
814:
815: -- 3/6/2002, added this procedure by copying from MSC_ATP_REQ.Get_Material_Atp_Info
816: -- This will be called from MSC_ATP_PVT.ATP_Check for forward scheduling instead of Get_Material_Atp_Info
817: -- only for Allocated ATP in case forward stealing needs to be done.
818:
819: PROCEDURE Get_Forward_Material_Atp(
820: p_instance_id IN NUMBER,

Line 980: l_pf_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id;

976: */
977: l_round_flag := p_get_mat_in_rec.rounding_control_flag;
978: l_inv_item_id := p_get_mat_in_rec.dest_inv_item_id;
979: -- time_phased_atp
980: l_pf_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id;
981:
982: IF PG_DEBUG in ('Y', 'C') THEN
983: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'l_round_flag = '|| l_round_flag);
984: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'l_inv_item_id = ' || l_inv_item_id);

Line 1039: IF MSC_ATP_PVT.G_MEM_RULE_WITHIN_ATF = 'Y' THEN

1035:
1036: /* New allocation logic for time_phased_atp changes begin */
1037: IF l_time_phased_atp = 'Y' THEN
1038: IF p_requested_date <= p_atf_date THEN
1039: IF MSC_ATP_PVT.G_MEM_RULE_WITHIN_ATF = 'Y' THEN
1040: l_item_to_use := l_inv_item_id;
1041: ELSE
1042: l_item_to_use := l_pf_item_id;
1043: END IF;

Line 1045: IF MSC_ATP_PVT.G_PF_RULE_OUTSIDE_ATF = 'Y' THEN

1041: ELSE
1042: l_item_to_use := l_pf_item_id;
1043: END IF;
1044: ELSE
1045: IF MSC_ATP_PVT.G_PF_RULE_OUTSIDE_ATF = 'Y' THEN
1046: l_item_to_use := l_pf_item_id;
1047: ELSE
1048: l_item_to_use := l_inv_item_id;
1049: END IF;

Line 1062: IF MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 THEN

1058: /* New allocation logic for time_phased_atp changes end */
1059:
1060: BEGIN
1061: -- Changes For bug 2384551 start
1062: IF MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 THEN
1063:
1064: SELECT mv.priority, mv.level_id, mv.class, mv.partner_id
1065: INTO l_priority, l_level_id, l_class, l_partner_id
1066: FROM msc_item_hierarchy_mv mv

Line 1149: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND

1145: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'right before the huge select statement');
1146: END IF;
1147:
1148: -- Check if full summary has been run - for summary enhancement
1149: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND
1150: l_summary_flag NOT IN (MSC_POST_PRO.G_SF_SUMMARY_NOT_RUN, MSC_POST_PRO.G_SF_PREALLOC_COMPLETED,
1151: MSC_POST_PRO.G_SF_FULL_SUMMARY_RUNNING) THEN
1152:
1153: -- time_phased_atp

Line 1456: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'G_PTF_DATE:= ' || MSC_ATP_PVT.G_PTF_DATE);

1452: -- we use this l_atp_requested_date to do the search
1453: l_atp_requested_date := GREATEST(l_requested_date, trunc(l_sys_next_date));
1454:
1455: IF PG_DEBUG in ('Y', 'C') THEN
1456: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'G_PTF_DATE:= ' || MSC_ATP_PVT.G_PTF_DATE);
1457: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'l_atp_requested_date = ' || l_atp_requested_date);
1458: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'p_level = ' || p_level);
1459: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'l_period_tab = ' || l_period_tab.COUNT);
1460: END IF;

Line 1553: GREATEST(l_period_tab(k), MSC_ATP_PVT.G_PTF_DATE, l_atp_requested_date))

1549:
1550: --bug 3443276: We are returning a date previuos to request date
1551: --if that date has an availability. We should be returning atleast request date
1552: IF ( (l_atp_period_tab(m) =
1553: GREATEST(l_period_tab(k), MSC_ATP_PVT.G_PTF_DATE, l_atp_requested_date))
1554: OR ( ( l_atp_period_tab(m) <
1555: GREATEST(MSC_ATP_PVT.G_PTF_DATE, l_period_tab(k), l_atp_requested_date) )
1556: AND ( ( ( m < l_dc_end_index(j) )
1557: AND ( l_atp_period_tab(m+1) >

Line 1555: GREATEST(MSC_ATP_PVT.G_PTF_DATE, l_period_tab(k), l_atp_requested_date) )

1551: --if that date has an availability. We should be returning atleast request date
1552: IF ( (l_atp_period_tab(m) =
1553: GREATEST(l_period_tab(k), MSC_ATP_PVT.G_PTF_DATE, l_atp_requested_date))
1554: OR ( ( l_atp_period_tab(m) <
1555: GREATEST(MSC_ATP_PVT.G_PTF_DATE, l_period_tab(k), l_atp_requested_date) )
1556: AND ( ( ( m < l_dc_end_index(j) )
1557: AND ( l_atp_period_tab(m+1) >
1558: GREATEST(MSC_ATP_PVT.G_PTF_DATE,l_period_tab(k), l_atp_requested_date) )
1559: )

Line 1558: GREATEST(MSC_ATP_PVT.G_PTF_DATE,l_period_tab(k), l_atp_requested_date) )

1554: OR ( ( l_atp_period_tab(m) <
1555: GREATEST(MSC_ATP_PVT.G_PTF_DATE, l_period_tab(k), l_atp_requested_date) )
1556: AND ( ( ( m < l_dc_end_index(j) )
1557: AND ( l_atp_period_tab(m+1) >
1558: GREATEST(MSC_ATP_PVT.G_PTF_DATE,l_period_tab(k), l_atp_requested_date) )
1559: )
1560: OR ( m = l_dc_end_index(j) )
1561: )
1562: )

Line 1627: /* IF l_period_tab(k) >= MSC_ATP_PVT.G_PTF_DATE OR

1623:
1624: --this condition is not needed any more as we check
1625: -- this condition in 'IF' logic to come here
1626:
1627: /* IF l_period_tab(k) >= MSC_ATP_PVT.G_PTF_DATE OR
1628: (k < l_period_tab.count and l_period_tab(k+1) > MSC_ATP_PVT.G_PTF_DATE)
1629: THEN
1630: */
1631: --3443276: we need to return date > req date

Line 1628: (k < l_period_tab.count and l_period_tab(k+1) > MSC_ATP_PVT.G_PTF_DATE)

1624: --this condition is not needed any more as we check
1625: -- this condition in 'IF' logic to come here
1626:
1627: /* IF l_period_tab(k) >= MSC_ATP_PVT.G_PTF_DATE OR
1628: (k < l_period_tab.count and l_period_tab(k+1) > MSC_ATP_PVT.G_PTF_DATE)
1629: THEN
1630: */
1631: --3443276: we need to return date > req date
1632: x_atp_date_this_level := GREATEST(l_period_tab(k),MSC_ATP_PVT.G_PTF_DATE, l_atp_requested_date);

Line 1632: x_atp_date_this_level := GREATEST(l_period_tab(k),MSC_ATP_PVT.G_PTF_DATE, l_atp_requested_date);

1628: (k < l_period_tab.count and l_period_tab(k+1) > MSC_ATP_PVT.G_PTF_DATE)
1629: THEN
1630: */
1631: --3443276: we need to return date > req date
1632: x_atp_date_this_level := GREATEST(l_period_tab(k),MSC_ATP_PVT.G_PTF_DATE, l_atp_requested_date);
1633: IF PG_DEBUG in ('Y', 'C') THEN
1634: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || x_atp_date_quantity_this_level);
1635: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || x_atp_date_this_level);
1636: END IF;

Line 1774: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;

1770: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'x_atf_date_quantity : ' || x_atf_date_quantity);
1771: END IF;
1772: -- Insert pegging record for Supply/ Stealing.
1773:
1774: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;
1775: l_pegging_rec.order_line_id:= MSC_ATP_PVT.G_ORDER_LINE_ID;
1776: l_pegging_rec.organization_id:= p_organization_id;
1777: l_pegging_rec.organization_code := l_org_code;
1778: l_pegging_rec.identifier1:= p_instance_id;

Line 1775: l_pegging_rec.order_line_id:= MSC_ATP_PVT.G_ORDER_LINE_ID;

1771: END IF;
1772: -- Insert pegging record for Supply/ Stealing.
1773:
1774: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;
1775: l_pegging_rec.order_line_id:= MSC_ATP_PVT.G_ORDER_LINE_ID;
1776: l_pegging_rec.organization_id:= p_organization_id;
1777: l_pegging_rec.organization_code := l_org_code;
1778: l_pegging_rec.identifier1:= p_instance_id;
1779: l_pegging_rec.identifier2 := p_plan_id;

Line 1800: l_pegging_rec.component_identifier := MSC_ATP_PVT.G_COMP_LINE_ID;

1796: l_pegging_rec.supplier_name := NULL;
1797: l_pegging_rec.supplier_site_id := NULL;
1798: l_pegging_rec.supplier_site_name := NULL;
1799: l_pegging_rec.scenario_id:= p_scenario_id;
1800: l_pegging_rec.component_identifier := MSC_ATP_PVT.G_COMP_LINE_ID;
1801:
1802: l_pegging_rec.constraint_flag := 'N';
1803:
1804: --- Enhance CTO Phase 1 Req #17

Line 1834: l_atp_rec.demand_source_line := MSC_ATP_PVT.G_COMP_LINE_ID ;

1830: l_atp_rec.atf_date_quantity := x_atf_date_quantity;
1831: -- time_phased_atp changes end
1832:
1833: l_atp_rec.organization_id := p_organization_id;
1834: l_atp_rec.demand_source_line := MSC_ATP_PVT.G_COMP_LINE_ID ;
1835: l_atp_rec.instance_id := p_instance_id;
1836: l_atp_rec.demand_class := p_demand_class;
1837: l_atp_rec.refresh_number := p_refresh_number;
1838: l_atp_rec.order_number := p_order_number;

Line 1883: l_pegging_rec.pegging_type := MSC_ATP_PVT.ORG_DEMAND;

1879: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'l_pegging_rec.supply_demand_date:= : ' || p_requested_date);
1880: END IF;
1881:
1882: --diag_atp
1883: l_pegging_rec.pegging_type := MSC_ATP_PVT.ORG_DEMAND;
1884: l_pegging_rec.dest_inv_item_id := l_inv_item_id;
1885: l_pegging_rec.summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG; -- for summary enhancement
1886: l_pegging_rec.required_date := p_requested_date;
1887: --bug 3328421:

Line 1885: l_pegging_rec.summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG; -- for summary enhancement

1881:
1882: --diag_atp
1883: l_pegging_rec.pegging_type := MSC_ATP_PVT.ORG_DEMAND;
1884: l_pegging_rec.dest_inv_item_id := l_inv_item_id;
1885: l_pegging_rec.summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG; -- for summary enhancement
1886: l_pegging_rec.required_date := p_requested_date;
1887: --bug 3328421:
1888: l_pegging_rec.actual_supply_demand_date := p_requested_date;
1889: l_pegging_rec.demand_class := p_demand_class;

Line 1901: MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG := l_demand_pegging_id;

1897:
1898: --s_cto_rearch: pass demand pegg back just in case PO date is better than Sch. rec. date
1899: x_get_mat_out_rec.demand_pegging_id := l_demand_pegging_id;
1900:
1901: MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG := l_demand_pegging_id;
1902: IF PG_DEBUG in ('Y', 'C') THEN
1903: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'after Add_Pegging : ' || l_demand_pegging_id);
1904: END IF;
1905:

Line 1919: l_pegging_rec.parent_pegging_id:= MSC_ATP_PVT.G_DEMAND_PEGGING_ID;

1915: --- Enhance CTO Phase 1 Req #17
1916: -- Support Forward Stealing for components of ATO model in
1917: -- Model's sourcing organization.
1918: IF NVL(p_parent_pegging_id, 0) = 0 THEN
1919: l_pegging_rec.parent_pegging_id:= MSC_ATP_PVT.G_DEMAND_PEGGING_ID;
1920: l_pegging_rec.atp_level:= p_level + 1;
1921: ELSE
1922: -- Stealing may happen at lower levels also
1923: -- not just for the requested item in MATO cases.

Line 1931: l_pegging_rec.supply_demand_source_type:= MSC_ATP_PVT.ATP;

1927: END IF;
1928: --- End Enhance CTO Phase 1 Req #17
1929: l_pegging_rec.identifier3 := NULL;
1930: l_pegging_rec.supply_demand_type:= 2;
1931: l_pegging_rec.supply_demand_source_type:= MSC_ATP_PVT.ATP;
1932: l_pegging_rec.source_type := 0;
1933:
1934: IF x_atp_date_this_level IS NULL THEN
1935:

Line 1943: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;

1939:
1940: l_stealing_flag := 'N';
1941: --x_requested_date_quantity := 0;
1942: x_atp_date_this_level := TRUNC(l_infinite_time_fence_date);
1943: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;
1944:
1945: IF PG_DEBUG in ('Y', 'C') THEN
1946: msc_sch_wb.atp_debug('Get_Forward_Material_Atp: ' || 'before IF');
1947: END IF;

Line 1990: l_pegging_rec.summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG; -- for summary enhancement

1986: l_pegging_rec.inventory_item_name := p_family_item_name;
1987: END IF;
1988: -- time_phased_atp changes end
1989:
1990: l_pegging_rec.summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG; -- for summary enhancement
1991: l_pegging_rec.required_date := p_requested_date;
1992: --bug3328421
1993: l_pegging_rec.actual_supply_demand_date := x_atp_date_this_level;
1994: l_pegging_rec.constraint_type := 1;

Line 2140: l_pegging_rec.atp_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_flag;

2136: END IF;
2137: l_pegging_rec.infinite_time_fence := l_infinite_time_fence_date;
2138: l_pegging_rec.atp_rule_name := x_get_mat_out_rec.atp_rule_name;
2139: l_pegging_rec.rounding_control := l_round_flag;
2140: l_pegging_rec.atp_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_flag;
2141: l_pegging_rec.atp_component_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_comp_flag;
2142: l_pegging_rec.pegging_type := MSC_ATP_PVT.ATP_SUPPLY; ---atp supply node
2143: l_pegging_rec.postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;

Line 2141: l_pegging_rec.atp_component_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_comp_flag;

2137: l_pegging_rec.infinite_time_fence := l_infinite_time_fence_date;
2138: l_pegging_rec.atp_rule_name := x_get_mat_out_rec.atp_rule_name;
2139: l_pegging_rec.rounding_control := l_round_flag;
2140: l_pegging_rec.atp_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_flag;
2141: l_pegging_rec.atp_component_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_comp_flag;
2142: l_pegging_rec.pegging_type := MSC_ATP_PVT.ATP_SUPPLY; ---atp supply node
2143: l_pegging_rec.postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;
2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;

Line 2142: l_pegging_rec.pegging_type := MSC_ATP_PVT.ATP_SUPPLY; ---atp supply node

2138: l_pegging_rec.atp_rule_name := x_get_mat_out_rec.atp_rule_name;
2139: l_pegging_rec.rounding_control := l_round_flag;
2140: l_pegging_rec.atp_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_flag;
2141: l_pegging_rec.atp_component_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_comp_flag;
2142: l_pegging_rec.pegging_type := MSC_ATP_PVT.ATP_SUPPLY; ---atp supply node
2143: l_pegging_rec.postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;
2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;
2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;

Line 2143: l_pegging_rec.postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;

2139: l_pegging_rec.rounding_control := l_round_flag;
2140: l_pegging_rec.atp_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_flag;
2141: l_pegging_rec.atp_component_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_comp_flag;
2142: l_pegging_rec.pegging_type := MSC_ATP_PVT.ATP_SUPPLY; ---atp supply node
2143: l_pegging_rec.postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;
2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;
2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;
2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;

Line 2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;

2140: l_pegging_rec.atp_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_flag;
2141: l_pegging_rec.atp_component_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_comp_flag;
2142: l_pegging_rec.pegging_type := MSC_ATP_PVT.ATP_SUPPLY; ---atp supply node
2143: l_pegging_rec.postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;
2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;
2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;
2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;
2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;

Line 2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;

2141: l_pegging_rec.atp_component_flag := MSC_ATP_PVT.G_ITEM_INFO_REC.atp_comp_flag;
2142: l_pegging_rec.pegging_type := MSC_ATP_PVT.ATP_SUPPLY; ---atp supply node
2143: l_pegging_rec.postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;
2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;
2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;
2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;
2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;
2149: l_pegging_rec.weight_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;

Line 2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;

2142: l_pegging_rec.pegging_type := MSC_ATP_PVT.ATP_SUPPLY; ---atp supply node
2143: l_pegging_rec.postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;
2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;
2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;
2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;
2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;
2149: l_pegging_rec.weight_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;
2150: l_pegging_rec.volume_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.volume_uom;

Line 2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;

2143: l_pegging_rec.postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;
2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;
2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;
2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;
2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;
2149: l_pegging_rec.weight_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;
2150: l_pegging_rec.volume_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.volume_uom;
2151: l_pegging_rec.allocation_rule := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;

Line 2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;

2144: l_pegging_rec.preprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.post_pro_lt;
2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;
2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;
2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;
2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;
2149: l_pegging_rec.weight_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;
2150: l_pegging_rec.volume_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.volume_uom;
2151: l_pegging_rec.allocation_rule := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
2152: l_pegging_rec.substitution_window := MSC_ATP_PVT.G_ITEM_INFO_REC.substitution_window;

Line 2149: l_pegging_rec.weight_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;

2145: l_pegging_rec.fixed_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.fixed_lt;
2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;
2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;
2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;
2149: l_pegging_rec.weight_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;
2150: l_pegging_rec.volume_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.volume_uom;
2151: l_pegging_rec.allocation_rule := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
2152: l_pegging_rec.substitution_window := MSC_ATP_PVT.G_ITEM_INFO_REC.substitution_window;
2153:

Line 2150: l_pegging_rec.volume_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.volume_uom;

2146: l_pegging_rec.variable_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.variable_lt;
2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;
2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;
2149: l_pegging_rec.weight_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;
2150: l_pegging_rec.volume_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.volume_uom;
2151: l_pegging_rec.allocation_rule := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
2152: l_pegging_rec.substitution_window := MSC_ATP_PVT.G_ITEM_INFO_REC.substitution_window;
2153:
2154:

Line 2151: l_pegging_rec.allocation_rule := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;

2147: l_pegging_rec.weight_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;
2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;
2149: l_pegging_rec.weight_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;
2150: l_pegging_rec.volume_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.volume_uom;
2151: l_pegging_rec.allocation_rule := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
2152: l_pegging_rec.substitution_window := MSC_ATP_PVT.G_ITEM_INFO_REC.substitution_window;
2153:
2154:
2155: l_pegging_rec.summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG; -- for summary enhancement

Line 2152: l_pegging_rec.substitution_window := MSC_ATP_PVT.G_ITEM_INFO_REC.substitution_window;

2148: l_pegging_rec.volume_capacity := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_volume;
2149: l_pegging_rec.weight_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;
2150: l_pegging_rec.volume_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.volume_uom;
2151: l_pegging_rec.allocation_rule := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
2152: l_pegging_rec.substitution_window := MSC_ATP_PVT.G_ITEM_INFO_REC.substitution_window;
2153:
2154:
2155: l_pegging_rec.summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG; -- for summary enhancement
2156: l_pegging_rec.required_date := p_requested_date;

Line 2155: l_pegging_rec.summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG; -- for summary enhancement

2151: l_pegging_rec.allocation_rule := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
2152: l_pegging_rec.substitution_window := MSC_ATP_PVT.G_ITEM_INFO_REC.substitution_window;
2153:
2154:
2155: l_pegging_rec.summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG; -- for summary enhancement
2156: l_pegging_rec.required_date := p_requested_date;
2157: l_pegging_rec.model_sd_flag := 2;
2158: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, x_atp_pegging_tab(i));
2159:

Line 2170: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;

2166: EXCEPTION
2167: WHEN NO_DATA_FOUND THEN
2168: x_requested_date_quantity := 0.0;
2169: x_atp_date_this_level := TRUNC(l_infinite_time_fence_date);
2170: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;
2171:
2172: IF PG_DEBUG in ('Y', 'C') THEN
2173: msc_sch_wb.atp_debug('Get_Forward_Material_Atp, no data found');
2174: END IF;

Line 2175: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705

2171:
2172: IF PG_DEBUG in ('Y', 'C') THEN
2173: msc_sch_wb.atp_debug('Get_Forward_Material_Atp, no data found');
2174: END IF;
2175: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
2176: x_requested_date_quantity := 0.0;
2177: x_atp_date_this_level := TRUNC(l_infinite_time_fence_date);
2178: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;
2179: IF PG_DEBUG in ('Y', 'C') THEN

Line 2178: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;

2174: END IF;
2175: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
2176: x_requested_date_quantity := 0.0;
2177: x_atp_date_this_level := TRUNC(l_infinite_time_fence_date);
2178: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;
2179: IF PG_DEBUG in ('Y', 'C') THEN
2180: msc_sch_wb.atp_debug('MAtching cal date not found, in atp_check');
2181: END IF;
2182: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;

Line 2182: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;

2178: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;
2179: IF PG_DEBUG in ('Y', 'C') THEN
2180: msc_sch_wb.atp_debug('MAtching cal date not found, in atp_check');
2181: END IF;
2182: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
2183: WHEN OTHERS THEN
2184: IF PG_DEBUG in ('Y', 'C') THEN
2185: msc_sch_wb.atp_debug('Get_Forward_Material_Atp, sqlcode= '||sqlcode);
2186: msc_sch_wb.atp_debug('Get_Forward_Material_Atp, sqlerrm= '||sqlerrm);

Line 2190: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;

2186: msc_sch_wb.atp_debug('Get_Forward_Material_Atp, sqlerrm= '||sqlerrm);
2187: END IF;
2188: x_requested_date_quantity := 0.0;
2189: x_atp_date_this_level := TRUNC(l_infinite_time_fence_date);
2190: x_atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;
2191: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2192:
2193: /*IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
2194: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME , 'Get_Forward_Material_Atp');