DBA Data[Home] [Help]

APPS.MSC_ATP_REQ dependencies on MSC_ATP_REQ

Line 1: PACKAGE BODY MSC_ATP_REQ AS

1: PACKAGE BODY MSC_ATP_REQ AS
2: /* $Header: MSCRATPB.pls 120.48 2011/12/06 10:08:10 vjuluri ship $ */
3: G_PKG_NAME CONSTANT VARCHAR2(30) := 'MSC_ATP_REQ';
4:
5: PG_DEBUG varchar2(1) := NVL(FND_PROFILE.value('MSC_ATP_DEBUG'), 'N');

Line 3: G_PKG_NAME CONSTANT VARCHAR2(30) := 'MSC_ATP_REQ';

1: PACKAGE BODY MSC_ATP_REQ AS
2: /* $Header: MSCRATPB.pls 120.48 2011/12/06 10:08:10 vjuluri ship $ */
3: G_PKG_NAME CONSTANT VARCHAR2(30) := 'MSC_ATP_REQ';
4:
5: PG_DEBUG varchar2(1) := NVL(FND_PROFILE.value('MSC_ATP_DEBUG'), 'N');
6:
7: -- The resource functions will perform atp_consume and add the infinite time

Line 3862: l_substitutes_rec OUT NoCopy MSC_ATP_REQ.get_subs_out_rec,--5216528

3858: p_quantity IN NUMBER,
3859: l_net_demand IN OUT NoCopy NUMBER,
3860: l_supply_demand IN OUT NoCopy MRP_ATP_PUB.ATP_Supply_Demand_Typ,
3861: l_atp_period IN OUT NoCopy MRP_ATP_PUB.ATP_Period_Typ,
3862: l_substitutes_rec OUT NoCopy MSC_ATP_REQ.get_subs_out_rec,--5216528
3863: l_return_status OUT NoCopy varchar2,
3864: p_refresh_number IN NUMBER) -- For summary enhancement
3865: IS
3866: /* Bug 4741012 changed the cursor.

Line 4021: L_GET_MAT_IN_REC MSC_ATP_REQ.GET_MAT_IN_REC;

4017: l_summary_flag varchar2(1);
4018: l_plan_info_rec MSC_ATP_PVT.plan_info_rec; -- added for bug 2392456
4019:
4020: --diag_atp
4021: L_GET_MAT_IN_REC MSC_ATP_REQ.GET_MAT_IN_REC;
4022: l_get_mat_out_rec MSC_ATP_REQ.get_mat_out_rec;
4023: l_post_pro_lt number;
4024: l_pre_pro_lt number;
4025: l_process_lt number;

Line 4022: l_get_mat_out_rec MSC_ATP_REQ.get_mat_out_rec;

4018: l_plan_info_rec MSC_ATP_PVT.plan_info_rec; -- added for bug 2392456
4019:
4020: --diag_atp
4021: L_GET_MAT_IN_REC MSC_ATP_REQ.GET_MAT_IN_REC;
4022: l_get_mat_out_rec MSC_ATP_REQ.get_mat_out_rec;
4023: l_post_pro_lt number;
4024: l_pre_pro_lt number;
4025: l_process_lt number;
4026: l_fixed_lt number;

Line 4050: x_substitutes_rec MSC_ATP_REQ.get_subs_out_rec;-- 5216528/5216528

4046: l_component_yield_factor NUMBER;
4047: l_lot_fail NUMBER := 0;
4048: l_usage_qty NUMBER; --4775920
4049: l_index NUMBER := 2; --5216528 as it points to substitutes/ 5216528
4050: x_substitutes_rec MSC_ATP_REQ.get_subs_out_rec;-- 5216528/5216528
4051: l_item_info_rec MSC_ATP_PVT.item_attribute_rec; --5147647
4052:
4053:
4054: -- ATP4drp Bug 3986053, 4052808

Line 4380: MSC_ATP_REQ.Get_Material_Atp_Info(

4376: l_mat_atp_info_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
4377: l_mat_atp_info_rec.usage_qty := p_atp_record.usage_qty; --4775920
4378: l_mat_atp_info_rec.organization_type := p_atp_record.organization_type; --4775920
4379:
4380: MSC_ATP_REQ.Get_Material_Atp_Info(
4381: l_mat_atp_info_rec,
4382: g_atp_period,
4383: g_atp_supply_demand,
4384: l_return_status);

Line 4740: L_GET_MAT_IN_REC MSC_ATP_REQ.GET_MAT_IN_REC;

4736:
4737: l_org_code VARCHAR2(7);
4738:
4739: --diag_atp
4740: L_GET_MAT_IN_REC MSC_ATP_REQ.GET_MAT_IN_REC;
4741:
4742: -- for summary enhancement
4743: l_summary_flag NUMBER := -1; -- Bug 3813302 - Initiallize the variable.
4744:

Line 5052: MSC_ATP_REQ.Insert_Details(p_mat_atp_info_rec.instance_id,

5048:
5049: l_get_mat_in_rec.infinite_time_fence_date := l_infinite_time_fence_date;
5050: l_get_mat_in_rec.dest_inv_item_id := p_mat_atp_info_rec.dest_inv_item_id;
5051:
5052: MSC_ATP_REQ.Insert_Details(p_mat_atp_info_rec.instance_id,
5053: p_mat_atp_info_rec.plan_id,
5054: p_mat_atp_info_rec.level,
5055: p_mat_atp_info_rec.identifier,
5056: p_mat_atp_info_rec.scenario_id,

Line 5337: p_get_mat_in_rec In MSC_ATP_REQ.get_mat_in_rec,

5333: p_insert_flag IN NUMBER,
5334: x_atp_period OUT NOCOPY MRP_ATP_PUB.ATP_Period_Typ,
5335: x_atp_supply_demand OUT NOCOPY MRP_ATP_PUB.ATP_Supply_Demand_Typ,
5336: x_return_status OUT NoCopy VARCHAR2,
5337: p_get_mat_in_rec In MSC_ATP_REQ.get_mat_in_rec,
5338: p_atf_date IN DATE -- For time_phased_atp
5339: )
5340:
5341: IS

Line 9118: p_comp_info_rec IN OUT NOCOPY MSC_ATP_REQ.get_comp_info_rec,

9114: x_atp_date OUT NoCopy DATE,
9115: x_atp_period OUT NOCOPY MRP_ATP_PUB.ATP_Period_Typ,
9116: x_atp_supply_demand OUT NOCOPY MRP_ATP_PUB.ATP_Supply_Demand_Typ,
9117: x_return_status OUT NoCopy VARCHAR2,
9118: p_comp_info_rec IN OUT NOCOPY MSC_ATP_REQ.get_comp_info_rec,
9119: p_order_number IN NUMBER := NULL,
9120: p_op_seq_id IN NUMBER --4570421
9121: -- Add new parameter with default value to support creation of
9122: -- Sales Orders for CTO components in a MATO case.

Line 9662: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_comp_requirements);

9658: l_item_info_rec);
9659: IF p_comp_info_rec.check_model_capacity_flag = 1 THEN
9660: --check model's capacity. Add model to comp array
9661:
9662: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_comp_requirements);
9663:
9664: l_comp_requirements.inventory_item_id(1) := MSC_ATP_PF.Get_PF_Atp_Item_Id(
9665: p_instance_id,
9666: -1, -- plan_id

Line 9700: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_explode_comp);

9696: -- assign this assembly into the l_explode_comp record of tables.
9697: -- we will loop through this l_explode_comp to do the explosion.
9698: -- And we will add phantom item into this l_explode_comp so that
9699: -- we can explode through phantom.
9700: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_explode_comp);
9701:
9702: l_explode_comp.inventory_item_id(1) := p_inventory_item_id;
9703:
9704: -- I used this comp_usaget to store the required quantity at this level.

Line 9798: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_comp_requirements);

9794: IF PG_DEBUG in ('Y', 'C') THEN
9795: msc_sch_wb.atp_debug('Add this line to comp requirements table');
9796: END IF;
9797: --first extend the record
9798: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_comp_requirements);
9799:
9800: --now add the model iteself
9801: --l_comp_requirements.inventory_item_id(1) := p_inventory_item_id;
9802: /* time_phased_atp changes begin

Line 10114: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,

10110: l_atp_comp_rec.atp_components_flag := l_mand_comp_info_rec.atp_components_flag(l_cto_count);
10111: l_atp_comp_rec.dest_inventory_item_id := l_mand_comp_info_rec.dest_inventory_item_id(l_cto_count);
10112: l_atp_comp_rec.parent_repl_ord_flag := NVL(p_comp_info_rec.replenish_to_order_flag, 'N');
10113: l_atp_comp_rec.comp_uom := l_mand_comp_info_rec.uom_code(l_cto_count); --bug3110023
10114: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,
10115: l_comp_requirements,
10116: l_atp_comp_rec);
10117:
10118:

Line 10321: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,

10317: l_atp_comp_rec.model_flag := l_model_flag;
10318: l_atp_comp_rec.requested_quantity := p_requested_quantity;
10319: l_atp_comp_rec.parent_repl_ord_flag := NVL(p_comp_info_rec.replenish_to_order_flag, 'N');
10320: l_atp_comp_rec.comp_uom := l_comp_uom; --bug3110023
10321: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,
10322: l_comp_requirements,
10323: l_atp_comp_rec);
10324:
10325:

Line 10392: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,

10388: l_atp_comp_rec.comp_uom := l_cto_bom_rec.comp_uom(l_cto_count); --bug3110023
10389: l_atp_comp_rec.usage_qty := l_cto_bom_rec.usage_qty(l_cto_count); --4775920
10390: l_atp_comp_rec.organization_type := l_cto_bom_rec.organization_type(l_cto_count); --4775920
10391:
10392: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,
10393: l_comp_requirements,
10394: l_atp_comp_rec);
10395:
10396: END LOOP;

Line 11141: p_sup_atp_info_rec IN OUT NOCOPY MSC_ATP_REQ.Atp_Info_Rec,

11137:
11138: /* Spec changes as part of ship_rec_cal changes
11139: Various input output parameters grouped in the record Atp_Info_Rec*/
11140: PROCEDURE Get_Supplier_Atp_Info (
11141: p_sup_atp_info_rec IN OUT NOCOPY MSC_ATP_REQ.Atp_Info_Rec,
11142: x_atp_period OUT NOCOPY MRP_ATP_PUB.ATP_Period_Typ,
11143: x_atp_supply_demand OUT NOCOPY MRP_ATP_PUB.ATP_Supply_Demand_Typ,
11144: x_return_status OUT NOCOPY VARCHAR2
11145: )

Line 11236: MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE := NVL(FND_PROFILE.VALUE('MSC_PO_DOCK_DATE_CALC_PREF'), 2);

11232:
11233: l_requested_date := trunc(p_sup_atp_info_rec.requested_date);
11234:
11235: ---profile option for including purchase order
11236: MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE := NVL(FND_PROFILE.VALUE('MSC_PO_DOCK_DATE_CALC_PREF'), 2);
11237:
11238: -- Instead re-assigned local values using global variable
11239: l_uom_code := MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code;
11240: l_postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;

Line 11561: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE

11557: (NVL(p.implement_quantity,0) - p.new_order_quantity) quantity
11558: FROM msc_supplies p,
11559: msc_plans pl -- For summary enhancement
11560: WHERE (p.order_type IN (5, 2,60)
11561: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11562: AND p.order_type = 1 AND p.promised_date IS NULL))
11563: AND p.plan_id = p_sup_atp_info_rec.plan_id
11564: AND p.sr_instance_id = p_sup_atp_info_rec.instance_id
11565: AND p.supplier_id = p_sup_atp_info_rec.supplier_id

Line 11619: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE

11615: (NVL(p.implement_quantity,0) - p.new_order_quantity) quantity
11616: FROM msc_supplies p,
11617: msc_plans pl -- For summary enhancement
11618: WHERE (p.order_type IN (5, 2, 60)
11619: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11620: AND p.order_type = 1 AND p.promised_date IS NULL))
11621: AND p.plan_id = p_sup_atp_info_rec.plan_id
11622: AND p.sr_instance_id = p_sup_atp_info_rec.instance_id
11623: AND p.inventory_item_id = p_sup_atp_info_rec.inventory_item_id

Line 11701: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE

11697: (NVL(p.implement_quantity,0) - p.new_order_quantity) quantity
11698: FROM msc_supplies p
11699: WHERE (p.order_type IN (5, 2, 60)
11700: --include purchase orders based on profile option
11701: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11702: AND p.order_type = 1 AND p.promised_date IS NULL))
11703: -- Supplier Capacity (SCLT) Accumulation Ignore Purchase Orders
11704: -- WHERE p.order_type IN (5, 1, 2)
11705: AND p.plan_id = p_sup_atp_info_rec.plan_id

Line 11787: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE

11783: (NVL(p.implement_quantity,0) - p.new_order_quantity) quantity
11784: FROM msc_supplies p
11785: WHERE (p.order_type IN (5, 2, 60)
11786: --include purchase orders based on profile option
11787: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11788: AND p.order_type = 1 AND p.promised_date IS NULL))
11789: -- Supplier Capacity (SCLT) Accumulation Ignore Purchase Orders
11790: -- WHERE p.order_type IN (5, 1, 2)
11791: AND p.plan_id = p_sup_atp_info_rec.plan_id

Line 11971: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE

11967: -- Supplier Capacity (SCLT) Changes Begin
11968: FROM msc_supplies p
11969: WHERE (p.order_type IN (5, 2, 60)
11970: --include purchase orders based on profile option
11971: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11972: AND p.order_type = 1 AND p.promised_date IS NULL))
11973: -- Supplier Capacity (SCLT) Accumulation Ignore Purchase Orders
11974: -- WHERE p.order_type IN (5, 1, 2)
11975: AND p.plan_id = p_sup_atp_info_rec.plan_id

Line 12141: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE

12137: -- Supplier Capacity (SCLT) Changes Begin
12138: FROM msc_supplies p
12139: WHERE (p.order_type IN (5, 2, 60)
12140: --include purchase orders based on profile option
12141: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
12142: AND p.order_type = 1 AND p.promised_date IS NULL))
12143: -- Supplier Capacity (SCLT) Accumulation Ignore Purchase Orders
12144: -- WHERE p.order_type IN (5, 1, 2)
12145: AND p.plan_id = p_sup_atp_info_rec.plan_id

Line 13608: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_explode_comp_rec);

13604: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'in side phantom, count = '||j);
13605: msc_sch_wb.atp_debug('Add_To_Comp_List: Count in explode comp := ' || p_explode_comp_rec.inventory_item_id.count);
13606: END IF;
13607:
13608: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_explode_comp_rec);
13609:
13610: IF PG_DEBUG in ('Y', 'C') THEN
13611: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'after extend');
13612: END IF;

Line 13666: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_component_rec);

13662: IF PG_DEBUG in ('Y', 'C') THEN
13663: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'not phantom, j='||j);
13664: END IF;
13665:
13666: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_component_rec);
13667:
13668: p_component_rec.inventory_item_id(j+1):= p_atp_comp_rec.inventory_item_id;
13669: /* time_phased_atp changes begin
13670: Support PF ATP for components*/

Line 13735: END MSC_ATP_REQ;

13731: END Add_To_Comp_List;
13732: ---e_cto_rearch
13733:
13734:
13735: END MSC_ATP_REQ;