DBA Data[Home] [Help]

APPS.INV_RESERVATION_AVAIL_PVT dependencies on INV_RESERVATION_GLOBAL

Line 85: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN

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
86:
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');

Line 106: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;

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;
109:
110: IF (l_debug = 1) THEN

Line 107: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;

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;
109:
110: IF (l_debug = 1) THEN
111: debug_print('wip entity type = ' || l_wip_entity_type);

Line 119: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN

115: -- available on the document. This quantity is the quantity ordered
116: -- minus the quantity already delivered on that document. It is the
117: -- expected supply still remainin to be satisfied against the document
118: -- line.
119: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN
120: -- remove comment later
121: IF (l_debug = 1) THEN
122: debug_print('calling WIP discrete get_available_supply_demand');
123: END IF;

Line 126: inv_reservation_global.g_source_type_inv) THEN

122: debug_print('calling WIP discrete get_available_supply_demand');
123: END IF;
124:
125: IF (p_fm_supply_source_type_id =
126: inv_reservation_global.g_source_type_inv) THEN
127: IF (l_debug = 1) THEN
128: debug_print('It is a return transaction.');
129: END IF;
130: l_return_txn := 1;

Line 175: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) 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
178: debug_print('calling osfm get_available_supply_demand');
179: END IF;

Line 219: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR

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
222: IF (l_debug = 1) THEN
223: debug_print('calling fpo get_available_supply_demand');

Line 220: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

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
222: IF (l_debug = 1) THEN
223: debug_print('calling fpo get_available_supply_demand');
224: END IF;

Line 299: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR

295: BEGIN
296: -- BUG 5052424 BEGIN
297: -- For OPM assess exisiting reservations at line level
298: -- Otherwise assess at header level
299: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
300: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
301: SELECT nvl(sum(primary_reservation_quantity), 0)
302: INTO l_primary_reserved_quantity
303: FROM mtl_reservations

Line 300: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

296: -- BUG 5052424 BEGIN
297: -- For OPM assess exisiting reservations at line level
298: -- Otherwise assess at header level
299: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
300: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
301: SELECT nvl(sum(primary_reservation_quantity), 0)
302: INTO l_primary_reserved_quantity
303: FROM mtl_reservations
304: WHERE supply_source_type_id = p_supply_source_type_id

Line 324: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR

320:
321: l_primary_reserved_quantity := 0;
322: END;
323:
324: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
325: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR
326: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
327: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
328:

Line 325: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR

321: l_primary_reserved_quantity := 0;
322: END;
323:
324: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
325: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR
326: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
327: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
328:
329: -- error out if supply source header or line id is null

Line 326: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR

322: END;
323:
324: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
325: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR
326: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
327: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
328:
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

Line 327: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN

323:
324: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
325: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR
326: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
327: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
328:
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');

Line 337: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn

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
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;

Line 429: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR

425: l_primary_available_qty := l_available_quantity;
426: END IF;
427:
428:
429: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
430: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
431: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
432:
433: -- get the sum of quantity that is already reserved on the document.

Line 430: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR

426: END IF;
427:
428:
429: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
430: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
431: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
432:
433: -- get the sum of quantity that is already reserved on the document.
434: BEGIN

Line 431: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN

427:
428:
429: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
430: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
431: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
432:
433: -- get the sum of quantity that is already reserved on the document.
434: BEGIN
435: SELECT nvl(sum(primary_reservation_quantity), 0)

Line 453: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN

449: l_primary_reserved_quantity := 0;
450: END;
451:
452:
453: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN
454:
455: -- get the sum of quantity that is already reserved on the document.
456: BEGIN
457: SELECT nvl(sum(primary_reservation_quantity), 0)

Line 478: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_rcv) THEN

474:
475:
476: END IF;
477:
478: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_rcv) THEN
479:
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');

Line 687: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN

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
688:
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');

Line 708: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;

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;
711:
712: IF (l_debug = 1) THEN

Line 709: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;

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;
711:
712: IF (l_debug = 1) THEN
713: debug_print('wip entity type = ' || l_wip_entity_type);

Line 721: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN

717: -- available on the document. This quantity is the quantity ordered
718: -- minus the quantity already delivered on that document. It is the
719: -- expected demand still remaining to be satisfied against the document
720: -- line.
721: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN
722: IF (l_debug = 1) THEN
723: debug_print('calling WIP cmro get_available_supply_demand');
724: END IF;
725:

Line 786: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR

782: l_primary_reserved_quantity := 0;
783: END;
784:
785:
786: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
787: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
788: IF (l_debug = 1) THEN
789: debug_print('calling opm get_available_supply_demand');
790: END IF;

Line 787: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

783: END;
784:
785:
786: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
787: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
788: IF (l_debug = 1) THEN
789: debug_print('calling opm get_available_supply_demand');
790: END IF;
791: GME_API_GRP.get_available_supply_demand

Line 877: (inv_reservation_global.g_source_type_oe,

873:
874: l_qty_available_to_reserve := l_primary_available_qty - l_primary_reserved_quantity;
875:
876: ELSIF (p_demand_source_type_id in
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

Line 878: inv_reservation_global.g_source_type_internal_ord,

874: l_qty_available_to_reserve := l_primary_available_qty - l_primary_reserved_quantity;
875:
876: ELSIF (p_demand_source_type_id in
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:

Line 879: inv_reservation_global.g_source_type_rma)) THEN

875:
876: ELSIF (p_demand_source_type_id in
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