228:
229: ) IS
230:
231: l_session_id NUMBER := 0;
232: l_mrp_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
233: l_atp_supply_demand MRP_ATP_PUB.ATP_Supply_Demand_Typ;
234: l_atp_period MRP_ATP_PUB.ATP_Period_Typ;
235: l_atp_details MRP_ATP_PUB.ATP_Details_Typ;
236: x_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
229: ) IS
230:
231: l_session_id NUMBER := 0;
232: l_mrp_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
233: l_atp_supply_demand MRP_ATP_PUB.ATP_Supply_Demand_Typ;
234: l_atp_period MRP_ATP_PUB.ATP_Period_Typ;
235: l_atp_details MRP_ATP_PUB.ATP_Details_Typ;
236: x_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
237: in_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
230:
231: l_session_id NUMBER := 0;
232: l_mrp_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
233: l_atp_supply_demand MRP_ATP_PUB.ATP_Supply_Demand_Typ;
234: l_atp_period MRP_ATP_PUB.ATP_Period_Typ;
235: l_atp_details MRP_ATP_PUB.ATP_Details_Typ;
236: x_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
237: in_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
238: I NUMBER := 1;
231: l_session_id NUMBER := 0;
232: l_mrp_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
233: l_atp_supply_demand MRP_ATP_PUB.ATP_Supply_Demand_Typ;
234: l_atp_period MRP_ATP_PUB.ATP_Period_Typ;
235: l_atp_details MRP_ATP_PUB.ATP_Details_Typ;
236: x_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
237: in_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
238: I NUMBER := 1;
239:
232: l_mrp_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
233: l_atp_supply_demand MRP_ATP_PUB.ATP_Supply_Demand_Typ;
234: l_atp_period MRP_ATP_PUB.ATP_Period_Typ;
235: l_atp_details MRP_ATP_PUB.ATP_Details_Typ;
236: x_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
237: in_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
238: I NUMBER := 1;
239:
240:
233: l_atp_supply_demand MRP_ATP_PUB.ATP_Supply_Demand_Typ;
234: l_atp_period MRP_ATP_PUB.ATP_Period_Typ;
235: l_atp_details MRP_ATP_PUB.ATP_Details_Typ;
236: x_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
237: in_atp_rec MRP_ATP_PUB.ATP_Rec_Typ;
238: I NUMBER := 1;
239:
240:
241: --
323: IF l_debug_level > 0 THEN
324: print_time('Calling MRP');
325: END IF;
326:
327: MRP_ATP_PUB.Call_ATP (
328: p_session_id => l_session_id
329: , p_atp_rec => in_atp_rec
330: , x_atp_rec => x_atp_rec
331: , x_atp_supply_demand => l_atp_supply_demand
340: print_time('After Calling MRP');
341: END IF;
342:
343: IF l_debug_level > 0 THEN
344: oe_debug_pub.add( 'AFTER CALL MRP_ATP_PUB.CALL_ATP STS='||X_RETURN_STATUS|| ' MSG COUNT='||X_MSG_COUNT);
345:
346: IF x_atp_rec.available_quantity.COUNT > 0 AND
347: x_atp_rec.source_organization_id.COUNT > 0 then
348: oe_debug_pub.add( ' MSG DATA='||X_MSG_DATA|| 'AVL QTY='|| X_ATP_REC.AVAILABLE_QUANTITY ( 1 ) ||
813:
814:
815: Procedure Check_Results_from_rec (
816: in_global_orgs in varchar2
817: ,p_atp_rec IN MRP_ATP_PUB.ATP_Rec_Typ
818: ,x_return_status OUT NOCOPY VARCHAR2
819:
820: ,x_msg_count OUT NOCOPY NUMBER
821:
1061: END Check_Results_from_rec;
1062:
1063:
1064: Procedure Initialize_mrp_record
1065: ( p_x_atp_rec IN OUT NOCOPY MRP_ATP_PUB.ATP_Rec_Typ
1066: ,l_count IN NUMBER) IS
1067:
1068: l_return_status varchar2(10);
1069:
4725: x_plan_name varchar2(300);
4726: x_ret_code varchar2(300);
4727: x_err_mesg varchar2(2000);
4728: l_session_id number;
4729: --l_item_arr mrp_atp_pub.number_arr := mrp_atp_pub.number_arr(1);
4730: l_organization_id number;
4731: x_sources mrp_atp_pvt.atp_source_typ;
4732: l_calling_module number;
4733: x_error_mesg varchar2(2000);