DBA Data[Home] [Help]

APPS.INV_RESERVATION_AVAIL_PVT dependencies on INV_RESERVATION_GLOBAL

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

82: RAISE fnd_api.g_exc_error;
83: END IF;
84:
85: -- for WIP supply source
86: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN
87:
88: -- error out if supply source header id is null
89: IF (p_supply_source_header_id is null) THEN
90: fnd_message.set_name('INV','INV_NO_SUPPLY_INFO');

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

103: RAISE fnd_api.g_exc_error;
104: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
105: RAISE fnd_api.g_exc_unexpected_error;
106: ELSE
107: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
108: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
109: END IF;
110:
111: IF (l_debug = 1) THEN

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

104: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
105: RAISE fnd_api.g_exc_unexpected_error;
106: ELSE
107: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
108: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
109: END IF;
110:
111: IF (l_debug = 1) THEN
112: debug_print('wip entity type = ' || l_wip_entity_type);

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

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

Line 127: inv_reservation_global.g_source_type_inv) THEN

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

Line 176: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN

172: raise fnd_api.g_exc_error;
173: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
174: raise fnd_api.g_exc_unexpected_error;
175: END IF;
176: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN
177: -- remove comment later
178: IF (l_debug = 1) THEN
179: debug_print('calling osfm get_available_supply_demand');
180: END IF;

Line 220: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR

216: raise fnd_api.g_exc_error;
217: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
218: raise fnd_api.g_exc_unexpected_error;
219: END IF;
220: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
221: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
222: -- remove comment later
223: IF (l_debug = 1) THEN
224: debug_print('calling fpo get_available_supply_demand');

Line 221: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

217: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
218: raise fnd_api.g_exc_unexpected_error;
219: END IF;
220: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
221: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
222: -- remove comment later
223: IF (l_debug = 1) THEN
224: debug_print('calling fpo get_available_supply_demand');
225: END IF;

Line 252: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN

248: , p_api_version_number => 1.0
249: , p_init_msg_lst => fnd_api.g_false
250: );
251: /* Added following elsif for bug 13524480 */
252: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN
253: IF (l_debug = 1) THEN
254: debug_print('calling cmro get_available_supply_demand');
255: END IF;
256:

Line 331: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR

327: BEGIN
328: -- BUG 5052424 BEGIN
329: -- For OPM assess exisiting reservations at line level
330: -- Otherwise assess at header level
331: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
332: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
333: SELECT nvl(sum(primary_reservation_quantity), 0)
334: INTO l_primary_reserved_quantity
335: FROM mtl_reservations

Line 332: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

328: -- BUG 5052424 BEGIN
329: -- For OPM assess exisiting reservations at line level
330: -- Otherwise assess at header level
331: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
332: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
333: SELECT nvl(sum(primary_reservation_quantity), 0)
334: INTO l_primary_reserved_quantity
335: FROM mtl_reservations
336: WHERE supply_source_type_id = p_supply_source_type_id

Line 358: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR

354: END;
355:
356: -- bug 10039922 Added g_source_type_req
357:
358: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
359: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR
360: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
361: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR
362: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN

Line 359: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR

355:
356: -- bug 10039922 Added g_source_type_req
357:
358: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
359: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR
360: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
361: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR
362: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
363:

Line 360: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR

356: -- bug 10039922 Added g_source_type_req
357:
358: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
359: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR
360: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
361: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR
362: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
363:
364: -- error out if supply source header or line id is null

Line 361: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR

357:
358: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
359: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR
360: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
361: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR
362: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
363:
364: -- error out if supply source header or line id is null
365: IF (p_supply_source_header_id is null or p_supply_source_line_id is null) THEN

Line 362: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN

358: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
359: p_supply_source_type_id = inv_reservation_global.g_source_type_asn OR
360: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
361: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR
362: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
363:
364: -- error out if supply source header or line id is null
365: IF (p_supply_source_header_id is null or p_supply_source_line_id is null) THEN
366: fnd_message.set_name('INV','INV_NO_SUPPLY_INFO');

Line 372: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn

368: RAISE fnd_api.g_exc_error;
369: END IF;
370:
371: -- for ASN supply, error if if supply source line detail is null
372: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn
373: and p_supply_source_line_detail is null) THEN
374: fnd_message.set_name('INV','INV_NO_SUPPLY_INFO');
375: fnd_msg_pub.add;
376: RAISE fnd_api.g_exc_error;

Line 464: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR

460: l_primary_available_qty := l_available_quantity;
461: END IF;
462:
463: -- bug 10039922 Added g_source_type_req
464: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
465: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
466: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR
467: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
468:

Line 465: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR

461: END IF;
462:
463: -- bug 10039922 Added g_source_type_req
464: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
465: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
466: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR
467: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
468:
469: -- get the sum of quantity that is already reserved on the document.

Line 466: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR

462:
463: -- bug 10039922 Added g_source_type_req
464: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
465: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
466: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR
467: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
468:
469: -- get the sum of quantity that is already reserved on the document.
470: BEGIN

Line 467: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN

463: -- bug 10039922 Added g_source_type_req
464: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
465: p_supply_source_type_id = inv_reservation_global.g_source_type_intransit OR
466: p_supply_source_type_id = inv_reservation_global.g_source_type_req OR
467: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
468:
469: -- get the sum of quantity that is already reserved on the document.
470: BEGIN
471: SELECT nvl(sum(primary_reservation_quantity), 0)

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

485: l_primary_reserved_quantity := 0;
486: END;
487:
488:
489: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN
490:
491: -- get the sum of quantity that is already reserved on the document.
492: BEGIN
493: SELECT nvl(sum(primary_reservation_quantity), 0)

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

510:
511:
512: END IF;
513:
514: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_rcv) THEN
515:
516: -- error out if organization_id or item id is null
517: IF (p_organization_id is null or p_item_id is null) THEN
518: fnd_message.set_name('INV', 'INV_NO_ORG_ITEM');

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

863: RAISE fnd_api.g_exc_error;
864: END IF;
865:
866: -- for WIP demand source
867: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN
868:
869: -- error out if demand source header id is null
870: IF (p_demand_source_header_id is null) THEN
871: fnd_message.set_name('INV','INV_NO_DEMAND_INFO');

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

884: RAISE fnd_api.g_exc_error;
885: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
886: RAISE fnd_api.g_exc_unexpected_error;
887: ELSE
888: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;
889: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;
890: END IF;
891:
892: IF (l_debug = 1) THEN

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

885: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
886: RAISE fnd_api.g_exc_unexpected_error;
887: ELSE
888: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;
889: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;
890: END IF;
891:
892: IF (l_debug = 1) THEN
893: debug_print('wip entity type = ' || l_wip_entity_type);

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

897: -- available on the document. This quantity is the quantity ordered
898: -- minus the quantity already delivered on that document. It is the
899: -- expected demand still remaining to be satisfied against the document
900: -- line.
901: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN
902: IF (l_debug = 1) THEN
903: debug_print('calling WIP cmro get_available_supply_demand');
904: END IF;
905:

Line 966: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR

962: l_primary_reserved_quantity := 0;
963: END;
964:
965:
966: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
967: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
968: IF (l_debug = 1) THEN
969: debug_print('calling opm get_available_supply_demand');
970: END IF;

Line 967: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

963: END;
964:
965:
966: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo OR
967: l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
968: IF (l_debug = 1) THEN
969: debug_print('calling opm get_available_supply_demand');
970: END IF;
971: GME_API_GRP.get_available_supply_demand

Line 1057: (inv_reservation_global.g_source_type_oe,

1053:
1054: l_qty_available_to_reserve := l_primary_available_qty - l_primary_reserved_quantity;
1055:
1056: ELSIF (p_demand_source_type_id in
1057: (inv_reservation_global.g_source_type_oe,
1058: inv_reservation_global.g_source_type_internal_ord,
1059: inv_reservation_global.g_source_type_rma)) THEN
1060:
1061: IF (p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num) THEN

Line 1058: inv_reservation_global.g_source_type_internal_ord,

1054: l_qty_available_to_reserve := l_primary_available_qty - l_primary_reserved_quantity;
1055:
1056: ELSIF (p_demand_source_type_id in
1057: (inv_reservation_global.g_source_type_oe,
1058: inv_reservation_global.g_source_type_internal_ord,
1059: inv_reservation_global.g_source_type_rma)) THEN
1060:
1061: IF (p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num) THEN
1062:

Line 1059: inv_reservation_global.g_source_type_rma)) THEN

1055:
1056: ELSIF (p_demand_source_type_id in
1057: (inv_reservation_global.g_source_type_oe,
1058: inv_reservation_global.g_source_type_internal_ord,
1059: inv_reservation_global.g_source_type_rma)) THEN
1060:
1061: IF (p_demand_source_line_detail is not NULL AND p_demand_source_line_detail <> fnd_api.g_miss_num) THEN
1062:
1063: IF (l_debug = 1) THEN