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.29.12010000.2 2008/08/25 10:43:20 sbnaik 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.29.12010000.2 2008/08/25 10:43:20 sbnaik 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 9114: p_comp_info_rec IN OUT NOCOPY MSC_ATP_REQ.get_comp_info_rec,

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

Line 9656: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_comp_requirements);

9652: l_item_info_rec);
9653: IF p_comp_info_rec.check_model_capacity_flag = 1 THEN
9654: --check model's capacity. Add model to comp array
9655:
9656: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_comp_requirements);
9657:
9658: l_comp_requirements.inventory_item_id(1) := MSC_ATP_PF.Get_PF_Atp_Item_Id(
9659: p_instance_id,
9660: -1, -- plan_id

Line 9694: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_explode_comp);

9690: -- assign this assembly into the l_explode_comp record of tables.
9691: -- we will loop through this l_explode_comp to do the explosion.
9692: -- And we will add phantom item into this l_explode_comp so that
9693: -- we can explode through phantom.
9694: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_explode_comp);
9695:
9696: l_explode_comp.inventory_item_id(1) := p_inventory_item_id;
9697:
9698: -- I used this comp_usaget to store the required quantity at this level.

Line 9792: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_comp_requirements);

9788: IF PG_DEBUG in ('Y', 'C') THEN
9789: msc_sch_wb.atp_debug('Add this line to comp requirements table');
9790: END IF;
9791: --first extend the record
9792: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_comp_requirements);
9793:
9794: --now add the model iteself
9795: --l_comp_requirements.inventory_item_id(1) := p_inventory_item_id;
9796: /* time_phased_atp changes begin

Line 10106: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,

10102: l_atp_comp_rec.atp_components_flag := l_mand_comp_info_rec.atp_components_flag(l_cto_count);
10103: l_atp_comp_rec.dest_inventory_item_id := l_mand_comp_info_rec.dest_inventory_item_id(l_cto_count);
10104: l_atp_comp_rec.parent_repl_ord_flag := NVL(p_comp_info_rec.replenish_to_order_flag, 'N');
10105: l_atp_comp_rec.comp_uom := l_mand_comp_info_rec.uom_code(l_cto_count); --bug3110023
10106: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,
10107: l_comp_requirements,
10108: l_atp_comp_rec);
10109:
10110:

Line 10313: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,

10309: l_atp_comp_rec.model_flag := l_model_flag;
10310: l_atp_comp_rec.requested_quantity := p_requested_quantity;
10311: l_atp_comp_rec.parent_repl_ord_flag := NVL(p_comp_info_rec.replenish_to_order_flag, 'N');
10312: l_atp_comp_rec.comp_uom := l_comp_uom; --bug3110023
10313: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,
10314: l_comp_requirements,
10315: l_atp_comp_rec);
10316:
10317:

Line 10377: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,

10373: l_atp_comp_rec.comp_uom := l_cto_bom_rec.comp_uom(l_cto_count); --bug3110023
10374: l_atp_comp_rec.usage_qty := l_cto_bom_rec.usage_qty(l_cto_count); --4775920
10375: l_atp_comp_rec.organization_type := l_cto_bom_rec.organization_type(l_cto_count); --4775920
10376:
10377: MSC_ATP_REQ.Add_To_Comp_List(l_explode_comp,
10378: l_comp_requirements,
10379: l_atp_comp_rec);
10380:
10381: END LOOP;

Line 11116: p_sup_atp_info_rec IN OUT NOCOPY MSC_ATP_REQ.Atp_Info_Rec,

11112:
11113: /* Spec changes as part of ship_rec_cal changes
11114: Various input output parameters grouped in the record Atp_Info_Rec*/
11115: PROCEDURE Get_Supplier_Atp_Info (
11116: p_sup_atp_info_rec IN OUT NOCOPY MSC_ATP_REQ.Atp_Info_Rec,
11117: x_atp_period OUT NOCOPY MRP_ATP_PUB.ATP_Period_Typ,
11118: x_atp_supply_demand OUT NOCOPY MRP_ATP_PUB.ATP_Supply_Demand_Typ,
11119: x_return_status OUT NOCOPY VARCHAR2
11120: )

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

11207:
11208: l_requested_date := trunc(p_sup_atp_info_rec.requested_date);
11209:
11210: ---profile option for including purchase order
11211: MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE := NVL(FND_PROFILE.VALUE('MSC_PO_DOCK_DATE_CALC_PREF'), 2);
11212:
11213: -- Instead re-assigned local values using global variable
11214: l_uom_code := MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code;
11215: l_postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;

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

11524: (NVL(p.implement_quantity,0) - p.new_order_quantity) quantity
11525: FROM msc_supplies p,
11526: msc_plans pl -- For summary enhancement
11527: WHERE (p.order_type IN (5, 2,60)
11528: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11529: AND p.order_type = 1 AND p.promised_date IS NULL))
11530: AND p.plan_id = p_sup_atp_info_rec.plan_id
11531: AND p.sr_instance_id = p_sup_atp_info_rec.instance_id
11532: AND p.supplier_id = p_sup_atp_info_rec.supplier_id

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

11582: (NVL(p.implement_quantity,0) - p.new_order_quantity) quantity
11583: FROM msc_supplies p,
11584: msc_plans pl -- For summary enhancement
11585: WHERE (p.order_type IN (5, 2, 60)
11586: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11587: AND p.order_type = 1 AND p.promised_date IS NULL))
11588: AND p.plan_id = p_sup_atp_info_rec.plan_id
11589: AND p.sr_instance_id = p_sup_atp_info_rec.instance_id
11590: AND p.inventory_item_id = p_sup_atp_info_rec.inventory_item_id

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

11664: (NVL(p.implement_quantity,0) - p.new_order_quantity) quantity
11665: FROM msc_supplies p
11666: WHERE (p.order_type IN (5, 2, 60)
11667: --include purchase orders based on profile option
11668: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11669: AND p.order_type = 1 AND p.promised_date IS NULL))
11670: -- Supplier Capacity (SCLT) Accumulation Ignore Purchase Orders
11671: -- WHERE p.order_type IN (5, 1, 2)
11672: AND p.plan_id = p_sup_atp_info_rec.plan_id

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

11750: (NVL(p.implement_quantity,0) - p.new_order_quantity) quantity
11751: FROM msc_supplies p
11752: WHERE (p.order_type IN (5, 2, 60)
11753: --include purchase orders based on profile option
11754: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11755: AND p.order_type = 1 AND p.promised_date IS NULL))
11756: -- Supplier Capacity (SCLT) Accumulation Ignore Purchase Orders
11757: -- WHERE p.order_type IN (5, 1, 2)
11758: AND p.plan_id = p_sup_atp_info_rec.plan_id

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

11934: -- Supplier Capacity (SCLT) Changes Begin
11935: FROM msc_supplies p
11936: WHERE (p.order_type IN (5, 2, 60)
11937: --include purchase orders based on profile option
11938: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
11939: AND p.order_type = 1 AND p.promised_date IS NULL))
11940: -- Supplier Capacity (SCLT) Accumulation Ignore Purchase Orders
11941: -- WHERE p.order_type IN (5, 1, 2)
11942: AND p.plan_id = p_sup_atp_info_rec.plan_id

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

12104: -- Supplier Capacity (SCLT) Changes Begin
12105: FROM msc_supplies p
12106: WHERE (p.order_type IN (5, 2, 60)
12107: --include purchase orders based on profile option
12108: OR (MSC_ATP_REQ.G_PURCHASE_ORDER_PREFERENCE = MSC_ATP_REQ.G_PROMISE_DATE
12109: AND p.order_type = 1 AND p.promised_date IS NULL))
12110: -- Supplier Capacity (SCLT) Accumulation Ignore Purchase Orders
12111: -- WHERE p.order_type IN (5, 1, 2)
12112: AND p.plan_id = p_sup_atp_info_rec.plan_id

Line 13575: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_explode_comp_rec);

13571: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'in side phantom, count = '||j);
13572: msc_sch_wb.atp_debug('Add_To_Comp_List: Count in explode comp := ' || p_explode_comp_rec.inventory_item_id.count);
13573: END IF;
13574:
13575: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_explode_comp_rec);
13576:
13577: IF PG_DEBUG in ('Y', 'C') THEN
13578: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'after extend');
13579: END IF;

Line 13633: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_component_rec);

13629: IF PG_DEBUG in ('Y', 'C') THEN
13630: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'not phantom, j='||j);
13631: END IF;
13632:
13633: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_component_rec);
13634:
13635: p_component_rec.inventory_item_id(j+1):= p_atp_comp_rec.inventory_item_id;
13636: /* time_phased_atp changes begin
13637: Support PF ATP for components*/

Line 13702: END MSC_ATP_REQ;

13698: END Add_To_Comp_List;
13699: ---e_cto_rearch
13700:
13701:
13702: END MSC_ATP_REQ;