DBA Data[Home] [Help]

APPS.GME_RESERVATIONS_PVT dependencies on GME_COMMON_PVT

Line 21: add gme_common_pvt.g_rule_based_resv_horizon in auto_detail_batch

17: Pawan Kumar bug 5139060
18: Made changes in create_batch_reservation to pass Suggestions mode (S) in the called by param
19: to assess the total unreserved quantity
20: Pawan kumar bug 5294184
21: add gme_common_pvt.g_rule_based_resv_horizon in auto_detail_batch
22: Swapna K bug: 6665408 28-DEC-2007
23: Added call to procedure inv_quantity_tree_pub.clear_quantity_cache in the procedure
24: auto_detail_line to clear the quantity cache and recreate it again
25:

Line 117: AND mr.demand_source_type_id = gme_common_pvt.g_txn_source_type

113: ,mr.secondary_uom_code, mr.inventory_item_id
114: ,loc.concatenated_segments
115: FROM mtl_reservations mr, wms_item_locations_kfv loc
116: WHERE mr.organization_id = p_organization_id
117: AND mr.demand_source_type_id = gme_common_pvt.g_txn_source_type
118: AND mr.demand_source_header_id = p_batch_id
119: AND mr.demand_source_line_id = p_material_detail_id
120: AND NVL (mr.subinventory_code, '1') =
121: NVL (p_subinventory_code, '1')

Line 187: NVL (gme_common_pvt.g_reservation_timefence, 0) ) THEN

183: FOR get_rec IN cur_reservable_ings LOOP
184: l_mtl_dtl_rec := get_rec;
185:
186: IF (NVL (p_timefence, 0) <>
187: NVL (gme_common_pvt.g_reservation_timefence, 0) ) THEN
188: --Pawan Kumar as done in create_material_reservations
189: -- for bug 5139060
190: -- Use Suggestions mode (S) in the called by param to assess the total
191: -- unreserved quantity

Line 192: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => l_mtl_dtl_rec

188: --Pawan Kumar as done in create_material_reservations
189: -- for bug 5139060
190: -- Use Suggestions mode (S) in the called by param to assess the total
191: -- unreserved quantity
192: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => l_mtl_dtl_rec
193: ,p_called_by => 'S'
194: ,x_open_qty => l_resv_qty
195: ,x_return_status => l_return_status);
196:

Line 306: l_rsv_rec.demand_source_type_id := gme_common_pvt.g_txn_source_type;

302: --Bug#4604943 End
303: l_rsv_rec.requirement_date := p_matl_dtl_rec.material_requirement_date;
304: l_rsv_rec.organization_id := p_matl_dtl_rec.organization_id;
305: l_rsv_rec.inventory_item_id := p_matl_dtl_rec.inventory_item_id;
306: l_rsv_rec.demand_source_type_id := gme_common_pvt.g_txn_source_type;
307: l_rsv_rec.demand_source_header_id := p_matl_dtl_rec.batch_id;
308: l_rsv_rec.demand_source_line_id := p_matl_dtl_rec.material_detail_id;
309: l_rsv_rec.reservation_uom_code := NVL (p_resv_um, p_matl_dtl_rec.dtl_um);
310: l_rsv_rec.reservation_quantity :=

Line 439: ,x_reservations_tbl OUT NOCOPY gme_common_pvt.reservations_tab)

435: ,p_batch_id IN NUMBER
436: ,p_material_detail_id IN NUMBER
437: ,p_dispense_ind IN VARCHAR2
438: ,x_return_status OUT NOCOPY VARCHAR2
439: ,x_reservations_tbl OUT NOCOPY gme_common_pvt.reservations_tab)
440: IS
441: l_api_name CONSTANT VARCHAR2 (30) := 'get_material_reservations';
442: l_msg_count NUMBER;
443: l_msg_data VARCHAR2(32767);

Line 453: AND demand_source_type_id = gme_common_pvt.g_txn_source_type

449: IS
450: SELECT mr.*
451: FROM mtl_reservations mr
452: WHERE organization_id = v_org_id
453: AND demand_source_type_id = gme_common_pvt.g_txn_source_type
454: AND demand_source_header_id = v_batch_id
455: AND demand_source_line_id = v_material_detail_id
456: AND NOT EXISTS (SELECT 1
457: FROM mtl_material_transactions_temp

Line 520: ,x_reservations_tbl OUT NOCOPY gme_common_pvt.reservations_tab)

516: ,p_batch_id IN NUMBER
517: ,p_material_detail_id IN NUMBER
518: ,p_dispense_ind IN VARCHAR2
519: ,x_return_status OUT NOCOPY VARCHAR2
520: ,x_reservations_tbl OUT NOCOPY gme_common_pvt.reservations_tab)
521: IS
522: l_api_name CONSTANT VARCHAR2 (30) := 'get_material_res';
523: l_msg_count NUMBER;
524: l_msg_data VARCHAR2(32767);

Line 534: AND demand_source_type_id = gme_common_pvt.g_txn_source_type

530: IS
531: SELECT mr.*
532: FROM mtl_reservations mr
533: WHERE organization_id = v_org_id
534: AND demand_source_type_id = gme_common_pvt.g_txn_source_type
535: AND demand_source_header_id = v_batch_id
536: AND demand_source_line_id = v_material_detail_id
537: AND EXISTS (SELECT 1
538: FROM mtl_material_transactions_temp

Line 544: AND demand_source_type_id = gme_common_pvt.g_txn_source_type

540: UNION ALL
541: SELECT mr.*
542: FROM mtl_reservations mr
543: WHERE organization_id = v_org_id
544: AND demand_source_type_id = gme_common_pvt.g_txn_source_type
545: AND demand_source_header_id = v_batch_id
546: AND demand_source_line_id = v_material_detail_id
547: AND staged_flag = 'Y'
548: AND supply_source_type_id = inv_reservation_global.g_source_type_inv;

Line 640: gme_common_pvt.g_txn_source_type

636: mtl_txn_request_headers h ,
637: mtl_material_transactions_temp mmtt ,
638: mtl_transaction_lots_temp mtlt
639: WHERE l.transaction_source_type_id =
640: gme_common_pvt.g_txn_source_type
641: AND l.txn_source_id = v_batch_id
642: AND l.txn_source_line_id = v_material_detail_id
643: AND l.line_status NOT IN (5, 6)
644: AND h.header_id = l.header_id

Line 646: (gme_common_pvt.g_invis_move_order_type

642: AND l.txn_source_line_id = v_material_detail_id
643: AND l.line_status NOT IN (5, 6)
644: AND h.header_id = l.header_id
645: AND h.move_order_type NOT IN
646: (gme_common_pvt.g_invis_move_order_type
647: ,inv_globals.g_move_order_put_away)
648: AND mmtt.move_order_line_id = l.line_id
649: AND mmtt.transaction_source_id = l.txn_source_id
650: AND mmtt.trx_source_line_id =l.txn_source_line_id

Line 676: ,PRECISION => gme_common_pvt.g_precision

672: inv_convert.inv_um_convert
673: (item_id => MO_line_allocation_rec.inventory_item_id
674: ,lot_number => MO_line_allocation_rec.lot_number
675: ,organization_id => MO_line_allocation_rec.organization_id
676: ,PRECISION => gme_common_pvt.g_precision
677: ,from_quantity => MO_line_allocation_rec.TRANSACTION_quantity
678: ,from_unit => MO_line_allocation_rec.TRANSACTION_UOM
679: ,to_unit => p_mtl_dtl_rec.dtl_um
680: ,from_name => NULL

Line 747: gme_common_pvt.eff_locator_control

743: IF (p_reservation_rec.locator_id IS NOT NULL) THEN
744: x_reservation_type := 1; -- its DLR
745: ELSE
746: l_eff_locator_control :=
747: gme_common_pvt.eff_locator_control
748: (p_organization_id => p_reservation_rec.organization_id
749: ,p_org_control => gme_common_pvt.g_org_locator_control
750: ,p_subinventory => p_reservation_rec.subinventory_code
751: ,p_item_control => p_item_location_control

Line 749: ,p_org_control => gme_common_pvt.g_org_locator_control

745: ELSE
746: l_eff_locator_control :=
747: gme_common_pvt.eff_locator_control
748: (p_organization_id => p_reservation_rec.organization_id
749: ,p_org_control => gme_common_pvt.g_org_locator_control
750: ,p_subinventory => p_reservation_rec.subinventory_code
751: ,p_item_control => p_item_location_control
752: ,p_item_loc_restrict => p_item_restrict_locators
753: ,p_action => gme_common_pvt.g_ing_issue_txn_action);

Line 753: ,p_action => gme_common_pvt.g_ing_issue_txn_action);

749: ,p_org_control => gme_common_pvt.g_org_locator_control
750: ,p_subinventory => p_reservation_rec.subinventory_code
751: ,p_item_control => p_item_location_control
752: ,p_item_loc_restrict => p_item_restrict_locators
753: ,p_action => gme_common_pvt.g_ing_issue_txn_action);
754:
755: IF (l_eff_locator_control = 1) THEN
756: x_reservation_type := 1; -- its DLR
757: ELSE

Line 822: gme_common_pvt.eff_locator_control

818: END IF;
819: END IF;
820: /* Bug 5441643 Added NVL condition for location control code*/
821: l_eff_locator_control :=
822: gme_common_pvt.eff_locator_control
823: (p_organization_id => x_reservation_rec.organization_id
824: ,p_org_control => gme_common_pvt.g_org_locator_control
825: ,p_subinventory => x_reservation_rec.subinventory_code
826: ,p_item_control => NVL(p_item_rec.location_control_code,1)

Line 824: ,p_org_control => gme_common_pvt.g_org_locator_control

820: /* Bug 5441643 Added NVL condition for location control code*/
821: l_eff_locator_control :=
822: gme_common_pvt.eff_locator_control
823: (p_organization_id => x_reservation_rec.organization_id
824: ,p_org_control => gme_common_pvt.g_org_locator_control
825: ,p_subinventory => x_reservation_rec.subinventory_code
826: ,p_item_control => NVL(p_item_rec.location_control_code,1)
827: ,p_item_loc_restrict => p_item_rec.restrict_locators_code
828: ,p_action => gme_common_pvt.g_ing_issue_txn_action);

Line 828: ,p_action => gme_common_pvt.g_ing_issue_txn_action);

824: ,p_org_control => gme_common_pvt.g_org_locator_control
825: ,p_subinventory => x_reservation_rec.subinventory_code
826: ,p_item_control => NVL(p_item_rec.location_control_code,1)
827: ,p_item_loc_restrict => p_item_rec.restrict_locators_code
828: ,p_action => gme_common_pvt.g_ing_issue_txn_action);
829:
830: IF (l_eff_locator_control <> 1 AND p_reservation_rec.locator_id IS NULL) THEN
831: /* Bug 5441643 Added NVL condition for location control code*/
832: IF (NVL(p_item_rec.location_control_code,1) <> 1) THEN

Line 878: AND d.line_type = gme_common_pvt.g_line_type_ing

874: SELECT d.material_detail_id, d.batch_id, d.organization_id
875: FROM gme_material_details d, mtl_system_items_b i
876: WHERE d.organization_id = p_organization_id
877: AND d.batch_id = p_batch_id
878: AND d.line_type = gme_common_pvt.g_line_type_ing
879: AND i.organization_id = d.organization_id
880: AND i.inventory_item_id = d.inventory_item_id
881: AND i.reservable_type = 1;
882: BEGIN

Line 930: l_rsv_tbl gme_common_pvt.reservations_tab;

926: ,x_return_status OUT NOCOPY VARCHAR2)
927: IS
928: l_api_name CONSTANT VARCHAR2 (30) := 'delete_material_reservations';
929: l_return_status VARCHAR2 (1);
930: l_rsv_tbl gme_common_pvt.reservations_tab;
931: del_resvn_error EXCEPTION;
932: BEGIN
933: IF g_debug <= gme_debug.g_log_procedure THEN
934: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

Line 1087: ,PRECISION => gme_common_pvt.g_precision

1083: inv_convert.inv_um_convert
1084: (item_id => p_reservation_rec.inventory_item_id
1085: ,lot_number => p_reservation_rec.lot_number
1086: ,organization_id => p_reservation_rec.organization_id
1087: ,PRECISION => gme_common_pvt.g_precision
1088: ,from_quantity => p_reservation_rec.reservation_quantity
1089: ,from_unit => p_reservation_rec.reservation_uom_code
1090: ,to_unit => p_uom_code
1091: ,from_name => NULL

Line 1142: l_resv_tbl gme_common_pvt.reservations_tab;

1138: IS
1139: l_api_name CONSTANT VARCHAR2 (30) := 'get_reserved_qty';
1140: l_mtl_dtl_rec gme_material_details%ROWTYPE;
1141: l_mtl_dtl_rec_hold gme_material_details%ROWTYPE; -- Bug 12737393
1142: l_resv_tbl gme_common_pvt.reservations_tab;
1143: l_temp_qty NUMBER;
1144: l_return_status VARCHAR2 (1);
1145:
1146: -- Bug 12613813 - consider p_locator_only parameter and locator also.

Line 1151: WHERE mr.demand_source_type_id = gme_common_pvt.g_txn_source_type

1147: CURSOR cur_get_resvns
1148: IS
1149: SELECT mr.*
1150: FROM mtl_reservations mr
1151: WHERE mr.demand_source_type_id = gme_common_pvt.g_txn_source_type
1152: AND mr.demand_source_header_id = l_mtl_dtl_rec.batch_id
1153: AND mr.demand_source_line_id = l_mtl_dtl_rec.material_detail_id
1154: AND ((p_supply_sub_only = fnd_api.g_false) OR (mr.subinventory_code = l_mtl_dtl_rec.subinventory))
1155: AND (p_locator_only = fnd_api.g_false OR NVL(mr.locator_id, '-1') = NVL(l_mtl_dtl_rec.locator_id, '-1')); -- Bug 12737393

Line 1538: gme_common_pvt.g_txn_source_type

1534: SELECT 1
1535: FROM mtl_reservations mr
1536: WHERE organization_id = v_org_id
1537: AND demand_source_type_id =
1538: gme_common_pvt.g_txn_source_type
1539: AND demand_source_header_id = v_batch_id
1540: AND demand_source_line_id = v_material_detail_id
1541: AND NOT EXISTS (
1542: SELECT 1

Line 1633: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'

1629:
1630: IF cur_fetch_item%NOTFOUND THEN
1631: CLOSE cur_fetch_item;
1632:
1633: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
1634: ,'TABLE_NAME'
1635: ,'MTL_SYSTEM_ITEMS');
1636:
1637: IF g_debug <= gme_debug.g_log_statement THEN

Line 1653: gme_common_pvt.log_message ('GME_ITEM_NOT_TRANSACTABLE');

1649: CLOSE cur_fetch_item;
1650:
1651: /* Ensure the item is transaction enabled */
1652: IF l_item_rec.mtl_transactions_enabled_flag <> 'Y' THEN
1653: gme_common_pvt.log_message ('GME_ITEM_NOT_TRANSACTABLE');
1654: RAISE validation_error;
1655: END IF;
1656:
1657: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 1657: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

1653: gme_common_pvt.log_message ('GME_ITEM_NOT_TRANSACTABLE');
1654: RAISE validation_error;
1655: END IF;
1656:
1657: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
1658: /* Verify that the reservation is fully detailed */
1659: l_rsv_type :=
1660: gme_reservations_pvt.reservation_fully_specified
1661: (p_reservation_rec => p_reservation_rec

Line 1675: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');

1671: || TO_CHAR (l_rsv_type) );
1672: END IF;
1673:
1674: IF l_rsv_type = -1 THEN
1675: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');
1676: RAISE error_unexpected;
1677: END IF;
1678:
1679: IF l_rsv_type IN (0, 2) THEN -- Not fully detailed

Line 1699: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');

1695: || x_return_status);
1696: END IF;
1697:
1698: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1699: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');
1700: RAISE detail_reservation_error;
1701: END IF;
1702: ELSE -- fully detailed
1703: l_reservation_rec := p_reservation_rec;

Line 1732: ,PRECISION => gme_common_pvt.g_precision

1728: inv_convert.inv_um_convert
1729: (item_id => l_reservation_rec.inventory_item_id
1730: ,organization_id => l_reservation_rec.organization_id
1731: ,lot_number => l_reservation_rec.lot_number
1732: ,PRECISION => gme_common_pvt.g_precision
1733: ,from_quantity => l_reservation_rec.primary_reservation_quantity
1734: ,from_unit => l_reservation_rec.primary_uom_code
1735: ,to_unit => p_material_details_rec.dtl_um
1736: ,from_name => NULL

Line 1815: gme_common_pvt.count_and_get (x_count => x_message_count

1811: END IF;
1812: EXCEPTION
1813: WHEN error_unexpected OR uom_conversion_failure OR fetch_error OR validation_error OR create_transaction_error OR detail_reservation_error THEN
1814: x_return_status := fnd_api.g_ret_sts_error;
1815: gme_common_pvt.count_and_get (x_count => x_message_count
1816: ,p_encoded => fnd_api.g_false
1817: ,x_data => x_message_list);
1818: WHEN OTHERS THEN
1819: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 1829: gme_common_pvt.count_and_get (x_count => x_message_count

1825: || SQLERRM);
1826: END IF;
1827:
1828: x_return_status := fnd_api.g_ret_sts_unexp_error;
1829: gme_common_pvt.count_and_get (x_count => x_message_count
1830: ,p_encoded => fnd_api.g_false
1831: ,x_data => x_message_list);
1832: END convert_dtl_reservation;
1833:

Line 1841: l_rsv_tbl gme_common_pvt.reservations_tab;

1837: IS
1838: l_api_name CONSTANT VARCHAR2 (30) := 'auto_detail_line';
1839: l_item_rec mtl_system_items_b%ROWTYPE;
1840: l_rsv_rec mtl_reservations%ROWTYPE;
1841: l_rsv_tbl gme_common_pvt.reservations_tab;
1842: l_reservations_tbl inv_reservation_global.mtl_reservation_tbl_type;
1843: l_rsv_type NUMBER;
1844: l_open_qty NUMBER :=0;
1845: l_mo_allocated_qty NUMBER := 0;

Line 1907: NVL(gme_common_pvt.g_rule_based_resv_horizon,10000)) THEN

1903: END IF;
1904: -- Pawan kumar made changes for 5294184
1905:
1906: IF NOT (p_material_details_rec.material_requirement_date < SYSDATE +
1907: NVL(gme_common_pvt.g_rule_based_resv_horizon,10000)) THEN
1908: gme_common_pvt.log_message ('GME_NO_ING_TIME');
1909: RETURN ;
1910: END IF;
1911:

Line 1908: gme_common_pvt.log_message ('GME_NO_ING_TIME');

1904: -- Pawan kumar made changes for 5294184
1905:
1906: IF NOT (p_material_details_rec.material_requirement_date < SYSDATE +
1907: NVL(gme_common_pvt.g_rule_based_resv_horizon,10000)) THEN
1908: gme_common_pvt.log_message ('GME_NO_ING_TIME');
1909: RETURN ;
1910: END IF;
1911:
1912: --Bug#4604943 End

Line 1924: gme_common_pvt.log_message ('PM_INVALID_ITEM');

1920:
1921: IF cur_get_item_rec%NOTFOUND THEN
1922: CLOSE cur_get_item_rec;
1923:
1924: gme_common_pvt.log_message ('PM_INVALID_ITEM');
1925:
1926: IF g_debug <= gme_debug.g_log_statement THEN
1927: gme_debug.put_line ( g_pkg_name
1928: || '.'

Line 1987: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');

1983: || TO_CHAR (l_rsv_type) );
1984: END IF;
1985:
1986: IF l_rsv_type = -1 THEN
1987: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');
1988: RAISE error_unexpected;
1989: END IF;
1990:
1991: IF l_rsv_type = 0 /*HLT*/ THEN

Line 2017: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => p_material_details_rec

2013:
2014: /* Assess the open quantity */
2015: /* 8599753 Apeksha :commenting this call as we are directly passing the value of l_open_qty for "R" as reservation status. */
2016: /* Bug No.9924437 Enabled the below code to exclude allocations before sending to WMS engine. */
2017: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => p_material_details_rec
2018: ,p_called_by => 'Z'
2019: ,x_open_qty => l_open_qty
2020: ,x_return_status => x_return_status);
2021:

Line 2119: gme_common_pvt.log_message ('GME_NO_DATA_FOUND','TABLE_NAME','MTL_TXN_REQUEST_LINES');

2115:
2116: IF cur_get_mo_rec%NOTFOUND THEN
2117: CLOSE cur_get_mo_rec;
2118:
2119: gme_common_pvt.log_message ('GME_NO_DATA_FOUND','TABLE_NAME','MTL_TXN_REQUEST_LINES');
2120:
2121: IF g_debug <= gme_debug.g_log_statement THEN
2122: gme_debug.put_line ( g_pkg_name
2123: || '.'

Line 2272: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => p_material_details_rec

2268: END IF;
2269:
2270: /* Create a High Level Reservation for any outstanding open quantity */
2271: /* start by determining what the outstanding open quantity is */
2272: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => p_material_details_rec
2273: ,p_called_by => 'R'
2274: ,x_open_qty => l_open_qty
2275: ,x_return_status => x_return_status);
2276: IF g_debug <= gme_debug.g_log_statement THEN

Line 2433: -- Pawan kumar made changes for 5294184- add gme_common_pvt.g_rule_based_resv_horizon

2429: l_tree_id NUMBER;
2430: -- bug 9852628 end
2431:
2432: auto_detail_failure EXCEPTION;
2433: -- Pawan kumar made changes for 5294184- add gme_common_pvt.g_rule_based_resv_horizon
2434: /* Retrieve Ingredient rows */
2435: CURSOR cur_get_reservable_ings
2436: IS
2437: SELECT d.*

Line 2441: AND d.material_requirement_date < SYSDATE + NVL(gme_common_pvt.g_rule_based_resv_horizon,p_timefence)

2437: SELECT d.*
2438: FROM gme_material_details d,mtl_system_items_b i
2439: WHERE d.batch_id = p_batch_rec.batch_id
2440: AND d.line_type = -1
2441: AND d.material_requirement_date < SYSDATE + NVL(gme_common_pvt.g_rule_based_resv_horizon,p_timefence)
2442: AND i. inventory_item_id = d.inventory_item_id
2443: AND i.organization_id = d.organization_id
2444: AND i.reservable_type = 1
2445: AND d.phantom_type = 0

Line 2456: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'gme_common_pvt.g_rule_based_resv_horizon

2452:
2453: x_return_status := FND_API.G_RET_STS_SUCCESS;
2454:
2455: IF g_debug <= gme_debug.g_log_statement THEN
2456: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'gme_common_pvt.g_rule_based_resv_horizon
2457: is '||gme_common_pvt.g_rule_based_resv_horizon);
2458: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Retrieve Material Detail lines for batch_id '||p_batch_rec.batch_id);
2459: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Timefence is '||p_timefence);
2460: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch Status is '||p_batch_rec.batch_status);

Line 2457: is '||gme_common_pvt.g_rule_based_resv_horizon);

2453: x_return_status := FND_API.G_RET_STS_SUCCESS;
2454:
2455: IF g_debug <= gme_debug.g_log_statement THEN
2456: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'gme_common_pvt.g_rule_based_resv_horizon
2457: is '||gme_common_pvt.g_rule_based_resv_horizon);
2458: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Retrieve Material Detail lines for batch_id '||p_batch_rec.batch_id);
2459: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Timefence is '||p_timefence);
2460: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch Status is '||p_batch_rec.batch_status);
2461:

Line 2550: gme_common_pvt.log_message ('GME_NO_ING_TIME');

2546: END LOOP;
2547:
2548: -- Pawan kumar made changes for 5294184
2549: IF l_found = 0 THEN
2550: gme_common_pvt.log_message ('GME_NO_ING_TIME');
2551: END IF;
2552:
2553: IF g_debug <= gme_debug.g_log_statement THEN
2554: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);

Line 2608: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN

2604: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec, l_batch_header_rec)) THEN
2605: RAISE fetch_failure;
2606: END IF;
2607:
2608: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
2609: --pending batch just return
2610: IF g_debug <= gme_debug.g_log_statement THEN
2611: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is Pending status');
2612: END IF;

Line 2614: ELSIF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN

2610: IF g_debug <= gme_debug.g_log_statement THEN
2611: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is Pending status');
2612: END IF;
2613: RETURN;
2614: ELSIF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN
2615: /* In WIP Bathes, do not create reservations for automatic and automatic by step if assoc step is not released*/
2616: IF p_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN
2617: IF g_debug <= gme_debug.g_log_statement THEN
2618: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is manual/incremental');

Line 2616: IF p_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN

2612: END IF;
2613: RETURN;
2614: ELSIF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN
2615: /* In WIP Bathes, do not create reservations for automatic and automatic by step if assoc step is not released*/
2616: IF p_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN
2617: IF g_debug <= gme_debug.g_log_statement THEN
2618: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is manual/incremental');
2619: END IF;
2620: RETURN;

Line 2621: ELSIF p_material_detail_rec.release_type = gme_common_pvt.g_mtl_autobystep_release THEN

2617: IF g_debug <= gme_debug.g_log_statement THEN
2618: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is manual/incremental');
2619: END IF;
2620: RETURN;
2621: ELSIF p_material_detail_rec.release_type = gme_common_pvt.g_mtl_autobystep_release THEN
2622: /* if automatic by step then check step status */
2623: IF g_debug <= gme_debug.g_log_statement THEN
2624: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is Autoby step');
2625: END IF;

Line 2626: IF NOT gme_common_pvt.get_assoc_step(p_material_detail_rec.material_detail_id,l_step_id,l_step_status) THEN

2622: /* if automatic by step then check step status */
2623: IF g_debug <= gme_debug.g_log_statement THEN
2624: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is Autoby step');
2625: END IF;
2626: IF NOT gme_common_pvt.get_assoc_step(p_material_detail_rec.material_detail_id,l_step_id,l_step_status) THEN
2627: RAISE demand_line_error;
2628: ELSIF l_step_id IS NOT NULL AND NVL(l_step_status,-1) <> gme_common_pvt.g_step_pending THEN
2629: RAISE demand_line_error;
2630: END IF;

Line 2628: ELSIF l_step_id IS NOT NULL AND NVL(l_step_status,-1) <> gme_common_pvt.g_step_pending THEN

2624: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is Autoby step');
2625: END IF;
2626: IF NOT gme_common_pvt.get_assoc_step(p_material_detail_rec.material_detail_id,l_step_id,l_step_status) THEN
2627: RAISE demand_line_error;
2628: ELSIF l_step_id IS NOT NULL AND NVL(l_step_status,-1) <> gme_common_pvt.g_step_pending THEN
2629: RAISE demand_line_error;
2630: END IF;
2631: ELSE
2632: IF g_debug <= gme_debug.g_log_statement THEN

Line 2648: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');

2644: EXCEPTION
2645: WHEN fetch_failure THEN
2646: x_return_status := fnd_api.g_ret_sts_error;
2647: WHEN demand_line_error THEN
2648: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
2649: x_return_status := fnd_api.g_ret_sts_error;
2650: WHEN batch_status_error THEN
2651: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS','PROCESS','RESERVATIONS');
2652: x_return_status := fnd_api.g_ret_sts_error;

Line 2651: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS','PROCESS','RESERVATIONS');

2647: WHEN demand_line_error THEN
2648: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
2649: x_return_status := fnd_api.g_ret_sts_error;
2650: WHEN batch_status_error THEN
2651: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS','PROCESS','RESERVATIONS');
2652: x_return_status := fnd_api.g_ret_sts_error;
2653: WHEN OTHERS THEN
2654: IF g_debug <= gme_debug.g_log_unexpected THEN
2655: gme_debug.put_line ( 'When others exception in '