DBA Data[Home] [Help]

APPS.INV_RESERVATION_AVAIL_PVT dependencies on FND_API

Line 17: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

13:
14: PROCEDURE available_supply_to_reserve
15: (
16: p_api_version_number IN NUMBER DEFAULT 1.0
17: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
18: , x_return_status OUT NOCOPY VARCHAR2
19: , x_msg_count OUT NOCOPY NUMBER
20: , x_msg_data OUT NOCOPY VARCHAR2
21: , p_organization_id IN NUMBER DEFAULT NULL

Line 27: , p_lpn_id IN NUMBER DEFAULT fnd_api.g_miss_num

23: , p_revision IN VARCHAR2 DEFAULT NULL
24: , p_lot_number IN VARCHAR2 DEFAULT NULL
25: , p_subinventory_code IN VARCHAR2 DEFAULT NULL
26: , p_locator_id IN NUMBER DEFAULT NULL
27: , p_lpn_id IN NUMBER DEFAULT fnd_api.g_miss_num
28: , p_fm_supply_source_type_id IN NUMBER DEFAULT 0
29: , p_supply_source_type_id IN NUMBER
30: , p_supply_source_header_id IN NUMBER
31: , p_supply_source_line_id IN NUMBER

Line 32: , p_supply_source_line_detail IN NUMBER DEFAULT fnd_api.g_miss_num

28: , p_fm_supply_source_type_id IN NUMBER DEFAULT 0
29: , p_supply_source_type_id IN NUMBER
30: , p_supply_source_header_id IN NUMBER
31: , p_supply_source_line_id IN NUMBER
32: , p_supply_source_line_detail IN NUMBER DEFAULT fnd_api.g_miss_num
33: , p_project_id IN NUMBER DEFAULT NULL
34: , p_task_id IN NUMBER DEFAULT NULL
35: , x_qty_available_to_reserve OUT NOCOPY NUMBER
36: , x_qty_available OUT NOCOPY NUMBER

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

36: , x_qty_available OUT NOCOPY NUMBER
37: ) IS
38: l_api_version_number CONSTANT NUMBER := 1.0;
39: l_api_name CONSTANT VARCHAR2(30) := 'avilable_supply_to_reserve';
40: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
41: l_msg_count NUMBER;
42: l_msg_data VARCHAR2(2000);
43: l_debug NUMBER;
44: l_wip_entity_type NUMBER;

Line 81: RAISE fnd_api.g_exc_error;

77: -- error out if supply source type id is null
78: IF (p_supply_source_type_id is null) THEN
79: fnd_message.set_name('INV', 'INV_NO_SUPPLY_TYPE');
80: fnd_msg_pub.add;
81: RAISE fnd_api.g_exc_error;
82: END IF;
83:
84: -- for WIP supply source
85: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN

Line 91: RAISE fnd_api.g_exc_error;

87: -- error out if supply source header id is null
88: IF (p_supply_source_header_id is null) THEN
89: fnd_message.set_name('INV','INV_NO_SUPPLY_INFO');
90: fnd_msg_pub.add;
91: RAISE fnd_api.g_exc_error;
92: END IF;
93:
94: -- get wip entity type from wip_record_cache
95: inv_reservation_util_pvt.get_wip_cache

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

97: x_return_status => l_return_status
98: , p_wip_entity_id => p_supply_source_header_id
99: );
100:
101: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
102: RAISE fnd_api.g_exc_error;
103: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
104: RAISE fnd_api.g_exc_unexpected_error;
105: ELSE

Line 102: RAISE fnd_api.g_exc_error;

98: , p_wip_entity_id => p_supply_source_header_id
99: );
100:
101: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
102: RAISE fnd_api.g_exc_error;
103: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
104: RAISE fnd_api.g_exc_unexpected_error;
105: ELSE
106: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;

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

99: );
100:
101: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
102: RAISE fnd_api.g_exc_error;
103: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
104: RAISE fnd_api.g_exc_unexpected_error;
105: ELSE
106: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
107: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;

Line 104: RAISE fnd_api.g_exc_unexpected_error;

100:
101: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
102: RAISE fnd_api.g_exc_error;
103: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
104: RAISE fnd_api.g_exc_unexpected_error;
105: ELSE
106: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
107: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
108: END IF;

Line 159: , p_init_msg_lst => fnd_api.g_false

155: , p_lpn_id => p_lpn_id
156: , p_project_id => null -- p_project_id
157: , p_task_id => null -- p_task_id
158: , p_api_version_number => 1.0
159: , p_init_msg_lst => fnd_api.g_false
160: , p_return_txn => l_return_txn
161: );
162:
163: IF (l_debug = 1) THEN

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

166: debug_print('source uom code = ' || l_source_uom_code);
167: debug_print('source primary uom code = ' || l_source_primary_uom_code);
168: END IF;
169:
170: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
171: raise fnd_api.g_exc_error;
172: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
173: raise fnd_api.g_exc_unexpected_error;
174: END IF;

Line 171: raise fnd_api.g_exc_error;

167: debug_print('source primary uom code = ' || l_source_primary_uom_code);
168: END IF;
169:
170: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
171: raise fnd_api.g_exc_error;
172: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
173: raise fnd_api.g_exc_unexpected_error;
174: END IF;
175: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN

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

168: END IF;
169:
170: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
171: raise fnd_api.g_exc_error;
172: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
173: raise fnd_api.g_exc_unexpected_error;
174: END IF;
175: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN
176: -- remove comment later

Line 173: raise fnd_api.g_exc_unexpected_error;

169:
170: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
171: raise fnd_api.g_exc_error;
172: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
173: raise fnd_api.g_exc_unexpected_error;
174: END IF;
175: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN
176: -- remove comment later
177: IF (l_debug = 1) THEN

Line 204: , p_init_msg_lst => fnd_api.g_false

200: , p_lpn_id => p_lpn_id
201: , p_project_id => null -- p_project_id
202: , p_task_id => null -- p_task_id
203: , p_api_version_number => 1.0
204: , p_init_msg_lst => fnd_api.g_false
205: );
206:
207: IF (l_debug = 1) THEN
208: debug_print('return status from get_available_supply_demand = ' || l_return_status);

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

210: debug_print('source uom code = ' || l_source_uom_code);
211: debug_print('source primary uom code = ' || l_source_primary_uom_code);
212: END IF;
213:
214: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
215: raise fnd_api.g_exc_error;
216: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
217: raise fnd_api.g_exc_unexpected_error;
218: END IF;

Line 215: raise fnd_api.g_exc_error;

211: debug_print('source primary uom code = ' || l_source_primary_uom_code);
212: END IF;
213:
214: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
215: raise fnd_api.g_exc_error;
216: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
217: raise fnd_api.g_exc_unexpected_error;
218: END IF;
219: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR

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

212: END IF;
213:
214: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
215: raise fnd_api.g_exc_error;
216: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
217: raise fnd_api.g_exc_unexpected_error;
218: END IF;
219: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
220: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

Line 217: raise fnd_api.g_exc_unexpected_error;

213:
214: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
215: raise fnd_api.g_exc_error;
216: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
217: raise fnd_api.g_exc_unexpected_error;
218: END IF;
219: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
220: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
221: -- remove comment later

Line 248: , p_init_msg_lst => fnd_api.g_false

244: , p_lpn_id => p_lpn_id
245: , p_project_id => null -- p_project_id
246: , p_task_id => null -- p_task_id
247: , p_api_version_number => 1.0
248: , p_init_msg_lst => fnd_api.g_false
249: );
250: END IF;
251:
252: IF (l_debug = 1) THEN

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

255: debug_print('source uom code = ' || l_source_uom_code);
256: debug_print('source primary uom code = ' || l_source_primary_uom_code);
257: END IF;
258:
259: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
260: raise fnd_api.g_exc_error;
261: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
262: raise fnd_api.g_exc_unexpected_error;
263: END IF;

Line 260: raise fnd_api.g_exc_error;

256: debug_print('source primary uom code = ' || l_source_primary_uom_code);
257: END IF;
258:
259: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
260: raise fnd_api.g_exc_error;
261: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
262: raise fnd_api.g_exc_unexpected_error;
263: END IF;
264:

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

257: END IF;
258:
259: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
260: raise fnd_api.g_exc_error;
261: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
262: raise fnd_api.g_exc_unexpected_error;
263: END IF;
264:
265: -- need uom conversion if source uom is different from primary uom

Line 262: raise fnd_api.g_exc_unexpected_error;

258:
259: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
260: raise fnd_api.g_exc_error;
261: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
262: raise fnd_api.g_exc_unexpected_error;
263: END IF;
264:
265: -- need uom conversion if source uom is different from primary uom
266: IF (l_available_quantity > 0 AND l_source_uom_code is not NULL AND l_source_uom_code <> l_source_primary_uom_code) THEN

Line 333: RAISE fnd_api.g_exc_error;

329: -- error out if supply source header or line id is null
330: IF (p_supply_source_header_id is null or p_supply_source_line_id is null) THEN
331: fnd_message.set_name('INV','INV_NO_SUPPLY_INFO');
332: fnd_msg_pub.add;
333: RAISE fnd_api.g_exc_error;
334: END IF;
335:
336: -- for ASN supply, error if if supply source line detail is null
337: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn

Line 341: RAISE fnd_api.g_exc_error;

337: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn
338: and p_supply_source_line_detail is null) THEN
339: fnd_message.set_name('INV','INV_NO_SUPPLY_INFO');
340: fnd_msg_pub.add;
341: RAISE fnd_api.g_exc_error;
342: END IF;
343:
344: -- call availability API for PO, ASN, Intransit shipment or Internal Req
345: -- For PO, the available quantity is the quantity ordered

Line 384: , p_init_msg_lst => fnd_api.g_false

380: , p_lpn_id => p_lpn_id
381: , p_project_id => p_project_id
382: , p_task_id => p_task_id
383: , p_api_version_number => 1.0
384: , p_init_msg_lst => fnd_api.g_false
385: );
386:
387: IF (l_debug = 1) THEN
388: debug_print('return status from RCV_availability.get_available_supply_demand = ' || l_return_status);

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

390: debug_print('source uom code = ' || l_source_uom_code);
391: debug_print('source primary uom code = ' || l_source_primary_uom_code);
392: END IF;
393:
394: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
395: raise fnd_api.g_exc_error;
396: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
397: raise fnd_api.g_exc_unexpected_error;
398: END IF;

Line 395: raise fnd_api.g_exc_error;

391: debug_print('source primary uom code = ' || l_source_primary_uom_code);
392: END IF;
393:
394: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
395: raise fnd_api.g_exc_error;
396: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
397: raise fnd_api.g_exc_unexpected_error;
398: END IF;
399:

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

392: END IF;
393:
394: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
395: raise fnd_api.g_exc_error;
396: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
397: raise fnd_api.g_exc_unexpected_error;
398: END IF;
399:
400: -- need uom conversion if source uom is different from primary uom

Line 397: raise fnd_api.g_exc_unexpected_error;

393:
394: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
395: raise fnd_api.g_exc_error;
396: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
397: raise fnd_api.g_exc_unexpected_error;
398: END IF;
399:
400: -- need uom conversion if source uom is different from primary uom
401: IF (l_available_quantity > 0 AND l_source_uom_code is not NULL AND l_source_uom_code <> l_source_primary_uom_code) THEN

Line 484: RAISE fnd_api.g_exc_error;

480: -- error out if organization_id or item id is null
481: IF (p_organization_id is null or p_item_id is null) THEN
482: fnd_message.set_name('INV', 'INV_NO_ORG_ITEM');
483: fnd_msg_pub.add;
484: RAISE fnd_api.g_exc_error;
485: END IF;
486:
487: -- call availability API for available quantity in receiving
488: IF (l_debug = 1) THEN

Line 515: , p_init_msg_lst => fnd_api.g_false

511: , p_lpn_id => p_lpn_id
512: , p_project_id => null -- p_project_id
513: , p_task_id => null -- p_task_id
514: , p_api_version_number => 1.0
515: , p_init_msg_lst => fnd_api.g_false
516: );
517:
518: IF (l_debug = 1) THEN
519: debug_print('return status from get_available_supply_demand = ' || l_return_status);

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

521: debug_print('source uom code = ' || l_source_uom_code);
522: debug_print('source primary uom code = ' || l_source_primary_uom_code);
523: END IF;
524:
525: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
526: raise fnd_api.g_exc_error;
527: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
528: raise fnd_api.g_exc_unexpected_error;
529: END IF;

Line 526: raise fnd_api.g_exc_error;

522: debug_print('source primary uom code = ' || l_source_primary_uom_code);
523: END IF;
524:
525: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
526: raise fnd_api.g_exc_error;
527: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
528: raise fnd_api.g_exc_unexpected_error;
529: END IF;
530:

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

523: END IF;
524:
525: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
526: raise fnd_api.g_exc_error;
527: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
528: raise fnd_api.g_exc_unexpected_error;
529: END IF;
530:
531: -- need uom conversion if source uom is different from primary uom

Line 528: raise fnd_api.g_exc_unexpected_error;

524:
525: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
526: raise fnd_api.g_exc_error;
527: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
528: raise fnd_api.g_exc_unexpected_error;
529: END IF;
530:
531: -- need uom conversion if source uom is different from primary uom
532: IF (l_available_quantity > 0 AND l_source_uom_code is not NULL AND l_source_uom_code <> l_source_primary_uom_code) THEN

Line 593: WHEN fnd_api.g_exc_error THEN

589: x_qty_available := nvl(l_primary_available_qty, 0);
590:
591: x_return_status := l_return_status;
592: EXCEPTION
593: WHEN fnd_api.g_exc_error THEN
594: x_return_status := fnd_api.g_ret_sts_error;
595: IF (l_debug = 1) THEN
596: debug_print('expected error in available_supply_to_reserve');
597: END IF;

Line 594: x_return_status := fnd_api.g_ret_sts_error;

590:
591: x_return_status := l_return_status;
592: EXCEPTION
593: WHEN fnd_api.g_exc_error THEN
594: x_return_status := fnd_api.g_ret_sts_error;
595: IF (l_debug = 1) THEN
596: debug_print('expected error in available_supply_to_reserve');
597: END IF;
598: --

Line 599: WHEN fnd_api.g_exc_unexpected_error THEN

595: IF (l_debug = 1) THEN
596: debug_print('expected error in available_supply_to_reserve');
597: END IF;
598: --
599: WHEN fnd_api.g_exc_unexpected_error THEN
600: x_return_status := fnd_api.g_ret_sts_unexp_error ;
601: IF (l_debug = 1) THEN
602: debug_print('unexpected error in available_supply_to_reserve');
603: debug_print('SQLCODE:'||SQLCODE||' SQLERRM:'||SQLERRM);

Line 600: x_return_status := fnd_api.g_ret_sts_unexp_error ;

596: debug_print('expected error in available_supply_to_reserve');
597: END IF;
598: --
599: WHEN fnd_api.g_exc_unexpected_error THEN
600: x_return_status := fnd_api.g_ret_sts_unexp_error ;
601: IF (l_debug = 1) THEN
602: debug_print('unexpected error in available_supply_to_reserve');
603: debug_print('SQLCODE:'||SQLCODE||' SQLERRM:'||SQLERRM);
604: END IF;

Line 607: x_return_status := fnd_api.g_ret_sts_unexp_error ;

603: debug_print('SQLCODE:'||SQLCODE||' SQLERRM:'||SQLERRM);
604: END IF;
605: --
606: WHEN OTHERS THEN
607: x_return_status := fnd_api.g_ret_sts_unexp_error ;
608: IF (l_debug = 1) THEN
609: debug_print('others error in available_supply_to_reserve');
610: debug_print('SQLCODE:'||SQLCODE||' SQLERRM:'||SQLERRM);
611: END IF;

Line 626: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false

622:
623: PROCEDURE available_demand_to_reserve
624: (
625: p_api_version_number IN NUMBER DEFAULT 1.0
626: , p_init_msg_lst IN VARCHAR2 DEFAULT fnd_api.g_false
627: , x_return_status OUT NOCOPY VARCHAR2
628: , x_msg_count OUT NOCOPY NUMBER
629: , x_msg_data OUT NOCOPY VARCHAR2
630: , p_organization_id IN NUMBER DEFAULT NULL

Line 636: , p_demand_source_line_detail IN NUMBER DEFAULT fnd_api.g_miss_num

632: , p_primary_uom_code IN VARCHAR2 DEFAULT NULL
633: , p_demand_source_type_id IN NUMBER
634: , p_demand_source_header_id IN NUMBER
635: , p_demand_source_line_id IN NUMBER
636: , p_demand_source_line_detail IN NUMBER DEFAULT fnd_api.g_miss_num
637: , p_project_id IN NUMBER DEFAULT NULL
638: , p_task_id IN NUMBER DEFAULT NULL
639: , x_qty_available_to_reserve OUT NOCOPY NUMBER
640: , x_qty_available OUT NOCOPY NUMBER

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

640: , x_qty_available OUT NOCOPY NUMBER
641: ) IS
642: l_api_version_number CONSTANT NUMBER := 1.0;
643: l_api_name CONSTANT VARCHAR2(30) := 'avilable_demand_to_reserve';
644: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
645: l_msg_count NUMBER;
646: l_msg_data VARCHAR2(2000);
647: l_debug NUMBER;
648: l_wip_entity_type NUMBER;

Line 683: RAISE fnd_api.g_exc_error;

679: -- error out if demand source type id is null
680: IF (p_demand_source_type_id is null) THEN
681: fnd_message.set_name('INV', 'INV_NO_DEMAND_TYPE');
682: fnd_msg_pub.add;
683: RAISE fnd_api.g_exc_error;
684: END IF;
685:
686: -- for WIP demand source
687: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN

Line 693: RAISE fnd_api.g_exc_error;

689: -- error out if demand source header id is null
690: IF (p_demand_source_header_id is null) THEN
691: fnd_message.set_name('INV','INV_NO_DEMAND_INFO');
692: fnd_msg_pub.add;
693: RAISE fnd_api.g_exc_error;
694: END IF;
695:
696: -- get wip entitty type from wip_record_cache
697: inv_reservation_util_pvt.get_wip_cache

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

699: x_return_status => l_return_status
700: , p_wip_entity_id => p_demand_source_header_id
701: );
702:
703: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
704: RAISE fnd_api.g_exc_error;
705: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
706: RAISE fnd_api.g_exc_unexpected_error;
707: ELSE

Line 704: RAISE fnd_api.g_exc_error;

700: , p_wip_entity_id => p_demand_source_header_id
701: );
702:
703: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
704: RAISE fnd_api.g_exc_error;
705: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
706: RAISE fnd_api.g_exc_unexpected_error;
707: ELSE
708: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;

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

701: );
702:
703: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
704: RAISE fnd_api.g_exc_error;
705: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
706: RAISE fnd_api.g_exc_unexpected_error;
707: ELSE
708: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;
709: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;

Line 706: RAISE fnd_api.g_exc_unexpected_error;

702:
703: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
704: RAISE fnd_api.g_exc_error;
705: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
706: RAISE fnd_api.g_exc_unexpected_error;
707: ELSE
708: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;
709: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;
710: END IF;

Line 749: , p_init_msg_lst => fnd_api.g_false

745: , p_lpn_id => null
746: , p_project_id => null -- p_project_id
747: , p_task_id => null -- p_task_id
748: , p_api_version_number => 1.0
749: , p_init_msg_lst => fnd_api.g_false
750: );
751:
752: IF (l_debug = 1) THEN
753: debug_print('return status from cmro get_available_supply_demand = ' || l_return_status);

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

755: debug_print('source uom code = ' || l_source_uom_code);
756: debug_print('source primary uom code = ' || l_source_primary_uom_code);
757: END IF;
758:
759: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
760: raise fnd_api.g_exc_error;
761: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
762: raise fnd_api.g_exc_unexpected_error;
763: END IF;

Line 760: raise fnd_api.g_exc_error;

756: debug_print('source primary uom code = ' || l_source_primary_uom_code);
757: END IF;
758:
759: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
760: raise fnd_api.g_exc_error;
761: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
762: raise fnd_api.g_exc_unexpected_error;
763: END IF;
764:

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

757: END IF;
758:
759: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
760: raise fnd_api.g_exc_error;
761: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
762: raise fnd_api.g_exc_unexpected_error;
763: END IF;
764:
765: -- get the sum of quantity that is already reserved on the document.

Line 762: raise fnd_api.g_exc_unexpected_error;

758:
759: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
760: raise fnd_api.g_exc_error;
761: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
762: raise fnd_api.g_exc_unexpected_error;
763: END IF;
764:
765: -- get the sum of quantity that is already reserved on the document.
766: -- bug #5458083 added demand_source_line_detail in the where clause

Line 814: , p_init_msg_lst => fnd_api.g_false

810: , p_lpn_id => null
811: , p_project_id => null -- p_project_id
812: , p_task_id => null -- p_task_id
813: , p_api_version_number => 1.0
814: , p_init_msg_lst => fnd_api.g_false
815: );
816:
817: IF (l_debug = 1) THEN
818: debug_print('return status from batch/fpo get_available_supply_demand = ' || l_return_status);

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

820: debug_print('source uom code = ' || l_source_uom_code);
821: debug_print('source primary uom code = ' || l_source_primary_uom_code);
822: END IF;
823:
824: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
825: raise fnd_api.g_exc_error;
826: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
827: raise fnd_api.g_exc_unexpected_error;
828: END IF;

Line 825: raise fnd_api.g_exc_error;

821: debug_print('source primary uom code = ' || l_source_primary_uom_code);
822: END IF;
823:
824: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
825: raise fnd_api.g_exc_error;
826: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
827: raise fnd_api.g_exc_unexpected_error;
828: END IF;
829:

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

822: END IF;
823:
824: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
825: raise fnd_api.g_exc_error;
826: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
827: raise fnd_api.g_exc_unexpected_error;
828: END IF;
829:
830: -- get the sum of quantity that is already reserved on the document.

Line 827: raise fnd_api.g_exc_unexpected_error;

823:
824: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
825: raise fnd_api.g_exc_error;
826: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
827: raise fnd_api.g_exc_unexpected_error;
828: END IF;
829:
830: -- get the sum of quantity that is already reserved on the document.
831: BEGIN

Line 881: IF (p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num) THEN

877: (inv_reservation_global.g_source_type_oe,
878: inv_reservation_global.g_source_type_internal_ord,
879: inv_reservation_global.g_source_type_rma)) THEN
880:
881: IF (p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num) THEN
882:
883: IF (l_debug = 1) THEN
884: debug_print('p_demand_source_line_detail is not NULL and p_demand_source_line_detail <> fnd_api.g_miss_num');
885: END IF;

Line 884: debug_print('p_demand_source_line_detail is not NULL and p_demand_source_line_detail <> fnd_api.g_miss_num');

880:
881: IF (p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num) THEN
882:
883: IF (l_debug = 1) THEN
884: debug_print('p_demand_source_line_detail is not NULL and p_demand_source_line_detail <> fnd_api.g_miss_num');
885: END IF;
886:
887: -- get wdd requested quantity with line detail level
888: BEGIN

Line 906: RAISE fnd_api.g_exc_error;

902: END IF;
903:
904: FND_MESSAGE.SET_NAME('INV', 'INV_WDD_NOT_FOUND');
905: FND_MSG_PUB.ADD;
906: RAISE fnd_api.g_exc_error;
907: END;
908:
909: IF (l_debug = 1) THEN
910: debug_print('l_wdd_primary_quantity = ' || l_wdd_primary_quantity);

Line 965: ELSIF (p_demand_source_line_detail = fnd_api.g_miss_num) THEN

961: IF (l_debug = 1) THEN
962: debug_print('l_primary_reserved_quantity = ' || l_primary_reserved_quantity);
963: END IF;
964:
965: ELSIF (p_demand_source_line_detail = fnd_api.g_miss_num) THEN
966:
967: IF (l_debug = 1) THEN
968: debug_print('p_demand_source_line_detail = fnd_api.g_miss_num');
969: END IF;

Line 968: debug_print('p_demand_source_line_detail = fnd_api.g_miss_num');

964:
965: ELSIF (p_demand_source_line_detail = fnd_api.g_miss_num) THEN
966:
967: IF (l_debug = 1) THEN
968: debug_print('p_demand_source_line_detail = fnd_api.g_miss_num');
969: END IF;
970:
971: -- get all reservation quantity at the order line level
972: BEGIN

Line 1059: RAISE fnd_api.g_exc_error;

1055: debug_print('Cannot find the primary unit of measure');
1056: END IF;
1057: FND_MESSAGE.SET_NAME('INV', 'INV_UOM_NOTFOUND');
1058: FND_MSG_PUB.ADD;
1059: RAISE fnd_api.g_exc_error;
1060: END;
1061: END IF;
1062:
1063: END IF;

Line 1087: IF (p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num) THEN

1083: debug_print('l_available_quantity = ' || l_available_quantity);
1084: debug_print('l_primary_available_qty = ' || l_primary_available_qty);
1085: END IF;
1086:
1087: IF (p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num) THEN
1088:
1089: IF (l_debug = 1) THEN
1090: debug_print('p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num');
1091: END IF;

Line 1090: debug_print('p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num');

1086:
1087: IF (p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num) THEN
1088:
1089: IF (l_debug = 1) THEN
1090: debug_print('p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num');
1091: END IF;
1092:
1093: l_wdd_available_qty := nvl(l_wdd_primary_quantity,0) - nvl(l_wdd_primary_reserved_qty,0);
1094: l_order_available_qty := nvl(l_primary_available_qty,0) - nvl(l_primary_reserved_quantity,0);

Line 1127: WHEN fnd_api.g_exc_error THEN

1123: x_qty_available := nvl(l_primary_available_qty, 0);
1124:
1125: x_return_status := l_return_status;
1126: EXCEPTION
1127: WHEN fnd_api.g_exc_error THEN
1128: x_return_status := fnd_api.g_ret_sts_error;
1129: --
1130: WHEN fnd_api.g_exc_unexpected_error THEN
1131: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1128: x_return_status := fnd_api.g_ret_sts_error;

1124:
1125: x_return_status := l_return_status;
1126: EXCEPTION
1127: WHEN fnd_api.g_exc_error THEN
1128: x_return_status := fnd_api.g_ret_sts_error;
1129: --
1130: WHEN fnd_api.g_exc_unexpected_error THEN
1131: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1132: --

Line 1130: WHEN fnd_api.g_exc_unexpected_error THEN

1126: EXCEPTION
1127: WHEN fnd_api.g_exc_error THEN
1128: x_return_status := fnd_api.g_ret_sts_error;
1129: --
1130: WHEN fnd_api.g_exc_unexpected_error THEN
1131: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1132: --
1133: WHEN OTHERS THEN
1134: x_return_status := fnd_api.g_ret_sts_unexp_error ;

Line 1131: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1127: WHEN fnd_api.g_exc_error THEN
1128: x_return_status := fnd_api.g_ret_sts_error;
1129: --
1130: WHEN fnd_api.g_exc_unexpected_error THEN
1131: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1132: --
1133: WHEN OTHERS THEN
1134: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1135: --

Line 1134: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1130: WHEN fnd_api.g_exc_unexpected_error THEN
1131: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1132: --
1133: WHEN OTHERS THEN
1134: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1135: --
1136: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1137: THEN
1138: fnd_msg_pub.add_exc_msg