DBA Data[Home] [Help]

APPS.OE_RESERVE_CONC dependencies on OE_DEBUG_PUB

Line 47: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

43: l_validated_quantity NUMBER;
44: l_primary_quantity NUMBER;
45: l_qty_return_status VARCHAR2(1);
46: --
47: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
48: --
49: BEGIN
50: -- Moving call to validate_quantity in this API so that derived_reserved_quantity
51: -- is checked for item indivisibility for all modes. If primary is truncated for a

Line 55: OE_DEBUG_PUB.Add('Entering Validate_Derived_Quantities',1);

51: -- is checked for item indivisibility for all modes. If primary is truncated for a
52: -- dual UoM controlled item, we will convert secondary from primary to handle
53: -- deviation limits
54: IF l_debug_level > 0 THEN
55: OE_DEBUG_PUB.Add('Entering Validate_Derived_Quantities',1);
56: OE_DEBUG_PUB.Add('Before Calling validate_quantity ' ,1);
57: END IF;
58: inv_decimals_pub.validate_quantity(
59: p_item_id => p_x_rsv_rec.inventory_item_id,

Line 56: OE_DEBUG_PUB.Add('Before Calling validate_quantity ' ,1);

52: -- dual UoM controlled item, we will convert secondary from primary to handle
53: -- deviation limits
54: IF l_debug_level > 0 THEN
55: OE_DEBUG_PUB.Add('Entering Validate_Derived_Quantities',1);
56: OE_DEBUG_PUB.Add('Before Calling validate_quantity ' ,1);
57: END IF;
58: inv_decimals_pub.validate_quantity(
59: p_item_id => p_x_rsv_rec.inventory_item_id,
60: p_organization_id =>

Line 68: OE_DEBUG_PUB.Add('After Calling validate_quantity: '||l_qty_return_status ,1);

64: x_output_quantity => l_validated_quantity,
65: x_primary_quantity => l_primary_quantity,
66: x_return_status => l_qty_return_status);
67: IF l_debug_level > 0 THEN
68: OE_DEBUG_PUB.Add('After Calling validate_quantity: '||l_qty_return_status ,1);
69: END IF;
70: IF l_qty_return_status = 'W' OR l_qty_return_status = 'E' THEN
71: IF l_debug_level > 0 THEN
72: OE_DEBUG_PUB.Add('Validate_quantity returns Error/Warning: truncating the quantity');

Line 72: OE_DEBUG_PUB.Add('Validate_quantity returns Error/Warning: truncating the quantity');

68: OE_DEBUG_PUB.Add('After Calling validate_quantity: '||l_qty_return_status ,1);
69: END IF;
70: IF l_qty_return_status = 'W' OR l_qty_return_status = 'E' THEN
71: IF l_debug_level > 0 THEN
72: OE_DEBUG_PUB.Add('Validate_quantity returns Error/Warning: truncating the quantity');
73: END IF;
74: p_x_rsv_rec.derived_reserved_qty := TRUNC(l_validated_quantity);
75: -- Convert secondary from primary as primary is truncated
76: IF Nvl(p_x_rsv_rec.ordered_qty2,0) > 0 THEN

Line 78: OE_DEBUG_PUB.Add('Converting secondary from primary.');

74: p_x_rsv_rec.derived_reserved_qty := TRUNC(l_validated_quantity);
75: -- Convert secondary from primary as primary is truncated
76: IF Nvl(p_x_rsv_rec.ordered_qty2,0) > 0 THEN
77: IF l_debug_level > 0 THEN
78: OE_DEBUG_PUB.Add('Converting secondary from primary.');
79: END IF;
80: p_x_rsv_rec.derived_reserved_qty2 := inv_convert.inv_um_convert(
81: item_id => p_x_rsv_rec.inventory_item_id
82: , lot_number => NULL

Line 95: OE_DEBUG_PUB.Add('Exiting Validate_Derived_Quantities');

91: END IF;
92: END IF;
93:
94: IF l_debug_level > 0 THEN
95: OE_DEBUG_PUB.Add('Exiting Validate_Derived_Quantities');
96: END IF;
97: EXCEPTION
98: WHEN OTHERS THEN
99: RAISE;

Line 126: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

122: l_total_supply2 NUMBER :=0;
123: l_on_hand_qty2 NUMBER;
124:
125: --
126: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
127: --
128: BEGIN
129: IF l_debug_level > 0 THEN
130: oe_debug_pub.add( ' ENTERING RESERVABLE_QUANTITY' , 1 ) ;

Line 130: oe_debug_pub.add( ' ENTERING RESERVABLE_QUANTITY' , 1 ) ;

126: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
127: --
128: BEGIN
129: IF l_debug_level > 0 THEN
130: oe_debug_pub.add( ' ENTERING RESERVABLE_QUANTITY' , 1 ) ;
131: END IF;
132: -- Getting the Primary UOM of the item
133: BEGIN
134: SELECT primary_uom_code

Line 143: OE_DEBUG_PUB.Add('Error in selecting Primary UOM code',1);

139: OE_Sys_Parameters.VALUE_WNPS('MASTER_ORGANIZATION_ID',p_org_id)); --4759251
140: EXCEPTION
141: WHEN OTHERS THEN
142: IF l_debug_level > 0 THEN
143: OE_DEBUG_PUB.Add('Error in selecting Primary UOM code',1);
144: END IF;
145: IF OE_MSG_PUB.Check_Msg_Level(OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
146: THEN
147: OE_MSG_PUB.Add_Exc_Msg

Line 172: oe_debug_pub.add( ' EXITING RESERVABLE_QUANTITY' , 1 ) ;

168: l_total_supply2 := l_total_supply2 - g_total_consumed2;
169: x_available_qty2 := l_total_supply2;
170:
171: IF l_debug_level > 0 THEN
172: oe_debug_pub.add( ' EXITING RESERVABLE_QUANTITY' , 1 ) ;
173: END IF;
174: EXCEPTION
175: WHEN OTHERS THEN
176:

Line 200: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

196: l_msg_count NUMBER;
197: l_msg_data VARCHAR2(1000);
198: l_failed_rsv_temp_tbl INV_RESERVATION_GLOBAL.mtl_failed_rsv_tbl_type;
199: --
200: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
201: --
202:
203: BEGIN
204: IF l_debug_level > 0 THEN

Line 205: oe_debug_pub.add( ' BEFORE CALLING DO_CHECK_FOR_COMMIT' , 1 ) ;

201: --
202:
203: BEGIN
204: IF l_debug_level > 0 THEN
205: oe_debug_pub.add( ' BEFORE CALLING DO_CHECK_FOR_COMMIT' , 1 ) ;
206: END IF;
207: INV_RESERVATION_PVT.Do_Check_For_Commit
208: (p_api_version_number => 1.0
209: ,p_init_msg_lst => FND_API.G_FALSE

Line 216: oe_debug_pub.add( ' AFTER CALLING DO_CHECK_FOR_COMMIT:'||l_return_status , 1 ) ;

212: ,x_msg_data => l_msg_data
213: ,x_failed_rsv_temp_tbl => l_failed_rsv_temp_tbl);
214:
215: IF l_debug_level > 0 THEN
216: oe_debug_pub.add( ' AFTER CALLING DO_CHECK_FOR_COMMIT:'||l_return_status , 1 ) ;
217: END IF;
218: -- Error Handling Start
219: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
220: IF l_debug_level > 0 THEN

Line 221: oe_debug_pub.add( 'INSIDE UNEXPECTED ERROR' , 1 ) ;

217: END IF;
218: -- Error Handling Start
219: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
220: IF l_debug_level > 0 THEN
221: oe_debug_pub.add( 'INSIDE UNEXPECTED ERROR' , 1 ) ;
222: END IF;
223: OE_MSG_PUB.Transfer_Msg_Stack;
224: l_msg_count := OE_MSG_PUB.COUNT_MSG;
225:

Line 230: oe_debug_pub.add( L_MSG_DATA , 1 ) ;

226: FOR I IN 1..l_msg_count LOOP
227: l_msg_data := OE_MSG_PUB.Get(I,'F');
228:
229: IF l_debug_level > 0 THEN
230: oe_debug_pub.add( L_MSG_DATA , 1 ) ;
231: END IF;
232: END LOOP;
233: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
234:

Line 237: oe_debug_pub.add( ' INSIDE EXPECTED ERROR' , 1 ) ;

233: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
234:
235: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
236: IF l_debug_level > 0 THEN
237: oe_debug_pub.add( ' INSIDE EXPECTED ERROR' , 1 ) ;
238: END IF;
239: OE_MSG_PUB.Save_Messages(p_request_id => p_request_id);
240: RAISE FND_API.G_EXC_ERROR;
241: END IF;

Line 246: OE_DEBUG_PUB.Add('In Expected Error...in Proc Commit_Reservation for rsv_tbl',1);

242: x_return_status := l_return_status;
243: EXCEPTION
244: WHEN FND_API.G_EXC_ERROR THEN
245: IF l_debug_level > 0 THEN
246: OE_DEBUG_PUB.Add('In Expected Error...in Proc Commit_Reservation for rsv_tbl',1);
247: END IF;
248: x_return_status := FND_API.G_RET_STS_ERROR;
249: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
250: IF l_debug_level > 0 THEN

Line 251: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Commit_Reservation ',1 );

247: END IF;
248: x_return_status := FND_API.G_RET_STS_ERROR;
249: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
250: IF l_debug_level > 0 THEN
251: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Commit_Reservation ',1 );
252: END IF;
253: -- x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
254: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
255: WHEN OTHERS THEN

Line 257: OE_DEBUG_PUB.Add('In others error...in Proc Commit_Reservation ',1);

253: -- x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
254: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
255: WHEN OTHERS THEN
256: IF l_debug_level > 0 THEN
257: OE_DEBUG_PUB.Add('In others error...in Proc Commit_Reservation ',1);
258: END IF;
259: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
260: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
261: END Commit_Reservation;

Line 305: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

301: l_line_reserve_qty2 NUMBER :=0; -- INVCONV
302: l_sales_order_id NUMBER;
303: l_count_header NUMBER :=0;
304: --
305: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
306: --
307: BEGIN
308: IF l_debug_level > 0 THEN
309: oe_debug_pub.add( 'ENTERING VALIDATE_AND_RESERVE_FOR_SET ' , 1 ) ;

Line 309: oe_debug_pub.add( 'ENTERING VALIDATE_AND_RESERVE_FOR_SET ' , 1 ) ;

305: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
306: --
307: BEGIN
308: IF l_debug_level > 0 THEN
309: oe_debug_pub.add( 'ENTERING VALIDATE_AND_RESERVE_FOR_SET ' , 1 ) ;
310: END IF;
311:
312: FOR I IN 1..p_x_rsv_tbl.COUNT
313: LOOP

Line 398: oe_debug_pub.add('Before calling Create Reservation: ' || l_rsv_tbl.count,1);

394: END IF;
395: END IF;
396: END IF;
397: END LOOP;
398: oe_debug_pub.add('Before calling Create Reservation: ' || l_rsv_tbl.count,1);
399: create_reservation(p_x_rsv_tbl => l_rsv_tbl
400: ,p_partial_reservation => FND_API.G_FALSE
401: ,x_return_status => l_return_status);
402: x_return_status := l_return_status;

Line 404: oe_debug_pub.add( 'EXITING VALIDATE_AND_RESERVE_FOR_SET: '||l_return_status , 1 ) ;

400: ,p_partial_reservation => FND_API.G_FALSE
401: ,x_return_status => l_return_status);
402: x_return_status := l_return_status;
403: IF l_debug_level > 0 THEN
404: oe_debug_pub.add( 'EXITING VALIDATE_AND_RESERVE_FOR_SET: '||l_return_status , 1 ) ;
405: END IF;
406: EXCEPTION
407: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
408: IF l_debug_level > 0 THEN

Line 409: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Validate_and_Reserve_for_Set ',1 );

405: END IF;
406: EXCEPTION
407: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
408: IF l_debug_level > 0 THEN
409: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Validate_and_Reserve_for_Set ',1 );
410: END IF;
411: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
412: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
413: WHEN OTHERS THEN

Line 415: OE_DEBUG_PUB.Add('In others error...in Proc Validate_and_Reserve_for_Set ',1);

411: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
412: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
413: WHEN OTHERS THEN
414: IF l_debug_level > 0 THEN
415: OE_DEBUG_PUB.Add('In others error...in Proc Validate_and_Reserve_for_Set ',1);
416: END IF;
417: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
418: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
419: END Validate_and_Reserve_for_Set;

Line 431: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

427: x_return_status OUT NOCOPY VARCHAR2)
428: IS
429: l_request_id NUMBER;
430: --
431: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
432: --
433: BEGIN
434: IF l_debug_level > 0 THEN
435: oe_debug_pub.add( 'ENTERING UPDATE_RESERVATION_SET ' , 1 ) ;

Line 435: oe_debug_pub.add( 'ENTERING UPDATE_RESERVATION_SET ' , 1 ) ;

431: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
432: --
433: BEGIN
434: IF l_debug_level > 0 THEN
435: oe_debug_pub.add( 'ENTERING UPDATE_RESERVATION_SET ' , 1 ) ;
436: END IF;
437:
438: FND_PROFILE.Get('CONC_REQUEST_ID', l_request_id);
439: UPDATE oe_reservation_sets

Line 453: oe_debug_pub.add( 'EXITING UPDATE_RESERVATION_SET ' , 1 ) ;

449: ELSE
450: x_return_status := FND_API.G_RET_STS_SUCCESS;
451: END IF;
452: IF l_debug_level > 0 THEN
453: oe_debug_pub.add( 'EXITING UPDATE_RESERVATION_SET ' , 1 ) ;
454: END IF;
455:
456: EXCEPTION
457: WHEN OTHERS THEN

Line 459: OE_DEBUG_PUB.Add('In others error...in Proc Update_Reservation_Set for rsv set tbl',1);

455:
456: EXCEPTION
457: WHEN OTHERS THEN
458: IF l_debug_level > 0 THEN
459: OE_DEBUG_PUB.Add('In others error...in Proc Update_Reservation_Set for rsv set tbl',1);
460: END IF;
461: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
462: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
463: END Update_Reservation_Set;

Line 482: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

478: l_delete_set_id NUMBER;
479: l_process_flag VARCHAR2(1) :='N';
480: l_line_count NUMBER :=0;
481: --
482: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
483: --
484: BEGIN
485: IF l_debug_level > 0 THEN
486: oe_debug_pub.add( 'ENTERING CREATE_RESERVATION_SET ' , 1 ) ;

Line 486: oe_debug_pub.add( 'ENTERING CREATE_RESERVATION_SET ' , 1 ) ;

482: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
483: --
484: BEGIN
485: IF l_debug_level > 0 THEN
486: oe_debug_pub.add( 'ENTERING CREATE_RESERVATION_SET ' , 1 ) ;
487: END IF;
488:
489: IF g_set_id IS NULL THEN
490: g_program_application_id := Fnd_global.PROG_APPL_ID;

Line 518: oe_debug_pub.add( 'Reservation_Set_Id: '||g_set_id , 1 ) ;

514: IF p_rsv_request_id IS NOT NULL THEN
515: l_process_flag := 'Y';
516: END IF;
517: IF l_debug_level > 0 THEN
518: oe_debug_pub.add( 'Reservation_Set_Id: '||g_set_id , 1 ) ;
519: END IF;
520: -- Insert Header information
521: Insert Into oe_reservation_sets
522: (Reservation_Set_Id

Line 612: oe_debug_pub.add( 'EXITING CREATE_RESERVATION_SET ' , 1 ) ;

608:
609: END LOOP;
610:
611: IF l_debug_level > 0 THEN
612: oe_debug_pub.add( 'EXITING CREATE_RESERVATION_SET ' , 1 ) ;
613: END IF;
614: x_return_status := FND_API.G_RET_STS_SUCCESS;
615: EXCEPTION
616: WHEN OTHERS THEN

Line 618: OE_DEBUG_PUB.Add('In others error...in Proc Create_Reservation_Set ',1);

614: x_return_status := FND_API.G_RET_STS_SUCCESS;
615: EXCEPTION
616: WHEN OTHERS THEN
617: IF l_debug_level > 0 THEN
618: OE_DEBUG_PUB.Add('In others error...in Proc Create_Reservation_Set ',1);
619: END IF;
620: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
621: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
622: END Create_Reservation_Set;

Line 649: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

645: l_total_conv_supply NUMBER:=0;
646: l_total_conv_supply2 NUMBER:=0; -- INVCONV
647: l_temp NUMBER:=0;
648: --
649: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
650: --
651: BEGIN
652: IF l_debug_level > 0 THEN
653: oe_debug_pub.add( 'ENTERING CALCULATE_PARTIAL_QUANTITY ' , 1 ) ;

Line 653: oe_debug_pub.add( 'ENTERING CALCULATE_PARTIAL_QUANTITY ' , 1 ) ;

649: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
650: --
651: BEGIN
652: IF l_debug_level > 0 THEN
653: oe_debug_pub.add( 'ENTERING CALCULATE_PARTIAL_QUANTITY ' , 1 ) ;
654: END IF;
655: Reservable_Quantity(p_inventory_item_id => p_x_rsv_tbl(1).inventory_item_id,
656: p_ship_from_org_id => p_x_rsv_tbl(1).ship_from_org_id,
657: p_subinventory => p_x_rsv_tbl(1).subinventory,

Line 672: oe_debug_pub.add( 'Before UOM convertion :' || l_total_supply || '/' || l_primary_uom, 1 ) ;

668: l_temp :=0;
669: IF NOT OE_GLOBALS.Equal(p_x_rsv_tbl(I).ordered_qty_UOM, l_primary_uom)
670: THEN
671: IF l_debug_level > 0 THEN
672: oe_debug_pub.add( 'Before UOM convertion :' || l_total_supply || '/' || l_primary_uom, 1 ) ;
673: END IF;
674: l_total_conv_supply :=
675: INV_CONVERT.INV_UM_CONVERT( item_id => p_x_rsv_tbl(I).inventory_item_id,
676: precision => 5,

Line 685: oe_debug_pub.add( 'After UOM convertion :' || l_total_conv_supply || '/' || p_x_rsv_tbl(I).ordered_qty_uom, 1 ) ;

681: to_name => NULL
682: );
683:
684: IF l_debug_level > 0 THEN
685: oe_debug_pub.add( 'After UOM convertion :' || l_total_conv_supply || '/' || p_x_rsv_tbl(I).ordered_qty_uom, 1 ) ;
686: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom2, 1 ) ;
687: END IF;
688: ELSE
689: l_total_conv_supply := l_total_supply;

Line 686: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom2, 1 ) ;

682: );
683:
684: IF l_debug_level > 0 THEN
685: oe_debug_pub.add( 'After UOM convertion :' || l_total_conv_supply || '/' || p_x_rsv_tbl(I).ordered_qty_uom, 1 ) ;
686: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom2, 1 ) ;
687: END IF;
688: ELSE
689: l_total_conv_supply := l_total_supply;
690: END IF;

Line 694: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom2, 1 ) ;

690: END IF;
691: --9135803
692: l_total_conv_supply2 := l_total_supply2;
693: IF l_debug_level > 0 THEN
694: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom2, 1 ) ;
695: END IF;
696:
697: -- 4695715 : End
698: IF p_reservation_mode = 'PARTIAL_ONLY_UNRESERVED' THEN

Line 775: oe_debug_pub.add( 'Derived Reserved Qty: '||p_x_rsv_tbl(I).derived_reserved_qty , 1 ) ;

771: := p_x_rsv_tbl(I).ordered_qty - NVL(l_reserved_quantity,0);
772: p_x_rsv_tbl(I).derived_reserved_qty2 -- INVCONV
773: := p_x_rsv_tbl(I).ordered_qty2 - NVL(l_reserved_quantity2,0);
774: IF l_debug_level > 0 THEN
775: oe_debug_pub.add( 'Derived Reserved Qty: '||p_x_rsv_tbl(I).derived_reserved_qty , 1 ) ;
776: END IF;
777: -- Partial Reservation
778: -- Reservation exists for the line. Set the flag
779: IF l_reserved_quantity > 0 THEN

Line 837: oe_debug_pub.add( 'EXITING CALCULATE_PARTIAL_QUANTITY ' , 1 ) ;

833: p_x_rsv_tbl(I).corrected_reserved_qty := p_x_rsv_tbl(I).derived_reserved_qty;
834: p_x_rsv_tbl(I).corrected_reserved_qty2 := p_x_rsv_tbl(I).derived_reserved_qty2;
835: END LOOP;
836: IF l_debug_level > 0 THEN
837: oe_debug_pub.add( 'EXITING CALCULATE_PARTIAL_QUANTITY ' , 1 ) ;
838: END IF;
839:
840: EXCEPTION
841: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 843: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Calculate_Partial_Quantity ',1 );

839:
840: EXCEPTION
841: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
842: IF l_debug_level > 0 THEN
843: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Calculate_Partial_Quantity ',1 );
844: END IF;
845: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
846: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
847: WHEN OTHERS THEN

Line 849: OE_DEBUG_PUB.Add('In others error...in Proc Calculate_Partial_Quantity ',1);

845: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
846: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
847: WHEN OTHERS THEN
848: IF l_debug_level > 0 THEN
849: OE_DEBUG_PUB.Add('In others error...in Proc Calculate_Partial_Quantity ',1);
850: END IF;
851: --x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
852: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
853: END Calculate_Partial_Quantity;

Line 874: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

870: )
871:
872: IS
873: --
874: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
875: --
876: l_return_status VARCHAR2(1);
877: l_msg_count NUMBER;
878: l_msg_data VARCHAR2(2000);

Line 900: oe_debug_pub.add( 'ENTERING QUERY_QTY_TREE ' , 1 ) ;

896:
897: BEGIN
898:
899: IF l_debug_level > 0 THEN
900: oe_debug_pub.add( 'ENTERING QUERY_QTY_TREE ' , 1 ) ;
901: END IF;
902:
903: BEGIN
904:

Line 937: oe_debug_pub.add( L_MSG_DATA , 1 ) ;

933: l_msg_count:=OE_MSG_PUB.COUNT_MSG;
934: for I in 1..l_msg_count loop
935: l_msg_data := OE_MSG_PUB.Get(I,'F');
936: IF l_debug_level > 0 THEN
937: oe_debug_pub.add( L_MSG_DATA , 1 ) ;
938: END IF;
939: end loop;
940: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
941: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN

Line 947: oe_debug_pub.add( L_MSG_DATA , 1 ) ;

943: l_msg_count:=OE_MSG_PUB.COUNT_MSG;
944: for I in 1..l_msg_count loop
945: l_msg_data := OE_MSG_PUB.Get(I,'F');
946: IF l_debug_level > 0 THEN
947: oe_debug_pub.add( L_MSG_DATA , 1 ) ;
948: END IF;
949: end loop;
950: RAISE FND_API.G_EXC_ERROR;
951: END IF;

Line 987: oe_debug_pub.add( 'AFTER CALLING QUERY_QUANTITIES' , 1 ) ;

983: , x_satr => l_satr -- INVCONV
984: );
985:
986: IF l_debug_level > 0 THEN
987: oe_debug_pub.add( 'AFTER CALLING QUERY_QUANTITIES' , 1 ) ;
988: oe_debug_pub.add( 'RR: L_QOH ' || L_QOH , 1 ) ;
989: oe_debug_pub.add( 'RR: L_QOH ' || L_ATR , 1 ) ;
990: END IF;
991: x_on_hand_qty := l_qoh;

Line 988: oe_debug_pub.add( 'RR: L_QOH ' || L_QOH , 1 ) ;

984: );
985:
986: IF l_debug_level > 0 THEN
987: oe_debug_pub.add( 'AFTER CALLING QUERY_QUANTITIES' , 1 ) ;
988: oe_debug_pub.add( 'RR: L_QOH ' || L_QOH , 1 ) ;
989: oe_debug_pub.add( 'RR: L_QOH ' || L_ATR , 1 ) ;
990: END IF;
991: x_on_hand_qty := l_qoh;
992: x_avail_to_reserve := l_atr;

Line 989: oe_debug_pub.add( 'RR: L_QOH ' || L_ATR , 1 ) ;

985:
986: IF l_debug_level > 0 THEN
987: oe_debug_pub.add( 'AFTER CALLING QUERY_QUANTITIES' , 1 ) ;
988: oe_debug_pub.add( 'RR: L_QOH ' || L_QOH , 1 ) ;
989: oe_debug_pub.add( 'RR: L_QOH ' || L_ATR , 1 ) ;
990: END IF;
991: x_on_hand_qty := l_qoh;
992: x_avail_to_reserve := l_atr;
993: x_on_hand_qty2 := l_sqoh; -- INVCONV

Line 999: oe_debug_pub.add( 'EXITING QUERY_QTY_TREE ' , 1 ) ;

995:
996: FND_FILE.Put_Line(FND_FILE.LOG, 'Quantity on Hand = '||x_on_hand_qty||' Qty2 ='||x_on_hand_qty2);
997: FND_FILE.Put_Line(FND_FILE.LOG, 'Quantity available to reserve = '||x_avail_to_reserve||' Qty2 ='||x_avail_to_reserve2);
998: IF l_debug_level > 0 THEN
999: oe_debug_pub.add( 'EXITING QUERY_QTY_TREE ' , 1 ) ;
1000: END IF;
1001:
1002: EXCEPTION
1003:

Line 1039: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

1035: l_avail_to_reserve2 NUMBER; -- INVCONV
1036:
1037:
1038: --
1039: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1040: --
1041: BEGIN
1042: IF l_debug_level > 0 THEN
1043: OE_DEBUG_PUB.Add('Inside Calculate Percentage Procedure',1);

Line 1043: OE_DEBUG_PUB.Add('Inside Calculate Percentage Procedure',1);

1039: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1040: --
1041: BEGIN
1042: IF l_debug_level > 0 THEN
1043: OE_DEBUG_PUB.Add('Inside Calculate Percentage Procedure',1);
1044: END IF;
1045: -- Getting the Primary UOM of the item
1046: BEGIN
1047: SELECT primary_uom_code

Line 1056: OE_DEBUG_PUB.Add('Error in selecting Primary UOM code',1);

1052: OE_Sys_Parameters.VALUE_WNPS('MASTER_ORGANIZATION_ID',p_rsv_tbl(1).org_id)); --4759251
1053: EXCEPTION
1054: WHEN OTHERS THEN
1055: IF l_debug_level > 0 THEN
1056: OE_DEBUG_PUB.Add('Error in selecting Primary UOM code',1);
1057: END IF;
1058: IF OE_MSG_PUB.Check_Msg_Level(OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1059: THEN
1060: OE_MSG_PUB.Add_Exc_Msg

Line 1069: OE_DEBUG_PUB.Add('Calculate Percentage Table Count '||p_rsv_tbl.COUNT,1);

1065:
1066: END;
1067: -- Getting the ordered quantity
1068: IF l_debug_level > 0 THEN
1069: OE_DEBUG_PUB.Add('Calculate Percentage Table Count '||p_rsv_tbl.COUNT,1);
1070: END IF;
1071: FOR I IN 1..p_rsv_tbl.COUNT
1072: LOOP
1073:

Line 1092: OE_DEBUG_PUB.Add('Calculate Percentage Total demand '||l_total_demand,1);

1088:
1089: END IF;
1090: END LOOP;
1091: IF l_debug_level > 0 THEN
1092: OE_DEBUG_PUB.Add('Calculate Percentage Total demand '||l_total_demand,1);
1093: END IF;
1094: -- Getting reservable quantity
1095: IF l_total_demand > 0
1096: THEN

Line 1109: OE_DEBUG_PUB.Add('Calculate Percentage Total Supply '||l_total_Supply,1);

1105:
1106: END IF;
1107: l_total_supply := l_total_supply - g_total_consumed;
1108: IF l_debug_level > 0 THEN
1109: OE_DEBUG_PUB.Add('Calculate Percentage Total Supply '||l_total_Supply,1);
1110: END IF;
1111: -- Percent calculation
1112: IF (l_total_demand = 0
1113: OR l_total_supply = 0)

Line 1126: OE_DEBUG_PUB.Add('Exiting Calculate Percentage '||x_percentage,1);

1122: -- 4695715
1123: x_primary_uom := l_primary_uom;
1124:
1125: IF l_debug_level > 0 THEN
1126: OE_DEBUG_PUB.Add('Exiting Calculate Percentage '||x_percentage,1);
1127: END IF;
1128: EXCEPTION
1129: WHEN OTHERS THEN
1130:

Line 1166: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

1162: l_total_conv_supply NUMBER :=0;
1163: l_total_conv_supply2 NUMBER :=0; -- INVCONV
1164: l_temp NUMBER :=0;
1165: --
1166: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1167: --
1168: BEGIN
1169: --4695715
1170: IF p_primary_uom IS NOT NULL THEN

Line 1193: oe_debug_pub.add( 'Before UOM convertion :' || l_total_supply || '/' || l_primary_uom, 1 ) ;

1189: IF NOT OE_GLOBALS.Equal(p_x_rsv_tbl(I).ordered_qty_UOM, l_primary_uom)
1190: AND NVL(p_reservation_mode,'*') ='PERCENT'
1191: THEN
1192: IF l_debug_level > 0 THEN
1193: oe_debug_pub.add( 'Before UOM convertion :' || l_total_supply || '/' || l_primary_uom, 1 ) ;
1194: END IF;
1195: l_total_conv_supply :=
1196: INV_CONVERT.INV_UM_CONVERT( item_id => p_x_rsv_tbl(I).inventory_item_id,
1197: precision => 5,

Line 1206: oe_debug_pub.add( 'After UOM convertion :' || l_total_conv_supply || '/' || p_x_rsv_tbl(I).ordered_qty_uom, 1 );

1202: to_name => NULL
1203: );
1204:
1205: IF l_debug_level > 0 THEN
1206: oe_debug_pub.add( 'After UOM convertion :' || l_total_conv_supply || '/' || p_x_rsv_tbl(I).ordered_qty_uom, 1 );
1207: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom, 1 );
1208: END IF;
1209: ELSIF NVL(p_reservation_mode,'*') ='PERCENT' THEN
1210: l_total_conv_supply := l_total_supply;

Line 1207: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom, 1 );

1203: );
1204:
1205: IF l_debug_level > 0 THEN
1206: oe_debug_pub.add( 'After UOM convertion :' || l_total_conv_supply || '/' || p_x_rsv_tbl(I).ordered_qty_uom, 1 );
1207: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom, 1 );
1208: END IF;
1209: ELSIF NVL(p_reservation_mode,'*') ='PERCENT' THEN
1210: l_total_conv_supply := l_total_supply;
1211: END IF;

Line 1215: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom2, 1 );

1211: END IF;
1212: --9135803
1213: l_total_conv_supply2 := l_total_supply2;
1214: IF l_debug_level > 0 THEN
1215: oe_debug_pub.add( 'Total Supply2 :' || l_total_conv_supply2 || '/' || p_x_rsv_tbl(I).ordered_qty_uom2, 1 );
1216: END IF;
1217:
1218: -- 4695715 :End
1219: p_x_rsv_tbl(I).derived_reserved_qty :=

Line 1227: OE_DEBUG_PUB.Add('Before Calling validate_quantity ' ,1);

1223:
1224: -- Commenting code for 13657322
1225: /*
1226: IF l_debug_level > 0 THEN
1227: OE_DEBUG_PUB.Add('Before Calling validate_quantity ' ,1);
1228: END IF;
1229: inv_decimals_pub.validate_quantity(
1230: p_item_id => p_x_rsv_tbl(I).inventory_item_id,
1231: p_organization_id =>

Line 1239: OE_DEBUG_PUB.Add('After Calling validate_quantity: '||l_qty_return_status ,1);

1235: x_output_quantity => l_validated_quantity,
1236: x_primary_quantity => l_primary_quantity,
1237: x_return_status => l_qty_return_status);
1238: IF l_debug_level > 0 THEN
1239: OE_DEBUG_PUB.Add('After Calling validate_quantity: '||l_qty_return_status ,1);
1240: END IF;
1241: IF l_qty_return_status = 'W' OR l_qty_return_status = 'E' THEN
1242: IF l_debug_level > 0 THEN
1243: OE_DEBUG_PUB.Add('Validate_quantity returns Error/Warning: truncating the quantity');

Line 1243: OE_DEBUG_PUB.Add('Validate_quantity returns Error/Warning: truncating the quantity');

1239: OE_DEBUG_PUB.Add('After Calling validate_quantity: '||l_qty_return_status ,1);
1240: END IF;
1241: IF l_qty_return_status = 'W' OR l_qty_return_status = 'E' THEN
1242: IF l_debug_level > 0 THEN
1243: OE_DEBUG_PUB.Add('Validate_quantity returns Error/Warning: truncating the quantity');
1244: END IF;
1245: p_x_rsv_tbl(I).derived_reserved_qty := TRUNC(l_validated_quantity);
1246: END IF;
1247: IF l_debug_level > 0 THEN

Line 1248: OE_DEBUG_PUB.Add('Validate_quantity: '||p_x_rsv_tbl(I).derived_reserved_qty ,1);

1244: END IF;
1245: p_x_rsv_tbl(I).derived_reserved_qty := TRUNC(l_validated_quantity);
1246: END IF;
1247: IF l_debug_level > 0 THEN
1248: OE_DEBUG_PUB.Add('Validate_quantity: '||p_x_rsv_tbl(I).derived_reserved_qty ,1);
1249: OE_DEBUG_PUB.Add('Available quantity: '||l_total_conv_supply ,1);
1250: END IF;
1251: */
1252: IF NVL(p_reservation_mode,'*') ='PERCENT' THEN

Line 1249: OE_DEBUG_PUB.Add('Available quantity: '||l_total_conv_supply ,1);

1245: p_x_rsv_tbl(I).derived_reserved_qty := TRUNC(l_validated_quantity);
1246: END IF;
1247: IF l_debug_level > 0 THEN
1248: OE_DEBUG_PUB.Add('Validate_quantity: '||p_x_rsv_tbl(I).derived_reserved_qty ,1);
1249: OE_DEBUG_PUB.Add('Available quantity: '||l_total_conv_supply ,1);
1250: END IF;
1251: */
1252: IF NVL(p_reservation_mode,'*') ='PERCENT' THEN
1253: IF l_total_conv_supply > 0

Line 1273: OE_DEBUG_PUB.Add('Validate_quantity: '||p_x_rsv_tbl(I).derived_reserved_qty ,1);

1269: -- Bug 13657322
1270: Validate_Derived_Quantities(p_x_rsv_tbl(I));
1271:
1272: IF l_debug_level > 0 THEN
1273: OE_DEBUG_PUB.Add('Validate_quantity: '||p_x_rsv_tbl(I).derived_reserved_qty ,1);
1274: OE_DEBUG_PUB.Add('Validate_quantity2: '||p_x_rsv_tbl(I).derived_reserved_qty2 ,1);
1275: OE_DEBUG_PUB.Add('Available quantity: '||l_total_conv_supply ,1);
1276: END IF;
1277: -- Keeping copy of derived quantity

Line 1274: OE_DEBUG_PUB.Add('Validate_quantity2: '||p_x_rsv_tbl(I).derived_reserved_qty2 ,1);

1270: Validate_Derived_Quantities(p_x_rsv_tbl(I));
1271:
1272: IF l_debug_level > 0 THEN
1273: OE_DEBUG_PUB.Add('Validate_quantity: '||p_x_rsv_tbl(I).derived_reserved_qty ,1);
1274: OE_DEBUG_PUB.Add('Validate_quantity2: '||p_x_rsv_tbl(I).derived_reserved_qty2 ,1);
1275: OE_DEBUG_PUB.Add('Available quantity: '||l_total_conv_supply ,1);
1276: END IF;
1277: -- Keeping copy of derived quantity
1278: p_x_rsv_tbl(I).derived_reserved_qty_mir := p_x_rsv_tbl(I).derived_reserved_qty;

Line 1275: OE_DEBUG_PUB.Add('Available quantity: '||l_total_conv_supply ,1);

1271:
1272: IF l_debug_level > 0 THEN
1273: OE_DEBUG_PUB.Add('Validate_quantity: '||p_x_rsv_tbl(I).derived_reserved_qty ,1);
1274: OE_DEBUG_PUB.Add('Validate_quantity2: '||p_x_rsv_tbl(I).derived_reserved_qty2 ,1);
1275: OE_DEBUG_PUB.Add('Available quantity: '||l_total_conv_supply ,1);
1276: END IF;
1277: -- Keeping copy of derived quantity
1278: p_x_rsv_tbl(I).derived_reserved_qty_mir := p_x_rsv_tbl(I).derived_reserved_qty;
1279: p_x_rsv_tbl(I).reserved_qty_UOM := p_x_rsv_tbl(I).ordered_qty_UOM;

Line 1313: OE_Debug_pub.Add('Total Supply2 '||l_total_supply2,1);

1309: IF NVL(p_reservation_mode,'*') ='PERCENT' THEN
1310: l_total_supply2 := l_total_supply2 - p_x_rsv_tbl(I).derived_reserved_qty2; -- INVCONV from code review comments from AK
1311: END IF;
1312: IF l_debug_level > 0 THEN
1313: OE_Debug_pub.Add('Total Supply2 '||l_total_supply2,1);
1314: END IF;
1315: -- 4695715 : End
1316: --5041136
1317: p_x_rsv_tbl(I).corrected_reserved_qty := p_x_rsv_tbl(I).derived_reserved_qty;

Line 1320: OE_Debug_pub.Add('Derived reserved Qty '||p_x_rsv_tbl(I).derived_reserved_qty,1);

1316: --5041136
1317: p_x_rsv_tbl(I).corrected_reserved_qty := p_x_rsv_tbl(I).derived_reserved_qty;
1318: p_x_rsv_tbl(I).corrected_reserved_qty2 := p_x_rsv_tbl(I).derived_reserved_qty2;
1319: IF l_debug_level > 0 THEN
1320: OE_Debug_pub.Add('Derived reserved Qty '||p_x_rsv_tbl(I).derived_reserved_qty,1);
1321: OE_Debug_pub.Add('Consumed reserved Qty '||g_consumed_for_lot,1);
1322: OE_Debug_pub.Add('Derived reserved Qty2 '||p_x_rsv_tbl(I).derived_reserved_qty2,1);
1323: OE_Debug_pub.Add('Consumed reserved Qty2 '||g_consumed_for_lot2,1);
1324: END IF;

Line 1321: OE_Debug_pub.Add('Consumed reserved Qty '||g_consumed_for_lot,1);

1317: p_x_rsv_tbl(I).corrected_reserved_qty := p_x_rsv_tbl(I).derived_reserved_qty;
1318: p_x_rsv_tbl(I).corrected_reserved_qty2 := p_x_rsv_tbl(I).derived_reserved_qty2;
1319: IF l_debug_level > 0 THEN
1320: OE_Debug_pub.Add('Derived reserved Qty '||p_x_rsv_tbl(I).derived_reserved_qty,1);
1321: OE_Debug_pub.Add('Consumed reserved Qty '||g_consumed_for_lot,1);
1322: OE_Debug_pub.Add('Derived reserved Qty2 '||p_x_rsv_tbl(I).derived_reserved_qty2,1);
1323: OE_Debug_pub.Add('Consumed reserved Qty2 '||g_consumed_for_lot2,1);
1324: END IF;
1325:

Line 1322: OE_Debug_pub.Add('Derived reserved Qty2 '||p_x_rsv_tbl(I).derived_reserved_qty2,1);

1318: p_x_rsv_tbl(I).corrected_reserved_qty2 := p_x_rsv_tbl(I).derived_reserved_qty2;
1319: IF l_debug_level > 0 THEN
1320: OE_Debug_pub.Add('Derived reserved Qty '||p_x_rsv_tbl(I).derived_reserved_qty,1);
1321: OE_Debug_pub.Add('Consumed reserved Qty '||g_consumed_for_lot,1);
1322: OE_Debug_pub.Add('Derived reserved Qty2 '||p_x_rsv_tbl(I).derived_reserved_qty2,1);
1323: OE_Debug_pub.Add('Consumed reserved Qty2 '||g_consumed_for_lot2,1);
1324: END IF;
1325:
1326: END LOOP;

Line 1323: OE_Debug_pub.Add('Consumed reserved Qty2 '||g_consumed_for_lot2,1);

1319: IF l_debug_level > 0 THEN
1320: OE_Debug_pub.Add('Derived reserved Qty '||p_x_rsv_tbl(I).derived_reserved_qty,1);
1321: OE_Debug_pub.Add('Consumed reserved Qty '||g_consumed_for_lot,1);
1322: OE_Debug_pub.Add('Derived reserved Qty2 '||p_x_rsv_tbl(I).derived_reserved_qty2,1);
1323: OE_Debug_pub.Add('Consumed reserved Qty2 '||g_consumed_for_lot2,1);
1324: END IF;
1325:
1326: END LOOP;
1327: END Derive_Reservation_qty;

Line 1359: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

1355: l_primary_quantity NUMBER;
1356: l_qty_return_status VARCHAR2(1);
1357: l_rsv_exists BOOLEAN;
1358: --
1359: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1360: --
1361:
1362: BEGIN
1363: Oe_debug_pub.add ('inside Create reservation',1);

Line 1363: Oe_debug_pub.add ('inside Create reservation',1);

1359: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1360: --
1361:
1362: BEGIN
1363: Oe_debug_pub.add ('inside Create reservation',1);
1364: FND_PROFILE.Get('CONC_REQUEST_ID', l_request_id);
1365: l_partial_reservation_flag := p_partial_reservation; -- Pack J
1366: FOR I IN 1..p_x_rsv_tbl.COUNT
1367: LOOP

Line 1372: OE_Debug_pub.Add('Creating reservation record',1);

1368: --5041136
1369: --IF p_x_rsv_tbl(I).derived_reserved_qty > 0 THEN
1370: IF p_x_rsv_tbl(I).corrected_reserved_qty > 0 THEN
1371: IF l_debug_level > 0 THEN
1372: OE_Debug_pub.Add('Creating reservation record',1);
1373: END IF;
1374: --Pack J
1375: l_count_header := l_count_header + 1;
1376: IF l_count_header = 1 THEN

Line 1457: OE_DEBUG_PUB.Add('Project id '||l_reservation_rec.project_id||' Task Id '||l_reservation_rec.task_id,1);

1453: IF p_x_rsv_tbl(I).task_id IS NOT NULL THEN
1454: l_reservation_rec.task_id := p_x_rsv_tbl(I).task_id;
1455: END IF;
1456: IF l_debug_level > 0 THEN
1457: OE_DEBUG_PUB.Add('Project id '||l_reservation_rec.project_id||' Task Id '||l_reservation_rec.task_id,1);
1458: END IF;
1459:
1460:
1461: l_reservation_rec.supply_source_type_id :=

Line 1469: OE_DEBUG_PUB.Add('Before Calling inv_reservation_pub.validate_quantity ' ,1);

1465: IF NVL(l_reservation_rec.reservation_quantity,0)
1466: <> NVL(p_x_rsv_tbl(I).derived_reserved_qty_mir,0) THEN
1467:
1468: IF l_debug_level > 0 THEN
1469: OE_DEBUG_PUB.Add('Before Calling inv_reservation_pub.validate_quantity ' ,1);
1470: END IF;
1471: inv_decimals_pub.validate_quantity(
1472: p_item_id => p_x_rsv_tbl(I).inventory_item_id,
1473: p_organization_id =>

Line 1481: OE_DEBUG_PUB.Add('After Calling inv_reservation_pub.validate_quantity: '||l_qty_return_status ,1);

1477: x_output_quantity => l_validated_quantity,
1478: x_primary_quantity => l_primary_quantity,
1479: x_return_status => l_qty_return_status);
1480: IF l_debug_level > 0 THEN
1481: OE_DEBUG_PUB.Add('After Calling inv_reservation_pub.validate_quantity: '||l_qty_return_status ,1);
1482: END IF;
1483:
1484: IF l_qty_return_status = 'W' OR l_qty_return_status = 'E' THEN
1485: IF l_debug_level > 0 THEN

Line 1486: OE_DEBUG_PUB.Add('Validate_quantity returns Error/Warning: truncating the quantity');

1482: END IF;
1483:
1484: IF l_qty_return_status = 'W' OR l_qty_return_status = 'E' THEN
1485: IF l_debug_level > 0 THEN
1486: OE_DEBUG_PUB.Add('Validate_quantity returns Error/Warning: truncating the quantity');
1487: END IF;
1488: l_validated_quantity := TRUNC(l_validated_quantity);
1489: END IF;
1490: IF l_debug_level > 0 THEN

Line 1491: OE_DEBUG_PUB.Add('Parimary_quantity: '||l_primary_quantity ,1);

1487: END IF;
1488: l_validated_quantity := TRUNC(l_validated_quantity);
1489: END IF;
1490: IF l_debug_level > 0 THEN
1491: OE_DEBUG_PUB.Add('Parimary_quantity: '||l_primary_quantity ,1);
1492: OE_DEBUG_PUB.Add('Validate_quantity: '||l_validated_quantity ,1);
1493: END IF;
1494: ELSE
1495: l_validated_quantity := l_reservation_rec.reservation_quantity;

Line 1492: OE_DEBUG_PUB.Add('Validate_quantity: '||l_validated_quantity ,1);

1488: l_validated_quantity := TRUNC(l_validated_quantity);
1489: END IF;
1490: IF l_debug_level > 0 THEN
1491: OE_DEBUG_PUB.Add('Parimary_quantity: '||l_primary_quantity ,1);
1492: OE_DEBUG_PUB.Add('Validate_quantity: '||l_validated_quantity ,1);
1493: END IF;
1494: ELSE
1495: l_validated_quantity := l_reservation_rec.reservation_quantity;
1496: END IF;

Line 1511: OE_DEBUG_PUB.Add('Calling inv_reservation_pub.create_reservation '

1507: END IF;
1508:
1509: -- Call INV with action = RESERVE
1510: IF l_debug_level > 0 THEN
1511: OE_DEBUG_PUB.Add('Calling inv_reservation_pub.create_reservation '
1512: ||l_reservation_rec.reservation_quantity,1);
1513: END IF;
1514: INV_RESERVATION_PUB.Create_Reservation
1515: ( p_api_version_number => 1.0

Line 1532: OE_DEBUG_PUB.Add('1. After Calling Create Reservation' || l_return_status ||' '||l_quantity_reserved,1);

1528: , x_reservation_id => l_rsv_id
1529: , p_partial_rsv_exists => l_rsv_exists
1530: );
1531: IF l_debug_level > 0 THEN
1532: OE_DEBUG_PUB.Add('1. After Calling Create Reservation' || l_return_status ||' '||l_quantity_reserved,1);
1533: END IF;
1534: -- Pack J
1535: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1536: l_commit_count := l_commit_count + 1;

Line 1540: OE_DEBUG_PUB.Add('Raising Unexpected error',1);

1536: l_commit_count := l_commit_count + 1;
1537:
1538: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1539: IF l_debug_level > 0 THEN
1540: OE_DEBUG_PUB.Add('Raising Unexpected error',1);
1541: END IF;
1542: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1543:
1544: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN

Line 1546: OE_DEBUG_PUB.Add('Raising Expected error',1);

1542: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1543:
1544: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
1545: IF l_debug_level > 0 THEN
1546: OE_DEBUG_PUB.Add('Raising Expected error',1);
1547: END IF;
1548: IF l_msg_data is not null THEN
1549: fnd_message.set_encoded(l_msg_data);
1550: l_buffer := fnd_message.get;

Line 1553: OE_DEBUG_PUB.Add(l_msg_data,1);

1549: fnd_message.set_encoded(l_msg_data);
1550: l_buffer := fnd_message.get;
1551: OE_MSG_PUB.Add_text(p_message_text => l_buffer);
1552: IF l_debug_level > 0 THEN
1553: OE_DEBUG_PUB.Add(l_msg_data,1);
1554: END IF;
1555: END IF;
1556: --RAISE FND_API.G_EXC_ERROR; -- Commented as we don't need to fail the program for excepted error.
1557:

Line 1564: oe_debug_pub.add( ' INSIDE LOOP BEFORE CALLING THE COMMIT_RESERVATION' , 1 ) ;

1560: -- Pack J
1561: IF l_commit_count = 500 THEN
1562:
1563: IF l_debug_level > 0 THEN
1564: oe_debug_pub.add( ' INSIDE LOOP BEFORE CALLING THE COMMIT_RESERVATION' , 1 ) ;
1565: END IF;
1566: Commit_Reservation(p_request_id => l_request_id
1567: ,x_return_status => l_return_status);
1568: IF l_debug_level > 0 THEN

Line 1569: oe_debug_pub.add( 'INSIDE LOOP AFTER CALLING THE COMMIT_RESERVATION : ' , 1 ) ;

1565: END IF;
1566: Commit_Reservation(p_request_id => l_request_id
1567: ,x_return_status => l_return_status);
1568: IF l_debug_level > 0 THEN
1569: oe_debug_pub.add( 'INSIDE LOOP AFTER CALLING THE COMMIT_RESERVATION : ' , 1 ) ;
1570: END IF;
1571: --Pack J
1572: OE_MSG_PUB.Save_Messages(p_request_id => l_request_id);
1573:

Line 1580: oe_debug_pub.add( ' BEFORE CALLING THE COMMIT_RESERVATION' , 1 ) ;

1576: END IF;
1577: END IF;
1578: END LOOP;
1579: IF l_debug_level > 0 THEN
1580: oe_debug_pub.add( ' BEFORE CALLING THE COMMIT_RESERVATION' , 1 ) ;
1581: END IF;
1582: Commit_Reservation(p_request_id => l_request_id
1583: ,x_return_status => l_return_status);
1584: IF l_debug_level > 0 THEN

Line 1585: oe_debug_pub.add( ' AFTER CALLING THE COMMIT_RESERVATION ', 1 ) ;

1581: END IF;
1582: Commit_Reservation(p_request_id => l_request_id
1583: ,x_return_status => l_return_status);
1584: IF l_debug_level > 0 THEN
1585: oe_debug_pub.add( ' AFTER CALLING THE COMMIT_RESERVATION ', 1 ) ;
1586: END IF;
1587: --Pack J
1588: OE_MSG_PUB.Save_Messages(p_request_id => l_request_id);
1589:

Line 1597: OE_DEBUG_PUB.Add('Exiting OE_RESERVE_CONC.Create_reservation for rsv_tbl',1);

1593: l_return_status := FND_API.G_RET_STS_SUCCESS;
1594: END IF;
1595: x_return_status := l_return_status;
1596: IF l_debug_level > 0 THEN
1597: OE_DEBUG_PUB.Add('Exiting OE_RESERVE_CONC.Create_reservation for rsv_tbl',1);
1598: END IF;
1599:
1600: EXCEPTION
1601: WHEN FND_API.G_EXC_ERROR THEN

Line 1603: OE_DEBUG_PUB.Add('In Expected Error...in Proc Create_Reservation for rsv_tbl',1);

1599:
1600: EXCEPTION
1601: WHEN FND_API.G_EXC_ERROR THEN
1602: IF l_debug_level > 0 THEN
1603: OE_DEBUG_PUB.Add('In Expected Error...in Proc Create_Reservation for rsv_tbl',1);
1604: END IF;
1605: x_return_status := FND_API.G_RET_STS_ERROR;
1606:
1607: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 1609: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Create_Reservation for rsv tbl',1 );

1605: x_return_status := FND_API.G_RET_STS_ERROR;
1606:
1607: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1608: IF l_debug_level > 0 THEN
1609: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Create_Reservation for rsv tbl',1 );
1610: END IF;
1611: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1612:
1613: WHEN OTHERS THEN

Line 1615: OE_DEBUG_PUB.Add('In others error...in Proc Create_Reservation for rsv tbl',1);

1611: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1612:
1613: WHEN OTHERS THEN
1614: IF l_debug_level > 0 THEN
1615: OE_DEBUG_PUB.Add('In others error...in Proc Create_Reservation for rsv tbl',1);
1616: END IF;
1617: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1618:
1619: END create_reservation;

Line 1638: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

1634: l_return_status VARCHAR2(1);
1635: l_request_id NUMBER;
1636: l_primary_uom VARCHAR2(3) := NULL; -- 4695715
1637: --
1638: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1639: --
1640:
1641: BEGIN
1642: l_percent := p_percent;

Line 1676: OE_DEBUG_PUB.Add('Going to call OE_RESERVE_CONC_HOOK.Qty_Per_Business_Rule ',1);

1672:
1673: END IF;
1674:
1675: IF l_debug_level > 0 THEN
1676: OE_DEBUG_PUB.Add('Going to call OE_RESERVE_CONC_HOOK.Qty_Per_Business_Rule ',1);
1677: END IF;
1678:
1679: OE_RESERVE_CONC_HOOK.Qty_Per_Business_Rule(p_x_rsv_tbl => p_rsv_tbl);
1680:

Line 1682: OE_DEBUG_PUB.Add('After calling OE_RESERVE_CONC_HOOK.Qty_Per_Business_Rule ',1);

1678:
1679: OE_RESERVE_CONC_HOOK.Qty_Per_Business_Rule(p_x_rsv_tbl => p_rsv_tbl);
1680:
1681: IF l_debug_level > 0 THEN
1682: OE_DEBUG_PUB.Add('After calling OE_RESERVE_CONC_HOOK.Qty_Per_Business_Rule ',1);
1683: END IF;
1684:
1685: IF p_reserve_run_type = 'RESERVE'
1686: OR p_reserve_run_type IS NULL THEN

Line 1705: OE_DEBUG_PUB.Add('Create Reservation returned with Expected error for rsv tbl ',1);

1701: END IF;
1702:
1703: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1704: IF l_debug_level > 0 THEN
1705: OE_DEBUG_PUB.Add('Create Reservation returned with Expected error for rsv tbl ',1);
1706: END IF;
1707: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1708: IF l_debug_level > 0 THEN
1709: OE_DEBUG_PUB.Add('Create Reservation returned with Unexpected error for rsv tbl',1);

Line 1709: OE_DEBUG_PUB.Add('Create Reservation returned with Unexpected error for rsv tbl',1);

1705: OE_DEBUG_PUB.Add('Create Reservation returned with Expected error for rsv tbl ',1);
1706: END IF;
1707: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1708: IF l_debug_level > 0 THEN
1709: OE_DEBUG_PUB.Add('Create Reservation returned with Unexpected error for rsv tbl',1);
1710: END IF;
1711: END IF;
1712:
1713: ELSIF p_reserve_run_type = 'SIMULATE TO EXTERNAL TABLE' THEN

Line 1715: OE_DEBUG_PUB.Add('Going to call OE_RESERVE_CONC_HOOK.Simulated_Results ',1);

1711: END IF;
1712:
1713: ELSIF p_reserve_run_type = 'SIMULATE TO EXTERNAL TABLE' THEN
1714: IF l_debug_level > 0 THEN
1715: OE_DEBUG_PUB.Add('Going to call OE_RESERVE_CONC_HOOK.Simulated_Results ',1);
1716: END IF;
1717:
1718: OE_RESERVE_CONC_HOOK.Simulated_Results(p_x_rsv_tbl => p_rsv_tbl);
1719:

Line 1721: OE_DEBUG_PUB.Add('After calling OE_RESERVE_CONC_HOOK.Simulated_Results ',1);

1717:
1718: OE_RESERVE_CONC_HOOK.Simulated_Results(p_x_rsv_tbl => p_rsv_tbl);
1719:
1720: IF l_debug_level > 0 THEN
1721: OE_DEBUG_PUB.Add('After calling OE_RESERVE_CONC_HOOK.Simulated_Results ',1);
1722: END IF;
1723:
1724: ELSIF p_reserve_run_type = 'SIMULATE' THEN -- Pack J
1725: FND_PROFILE.Get('CONC_REQUEST_ID', l_request_id);

Line 1757: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

1753: l_msg_data VARCHAR2(1000);
1754: l_dummy VARCHAR2(100);
1755:
1756: --
1757: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1758: --
1759:
1760: BEGIN
1761: IF l_debug_level > 0 THEN

Line 1762: OE_DEBUG_PUB.Add('Inside Reserve Eligible Procedure',1);

1758: --
1759:
1760: BEGIN
1761: IF l_debug_level > 0 THEN
1762: OE_DEBUG_PUB.Add('Inside Reserve Eligible Procedure',1);
1763: END IF;
1764:
1765: /* Check if line is open, if not open ignore the line */
1766: IF ( p_line_rec.open_flag = 'N' ) THEN

Line 1768: OE_DEBUG_PUB.Add('Line is closed, not eligible for reservation', 1);

1764:
1765: /* Check if line is open, if not open ignore the line */
1766: IF ( p_line_rec.open_flag = 'N' ) THEN
1767: IF l_debug_level > 0 THEN
1768: OE_DEBUG_PUB.Add('Line is closed, not eligible for reservation', 1);
1769: END IF;
1770: l_return_status := FND_API.G_RET_STS_ERROR;
1771:
1772: /* Check if line is shipped, if shipped then ignore the line */

Line 1775: OE_DEBUG_PUB.Add('Line is shipped, not eligible for reservation', 1);

1771:
1772: /* Check if line is shipped, if shipped then ignore the line */
1773: ELSIF ( nvl(p_line_rec.shipped_quantity, -99) > 0 ) THEN
1774: IF l_debug_level > 0 THEN
1775: OE_DEBUG_PUB.Add('Line is shipped, not eligible for reservation', 1);
1776: END IF;
1777: l_return_status := FND_API.G_RET_STS_ERROR;
1778: --Added for bug 6873122
1779: ELSIF ( nvl(p_line_rec.fulfilled_quantity, -99) > 0 ) THEN

Line 1781: OE_DEBUG_PUB.Add('Line is Fulfilled, not eligible for reservation', 1);

1777: l_return_status := FND_API.G_RET_STS_ERROR;
1778: --Added for bug 6873122
1779: ELSIF ( nvl(p_line_rec.fulfilled_quantity, -99) > 0 ) THEN
1780: IF l_debug_level > 0 THEN
1781: OE_DEBUG_PUB.Add('Line is Fulfilled, not eligible for reservation', 1);
1782: END IF;
1783: l_return_status := FND_API.G_RET_STS_ERROR;
1784: --Added for bug 6873122
1785: END IF;

Line 1792: OE_DEBUG_PUB.Add('Before checking Existing Reservations',1);

1788: AND NVL(g_reservation_mode,'*') <> 'PARTIAL' THEN -- Pack J
1789: /* We need to check for Existing Reservations on the Line */
1790: BEGIN
1791: IF l_debug_level > 0 THEN
1792: OE_DEBUG_PUB.Add('Before checking Existing Reservations',1);
1793: END IF;
1794:
1795: SELECT 'Reservation Exists'
1796: INTO l_dummy

Line 1801: OE_DEBUG_PUB.Add('Reservations exists on the line',3);

1797: FROM MTL_RESERVATIONS
1798: WHERE DEMAND_SOURCE_LINE_ID = p_line_rec.line_id;
1799:
1800: IF l_debug_level > 0 THEN
1801: OE_DEBUG_PUB.Add('Reservations exists on the line',3);
1802: END IF;
1803:
1804: RAISE FND_API.G_EXC_ERROR;
1805: EXCEPTION

Line 1808: OE_DEBUG_PUB.Add('In Expected Error for Check Reservation',3);

1804: RAISE FND_API.G_EXC_ERROR;
1805: EXCEPTION
1806: WHEN FND_API.G_EXC_ERROR THEN
1807: IF l_debug_level > 0 THEN
1808: OE_DEBUG_PUB.Add('In Expected Error for Check Reservation',3);
1809: END IF;
1810: l_return_status := FND_API.G_RET_STS_ERROR;
1811:
1812: WHEN NO_DATA_FOUND THEN

Line 1823: OE_DEBUG_PUB.Add('Before checking for Staged/Closed deliveries', 1);

1819: -- 3250889 Starts
1820: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1821: BEGIN
1822: IF l_debug_level > 0 THEN
1823: OE_DEBUG_PUB.Add('Before checking for Staged/Closed deliveries', 1);
1824: END IF;
1825:
1826: SELECT 'Staging Exists'
1827: INTO l_dummy

Line 1834: OE_DEBUG_PUB.Add('Staged/Closed deliveries exist for the line', 3);

1830: AND SOURCE_CODE = 'OE' -- Added for bug 3286756
1831: AND RELEASED_STATUS IN ('Y', 'C');
1832:
1833: IF l_debug_level > 0 THEN
1834: OE_DEBUG_PUB.Add('Staged/Closed deliveries exist for the line', 3);
1835: END IF;
1836:
1837: RAISE FND_API.G_EXC_ERROR;
1838:

Line 1842: OE_DEBUG_PUB.Add('In Expected Error for Checking Staged/Closed deliveries', 3);

1838:
1839: EXCEPTION
1840: WHEN FND_API.G_EXC_ERROR THEN
1841: IF l_debug_level > 0 THEN
1842: OE_DEBUG_PUB.Add('In Expected Error for Checking Staged/Closed deliveries', 3);
1843: END IF;
1844: l_return_status := FND_API.G_RET_STS_ERROR;
1845: WHEN NO_DATA_FOUND THEN
1846: NULL;

Line 1863: OE_DEBUG_PUB.Add('Schedule Ship Date:'||

1859:
1860: IF (NVL(p_use_reservation_time_fence,'Y') = 'Y' or
1861: NVL(p_use_reservation_time_fence,'Yes') = 'Yes') THEN
1862: IF l_debug_level > 0 THEN
1863: OE_DEBUG_PUB.Add('Schedule Ship Date:'||
1864: p_line_rec.schedule_ship_date,3);
1865: END IF;
1866:
1867: -- Scheduling restructure

Line 1873: OE_DEBUG_PUB.Add('The Schedule Date for Line falls

1869: -- 4689197
1870: IF NOT OE_ORDER_SCH_UTIL.Within_Rsv_Time_Fence
1871: (p_line_rec.schedule_ship_date, p_line_rec.org_id) THEN
1872: IF l_debug_level > 0 THEN
1873: OE_DEBUG_PUB.Add('The Schedule Date for Line falls
1874: beyond reservation Time Fence',3);
1875: END IF;
1876: RAISE FND_API.G_EXC_ERROR ;
1877:

Line 1884: OE_DEBUG_PUB.Add('The Schedule Date for Line falls

1880: -- 4689197
1881: IF NOT OE_SCHEDULE_UTIL.Within_Rsv_Time_Fence
1882: (p_line_rec.schedule_ship_date, p_line_rec.org_id) THEN
1883: IF l_debug_level > 0 THEN
1884: OE_DEBUG_PUB.Add('The Schedule Date for Line falls
1885: beyond reservation Time Fence',3);
1886: END IF;
1887: RAISE FND_API.G_EXC_ERROR ;
1888:

Line 1897: OE_DEBUG_PUB.Add('Checking Scheduling Level...',3);

1893:
1894: -- We need to check if the Line Type for the Line allows
1895: -- us to reserve the Line or not.
1896: IF l_debug_level > 0 THEN
1897: OE_DEBUG_PUB.Add('Checking Scheduling Level...',3);
1898: END IF;
1899: -- Scheduling restructure
1900: /* Bug: 4504362
1901: IF NVL(FND_PROFILE.VALUE('ONT_BRANCH_SCHEDULING'),'N') = 'N' THEN

Line 1913: OE_DEBUG_PUB.Add('l_scheduling_level_code:'||l_scheduling_level_code,1);

1909: ,p_line_rec.line_type_id);
1910: --END IF;
1911:
1912: IF l_debug_level > 0 THEN
1913: OE_DEBUG_PUB.Add('l_scheduling_level_code:'||l_scheduling_level_code,1);
1914: END IF;
1915:
1916: IF l_scheduling_level_code is not null AND
1917: (l_scheduling_level_code = SCH_LEVEL_ONE

Line 1927: OE_DEBUG_PUB.Add('Order Type Does not Allow Scheduling',3);

1923: (p_line_rec.schedule_ship_date is NOT NULL OR
1924: p_line_rec.schedule_arrival_date is NOT NULL))
1925: THEN
1926: IF l_debug_level > 0 THEN
1927: OE_DEBUG_PUB.Add('Order Type Does not Allow Scheduling',3);
1928: END IF;
1929: RAISE FND_API.G_EXC_ERROR;
1930: END IF;
1931: END IF;

Line 1937: OE_DEBUG_PUB.Add('..Exiting OE_RESERVE_CONC.Need_Reservation' ||

1933: END IF; -- Check for Reservation Exists Clause
1934: x_return_status := l_return_status;
1935:
1936: IF l_debug_level > 0 THEN
1937: OE_DEBUG_PUB.Add('..Exiting OE_RESERVE_CONC.Need_Reservation' ||
1938: l_return_status ,1);
1939: END IF;
1940: EXCEPTION
1941: WHEN FND_API.G_EXC_ERROR THEN

Line 1943: OE_DEBUG_PUB.Add('In Expected Error...in Proc Reserve_Eligible',3);

1939: END IF;
1940: EXCEPTION
1941: WHEN FND_API.G_EXC_ERROR THEN
1942: IF l_debug_level > 0 THEN
1943: OE_DEBUG_PUB.Add('In Expected Error...in Proc Reserve_Eligible',3);
1944: END IF;
1945: x_return_status := FND_API.G_RET_STS_ERROR;
1946:
1947: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 1949: OE_DEBUG_PUB.Add('In UnExpected Error...in Proc Reserve_Eligible',3);

1945: x_return_status := FND_API.G_RET_STS_ERROR;
1946:
1947: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1948: IF l_debug_level > 0 THEN
1949: OE_DEBUG_PUB.Add('In UnExpected Error...in Proc Reserve_Eligible',3);
1950: END IF;
1951: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1952:
1953: WHEN OTHERS THEN

Line 1991: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

1987: l_quantity2_reserved NUMBER; -- INVCONV
1988: l_quantity2_to_reserve NUMBER; -- INVCONV
1989:
1990: --
1991: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1992: --
1993:
1994:
1995: BEGIN

Line 1997: OE_Debug_pub.Add('In the Procedure Create Reservation',1);

1993:
1994:
1995: BEGIN
1996: IF l_debug_level > 0 THEN
1997: OE_Debug_pub.Add('In the Procedure Create Reservation',1);
1998: OE_Debug_pub.Add('Before call of Load_INV_Request',1);
1999: END IF;
2000:
2001:

Line 1998: OE_Debug_pub.Add('Before call of Load_INV_Request',1);

1994:
1995: BEGIN
1996: IF l_debug_level > 0 THEN
1997: OE_Debug_pub.Add('In the Procedure Create Reservation',1);
1998: OE_Debug_pub.Add('Before call of Load_INV_Request',1);
1999: END IF;
2000:
2001:
2002: IF p_line_rec.ordered_quantity2 = 0 -- INVCONV

Line 2028: OE_DEBUG_PUB.Add('Before call of inv_reservation_pub.create_reservation',1);

2024:
2025:
2026: -- Call INV with action = RESERVE
2027: IF l_debug_level > 0 THEN
2028: OE_DEBUG_PUB.Add('Before call of inv_reservation_pub.create_reservation',1);
2029: END IF;
2030:
2031: INV_RESERVATION_PUB.Create_Reservation
2032: ( p_api_version_number => 1.0

Line 2048: OE_DEBUG_PUB.Add('1. After Calling Create Reservation' ||

2044: , x_secondary_quantity_reserved => l_quantity2_reserved -- INVCONV
2045: , x_reservation_id => l_rsv_id
2046: );
2047: IF l_debug_level > 0 THEN
2048: OE_DEBUG_PUB.Add('1. After Calling Create Reservation' ||
2049: l_return_status,1);
2050: OE_DEBUG_PUB.Add(l_msg_data,1);
2051: END IF;
2052:

Line 2050: OE_DEBUG_PUB.Add(l_msg_data,1);

2046: );
2047: IF l_debug_level > 0 THEN
2048: OE_DEBUG_PUB.Add('1. After Calling Create Reservation' ||
2049: l_return_status,1);
2050: OE_DEBUG_PUB.Add(l_msg_data,1);
2051: END IF;
2052:
2053: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2054: IF l_debug_level > 0 THEN

Line 2055: OE_DEBUG_PUB.Add('Raising Unexpected error',1);

2051: END IF;
2052:
2053: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2054: IF l_debug_level > 0 THEN
2055: OE_DEBUG_PUB.Add('Raising Unexpected error',1);
2056: END IF;
2057: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2058:
2059: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN

Line 2061: OE_DEBUG_PUB.Add('Raising Expected error',1);

2057: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2058:
2059: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
2060: IF l_debug_level > 0 THEN
2061: OE_DEBUG_PUB.Add('Raising Expected error',1);
2062: END IF;
2063: IF l_msg_data is not null THEN
2064: fnd_message.set_encoded(l_msg_data);
2065: l_buffer := fnd_message.get;

Line 2068: OE_DEBUG_PUB.Add(l_msg_data,1);

2064: fnd_message.set_encoded(l_msg_data);
2065: l_buffer := fnd_message.get;
2066: OE_MSG_PUB.Add_text(p_message_text => l_buffer);
2067: IF l_debug_level > 0 THEN
2068: OE_DEBUG_PUB.Add(l_msg_data,1);
2069: END IF;
2070: END IF;
2071: RAISE FND_API.G_EXC_ERROR;
2072:

Line 2075: OE_DEBUG_PUB.Add('..Exiting OE_RESERVE_CONC.Create_reservation' ||

2071: RAISE FND_API.G_EXC_ERROR;
2072:
2073: END IF;
2074: IF l_debug_level > 0 THEN
2075: OE_DEBUG_PUB.Add('..Exiting OE_RESERVE_CONC.Create_reservation' ||
2076: l_return_status ,1);
2077: END IF;
2078: x_return_status := FND_API.G_RET_STS_SUCCESS;
2079:

Line 2083: OE_DEBUG_PUB.Add('In Expected Error...in Proc Create_Reservation',1);

2079:
2080: EXCEPTION
2081: WHEN FND_API.G_EXC_ERROR THEN
2082: IF l_debug_level > 0 THEN
2083: OE_DEBUG_PUB.Add('In Expected Error...in Proc Create_Reservation',1);
2084: END IF;
2085: x_return_status := FND_API.G_RET_STS_ERROR;
2086:
2087: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 2089: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Create_Reservation');

2085: x_return_status := FND_API.G_RET_STS_ERROR;
2086:
2087: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2088: IF l_debug_level > 0 THEN
2089: OE_DEBUG_PUB.Add('In Unexpected Error...in Proc Create_Reservation');
2090: END IF;
2091: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2092:
2093: WHEN OTHERS THEN

Line 2095: OE_DEBUG_PUB.Add('In others error...in Proc Create_Reservation');

2091: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2092:
2093: WHEN OTHERS THEN
2094: IF l_debug_level > 0 THEN
2095: OE_DEBUG_PUB.Add('In others error...in Proc Create_Reservation');
2096: END IF;
2097: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2098:
2099: END;

Line 2184: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

2180: CURSOR rsv_process_flag IS
2181: SELECT process_flag FROM oe_reservation_sets
2182: WHERE reservation_set_name = p_reserve_set_name;
2183: --
2184: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2185: --
2186: -- Moac
2187: l_single_org BOOLEAN := FALSE;
2188: l_old_org_id NUMBER := -99;

Line 2218: OE_DEBUG_PUB.Add('Error : Reservation set is not created by the current user',1);

2214: FND_FILE.Put_Line(FND_FILE.LOG, l_msg_data);
2215: ERRBUF := l_msg_data;
2216: RETCODE := 2;
2217: IF l_debug_level > 0 THEN
2218: OE_DEBUG_PUB.Add('Error : Reservation set is not created by the current user',1);
2219: END IF;
2220: GOTO END_OF_PROCESS;
2221: END IF;
2222: /*

Line 2224: OE_DEBUG_PUB.Add('Error: user_set_id is null',1);

2220: GOTO END_OF_PROCESS;
2221: END IF;
2222: /*
2223: IF l_user_set_id IS NULL THEN
2224: OE_DEBUG_PUB.Add('Error: user_set_id is null',1);
2225: END IF;
2226: */
2227: END IF;
2228: EXCEPTION

Line 2240: OE_DEBUG_PUB.Add('Error : Reservation set is not created by the current user',1);

2236: FND_FILE.Put_Line(FND_FILE.LOG, l_msg_data);
2237: ERRBUF := l_msg_data;
2238: RETCODE := 2;
2239: IF l_debug_level > 0 THEN
2240: OE_DEBUG_PUB.Add('Error : Reservation set is not created by the current user',1);
2241: END IF;
2242: GOTO END_OF_PROCESS;
2243: */
2244: WHEN OTHERS THEN

Line 2255: OE_DEBUG_PUB.Add('Error : Item not supplied ',1);

2251: IF p_reservation_mode = 'FAIR'
2252: AND p_inventory_item_id IS NULL
2253: THEN
2254: IF l_debug_level > 0 THEN
2255: OE_DEBUG_PUB.Add('Error : Item not supplied ',1);
2256: END IF;
2257: FND_FILE.Put_Line(FND_FILE.LOG, ' Concurrent request failed - item not supplied');
2258: ERRBUF := ' Concurrent request failed - item not supplied';
2259: RETCODE := 2;

Line 2275: OE_DEBUG_PUB.Add('Error : Percentage is null ',1);

2271: FND_FILE.Put_Line(FND_FILE.LOG, l_msg_data);
2272: ERRBUF := 'ONT_RSV_PCT_NULL';
2273: RETCODE := 2;
2274: IF l_debug_level > 0 THEN
2275: OE_DEBUG_PUB.Add('Error : Percentage is null ',1);
2276: END IF;
2277: goto END_OF_PROCESS;
2278: ELSIF p_percent > 100 OR p_percent < 1
2279: THEN

Line 2288: OE_DEBUG_PUB.Add('Error : Percentage is lesser than 1 or greater than 100 ',1);

2284: FND_FILE.Put_Line(FND_FILE.LOG, l_msg_data);
2285: ERRBUF := 'ONT_RSV_PCT_INVALID';
2286: RETCODE := 2;
2287: IF l_debug_level > 0 THEN
2288: OE_DEBUG_PUB.Add('Error : Percentage is lesser than 1 or greater than 100 ',1);
2289: END IF;
2290: goto END_OF_PROCESS;
2291: END IF;
2292: ELSIF (p_reserve_run_type = 'SIMULATE'

Line 2305: OE_DEBUG_PUB.Add('Error : Reservation Set Name is not provided ',1);

2301: FND_FILE.Put_Line(FND_FILE.LOG, l_msg_data);
2302: ERRBUF := 'ONT_RSV_SET_NOT_PROVIDED';
2303: RETCODE := 2;
2304: IF l_debug_level > 0 THEN
2305: OE_DEBUG_PUB.Add('Error : Reservation Set Name is not provided ',1);
2306: END IF;
2307: goto END_OF_PROCESS;
2308: ELSIF p_reserve_set_name IS NOT NULL
2309: AND NVL(p_override_set,'N') = 'N'

Line 2325: OE_DEBUG_PUB.Add('Error : Reservation Set Name exists ',1);

2321: FND_FILE.Put_Line(FND_FILE.LOG, l_msg_data);
2322: ERRBUF := 'ONT_RSV_SET_EXISTS';
2323: RETCODE := 2;
2324: IF l_debug_level > 0 THEN
2325: OE_DEBUG_PUB.Add('Error : Reservation Set Name exists ',1);
2326: END IF;
2327: goto END_OF_PROCESS;
2328: END IF;
2329: ELSIF p_reserve_set_name IS NOT NULL

Line 2337: OE_DEBUG_PUB.Add('Error : Reservation Set already processed ',1);

2333: CLOSE rsv_process_flag;
2334: IF l_process_flag = 'Y' THEN
2335:
2336: IF l_debug_level > 0 THEN
2337: OE_DEBUG_PUB.Add('Error : Reservation Set already processed ',1);
2338: END IF;
2339: FND_FILE.Put_Line(FND_FILE.LOG, ' Concurrent request failed - Reserevation Set already processed');
2340: ERRBUF := ' Concurrent request failed - Reserevation Set already processed';
2341: RETCODE := 2;

Line 2349: OE_DEBUG_PUB.Add('Warning : Percent is not valid for this reservation mode ',1);

2345: IF p_reservation_mode = 'FAIR'
2346: AND p_percent IS NOT NULL
2347: THEN
2348: IF l_debug_level > 0 THEN
2349: OE_DEBUG_PUB.Add('Warning : Percent is not valid for this reservation mode ',1);
2350: END IF;
2351: FND_FILE.Put_Line(FND_FILE.LOG, ' Percent is not valid for this reservation mode');
2352: ERRBUF := ' Percent is not valid for this reservation mode - hence not considered';
2353: RETCODE := 2;

Line 2405: OE_DEBUG_PUB.Add('Inside the Reserve Order Concurrent Program',1);

2401: FND_FILE.Put_Line(FND_FILE.LOG, ' Reserve Set Name = '||
2402: p_reserve_set_name);
2403:
2404: IF l_debug_level > 0 THEN
2405: OE_DEBUG_PUB.Add('Inside the Reserve Order Concurrent Program',1);
2406: END IF;
2407:
2408: SELECT FND_DATE.Canonical_To_Date(p_request_date_low),
2409: FND_DATE.Canonical_To_Date(p_request_date_high),

Line 2566: -- OE_DEBUG_PUB.Add(substr(l_stmt,1,length(l_stmt)),1);

2562: l_stmt := l_stmt || ' ORDER BY '||l_ord_by||' l.inventory_item_id,l.ship_from_org_id,l.subinventory,l.line_id';
2563: END IF;
2564: END IF;
2565:
2566: -- OE_DEBUG_PUB.Add(substr(l_stmt,1,length(l_stmt)),1);
2567:
2568: DBMS_SQL.PARSE(l_cursor_id,l_stmt,DBMS_SQL.NATIVE);
2569:
2570: -- Bind variables

Line 2646: -- OE_DEBUG_PUB.Add(length(l_stmt));

2642:
2643: -- Define the output variables
2644: DBMS_SQL.DEFINE_COLUMN(l_cursor_id,1,l_line_id);
2645:
2646: -- OE_DEBUG_PUB.Add(length(l_stmt));
2647: IF l_debug_level > 0 THEN
2648: OE_DEBUG_PUB.Add(substr(l_stmt,1,length(l_stmt)),1);
2649: END IF;
2650: l_retval := DBMS_SQL.EXECUTE(l_cursor_id);

Line 2648: OE_DEBUG_PUB.Add(substr(l_stmt,1,length(l_stmt)),1);

2644: DBMS_SQL.DEFINE_COLUMN(l_cursor_id,1,l_line_id);
2645:
2646: -- OE_DEBUG_PUB.Add(length(l_stmt));
2647: IF l_debug_level > 0 THEN
2648: OE_DEBUG_PUB.Add(substr(l_stmt,1,length(l_stmt)),1);
2649: END IF;
2650: l_retval := DBMS_SQL.EXECUTE(l_cursor_id);
2651:
2652: -- OPEN l_ref_cur_lines FOR l_stmt;

Line 2671: OE_DEBUG_PUB.Add('Lock row returned with error',1);

2667: x_return_status => l_return_status);
2668:
2669: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
2670: IF l_debug_level > 0 THEN
2671: OE_DEBUG_PUB.Add('Lock row returned with error',1);
2672: END IF;
2673: END IF;
2674:
2675: -- Updating the value of the Schedule Action Code

Line 2680: OE_DEBUG_PUB.Add('set mesg context line_id:'||l_line_rec.line_id);

2676: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
2677:
2678: l_line_rec.schedule_action_code := OESCH_ACT_RESERVE;
2679: IF l_debug_level > 0 THEN
2680: OE_DEBUG_PUB.Add('set mesg context line_id:'||l_line_rec.line_id);
2681: OE_DEBUG_PUB.Add('set mesg context header_id:'||l_line_rec.header_id);
2682: END IF;
2683:
2684: OE_MSG_PUB.Set_Msg_Context(

Line 2681: OE_DEBUG_PUB.Add('set mesg context header_id:'||l_line_rec.header_id);

2677:
2678: l_line_rec.schedule_action_code := OESCH_ACT_RESERVE;
2679: IF l_debug_level > 0 THEN
2680: OE_DEBUG_PUB.Add('set mesg context line_id:'||l_line_rec.line_id);
2681: OE_DEBUG_PUB.Add('set mesg context header_id:'||l_line_rec.header_id);
2682: END IF;
2683:
2684: OE_MSG_PUB.Set_Msg_Context(
2685: p_entity_code => 'LINE'

Line 2707: OE_DEBUG_PUB.Add('Require Reservation returned with error for

2703: );
2704:
2705: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
2706: IF l_debug_level > 0 THEN
2707: OE_DEBUG_PUB.Add('Require Reservation returned with error for
2708: Line id:'||l_line_rec.line_id,1);
2709: END IF;
2710:
2711: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

Line 2713: OE_DEBUG_PUB.Add('Require Reservation returned with error for

2709: END IF;
2710:
2711: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2712: IF l_debug_level > 0 THEN
2713: OE_DEBUG_PUB.Add('Require Reservation returned with error for
2714: Line id:'||l_line_rec.line_id,1);
2715: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));
2716: END IF;
2717:

Line 2715: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));

2711: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2712: IF l_debug_level > 0 THEN
2713: OE_DEBUG_PUB.Add('Require Reservation returned with error for
2714: Line id:'||l_line_rec.line_id,1);
2715: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));
2716: END IF;
2717:
2718: END IF;
2719: ELSE

Line 2738: OE_DEBUG_PUB.Add('Create Reservation returned with

2734:
2735: -- 4287740 Start
2736: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
2737: IF l_debug_level > 0 THEN
2738: OE_DEBUG_PUB.Add('Create Reservation returned with
2739: Expected error for Line id:' ||l_line_rec.line_id,1);
2740: END IF;
2741: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2742: IF l_debug_level > 0 THEN

Line 2743: OE_DEBUG_PUB.Add('Create Reservation returned with

2739: Expected error for Line id:' ||l_line_rec.line_id,1);
2740: END IF;
2741: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2742: IF l_debug_level > 0 THEN
2743: OE_DEBUG_PUB.Add('Create Reservation returned with
2744: Unexpected error for Line id:'||l_line_rec.line_id,1);
2745: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));
2746: END IF;
2747: ELSE

Line 2745: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));

2741: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2742: IF l_debug_level > 0 THEN
2743: OE_DEBUG_PUB.Add('Create Reservation returned with
2744: Unexpected error for Line id:'||l_line_rec.line_id,1);
2745: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));
2746: END IF;
2747: ELSE
2748: COMMIT;
2749: END IF;

Line 2792: OE_DEBUG_PUB.Add('Create Reservation returned with

2788: --4287740 Commented the below code as it has been moved up
2789: /*
2790: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
2791: IF l_debug_level > 0 THEN
2792: OE_DEBUG_PUB.Add('Create Reservation returned with
2793: Expected error for Line id:' ||l_line_rec.line_id,1);
2794: END IF;
2795: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2796: IF l_debug_level > 0 THEN

Line 2797: OE_DEBUG_PUB.Add('Create Reservation returned with

2793: Expected error for Line id:' ||l_line_rec.line_id,1);
2794: END IF;
2795: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2796: IF l_debug_level > 0 THEN
2797: OE_DEBUG_PUB.Add('Create Reservation returned with
2798: Unexpected error for Line id:'||l_line_rec.line_id,1);
2799: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));
2800: END IF;
2801: ELSE

Line 2799: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));

2795: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2796: IF l_debug_level > 0 THEN
2797: OE_DEBUG_PUB.Add('Create Reservation returned with
2798: Unexpected error for Line id:'||l_line_rec.line_id,1);
2799: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));
2800: END IF;
2801: ELSE
2802: COMMIT;
2803: END IF;

Line 2825: OE_DEBUG_PUB.Add('Warning : No lines were eligible for reservation.',1);

2821: l_msg_data := Fnd_Message.get_string('ONT', 'ONT_NO_LINES_RSV_ELIGIBLE');
2822: FND_FILE.Put_Line(FND_FILE.LOG, l_msg_data);
2823: RETCODE := 1;
2824: IF l_debug_level > 0 THEN
2825: OE_DEBUG_PUB.Add('Warning : No lines were eligible for reservation.',1);
2826: END IF;
2827:
2828: IF p_reserve_set_name IS NOT NULL
2829: THEN

Line 2838: OE_DEBUG_PUB.Add('Warning : The set is not created as no eligible lines were selected',1);

2834: l_msg_data := Fnd_Message.get_string('ONT', 'ONT_RSV_SET_NOT_CREATED');
2835: FND_FILE.Put_Line(FND_FILE.LOG, l_msg_data);
2836: RETCODE := 1;
2837: IF l_debug_level > 0 THEN
2838: OE_DEBUG_PUB.Add('Warning : The set is not created as no eligible lines were selected',1);
2839: END IF;
2840: END IF;
2841:
2842: GOTO END_OF_PROCESS;

Line 3031: OE_DEBUG_PUB.Add('Exiting Reserve procedure ',1);

3027:
3028:
3029: <>
3030: IF l_debug_level > 0 THEN
3031: OE_DEBUG_PUB.Add('Exiting Reserve procedure ',1);
3032: END IF;
3033:
3034:
3035: EXCEPTION

Line 3038: OE_DEBUG_PUB.Add('Inside the When Others Execption',1);

3034:
3035: EXCEPTION
3036: WHEN OTHERS THEN
3037: IF l_debug_level > 0 THEN
3038: OE_DEBUG_PUB.Add('Inside the When Others Execption',1);
3039: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));
3040: END IF;
3041: END Reserve;
3042:

Line 3039: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));

3035: EXCEPTION
3036: WHEN OTHERS THEN
3037: IF l_debug_level > 0 THEN
3038: OE_DEBUG_PUB.Add('Inside the When Others Execption',1);
3039: OE_DEBUG_PUB.Add(substr(sqlerrm, 1, 2000));
3040: END IF;
3041: END Reserve;
3042:
3043: