DBA Data[Home] [Help]

APPS.INV_RESERVATION_VALIDATE_PVT dependencies on FND_API

Line 30: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

26: x_return_status OUT NOCOPY VARCHAR2
27: , p_organization_id IN NUMBER
28: , x_org_cache_index out NOCOPY INTEGER
29: ) IS
30: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
31: l_index NUMBER := NULL;
32: l_rec inv_reservation_global.organization_record;
33:
34: BEGIN

Line 39: RAISE fnd_api.g_exc_error;

35: --
36: IF p_organization_id IS NULL THEN
37: fnd_message.set_name('INV', 'INV_NO ORG INFORMATION');
38: fnd_msg_pub.add;
39: RAISE fnd_api.g_exc_error;
40: END IF;
41: --
42: inv_reservation_util_pvt.search_organization_cache
43: (

Line 49: IF l_return_status = fnd_api.g_ret_sts_error THEN

45: , p_organization_id => p_organization_id
46: , x_index => l_index
47: );
48: --
49: IF l_return_status = fnd_api.g_ret_sts_error THEN
50: RAISE fnd_api.g_exc_error;
51: End IF ;
52: --
53: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 50: RAISE fnd_api.g_exc_error;

46: , x_index => l_index
47: );
48: --
49: IF l_return_status = fnd_api.g_ret_sts_error THEN
50: RAISE fnd_api.g_exc_error;
51: End IF ;
52: --
53: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
54: RAISE fnd_api.g_exc_unexpected_error;

Line 53: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

49: IF l_return_status = fnd_api.g_ret_sts_error THEN
50: RAISE fnd_api.g_exc_error;
51: End IF ;
52: --
53: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
54: RAISE fnd_api.g_exc_unexpected_error;
55: End IF;
56: --
57: IF l_index IS NULL THEN

Line 54: RAISE fnd_api.g_exc_unexpected_error;

50: RAISE fnd_api.g_exc_error;
51: End IF ;
52: --
53: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
54: RAISE fnd_api.g_exc_unexpected_error;
55: End IF;
56: --
57: IF l_index IS NULL THEN
58: /* BEGIN

Line 72: RAISE fnd_api.g_exc_error;

68: EXCEPTION
69: WHEN no_data_found THEN
70: fnd_message.set_name('INV', 'INVALID ORGANIZATION');
71: fnd_msg_pub.add;
72: RAISE fnd_api.g_exc_error;
73: END;
74: */
75: -- Modified to call common API
76: l_rec.organization_id:=p_organization_id;

Line 82: RAISE fnd_api.g_exc_error;

78: p_org => l_rec
79: )=INV_Validate.F THEN
80: fnd_message.set_name('INV', 'INVALID ORGANIZATION');
81: fnd_msg_pub.add;
82: RAISE fnd_api.g_exc_error;
83: END IF;
84:
85: --
86: inv_reservation_util_pvt.add_organization_cache

Line 93: IF l_return_status = fnd_api.g_ret_sts_error THEN

89: , p_organization_record => l_rec
90: , x_index => l_index
91: );
92: --
93: IF l_return_status = fnd_api.g_ret_sts_error THEN
94: RAISE fnd_api.g_exc_error;
95: End IF ;
96:
97: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 94: RAISE fnd_api.g_exc_error;

90: , x_index => l_index
91: );
92: --
93: IF l_return_status = fnd_api.g_ret_sts_error THEN
94: RAISE fnd_api.g_exc_error;
95: End IF ;
96:
97: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
98: RAISE fnd_api.g_exc_unexpected_error;

Line 97: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

93: IF l_return_status = fnd_api.g_ret_sts_error THEN
94: RAISE fnd_api.g_exc_error;
95: End IF ;
96:
97: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
98: RAISE fnd_api.g_exc_unexpected_error;
99: End IF;
100: --
101: END IF;

Line 98: RAISE fnd_api.g_exc_unexpected_error;

94: RAISE fnd_api.g_exc_error;
95: End IF ;
96:
97: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
98: RAISE fnd_api.g_exc_unexpected_error;
99: End IF;
100: --
101: END IF;
102: --

Line 107: WHEN fnd_api.g_exc_error THEN

103: x_org_cache_index := l_index;
104: x_return_status := l_return_status;
105: --
106: EXCEPTION
107: WHEN fnd_api.g_exc_error THEN
108: x_return_status := fnd_api.g_ret_sts_error;
109: --
110: WHEN fnd_api.g_exc_unexpected_error THEN
111: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 108: x_return_status := fnd_api.g_ret_sts_error;

104: x_return_status := l_return_status;
105: --
106: EXCEPTION
107: WHEN fnd_api.g_exc_error THEN
108: x_return_status := fnd_api.g_ret_sts_error;
109: --
110: WHEN fnd_api.g_exc_unexpected_error THEN
111: x_return_status := fnd_api.g_ret_sts_unexp_error ;
112: --

Line 110: WHEN fnd_api.g_exc_unexpected_error THEN

106: EXCEPTION
107: WHEN fnd_api.g_exc_error THEN
108: x_return_status := fnd_api.g_ret_sts_error;
109: --
110: WHEN fnd_api.g_exc_unexpected_error THEN
111: x_return_status := fnd_api.g_ret_sts_unexp_error ;
112: --
113: WHEN OTHERS THEN
114: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 111: x_return_status := fnd_api.g_ret_sts_unexp_error ;

107: WHEN fnd_api.g_exc_error THEN
108: x_return_status := fnd_api.g_ret_sts_error;
109: --
110: WHEN fnd_api.g_exc_unexpected_error THEN
111: x_return_status := fnd_api.g_ret_sts_unexp_error ;
112: --
113: WHEN OTHERS THEN
114: x_return_status := fnd_api.g_ret_sts_unexp_error ;
115: --

Line 114: x_return_status := fnd_api.g_ret_sts_unexp_error ;

110: WHEN fnd_api.g_exc_unexpected_error THEN
111: x_return_status := fnd_api.g_ret_sts_unexp_error ;
112: --
113: WHEN OTHERS THEN
114: x_return_status := fnd_api.g_ret_sts_unexp_error ;
115: --
116: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
117: THEN
118: fnd_msg_pub.add_exc_msg

Line 139: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

135: , p_inventory_item_id IN NUMBER
136: , p_organization_id IN NUMBER
137: , x_item_cache_index OUT NOCOPY INTEGER
138: ) IS
139: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
140: l_rec inv_reservation_global.item_record;
141: l_index NUMBER := NULL;
142: -- Added to call common API
143: l_rec_org inv_reservation_global.organization_record;

Line 151: RAISE fnd_api.g_exc_error;

147: --
148: IF p_inventory_item_id IS NULL THEN
149: fnd_message.set_name('INV', 'INV_ENTER_ITEM');
150: fnd_msg_pub.add;
151: RAISE fnd_api.g_exc_error;
152: END IF;
153: --
154: inv_reservation_util_pvt.search_item_cache
155: (

Line 162: IF l_return_status = fnd_api.g_ret_sts_error THEN

158: , p_organization_id => p_organization_id
159: , x_index => l_index
160: );
161: --
162: IF l_return_status = fnd_api.g_ret_sts_error THEN
163: RAISE fnd_api.g_exc_error;
164: End IF ;
165: --
166: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 163: RAISE fnd_api.g_exc_error;

159: , x_index => l_index
160: );
161: --
162: IF l_return_status = fnd_api.g_ret_sts_error THEN
163: RAISE fnd_api.g_exc_error;
164: End IF ;
165: --
166: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
167: RAISE fnd_api.g_exc_unexpected_error;

Line 166: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

162: IF l_return_status = fnd_api.g_ret_sts_error THEN
163: RAISE fnd_api.g_exc_error;
164: End IF ;
165: --
166: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
167: RAISE fnd_api.g_exc_unexpected_error;
168: End IF;
169: --
170: IF l_index IS NULL THEN

Line 167: RAISE fnd_api.g_exc_unexpected_error;

163: RAISE fnd_api.g_exc_error;
164: End IF ;
165: --
166: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
167: RAISE fnd_api.g_exc_unexpected_error;
168: End IF;
169: --
170: IF l_index IS NULL THEN
171: /* BEGIN -- not in cache, load it

Line 193: RAISE fnd_api.g_exc_error;

189: EXCEPTION
190: WHEN no_data_found THEN
191: fnd_message.set_name('INV', 'INVALID ORGANIZATION');
192: fnd_msg_pub.add;
193: RAISE fnd_api.g_exc_error;
194: END;*/
195: -- Modified to call new common API
196: l_rec.inventory_item_id:=p_inventory_item_id;
197: IF INV_Validate.Inventory_Item(

Line 203: RAISE fnd_api.g_exc_error;

199: p_org => l_rec_org
200: )=INV_Validate.F THEN
201: fnd_message.set_name('INV', 'INVALID ITEM');
202: fnd_msg_pub.add;
203: RAISE fnd_api.g_exc_error;
204: END IF;
205:
206: --
207: IF l_rec.reservable_type = 2 THEN /* non reservable item */

Line 210: RAISE fnd_api.g_exc_error;

206: --
207: IF l_rec.reservable_type = 2 THEN /* non reservable item */
208: fnd_message.set_name('INV','INV-ITEM NOT RESERVABLE');
209: fnd_msg_pub.add;
210: RAISE fnd_api.g_exc_error;
211: END IF;
212: --
213: inv_reservation_util_pvt.add_item_cache
214: (

Line 220: IF l_return_status = fnd_api.g_ret_sts_error THEN

216: , p_item_record => l_rec
217: , x_index => l_index
218: );
219: --
220: IF l_return_status = fnd_api.g_ret_sts_error THEN
221: RAISE fnd_api.g_exc_error;
222: End IF ;
223: --
224: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 221: RAISE fnd_api.g_exc_error;

217: , x_index => l_index
218: );
219: --
220: IF l_return_status = fnd_api.g_ret_sts_error THEN
221: RAISE fnd_api.g_exc_error;
222: End IF ;
223: --
224: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
225: RAISE fnd_api.g_exc_unexpected_error;

Line 224: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

220: IF l_return_status = fnd_api.g_ret_sts_error THEN
221: RAISE fnd_api.g_exc_error;
222: End IF ;
223: --
224: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
225: RAISE fnd_api.g_exc_unexpected_error;
226: END IF;
227: END IF;
228: --

Line 225: RAISE fnd_api.g_exc_unexpected_error;

221: RAISE fnd_api.g_exc_error;
222: End IF ;
223: --
224: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
225: RAISE fnd_api.g_exc_unexpected_error;
226: END IF;
227: END IF;
228: --
229: x_item_cache_index := l_index;

Line 233: WHEN fnd_api.g_exc_error THEN

229: x_item_cache_index := l_index;
230: x_return_status := l_return_status;
231: --
232: EXCEPTION
233: WHEN fnd_api.g_exc_error THEN
234: x_return_status := fnd_api.g_ret_sts_error;
235: --
236: WHEN fnd_api.g_exc_unexpected_error THEN
237: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 234: x_return_status := fnd_api.g_ret_sts_error;

230: x_return_status := l_return_status;
231: --
232: EXCEPTION
233: WHEN fnd_api.g_exc_error THEN
234: x_return_status := fnd_api.g_ret_sts_error;
235: --
236: WHEN fnd_api.g_exc_unexpected_error THEN
237: x_return_status := fnd_api.g_ret_sts_unexp_error ;
238: --

Line 236: WHEN fnd_api.g_exc_unexpected_error THEN

232: EXCEPTION
233: WHEN fnd_api.g_exc_error THEN
234: x_return_status := fnd_api.g_ret_sts_error;
235: --
236: WHEN fnd_api.g_exc_unexpected_error THEN
237: x_return_status := fnd_api.g_ret_sts_unexp_error ;
238: --
239: WHEN OTHERS THEN
240: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 237: x_return_status := fnd_api.g_ret_sts_unexp_error ;

233: WHEN fnd_api.g_exc_error THEN
234: x_return_status := fnd_api.g_ret_sts_error;
235: --
236: WHEN fnd_api.g_exc_unexpected_error THEN
237: x_return_status := fnd_api.g_ret_sts_unexp_error ;
238: --
239: WHEN OTHERS THEN
240: x_return_status := fnd_api.g_ret_sts_unexp_error ;
241: --

Line 240: x_return_status := fnd_api.g_ret_sts_unexp_error ;

236: WHEN fnd_api.g_exc_unexpected_error THEN
237: x_return_status := fnd_api.g_ret_sts_unexp_error ;
238: --
239: WHEN OTHERS THEN
240: x_return_status := fnd_api.g_ret_sts_unexp_error ;
241: --
242: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
243: THEN
244: fnd_msg_pub.add_exc_msg

Line 277: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

273: l_valid_supply VARCHAR2(1);
274: /*** {{ R12 Enhanced reservations code changes }}***/
275: l_dropship_count NUMBER := 0;
276: l_debug NUMBER;
277: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
278: l_msg_count NUMBER;
279: l_msg_data VARCHAR2(1000);
280: l_valid_status VARCHAR2(1);
281: /*** End R12 }} ***/

Line 307: RAISE fnd_api.g_exc_error;

303:
304: --error message
305: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_PO');
306: fnd_msg_pub.add;
307: RAISE fnd_api.g_exc_error;
308: END IF;
309: *** End R12 }} ***/
310:
311: /*** {{ R12 Enhanced reservations code changes ***/

Line 340: , p_init_msg_lst => fnd_api.g_false

336: , p_supply_demand_line_detail => p_supply_source_line_detail
337: , p_demand_ship_date => p_demand_ship_date
338: , p_expected_receipt_date => p_supply_receipt_date
339: , p_api_version_number => 1.0
340: , p_init_msg_lst => fnd_api.g_false
341: );
342:
343: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
344: RAISE fnd_api.g_exc_error;

Line 343: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

339: , p_api_version_number => 1.0
340: , p_init_msg_lst => fnd_api.g_false
341: );
342:
343: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
344: RAISE fnd_api.g_exc_error;
345: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
346: RAISE fnd_api.g_exc_unexpected_error;
347: END IF;

Line 344: RAISE fnd_api.g_exc_error;

340: , p_init_msg_lst => fnd_api.g_false
341: );
342:
343: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
344: RAISE fnd_api.g_exc_error;
345: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
346: RAISE fnd_api.g_exc_unexpected_error;
347: END IF;
348:

Line 345: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

341: );
342:
343: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
344: RAISE fnd_api.g_exc_error;
345: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
346: RAISE fnd_api.g_exc_unexpected_error;
347: END IF;
348:
349: IF (l_debug = 1) THEN

Line 346: RAISE fnd_api.g_exc_unexpected_error;

342:
343: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
344: RAISE fnd_api.g_exc_error;
345: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
346: RAISE fnd_api.g_exc_unexpected_error;
347: END IF;
348:
349: IF (l_debug = 1) THEN
350: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 356: RAISE fnd_api.g_exc_error;

352:
353: IF (l_valid_status = 'N') THEN
354: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_PO');
355: fnd_msg_pub.ADD;
356: RAISE fnd_api.g_exc_error;
357: END IF;
358:
359: select count(1)
360: into l_dropship_count

Line 373: RAISE fnd_api.g_exc_error;

369: IF (l_dropship_count >= 1) THEN
370: fnd_message.set_name('INV', 'INV_RSV_DS_SO_SUP');
371: fnd_message.set_name('SOURCE', 'PO');
372: fnd_msg_pub.add;
373: RAISE fnd_api.g_exc_error;
374: END IF;
375: ELSE
376: IF (l_debug = 1) THEN
377: debug_print('The transation source type is not PO');

Line 379: RAISE fnd_api.g_exc_error;

375: ELSE
376: IF (l_debug = 1) THEN
377: debug_print('The transation source type is not PO');
378: END IF;
379: RAISE fnd_api.g_exc_error;
380:
381: END IF;
382: /*** End R12 }} ***/
383:

Line 387: WHEN fnd_api.g_exc_error THEN

383:
384: x_return_status := l_return_status;
385:
386: EXCEPTION
387: WHEN fnd_api.g_exc_error THEN
388: x_return_status := fnd_api.g_ret_sts_error;
389: --
390: WHEN fnd_api.g_exc_unexpected_error THEN
391: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 388: x_return_status := fnd_api.g_ret_sts_error;

384: x_return_status := l_return_status;
385:
386: EXCEPTION
387: WHEN fnd_api.g_exc_error THEN
388: x_return_status := fnd_api.g_ret_sts_error;
389: --
390: WHEN fnd_api.g_exc_unexpected_error THEN
391: x_return_status := fnd_api.g_ret_sts_unexp_error ;
392: --

Line 390: WHEN fnd_api.g_exc_unexpected_error THEN

386: EXCEPTION
387: WHEN fnd_api.g_exc_error THEN
388: x_return_status := fnd_api.g_ret_sts_error;
389: --
390: WHEN fnd_api.g_exc_unexpected_error THEN
391: x_return_status := fnd_api.g_ret_sts_unexp_error ;
392: --
393: WHEN OTHERS THEN
394: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 391: x_return_status := fnd_api.g_ret_sts_unexp_error ;

387: WHEN fnd_api.g_exc_error THEN
388: x_return_status := fnd_api.g_ret_sts_error;
389: --
390: WHEN fnd_api.g_exc_unexpected_error THEN
391: x_return_status := fnd_api.g_ret_sts_unexp_error ;
392: --
393: WHEN OTHERS THEN
394: x_return_status := fnd_api.g_ret_sts_unexp_error ;
395: --

Line 394: x_return_status := fnd_api.g_ret_sts_unexp_error ;

390: WHEN fnd_api.g_exc_unexpected_error THEN
391: x_return_status := fnd_api.g_ret_sts_unexp_error ;
392: --
393: WHEN OTHERS THEN
394: x_return_status := fnd_api.g_ret_sts_unexp_error ;
395: --
396: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
397: THEN
398: fnd_msg_pub.add_exc_msg

Line 432: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

428: l_valid_supply VARCHAR2(1);
429: /*** {{ R12 Enhanced reservations code changes }}***/
430: l_dropship_count NUMBER := 0;
431: l_debug NUMBER;
432: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
433: l_msg_count NUMBER;
434: l_msg_data VARCHAR2(1000);
435: l_valid_status VARCHAR2(1);
436: /*** End R12 }} ***/

Line 469: RAISE fnd_api.g_exc_error;

465:
466: --error message
467: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_REQ');
468: fnd_msg_pub.add;
469: RAISE fnd_api.g_exc_error;
470: END IF;
471:
472: select count(1)
473: into l_dropship_count

Line 486: RAISE fnd_api.g_exc_error;

482: IF (l_dropship_count >= 1) THEN
483: fnd_message.set_name('INV', 'INV_RSV_DS_SO_SUP');
484: fnd_message.set_token('SOURCE', 'requisition');
485: fnd_msg_pub.add;
486: RAISE fnd_api.g_exc_error;
487: END IF;
488: ELSE
489: IF (l_debug = 1) THEN
490: debug_print('The transation source type is not requisition');

Line 492: RAISE fnd_api.g_exc_error;

488: ELSE
489: IF (l_debug = 1) THEN
490: debug_print('The transation source type is not requisition');
491: END IF;
492: RAISE fnd_api.g_exc_error;
493:
494: END IF;
495: /*** End R12 }} ***/
496:

Line 500: WHEN fnd_api.g_exc_error THEN

496:
497: x_return_status := l_return_status;
498:
499: EXCEPTION
500: WHEN fnd_api.g_exc_error THEN
501: x_return_status := fnd_api.g_ret_sts_error;
502: --
503: WHEN fnd_api.g_exc_unexpected_error THEN
504: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 501: x_return_status := fnd_api.g_ret_sts_error;

497: x_return_status := l_return_status;
498:
499: EXCEPTION
500: WHEN fnd_api.g_exc_error THEN
501: x_return_status := fnd_api.g_ret_sts_error;
502: --
503: WHEN fnd_api.g_exc_unexpected_error THEN
504: x_return_status := fnd_api.g_ret_sts_unexp_error ;
505: --

Line 503: WHEN fnd_api.g_exc_unexpected_error THEN

499: EXCEPTION
500: WHEN fnd_api.g_exc_error THEN
501: x_return_status := fnd_api.g_ret_sts_error;
502: --
503: WHEN fnd_api.g_exc_unexpected_error THEN
504: x_return_status := fnd_api.g_ret_sts_unexp_error ;
505: --
506: WHEN OTHERS THEN
507: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 504: x_return_status := fnd_api.g_ret_sts_unexp_error ;

500: WHEN fnd_api.g_exc_error THEN
501: x_return_status := fnd_api.g_ret_sts_error;
502: --
503: WHEN fnd_api.g_exc_unexpected_error THEN
504: x_return_status := fnd_api.g_ret_sts_unexp_error ;
505: --
506: WHEN OTHERS THEN
507: x_return_status := fnd_api.g_ret_sts_unexp_error ;
508: --

Line 507: x_return_status := fnd_api.g_ret_sts_unexp_error ;

503: WHEN fnd_api.g_exc_unexpected_error THEN
504: x_return_status := fnd_api.g_ret_sts_unexp_error ;
505: --
506: WHEN OTHERS THEN
507: x_return_status := fnd_api.g_ret_sts_unexp_error ;
508: --
509: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
510: THEN
511: fnd_msg_pub.add_exc_msg

Line 538: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

534: , p_supply_source_line_id IN NUMBER
535: , p_supply_source_line_detail IN NUMBER
536: ) IS
537: l_debug NUMBER;
538: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
539: l_msg_count NUMBER;
540: l_msg_data VARCHAR2(1000);
541: l_valid_status VARCHAR2(1);
542:

Line 573: , p_init_msg_lst => fnd_api.g_false

569: , p_supply_demand_line_detail => p_supply_source_line_detail
570: , p_demand_ship_date => p_demand_ship_date
571: , p_expected_receipt_date => p_supply_receipt_date
572: , p_api_version_number => 1.0
573: , p_init_msg_lst => fnd_api.g_false
574: );
575:
576: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
577: RAISE fnd_api.g_exc_error;

Line 576: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

572: , p_api_version_number => 1.0
573: , p_init_msg_lst => fnd_api.g_false
574: );
575:
576: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
577: RAISE fnd_api.g_exc_error;
578: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
579: RAISE fnd_api.g_exc_unexpected_error;
580: END IF;

Line 577: RAISE fnd_api.g_exc_error;

573: , p_init_msg_lst => fnd_api.g_false
574: );
575:
576: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
577: RAISE fnd_api.g_exc_error;
578: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
579: RAISE fnd_api.g_exc_unexpected_error;
580: END IF;
581:

Line 578: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

574: );
575:
576: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
577: RAISE fnd_api.g_exc_error;
578: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
579: RAISE fnd_api.g_exc_unexpected_error;
580: END IF;
581:
582: IF (l_debug = 1) THEN

Line 579: RAISE fnd_api.g_exc_unexpected_error;

575:
576: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
577: RAISE fnd_api.g_exc_error;
578: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
579: RAISE fnd_api.g_exc_unexpected_error;
580: END IF;
581:
582: IF (l_debug = 1) THEN
583: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 589: RAISE fnd_api.g_exc_error;

585:
586: IF (l_valid_status = 'N') THEN
587: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_INTREQ');
588: fnd_msg_pub.ADD;
589: RAISE fnd_api.g_exc_error;
590: END IF;
591: ELSE
592: IF (l_debug = 1) THEN
593: debug_print('The transation source type is not internal requisition');

Line 595: RAISE fnd_api.g_exc_error;

591: ELSE
592: IF (l_debug = 1) THEN
593: debug_print('The transation source type is not internal requisition');
594: END IF;
595: RAISE fnd_api.g_exc_error;
596:
597: END IF;
598: /*** End R12 }} ***/
599:

Line 603: WHEN fnd_api.g_exc_error THEN

599:
600: x_return_status := l_return_status;
601:
602: EXCEPTION
603: WHEN fnd_api.g_exc_error THEN
604: x_return_status := fnd_api.g_ret_sts_error;
605: --
606: WHEN fnd_api.g_exc_unexpected_error THEN
607: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 604: x_return_status := fnd_api.g_ret_sts_error;

600: x_return_status := l_return_status;
601:
602: EXCEPTION
603: WHEN fnd_api.g_exc_error THEN
604: x_return_status := fnd_api.g_ret_sts_error;
605: --
606: WHEN fnd_api.g_exc_unexpected_error THEN
607: x_return_status := fnd_api.g_ret_sts_unexp_error ;
608: --

Line 606: WHEN fnd_api.g_exc_unexpected_error THEN

602: EXCEPTION
603: WHEN fnd_api.g_exc_error THEN
604: x_return_status := fnd_api.g_ret_sts_error;
605: --
606: WHEN fnd_api.g_exc_unexpected_error THEN
607: x_return_status := fnd_api.g_ret_sts_unexp_error ;
608: --
609: WHEN OTHERS THEN
610: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 607: x_return_status := fnd_api.g_ret_sts_unexp_error ;

603: WHEN fnd_api.g_exc_error THEN
604: x_return_status := fnd_api.g_ret_sts_error;
605: --
606: WHEN fnd_api.g_exc_unexpected_error THEN
607: x_return_status := fnd_api.g_ret_sts_unexp_error ;
608: --
609: WHEN OTHERS THEN
610: x_return_status := fnd_api.g_ret_sts_unexp_error ;
611: --

Line 610: x_return_status := fnd_api.g_ret_sts_unexp_error ;

606: WHEN fnd_api.g_exc_unexpected_error THEN
607: x_return_status := fnd_api.g_ret_sts_unexp_error ;
608: --
609: WHEN OTHERS THEN
610: x_return_status := fnd_api.g_ret_sts_unexp_error ;
611: --
612: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
613: THEN
614: fnd_msg_pub.add_exc_msg

Line 643: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

639: ) IS
640:
641: l_wms_enabled VARCHAR2(1) := 'N';
642: l_debug NUMBER;
643: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
644: l_msg_count NUMBER;
645: l_msg_data VARCHAR2(1000);
646: l_valid_status VARCHAR2(1);
647: BEGIN

Line 678: , p_init_msg_lst => fnd_api.g_false

674: , p_supply_demand_line_detail => p_supply_source_line_detail
675: , p_demand_ship_date => p_demand_ship_date
676: , p_expected_receipt_date => p_supply_receipt_date
677: , p_api_version_number => 1.0
678: , p_init_msg_lst => fnd_api.g_false
679: );
680:
681: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
682: RAISE fnd_api.g_exc_error;

Line 681: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

677: , p_api_version_number => 1.0
678: , p_init_msg_lst => fnd_api.g_false
679: );
680:
681: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
682: RAISE fnd_api.g_exc_error;
683: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
684: RAISE fnd_api.g_exc_unexpected_error;
685: END IF;

Line 682: RAISE fnd_api.g_exc_error;

678: , p_init_msg_lst => fnd_api.g_false
679: );
680:
681: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
682: RAISE fnd_api.g_exc_error;
683: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
684: RAISE fnd_api.g_exc_unexpected_error;
685: END IF;
686:

Line 683: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

679: );
680:
681: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
682: RAISE fnd_api.g_exc_error;
683: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
684: RAISE fnd_api.g_exc_unexpected_error;
685: END IF;
686:
687: IF (l_debug = 1) THEN

Line 684: RAISE fnd_api.g_exc_unexpected_error;

680:
681: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
682: RAISE fnd_api.g_exc_error;
683: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
684: RAISE fnd_api.g_exc_unexpected_error;
685: END IF;
686:
687: IF (l_debug = 1) THEN
688: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 694: RAISE fnd_api.g_exc_error;

690:
691: IF (l_valid_status = 'N') THEN
692: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_ASN');
693: fnd_msg_pub.ADD;
694: RAISE fnd_api.g_exc_error;
695: END IF;
696:
697: SELECT wms_enabled_flag
698: INTO l_wms_enabled

Line 710: RAISE fnd_api.g_exc_error;

706: IF (l_wms_enabled = 'N') THEN
707: fnd_message.set_name('INV', 'INV_RSV_NON_WMS');
708: fnd_message.set_name('SOURCE', 'ASN');
709: fnd_msg_pub.add;
710: RAISE fnd_api.g_exc_error;
711: END IF;
712: ELSE
713: IF (l_debug = 1) THEN
714: debug_print('The transation source type is not ASN');

Line 716: RAISE fnd_api.g_exc_error;

712: ELSE
713: IF (l_debug = 1) THEN
714: debug_print('The transation source type is not ASN');
715: END IF;
716: RAISE fnd_api.g_exc_error;
717:
718: END IF;
719: x_return_status := l_return_status;
720:

Line 722: WHEN fnd_api.g_exc_error THEN

718: END IF;
719: x_return_status := l_return_status;
720:
721: EXCEPTION
722: WHEN fnd_api.g_exc_error THEN
723: x_return_status := fnd_api.g_ret_sts_error;
724: --
725: WHEN fnd_api.g_exc_unexpected_error THEN
726: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 723: x_return_status := fnd_api.g_ret_sts_error;

719: x_return_status := l_return_status;
720:
721: EXCEPTION
722: WHEN fnd_api.g_exc_error THEN
723: x_return_status := fnd_api.g_ret_sts_error;
724: --
725: WHEN fnd_api.g_exc_unexpected_error THEN
726: x_return_status := fnd_api.g_ret_sts_unexp_error ;
727: --

Line 725: WHEN fnd_api.g_exc_unexpected_error THEN

721: EXCEPTION
722: WHEN fnd_api.g_exc_error THEN
723: x_return_status := fnd_api.g_ret_sts_error;
724: --
725: WHEN fnd_api.g_exc_unexpected_error THEN
726: x_return_status := fnd_api.g_ret_sts_unexp_error ;
727: --
728: WHEN OTHERS THEN
729: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 726: x_return_status := fnd_api.g_ret_sts_unexp_error ;

722: WHEN fnd_api.g_exc_error THEN
723: x_return_status := fnd_api.g_ret_sts_error;
724: --
725: WHEN fnd_api.g_exc_unexpected_error THEN
726: x_return_status := fnd_api.g_ret_sts_unexp_error ;
727: --
728: WHEN OTHERS THEN
729: x_return_status := fnd_api.g_ret_sts_unexp_error ;
730: --

Line 729: x_return_status := fnd_api.g_ret_sts_unexp_error ;

725: WHEN fnd_api.g_exc_unexpected_error THEN
726: x_return_status := fnd_api.g_ret_sts_unexp_error ;
727: --
728: WHEN OTHERS THEN
729: x_return_status := fnd_api.g_ret_sts_unexp_error ;
730: --
731: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
732: THEN
733: fnd_msg_pub.add_exc_msg

Line 762: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

758:
759: l_wms_enabled VARCHAR2(1) := 'N';
760: l_replenish_to_order VARCHAR2(1) := 'N';
761: l_debug NUMBER;
762: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
763: l_msg_count NUMBER;
764: l_msg_data VARCHAR2(1000);
765: l_valid_status VARCHAR2(1);
766: BEGIN

Line 797: , p_init_msg_lst => fnd_api.g_false

793: , p_supply_demand_line_detail => p_supply_source_line_detail
794: , p_demand_ship_date => p_demand_ship_date
795: , p_expected_receipt_date => p_supply_receipt_date
796: , p_api_version_number => 1.0
797: , p_init_msg_lst => fnd_api.g_false
798: );
799:
800: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
801: RAISE fnd_api.g_exc_error;

Line 800: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

796: , p_api_version_number => 1.0
797: , p_init_msg_lst => fnd_api.g_false
798: );
799:
800: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
801: RAISE fnd_api.g_exc_error;
802: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
803: RAISE fnd_api.g_exc_unexpected_error;
804: END IF;

Line 801: RAISE fnd_api.g_exc_error;

797: , p_init_msg_lst => fnd_api.g_false
798: );
799:
800: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
801: RAISE fnd_api.g_exc_error;
802: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
803: RAISE fnd_api.g_exc_unexpected_error;
804: END IF;
805:

Line 802: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

798: );
799:
800: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
801: RAISE fnd_api.g_exc_error;
802: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
803: RAISE fnd_api.g_exc_unexpected_error;
804: END IF;
805:
806: IF (l_debug = 1) THEN

Line 803: RAISE fnd_api.g_exc_unexpected_error;

799:
800: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
801: RAISE fnd_api.g_exc_error;
802: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
803: RAISE fnd_api.g_exc_unexpected_error;
804: END IF;
805:
806: IF (l_debug = 1) THEN
807: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 813: RAISE fnd_api.g_exc_error;

809:
810: IF (l_valid_status = 'N') THEN
811: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_INTRAN');
812: fnd_msg_pub.ADD;
813: RAISE fnd_api.g_exc_error;
814: END IF;
815:
816: SELECT wms_enabled_flag
817: INTO l_wms_enabled

Line 829: RAISE fnd_api.g_exc_error;

825: IF (l_wms_enabled = 'N') THEN
826: fnd_message.set_name('INV', 'INV_RSV_NON_WMS');
827: fnd_message.set_name('SOURCE', 'intransit shipment');
828: fnd_msg_pub.add;
829: RAISE fnd_api.g_exc_error;
830: END IF;
831:
832: SELECT replenish_to_order_flag
833: INTO l_replenish_to_order

Line 846: RAISE fnd_api.g_exc_error;

842: IF (l_replenish_to_order = 'Y') THEN
843: fnd_message.set_name('INV', 'INV_RSV_INT_REPLEN');
844: fnd_message.set_token('SOURCE', 'intransit shipment');
845: fnd_msg_pub.add;
846: RAISE fnd_api.g_exc_error;
847: END IF;
848: ELSE
849: IF (l_debug = 1) THEN
850: debug_print('The transation source type is not intransit shipment');

Line 852: RAISE fnd_api.g_exc_error;

848: ELSE
849: IF (l_debug = 1) THEN
850: debug_print('The transation source type is not intransit shipment');
851: END IF;
852: RAISE fnd_api.g_exc_error;
853:
854: END IF;
855: x_return_status := l_return_status;
856:

Line 858: WHEN fnd_api.g_exc_error THEN

854: END IF;
855: x_return_status := l_return_status;
856:
857: EXCEPTION
858: WHEN fnd_api.g_exc_error THEN
859: x_return_status := fnd_api.g_ret_sts_error;
860: --
861: WHEN fnd_api.g_exc_unexpected_error THEN
862: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 859: x_return_status := fnd_api.g_ret_sts_error;

855: x_return_status := l_return_status;
856:
857: EXCEPTION
858: WHEN fnd_api.g_exc_error THEN
859: x_return_status := fnd_api.g_ret_sts_error;
860: --
861: WHEN fnd_api.g_exc_unexpected_error THEN
862: x_return_status := fnd_api.g_ret_sts_unexp_error ;
863: --

Line 861: WHEN fnd_api.g_exc_unexpected_error THEN

857: EXCEPTION
858: WHEN fnd_api.g_exc_error THEN
859: x_return_status := fnd_api.g_ret_sts_error;
860: --
861: WHEN fnd_api.g_exc_unexpected_error THEN
862: x_return_status := fnd_api.g_ret_sts_unexp_error ;
863: --
864: WHEN OTHERS THEN
865: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 862: x_return_status := fnd_api.g_ret_sts_unexp_error ;

858: WHEN fnd_api.g_exc_error THEN
859: x_return_status := fnd_api.g_ret_sts_error;
860: --
861: WHEN fnd_api.g_exc_unexpected_error THEN
862: x_return_status := fnd_api.g_ret_sts_unexp_error ;
863: --
864: WHEN OTHERS THEN
865: x_return_status := fnd_api.g_ret_sts_unexp_error ;
866: --

Line 865: x_return_status := fnd_api.g_ret_sts_unexp_error ;

861: WHEN fnd_api.g_exc_unexpected_error THEN
862: x_return_status := fnd_api.g_ret_sts_unexp_error ;
863: --
864: WHEN OTHERS THEN
865: x_return_status := fnd_api.g_ret_sts_unexp_error ;
866: --
867: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
868: THEN
869: fnd_msg_pub.add_exc_msg

Line 897: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

893: ) IS
894:
895: l_wms_enabled VARCHAR2(1) := 'N';
896: l_debug NUMBER;
897: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
898: l_msg_count NUMBER;
899: l_msg_data VARCHAR2(1000);
900: l_valid_status VARCHAR2(1);
901: BEGIN

Line 933: , p_init_msg_lst => fnd_api.g_false

929: , p_supply_demand_line_detail => p_supply_source_line_detail
930: , p_demand_ship_date => p_demand_ship_date
931: , p_expected_receipt_date => p_supply_receipt_date
932: , p_api_version_number => 1.0
933: , p_init_msg_lst => fnd_api.g_false
934: );
935: */
936:
937: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

Line 937: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

933: , p_init_msg_lst => fnd_api.g_false
934: );
935: */
936:
937: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
938: RAISE fnd_api.g_exc_error;
939: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
940: RAISE fnd_api.g_exc_unexpected_error;
941: END IF;

Line 938: RAISE fnd_api.g_exc_error;

934: );
935: */
936:
937: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
938: RAISE fnd_api.g_exc_error;
939: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
940: RAISE fnd_api.g_exc_unexpected_error;
941: END IF;
942:

Line 939: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

935: */
936:
937: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
938: RAISE fnd_api.g_exc_error;
939: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
940: RAISE fnd_api.g_exc_unexpected_error;
941: END IF;
942:
943: IF (l_debug = 1) THEN

Line 940: RAISE fnd_api.g_exc_unexpected_error;

936:
937: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
938: RAISE fnd_api.g_exc_error;
939: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
940: RAISE fnd_api.g_exc_unexpected_error;
941: END IF;
942:
943: IF (l_debug = 1) THEN
944: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 950: RAISE fnd_api.g_exc_error;

946:
947: IF (l_valid_status = 'N') THEN
948: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_RCV');
949: fnd_msg_pub.ADD;
950: RAISE fnd_api.g_exc_error;
951: END IF;
952:
953: SELECT wms_enabled_flag
954: INTO l_wms_enabled

Line 966: RAISE fnd_api.g_exc_error;

962: IF (l_wms_enabled = 'N') THEN
963: fnd_message.set_name('INV', 'INV_RSV_NON_WMS');
964: fnd_message.set_name('SOURCE', 'receiving');
965: fnd_msg_pub.add;
966: RAISE fnd_api.g_exc_error;
967: END IF;
968: ELSE
969: IF (l_debug = 1) THEN
970: debug_print('The transaction source type is not receiving');

Line 972: RAISE fnd_api.g_exc_error;

968: ELSE
969: IF (l_debug = 1) THEN
970: debug_print('The transaction source type is not receiving');
971: END IF;
972: RAISE fnd_api.g_exc_error;
973: END IF;
974: x_return_status := l_return_status;
975:
976: EXCEPTION

Line 977: WHEN fnd_api.g_exc_error THEN

973: END IF;
974: x_return_status := l_return_status;
975:
976: EXCEPTION
977: WHEN fnd_api.g_exc_error THEN
978: x_return_status := fnd_api.g_ret_sts_error;
979: --
980: WHEN fnd_api.g_exc_unexpected_error THEN
981: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 978: x_return_status := fnd_api.g_ret_sts_error;

974: x_return_status := l_return_status;
975:
976: EXCEPTION
977: WHEN fnd_api.g_exc_error THEN
978: x_return_status := fnd_api.g_ret_sts_error;
979: --
980: WHEN fnd_api.g_exc_unexpected_error THEN
981: x_return_status := fnd_api.g_ret_sts_unexp_error ;
982: --

Line 980: WHEN fnd_api.g_exc_unexpected_error THEN

976: EXCEPTION
977: WHEN fnd_api.g_exc_error THEN
978: x_return_status := fnd_api.g_ret_sts_error;
979: --
980: WHEN fnd_api.g_exc_unexpected_error THEN
981: x_return_status := fnd_api.g_ret_sts_unexp_error ;
982: --
983: WHEN OTHERS THEN
984: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 981: x_return_status := fnd_api.g_ret_sts_unexp_error ;

977: WHEN fnd_api.g_exc_error THEN
978: x_return_status := fnd_api.g_ret_sts_error;
979: --
980: WHEN fnd_api.g_exc_unexpected_error THEN
981: x_return_status := fnd_api.g_ret_sts_unexp_error ;
982: --
983: WHEN OTHERS THEN
984: x_return_status := fnd_api.g_ret_sts_unexp_error ;
985: --

Line 984: x_return_status := fnd_api.g_ret_sts_unexp_error ;

980: WHEN fnd_api.g_exc_unexpected_error THEN
981: x_return_status := fnd_api.g_ret_sts_unexp_error ;
982: --
983: WHEN OTHERS THEN
984: x_return_status := fnd_api.g_ret_sts_unexp_error ;
985: --
986: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
987: THEN
988: fnd_msg_pub.add_exc_msg

Line 1014: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

1010: , p_supply_source_line_detail IN NUMBER
1011: , p_wip_entity_type IN NUMBER
1012: ) IS
1013:
1014: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1015: l_msg_count NUMBER;
1016: l_msg_data VARCHAR2(1000);
1017: l_valid_status VARCHAR2(1);
1018: l_debug NUMBER;

Line 1052: , p_init_msg_lst => fnd_api.g_false

1048: , p_supply_demand_line_detail => p_supply_source_line_detail
1049: , p_demand_ship_date => p_demand_ship_date
1050: , p_expected_receipt_date => p_supply_receipt_date
1051: , p_api_version_number => 1.0
1052: , p_init_msg_lst => fnd_api.g_false
1053: );
1054:
1055: IF (l_debug = 1) THEN
1056: debug_print('Return status after calling validate supply demand wipdisc: ' || l_valid_status || ' : ' || l_return_status);

Line 1059: IF (l_valid_status = 'N') OR (l_return_status = fnd_api.g_ret_sts_error) THEN

1055: IF (l_debug = 1) THEN
1056: debug_print('Return status after calling validate supply demand wipdisc: ' || l_valid_status || ' : ' || l_return_status);
1057: END IF;
1058:
1059: IF (l_valid_status = 'N') OR (l_return_status = fnd_api.g_ret_sts_error) THEN
1060: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_DISC');
1061: fnd_msg_pub.ADD;
1062: RAISE fnd_api.g_exc_error;
1063: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

Line 1062: RAISE fnd_api.g_exc_error;

1058:
1059: IF (l_valid_status = 'N') OR (l_return_status = fnd_api.g_ret_sts_error) THEN
1060: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_DISC');
1061: fnd_msg_pub.ADD;
1062: RAISE fnd_api.g_exc_error;
1063: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1064: RAISE fnd_api.g_exc_unexpected_error;
1065: END IF;
1066: ELSE

Line 1063: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

1059: IF (l_valid_status = 'N') OR (l_return_status = fnd_api.g_ret_sts_error) THEN
1060: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_DISC');
1061: fnd_msg_pub.ADD;
1062: RAISE fnd_api.g_exc_error;
1063: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1064: RAISE fnd_api.g_exc_unexpected_error;
1065: END IF;
1066: ELSE
1067: IF (l_debug = 1) THEN

Line 1064: RAISE fnd_api.g_exc_unexpected_error;

1060: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_DISC');
1061: fnd_msg_pub.ADD;
1062: RAISE fnd_api.g_exc_error;
1063: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1064: RAISE fnd_api.g_exc_unexpected_error;
1065: END IF;
1066: ELSE
1067: IF (l_debug = 1) THEN
1068: debug_print('The wip entity type is not Discrete');

Line 1070: RAISE fnd_api.g_exc_error;

1066: ELSE
1067: IF (l_debug = 1) THEN
1068: debug_print('The wip entity type is not Discrete');
1069: END IF;
1070: RAISE fnd_api.g_exc_error;
1071: END IF;
1072: ELSE
1073: IF (l_debug = 1) THEN
1074: debug_print('The transation source type is not WIP discrete');

Line 1076: RAISE fnd_api.g_exc_error;

1072: ELSE
1073: IF (l_debug = 1) THEN
1074: debug_print('The transation source type is not WIP discrete');
1075: END IF;
1076: RAISE fnd_api.g_exc_error;
1077:
1078: END IF;
1079:
1080: x_return_status := l_return_status;

Line 1082: WHEN fnd_api.g_exc_error THEN

1078: END IF;
1079:
1080: x_return_status := l_return_status;
1081: EXCEPTION
1082: WHEN fnd_api.g_exc_error THEN
1083: x_return_status := fnd_api.g_ret_sts_error;
1084: --
1085: WHEN fnd_api.g_exc_unexpected_error THEN
1086: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1083: x_return_status := fnd_api.g_ret_sts_error;

1079:
1080: x_return_status := l_return_status;
1081: EXCEPTION
1082: WHEN fnd_api.g_exc_error THEN
1083: x_return_status := fnd_api.g_ret_sts_error;
1084: --
1085: WHEN fnd_api.g_exc_unexpected_error THEN
1086: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1087: --

Line 1085: WHEN fnd_api.g_exc_unexpected_error THEN

1081: EXCEPTION
1082: WHEN fnd_api.g_exc_error THEN
1083: x_return_status := fnd_api.g_ret_sts_error;
1084: --
1085: WHEN fnd_api.g_exc_unexpected_error THEN
1086: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1087: --
1088: WHEN OTHERS THEN
1089: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1086: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1082: WHEN fnd_api.g_exc_error THEN
1083: x_return_status := fnd_api.g_ret_sts_error;
1084: --
1085: WHEN fnd_api.g_exc_unexpected_error THEN
1086: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1087: --
1088: WHEN OTHERS THEN
1089: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1090: --

Line 1089: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1085: WHEN fnd_api.g_exc_unexpected_error THEN
1086: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1087: --
1088: WHEN OTHERS THEN
1089: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1090: --
1091: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1092: THEN
1093: fnd_msg_pub.add_exc_msg

Line 1121: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

1117: , p_wip_entity_type IN NUMBER
1118: ) IS
1119:
1120: l_replenish_to_order VARCHAR2(1) := 'N';
1121: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1122: l_msg_count NUMBER;
1123: l_msg_data VARCHAR2(1000);
1124: l_valid_status VARCHAR2(1);
1125: l_debug NUMBER;

Line 1158: , p_init_msg_lst => fnd_api.g_false

1154: , p_supply_demand_line_detail => p_supply_source_line_detail
1155: , p_demand_ship_date => p_demand_ship_date
1156: , p_expected_receipt_date => p_supply_receipt_date
1157: , p_api_version_number => 1.0
1158: , p_init_msg_lst => fnd_api.g_false
1159: );
1160:
1161: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1162: RAISE fnd_api.g_exc_error;

Line 1161: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

1157: , p_api_version_number => 1.0
1158: , p_init_msg_lst => fnd_api.g_false
1159: );
1160:
1161: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1162: RAISE fnd_api.g_exc_error;
1163: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1164: RAISE fnd_api.g_exc_unexpected_error;
1165: END IF;

Line 1162: RAISE fnd_api.g_exc_error;

1158: , p_init_msg_lst => fnd_api.g_false
1159: );
1160:
1161: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1162: RAISE fnd_api.g_exc_error;
1163: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1164: RAISE fnd_api.g_exc_unexpected_error;
1165: END IF;
1166:

Line 1163: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

1159: );
1160:
1161: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1162: RAISE fnd_api.g_exc_error;
1163: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1164: RAISE fnd_api.g_exc_unexpected_error;
1165: END IF;
1166:
1167: IF (l_debug = 1) THEN

Line 1164: RAISE fnd_api.g_exc_unexpected_error;

1160:
1161: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1162: RAISE fnd_api.g_exc_error;
1163: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1164: RAISE fnd_api.g_exc_unexpected_error;
1165: END IF;
1166:
1167: IF (l_debug = 1) THEN
1168: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 1174: RAISE fnd_api.g_exc_error;

1170:
1171: IF (l_valid_status = 'N') THEN
1172: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_OSFM');
1173: fnd_msg_pub.ADD;
1174: RAISE fnd_api.g_exc_error;
1175: END IF;
1176:
1177: SELECT replenish_to_order_flag
1178: INTO l_replenish_to_order

Line 1191: RAISE fnd_api.g_exc_error;

1187: IF (l_replenish_to_order = 'Y') THEN
1188: fnd_message.set_name('INV', 'INV_RSV_REPLEN');
1189: fnd_message.set_token('SOURCE', 'OSFM');
1190: fnd_msg_pub.add;
1191: RAISE fnd_api.g_exc_error;
1192: END IF;
1193: ELSE
1194: IF (l_debug = 1) THEN
1195: debug_print('The wip entity type is not OSFM');

Line 1197: RAISE fnd_api.g_exc_error;

1193: ELSE
1194: IF (l_debug = 1) THEN
1195: debug_print('The wip entity type is not OSFM');
1196: END IF;
1197: RAISE fnd_api.g_exc_error;
1198: END IF;
1199: ELSE
1200: IF (l_debug = 1) THEN
1201: debug_print('The transation source type is not WIP');

Line 1203: RAISE fnd_api.g_exc_error;

1199: ELSE
1200: IF (l_debug = 1) THEN
1201: debug_print('The transation source type is not WIP');
1202: END IF;
1203: RAISE fnd_api.g_exc_error;
1204:
1205: END IF;
1206:
1207: x_return_status := l_return_status;

Line 1209: WHEN fnd_api.g_exc_error THEN

1205: END IF;
1206:
1207: x_return_status := l_return_status;
1208: EXCEPTION
1209: WHEN fnd_api.g_exc_error THEN
1210: x_return_status := fnd_api.g_ret_sts_error;
1211: --
1212: WHEN fnd_api.g_exc_unexpected_error THEN
1213: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1210: x_return_status := fnd_api.g_ret_sts_error;

1206:
1207: x_return_status := l_return_status;
1208: EXCEPTION
1209: WHEN fnd_api.g_exc_error THEN
1210: x_return_status := fnd_api.g_ret_sts_error;
1211: --
1212: WHEN fnd_api.g_exc_unexpected_error THEN
1213: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1214: --

Line 1212: WHEN fnd_api.g_exc_unexpected_error THEN

1208: EXCEPTION
1209: WHEN fnd_api.g_exc_error THEN
1210: x_return_status := fnd_api.g_ret_sts_error;
1211: --
1212: WHEN fnd_api.g_exc_unexpected_error THEN
1213: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1214: --
1215: WHEN OTHERS THEN
1216: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1213: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1209: WHEN fnd_api.g_exc_error THEN
1210: x_return_status := fnd_api.g_ret_sts_error;
1211: --
1212: WHEN fnd_api.g_exc_unexpected_error THEN
1213: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1214: --
1215: WHEN OTHERS THEN
1216: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1217: --

Line 1216: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1212: WHEN fnd_api.g_exc_unexpected_error THEN
1213: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1214: --
1215: WHEN OTHERS THEN
1216: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1217: --
1218: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1219: THEN
1220: fnd_msg_pub.add_exc_msg

Line 1248: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

1244: , p_wip_entity_type IN NUMBER
1245: ) IS
1246:
1247: l_replenish_to_order VARCHAR2(1) := 'N';
1248: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1249: l_msg_count NUMBER;
1250: l_msg_data VARCHAR2(1000);
1251: l_valid_status VARCHAR2(1);
1252: l_debug NUMBER;

Line 1286: , p_init_msg_lst => fnd_api.g_false

1282: , p_supply_demand_line_detail => p_supply_source_line_detail
1283: , p_demand_ship_date => p_demand_ship_date
1284: , p_expected_receipt_date => p_supply_receipt_date
1285: , p_api_version_number => 1.0
1286: , p_init_msg_lst => fnd_api.g_false
1287: );
1288: */
1289:
1290: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

Line 1290: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

1286: , p_init_msg_lst => fnd_api.g_false
1287: );
1288: */
1289:
1290: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1291: RAISE fnd_api.g_exc_error;
1292: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1293: RAISE fnd_api.g_exc_unexpected_error;
1294: END IF;

Line 1291: RAISE fnd_api.g_exc_error;

1287: );
1288: */
1289:
1290: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1291: RAISE fnd_api.g_exc_error;
1292: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1293: RAISE fnd_api.g_exc_unexpected_error;
1294: END IF;
1295:

Line 1292: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

1288: */
1289:
1290: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1291: RAISE fnd_api.g_exc_error;
1292: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1293: RAISE fnd_api.g_exc_unexpected_error;
1294: END IF;
1295:
1296: IF (l_debug = 1) THEN

Line 1293: RAISE fnd_api.g_exc_unexpected_error;

1289:
1290: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1291: RAISE fnd_api.g_exc_error;
1292: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1293: RAISE fnd_api.g_exc_unexpected_error;
1294: END IF;
1295:
1296: IF (l_debug = 1) THEN
1297: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 1303: RAISE fnd_api.g_exc_error;

1299:
1300: IF (l_valid_status = 'N') THEN
1301: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_FPO');
1302: fnd_msg_pub.ADD;
1303: RAISE fnd_api.g_exc_error;
1304: END IF;
1305:
1306: SELECT replenish_to_order_flag
1307: INTO l_replenish_to_order

Line 1320: RAISE fnd_api.g_exc_error;

1316: IF (l_replenish_to_order = 'Y') THEN
1317: fnd_message.set_name('INV', 'INV_RSV_REPLEN');
1318: fnd_message.set_token('SOURCE', 'FPO');
1319: fnd_msg_pub.add;
1320: RAISE fnd_api.g_exc_error;
1321: END IF;
1322: ELSE
1323: IF (l_debug = 1) THEN
1324: debug_print('The wip entity type is not FPO');

Line 1326: RAISE fnd_api.g_exc_error;

1322: ELSE
1323: IF (l_debug = 1) THEN
1324: debug_print('The wip entity type is not FPO');
1325: END IF;
1326: RAISE fnd_api.g_exc_error;
1327: END IF;
1328: ELSE
1329: IF (l_debug = 1) THEN
1330: debug_print('The transation source type is not WIP');

Line 1332: RAISE fnd_api.g_exc_error;

1328: ELSE
1329: IF (l_debug = 1) THEN
1330: debug_print('The transation source type is not WIP');
1331: END IF;
1332: RAISE fnd_api.g_exc_error;
1333:
1334: END IF;
1335:
1336: x_return_status := l_return_status;

Line 1338: WHEN fnd_api.g_exc_error THEN

1334: END IF;
1335:
1336: x_return_status := l_return_status;
1337: EXCEPTION
1338: WHEN fnd_api.g_exc_error THEN
1339: x_return_status := fnd_api.g_ret_sts_error;
1340: --
1341: WHEN fnd_api.g_exc_unexpected_error THEN
1342: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1339: x_return_status := fnd_api.g_ret_sts_error;

1335:
1336: x_return_status := l_return_status;
1337: EXCEPTION
1338: WHEN fnd_api.g_exc_error THEN
1339: x_return_status := fnd_api.g_ret_sts_error;
1340: --
1341: WHEN fnd_api.g_exc_unexpected_error THEN
1342: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1343: --

Line 1341: WHEN fnd_api.g_exc_unexpected_error THEN

1337: EXCEPTION
1338: WHEN fnd_api.g_exc_error THEN
1339: x_return_status := fnd_api.g_ret_sts_error;
1340: --
1341: WHEN fnd_api.g_exc_unexpected_error THEN
1342: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1343: --
1344: WHEN OTHERS THEN
1345: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1342: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1338: WHEN fnd_api.g_exc_error THEN
1339: x_return_status := fnd_api.g_ret_sts_error;
1340: --
1341: WHEN fnd_api.g_exc_unexpected_error THEN
1342: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1343: --
1344: WHEN OTHERS THEN
1345: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1346: --

Line 1345: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1341: WHEN fnd_api.g_exc_unexpected_error THEN
1342: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1343: --
1344: WHEN OTHERS THEN
1345: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1346: --
1347: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1348: THEN
1349: fnd_msg_pub.add_exc_msg

Line 1377: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

1373: , p_wip_entity_type IN NUMBER
1374: ) IS
1375:
1376: l_replenish_to_order VARCHAR2(1) := 'N';
1377: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1378: l_msg_count NUMBER;
1379: l_msg_data VARCHAR2(1000);
1380: l_valid_status VARCHAR2(1);
1381: l_debug NUMBER;

Line 1415: , p_init_msg_lst => fnd_api.g_false

1411: , p_supply_demand_line_detail => p_supply_source_line_detail
1412: , p_demand_ship_date => p_demand_ship_date
1413: , p_expected_receipt_date => p_supply_receipt_date
1414: , p_api_version_number => 1.0
1415: , p_init_msg_lst => fnd_api.g_false
1416: );
1417: */
1418:
1419: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

Line 1419: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

1415: , p_init_msg_lst => fnd_api.g_false
1416: );
1417: */
1418:
1419: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1420: RAISE fnd_api.g_exc_error;
1421: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1422: RAISE fnd_api.g_exc_unexpected_error;
1423: END IF;

Line 1420: RAISE fnd_api.g_exc_error;

1416: );
1417: */
1418:
1419: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1420: RAISE fnd_api.g_exc_error;
1421: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1422: RAISE fnd_api.g_exc_unexpected_error;
1423: END IF;
1424:

Line 1421: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

1417: */
1418:
1419: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1420: RAISE fnd_api.g_exc_error;
1421: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1422: RAISE fnd_api.g_exc_unexpected_error;
1423: END IF;
1424:
1425: IF (l_debug = 1) THEN

Line 1422: RAISE fnd_api.g_exc_unexpected_error;

1418:
1419: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1420: RAISE fnd_api.g_exc_error;
1421: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1422: RAISE fnd_api.g_exc_unexpected_error;
1423: END IF;
1424:
1425: IF (l_debug = 1) THEN
1426: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 1432: RAISE fnd_api.g_exc_error;

1428:
1429: IF (l_valid_status = 'N') THEN
1430: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY_BATCH');
1431: fnd_msg_pub.ADD;
1432: RAISE fnd_api.g_exc_error;
1433: END IF;
1434:
1435: SELECT replenish_to_order_flag
1436: INTO l_replenish_to_order

Line 1448: RAISE fnd_api.g_exc_error;

1444: IF (l_replenish_to_order = 'Y') THEN
1445: fnd_message.set_name('INV', 'INV_RSV_REPLEN');
1446: fnd_message.set_token('SOURCE', 'Batch');
1447: fnd_msg_pub.add;
1448: RAISE fnd_api.g_exc_error;
1449: END IF;
1450: ELSE
1451: IF (l_debug = 1) THEN
1452: debug_print('The wip entity type is not Batch');

Line 1454: RAISE fnd_api.g_exc_error;

1450: ELSE
1451: IF (l_debug = 1) THEN
1452: debug_print('The wip entity type is not Batch');
1453: END IF;
1454: RAISE fnd_api.g_exc_error;
1455: END IF;
1456: ELSE
1457: IF (l_debug = 1) THEN
1458: debug_print('The transation source type is not WIP');

Line 1460: RAISE fnd_api.g_exc_error;

1456: ELSE
1457: IF (l_debug = 1) THEN
1458: debug_print('The transation source type is not WIP');
1459: END IF;
1460: RAISE fnd_api.g_exc_error;
1461:
1462: END IF;
1463:
1464: x_return_status := l_return_status;

Line 1466: WHEN fnd_api.g_exc_error THEN

1462: END IF;
1463:
1464: x_return_status := l_return_status;
1465: EXCEPTION
1466: WHEN fnd_api.g_exc_error THEN
1467: x_return_status := fnd_api.g_ret_sts_error;
1468: --
1469: WHEN fnd_api.g_exc_unexpected_error THEN
1470: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1467: x_return_status := fnd_api.g_ret_sts_error;

1463:
1464: x_return_status := l_return_status;
1465: EXCEPTION
1466: WHEN fnd_api.g_exc_error THEN
1467: x_return_status := fnd_api.g_ret_sts_error;
1468: --
1469: WHEN fnd_api.g_exc_unexpected_error THEN
1470: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1471: --

Line 1469: WHEN fnd_api.g_exc_unexpected_error THEN

1465: EXCEPTION
1466: WHEN fnd_api.g_exc_error THEN
1467: x_return_status := fnd_api.g_ret_sts_error;
1468: --
1469: WHEN fnd_api.g_exc_unexpected_error THEN
1470: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1471: --
1472: WHEN OTHERS THEN
1473: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1470: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1466: WHEN fnd_api.g_exc_error THEN
1467: x_return_status := fnd_api.g_ret_sts_error;
1468: --
1469: WHEN fnd_api.g_exc_unexpected_error THEN
1470: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1471: --
1472: WHEN OTHERS THEN
1473: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1474: --

Line 1473: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1469: WHEN fnd_api.g_exc_unexpected_error THEN
1470: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1471: --
1472: WHEN OTHERS THEN
1473: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1474: --
1475: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1476: THEN
1477: fnd_msg_pub.add_exc_msg

Line 1501: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

1497: ) IS
1498:
1499: l_dropship_count NUMBER := 0;
1500: l_debug NUMBER;
1501: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1502:
1503: BEGIN
1504:
1505: IF (g_debug IS NULL) THEN

Line 1529: RAISE fnd_api.g_exc_error;

1525:
1526: IF (l_dropship_count >= 1) THEN
1527: fnd_message.set_name('INV', 'INV_RSV_DS_SO');
1528: fnd_msg_pub.add;
1529: RAISE fnd_api.g_exc_error;
1530: END IF;
1531:
1532: ELSE
1533: IF (l_debug = 1) THEN

Line 1536: RAISE fnd_api.g_exc_error;

1532: ELSE
1533: IF (l_debug = 1) THEN
1534: debug_print('The transation source type is not sales order');
1535: END IF;
1536: RAISE fnd_api.g_exc_error;
1537:
1538: END IF;
1539: IF (l_debug = 1) THEN
1540: debug_print('After drop ship check ' || p_demand_source_type_id);

Line 1545: WHEN fnd_api.g_exc_error THEN

1541: END IF;
1542: x_return_status := l_return_status;
1543:
1544: EXCEPTION
1545: WHEN fnd_api.g_exc_error THEN
1546: x_return_status := fnd_api.g_ret_sts_error;
1547: --
1548: WHEN fnd_api.g_exc_unexpected_error THEN
1549: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1546: x_return_status := fnd_api.g_ret_sts_error;

1542: x_return_status := l_return_status;
1543:
1544: EXCEPTION
1545: WHEN fnd_api.g_exc_error THEN
1546: x_return_status := fnd_api.g_ret_sts_error;
1547: --
1548: WHEN fnd_api.g_exc_unexpected_error THEN
1549: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1550: --

Line 1548: WHEN fnd_api.g_exc_unexpected_error THEN

1544: EXCEPTION
1545: WHEN fnd_api.g_exc_error THEN
1546: x_return_status := fnd_api.g_ret_sts_error;
1547: --
1548: WHEN fnd_api.g_exc_unexpected_error THEN
1549: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1550: --
1551: WHEN OTHERS THEN
1552: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1549: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1545: WHEN fnd_api.g_exc_error THEN
1546: x_return_status := fnd_api.g_ret_sts_error;
1547: --
1548: WHEN fnd_api.g_exc_unexpected_error THEN
1549: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1550: --
1551: WHEN OTHERS THEN
1552: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1553: --

Line 1552: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1548: WHEN fnd_api.g_exc_unexpected_error THEN
1549: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1550: --
1551: WHEN OTHERS THEN
1552: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1553: --
1554: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1555: THEN
1556: fnd_msg_pub.add_exc_msg

Line 1583: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

1579: , p_demand_source_line_detail IN NUMBER
1580: , p_wip_entity_type IN NUMBER
1581: ) IS
1582:
1583: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1584: l_msg_count NUMBER;
1585: l_msg_data VARCHAR2(1000);
1586: l_valid_status VARCHAR2(1);
1587: l_debug NUMBER;

Line 1624: , p_init_msg_lst => fnd_api.g_false

1620: , p_supply_demand_line_detail => p_demand_source_line_detail
1621: , p_demand_ship_date => p_demand_ship_date
1622: , p_expected_receipt_date => p_supply_receipt_date
1623: , p_api_version_number => 1.0
1624: , p_init_msg_lst => fnd_api.g_false
1625: );
1626:
1627: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1628: RAISE fnd_api.g_exc_error;

Line 1627: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

1623: , p_api_version_number => 1.0
1624: , p_init_msg_lst => fnd_api.g_false
1625: );
1626:
1627: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1628: RAISE fnd_api.g_exc_error;
1629: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1630: RAISE fnd_api.g_exc_unexpected_error;
1631: END IF;

Line 1628: RAISE fnd_api.g_exc_error;

1624: , p_init_msg_lst => fnd_api.g_false
1625: );
1626:
1627: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1628: RAISE fnd_api.g_exc_error;
1629: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1630: RAISE fnd_api.g_exc_unexpected_error;
1631: END IF;
1632:

Line 1629: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

1625: );
1626:
1627: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1628: RAISE fnd_api.g_exc_error;
1629: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1630: RAISE fnd_api.g_exc_unexpected_error;
1631: END IF;
1632:
1633: IF (l_debug = 1) THEN

Line 1630: RAISE fnd_api.g_exc_unexpected_error;

1626:
1627: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1628: RAISE fnd_api.g_exc_error;
1629: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1630: RAISE fnd_api.g_exc_unexpected_error;
1631: END IF;
1632:
1633: IF (l_debug = 1) THEN
1634: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 1640: RAISE fnd_api.g_exc_error;

1636:
1637: IF (l_valid_status = 'N') THEN
1638: fnd_message.set_name('INV', 'INV_RSV_INVALID_DEMAND_CMRO');
1639: fnd_msg_pub.ADD;
1640: RAISE fnd_api.g_exc_error;
1641: END IF;
1642: ELSE
1643: -- return error since this is not wip demand source or not CMRO entity type
1644: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');

Line 1646: RAISE fnd_api.g_exc_error;

1642: ELSE
1643: -- return error since this is not wip demand source or not CMRO entity type
1644: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
1645: fnd_msg_pub.ADD;
1646: RAISE fnd_api.g_exc_error;
1647: END IF;
1648:
1649: x_return_status := l_return_status;
1650:

Line 1652: WHEN fnd_api.g_exc_error THEN

1648:
1649: x_return_status := l_return_status;
1650:
1651: EXCEPTION
1652: WHEN fnd_api.g_exc_error THEN
1653: x_return_status := fnd_api.g_ret_sts_error;
1654: --
1655: WHEN fnd_api.g_exc_unexpected_error THEN
1656: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1653: x_return_status := fnd_api.g_ret_sts_error;

1649: x_return_status := l_return_status;
1650:
1651: EXCEPTION
1652: WHEN fnd_api.g_exc_error THEN
1653: x_return_status := fnd_api.g_ret_sts_error;
1654: --
1655: WHEN fnd_api.g_exc_unexpected_error THEN
1656: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1657: --

Line 1655: WHEN fnd_api.g_exc_unexpected_error THEN

1651: EXCEPTION
1652: WHEN fnd_api.g_exc_error THEN
1653: x_return_status := fnd_api.g_ret_sts_error;
1654: --
1655: WHEN fnd_api.g_exc_unexpected_error THEN
1656: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1657: --
1658: WHEN OTHERS THEN
1659: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1656: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1652: WHEN fnd_api.g_exc_error THEN
1653: x_return_status := fnd_api.g_ret_sts_error;
1654: --
1655: WHEN fnd_api.g_exc_unexpected_error THEN
1656: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1657: --
1658: WHEN OTHERS THEN
1659: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1660: --

Line 1659: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1655: WHEN fnd_api.g_exc_unexpected_error THEN
1656: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1657: --
1658: WHEN OTHERS THEN
1659: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1660: --
1661: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1662: THEN
1663: fnd_msg_pub.add_exc_msg

Line 1690: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

1686: , p_demand_source_line_detail IN NUMBER
1687: , p_wip_entity_type IN NUMBER
1688: ) IS
1689:
1690: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1691: l_msg_count NUMBER;
1692: l_msg_data VARCHAR2(1000);
1693: l_valid_status VARCHAR2(1);
1694: l_debug NUMBER;

Line 1731: , p_init_msg_lst => fnd_api.g_false

1727: , p_supply_demand_line_detail => p_demand_source_line_detail
1728: , p_demand_ship_date => p_demand_ship_date
1729: , p_expected_receipt_date => p_supply_receipt_date
1730: , p_api_version_number => 1.0
1731: , p_init_msg_lst => fnd_api.g_false
1732: );
1733: */
1734:
1735: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

Line 1735: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

1731: , p_init_msg_lst => fnd_api.g_false
1732: );
1733: */
1734:
1735: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1736: RAISE fnd_api.g_exc_error;
1737: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1738: RAISE fnd_api.g_exc_unexpected_error;
1739: END IF;

Line 1736: RAISE fnd_api.g_exc_error;

1732: );
1733: */
1734:
1735: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1736: RAISE fnd_api.g_exc_error;
1737: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1738: RAISE fnd_api.g_exc_unexpected_error;
1739: END IF;
1740:

Line 1737: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

1733: */
1734:
1735: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1736: RAISE fnd_api.g_exc_error;
1737: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1738: RAISE fnd_api.g_exc_unexpected_error;
1739: END IF;
1740:
1741: IF (l_debug = 1) THEN

Line 1738: RAISE fnd_api.g_exc_unexpected_error;

1734:
1735: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1736: RAISE fnd_api.g_exc_error;
1737: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1738: RAISE fnd_api.g_exc_unexpected_error;
1739: END IF;
1740:
1741: IF (l_debug = 1) THEN
1742: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 1748: RAISE fnd_api.g_exc_error;

1744:
1745: IF (l_valid_status = 'N') THEN
1746: fnd_message.set_name('INV', 'INV_RSV_INVALID_DEMAND_FPO');
1747: fnd_msg_pub.ADD;
1748: RAISE fnd_api.g_exc_error;
1749: END IF;
1750: ELSE
1751: -- return error since this is not wip demand source or not FPO entity type
1752: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');

Line 1754: RAISE fnd_api.g_exc_error;

1750: ELSE
1751: -- return error since this is not wip demand source or not FPO entity type
1752: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
1753: fnd_msg_pub.ADD;
1754: RAISE fnd_api.g_exc_error;
1755: END IF;
1756:
1757: x_return_status := l_return_status;
1758:

Line 1760: WHEN fnd_api.g_exc_error THEN

1756:
1757: x_return_status := l_return_status;
1758:
1759: EXCEPTION
1760: WHEN fnd_api.g_exc_error THEN
1761: x_return_status := fnd_api.g_ret_sts_error;
1762: --
1763: WHEN fnd_api.g_exc_unexpected_error THEN
1764: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1761: x_return_status := fnd_api.g_ret_sts_error;

1757: x_return_status := l_return_status;
1758:
1759: EXCEPTION
1760: WHEN fnd_api.g_exc_error THEN
1761: x_return_status := fnd_api.g_ret_sts_error;
1762: --
1763: WHEN fnd_api.g_exc_unexpected_error THEN
1764: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1765: --

Line 1763: WHEN fnd_api.g_exc_unexpected_error THEN

1759: EXCEPTION
1760: WHEN fnd_api.g_exc_error THEN
1761: x_return_status := fnd_api.g_ret_sts_error;
1762: --
1763: WHEN fnd_api.g_exc_unexpected_error THEN
1764: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1765: --
1766: WHEN OTHERS THEN
1767: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1764: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1760: WHEN fnd_api.g_exc_error THEN
1761: x_return_status := fnd_api.g_ret_sts_error;
1762: --
1763: WHEN fnd_api.g_exc_unexpected_error THEN
1764: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1765: --
1766: WHEN OTHERS THEN
1767: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1768: --

Line 1767: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1763: WHEN fnd_api.g_exc_unexpected_error THEN
1764: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1765: --
1766: WHEN OTHERS THEN
1767: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1768: --
1769: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1770: THEN
1771: fnd_msg_pub.add_exc_msg

Line 1798: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

1794: , p_demand_source_line_detail IN NUMBER
1795: , p_wip_entity_type IN NUMBER
1796: ) IS
1797:
1798: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1799: l_msg_count NUMBER;
1800: l_msg_data VARCHAR2(1000);
1801: l_valid_status VARCHAR2(1);
1802: l_debug NUMBER;

Line 1839: , p_init_msg_lst => fnd_api.g_false

1835: , p_supply_demand_line_detail => p_demand_source_line_detail
1836: , p_demand_ship_date => p_demand_ship_date
1837: , p_expected_receipt_date => p_supply_receipt_date
1838: , p_api_version_number => 1.0
1839: , p_init_msg_lst => fnd_api.g_false
1840: );
1841: */
1842:
1843: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

Line 1843: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

1839: , p_init_msg_lst => fnd_api.g_false
1840: );
1841: */
1842:
1843: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1844: RAISE fnd_api.g_exc_error;
1845: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1846: RAISE fnd_api.g_exc_unexpected_error;
1847: END IF;

Line 1844: RAISE fnd_api.g_exc_error;

1840: );
1841: */
1842:
1843: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1844: RAISE fnd_api.g_exc_error;
1845: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1846: RAISE fnd_api.g_exc_unexpected_error;
1847: END IF;
1848:

Line 1845: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

1841: */
1842:
1843: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1844: RAISE fnd_api.g_exc_error;
1845: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1846: RAISE fnd_api.g_exc_unexpected_error;
1847: END IF;
1848:
1849: IF (l_debug = 1) THEN

Line 1846: RAISE fnd_api.g_exc_unexpected_error;

1842:
1843: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1844: RAISE fnd_api.g_exc_error;
1845: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
1846: RAISE fnd_api.g_exc_unexpected_error;
1847: END IF;
1848:
1849: IF (l_debug = 1) THEN
1850: debug_print('validate supply demand returns valid status: ' || l_valid_status);

Line 1856: RAISE fnd_api.g_exc_error;

1852:
1853: IF (l_valid_status = 'N') THEN
1854: fnd_message.set_name('INV', 'INV_RSV_INVALID_DEMAND_BATCH');
1855: fnd_msg_pub.ADD;
1856: RAISE fnd_api.g_exc_error;
1857: END IF;
1858: ELSE
1859: -- return error since this is not wip demand source or not OPM Batch entity type
1860: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');

Line 1862: RAISE fnd_api.g_exc_error;

1858: ELSE
1859: -- return error since this is not wip demand source or not OPM Batch entity type
1860: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
1861: fnd_msg_pub.ADD;
1862: RAISE fnd_api.g_exc_error;
1863: END IF;
1864:
1865: x_return_status := l_return_status;
1866:

Line 1868: WHEN fnd_api.g_exc_error THEN

1864:
1865: x_return_status := l_return_status;
1866:
1867: EXCEPTION
1868: WHEN fnd_api.g_exc_error THEN
1869: x_return_status := fnd_api.g_ret_sts_error;
1870: --
1871: WHEN fnd_api.g_exc_unexpected_error THEN
1872: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1869: x_return_status := fnd_api.g_ret_sts_error;

1865: x_return_status := l_return_status;
1866:
1867: EXCEPTION
1868: WHEN fnd_api.g_exc_error THEN
1869: x_return_status := fnd_api.g_ret_sts_error;
1870: --
1871: WHEN fnd_api.g_exc_unexpected_error THEN
1872: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1873: --

Line 1871: WHEN fnd_api.g_exc_unexpected_error THEN

1867: EXCEPTION
1868: WHEN fnd_api.g_exc_error THEN
1869: x_return_status := fnd_api.g_ret_sts_error;
1870: --
1871: WHEN fnd_api.g_exc_unexpected_error THEN
1872: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1873: --
1874: WHEN OTHERS THEN
1875: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1872: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1868: WHEN fnd_api.g_exc_error THEN
1869: x_return_status := fnd_api.g_ret_sts_error;
1870: --
1871: WHEN fnd_api.g_exc_unexpected_error THEN
1872: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1873: --
1874: WHEN OTHERS THEN
1875: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1876: --

Line 1875: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1871: WHEN fnd_api.g_exc_unexpected_error THEN
1872: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1873: --
1874: WHEN OTHERS THEN
1875: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1876: --
1877: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1878: THEN
1879: fnd_msg_pub.add_exc_msg

Line 1942: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

1938: , p_item_cache_index IN INTEGER
1939: , p_org_cache_index IN INTEGER
1940: , x_sub_cache_index OUT NOCOPY INTEGER
1941: ) IS
1942: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1943: l_resultant_locator_control NUMBER := NULL;
1944: l_loop_index NUMBER := NULL;
1945: l_sub_cache_index NUMBER := NULL;
1946: l_rec inv_reservation_global.sub_record;

Line 1981: RAISE fnd_api.g_exc_error;

1977: inv_reservation_global.g_serial_control_dynamic_inv)
1978: AND p_serial_array.COUNT >0 THEN
1979: fnd_message.set_name('INV', 'INV_EXTRA_SERIAL');
1980: fnd_msg_pub.add;
1981: RAISE fnd_api.g_exc_error;
1982: END IF;
1983: --
1984: IF (l_debug = 1) THEN
1985: debug_print('After item cache: ' || l_return_status);

Line 1996: RAISE fnd_api.g_exc_error;

1992: inv_reservation_global.g_lot_control_no
1993: AND p_lot_number IS NOT NULL THEN
1994: fnd_message.set_name('INV', 'INV_NO_LOT_CONTROL');
1995: fnd_msg_pub.add;
1996: RAISE fnd_api.g_exc_error;
1997: END IF;
1998: IF (l_debug = 1) THEN
1999: debug_print('After lot cache: ' || l_return_status);
2000: END IF;

Line 2011: RAISE fnd_api.g_exc_error;

2007: inv_reservation_global.g_revision_control_no
2008: AND p_revision IS NOT NULL THEN
2009: fnd_message.set_name('INV', 'INV_NO_REVISION_CONTROL');
2010: fnd_msg_pub.add;
2011: RAISE fnd_api.g_exc_error;
2012: END IF;
2013: --
2014: IF (l_debug = 1) THEN
2015: debug_print('After rev cache: ' || l_return_status);

Line 2030: RAISE fnd_api.g_exc_error;

2026: p_locator_id IS NOT NULL
2027: ) THEN
2028: fnd_message.set_name('INV', 'INV_MISSING_REV');
2029: fnd_msg_pub.add;
2030: RAISE fnd_api.g_exc_error;
2031: END IF;
2032:
2033: IF (l_debug = 1) THEN
2034: debug_print('After rev/sub/loc check cache: ' || l_return_status);

Line 2050: RAISE fnd_api.g_exc_error;

2046: p_locator_id IS NOT NULL
2047: ) THEN
2048: fnd_message.set_name('INV', 'INV_MISSING_LOT');
2049: fnd_msg_pub.add;
2050: RAISE fnd_api.g_exc_error;
2051: END IF;
2052:
2053: IF (l_debug = 1) THEN
2054: debug_print('After lot/sub/loc check cache: ' || l_return_status);

Line 2070: RAISE fnd_api.g_exc_error;

2066: AND p_revision IS NULL
2067: AND p_lot_number IS NOT NULL THEN
2068: fnd_message.set_name('INV', 'INV_MISSING_REV');
2069: fnd_msg_pub.add;
2070: RAISE fnd_api.g_exc_error;
2071: END IF;
2072:
2073: IF (l_debug = 1) THEN
2074: debug_print('After lot/rev check cache: ' || l_return_status);

Line 2092: IF l_return_status = fnd_api.g_ret_sts_error THEN

2088: IF (l_debug = 1) THEN
2089: debug_print('After search sub cache: ' || l_return_status);
2090: END IF;
2091: --
2092: IF l_return_status = fnd_api.g_ret_sts_error THEN
2093: RAISE fnd_api.g_exc_error;
2094: END IF ;
2095: --
2096: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 2093: RAISE fnd_api.g_exc_error;

2089: debug_print('After search sub cache: ' || l_return_status);
2090: END IF;
2091: --
2092: IF l_return_status = fnd_api.g_ret_sts_error THEN
2093: RAISE fnd_api.g_exc_error;
2094: END IF ;
2095: --
2096: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2097: RAISE fnd_api.g_exc_unexpected_error;

Line 2096: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2092: IF l_return_status = fnd_api.g_ret_sts_error THEN
2093: RAISE fnd_api.g_exc_error;
2094: END IF ;
2095: --
2096: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2097: RAISE fnd_api.g_exc_unexpected_error;
2098: END IF;
2099: --
2100: -- if the sub is not in the cache, load it into the cache

Line 2097: RAISE fnd_api.g_exc_unexpected_error;

2093: RAISE fnd_api.g_exc_error;
2094: END IF ;
2095: --
2096: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2097: RAISE fnd_api.g_exc_unexpected_error;
2098: END IF;
2099: --
2100: -- if the sub is not in the cache, load it into the cache
2101: IF l_sub_cache_index IS NULL THEN

Line 2119: RAISE fnd_api.g_exc_error;

2115: EXCEPTION
2116: WHEN NO_DATA_FOUND then
2117: fnd_message.set_name('INV','INVALID_SUB');
2118: fnd_msg_pub.add;
2119: RAISE fnd_api.g_exc_error;
2120: END; */
2121: -- Modified to call common API
2122: l_rec.secondary_inventory_name :=p_subinventory_code;
2123: IF INV_Validate.subinventory

Line 2130: RAISE fnd_api.g_exc_error;

2126: p_org => inv_reservation_global.g_organization_record_cache(p_org_cache_index)
2127: )=INV_Validate.F THEN
2128: fnd_message.set_name('INV','INVALID_SUB');
2129: fnd_msg_pub.add;
2130: RAISE fnd_api.g_exc_error;
2131: END IF;
2132:
2133:
2134: --Bug 2334171 Check whether the sub is reservable

Line 2146: RAISE fnd_api.g_exc_error;

2142: THEN /* non reservable Subinventory */
2143: fnd_message.set_name('INV','INV-SUBINV NOT RESERVABLE');
2144: fnd_message.set_token('SUBINV', l_rec.secondary_inventory_name);
2145: fnd_msg_pub.add;
2146: RAISE fnd_api.g_exc_error;
2147: END IF;
2148: END IF;
2149: -- End of changes for Bug 6870416
2150:

Line 2158: IF l_return_status = fnd_api.g_ret_sts_error THEN

2154: , p_sub_record => l_rec
2155: , x_index => l_sub_cache_index
2156: );
2157: --
2158: IF l_return_status = fnd_api.g_ret_sts_error THEN
2159: RAISE fnd_api.g_exc_error;
2160: END IF ;
2161: --
2162: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 2159: RAISE fnd_api.g_exc_error;

2155: , x_index => l_sub_cache_index
2156: );
2157: --
2158: IF l_return_status = fnd_api.g_ret_sts_error THEN
2159: RAISE fnd_api.g_exc_error;
2160: END IF ;
2161: --
2162: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2163: RAISE fnd_api.g_exc_unexpected_error;

Line 2162: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2158: IF l_return_status = fnd_api.g_ret_sts_error THEN
2159: RAISE fnd_api.g_exc_error;
2160: END IF ;
2161: --
2162: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2163: RAISE fnd_api.g_exc_unexpected_error;
2164: END IF;
2165: ELSE
2166: l_rec := inv_reservation_global.g_sub_record_cache(l_sub_cache_index);

Line 2163: RAISE fnd_api.g_exc_unexpected_error;

2159: RAISE fnd_api.g_exc_error;
2160: END IF ;
2161: --
2162: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2163: RAISE fnd_api.g_exc_unexpected_error;
2164: END IF;
2165: ELSE
2166: l_rec := inv_reservation_global.g_sub_record_cache(l_sub_cache_index);
2167: END IF;

Line 2190: RAISE fnd_api.g_exc_error;

2186: IF (l_resultant_locator_control = 1
2187: AND p_locator_id IS NOT NULL AND p_locator_id > 0) THEN
2188: fnd_message.set_name('INV', 'INV_NO_LOCATOR_CONTROL');
2189: fnd_msg_pub.add;
2190: RAISE fnd_api.g_exc_error;
2191: END IF;
2192: --
2193: ELSIF p_locator_id IS NOT NULL THEN
2194: -- if the sub is null, but the locator id is not null

Line 2198: RAISE fnd_api.g_exc_error;

2194: -- if the sub is null, but the locator id is not null
2195: -- raise the error
2196: fnd_message.set_name('INV', 'INV_NO_LOCATOR_CONTROL');
2197: fnd_msg_pub.add;
2198: RAISE fnd_api.g_exc_error;
2199: END IF;
2200: --
2201: -- Now we have validated that values are there.
2202: -- Now validate that values are correct

Line 2215: RAISE fnd_api.g_exc_error;

2211: EXCEPTION
2212: WHEN NO_DATA_FOUND THEN
2213: fnd_message.set_name('INV','INVALID_REVISION');
2214: fnd_msg_pub.add;
2215: RAISE fnd_api.g_exc_error;
2216: END;*/
2217: IF INV_Validate.revision
2218: (
2219: p_revision => p_revision,

Line 2226: RAISE fnd_api.g_exc_error;

2222: p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index) )=INV_Validate.F THEN
2223:
2224: fnd_message.set_name('INV','INVALID_REVISION');
2225: fnd_msg_pub.add;
2226: RAISE fnd_api.g_exc_error;
2227: END IF;
2228:
2229: END IF;
2230: --

Line 2243: RAISE fnd_api.g_exc_error;

2239: IF l_lot_expiration_date IS NOT NULL
2240: AND l_lot_expiration_date < Sysdate THEN
2241: fnd_message.set_name('INV', 'INV_LOT_EXPIRED');
2242: fnd_msg_pub.add;
2243: RAISE fnd_api.g_exc_error;
2244: END IF;
2245: --
2246: EXCEPTION
2247: WHEN NO_DATA_FOUND then

Line 2250: RAISE fnd_api.g_exc_error;

2246: EXCEPTION
2247: WHEN NO_DATA_FOUND then
2248: fnd_message.set_name('INV','INV_INVALID_LOT');
2249: fnd_msg_pub.add;
2250: RAISE fnd_api.g_exc_error;
2251: END;
2252: END IF;
2253: --
2254: IF p_subinventory_code IS NOT NULL THEN

Line 2269: RAISE fnd_api.g_exc_error;

2265: EXCEPTION
2266: WHEN no_data_found THEN
2267: fnd_message.set_name('INV', 'INVALID_SUB');
2268: fnd_msg_pub.add;
2269: RAISE fnd_api.g_exc_error;
2270:
2271: END;*/
2272:
2273:

Line 2290: RAISE fnd_api.g_exc_error;

2286: EXCEPTION
2287: WHEN NO_DATA_FOUND THEN
2288: fnd_message.set_name('INV','INVALID_SUB');
2289: fnd_msg_pub.add;
2290: RAISE fnd_api.g_exc_error;
2291: END ;
2292: ELSIF inv_reservation_global.g_item_record_cache
2293: (p_item_cache_index)
2294: .restrict_subinventories_code = 2 THEN

Line 2306: RAISE fnd_api.g_exc_error;

2302: EXCEPTION
2303: WHEN NO_DATA_FOUND THEN
2304: fnd_message.SET_NAME('INV','INVALID_SUB');
2305: fnd_msg_pub.add;
2306: RAISE fnd_api.g_exc_error;
2307: END ;
2308: END IF;
2309: --
2310: -- now if locator id is not null then validate its value

Line 2337: RAISE fnd_api.g_exc_error; */

2333: EXCEPTION
2334: WHEN NO_DATA_FOUND THEN
2335: fnd_message.set_name('INV','INV_LOCATOR_NOT_AVAILABLE');
2336: fnd_msg_pub.add;
2337: RAISE fnd_api.g_exc_error; */
2338:
2339:
2340: IF INV_Validate.validateLocator(
2341: p_locator => l_rec_loc,

Line 2349: RAISE fnd_api.g_exc_error;

2345: p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index)
2346: )=INV_Validate.F THEN
2347: fnd_message.set_name('INV','INV_LOCATOR_NOT_AVAILABLE');
2348: fnd_msg_pub.add;
2349: RAISE fnd_api.g_exc_error;
2350: END IF;
2351: END;
2352: ELSIF inv_reservation_global.g_item_record_cache
2353: (p_item_cache_index)

Line 2369: RAISE fnd_api.g_exc_error;

2365: EXCEPTION
2366: WHEN NO_DATA_FOUND THEN
2367: fnd_message.set_name('INV','INV_LOCATOR_NOT_AVAILABLE');
2368: fnd_msg_pub.add;
2369: RAISE fnd_api.g_exc_error;
2370: END;*/
2371:
2372: -- Modified for common API
2373:

Line 2381: RAISE fnd_api.g_exc_error;

2377: (p_org_cache_index),
2378: p_sub => l_rec)=INV_Validate.F THEN
2379: fnd_message.set_name('INV','INV_LOCATOR_NOT_AVAILABLE');
2380: fnd_msg_pub.add;
2381: RAISE fnd_api.g_exc_error;
2382: END IF;
2383: END IF;
2384: END IF; -- if p_locator_id is not null
2385: END IF; -- if p_subinventory_code is not null

Line 2428: -- RAISE fnd_api.g_exc_error;

2424: -- fnd_message.set_name('INV','INVALID_SERIAL_NUMBER');
2425: -- fnd_message.set_token('NUMBER',p_serial_array(l_loop_index).serial_number,FALSE);
2426: /*** {{ R12 Enhanced ----reservations code changes ***/
2427: -- fnd_msg_pub.add;
2428: -- RAISE fnd_api.g_exc_error;
2429: -- END IF;
2430: -- EXIT WHEN l_loop_index = p_serial_array.last ;
2431: -- l_loop_index := p_serial_array.next(l_loop_index);
2432: -- END LOOP;

Line 2438: -- RAISE fnd_api.g_exc_error;

2434: -- WHEN NO_DATA_FOUND THEN
2435: -- fnd_message.set_name('INV','INVALID_SERIAL_NUMBER');
2436: -- fnd_message.set_token('NUMBER',p_serial_array(l_loop_index),FALSE);
2437: -- fnd_msg_pub.add;
2438: -- RAISE fnd_api.g_exc_error;
2439: -- */
2440: -- END;
2441: -- END IF;
2442: /*** End R12 }} ***/

Line 2458: RAISE fnd_api.g_exc_error;

2454: inv_reservation_global.g_item_record_cache(p_item_cache_index).lot_control_code = inv_reservation_global.g_lot_control_yes AND
2455: p_lot_number IS NULL THEN
2456: fnd_message.set_name('INV', 'INV_INDIVISIBLE_LOT_REQUIRED'); -- INVCONV New Message
2457: fnd_msg_pub.add;
2458: RAISE fnd_api.g_exc_error;
2459: END IF;
2460: -- INVCONV END
2461: --
2462: x_return_status := l_return_status;

Line 2466: WHEN fnd_api.g_exc_error THEN

2462: x_return_status := l_return_status;
2463: x_sub_cache_index:= l_sub_cache_index;
2464: --
2465: EXCEPTION
2466: WHEN fnd_api.g_exc_error THEN
2467: x_return_status := fnd_api.g_ret_sts_error;
2468: --
2469: WHEN fnd_api.g_exc_unexpected_error THEN
2470: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 2467: x_return_status := fnd_api.g_ret_sts_error;

2463: x_sub_cache_index:= l_sub_cache_index;
2464: --
2465: EXCEPTION
2466: WHEN fnd_api.g_exc_error THEN
2467: x_return_status := fnd_api.g_ret_sts_error;
2468: --
2469: WHEN fnd_api.g_exc_unexpected_error THEN
2470: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2471: --

Line 2469: WHEN fnd_api.g_exc_unexpected_error THEN

2465: EXCEPTION
2466: WHEN fnd_api.g_exc_error THEN
2467: x_return_status := fnd_api.g_ret_sts_error;
2468: --
2469: WHEN fnd_api.g_exc_unexpected_error THEN
2470: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2471: --
2472: WHEN OTHERS THEN
2473: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 2470: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2466: WHEN fnd_api.g_exc_error THEN
2467: x_return_status := fnd_api.g_ret_sts_error;
2468: --
2469: WHEN fnd_api.g_exc_unexpected_error THEN
2470: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2471: --
2472: WHEN OTHERS THEN
2473: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2474: --

Line 2473: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2469: WHEN fnd_api.g_exc_unexpected_error THEN
2470: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2471: --
2472: WHEN OTHERS THEN
2473: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2474: --
2475: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
2476: THEN
2477: fnd_msg_pub.add_exc_msg

Line 2515: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

2511: , p_org_cache_index IN INTEGER
2512: , x_supply_cache_index OUT NOCOPY INTEGER
2513: , x_sub_cache_index OUT NOCOPY INTEGER
2514: ) IS
2515: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2516: l_structure_num NUMBER := NULL;
2517: l_supply_cache_index NUMBER := NULL;
2518: l_sub_cache_index NUMBER := NULL;
2519: l_is_valid NUMBER := NULL;

Line 2552: RAISE fnd_api.g_exc_error;

2548:
2549: IF p_supply_source_type_id IS NULL THEN
2550: fnd_message.set_name('INV', 'MISSING SUPPLY');
2551: fnd_msg_pub.add;
2552: RAISE fnd_api.g_exc_error;
2553: END IF;
2554: --
2555:
2556: /*** {{ R12 Enhanced reservations code changes ***/

Line 2567: RAISE fnd_api.g_exc_error;

2563: inv_reservation_global.g_source_type_rcv)) THEN
2564:
2565: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY');
2566: fnd_msg_pub.ADD;
2567: RAISE fnd_api.g_exc_error;
2568: END IF;
2569: /*** End R12 }} ***/
2570:
2571: IF (l_debug = 1) THEN

Line 2586: IF l_return_status = fnd_api.g_ret_sts_error THEN

2582: , p_supply_source_name => p_supply_source_name
2583: , x_index => l_supply_cache_index
2584: );
2585: --
2586: IF l_return_status = fnd_api.g_ret_sts_error THEN
2587: RAISE fnd_api.g_exc_error;
2588: END IF ;
2589: --
2590: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 2587: RAISE fnd_api.g_exc_error;

2583: , x_index => l_supply_cache_index
2584: );
2585: --
2586: IF l_return_status = fnd_api.g_ret_sts_error THEN
2587: RAISE fnd_api.g_exc_error;
2588: END IF ;
2589: --
2590: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2591: RAISE fnd_api.g_exc_unexpected_error;

Line 2590: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2586: IF l_return_status = fnd_api.g_ret_sts_error THEN
2587: RAISE fnd_api.g_exc_error;
2588: END IF ;
2589: --
2590: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2591: RAISE fnd_api.g_exc_unexpected_error;
2592: END IF;
2593: --
2594: -- for other supply sources (wip, po), call their validation api

Line 2591: RAISE fnd_api.g_exc_unexpected_error;

2587: RAISE fnd_api.g_exc_error;
2588: END IF ;
2589: --
2590: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2591: RAISE fnd_api.g_exc_unexpected_error;
2592: END IF;
2593: --
2594: -- for other supply sources (wip, po), call their validation api
2595: -- when available

Line 2624: IF l_return_status = fnd_api.g_ret_sts_error THEN

2620: IF (l_debug = 1) THEN
2621: debug_print('After calling validate po ' || l_return_status);
2622: END IF;
2623:
2624: IF l_return_status = fnd_api.g_ret_sts_error THEN
2625: RAISE fnd_api.g_exc_error;
2626: END IF ;
2627: --
2628: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 2625: RAISE fnd_api.g_exc_error;

2621: debug_print('After calling validate po ' || l_return_status);
2622: END IF;
2623:
2624: IF l_return_status = fnd_api.g_ret_sts_error THEN
2625: RAISE fnd_api.g_exc_error;
2626: END IF ;
2627: --
2628: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2629: RAISE fnd_api.g_exc_unexpected_error;

Line 2628: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2624: IF l_return_status = fnd_api.g_ret_sts_error THEN
2625: RAISE fnd_api.g_exc_error;
2626: END IF ;
2627: --
2628: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2629: RAISE fnd_api.g_exc_unexpected_error;
2630: END IF;
2631: ELSIF p_supply_source_type_id = inv_reservation_global.g_source_type_req
2632: THEN

Line 2629: RAISE fnd_api.g_exc_unexpected_error;

2625: RAISE fnd_api.g_exc_error;
2626: END IF ;
2627: --
2628: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2629: RAISE fnd_api.g_exc_unexpected_error;
2630: END IF;
2631: ELSIF p_supply_source_type_id = inv_reservation_global.g_source_type_req
2632: THEN
2633: IF (l_debug = 1) THEN

Line 2651: IF l_return_status = fnd_api.g_ret_sts_error THEN

2647: );
2648: IF (l_debug = 1) THEN
2649: debug_print('After calling validate req ' || l_return_status);
2650: END IF;
2651: IF l_return_status = fnd_api.g_ret_sts_error THEN
2652: RAISE fnd_api.g_exc_error;
2653: END IF ;
2654: --
2655: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 2652: RAISE fnd_api.g_exc_error;

2648: IF (l_debug = 1) THEN
2649: debug_print('After calling validate req ' || l_return_status);
2650: END IF;
2651: IF l_return_status = fnd_api.g_ret_sts_error THEN
2652: RAISE fnd_api.g_exc_error;
2653: END IF ;
2654: --
2655: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2656: RAISE fnd_api.g_exc_unexpected_error;

Line 2655: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2651: IF l_return_status = fnd_api.g_ret_sts_error THEN
2652: RAISE fnd_api.g_exc_error;
2653: END IF ;
2654: --
2655: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2656: RAISE fnd_api.g_exc_unexpected_error;
2657: END IF;
2658:
2659: /*** {{ R12 Enhanced reservations code changes ***/

Line 2656: RAISE fnd_api.g_exc_unexpected_error;

2652: RAISE fnd_api.g_exc_error;
2653: END IF ;
2654: --
2655: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2656: RAISE fnd_api.g_exc_unexpected_error;
2657: END IF;
2658:
2659: /*** {{ R12 Enhanced reservations code changes ***/
2660: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN

Line 2674: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

2670: , p_supply_source_line_id => p_supply_source_line_id
2671: , p_supply_source_line_detail => NULL
2672: );
2673:
2674: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2675: RAISE fnd_api.g_exc_error;
2676: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2677: RAISE fnd_api.g_exc_unexpected_error;
2678: END IF;

Line 2675: RAISE fnd_api.g_exc_error;

2671: , p_supply_source_line_detail => NULL
2672: );
2673:
2674: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2675: RAISE fnd_api.g_exc_error;
2676: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2677: RAISE fnd_api.g_exc_unexpected_error;
2678: END IF;
2679: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN

Line 2676: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

2672: );
2673:
2674: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2675: RAISE fnd_api.g_exc_error;
2676: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2677: RAISE fnd_api.g_exc_unexpected_error;
2678: END IF;
2679: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN
2680: validate_supply_source_asn

Line 2677: RAISE fnd_api.g_exc_unexpected_error;

2673:
2674: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2675: RAISE fnd_api.g_exc_error;
2676: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2677: RAISE fnd_api.g_exc_unexpected_error;
2678: END IF;
2679: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN
2680: validate_supply_source_asn
2681: (

Line 2693: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

2689: , p_supply_source_line_id => p_supply_source_line_id
2690: , p_supply_source_line_detail => p_supply_source_line_detail
2691: );
2692:
2693: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2694: RAISE fnd_api.g_exc_error;
2695: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2696: RAISE fnd_api.g_exc_unexpected_error;
2697: END IF;

Line 2694: RAISE fnd_api.g_exc_error;

2690: , p_supply_source_line_detail => p_supply_source_line_detail
2691: );
2692:
2693: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2694: RAISE fnd_api.g_exc_error;
2695: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2696: RAISE fnd_api.g_exc_unexpected_error;
2697: END IF;
2698: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_intransit) THEN

Line 2695: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

2691: );
2692:
2693: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2694: RAISE fnd_api.g_exc_error;
2695: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2696: RAISE fnd_api.g_exc_unexpected_error;
2697: END IF;
2698: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_intransit) THEN
2699: validate_supply_source_intran

Line 2696: RAISE fnd_api.g_exc_unexpected_error;

2692:
2693: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2694: RAISE fnd_api.g_exc_error;
2695: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2696: RAISE fnd_api.g_exc_unexpected_error;
2697: END IF;
2698: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_intransit) THEN
2699: validate_supply_source_intran
2700: (

Line 2712: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

2708: , p_supply_source_line_id => p_supply_source_line_id
2709: , p_supply_source_line_detail => NULL
2710: );
2711:
2712: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2713: RAISE fnd_api.g_exc_error;
2714: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2715: RAISE fnd_api.g_exc_unexpected_error;
2716: END IF;

Line 2713: RAISE fnd_api.g_exc_error;

2709: , p_supply_source_line_detail => NULL
2710: );
2711:
2712: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2713: RAISE fnd_api.g_exc_error;
2714: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2715: RAISE fnd_api.g_exc_unexpected_error;
2716: END IF;
2717: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_rcv) THEN

Line 2714: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

2710: );
2711:
2712: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2713: RAISE fnd_api.g_exc_error;
2714: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2715: RAISE fnd_api.g_exc_unexpected_error;
2716: END IF;
2717: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_rcv) THEN
2718: validate_supply_source_rcv

Line 2715: RAISE fnd_api.g_exc_unexpected_error;

2711:
2712: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2713: RAISE fnd_api.g_exc_error;
2714: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2715: RAISE fnd_api.g_exc_unexpected_error;
2716: END IF;
2717: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_rcv) THEN
2718: validate_supply_source_rcv
2719: (

Line 2731: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

2727: , p_supply_source_line_id => p_supply_source_line_id
2728: , p_supply_source_line_detail => NULL
2729: );
2730:
2731: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2732: RAISE fnd_api.g_exc_error;
2733: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2734: RAISE fnd_api.g_exc_unexpected_error;
2735: END IF;

Line 2732: RAISE fnd_api.g_exc_error;

2728: , p_supply_source_line_detail => NULL
2729: );
2730:
2731: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2732: RAISE fnd_api.g_exc_error;
2733: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2734: RAISE fnd_api.g_exc_unexpected_error;
2735: END IF;
2736:

Line 2733: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

2729: );
2730:
2731: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2732: RAISE fnd_api.g_exc_error;
2733: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2734: RAISE fnd_api.g_exc_unexpected_error;
2735: END IF;
2736:
2737: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN

Line 2734: RAISE fnd_api.g_exc_unexpected_error;

2730:
2731: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2732: RAISE fnd_api.g_exc_error;
2733: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2734: RAISE fnd_api.g_exc_unexpected_error;
2735: END IF;
2736:
2737: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN
2738: -- get wip entity id from wip_record_cache

Line 2745: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

2741: x_return_status => l_return_status
2742: , p_wip_entity_id => p_supply_source_header_id
2743: );
2744:
2745: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2746: RAISE fnd_api.g_exc_error;
2747: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2748: RAISE fnd_api.g_exc_unexpected_error;
2749: ELSE

Line 2746: RAISE fnd_api.g_exc_error;

2742: , p_wip_entity_id => p_supply_source_header_id
2743: );
2744:
2745: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2746: RAISE fnd_api.g_exc_error;
2747: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2748: RAISE fnd_api.g_exc_unexpected_error;
2749: ELSE
2750: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;

Line 2747: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

2743: );
2744:
2745: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2746: RAISE fnd_api.g_exc_error;
2747: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2748: RAISE fnd_api.g_exc_unexpected_error;
2749: ELSE
2750: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
2751: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;

Line 2748: RAISE fnd_api.g_exc_unexpected_error;

2744:
2745: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2746: RAISE fnd_api.g_exc_error;
2747: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2748: RAISE fnd_api.g_exc_unexpected_error;
2749: ELSE
2750: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
2751: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
2752: END IF;

Line 2760: RAISE fnd_api.g_exc_error;

2756: inv_reservation_global.g_wip_source_type_osfm, inv_reservation_global.g_wip_source_type_fpo,
2757: inv_reservation_global.g_wip_source_type_batch)) THEN
2758: fnd_message.set_name('INV', 'INV_RSV_WIP_ENT_ERR');
2759: fnd_msg_pub.ADD;
2760: RAISE fnd_api.g_exc_error;
2761: END IF;
2762:
2763: -- add validation to check if the supply is wip discrete and osfm, then the
2764: -- demand source needs to be sales order or internal order, otherwise, error out.

Line 2771: RAISE fnd_api.g_exc_error;

2767: IF (p_demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
2768: inv_reservation_global.g_source_type_internal_ord)) THEN
2769: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
2770: fnd_msg_pub.ADD;
2771: RAISE fnd_api.g_exc_error;
2772: END IF;
2773: END IF;
2774:
2775: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN

Line 2794: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

2790: IF (l_debug = 1) THEN
2791: debug_print('Return status from supply source wipdisc :' || l_return_status);
2792: END IF;
2793:
2794: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2795: RAISE fnd_api.g_exc_error;
2796: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2797: RAISE fnd_api.g_exc_unexpected_error;
2798: END IF;

Line 2795: RAISE fnd_api.g_exc_error;

2791: debug_print('Return status from supply source wipdisc :' || l_return_status);
2792: END IF;
2793:
2794: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2795: RAISE fnd_api.g_exc_error;
2796: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2797: RAISE fnd_api.g_exc_unexpected_error;
2798: END IF;
2799:

Line 2796: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

2792: END IF;
2793:
2794: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2795: RAISE fnd_api.g_exc_error;
2796: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2797: RAISE fnd_api.g_exc_unexpected_error;
2798: END IF;
2799:
2800: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN

Line 2797: RAISE fnd_api.g_exc_unexpected_error;

2793:
2794: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2795: RAISE fnd_api.g_exc_error;
2796: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2797: RAISE fnd_api.g_exc_unexpected_error;
2798: END IF;
2799:
2800: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN
2801: validate_supply_source_osfm

Line 2815: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

2811: , p_supply_source_line_detail => NULL
2812: , p_wip_entity_type => l_wip_entity_type
2813: );
2814:
2815: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2816: RAISE fnd_api.g_exc_error;
2817: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2818: RAISE fnd_api.g_exc_unexpected_error;
2819: END IF;

Line 2816: RAISE fnd_api.g_exc_error;

2812: , p_wip_entity_type => l_wip_entity_type
2813: );
2814:
2815: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2816: RAISE fnd_api.g_exc_error;
2817: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2818: RAISE fnd_api.g_exc_unexpected_error;
2819: END IF;
2820: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN

Line 2817: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

2813: );
2814:
2815: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2816: RAISE fnd_api.g_exc_error;
2817: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2818: RAISE fnd_api.g_exc_unexpected_error;
2819: END IF;
2820: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN
2821: validate_supply_source_fpo

Line 2818: RAISE fnd_api.g_exc_unexpected_error;

2814:
2815: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2816: RAISE fnd_api.g_exc_error;
2817: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2818: RAISE fnd_api.g_exc_unexpected_error;
2819: END IF;
2820: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN
2821: validate_supply_source_fpo
2822: (

Line 2834: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

2830: , p_supply_source_line_id => p_supply_source_line_id
2831: , p_supply_source_line_detail => NULL
2832: , p_wip_entity_type => l_wip_entity_type
2833: );
2834: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2835: RAISE fnd_api.g_exc_error;
2836: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2837: RAISE fnd_api.g_exc_unexpected_error;
2838: END IF;

Line 2835: RAISE fnd_api.g_exc_error;

2831: , p_supply_source_line_detail => NULL
2832: , p_wip_entity_type => l_wip_entity_type
2833: );
2834: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2835: RAISE fnd_api.g_exc_error;
2836: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2837: RAISE fnd_api.g_exc_unexpected_error;
2838: END IF;
2839: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

Line 2836: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

2832: , p_wip_entity_type => l_wip_entity_type
2833: );
2834: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2835: RAISE fnd_api.g_exc_error;
2836: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2837: RAISE fnd_api.g_exc_unexpected_error;
2838: END IF;
2839: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
2840: validate_supply_source_batch

Line 2837: RAISE fnd_api.g_exc_unexpected_error;

2833: );
2834: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2835: RAISE fnd_api.g_exc_error;
2836: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2837: RAISE fnd_api.g_exc_unexpected_error;
2838: END IF;
2839: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
2840: validate_supply_source_batch
2841: (

Line 2853: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

2849: , p_supply_source_line_id => p_supply_source_line_id
2850: , p_supply_source_line_detail => NULL
2851: , p_wip_entity_type => l_wip_entity_type
2852: );
2853: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2854: RAISE fnd_api.g_exc_error;
2855: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2856: RAISE fnd_api.g_exc_unexpected_error;
2857: END IF;

Line 2854: RAISE fnd_api.g_exc_error;

2850: , p_supply_source_line_detail => NULL
2851: , p_wip_entity_type => l_wip_entity_type
2852: );
2853: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2854: RAISE fnd_api.g_exc_error;
2855: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2856: RAISE fnd_api.g_exc_unexpected_error;
2857: END IF;
2858: END IF;

Line 2855: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

2851: , p_wip_entity_type => l_wip_entity_type
2852: );
2853: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2854: RAISE fnd_api.g_exc_error;
2855: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2856: RAISE fnd_api.g_exc_unexpected_error;
2857: END IF;
2858: END IF;
2859: /*** End R12 }} ***/

Line 2856: RAISE fnd_api.g_exc_unexpected_error;

2852: );
2853: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2854: RAISE fnd_api.g_exc_error;
2855: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2856: RAISE fnd_api.g_exc_unexpected_error;
2857: END IF;
2858: END IF;
2859: /*** End R12 }} ***/
2860: END IF;

Line 2883: IF l_return_status = fnd_api.g_ret_sts_error THEN

2879: IF (l_debug = 1) THEN
2880: debug_print('After adding supply cache. Return status :' || l_return_status);
2881: END IF;
2882:
2883: IF l_return_status = fnd_api.g_ret_sts_error THEN
2884: RAISE fnd_api.g_exc_error;
2885: END IF ;
2886: --
2887: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 2884: RAISE fnd_api.g_exc_error;

2880: debug_print('After adding supply cache. Return status :' || l_return_status);
2881: END IF;
2882:
2883: IF l_return_status = fnd_api.g_ret_sts_error THEN
2884: RAISE fnd_api.g_exc_error;
2885: END IF ;
2886: --
2887: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2888: RAISE fnd_api.g_exc_unexpected_error;

Line 2887: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2883: IF l_return_status = fnd_api.g_ret_sts_error THEN
2884: RAISE fnd_api.g_exc_error;
2885: END IF ;
2886: --
2887: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2888: RAISE fnd_api.g_exc_unexpected_error;
2889: END IF;
2890: END IF;
2891: --

Line 2888: RAISE fnd_api.g_exc_unexpected_error;

2884: RAISE fnd_api.g_exc_error;
2885: END IF ;
2886: --
2887: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2888: RAISE fnd_api.g_exc_unexpected_error;
2889: END IF;
2890: END IF;
2891: --
2892: -- call validate_item_sku

Line 2914: IF l_return_status = fnd_api.g_ret_sts_error THEN

2910: IF (l_debug = 1) THEN
2911: debug_print('After adding validate item sku. Return status :' ||
2912: l_return_status);
2913: END IF;
2914: IF l_return_status = fnd_api.g_ret_sts_error THEN
2915: RAISE fnd_api.g_exc_error;
2916: END IF ;
2917: --
2918: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 2915: RAISE fnd_api.g_exc_error;

2911: debug_print('After adding validate item sku. Return status :' ||
2912: l_return_status);
2913: END IF;
2914: IF l_return_status = fnd_api.g_ret_sts_error THEN
2915: RAISE fnd_api.g_exc_error;
2916: END IF ;
2917: --
2918: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2919: RAISE fnd_api.g_exc_unexpected_error;

Line 2918: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

2914: IF l_return_status = fnd_api.g_ret_sts_error THEN
2915: RAISE fnd_api.g_exc_error;
2916: END IF ;
2917: --
2918: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2919: RAISE fnd_api.g_exc_unexpected_error;
2920: END IF;
2921: ELSIF p_subinventory_code IS NOT NULL
2922: OR p_locator_id IS NOT NULL

Line 2919: RAISE fnd_api.g_exc_unexpected_error;

2915: RAISE fnd_api.g_exc_error;
2916: END IF ;
2917: --
2918: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2919: RAISE fnd_api.g_exc_unexpected_error;
2920: END IF;
2921: ELSIF p_subinventory_code IS NOT NULL
2922: OR p_locator_id IS NOT NULL
2923: THEN

Line 2927: RAISE fnd_api.g_exc_error;

2923: THEN
2924: -- if the supply source is not inv, sub, locator should be null and serial number should be empty
2925: fnd_message.set_name('INV', 'EXTRA_SUPPLY_INFO');
2926: fnd_msg_pub.ADD;
2927: RAISE fnd_api.g_exc_error;
2928: END IF;
2929: --
2930: x_sub_cache_index := l_sub_cache_index;
2931: x_supply_cache_index := l_supply_cache_index;

Line 2935: WHEN fnd_api.g_exc_error THEN

2931: x_supply_cache_index := l_supply_cache_index;
2932: x_return_status := l_return_status;
2933: --
2934: EXCEPTION
2935: WHEN fnd_api.g_exc_error THEN
2936: x_return_status := fnd_api.g_ret_sts_error;
2937: IF (l_debug = 1) THEN
2938: debug_print('Return status from supply source :' || x_return_status);
2939: END IF;

Line 2936: x_return_status := fnd_api.g_ret_sts_error;

2932: x_return_status := l_return_status;
2933: --
2934: EXCEPTION
2935: WHEN fnd_api.g_exc_error THEN
2936: x_return_status := fnd_api.g_ret_sts_error;
2937: IF (l_debug = 1) THEN
2938: debug_print('Return status from supply source :' || x_return_status);
2939: END IF;
2940: --

Line 2941: WHEN fnd_api.g_exc_unexpected_error THEN

2937: IF (l_debug = 1) THEN
2938: debug_print('Return status from supply source :' || x_return_status);
2939: END IF;
2940: --
2941: WHEN fnd_api.g_exc_unexpected_error THEN
2942: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2943: --
2944: WHEN OTHERS THEN
2945: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 2942: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2938: debug_print('Return status from supply source :' || x_return_status);
2939: END IF;
2940: --
2941: WHEN fnd_api.g_exc_unexpected_error THEN
2942: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2943: --
2944: WHEN OTHERS THEN
2945: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2946: --

Line 2945: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2941: WHEN fnd_api.g_exc_unexpected_error THEN
2942: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2943: --
2944: WHEN OTHERS THEN
2945: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2946: --
2947: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
2948: THEN
2949: fnd_msg_pub.add_exc_msg

Line 2963: -- 3. if p_has_serial_number = fnd_api.g_true, p_primary_quantity or

2959: -- Description
2960: -- is valid if all of the following are satisfied
2961: -- 1. p_primary_uom or p_reservation_uom is not null
2962: -- 2. p_primary_quantity or p_reservation_quantity is not null
2963: -- 3. if p_has_serial_number = fnd_api.g_true, p_primary_quantity or
2964: -- if p_primary_quantity is null, p_reservation_quantity is an integer
2965: -- INVCONV
2966: -- Additional validations for single/dual tracking
2967: PROCEDURE validate_quantity

Line 2980: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

2976: , p_lot_number IN VARCHAR2 -- INVCONV
2977: , p_has_serial_number IN VARCHAR2
2978: , p_item_cache_index IN NUMBER -- INVCON
2979: ) IS
2980: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2981: l_quantity NUMBER;
2982: l_error_message VARCHAR2(1000); -- INVCONV
2983: l_qtys_within_dev NUMBER DEFAULT 1; -- INVCONV
2984: BEGIN

Line 2990: RAISE fnd_api.g_exc_error;

2986: IF p_primary_uom IS NULL
2987: AND p_reservation_uom IS NULL THEN
2988: fnd_message.set_name('INV', 'MISSING UOM');
2989: fnd_msg_pub.add;
2990: RAISE fnd_api.g_exc_error;
2991: END IF;
2992: --
2993: IF p_primary_quantity IS NULL
2994: AND p_reservation_quantity IS NULL THEN

Line 2997: RAISE fnd_api.g_exc_error;

2993: IF p_primary_quantity IS NULL
2994: AND p_reservation_quantity IS NULL THEN
2995: fnd_message.set_name('INV', 'MISSING RSV QUANTITY');
2996: fnd_msg_pub.add;
2997: RAISE fnd_api.g_exc_error;
2998: END IF;
2999: --
3000: IF p_primary_quantity IS NOT NULL THEN
3001: l_quantity := p_primary_quantity;

Line 3009: AND p_has_serial_number = fnd_api.g_true THEN

3005: --
3006: -- the quantity should be an integer
3007: -- if serial number is provided
3008: IF l_quantity <> Trunc(l_quantity)
3009: AND p_has_serial_number = fnd_api.g_true THEN
3010: fnd_message.set_name('INV', 'INV_QTY_EQ_INTEGER');
3011: fnd_msg_pub.add;
3012: RAISE fnd_api.g_exc_error;
3013: END IF;

Line 3012: RAISE fnd_api.g_exc_error;

3008: IF l_quantity <> Trunc(l_quantity)
3009: AND p_has_serial_number = fnd_api.g_true THEN
3010: fnd_message.set_name('INV', 'INV_QTY_EQ_INTEGER');
3011: fnd_msg_pub.add;
3012: RAISE fnd_api.g_exc_error;
3013: END IF;
3014: --
3015:
3016: -- if the item is not defined as dual control

Line 3026: RAISE fnd_api.g_exc_error;

3022: -- ===================
3023: IF p_secondary_uom IS NOT NULL THEN
3024: fnd_message.set_name('INV', 'INV_SECONDARY_UOM_NOT_REQUIRED'); -- INVCONV New Message
3025: fnd_msg_pub.add;
3026: RAISE fnd_api.g_exc_error;
3027: ELSIF p_secondary_quantity IS NOT NULL THEN
3028: fnd_message.set_name('INV', 'INV_SECONDARY_QTY_NOT_REQUIRED');-- INVCONV New Message
3029: fnd_msg_pub.add;
3030: RAISE fnd_api.g_exc_error;

Line 3030: RAISE fnd_api.g_exc_error;

3026: RAISE fnd_api.g_exc_error;
3027: ELSIF p_secondary_quantity IS NOT NULL THEN
3028: fnd_message.set_name('INV', 'INV_SECONDARY_QTY_NOT_REQUIRED');-- INVCONV New Message
3029: fnd_msg_pub.add;
3030: RAISE fnd_api.g_exc_error;
3031: END IF;
3032: ELSIF inv_reservation_global.g_item_record_cache
3033: (p_item_cache_index).tracking_quantity_ind = 'PS' THEN
3034: -- DUAL UOM TRACKING

Line 3039: RAISE fnd_api.g_exc_error;

3035: -- =================
3036: IF p_secondary_uom IS NULL THEN
3037: fnd_message.set_name('INV', 'INV_SECONDARY_UOM_REQUIRED'); -- INVCONV New Message
3038: fnd_msg_pub.add;
3039: RAISE fnd_api.g_exc_error;
3040: ELSIF p_secondary_uom <> inv_reservation_global.g_item_record_cache(p_item_cache_index).secondary_uom_code THEN
3041: fnd_message.set_name('INV', 'INV_INCORRECT_SECONDARY_UOM'); -- INVCONV New Message
3042: fnd_msg_pub.add;
3043: RAISE fnd_api.g_exc_error;

Line 3043: RAISE fnd_api.g_exc_error;

3039: RAISE fnd_api.g_exc_error;
3040: ELSIF p_secondary_uom <> inv_reservation_global.g_item_record_cache(p_item_cache_index).secondary_uom_code THEN
3041: fnd_message.set_name('INV', 'INV_INCORRECT_SECONDARY_UOM'); -- INVCONV New Message
3042: fnd_msg_pub.add;
3043: RAISE fnd_api.g_exc_error;
3044: ELSIF p_secondary_quantity IS NULL THEN
3045: fnd_message.set_name('INV', 'INV_SECONDARY_QTY_REQUIRED'); -- INVCONV New Message
3046: fnd_msg_pub.add;
3047: RAISE fnd_api.g_exc_error;

Line 3047: RAISE fnd_api.g_exc_error;

3043: RAISE fnd_api.g_exc_error;
3044: ELSIF p_secondary_quantity IS NULL THEN
3045: fnd_message.set_name('INV', 'INV_SECONDARY_QTY_REQUIRED'); -- INVCONV New Message
3046: fnd_msg_pub.add;
3047: RAISE fnd_api.g_exc_error;
3048: END IF;
3049: -- Ensure that primary/secondary quantities honor the UOM conversion and deviations in place
3050:
3051: /* IF the Reservation UOM and Secondary UOM are the same AND the Reservation qty and the Secondary Reservation

Line 3074: RAISE fnd_api.g_exc_error;

3070:
3071: IF (l_qtys_within_dev <> 1) THEN
3072: --fnd_message.set_name('INV', l_error_message);
3073: --fnd_msg_pub.add;
3074: RAISE fnd_api.g_exc_error;
3075: END IF;
3076: END IF; /* IF for Fixed item */
3077: END IF;
3078: -- INVCONV END

Line 3084: WHEN fnd_api.g_exc_error THEN

3080:
3081: x_return_status := l_return_status;
3082: --
3083: EXCEPTION
3084: WHEN fnd_api.g_exc_error THEN
3085: x_return_status := fnd_api.g_ret_sts_error;
3086: --
3087: WHEN OTHERS THEN
3088: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3085: x_return_status := fnd_api.g_ret_sts_error;

3081: x_return_status := l_return_status;
3082: --
3083: EXCEPTION
3084: WHEN fnd_api.g_exc_error THEN
3085: x_return_status := fnd_api.g_ret_sts_error;
3086: --
3087: WHEN OTHERS THEN
3088: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3089: --

Line 3088: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3084: WHEN fnd_api.g_exc_error THEN
3085: x_return_status := fnd_api.g_ret_sts_error;
3086: --
3087: WHEN OTHERS THEN
3088: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3089: --
3090: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
3091: THEN
3092: fnd_msg_pub.add_exc_msg

Line 3135: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

3131: , p_supply_type_id IN NUMBER /*** {{ R12 Enhanced reservations code changes }}***/
3132: , p_substitute_flag IN BOOLEAN DEFAULT FALSE /* Bug 6044651 */
3133: ) IS
3134:
3135: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3136:
3137: l_org_id NUMBER;
3138:
3139: l_line_rec_inventory_item_id oe_order_lines_all.inventory_item_id%TYPE;

Line 3155: x_return_status := fnd_api.g_ret_sts_success;

3151: l_booked_flag VARCHAR2(1) := 'N'; /*** {{ R12 Enhanced reservations code changes ***/
3152: l_debug NUMBER := g_debug;
3153: BEGIN
3154: -- Initialize return status
3155: x_return_status := fnd_api.g_ret_sts_success;
3156:
3157: IF p_demand_type_id in (inv_reservation_global.g_source_type_oe,
3158: inv_reservation_global.g_source_type_internal_ord,
3159: inv_reservation_global.g_source_type_rma) THEN

Line 3200: RAISE fnd_api.g_exc_error;

3196: (Nvl(p_orig_demand_line_id,-99) <> Nvl(p_demand_line_id,-99))) THEN
3197: IF nvl(l_line_rec_open_flag, 'N') <> 'Y' AND Nvl(l_source_type_code, 'INTERNAL') <> 'EXTERNAL' THEN
3198: FND_MESSAGE.SET_NAME('INV', 'INV_RESERVATION_CLOSED_SO');
3199: FND_MSG_PUB.add;
3200: RAISE fnd_api.g_exc_error;
3201: END IF;
3202: END IF;
3203:
3204: /* Bug 3118495 -- Should not allow user to create a reservation against a shipped sales order line */

Line 3209: RAISE fnd_api.g_exc_error;

3205: -- Validate 2 -- the sales order line should not be in 'SHIPPED' status
3206: IF l_flow_status_code = 'SHIPPED' THEN
3207: FND_MESSAGE.SET_NAME('INV', 'INV_RESERVATION_SHIPPED_SO');
3208: FND_MSG_PUB.add;
3209: RAISE fnd_api.g_exc_error;
3210: END IF;
3211: -- Validate 3 -- Item : The item on the reservation has to
3212: -- be the same as the item on the sales order line
3213: /* Bug 6044651 Do not perform this validation if substitue item is being used in a sales order */

Line 3220: RAISE fnd_api.g_exc_error;

3216: OR p_reservation_item_id <> l_line_rec_inventory_item_id THEN
3217:
3218: FND_MESSAGE.SET_NAME('INV', 'INV_RESERVATION_INVALID_ITEM');
3219: FND_MSG_PUB.add;
3220: RAISE fnd_api.g_exc_error;
3221: END IF;
3222: END IF;
3223: /* End of Bug 6044651 */
3224:

Line 3231: RAISE fnd_api.g_exc_error;

3227: -- order has to be booked.
3228: IF (nvl(l_booked_flag, 'N') <> 'Y' AND p_supply_type_id <> inv_reservation_global.g_source_type_inv) THEN
3229: FND_MESSAGE.SET_NAME('INV', 'INV_RSV_SO_NOT_BOOKED');
3230: FND_MSG_PUB.ADD;
3231: RAISE fnd_api.g_exc_error;
3232: END IF;
3233:
3234:
3235: -- Validate 5 -- if the demand type is sales order, call validate_demand_source_so

Line 3250: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

3246: IF l_debug = 1 THEN
3247: debug_print ('Inside validate sales order after calling validate so' || l_return_status);
3248: END IF;
3249:
3250: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3251: RAISE fnd_api.g_exc_error;
3252: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3253: RAISE fnd_api.g_exc_unexpected_error;
3254: END IF;

Line 3251: RAISE fnd_api.g_exc_error;

3247: debug_print ('Inside validate sales order after calling validate so' || l_return_status);
3248: END IF;
3249:
3250: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3251: RAISE fnd_api.g_exc_error;
3252: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3253: RAISE fnd_api.g_exc_unexpected_error;
3254: END IF;
3255:

Line 3252: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3248: END IF;
3249:
3250: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3251: RAISE fnd_api.g_exc_error;
3252: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3253: RAISE fnd_api.g_exc_unexpected_error;
3254: END IF;
3255:
3256: END IF;

Line 3253: RAISE fnd_api.g_exc_unexpected_error;

3249:
3250: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3251: RAISE fnd_api.g_exc_error;
3252: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3253: RAISE fnd_api.g_exc_unexpected_error;
3254: END IF;
3255:
3256: END IF;
3257: /*** End R12 }} ***/

Line 3315: * RAISE fnd_api.g_exc_error;

3311: *IF (l_ordered_quantity_rsv_uom - l_reserved_quantity) <
3312: * p_reservation_quantity THEN
3313: * FND_MESSAGE.SET_NAME('INV','INV_RSV_ORDER_QTY_VALID');
3314: * FND_MSG_PUB.ADD;
3315: * RAISE fnd_api.g_exc_error;
3316: *END IF;
3317: */
3318:
3319: IF (l_debug = 1) THEN

Line 3326: WHEN fnd_api.g_exc_error THEN

3322:
3323: END IF;
3324:
3325: EXCEPTION
3326: WHEN fnd_api.g_exc_error THEN
3327: x_return_status := fnd_api.g_ret_sts_error;
3328: --
3329: WHEN OTHERS THEN
3330: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3327: x_return_status := fnd_api.g_ret_sts_error;

3323: END IF;
3324:
3325: EXCEPTION
3326: WHEN fnd_api.g_exc_error THEN
3327: x_return_status := fnd_api.g_ret_sts_error;
3328: --
3329: WHEN OTHERS THEN
3330: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3331: --

Line 3330: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3326: WHEN fnd_api.g_exc_error THEN
3327: x_return_status := fnd_api.g_ret_sts_error;
3328: --
3329: WHEN OTHERS THEN
3330: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3331: --
3332: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
3333: THEN
3334: fnd_msg_pub.add_exc_msg

Line 3381: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

3377: , p_supply_receipt_date IN DATE
3378: , x_demand_cache_index OUT NOCOPY INTEGER
3379: , p_substitute_flag IN BOOLEAN DEFAULT FALSE /* Bug 6044651 */
3380: ) IS
3381: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3382: l_structure_num NUMBER := NULL;
3383: l_index NUMBER := NULL;
3384: l_is_valid NUMBER := NULL;
3385: l_rec inv_reservation_global.demand_record;

Line 3446: RAISE fnd_api.g_exc_error;

3442: inv_reservation_global.g_source_type_rma, inv_reservation_global.g_source_type_wip)
3443: AND NOT(p_demand_source_type_id >100)) THEN
3444: fnd_message.set_name('INV','INV_INVALID_DEMAND_SOURCE');
3445: fnd_msg_pub.add;
3446: RAISE fnd_api.g_exc_error;
3447: END IF;
3448: /*** End R12 }} ***/
3449:
3450: -- if the demand source type is inventory, or type id > 100

Line 3457: RAISE fnd_api.g_exc_error;

3453: OR p_demand_source_type_id > 100 THEN
3454: if p_demand_source_name IS NULL THEN
3455: fnd_message.set_name('INV','INV_INVALID_DEMAND_SOURCE');
3456: fnd_msg_pub.add;
3457: RAISE fnd_api.g_exc_error;
3458: END IF;
3459: END IF;
3460: --
3461: -- search for the demand source in the cache first

Line 3472: IF l_return_status = fnd_api.g_ret_sts_error THEN

3468: , p_demand_source_name => p_demand_source_name
3469: , x_index => l_index
3470: );
3471: --
3472: IF l_return_status = fnd_api.g_ret_sts_error THEN
3473: RAISE fnd_api.g_exc_error;
3474: END IF ;
3475: --
3476: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3473: RAISE fnd_api.g_exc_error;

3469: , x_index => l_index
3470: );
3471: --
3472: IF l_return_status = fnd_api.g_ret_sts_error THEN
3473: RAISE fnd_api.g_exc_error;
3474: END IF ;
3475: --
3476: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3477: RAISE fnd_api.g_exc_unexpected_error;

Line 3476: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3472: IF l_return_status = fnd_api.g_ret_sts_error THEN
3473: RAISE fnd_api.g_exc_error;
3474: END IF ;
3475: --
3476: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3477: RAISE fnd_api.g_exc_unexpected_error;
3478: END IF;
3479: --
3480: -- I would just put valid demand source in the cache for

Line 3477: RAISE fnd_api.g_exc_unexpected_error;

3473: RAISE fnd_api.g_exc_error;
3474: END IF ;
3475: --
3476: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3477: RAISE fnd_api.g_exc_unexpected_error;
3478: END IF;
3479: --
3480: -- I would just put valid demand source in the cache for
3481: -- now. so I do not need to check is_valid

Line 3508: -- call fnd api to validate the account id

3504: ood.organization_id = p_organization_id
3505: AND ffs.id_flex_code = 'GL#'
3506: AND ood.chart_of_accounts_id = ffs.id_flex_num;
3507:
3508: -- call fnd api to validate the account id
3509: IF NOT fnd_flex_keyval.validate_ccid
3510: (
3511: 'SQLGL'
3512: , 'GL#'

Line 3518: RAISE fnd_api.g_exc_error;

3514: , p_demand_source_header_id
3515: ) THEN
3516: fnd_message.set_name('INV', 'INVALID_ACCOUNT_NUMBER');
3517: fnd_msg_pub.add;
3518: RAISE fnd_api.g_exc_error;
3519: END IF;
3520: EXCEPTION
3521: WHEN no_data_found THEN
3522: fnd_message.set_name('INV', 'INVALID_ACCOUNT_NUMBER');

Line 3524: RAISE fnd_api.g_exc_error;

3520: EXCEPTION
3521: WHEN no_data_found THEN
3522: fnd_message.set_name('INV', 'INVALID_ACCOUNT_NUMBER');
3523: fnd_msg_pub.add;
3524: RAISE fnd_api.g_exc_error;
3525: END;
3526: --
3527: ELSE
3528: fnd_message.set_name('INV', 'INVALID_ACCOUNT_NUMBER');

Line 3530: RAISE fnd_api.g_exc_error;

3526: --
3527: ELSE
3528: fnd_message.set_name('INV', 'INVALID_ACCOUNT_NUMBER');
3529: fnd_msg_pub.add;
3530: RAISE fnd_api.g_exc_error;
3531: END IF;
3532: END IF;
3533: --
3534: IF p_demand_source_type_id

Line 3548: RAISE fnd_api.g_exc_error;

3544: , data_set => p_organization_id
3545: ) THEN
3546: fnd_message.set_name('INV', 'INVALID_ACCOUNT_ALIAS');
3547: fnd_msg_pub.add;
3548: RAISE fnd_api.g_exc_error;
3549: END IF;
3550: END IF;
3551: END IF;
3552:

Line 3562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

3558: x_return_status => l_return_status
3559: , p_wip_entity_id => p_demand_source_header_id
3560: );
3561:
3562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3563: RAISE fnd_api.g_exc_error;
3564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3565: RAISE fnd_api.g_exc_unexpected_error;
3566: ELSE

Line 3563: RAISE fnd_api.g_exc_error;

3559: , p_wip_entity_id => p_demand_source_header_id
3560: );
3561:
3562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3563: RAISE fnd_api.g_exc_error;
3564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3565: RAISE fnd_api.g_exc_unexpected_error;
3566: ELSE
3567: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;

Line 3564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3560: );
3561:
3562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3563: RAISE fnd_api.g_exc_error;
3564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3565: RAISE fnd_api.g_exc_unexpected_error;
3566: ELSE
3567: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;
3568: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;

Line 3565: RAISE fnd_api.g_exc_unexpected_error;

3561:
3562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3563: RAISE fnd_api.g_exc_error;
3564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3565: RAISE fnd_api.g_exc_unexpected_error;
3566: ELSE
3567: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;
3568: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;
3569: END IF;

Line 3585: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

3581: , p_demand_source_line_detail => p_demand_source_line_detail
3582: , p_wip_entity_type => l_wip_entity_type
3583: );
3584:
3585: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3586: RAISE fnd_api.g_exc_error;
3587: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3588: RAISE fnd_api.g_exc_unexpected_error;
3589: END IF;

Line 3586: RAISE fnd_api.g_exc_error;

3582: , p_wip_entity_type => l_wip_entity_type
3583: );
3584:
3585: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3586: RAISE fnd_api.g_exc_error;
3587: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3588: RAISE fnd_api.g_exc_unexpected_error;
3589: END IF;
3590: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN

Line 3587: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3583: );
3584:
3585: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3586: RAISE fnd_api.g_exc_error;
3587: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3588: RAISE fnd_api.g_exc_unexpected_error;
3589: END IF;
3590: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN
3591: validate_demand_source_fpo(

Line 3588: RAISE fnd_api.g_exc_unexpected_error;

3584:
3585: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3586: RAISE fnd_api.g_exc_error;
3587: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3588: RAISE fnd_api.g_exc_unexpected_error;
3589: END IF;
3590: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN
3591: validate_demand_source_fpo(
3592: x_return_status => l_return_status

Line 3604: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

3600: , p_demand_source_line_detail => null
3601: , p_wip_entity_type => l_wip_entity_type
3602: );
3603:
3604: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3605: RAISE fnd_api.g_exc_error;
3606: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3607: RAISE fnd_api.g_exc_unexpected_error;
3608: END IF;

Line 3605: RAISE fnd_api.g_exc_error;

3601: , p_wip_entity_type => l_wip_entity_type
3602: );
3603:
3604: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3605: RAISE fnd_api.g_exc_error;
3606: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3607: RAISE fnd_api.g_exc_unexpected_error;
3608: END IF;
3609: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

Line 3606: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3602: );
3603:
3604: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3605: RAISE fnd_api.g_exc_error;
3606: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3607: RAISE fnd_api.g_exc_unexpected_error;
3608: END IF;
3609: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
3610: validate_demand_source_batch(

Line 3607: RAISE fnd_api.g_exc_unexpected_error;

3603:
3604: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3605: RAISE fnd_api.g_exc_error;
3606: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3607: RAISE fnd_api.g_exc_unexpected_error;
3608: END IF;
3609: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
3610: validate_demand_source_batch(
3611: x_return_status => l_return_status

Line 3623: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

3619: , p_demand_source_line_detail => null
3620: , p_wip_entity_type => l_wip_entity_type
3621: );
3622:
3623: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3624: RAISE fnd_api.g_exc_error;
3625: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3626: RAISE fnd_api.g_exc_unexpected_error;
3627: END IF;

Line 3624: RAISE fnd_api.g_exc_error;

3620: , p_wip_entity_type => l_wip_entity_type
3621: );
3622:
3623: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3624: RAISE fnd_api.g_exc_error;
3625: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3626: RAISE fnd_api.g_exc_unexpected_error;
3627: END IF;
3628: END IF;

Line 3625: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3621: );
3622:
3623: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3624: RAISE fnd_api.g_exc_error;
3625: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3626: RAISE fnd_api.g_exc_unexpected_error;
3627: END IF;
3628: END IF;
3629: END IF;

Line 3626: RAISE fnd_api.g_exc_unexpected_error;

3622:
3623: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3624: RAISE fnd_api.g_exc_error;
3625: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3626: RAISE fnd_api.g_exc_unexpected_error;
3627: END IF;
3628: END IF;
3629: END IF;
3630:

Line 3666: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

3662: , p_supply_type_id => p_supply_type_id
3663: , p_substitute_flag => p_substitute_flag); /* Bug 6044651 */
3664:
3665:
3666: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3667: RAISE fnd_api.g_exc_error;
3668: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3669: RAISE fnd_api.g_exc_unexpected_error;
3670: END IF;

Line 3667: RAISE fnd_api.g_exc_error;

3663: , p_substitute_flag => p_substitute_flag); /* Bug 6044651 */
3664:
3665:
3666: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3667: RAISE fnd_api.g_exc_error;
3668: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3669: RAISE fnd_api.g_exc_unexpected_error;
3670: END IF;
3671: END IF; --END IF check p_rsv_action

Line 3668: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3664:
3665:
3666: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3667: RAISE fnd_api.g_exc_error;
3668: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3669: RAISE fnd_api.g_exc_unexpected_error;
3670: END IF;
3671: END IF; --END IF check p_rsv_action
3672: END IF; --END IF demand source in SO, Internal Order, RMA

Line 3669: RAISE fnd_api.g_exc_unexpected_error;

3665:
3666: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3667: RAISE fnd_api.g_exc_error;
3668: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3669: RAISE fnd_api.g_exc_unexpected_error;
3670: END IF;
3671: END IF; --END IF check p_rsv_action
3672: END IF; --END IF demand source in SO, Internal Order, RMA
3673:

Line 3704: IF l_return_status = fnd_api.g_ret_sts_error THEN

3700: , p_demand_record => l_rec
3701: , x_index => l_index
3702: );
3703: --
3704: IF l_return_status = fnd_api.g_ret_sts_error THEN
3705: RAISE fnd_api.g_exc_error;
3706: END IF ;
3707: --
3708: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 3705: RAISE fnd_api.g_exc_error;

3701: , x_index => l_index
3702: );
3703: --
3704: IF l_return_status = fnd_api.g_ret_sts_error THEN
3705: RAISE fnd_api.g_exc_error;
3706: END IF ;
3707: --
3708: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3709: RAISE fnd_api.g_exc_unexpected_error;

Line 3708: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

3704: IF l_return_status = fnd_api.g_ret_sts_error THEN
3705: RAISE fnd_api.g_exc_error;
3706: END IF ;
3707: --
3708: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3709: RAISE fnd_api.g_exc_unexpected_error;
3710: END IF;
3711: --
3712: x_demand_cache_index := l_index;

Line 3709: RAISE fnd_api.g_exc_unexpected_error;

3705: RAISE fnd_api.g_exc_error;
3706: END IF ;
3707: --
3708: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3709: RAISE fnd_api.g_exc_unexpected_error;
3710: END IF;
3711: --
3712: x_demand_cache_index := l_index;
3713: x_return_status := l_return_status;

Line 3716: WHEN fnd_api.g_exc_error THEN

3712: x_demand_cache_index := l_index;
3713: x_return_status := l_return_status;
3714: --
3715: EXCEPTION
3716: WHEN fnd_api.g_exc_error THEN
3717: x_return_status := fnd_api.g_ret_sts_error;
3718: --
3719: WHEN fnd_api.g_exc_unexpected_error THEN
3720: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3717: x_return_status := fnd_api.g_ret_sts_error;

3713: x_return_status := l_return_status;
3714: --
3715: EXCEPTION
3716: WHEN fnd_api.g_exc_error THEN
3717: x_return_status := fnd_api.g_ret_sts_error;
3718: --
3719: WHEN fnd_api.g_exc_unexpected_error THEN
3720: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3721: --

Line 3719: WHEN fnd_api.g_exc_unexpected_error THEN

3715: EXCEPTION
3716: WHEN fnd_api.g_exc_error THEN
3717: x_return_status := fnd_api.g_ret_sts_error;
3718: --
3719: WHEN fnd_api.g_exc_unexpected_error THEN
3720: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3721: --
3722: WHEN OTHERS THEN
3723: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3720: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3716: WHEN fnd_api.g_exc_error THEN
3717: x_return_status := fnd_api.g_ret_sts_error;
3718: --
3719: WHEN fnd_api.g_exc_unexpected_error THEN
3720: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3721: --
3722: WHEN OTHERS THEN
3723: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3724: --

Line 3723: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3719: WHEN fnd_api.g_exc_unexpected_error THEN
3720: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3721: --
3722: WHEN OTHERS THEN
3723: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3724: --
3725: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
3726: THEN
3727: fnd_msg_pub.add_exc_msg

Line 3751: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

3747: , x_msg_count OUT NOCOPY NUMBER
3748: , x_msg_data OUT NOCOPY VARCHAR2
3749: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3750: ) IS
3751: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3752: l_msg_count NUMBER;
3753: l_msg_data VARCHAR2(1000);
3754: l_debug NUMBER;
3755:

Line 3770: (p_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN

3766: debug_print('crossdock_criteria_id = ' || p_rsv_rec.crossdock_criteria_id);
3767: END IF;
3768:
3769: IF ((p_rsv_rec.crossdock_criteria_id is not null) and
3770: (p_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN
3771: wms_xdock_utils_pvt.create_crossdock_reservation(
3772: x_return_status => l_return_status
3773: , p_rsv_rec => p_rsv_rec
3774: );

Line 3776: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

3772: x_return_status => l_return_status
3773: , p_rsv_rec => p_rsv_rec
3774: );
3775:
3776: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3777: IF (l_debug = 1) THEN
3778: debug_print('create_crossdock_reservation returns error');
3779: END IF;
3780: raise fnd_api.g_exc_error;

Line 3780: raise fnd_api.g_exc_error;

3776: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3777: IF (l_debug = 1) THEN
3778: debug_print('create_crossdock_reservation returns error');
3779: END IF;
3780: raise fnd_api.g_exc_error;
3781: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3782: IF (l_debug = 1) THEN
3783: debug_print('create_crossdock_reservation returns unexpected error');
3784: END IF;

Line 3781: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3777: IF (l_debug = 1) THEN
3778: debug_print('create_crossdock_reservation returns error');
3779: END IF;
3780: raise fnd_api.g_exc_error;
3781: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3782: IF (l_debug = 1) THEN
3783: debug_print('create_crossdock_reservation returns unexpected error');
3784: END IF;
3785: raise fnd_api.g_exc_unexpected_error;

Line 3785: raise fnd_api.g_exc_unexpected_error;

3781: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3782: IF (l_debug = 1) THEN
3783: debug_print('create_crossdock_reservation returns unexpected error');
3784: END IF;
3785: raise fnd_api.g_exc_unexpected_error;
3786: END IF;
3787: END IF;
3788:
3789: x_return_status := l_return_status;

Line 3792: WHEN fnd_api.g_exc_error THEN

3788:
3789: x_return_status := l_return_status;
3790:
3791: EXCEPTION
3792: WHEN fnd_api.g_exc_error THEN
3793: x_return_status := fnd_api.g_ret_sts_error;
3794: --
3795: WHEN fnd_api.g_exc_unexpected_error THEN
3796: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3793: x_return_status := fnd_api.g_ret_sts_error;

3789: x_return_status := l_return_status;
3790:
3791: EXCEPTION
3792: WHEN fnd_api.g_exc_error THEN
3793: x_return_status := fnd_api.g_ret_sts_error;
3794: --
3795: WHEN fnd_api.g_exc_unexpected_error THEN
3796: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3797: --

Line 3795: WHEN fnd_api.g_exc_unexpected_error THEN

3791: EXCEPTION
3792: WHEN fnd_api.g_exc_error THEN
3793: x_return_status := fnd_api.g_ret_sts_error;
3794: --
3795: WHEN fnd_api.g_exc_unexpected_error THEN
3796: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3797: --
3798: WHEN OTHERS THEN
3799: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3796: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3792: WHEN fnd_api.g_exc_error THEN
3793: x_return_status := fnd_api.g_ret_sts_error;
3794: --
3795: WHEN fnd_api.g_exc_unexpected_error THEN
3796: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3797: --
3798: WHEN OTHERS THEN
3799: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3800: --

Line 3799: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3795: WHEN fnd_api.g_exc_unexpected_error THEN
3796: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3797: --
3798: WHEN OTHERS THEN
3799: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3800: --
3801: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
3802: THEN
3803: fnd_msg_pub.add_exc_msg

Line 3830: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

3826: , x_msg_data OUT NOCOPY VARCHAR2
3827: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3828: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3829: ) IS
3830: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3831: l_msg_count NUMBER;
3832: l_msg_data VARCHAR2(1000);
3833: l_debug NUMBER;
3834:

Line 3849: (p_to_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN

3845: debug_print('crossdock_criteria_id = ' || p_to_rsv_rec.crossdock_criteria_id);
3846: END IF;
3847:
3848: IF ((p_to_rsv_rec.crossdock_criteria_id is not null) and
3849: (p_to_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN
3850: wms_xdock_utils_pvt.update_crossdock_reservation(
3851: x_return_status => l_return_status
3852: , p_orig_rsv_rec => p_orig_rsv_rec
3853: , p_new_rsv_rec => p_to_rsv_rec

Line 3856: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

3852: , p_orig_rsv_rec => p_orig_rsv_rec
3853: , p_new_rsv_rec => p_to_rsv_rec
3854: );
3855:
3856: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3857: IF (l_debug = 1) THEN
3858: debug_print('update_crossdock_reservation returns error');
3859: END IF;
3860: raise fnd_api.g_exc_error;

Line 3860: raise fnd_api.g_exc_error;

3856: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3857: IF (l_debug = 1) THEN
3858: debug_print('update_crossdock_reservation returns error');
3859: END IF;
3860: raise fnd_api.g_exc_error;
3861: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3862: IF (l_debug = 1) THEN
3863: debug_print('update_crossdock_reservation returns unexpected error');
3864: END IF;

Line 3861: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3857: IF (l_debug = 1) THEN
3858: debug_print('update_crossdock_reservation returns error');
3859: END IF;
3860: raise fnd_api.g_exc_error;
3861: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3862: IF (l_debug = 1) THEN
3863: debug_print('update_crossdock_reservation returns unexpected error');
3864: END IF;
3865: raise fnd_api.g_exc_unexpected_error;

Line 3865: raise fnd_api.g_exc_unexpected_error;

3861: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3862: IF (l_debug = 1) THEN
3863: debug_print('update_crossdock_reservation returns unexpected error');
3864: END IF;
3865: raise fnd_api.g_exc_unexpected_error;
3866: END IF;
3867: END IF;
3868:
3869: x_return_status := l_return_status;

Line 3872: WHEN fnd_api.g_exc_error THEN

3868:
3869: x_return_status := l_return_status;
3870:
3871: EXCEPTION
3872: WHEN fnd_api.g_exc_error THEN
3873: x_return_status := fnd_api.g_ret_sts_error;
3874: --
3875: WHEN fnd_api.g_exc_unexpected_error THEN
3876: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3873: x_return_status := fnd_api.g_ret_sts_error;

3869: x_return_status := l_return_status;
3870:
3871: EXCEPTION
3872: WHEN fnd_api.g_exc_error THEN
3873: x_return_status := fnd_api.g_ret_sts_error;
3874: --
3875: WHEN fnd_api.g_exc_unexpected_error THEN
3876: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3877: --

Line 3875: WHEN fnd_api.g_exc_unexpected_error THEN

3871: EXCEPTION
3872: WHEN fnd_api.g_exc_error THEN
3873: x_return_status := fnd_api.g_ret_sts_error;
3874: --
3875: WHEN fnd_api.g_exc_unexpected_error THEN
3876: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3877: --
3878: WHEN OTHERS THEN
3879: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3876: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3872: WHEN fnd_api.g_exc_error THEN
3873: x_return_status := fnd_api.g_ret_sts_error;
3874: --
3875: WHEN fnd_api.g_exc_unexpected_error THEN
3876: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3877: --
3878: WHEN OTHERS THEN
3879: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3880: --

Line 3879: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3875: WHEN fnd_api.g_exc_unexpected_error THEN
3876: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3877: --
3878: WHEN OTHERS THEN
3879: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3880: --
3881: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
3882: THEN
3883: fnd_msg_pub.add_exc_msg

Line 3909: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

3905: , x_msg_data OUT NOCOPY VARCHAR2
3906: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3907: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3908: ) IS
3909: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3910: l_msg_count NUMBER;
3911: l_msg_data VARCHAR2(1000);
3912: l_debug NUMBER;
3913:

Line 3928: (p_to_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN

3924: debug_print('crossdock_criteria_id = ' || p_to_rsv_rec.crossdock_criteria_id);
3925: END IF;
3926:
3927: IF ((p_to_rsv_rec.crossdock_criteria_id is not null) and
3928: (p_to_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN
3929: wms_xdock_utils_pvt.transfer_crossdock_reservation(
3930: x_return_status => l_return_status
3931: , p_orig_rsv_rec => p_orig_rsv_rec
3932: , p_new_rsv_rec => p_to_rsv_rec

Line 3934: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

3930: x_return_status => l_return_status
3931: , p_orig_rsv_rec => p_orig_rsv_rec
3932: , p_new_rsv_rec => p_to_rsv_rec
3933: );
3934: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3935: IF (l_debug = 1) THEN
3936: debug_print('transfer_crossdock_reservation returns error');
3937: END IF;
3938: raise fnd_api.g_exc_error;

Line 3938: raise fnd_api.g_exc_error;

3934: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3935: IF (l_debug = 1) THEN
3936: debug_print('transfer_crossdock_reservation returns error');
3937: END IF;
3938: raise fnd_api.g_exc_error;
3939: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3940: IF (l_debug = 1) THEN
3941: debug_print('transfer_crossdock_reservation returns unexpected error');
3942: END IF;

Line 3939: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3935: IF (l_debug = 1) THEN
3936: debug_print('transfer_crossdock_reservation returns error');
3937: END IF;
3938: raise fnd_api.g_exc_error;
3939: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3940: IF (l_debug = 1) THEN
3941: debug_print('transfer_crossdock_reservation returns unexpected error');
3942: END IF;
3943: raise fnd_api.g_exc_unexpected_error;

Line 3943: raise fnd_api.g_exc_unexpected_error;

3939: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3940: IF (l_debug = 1) THEN
3941: debug_print('transfer_crossdock_reservation returns unexpected error');
3942: END IF;
3943: raise fnd_api.g_exc_unexpected_error;
3944: END IF;
3945: END IF;
3946:
3947: x_return_status := l_return_status;

Line 3950: WHEN fnd_api.g_exc_error THEN

3946:
3947: x_return_status := l_return_status;
3948:
3949: EXCEPTION
3950: WHEN fnd_api.g_exc_error THEN
3951: x_return_status := fnd_api.g_ret_sts_error;
3952: --
3953: WHEN fnd_api.g_exc_unexpected_error THEN
3954: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3951: x_return_status := fnd_api.g_ret_sts_error;

3947: x_return_status := l_return_status;
3948:
3949: EXCEPTION
3950: WHEN fnd_api.g_exc_error THEN
3951: x_return_status := fnd_api.g_ret_sts_error;
3952: --
3953: WHEN fnd_api.g_exc_unexpected_error THEN
3954: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3955: --

Line 3953: WHEN fnd_api.g_exc_unexpected_error THEN

3949: EXCEPTION
3950: WHEN fnd_api.g_exc_error THEN
3951: x_return_status := fnd_api.g_ret_sts_error;
3952: --
3953: WHEN fnd_api.g_exc_unexpected_error THEN
3954: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3955: --
3956: WHEN OTHERS THEN
3957: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 3954: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3950: WHEN fnd_api.g_exc_error THEN
3951: x_return_status := fnd_api.g_ret_sts_error;
3952: --
3953: WHEN fnd_api.g_exc_unexpected_error THEN
3954: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3955: --
3956: WHEN OTHERS THEN
3957: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3958: --

Line 3957: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3953: WHEN fnd_api.g_exc_unexpected_error THEN
3954: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3955: --
3956: WHEN OTHERS THEN
3957: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3958: --
3959: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
3960: THEN
3961: fnd_msg_pub.add_exc_msg

Line 3986: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

3982: , x_msg_count OUT NOCOPY NUMBER
3983: , x_msg_data OUT NOCOPY VARCHAR2
3984: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3985: ) IS
3986: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3987: l_msg_count NUMBER;
3988: l_msg_data VARCHAR2(1000);
3989: l_debug NUMBER;
3990:

Line 4005: (p_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN

4001: debug_print('crossdock_criteria_id = ' || p_rsv_rec.crossdock_criteria_id);
4002: END IF;
4003:
4004: IF ((p_rsv_rec.crossdock_criteria_id is not null) and
4005: (p_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN
4006: wms_xdock_utils_pvt.relieve_crossdock_reservation(
4007: x_return_status => l_return_status
4008: , p_rsv_rec => p_rsv_rec
4009: );

Line 4011: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

4007: x_return_status => l_return_status
4008: , p_rsv_rec => p_rsv_rec
4009: );
4010:
4011: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4012: IF (l_debug = 1) THEN
4013: debug_print('relieve_crossdock_reservation returns error');
4014: END IF;
4015: raise fnd_api.g_exc_error;

Line 4015: raise fnd_api.g_exc_error;

4011: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4012: IF (l_debug = 1) THEN
4013: debug_print('relieve_crossdock_reservation returns error');
4014: END IF;
4015: raise fnd_api.g_exc_error;
4016: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4017: IF (l_debug = 1) THEN
4018: debug_print('relieve_crossdock_reservation returns unexpected error');
4019: END IF;

Line 4016: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

4012: IF (l_debug = 1) THEN
4013: debug_print('relieve_crossdock_reservation returns error');
4014: END IF;
4015: raise fnd_api.g_exc_error;
4016: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4017: IF (l_debug = 1) THEN
4018: debug_print('relieve_crossdock_reservation returns unexpected error');
4019: END IF;
4020: raise fnd_api.g_exc_unexpected_error;

Line 4020: raise fnd_api.g_exc_unexpected_error;

4016: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4017: IF (l_debug = 1) THEN
4018: debug_print('relieve_crossdock_reservation returns unexpected error');
4019: END IF;
4020: raise fnd_api.g_exc_unexpected_error;
4021: END IF;
4022: END IF;
4023:
4024: x_return_status := l_return_status;

Line 4027: WHEN fnd_api.g_exc_error THEN

4023:
4024: x_return_status := l_return_status;
4025:
4026: EXCEPTION
4027: WHEN fnd_api.g_exc_error THEN
4028: x_return_status := fnd_api.g_ret_sts_error;
4029: --
4030: WHEN fnd_api.g_exc_unexpected_error THEN
4031: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 4028: x_return_status := fnd_api.g_ret_sts_error;

4024: x_return_status := l_return_status;
4025:
4026: EXCEPTION
4027: WHEN fnd_api.g_exc_error THEN
4028: x_return_status := fnd_api.g_ret_sts_error;
4029: --
4030: WHEN fnd_api.g_exc_unexpected_error THEN
4031: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4032: --

Line 4030: WHEN fnd_api.g_exc_unexpected_error THEN

4026: EXCEPTION
4027: WHEN fnd_api.g_exc_error THEN
4028: x_return_status := fnd_api.g_ret_sts_error;
4029: --
4030: WHEN fnd_api.g_exc_unexpected_error THEN
4031: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4032: --
4033: WHEN OTHERS THEN
4034: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 4031: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4027: WHEN fnd_api.g_exc_error THEN
4028: x_return_status := fnd_api.g_ret_sts_error;
4029: --
4030: WHEN fnd_api.g_exc_unexpected_error THEN
4031: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4032: --
4033: WHEN OTHERS THEN
4034: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4035: --

Line 4034: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4030: WHEN fnd_api.g_exc_unexpected_error THEN
4031: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4032: --
4033: WHEN OTHERS THEN
4034: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4035: --
4036: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
4037: THEN
4038: fnd_msg_pub.add_exc_msg

Line 4062: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

4058: , x_msg_count OUT NOCOPY NUMBER
4059: , x_msg_data OUT NOCOPY VARCHAR2
4060: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4061: ) IS
4062: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
4063: l_msg_count NUMBER;
4064: l_msg_data VARCHAR2(1000);
4065: l_debug NUMBER;
4066:

Line 4081: (p_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN

4077: debug_print('crossdock_criteria_id = ' || p_rsv_rec.crossdock_criteria_id);
4078: END IF;
4079:
4080: IF ((p_rsv_rec.crossdock_criteria_id is not null) and
4081: (p_rsv_rec.crossdock_criteria_id <> fnd_api.g_miss_num)) THEN
4082: wms_xdock_utils_pvt.delete_crossdock_reservation(
4083: x_return_status => l_return_status
4084: , p_rsv_rec => p_rsv_rec
4085: );

Line 4087: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

4083: x_return_status => l_return_status
4084: , p_rsv_rec => p_rsv_rec
4085: );
4086:
4087: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4088: IF (l_debug = 1) THEN
4089: debug_print('delete_crossdock_reservation returns error');
4090: END IF;
4091: raise fnd_api.g_exc_error;

Line 4091: raise fnd_api.g_exc_error;

4087: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4088: IF (l_debug = 1) THEN
4089: debug_print('delete_crossdock_reservation returns error');
4090: END IF;
4091: raise fnd_api.g_exc_error;
4092: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4093: IF (l_debug = 1) THEN
4094: debug_print('delete_crossdock_reservation returns unexpected error');
4095: END IF;

Line 4092: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

4088: IF (l_debug = 1) THEN
4089: debug_print('delete_crossdock_reservation returns error');
4090: END IF;
4091: raise fnd_api.g_exc_error;
4092: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4093: IF (l_debug = 1) THEN
4094: debug_print('delete_crossdock_reservation returns unexpected error');
4095: END IF;
4096: raise fnd_api.g_exc_unexpected_error;

Line 4096: raise fnd_api.g_exc_unexpected_error;

4092: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4093: IF (l_debug = 1) THEN
4094: debug_print('delete_crossdock_reservation returns unexpected error');
4095: END IF;
4096: raise fnd_api.g_exc_unexpected_error;
4097: END IF;
4098: END IF;
4099:
4100: x_return_status := l_return_status;

Line 4103: WHEN fnd_api.g_exc_error THEN

4099:
4100: x_return_status := l_return_status;
4101:
4102: EXCEPTION
4103: WHEN fnd_api.g_exc_error THEN
4104: x_return_status := fnd_api.g_ret_sts_error;
4105: --
4106: WHEN fnd_api.g_exc_unexpected_error THEN
4107: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 4104: x_return_status := fnd_api.g_ret_sts_error;

4100: x_return_status := l_return_status;
4101:
4102: EXCEPTION
4103: WHEN fnd_api.g_exc_error THEN
4104: x_return_status := fnd_api.g_ret_sts_error;
4105: --
4106: WHEN fnd_api.g_exc_unexpected_error THEN
4107: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4108: --

Line 4106: WHEN fnd_api.g_exc_unexpected_error THEN

4102: EXCEPTION
4103: WHEN fnd_api.g_exc_error THEN
4104: x_return_status := fnd_api.g_ret_sts_error;
4105: --
4106: WHEN fnd_api.g_exc_unexpected_error THEN
4107: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4108: --
4109: WHEN OTHERS THEN
4110: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 4107: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4103: WHEN fnd_api.g_exc_error THEN
4104: x_return_status := fnd_api.g_ret_sts_error;
4105: --
4106: WHEN fnd_api.g_exc_unexpected_error THEN
4107: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4108: --
4109: WHEN OTHERS THEN
4110: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4111: --

Line 4110: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4106: WHEN fnd_api.g_exc_unexpected_error THEN
4107: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4108: --
4109: WHEN OTHERS THEN
4110: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4111: --
4112: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
4113: THEN
4114: fnd_msg_pub.add_exc_msg

Line 4141: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

4137: , p_supply_source_line_detail IN NUMBER
4138: , p_project_id IN NUMBER
4139: , p_task_id IN NUMBER
4140: ) IS
4141: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
4142: l_msg_count NUMBER;
4143: l_msg_data VARCHAR2(1000);
4144: l_wms_enabled VARCHAR2(1) := 'N';
4145: l_pjm_enabled NUMBER := 1;

Line 4183: RAISE fnd_api.g_exc_error;

4179:
4180: fnd_message.set_name('INV', 'INV_RSV_PJM_WMS_INTRAN');
4181: fnd_msg_pub.ADD;
4182:
4183: RAISE fnd_api.g_exc_error;
4184: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
4185: p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN
4186:
4187: SELECT count(min(po_distribution_id))

Line 4212: p_init_msg_lst => fnd_api.g_false,

4208: p_mtl_maintain_rsv_rec.supply_source_line_id := p_supply_source_line_id;
4209:
4210: inv_maintain_reservation_pub.reduce_reservation
4211: (p_api_version_number => 1.0,
4212: p_init_msg_lst => fnd_api.g_false,
4213: x_return_status => l_return_status,
4214: x_msg_count => l_msg_count,
4215: x_msg_data => l_msg_data,
4216: p_mtl_maintain_rsv_rec => p_mtl_maintain_rsv_rec,

Line 4226: IF l_return_status = fnd_api.g_ret_sts_error THEN

4222: IF l_debug=1 THEN
4223: debug_print ('Return Status after calling reduce reservations: '|| l_return_status);
4224: END IF;
4225:
4226: IF l_return_status = fnd_api.g_ret_sts_error THEN
4227:
4228: IF l_debug=1 THEN
4229: debug_print('Raising expected error'||l_return_status);
4230: END IF;

Line 4231: RAISE fnd_api.g_exc_error;

4227:
4228: IF l_debug=1 THEN
4229: debug_print('Raising expected error'||l_return_status);
4230: END IF;
4231: RAISE fnd_api.g_exc_error;
4232:
4233: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4234:
4235: IF l_debug=1 THEN

Line 4233: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4229: debug_print('Raising expected error'||l_return_status);
4230: END IF;
4231: RAISE fnd_api.g_exc_error;
4232:
4233: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4234:
4235: IF l_debug=1 THEN
4236: debug_print('Rasing Unexpected error'||l_return_status);
4237: END IF;

Line 4238: RAISE fnd_api.g_exc_unexpected_error;

4234:
4235: IF l_debug=1 THEN
4236: debug_print('Rasing Unexpected error'||l_return_status);
4237: END IF;
4238: RAISE fnd_api.g_exc_unexpected_error;
4239:
4240: END IF;
4241: END IF; -- project count > 1
4242:

Line 4272: p_init_msg_lst => fnd_api.g_false,

4268: p_mtl_maintain_rsv_rec.supply_source_line_id := p_supply_source_line_id;
4269:
4270: inv_maintain_reservation_pub.reduce_reservation
4271: (p_api_version_number => 1.0,
4272: p_init_msg_lst => fnd_api.g_false,
4273: x_return_status => l_return_status,
4274: x_msg_count => l_msg_count,
4275: x_msg_data => l_msg_data,
4276: p_mtl_maintain_rsv_rec => p_mtl_maintain_rsv_rec,

Line 4286: IF l_return_status = fnd_api.g_ret_sts_error THEN

4282: IF l_debug=1 THEN
4283: debug_print ('Return Status after calling reduce reservations: '|| l_return_status);
4284: END IF;
4285:
4286: IF l_return_status = fnd_api.g_ret_sts_error THEN
4287:
4288: IF l_debug=1 THEN
4289: debug_print('Raising expected error'||l_return_status);
4290: END IF;

Line 4291: RAISE fnd_api.g_exc_error;

4287:
4288: IF l_debug=1 THEN
4289: debug_print('Raising expected error'||l_return_status);
4290: END IF;
4291: RAISE fnd_api.g_exc_error;
4292:
4293: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4294:
4295: IF l_debug=1 THEN

Line 4293: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4289: debug_print('Raising expected error'||l_return_status);
4290: END IF;
4291: RAISE fnd_api.g_exc_error;
4292:
4293: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4294:
4295: IF l_debug=1 THEN
4296: debug_print('Rasing Unexpected error'||l_return_status);
4297: END IF;

Line 4298: RAISE fnd_api.g_exc_unexpected_error;

4294:
4295: IF l_debug=1 THEN
4296: debug_print('Rasing Unexpected error'||l_return_status);
4297: END IF;
4298: RAISE fnd_api.g_exc_unexpected_error;
4299:
4300: END IF;
4301: END IF;
4302: END IF;

Line 4321: RAISE fnd_api.g_exc_error;

4317: END IF;
4318:
4319: fnd_message.set_name('INV', 'INV_RSV_SUP_MUL_PROJ');
4320: fnd_msg_pub.ADD;
4321: RAISE fnd_api.g_exc_error;
4322: END IF;
4323:
4324: IF((p_project_id is not null) AND (l_project_count = 1)) THEN
4325: SELECT MIN(prd.project_id), MIN(prd.task_id)

Line 4339: RAISE fnd_api.g_exc_error;

4335: END IF;
4336:
4337: fnd_message.set_name('INV', 'INV_RSV_SUP_DIFF_PROJ');
4338: fnd_msg_pub.ADD;
4339: RAISE fnd_api.g_exc_error;
4340: END IF;
4341: END IF;
4342: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN
4343:

Line 4351: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

4347: x_return_status => l_return_status
4348: , p_wip_entity_id => p_supply_source_header_id
4349: );
4350:
4351: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4352: RAISE fnd_api.g_exc_error;
4353: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4354: RAISE fnd_api.g_exc_unexpected_error;
4355: ELSE

Line 4352: RAISE fnd_api.g_exc_error;

4348: , p_wip_entity_id => p_supply_source_header_id
4349: );
4350:
4351: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4352: RAISE fnd_api.g_exc_error;
4353: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4354: RAISE fnd_api.g_exc_unexpected_error;
4355: ELSE
4356: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;

Line 4353: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

4349: );
4350:
4351: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4352: RAISE fnd_api.g_exc_error;
4353: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4354: RAISE fnd_api.g_exc_unexpected_error;
4355: ELSE
4356: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
4357: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;

Line 4354: RAISE fnd_api.g_exc_unexpected_error;

4350:
4351: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4352: RAISE fnd_api.g_exc_error;
4353: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4354: RAISE fnd_api.g_exc_unexpected_error;
4355: ELSE
4356: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
4357: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
4358: END IF;

Line 4381: RAISE fnd_api.g_exc_error;

4377: END IF;
4378:
4379: fnd_message.set_name('INV', 'INV_RSV_SUP_MUL_PROJ');
4380: fnd_msg_pub.ADD;
4381: RAISE fnd_api.g_exc_error;
4382: END IF;
4383:
4384: IF (p_project_id is not null) THEN
4385: SELECT project_id, task_id

Line 4397: RAISE fnd_api.g_exc_error;

4393: END IF;
4394:
4395: fnd_message.set_name('INV', 'INV_RSV_SUP_DIFF_PROJ');
4396: fnd_msg_pub.ADD;
4397: RAISE fnd_api.g_exc_error;
4398: END IF;
4399: END IF;
4400: END IF;
4401: --commention code for pjm validations for certain supplies

Line 4409: WHEN fnd_api.g_exc_error THEN

4405:
4406: x_return_status := l_return_status;
4407:
4408: EXCEPTION
4409: WHEN fnd_api.g_exc_error THEN
4410: x_return_status := fnd_api.g_ret_sts_error;
4411: --
4412: WHEN fnd_api.g_exc_unexpected_error THEN
4413: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 4410: x_return_status := fnd_api.g_ret_sts_error;

4406: x_return_status := l_return_status;
4407:
4408: EXCEPTION
4409: WHEN fnd_api.g_exc_error THEN
4410: x_return_status := fnd_api.g_ret_sts_error;
4411: --
4412: WHEN fnd_api.g_exc_unexpected_error THEN
4413: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4414: --

Line 4412: WHEN fnd_api.g_exc_unexpected_error THEN

4408: EXCEPTION
4409: WHEN fnd_api.g_exc_error THEN
4410: x_return_status := fnd_api.g_ret_sts_error;
4411: --
4412: WHEN fnd_api.g_exc_unexpected_error THEN
4413: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4414: --
4415: WHEN OTHERS THEN
4416: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 4413: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4409: WHEN fnd_api.g_exc_error THEN
4410: x_return_status := fnd_api.g_ret_sts_error;
4411: --
4412: WHEN fnd_api.g_exc_unexpected_error THEN
4413: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4414: --
4415: WHEN OTHERS THEN
4416: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4417: --

Line 4416: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4412: WHEN fnd_api.g_exc_unexpected_error THEN
4413: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4414: --
4415: WHEN OTHERS THEN
4416: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4417: --
4418: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
4419: THEN
4420: fnd_msg_pub.add_exc_msg

Line 4451: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

4447: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type
4448: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type
4449: , p_rsv_action_name IN VARCHAR2
4450: ) IS
4451: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
4452: l_msg_count NUMBER;
4453: l_msg_data VARCHAR2(1000);
4454: l_wip_entity_type NUMBER;
4455: l_wip_job_type VARCHAR2(15);

Line 4504: IF (p_orig_rsv_rec.organization_id is null OR p_orig_rsv_rec.organization_id = fnd_api.g_miss_num) THEN

4500: IF (l_debug = 1) THEN
4501: debug_print('Inside from count > 0');
4502: END IF;
4503: -- return error if the p_orig_rsv_rec is null
4504: IF (p_orig_rsv_rec.organization_id is null OR p_orig_rsv_rec.organization_id = fnd_api.g_miss_num) THEN
4505: IF (l_debug = 1) THEN
4506: debug_print('The reservation record is null');
4507: END IF;
4508:

Line 4511: RAISE fnd_api.g_exc_error;

4507: END IF;
4508:
4509: fnd_message.set_name('INV', 'INV_RSV_NULL_REC');
4510: fnd_msg_pub.ADD;
4511: RAISE fnd_api.g_exc_error;
4512: END IF;
4513:
4514: inv_reservation_util_pvt.search_organization_cache
4515: (

Line 4521: IF l_return_status = fnd_api.g_ret_sts_error THEN

4517: , p_organization_id => p_orig_rsv_rec.organization_id
4518: , x_index => l_org_cache_index
4519: );
4520: --
4521: IF l_return_status = fnd_api.g_ret_sts_error THEN
4522: RAISE fnd_api.g_exc_error;
4523: End IF ;
4524: --
4525: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 4522: RAISE fnd_api.g_exc_error;

4518: , x_index => l_org_cache_index
4519: );
4520: --
4521: IF l_return_status = fnd_api.g_ret_sts_error THEN
4522: RAISE fnd_api.g_exc_error;
4523: End IF ;
4524: --
4525: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4526: RAISE fnd_api.g_exc_unexpected_error;

Line 4525: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4521: IF l_return_status = fnd_api.g_ret_sts_error THEN
4522: RAISE fnd_api.g_exc_error;
4523: End IF ;
4524: --
4525: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4526: RAISE fnd_api.g_exc_unexpected_error;
4527: End IF;
4528: --
4529: IF l_org_cache_index IS NULL THEN

Line 4526: RAISE fnd_api.g_exc_unexpected_error;

4522: RAISE fnd_api.g_exc_error;
4523: End IF ;
4524: --
4525: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4526: RAISE fnd_api.g_exc_unexpected_error;
4527: End IF;
4528: --
4529: IF l_org_cache_index IS NULL THEN
4530: l_org_rec.organization_id:= p_orig_rsv_rec.organization_id;

Line 4536: RAISE fnd_api.g_exc_error;

4532: p_org => l_org_rec
4533: )=INV_Validate.F THEN
4534: fnd_message.set_name('INV', 'INVALID ORGANIZATION');
4535: fnd_msg_pub.add;
4536: RAISE fnd_api.g_exc_error;
4537: END IF;
4538:
4539: --
4540: inv_reservation_util_pvt.add_organization_cache

Line 4547: IF l_return_status = fnd_api.g_ret_sts_error THEN

4543: , p_organization_record => l_org_rec
4544: , x_index => l_org_cache_index
4545: );
4546: --
4547: IF l_return_status = fnd_api.g_ret_sts_error THEN
4548: RAISE fnd_api.g_exc_error;
4549: End IF ;
4550:
4551: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 4548: RAISE fnd_api.g_exc_error;

4544: , x_index => l_org_cache_index
4545: );
4546: --
4547: IF l_return_status = fnd_api.g_ret_sts_error THEN
4548: RAISE fnd_api.g_exc_error;
4549: End IF ;
4550:
4551: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4552: RAISE fnd_api.g_exc_unexpected_error;

Line 4551: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4547: IF l_return_status = fnd_api.g_ret_sts_error THEN
4548: RAISE fnd_api.g_exc_error;
4549: End IF ;
4550:
4551: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4552: RAISE fnd_api.g_exc_unexpected_error;
4553: End IF;
4554:
4555: END IF;

Line 4552: RAISE fnd_api.g_exc_unexpected_error;

4548: RAISE fnd_api.g_exc_error;
4549: End IF ;
4550:
4551: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4552: RAISE fnd_api.g_exc_unexpected_error;
4553: End IF;
4554:
4555: END IF;
4556:

Line 4565: RAISE fnd_api.g_exc_error;

4561: END IF;
4562:
4563: fnd_message.set_name('INV', 'INV_RSV_SR_SUP_ERR');
4564: fnd_msg_pub.ADD;
4565: RAISE fnd_api.g_exc_error;
4566: END IF;
4567:
4568: IF (l_debug = 1) THEN
4569: debug_print('Before calling WIP cache');

Line 4580: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

4576: x_return_status => l_return_status
4577: , p_wip_entity_id => p_orig_rsv_rec.demand_source_header_id
4578: );
4579:
4580: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4581: RAISE fnd_api.g_exc_error;
4582: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4583: RAISE fnd_api.g_exc_unexpected_error;
4584: ELSE

Line 4581: RAISE fnd_api.g_exc_error;

4577: , p_wip_entity_id => p_orig_rsv_rec.demand_source_header_id
4578: );
4579:
4580: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4581: RAISE fnd_api.g_exc_error;
4582: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4583: RAISE fnd_api.g_exc_unexpected_error;
4584: ELSE
4585: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_type;

Line 4582: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

4578: );
4579:
4580: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4581: RAISE fnd_api.g_exc_error;
4582: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4583: RAISE fnd_api.g_exc_unexpected_error;
4584: ELSE
4585: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_type;
4586: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_job;

Line 4583: RAISE fnd_api.g_exc_unexpected_error;

4579:
4580: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
4581: RAISE fnd_api.g_exc_error;
4582: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4583: RAISE fnd_api.g_exc_unexpected_error;
4584: ELSE
4585: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_type;
4586: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_job;
4587: END IF;

Line 4606: RAISE fnd_api.g_exc_error;

4602: END IF;
4603:
4604: fnd_message.set_name('INV', 'INV_RSV_SR_DEM_ERR');
4605: fnd_msg_pub.ADD;
4606: RAISE fnd_api.g_exc_error;
4607: END IF;
4608:
4609: IF (l_debug = 1) THEN
4610: debug_print('Before calling convert missing to null');

Line 4632: If l_return_status = fnd_api.g_ret_sts_error Then

4628: ,p_organization_id => l_orig_rsv_rec.organization_id
4629: ,x_index => l_item_cache_index
4630: );
4631: --
4632: If l_return_status = fnd_api.g_ret_sts_error Then
4633: RAISE fnd_api.g_exc_error;
4634: End If;
4635: --
4636: If l_return_status = fnd_api.g_ret_sts_unexp_error Then

Line 4633: RAISE fnd_api.g_exc_error;

4629: ,x_index => l_item_cache_index
4630: );
4631: --
4632: If l_return_status = fnd_api.g_ret_sts_error Then
4633: RAISE fnd_api.g_exc_error;
4634: End If;
4635: --
4636: If l_return_status = fnd_api.g_ret_sts_unexp_error Then
4637: RAISE fnd_api.g_exc_unexpected_error;

Line 4636: If l_return_status = fnd_api.g_ret_sts_unexp_error Then

4632: If l_return_status = fnd_api.g_ret_sts_error Then
4633: RAISE fnd_api.g_exc_error;
4634: End If;
4635: --
4636: If l_return_status = fnd_api.g_ret_sts_unexp_error Then
4637: RAISE fnd_api.g_exc_unexpected_error;
4638: End If;
4639: --
4640: --if item isn't in cache, need to add it

Line 4637: RAISE fnd_api.g_exc_unexpected_error;

4633: RAISE fnd_api.g_exc_error;
4634: End If;
4635: --
4636: If l_return_status = fnd_api.g_ret_sts_unexp_error Then
4637: RAISE fnd_api.g_exc_unexpected_error;
4638: End If;
4639: --
4640: --if item isn't in cache, need to add it
4641: If l_item_cache_index IS NULL Then

Line 4653: if l_return_status = fnd_api.g_ret_sts_error then

4649: ,p_item_record => l_item_rec
4650: ,x_index => l_item_cache_index
4651: );
4652: --
4653: if l_return_status = fnd_api.g_ret_sts_error then
4654: RAISE fnd_api.g_exc_error;
4655: end if;
4656: --
4657: if l_return_status = fnd_api.g_ret_sts_unexp_error then

Line 4654: RAISE fnd_api.g_exc_error;

4650: ,x_index => l_item_cache_index
4651: );
4652: --
4653: if l_return_status = fnd_api.g_ret_sts_error then
4654: RAISE fnd_api.g_exc_error;
4655: end if;
4656: --
4657: if l_return_status = fnd_api.g_ret_sts_unexp_error then
4658: RAISE fnd_api.g_exc_unexpected_error;

Line 4657: if l_return_status = fnd_api.g_ret_sts_unexp_error then

4653: if l_return_status = fnd_api.g_ret_sts_error then
4654: RAISE fnd_api.g_exc_error;
4655: end if;
4656: --
4657: if l_return_status = fnd_api.g_ret_sts_unexp_error then
4658: RAISE fnd_api.g_exc_unexpected_error;
4659: end if;
4660: End If;
4661:

Line 4658: RAISE fnd_api.g_exc_unexpected_error;

4654: RAISE fnd_api.g_exc_error;
4655: end if;
4656: --
4657: if l_return_status = fnd_api.g_ret_sts_unexp_error then
4658: RAISE fnd_api.g_exc_unexpected_error;
4659: end if;
4660: End If;
4661:
4662: -- if revision controlled and revision in reservation record is null, return errors

Line 4731: RAISE fnd_api.g_exc_error;

4727: p_org => l_org_rec
4728: )=INV_Validate.F THEN
4729: fnd_message.set_name('INV','INVALID_SUB');
4730: fnd_msg_pub.add;
4731: RAISE fnd_api.g_exc_error;
4732: END IF;
4733:
4734: --
4735: inv_reservation_util_pvt.add_sub_cache

Line 4742: IF l_return_status = fnd_api.g_ret_sts_error THEN

4738: , p_sub_record => l_sub_rec
4739: , x_index => l_sub_cache_index
4740: );
4741: --
4742: IF l_return_status = fnd_api.g_ret_sts_error THEN
4743: RAISE fnd_api.g_exc_error;
4744: END IF ;
4745: --
4746: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 4743: RAISE fnd_api.g_exc_error;

4739: , x_index => l_sub_cache_index
4740: );
4741: --
4742: IF l_return_status = fnd_api.g_ret_sts_error THEN
4743: RAISE fnd_api.g_exc_error;
4744: END IF ;
4745: --
4746: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4747: RAISE fnd_api.g_exc_unexpected_error;

Line 4746: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4742: IF l_return_status = fnd_api.g_ret_sts_error THEN
4743: RAISE fnd_api.g_exc_error;
4744: END IF ;
4745: --
4746: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4747: RAISE fnd_api.g_exc_unexpected_error;
4748: END IF;
4749: END IF;
4750:

Line 4747: RAISE fnd_api.g_exc_unexpected_error;

4743: RAISE fnd_api.g_exc_error;
4744: END IF ;
4745: --
4746: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4747: RAISE fnd_api.g_exc_unexpected_error;
4748: END IF;
4749: END IF;
4750:
4751:

Line 4841: RAISE fnd_api.g_exc_error;

4837: information' || SQLERRM);
4838: END IF;
4839: fnd_message.set_name('INV', 'INV_INVALID_SERIAL');
4840: fnd_msg_pub.ADD;
4841: RAISE fnd_api.g_exc_error;
4842: END;
4843: IF (l_debug = 1) THEN
4844: debug_print('current_status = ' || l_current_status);
4845: debug_print('reservation_id = ' || l_reservation_id);

Line 4883: RAISE fnd_api.g_exc_error;

4879:
4880: fnd_message.set_name('INV', 'INV_RSV_SR_STS_ERR');
4881: fnd_msg_pub.ADD;
4882:
4883: RAISE fnd_api.g_exc_error;
4884: END IF;
4885:
4886: -- for the form record, validate the serial controls with the (org, item, rev, lot, sub, loc)
4887: -- controls on the reservation record if we create/delete/relieve reservation

Line 4919: RAISE fnd_api.g_exc_error;

4915:
4916: fnd_message.set_name('INV', 'INV_RSV_SR_NOT_MATCH');
4917: fnd_msg_pub.ADD;
4918:
4919: RAISE fnd_api.g_exc_error;
4920: END IF;
4921: ELSE
4922: IF (l_reservation_id <> nvl(l_orig_rsv_rec.reservation_id, l_reservation_id)) THEN
4923:

Line 4931: RAISE fnd_api.g_exc_error;

4927:
4928: fnd_message.set_name('INV', 'INV_RSV_SR_NOT_MATCH');
4929: fnd_msg_pub.ADD;
4930:
4931: RAISE fnd_api.g_exc_error;
4932: END IF;
4933: END IF;
4934: END LOOP;
4935:

Line 4943: IF (p_to_rsv_rec.organization_id is null OR p_to_rsv_rec.organization_id = fnd_api.g_miss_num) THEN

4939: IF (l_debug = 1) THEN
4940: debug_print('Inside to count > 0');
4941: END IF;
4942: -- return error if the p_to_rsv_rec is null
4943: IF (p_to_rsv_rec.organization_id is null OR p_to_rsv_rec.organization_id = fnd_api.g_miss_num) THEN
4944: IF (l_debug = 1) THEN
4945: debug_print('The reservation record is null');
4946: END IF;
4947:

Line 4950: RAISE fnd_api.g_exc_error;

4946: END IF;
4947:
4948: fnd_message.set_name('INV', 'INV_RSV_NULL_REC');
4949: fnd_msg_pub.ADD;
4950: RAISE fnd_api.g_exc_error;
4951: END IF;
4952:
4953: inv_reservation_util_pvt.search_organization_cache
4954: (

Line 4960: IF l_return_status = fnd_api.g_ret_sts_error THEN

4956: , p_organization_id => p_to_rsv_rec.organization_id
4957: , x_index => l_org_cache_index
4958: );
4959: --
4960: IF l_return_status = fnd_api.g_ret_sts_error THEN
4961: RAISE fnd_api.g_exc_error;
4962: End IF ;
4963: --
4964: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 4961: RAISE fnd_api.g_exc_error;

4957: , x_index => l_org_cache_index
4958: );
4959: --
4960: IF l_return_status = fnd_api.g_ret_sts_error THEN
4961: RAISE fnd_api.g_exc_error;
4962: End IF ;
4963: --
4964: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4965: RAISE fnd_api.g_exc_unexpected_error;

Line 4964: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4960: IF l_return_status = fnd_api.g_ret_sts_error THEN
4961: RAISE fnd_api.g_exc_error;
4962: End IF ;
4963: --
4964: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4965: RAISE fnd_api.g_exc_unexpected_error;
4966: End IF;
4967: --
4968: IF l_org_cache_index IS NULL THEN

Line 4965: RAISE fnd_api.g_exc_unexpected_error;

4961: RAISE fnd_api.g_exc_error;
4962: End IF ;
4963: --
4964: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4965: RAISE fnd_api.g_exc_unexpected_error;
4966: End IF;
4967: --
4968: IF l_org_cache_index IS NULL THEN
4969: l_org_rec.organization_id:= p_to_rsv_rec.organization_id;

Line 4975: RAISE fnd_api.g_exc_error;

4971: p_org => l_org_rec
4972: )=INV_Validate.F THEN
4973: fnd_message.set_name('INV', 'INVALID ORGANIZATION');
4974: fnd_msg_pub.add;
4975: RAISE fnd_api.g_exc_error;
4976: END IF;
4977:
4978: --
4979: inv_reservation_util_pvt.add_organization_cache

Line 4986: IF l_return_status = fnd_api.g_ret_sts_error THEN

4982: , p_organization_record => l_org_rec
4983: , x_index => l_org_cache_index
4984: );
4985: --
4986: IF l_return_status = fnd_api.g_ret_sts_error THEN
4987: RAISE fnd_api.g_exc_error;
4988: End IF ;
4989:
4990: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 4987: RAISE fnd_api.g_exc_error;

4983: , x_index => l_org_cache_index
4984: );
4985: --
4986: IF l_return_status = fnd_api.g_ret_sts_error THEN
4987: RAISE fnd_api.g_exc_error;
4988: End IF ;
4989:
4990: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4991: RAISE fnd_api.g_exc_unexpected_error;

Line 4990: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

4986: IF l_return_status = fnd_api.g_ret_sts_error THEN
4987: RAISE fnd_api.g_exc_error;
4988: End IF ;
4989:
4990: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4991: RAISE fnd_api.g_exc_unexpected_error;
4992: End IF;
4993:
4994: END IF;

Line 4991: RAISE fnd_api.g_exc_unexpected_error;

4987: RAISE fnd_api.g_exc_error;
4988: End IF ;
4989:
4990: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4991: RAISE fnd_api.g_exc_unexpected_error;
4992: End IF;
4993:
4994: END IF;
4995:

Line 5008: RAISE fnd_api.g_exc_error;

5004: END IF;
5005:
5006: fnd_message.set_name('INV', 'INV_RSV_SR_SUP_ERR');
5007: fnd_msg_pub.ADD;
5008: RAISE fnd_api.g_exc_error;
5009: END IF;
5010:
5011: -- validate the demand source for serial reservation of to reservation record
5012: IF (p_to_rsv_rec.demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN

Line 5020: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

5016: x_return_status => l_return_status
5017: , p_wip_entity_id => p_to_rsv_rec.demand_source_header_id
5018: );
5019:
5020: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5021: RAISE fnd_api.g_exc_error;
5022: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5023: RAISE fnd_api.g_exc_unexpected_error;
5024: ELSE

Line 5021: RAISE fnd_api.g_exc_error;

5017: , p_wip_entity_id => p_to_rsv_rec.demand_source_header_id
5018: );
5019:
5020: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5021: RAISE fnd_api.g_exc_error;
5022: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5023: RAISE fnd_api.g_exc_unexpected_error;
5024: ELSE
5025: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_type;

Line 5022: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

5018: );
5019:
5020: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5021: RAISE fnd_api.g_exc_error;
5022: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5023: RAISE fnd_api.g_exc_unexpected_error;
5024: ELSE
5025: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_type;
5026: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_job;

Line 5023: RAISE fnd_api.g_exc_unexpected_error;

5019:
5020: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5021: RAISE fnd_api.g_exc_error;
5022: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5023: RAISE fnd_api.g_exc_unexpected_error;
5024: ELSE
5025: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_type;
5026: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_job;
5027: END IF;

Line 5045: RAISE fnd_api.g_exc_error;

5041: END IF;
5042:
5043: fnd_message.set_name('INV', 'INV_RSV_SR_DEM_ERR');
5044: fnd_msg_pub.ADD;
5045: RAISE fnd_api.g_exc_error;
5046: END IF;
5047:
5048: IF (l_debug = 1) THEN
5049: debug_print('After demand check: to record:');

Line 5072: If l_return_status = fnd_api.g_ret_sts_error Then

5068: ,p_organization_id => l_to_rsv_rec.organization_id
5069: ,x_index => l_item_cache_index
5070: );
5071: --
5072: If l_return_status = fnd_api.g_ret_sts_error Then
5073: RAISE fnd_api.g_exc_error;
5074: End If;
5075: --
5076: If l_return_status = fnd_api.g_ret_sts_unexp_error Then

Line 5073: RAISE fnd_api.g_exc_error;

5069: ,x_index => l_item_cache_index
5070: );
5071: --
5072: If l_return_status = fnd_api.g_ret_sts_error Then
5073: RAISE fnd_api.g_exc_error;
5074: End If;
5075: --
5076: If l_return_status = fnd_api.g_ret_sts_unexp_error Then
5077: RAISE fnd_api.g_exc_unexpected_error;

Line 5076: If l_return_status = fnd_api.g_ret_sts_unexp_error Then

5072: If l_return_status = fnd_api.g_ret_sts_error Then
5073: RAISE fnd_api.g_exc_error;
5074: End If;
5075: --
5076: If l_return_status = fnd_api.g_ret_sts_unexp_error Then
5077: RAISE fnd_api.g_exc_unexpected_error;
5078: End If;
5079: --
5080: --if item isn't in cache, need to add it

Line 5077: RAISE fnd_api.g_exc_unexpected_error;

5073: RAISE fnd_api.g_exc_error;
5074: End If;
5075: --
5076: If l_return_status = fnd_api.g_ret_sts_unexp_error Then
5077: RAISE fnd_api.g_exc_unexpected_error;
5078: End If;
5079: --
5080: --if item isn't in cache, need to add it
5081: If l_item_cache_index IS NULL Then

Line 5093: if l_return_status = fnd_api.g_ret_sts_error then

5089: ,p_item_record => l_item_rec
5090: ,x_index => l_item_cache_index
5091: );
5092: --
5093: if l_return_status = fnd_api.g_ret_sts_error then
5094: RAISE fnd_api.g_exc_error;
5095: end if;
5096: --
5097: if l_return_status = fnd_api.g_ret_sts_unexp_error then

Line 5094: RAISE fnd_api.g_exc_error;

5090: ,x_index => l_item_cache_index
5091: );
5092: --
5093: if l_return_status = fnd_api.g_ret_sts_error then
5094: RAISE fnd_api.g_exc_error;
5095: end if;
5096: --
5097: if l_return_status = fnd_api.g_ret_sts_unexp_error then
5098: RAISE fnd_api.g_exc_unexpected_error;

Line 5097: if l_return_status = fnd_api.g_ret_sts_unexp_error then

5093: if l_return_status = fnd_api.g_ret_sts_error then
5094: RAISE fnd_api.g_exc_error;
5095: end if;
5096: --
5097: if l_return_status = fnd_api.g_ret_sts_unexp_error then
5098: RAISE fnd_api.g_exc_unexpected_error;
5099: end if;
5100: End If;
5101:

Line 5098: RAISE fnd_api.g_exc_unexpected_error;

5094: RAISE fnd_api.g_exc_error;
5095: end if;
5096: --
5097: if l_return_status = fnd_api.g_ret_sts_unexp_error then
5098: RAISE fnd_api.g_exc_unexpected_error;
5099: end if;
5100: End If;
5101:
5102: -- if revision controlled and revision in reservation record is null, return errors

Line 5165: RAISE fnd_api.g_exc_error;

5161: p_org => l_org_rec
5162: )=INV_Validate.F THEN
5163: fnd_message.set_name('INV','INVALID_SUB');
5164: fnd_msg_pub.add;
5165: RAISE fnd_api.g_exc_error;
5166: END IF;
5167:
5168: --
5169: inv_reservation_util_pvt.add_sub_cache

Line 5176: IF l_return_status = fnd_api.g_ret_sts_error THEN

5172: , p_sub_record => l_sub_rec
5173: , x_index => l_sub_cache_index
5174: );
5175: --
5176: IF l_return_status = fnd_api.g_ret_sts_error THEN
5177: RAISE fnd_api.g_exc_error;
5178: END IF ;
5179: --
5180: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5177: RAISE fnd_api.g_exc_error;

5173: , x_index => l_sub_cache_index
5174: );
5175: --
5176: IF l_return_status = fnd_api.g_ret_sts_error THEN
5177: RAISE fnd_api.g_exc_error;
5178: END IF ;
5179: --
5180: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5181: RAISE fnd_api.g_exc_unexpected_error;

Line 5180: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5176: IF l_return_status = fnd_api.g_ret_sts_error THEN
5177: RAISE fnd_api.g_exc_error;
5178: END IF ;
5179: --
5180: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5181: RAISE fnd_api.g_exc_unexpected_error;
5182: END IF;
5183: END IF;
5184:

Line 5181: RAISE fnd_api.g_exc_unexpected_error;

5177: RAISE fnd_api.g_exc_error;
5178: END IF ;
5179: --
5180: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5181: RAISE fnd_api.g_exc_unexpected_error;
5182: END IF;
5183: END IF;
5184:
5185: IF (l_debug = 1) THEN

Line 5280: RAISE fnd_api.g_exc_error;

5276:
5277: fnd_message.set_name('INV', 'INV_RSV_SR_STS_ERR');
5278: fnd_msg_pub.ADD;
5279:
5280: RAISE fnd_api.g_exc_error;
5281: END IF;
5282:
5283: -- validate the serial controls with the (org, item, rev, lot, sub, loc) controls
5284: -- on the reservation record, return errors if they don't match

Line 5285: IF ((l_to_rsv_rec.reservation_id IS NOT NULL AND p_orig_rsv_rec.reservation_id <> fnd_api.g_miss_num AND

5281: END IF;
5282:
5283: -- validate the serial controls with the (org, item, rev, lot, sub, loc) controls
5284: -- on the reservation record, return errors if they don't match
5285: IF ((l_to_rsv_rec.reservation_id IS NOT NULL AND p_orig_rsv_rec.reservation_id <> fnd_api.g_miss_num AND
5286: l_reservation_id NOT IN (nvl(l_to_rsv_rec.reservation_id, l_reservation_id),
5287: nvl(p_orig_rsv_rec.reservation_id, l_reservation_id))) OR l_organization_id <> nvl(l_to_rsv_rec.organization_id, l_organization_id) OR
5288: p_to_serial_array(i).inventory_item_id <>
5289: nvl(l_to_rsv_rec.inventory_item_id, p_to_serial_array(i).inventory_item_id) OR

Line 5312: RAISE fnd_api.g_exc_error;

5308:
5309: fnd_message.set_name('INV', 'INV_RSV_SR_NOT_MATCH');
5310: fnd_msg_pub.ADD;
5311:
5312: RAISE fnd_api.g_exc_error;
5313: END IF;
5314: END LOOP;
5315:
5316: END IF; -- end if p_to_serial_array is not null

Line 5321: WHEN fnd_api.g_exc_error THEN

5317: END IF;
5318:
5319: x_return_status := l_return_status;
5320: EXCEPTION
5321: WHEN fnd_api.g_exc_error THEN
5322: x_return_status := fnd_api.g_ret_sts_error;
5323: --
5324: WHEN fnd_api.g_exc_unexpected_error THEN
5325: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 5322: x_return_status := fnd_api.g_ret_sts_error;

5318:
5319: x_return_status := l_return_status;
5320: EXCEPTION
5321: WHEN fnd_api.g_exc_error THEN
5322: x_return_status := fnd_api.g_ret_sts_error;
5323: --
5324: WHEN fnd_api.g_exc_unexpected_error THEN
5325: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5326: --

Line 5324: WHEN fnd_api.g_exc_unexpected_error THEN

5320: EXCEPTION
5321: WHEN fnd_api.g_exc_error THEN
5322: x_return_status := fnd_api.g_ret_sts_error;
5323: --
5324: WHEN fnd_api.g_exc_unexpected_error THEN
5325: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5326: --
5327: WHEN OTHERS THEN
5328: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 5325: x_return_status := fnd_api.g_ret_sts_unexp_error ;

5321: WHEN fnd_api.g_exc_error THEN
5322: x_return_status := fnd_api.g_ret_sts_error;
5323: --
5324: WHEN fnd_api.g_exc_unexpected_error THEN
5325: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5326: --
5327: WHEN OTHERS THEN
5328: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5329: --

Line 5328: x_return_status := fnd_api.g_ret_sts_unexp_error ;

5324: WHEN fnd_api.g_exc_unexpected_error THEN
5325: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5326: --
5327: WHEN OTHERS THEN
5328: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5329: --
5330: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
5331: THEN
5332: fnd_msg_pub.add_exc_msg

Line 5379: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

5375: , x_to_supply_cache_index OUT NOCOPY INTEGER
5376: , x_to_sub_cache_index OUT NOCOPY INTEGER
5377: , p_substitute_flag IN BOOLEAN DEFAULT FALSE /* Bug 6044651 */
5378: ) IS
5379: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
5380: l_has_serial_number VARCHAR2(1);
5381: l_orig_item_cache_index INTEGER := NULL;
5382: l_orig_org_cache_index INTEGER := NULL;
5383: l_orig_demand_cache_index INTEGER := NULL;

Line 5428: IF l_return_status = fnd_api.g_ret_sts_error THEN

5424: , p_organization_id => p_orig_rsv_rec.organization_id
5425: , x_org_cache_index => l_orig_org_cache_index
5426: );
5427: --
5428: IF l_return_status = fnd_api.g_ret_sts_error THEN
5429: RAISE fnd_api.g_exc_error;
5430: END IF ;
5431: --
5432: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5429: RAISE fnd_api.g_exc_error;

5425: , x_org_cache_index => l_orig_org_cache_index
5426: );
5427: --
5428: IF l_return_status = fnd_api.g_ret_sts_error THEN
5429: RAISE fnd_api.g_exc_error;
5430: END IF ;
5431: --
5432: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5433: RAISE fnd_api.g_exc_unexpected_error;

Line 5432: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5428: IF l_return_status = fnd_api.g_ret_sts_error THEN
5429: RAISE fnd_api.g_exc_error;
5430: END IF ;
5431: --
5432: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5433: RAISE fnd_api.g_exc_unexpected_error;
5434: END IF;
5435: --
5436: validate_item

Line 5433: RAISE fnd_api.g_exc_unexpected_error;

5429: RAISE fnd_api.g_exc_error;
5430: END IF ;
5431: --
5432: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5433: RAISE fnd_api.g_exc_unexpected_error;
5434: END IF;
5435: --
5436: validate_item
5437: (

Line 5444: IF l_return_status = fnd_api.g_ret_sts_error THEN

5440: , p_organization_id => p_orig_rsv_rec.organization_id
5441: , x_item_cache_index => l_orig_item_cache_index
5442: );
5443: --
5444: IF l_return_status = fnd_api.g_ret_sts_error THEN
5445: RAISE fnd_api.g_exc_error;
5446: END IF ;
5447: --
5448: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5445: RAISE fnd_api.g_exc_error;

5441: , x_item_cache_index => l_orig_item_cache_index
5442: );
5443: --
5444: IF l_return_status = fnd_api.g_ret_sts_error THEN
5445: RAISE fnd_api.g_exc_error;
5446: END IF ;
5447: --
5448: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5449: RAISE fnd_api.g_exc_unexpected_error;

Line 5448: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5444: IF l_return_status = fnd_api.g_ret_sts_error THEN
5445: RAISE fnd_api.g_exc_error;
5446: END IF ;
5447: --
5448: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5449: RAISE fnd_api.g_exc_unexpected_error;
5450: END IF;
5451: --
5452: validate_demand_source

Line 5449: RAISE fnd_api.g_exc_unexpected_error;

5445: RAISE fnd_api.g_exc_error;
5446: END IF ;
5447: --
5448: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5449: RAISE fnd_api.g_exc_unexpected_error;
5450: END IF;
5451: --
5452: validate_demand_source
5453: (

Line 5476: IF l_return_status = fnd_api.g_ret_sts_error THEN

5472: , p_supply_receipt_date => p_orig_rsv_rec.supply_receipt_date /*** End R12 }} ***/
5473: , x_demand_cache_index => l_orig_demand_cache_index
5474: , p_substitute_flag => p_substitute_flag /* Bug 6044651 */
5475: );
5476: IF l_return_status = fnd_api.g_ret_sts_error THEN
5477: RAISE fnd_api.g_exc_error;
5478: END IF ;
5479: --
5480: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5477: RAISE fnd_api.g_exc_error;

5473: , x_demand_cache_index => l_orig_demand_cache_index
5474: , p_substitute_flag => p_substitute_flag /* Bug 6044651 */
5475: );
5476: IF l_return_status = fnd_api.g_ret_sts_error THEN
5477: RAISE fnd_api.g_exc_error;
5478: END IF ;
5479: --
5480: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5481: RAISE fnd_api.g_exc_unexpected_error;

Line 5480: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5476: IF l_return_status = fnd_api.g_ret_sts_error THEN
5477: RAISE fnd_api.g_exc_error;
5478: END IF ;
5479: --
5480: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5481: RAISE fnd_api.g_exc_unexpected_error;
5482: END IF;
5483: --
5484:

Line 5481: RAISE fnd_api.g_exc_unexpected_error;

5477: RAISE fnd_api.g_exc_error;
5478: END IF ;
5479: --
5480: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5481: RAISE fnd_api.g_exc_unexpected_error;
5482: END IF;
5483: --
5484:
5485: -- Bug: 4661026: Passing the requirement date if the demand ship date

Line 5516: IF l_return_status = fnd_api.g_ret_sts_error THEN

5512: , p_org_cache_index => l_orig_org_cache_index
5513: , x_supply_cache_index => l_orig_supply_cache_index
5514: , x_sub_cache_index => l_orig_sub_cache_index
5515: );
5516: IF l_return_status = fnd_api.g_ret_sts_error THEN
5517: RAISE fnd_api.g_exc_error;
5518: END IF ;
5519: --
5520: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5517: RAISE fnd_api.g_exc_error;

5513: , x_supply_cache_index => l_orig_supply_cache_index
5514: , x_sub_cache_index => l_orig_sub_cache_index
5515: );
5516: IF l_return_status = fnd_api.g_ret_sts_error THEN
5517: RAISE fnd_api.g_exc_error;
5518: END IF ;
5519: --
5520: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5521: RAISE fnd_api.g_exc_unexpected_error;

Line 5520: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5516: IF l_return_status = fnd_api.g_ret_sts_error THEN
5517: RAISE fnd_api.g_exc_error;
5518: END IF ;
5519: --
5520: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5521: RAISE fnd_api.g_exc_unexpected_error;
5522: END IF;
5523: --
5524: IF p_orig_serial_array.COUNT > 0 THEN

Line 5521: RAISE fnd_api.g_exc_unexpected_error;

5517: RAISE fnd_api.g_exc_error;
5518: END IF ;
5519: --
5520: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5521: RAISE fnd_api.g_exc_unexpected_error;
5522: END IF;
5523: --
5524: IF p_orig_serial_array.COUNT > 0 THEN
5525: l_has_serial_number := fnd_api.g_true;

Line 5525: l_has_serial_number := fnd_api.g_true;

5521: RAISE fnd_api.g_exc_unexpected_error;
5522: END IF;
5523: --
5524: IF p_orig_serial_array.COUNT > 0 THEN
5525: l_has_serial_number := fnd_api.g_true;
5526: ELSE
5527: l_has_serial_number := fnd_api.g_false;
5528: END IF;
5529: --

Line 5527: l_has_serial_number := fnd_api.g_false;

5523: --
5524: IF p_orig_serial_array.COUNT > 0 THEN
5525: l_has_serial_number := fnd_api.g_true;
5526: ELSE
5527: l_has_serial_number := fnd_api.g_false;
5528: END IF;
5529: --
5530: -- INVCONV BEGIN
5531: -- Extend validations to cover secondary quantity

Line 5548: IF l_return_status = fnd_api.g_ret_sts_error THEN

5544: , p_has_serial_number => l_has_serial_number
5545: , p_item_cache_index => l_orig_item_cache_index -- INVCONV
5546: );
5547: -- INVCONV END
5548: IF l_return_status = fnd_api.g_ret_sts_error THEN
5549: RAISE fnd_api.g_exc_error;
5550: END IF ;
5551: --
5552:

Line 5549: RAISE fnd_api.g_exc_error;

5545: , p_item_cache_index => l_orig_item_cache_index -- INVCONV
5546: );
5547: -- INVCONV END
5548: IF l_return_status = fnd_api.g_ret_sts_error THEN
5549: RAISE fnd_api.g_exc_error;
5550: END IF ;
5551: --
5552:
5553: /*** {{ R12 Enhanced reservations code changes ***/

Line 5562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

5558: , x_msg_data => l_msg_data
5559: , p_rsv_rec => p_orig_rsv_rec
5560: );
5561:
5562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5563: RAISE fnd_api.g_exc_error;
5564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5565: RAISE fnd_api.g_exc_unexpected_error;
5566: END IF;

Line 5563: RAISE fnd_api.g_exc_error;

5559: , p_rsv_rec => p_orig_rsv_rec
5560: );
5561:
5562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5563: RAISE fnd_api.g_exc_error;
5564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5565: RAISE fnd_api.g_exc_unexpected_error;
5566: END IF;
5567:

Line 5564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

5560: );
5561:
5562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5563: RAISE fnd_api.g_exc_error;
5564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5565: RAISE fnd_api.g_exc_unexpected_error;
5566: END IF;
5567:
5568: validate_pjm_reservations

Line 5565: RAISE fnd_api.g_exc_unexpected_error;

5561:
5562: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5563: RAISE fnd_api.g_exc_error;
5564: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5565: RAISE fnd_api.g_exc_unexpected_error;
5566: END IF;
5567:
5568: validate_pjm_reservations
5569: (

Line 5581: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

5577: , p_project_id => p_orig_rsv_rec.project_id
5578: , p_task_id => p_orig_rsv_rec.task_id
5579: );
5580:
5581: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5582: RAISE fnd_api.g_exc_error;
5583: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5584: RAISE fnd_api.g_exc_unexpected_error;
5585: END IF;

Line 5582: RAISE fnd_api.g_exc_error;

5578: , p_task_id => p_orig_rsv_rec.task_id
5579: );
5580:
5581: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5582: RAISE fnd_api.g_exc_error;
5583: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5584: RAISE fnd_api.g_exc_unexpected_error;
5585: END IF;
5586:

Line 5583: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

5579: );
5580:
5581: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5582: RAISE fnd_api.g_exc_error;
5583: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5584: RAISE fnd_api.g_exc_unexpected_error;
5585: END IF;
5586:
5587: validate_serials

Line 5584: RAISE fnd_api.g_exc_unexpected_error;

5580:
5581: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5582: RAISE fnd_api.g_exc_error;
5583: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5584: RAISE fnd_api.g_exc_unexpected_error;
5585: END IF;
5586:
5587: validate_serials
5588: (

Line 5597: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

5593: , p_to_serial_array => p_to_serial_array
5594: , p_rsv_action_name => p_rsv_action_name
5595: );
5596:
5597: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5598: RAISE fnd_api.g_exc_error;
5599: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5600: RAISE fnd_api.g_exc_unexpected_error;
5601: END IF;

Line 5598: RAISE fnd_api.g_exc_error;

5594: , p_rsv_action_name => p_rsv_action_name
5595: );
5596:
5597: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5598: RAISE fnd_api.g_exc_error;
5599: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5600: RAISE fnd_api.g_exc_unexpected_error;
5601: END IF;
5602: /*** End R12 }} ***/

Line 5599: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

5595: );
5596:
5597: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5598: RAISE fnd_api.g_exc_error;
5599: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5600: RAISE fnd_api.g_exc_unexpected_error;
5601: END IF;
5602: /*** End R12 }} ***/
5603:

Line 5600: RAISE fnd_api.g_exc_unexpected_error;

5596:
5597: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5598: RAISE fnd_api.g_exc_error;
5599: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5600: RAISE fnd_api.g_exc_unexpected_error;
5601: END IF;
5602: /*** End R12 }} ***/
5603:
5604: /*** {{ R12 Enhanced reservations code changes

Line 5618: IF l_return_status = fnd_api.g_ret_sts_error THEN

5614: , p_reservation_uom_code => p_orig_rsv_rec.reservation_uom_code
5615: , p_reservation_item_id => p_orig_rsv_rec.inventory_item_id
5616: , p_reservation_org_id => p_orig_rsv_rec.organization_id
5617: );
5618: IF l_return_status = fnd_api.g_ret_sts_error THEN
5619: RAISE fnd_api.g_exc_error;
5620: END IF;
5621: --
5622: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5619: RAISE fnd_api.g_exc_error;

5615: , p_reservation_item_id => p_orig_rsv_rec.inventory_item_id
5616: , p_reservation_org_id => p_orig_rsv_rec.organization_id
5617: );
5618: IF l_return_status = fnd_api.g_ret_sts_error THEN
5619: RAISE fnd_api.g_exc_error;
5620: END IF;
5621: --
5622: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5623: RAISE fnd_api.g_exc_unexpected_error;

Line 5622: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5618: IF l_return_status = fnd_api.g_ret_sts_error THEN
5619: RAISE fnd_api.g_exc_error;
5620: END IF;
5621: --
5622: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5623: RAISE fnd_api.g_exc_unexpected_error;
5624: END IF;
5625: *** End R12 }} ***/
5626:

Line 5623: RAISE fnd_api.g_exc_unexpected_error;

5619: RAISE fnd_api.g_exc_error;
5620: END IF;
5621: --
5622: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5623: RAISE fnd_api.g_exc_unexpected_error;
5624: END IF;
5625: *** End R12 }} ***/
5626:
5627: -- check to see if there are existing crossdock reservations against this

Line 5647: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

5643: x_return_status => l_return_status
5644: , p_wip_entity_id => p_orig_rsv_rec.supply_source_header_id
5645: );
5646:
5647: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5648: RAISE fnd_api.g_exc_error;
5649: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5650: RAISE fnd_api.g_exc_unexpected_error;
5651: ELSE

Line 5648: RAISE fnd_api.g_exc_error;

5644: , p_wip_entity_id => p_orig_rsv_rec.supply_source_header_id
5645: );
5646:
5647: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5648: RAISE fnd_api.g_exc_error;
5649: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5650: RAISE fnd_api.g_exc_unexpected_error;
5651: ELSE
5652: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_type;

Line 5649: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

5645: );
5646:
5647: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5648: RAISE fnd_api.g_exc_error;
5649: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5650: RAISE fnd_api.g_exc_unexpected_error;
5651: ELSE
5652: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_type;
5653: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_job;

Line 5650: RAISE fnd_api.g_exc_unexpected_error;

5646:
5647: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5648: RAISE fnd_api.g_exc_error;
5649: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5650: RAISE fnd_api.g_exc_unexpected_error;
5651: ELSE
5652: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_type;
5653: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_job;
5654: END IF;

Line 5692: RAISE fnd_api.g_exc_error;

5688: IF (l_debug = 1) THEN
5689: debug_print('Job already has a crossdocked reservation for a different demand');
5690: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
5691: fnd_msg_pub.add;
5692: RAISE fnd_api.g_exc_error;
5693: END IF;
5694: END IF;
5695: END IF;
5696: END IF;

Line 5708: If l_return_status = fnd_api.g_ret_sts_error Then

5704: ,p_organization_id => p_orig_rsv_rec.organization_id
5705: ,x_index => l_orig_item_cache_index
5706: );
5707: --
5708: If l_return_status = fnd_api.g_ret_sts_error Then
5709: RAISE fnd_api.g_exc_error;
5710: End If;
5711: --
5712: If l_return_status = fnd_api.g_ret_sts_unexp_error Then

Line 5709: RAISE fnd_api.g_exc_error;

5705: ,x_index => l_orig_item_cache_index
5706: );
5707: --
5708: If l_return_status = fnd_api.g_ret_sts_error Then
5709: RAISE fnd_api.g_exc_error;
5710: End If;
5711: --
5712: If l_return_status = fnd_api.g_ret_sts_unexp_error Then
5713: RAISE fnd_api.g_exc_unexpected_error;

Line 5712: If l_return_status = fnd_api.g_ret_sts_unexp_error Then

5708: If l_return_status = fnd_api.g_ret_sts_error Then
5709: RAISE fnd_api.g_exc_error;
5710: End If;
5711: --
5712: If l_return_status = fnd_api.g_ret_sts_unexp_error Then
5713: RAISE fnd_api.g_exc_unexpected_error;
5714: End If;
5715: --
5716: --if item isn't in cache, need to add it

Line 5713: RAISE fnd_api.g_exc_unexpected_error;

5709: RAISE fnd_api.g_exc_error;
5710: End If;
5711: --
5712: If l_return_status = fnd_api.g_ret_sts_unexp_error Then
5713: RAISE fnd_api.g_exc_unexpected_error;
5714: End If;
5715: --
5716: --if item isn't in cache, need to add it
5717: If l_orig_item_cache_index IS NULL Then

Line 5729: if l_return_status = fnd_api.g_ret_sts_error then

5725: ,p_item_record => l_item_rec
5726: ,x_index => l_orig_item_cache_index
5727: );
5728: --
5729: if l_return_status = fnd_api.g_ret_sts_error then
5730: RAISE fnd_api.g_exc_error;
5731: end if;
5732: --
5733: if l_return_status = fnd_api.g_ret_sts_unexp_error then

Line 5730: RAISE fnd_api.g_exc_error;

5726: ,x_index => l_orig_item_cache_index
5727: );
5728: --
5729: if l_return_status = fnd_api.g_ret_sts_error then
5730: RAISE fnd_api.g_exc_error;
5731: end if;
5732: --
5733: if l_return_status = fnd_api.g_ret_sts_unexp_error then
5734: RAISE fnd_api.g_exc_unexpected_error;

Line 5733: if l_return_status = fnd_api.g_ret_sts_unexp_error then

5729: if l_return_status = fnd_api.g_ret_sts_error then
5730: RAISE fnd_api.g_exc_error;
5731: end if;
5732: --
5733: if l_return_status = fnd_api.g_ret_sts_unexp_error then
5734: RAISE fnd_api.g_exc_unexpected_error;
5735: end if;
5736: End If;
5737: END IF;

Line 5734: RAISE fnd_api.g_exc_unexpected_error;

5730: RAISE fnd_api.g_exc_error;
5731: end if;
5732: --
5733: if l_return_status = fnd_api.g_ret_sts_unexp_error then
5734: RAISE fnd_api.g_exc_unexpected_error;
5735: end if;
5736: End If;
5737: END IF;
5738: --

Line 5748: IF l_return_status = fnd_api.g_ret_sts_error THEN

5744: , p_organization_id => p_to_rsv_rec.organization_id
5745: , x_org_cache_index => l_to_org_cache_index
5746: );
5747: --
5748: IF l_return_status = fnd_api.g_ret_sts_error THEN
5749: RAISE fnd_api.g_exc_error;
5750: END IF ;
5751: --
5752: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5749: RAISE fnd_api.g_exc_error;

5745: , x_org_cache_index => l_to_org_cache_index
5746: );
5747: --
5748: IF l_return_status = fnd_api.g_ret_sts_error THEN
5749: RAISE fnd_api.g_exc_error;
5750: END IF ;
5751: --
5752: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5753: RAISE fnd_api.g_exc_unexpected_error;

Line 5752: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5748: IF l_return_status = fnd_api.g_ret_sts_error THEN
5749: RAISE fnd_api.g_exc_error;
5750: END IF ;
5751: --
5752: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5753: RAISE fnd_api.g_exc_unexpected_error;
5754: END IF;
5755: --
5756: validate_item

Line 5753: RAISE fnd_api.g_exc_unexpected_error;

5749: RAISE fnd_api.g_exc_error;
5750: END IF ;
5751: --
5752: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5753: RAISE fnd_api.g_exc_unexpected_error;
5754: END IF;
5755: --
5756: validate_item
5757: (

Line 5764: IF l_return_status = fnd_api.g_ret_sts_error THEN

5760: , p_organization_id => p_to_rsv_rec.organization_id
5761: , x_item_cache_index => l_to_item_cache_index
5762: );
5763: --
5764: IF l_return_status = fnd_api.g_ret_sts_error THEN
5765: RAISE fnd_api.g_exc_error;
5766: END IF ;
5767: --
5768: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5765: RAISE fnd_api.g_exc_error;

5761: , x_item_cache_index => l_to_item_cache_index
5762: );
5763: --
5764: IF l_return_status = fnd_api.g_ret_sts_error THEN
5765: RAISE fnd_api.g_exc_error;
5766: END IF ;
5767: --
5768: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5769: RAISE fnd_api.g_exc_unexpected_error;

Line 5768: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5764: IF l_return_status = fnd_api.g_ret_sts_error THEN
5765: RAISE fnd_api.g_exc_error;
5766: END IF ;
5767: --
5768: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5769: RAISE fnd_api.g_exc_unexpected_error;
5770: END IF;
5771: --
5772: validate_demand_source

Line 5769: RAISE fnd_api.g_exc_unexpected_error;

5765: RAISE fnd_api.g_exc_error;
5766: END IF ;
5767: --
5768: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5769: RAISE fnd_api.g_exc_unexpected_error;
5770: END IF;
5771: --
5772: validate_demand_source
5773: (

Line 5796: IF l_return_status = fnd_api.g_ret_sts_error THEN

5792: , p_demand_ship_date => p_orig_rsv_rec.demand_ship_date
5793: , p_supply_receipt_date => p_orig_rsv_rec.supply_receipt_date /*** End R12 }} ***/
5794: , x_demand_cache_index => l_to_demand_cache_index
5795: );
5796: IF l_return_status = fnd_api.g_ret_sts_error THEN
5797: RAISE fnd_api.g_exc_error;
5798: END IF ;
5799: --
5800: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5797: RAISE fnd_api.g_exc_error;

5793: , p_supply_receipt_date => p_orig_rsv_rec.supply_receipt_date /*** End R12 }} ***/
5794: , x_demand_cache_index => l_to_demand_cache_index
5795: );
5796: IF l_return_status = fnd_api.g_ret_sts_error THEN
5797: RAISE fnd_api.g_exc_error;
5798: END IF ;
5799: --
5800: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5801: RAISE fnd_api.g_exc_unexpected_error;

Line 5800: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5796: IF l_return_status = fnd_api.g_ret_sts_error THEN
5797: RAISE fnd_api.g_exc_error;
5798: END IF ;
5799: --
5800: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5801: RAISE fnd_api.g_exc_unexpected_error;
5802: END IF;
5803: --
5804:

Line 5801: RAISE fnd_api.g_exc_unexpected_error;

5797: RAISE fnd_api.g_exc_error;
5798: END IF ;
5799: --
5800: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5801: RAISE fnd_api.g_exc_unexpected_error;
5802: END IF;
5803: --
5804:
5805: -- Bug: 4661026: Passing the requirement date if the demand ship date

Line 5841: IF l_return_status = fnd_api.g_ret_sts_error THEN

5837: IF (l_debug = 1) THEN
5838: debug_print(' After calling validate supply source ' || l_return_status);
5839: END IF;
5840:
5841: IF l_return_status = fnd_api.g_ret_sts_error THEN
5842: RAISE fnd_api.g_exc_error;
5843: END IF ;
5844: --
5845: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5842: RAISE fnd_api.g_exc_error;

5838: debug_print(' After calling validate supply source ' || l_return_status);
5839: END IF;
5840:
5841: IF l_return_status = fnd_api.g_ret_sts_error THEN
5842: RAISE fnd_api.g_exc_error;
5843: END IF ;
5844: --
5845: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5846: RAISE fnd_api.g_exc_unexpected_error;

Line 5845: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5841: IF l_return_status = fnd_api.g_ret_sts_error THEN
5842: RAISE fnd_api.g_exc_error;
5843: END IF ;
5844: --
5845: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5846: RAISE fnd_api.g_exc_unexpected_error;
5847: END IF;
5848: --
5849: IF p_to_serial_array.COUNT > 0 THEN

Line 5846: RAISE fnd_api.g_exc_unexpected_error;

5842: RAISE fnd_api.g_exc_error;
5843: END IF ;
5844: --
5845: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5846: RAISE fnd_api.g_exc_unexpected_error;
5847: END IF;
5848: --
5849: IF p_to_serial_array.COUNT > 0 THEN
5850: l_has_serial_number := fnd_api.g_true;

Line 5850: l_has_serial_number := fnd_api.g_true;

5846: RAISE fnd_api.g_exc_unexpected_error;
5847: END IF;
5848: --
5849: IF p_to_serial_array.COUNT > 0 THEN
5850: l_has_serial_number := fnd_api.g_true;
5851: ELSE
5852: l_has_serial_number := fnd_api.g_false;
5853: END IF;
5854: --

Line 5852: l_has_serial_number := fnd_api.g_false;

5848: --
5849: IF p_to_serial_array.COUNT > 0 THEN
5850: l_has_serial_number := fnd_api.g_true;
5851: ELSE
5852: l_has_serial_number := fnd_api.g_false;
5853: END IF;
5854: --
5855: -- INVCONV BEGIN
5856: -- Extend validations to cover secondary quantity

Line 5876: IF l_return_status = fnd_api.g_ret_sts_error THEN

5872: IF (l_debug = 1) THEN
5873: debug_print(' After calling validate quantity ' || l_return_status);
5874: END IF;
5875:
5876: IF l_return_status = fnd_api.g_ret_sts_error THEN
5877: RAISE fnd_api.g_exc_error;
5878: END IF ;
5879: --
5880: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 5877: RAISE fnd_api.g_exc_error;

5873: debug_print(' After calling validate quantity ' || l_return_status);
5874: END IF;
5875:
5876: IF l_return_status = fnd_api.g_ret_sts_error THEN
5877: RAISE fnd_api.g_exc_error;
5878: END IF ;
5879: --
5880: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5881: RAISE fnd_api.g_exc_unexpected_error;

Line 5880: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

5876: IF l_return_status = fnd_api.g_ret_sts_error THEN
5877: RAISE fnd_api.g_exc_error;
5878: END IF ;
5879: --
5880: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5881: RAISE fnd_api.g_exc_unexpected_error;
5882: END IF;
5883:
5884: IF p_orig_rsv_rec.inventory_item_id

Line 5881: RAISE fnd_api.g_exc_unexpected_error;

5877: RAISE fnd_api.g_exc_error;
5878: END IF ;
5879: --
5880: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5881: RAISE fnd_api.g_exc_unexpected_error;
5882: END IF;
5883:
5884: IF p_orig_rsv_rec.inventory_item_id
5885: <> p_to_rsv_rec.inventory_item_id THEN

Line 5888: RAISE fnd_api.g_exc_error;

5884: IF p_orig_rsv_rec.inventory_item_id
5885: <> p_to_rsv_rec.inventory_item_id THEN
5886: fnd_message.set_name('INV', 'INVENTORY_ITEM_ID_NOT_THE_SAME');
5887: fnd_msg_pub.add;
5888: RAISE fnd_api.g_exc_error;
5889: END IF;
5890:
5891: /*** {{ R12 Enhanced reservations code changes ***/
5892: IF (p_rsv_action_name = 'UPDATE') THEN

Line 5902: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

5898: , p_orig_rsv_rec => p_orig_rsv_rec
5899: , p_to_rsv_rec => p_to_rsv_rec
5900: );
5901:
5902: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5903: RAISE fnd_api.g_exc_error;
5904: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5905: RAISE fnd_api.g_exc_unexpected_error;
5906: END IF;

Line 5903: RAISE fnd_api.g_exc_error;

5899: , p_to_rsv_rec => p_to_rsv_rec
5900: );
5901:
5902: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5903: RAISE fnd_api.g_exc_error;
5904: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5905: RAISE fnd_api.g_exc_unexpected_error;
5906: END IF;
5907:

Line 5904: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

5900: );
5901:
5902: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5903: RAISE fnd_api.g_exc_error;
5904: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5905: RAISE fnd_api.g_exc_unexpected_error;
5906: END IF;
5907:
5908: ELSIF (p_rsv_action_name = 'TRANSFER') THEN

Line 5905: RAISE fnd_api.g_exc_unexpected_error;

5901:
5902: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5903: RAISE fnd_api.g_exc_error;
5904: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5905: RAISE fnd_api.g_exc_unexpected_error;
5906: END IF;
5907:
5908: ELSIF (p_rsv_action_name = 'TRANSFER') THEN
5909: transfer_crossdock_reservation

Line 5922: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

5918: IF (l_debug = 1) THEN
5919: debug_print(' After calling validate cossdock xfer ' ||
5920: l_return_status);
5921: END IF;
5922: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5923: RAISE fnd_api.g_exc_error;
5924: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5925: RAISE fnd_api.g_exc_unexpected_error;
5926: END IF;

Line 5923: RAISE fnd_api.g_exc_error;

5919: debug_print(' After calling validate cossdock xfer ' ||
5920: l_return_status);
5921: END IF;
5922: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5923: RAISE fnd_api.g_exc_error;
5924: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5925: RAISE fnd_api.g_exc_unexpected_error;
5926: END IF;
5927: END IF;

Line 5924: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

5920: l_return_status);
5921: END IF;
5922: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5923: RAISE fnd_api.g_exc_error;
5924: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5925: RAISE fnd_api.g_exc_unexpected_error;
5926: END IF;
5927: END IF;
5928:

Line 5925: RAISE fnd_api.g_exc_unexpected_error;

5921: END IF;
5922: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5923: RAISE fnd_api.g_exc_error;
5924: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5925: RAISE fnd_api.g_exc_unexpected_error;
5926: END IF;
5927: END IF;
5928:
5929: validate_pjm_reservations

Line 5946: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

5942: IF (l_debug = 1) THEN
5943: debug_print(' After calling validate pjm ' || l_return_status);
5944: END IF;
5945:
5946: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5947: RAISE fnd_api.g_exc_error;
5948: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5949: RAISE fnd_api.g_exc_unexpected_error;
5950: END IF;

Line 5947: RAISE fnd_api.g_exc_error;

5943: debug_print(' After calling validate pjm ' || l_return_status);
5944: END IF;
5945:
5946: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5947: RAISE fnd_api.g_exc_error;
5948: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5949: RAISE fnd_api.g_exc_unexpected_error;
5950: END IF;
5951:

Line 5948: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

5944: END IF;
5945:
5946: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5947: RAISE fnd_api.g_exc_error;
5948: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5949: RAISE fnd_api.g_exc_unexpected_error;
5950: END IF;
5951:
5952: validate_serials

Line 5949: RAISE fnd_api.g_exc_unexpected_error;

5945:
5946: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5947: RAISE fnd_api.g_exc_error;
5948: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5949: RAISE fnd_api.g_exc_unexpected_error;
5950: END IF;
5951:
5952: validate_serials
5953: (

Line 5962: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

5958: , p_to_serial_array => p_to_serial_array
5959: , p_rsv_action_name => p_rsv_action_name
5960: );
5961:
5962: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5963: RAISE fnd_api.g_exc_error;
5964: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5965: RAISE fnd_api.g_exc_unexpected_error;
5966: END IF;

Line 5963: RAISE fnd_api.g_exc_error;

5959: , p_rsv_action_name => p_rsv_action_name
5960: );
5961:
5962: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5963: RAISE fnd_api.g_exc_error;
5964: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5965: RAISE fnd_api.g_exc_unexpected_error;
5966: END IF;
5967: /*** End R12 }} ***/

Line 5964: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

5960: );
5961:
5962: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5963: RAISE fnd_api.g_exc_error;
5964: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5965: RAISE fnd_api.g_exc_unexpected_error;
5966: END IF;
5967: /*** End R12 }} ***/
5968:

Line 5965: RAISE fnd_api.g_exc_unexpected_error;

5961:
5962: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
5963: RAISE fnd_api.g_exc_error;
5964: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5965: RAISE fnd_api.g_exc_unexpected_error;
5966: END IF;
5967: /*** End R12 }} ***/
5968:
5969: --

Line 6003: IF l_return_status = fnd_api.g_ret_sts_error THEN

5999: , p_reservation_uom_code => p_to_rsv_rec.reservation_uom_code
6000: , p_reservation_item_id => p_to_rsv_rec.inventory_item_id
6001: , p_reservation_org_id => p_to_rsv_rec.organization_id
6002: );
6003: IF l_return_status = fnd_api.g_ret_sts_error THEN
6004: RAISE fnd_api.g_exc_error;
6005: END IF;
6006: --
6007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 6004: RAISE fnd_api.g_exc_error;

6000: , p_reservation_item_id => p_to_rsv_rec.inventory_item_id
6001: , p_reservation_org_id => p_to_rsv_rec.organization_id
6002: );
6003: IF l_return_status = fnd_api.g_ret_sts_error THEN
6004: RAISE fnd_api.g_exc_error;
6005: END IF;
6006: --
6007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6008: RAISE fnd_api.g_exc_unexpected_error;

Line 6007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6003: IF l_return_status = fnd_api.g_ret_sts_error THEN
6004: RAISE fnd_api.g_exc_error;
6005: END IF;
6006: --
6007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6008: RAISE fnd_api.g_exc_unexpected_error;
6009: END IF;
6010: --
6011: END IF;

Line 6008: RAISE fnd_api.g_exc_unexpected_error;

6004: RAISE fnd_api.g_exc_error;
6005: END IF;
6006: --
6007: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6008: RAISE fnd_api.g_exc_unexpected_error;
6009: END IF;
6010: --
6011: END IF;
6012: *** End R12 }} ***/

Line 6030: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

6026: x_return_status => l_return_status
6027: , p_wip_entity_id => p_to_rsv_rec.supply_source_header_id
6028: );
6029:
6030: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6031: RAISE fnd_api.g_exc_error;
6032: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6033: RAISE fnd_api.g_exc_unexpected_error;
6034: ELSE

Line 6031: RAISE fnd_api.g_exc_error;

6027: , p_wip_entity_id => p_to_rsv_rec.supply_source_header_id
6028: );
6029:
6030: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6031: RAISE fnd_api.g_exc_error;
6032: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6033: RAISE fnd_api.g_exc_unexpected_error;
6034: ELSE
6035: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_type;

Line 6032: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

6028: );
6029:
6030: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6031: RAISE fnd_api.g_exc_error;
6032: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6033: RAISE fnd_api.g_exc_unexpected_error;
6034: ELSE
6035: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_type;
6036: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_job;

Line 6033: RAISE fnd_api.g_exc_unexpected_error;

6029:
6030: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6031: RAISE fnd_api.g_exc_error;
6032: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6033: RAISE fnd_api.g_exc_unexpected_error;
6034: ELSE
6035: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_type;
6036: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_job;
6037: END IF;

Line 6076: RAISE fnd_api.g_exc_error;

6072: debug_print(' Reservations exist for sales order line'
6073: || l_demand_source_line_id);
6074: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
6075: fnd_msg_pub.add;
6076: RAISE fnd_api.g_exc_error;
6077: END IF;
6078: END IF;
6079: END IF;
6080: END IF;

Line 6100: IF l_return_status = fnd_api.g_ret_sts_error THEN

6096: , p_organization_id => p_orig_rsv_rec.organization_id
6097: , x_org_cache_index => l_orig_org_cache_index
6098: );
6099: --
6100: IF l_return_status = fnd_api.g_ret_sts_error THEN
6101: RAISE fnd_api.g_exc_error;
6102: END IF ;
6103: --
6104: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 6101: RAISE fnd_api.g_exc_error;

6097: , x_org_cache_index => l_orig_org_cache_index
6098: );
6099: --
6100: IF l_return_status = fnd_api.g_ret_sts_error THEN
6101: RAISE fnd_api.g_exc_error;
6102: END IF ;
6103: --
6104: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6105: RAISE fnd_api.g_exc_unexpected_error;

Line 6104: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6100: IF l_return_status = fnd_api.g_ret_sts_error THEN
6101: RAISE fnd_api.g_exc_error;
6102: END IF ;
6103: --
6104: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6105: RAISE fnd_api.g_exc_unexpected_error;
6106: END IF;
6107:
6108: validate_serials

Line 6105: RAISE fnd_api.g_exc_unexpected_error;

6101: RAISE fnd_api.g_exc_error;
6102: END IF ;
6103: --
6104: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6105: RAISE fnd_api.g_exc_unexpected_error;
6106: END IF;
6107:
6108: validate_serials
6109: (

Line 6118: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

6114: , p_to_serial_array => p_to_serial_array
6115: , p_rsv_action_name => p_rsv_action_name
6116: );
6117:
6118: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6119: RAISE fnd_api.g_exc_error;
6120: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6121: RAISE fnd_api.g_exc_unexpected_error;
6122: END IF;

Line 6119: RAISE fnd_api.g_exc_error;

6115: , p_rsv_action_name => p_rsv_action_name
6116: );
6117:
6118: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6119: RAISE fnd_api.g_exc_error;
6120: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6121: RAISE fnd_api.g_exc_unexpected_error;
6122: END IF;
6123:

Line 6120: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

6116: );
6117:
6118: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6119: RAISE fnd_api.g_exc_error;
6120: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6121: RAISE fnd_api.g_exc_unexpected_error;
6122: END IF;
6123:
6124: /*** for relieve crossdock reservation, call

Line 6121: RAISE fnd_api.g_exc_unexpected_error;

6117:
6118: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6119: RAISE fnd_api.g_exc_error;
6120: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6121: RAISE fnd_api.g_exc_unexpected_error;
6122: END IF;
6123:
6124: /*** for relieve crossdock reservation, call
6125: --- update_crossdock_reservation instead of relieve

Line 6145: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

6141: , p_orig_rsv_rec => p_orig_rsv_rec
6142: , p_to_rsv_rec => p_to_rsv_rec
6143: );
6144:
6145: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6146: RAISE fnd_api.g_exc_error;
6147: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6148: RAISE fnd_api.g_exc_unexpected_error;
6149: END IF;

Line 6146: RAISE fnd_api.g_exc_error;

6142: , p_to_rsv_rec => p_to_rsv_rec
6143: );
6144:
6145: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6146: RAISE fnd_api.g_exc_error;
6147: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6148: RAISE fnd_api.g_exc_unexpected_error;
6149: END IF;
6150: END IF;

Line 6147: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

6143: );
6144:
6145: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6146: RAISE fnd_api.g_exc_error;
6147: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6148: RAISE fnd_api.g_exc_unexpected_error;
6149: END IF;
6150: END IF;
6151: /*** End R12 }} ***/

Line 6148: RAISE fnd_api.g_exc_unexpected_error;

6144:
6145: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6146: RAISE fnd_api.g_exc_error;
6147: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6148: RAISE fnd_api.g_exc_unexpected_error;
6149: END IF;
6150: END IF;
6151: /*** End R12 }} ***/
6152:

Line 6163: IF l_return_status = fnd_api.g_ret_sts_error THEN

6159: , p_organization_id => p_orig_rsv_rec.organization_id
6160: , x_org_cache_index => l_orig_org_cache_index
6161: );
6162: --
6163: IF l_return_status = fnd_api.g_ret_sts_error THEN
6164: RAISE fnd_api.g_exc_error;
6165: END IF ;
6166: --
6167: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

Line 6164: RAISE fnd_api.g_exc_error;

6160: , x_org_cache_index => l_orig_org_cache_index
6161: );
6162: --
6163: IF l_return_status = fnd_api.g_ret_sts_error THEN
6164: RAISE fnd_api.g_exc_error;
6165: END IF ;
6166: --
6167: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6168: RAISE fnd_api.g_exc_unexpected_error;

Line 6167: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

6163: IF l_return_status = fnd_api.g_ret_sts_error THEN
6164: RAISE fnd_api.g_exc_error;
6165: END IF ;
6166: --
6167: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6168: RAISE fnd_api.g_exc_unexpected_error;
6169: END IF;
6170:
6171: validate_serials

Line 6168: RAISE fnd_api.g_exc_unexpected_error;

6164: RAISE fnd_api.g_exc_error;
6165: END IF ;
6166: --
6167: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6168: RAISE fnd_api.g_exc_unexpected_error;
6169: END IF;
6170:
6171: validate_serials
6172: (

Line 6181: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

6177: , p_to_serial_array => p_to_serial_array
6178: , p_rsv_action_name => p_rsv_action_name
6179: );
6180:
6181: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6182: RAISE fnd_api.g_exc_error;
6183: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6184: RAISE fnd_api.g_exc_unexpected_error;
6185: END IF;

Line 6182: RAISE fnd_api.g_exc_error;

6178: , p_rsv_action_name => p_rsv_action_name
6179: );
6180:
6181: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6182: RAISE fnd_api.g_exc_error;
6183: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6184: RAISE fnd_api.g_exc_unexpected_error;
6185: END IF;
6186:

Line 6183: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

6179: );
6180:
6181: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6182: RAISE fnd_api.g_exc_error;
6183: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6184: RAISE fnd_api.g_exc_unexpected_error;
6185: END IF;
6186:
6187: delete_crossdock_reservation

Line 6184: RAISE fnd_api.g_exc_unexpected_error;

6180:
6181: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6182: RAISE fnd_api.g_exc_error;
6183: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6184: RAISE fnd_api.g_exc_unexpected_error;
6185: END IF;
6186:
6187: delete_crossdock_reservation
6188: (

Line 6195: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

6191: , x_msg_data => l_msg_data
6192: , p_rsv_rec => p_orig_rsv_rec
6193: );
6194:
6195: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6196: RAISE fnd_api.g_exc_error;
6197: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6198: RAISE fnd_api.g_exc_unexpected_error;
6199: END IF;

Line 6196: RAISE fnd_api.g_exc_error;

6192: , p_rsv_rec => p_orig_rsv_rec
6193: );
6194:
6195: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6196: RAISE fnd_api.g_exc_error;
6197: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6198: RAISE fnd_api.g_exc_unexpected_error;
6199: END IF;
6200: END IF;

Line 6197: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN

6193: );
6194:
6195: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6196: RAISE fnd_api.g_exc_error;
6197: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6198: RAISE fnd_api.g_exc_unexpected_error;
6199: END IF;
6200: END IF;
6201: /*** End R12 }} ***/

Line 6198: RAISE fnd_api.g_exc_unexpected_error;

6194:
6195: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
6196: RAISE fnd_api.g_exc_error;
6197: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6198: RAISE fnd_api.g_exc_unexpected_error;
6199: END IF;
6200: END IF;
6201: /*** End R12 }} ***/
6202: IF (l_debug = 1) THEN

Line 6219: WHEN fnd_api.g_exc_error THEN

6215: --
6216: x_return_status := l_return_status;
6217: --
6218: EXCEPTION
6219: WHEN fnd_api.g_exc_error THEN
6220: x_return_status := fnd_api.g_ret_sts_error;
6221: --
6222: WHEN fnd_api.g_exc_unexpected_error THEN
6223: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 6220: x_return_status := fnd_api.g_ret_sts_error;

6216: x_return_status := l_return_status;
6217: --
6218: EXCEPTION
6219: WHEN fnd_api.g_exc_error THEN
6220: x_return_status := fnd_api.g_ret_sts_error;
6221: --
6222: WHEN fnd_api.g_exc_unexpected_error THEN
6223: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6224: --

Line 6222: WHEN fnd_api.g_exc_unexpected_error THEN

6218: EXCEPTION
6219: WHEN fnd_api.g_exc_error THEN
6220: x_return_status := fnd_api.g_ret_sts_error;
6221: --
6222: WHEN fnd_api.g_exc_unexpected_error THEN
6223: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6224: --
6225: WHEN OTHERS THEN
6226: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 6223: x_return_status := fnd_api.g_ret_sts_unexp_error ;

6219: WHEN fnd_api.g_exc_error THEN
6220: x_return_status := fnd_api.g_ret_sts_error;
6221: --
6222: WHEN fnd_api.g_exc_unexpected_error THEN
6223: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6224: --
6225: WHEN OTHERS THEN
6226: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6227: --

Line 6226: x_return_status := fnd_api.g_ret_sts_unexp_error ;

6222: WHEN fnd_api.g_exc_unexpected_error THEN
6223: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6224: --
6225: WHEN OTHERS THEN
6226: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6227: --
6228: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
6229: THEN
6230: fnd_msg_pub.add_exc_msg