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 60: AND mr.demand_source_type_id = gme_common_pvt.g_txn_source_type

56: ,mr.secondary_uom_code, mr.inventory_item_id
57: ,loc.concatenated_segments
58: FROM mtl_reservations mr, wms_item_locations_kfv loc
59: WHERE mr.organization_id = p_organization_id
60: AND mr.demand_source_type_id = gme_common_pvt.g_txn_source_type
61: AND mr.demand_source_header_id = p_batch_id
62: AND mr.demand_source_line_id = p_material_detail_id
63: AND NVL (mr.subinventory_code, '1') =
64: NVL (p_subinventory_code, '1')

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

126: FOR get_rec IN cur_reservable_ings LOOP
127: l_mtl_dtl_rec := get_rec;
128:
129: IF (NVL (p_timefence, 0) <>
130: NVL (gme_common_pvt.g_reservation_timefence, 0) ) THEN
131: --Pawan Kumar as done in create_material_reservations
132: -- for bug 5139060
133: -- Use Suggestions mode (S) in the called by param to assess the total
134: -- unreserved quantity

Line 135: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => l_mtl_dtl_rec

131: --Pawan Kumar as done in create_material_reservations
132: -- for bug 5139060
133: -- Use Suggestions mode (S) in the called by param to assess the total
134: -- unreserved quantity
135: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => l_mtl_dtl_rec
136: ,p_called_by => 'S'
137: ,x_open_qty => l_resv_qty
138: ,x_return_status => l_return_status);
139:

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

241: --Bug#4604943 End
242: l_rsv_rec.requirement_date := p_matl_dtl_rec.material_requirement_date;
243: l_rsv_rec.organization_id := p_matl_dtl_rec.organization_id;
244: l_rsv_rec.inventory_item_id := p_matl_dtl_rec.inventory_item_id;
245: l_rsv_rec.demand_source_type_id := gme_common_pvt.g_txn_source_type;
246: l_rsv_rec.demand_source_header_id := p_matl_dtl_rec.batch_id;
247: l_rsv_rec.demand_source_line_id := p_matl_dtl_rec.material_detail_id;
248: l_rsv_rec.reservation_uom_code := NVL (p_resv_um, p_matl_dtl_rec.dtl_um);
249: l_rsv_rec.reservation_quantity :=

Line 372: ,x_reservations_tbl OUT NOCOPY gme_common_pvt.reservations_tab)

368: ,p_batch_id IN NUMBER
369: ,p_material_detail_id IN NUMBER
370: ,p_dispense_ind IN VARCHAR2
371: ,x_return_status OUT NOCOPY VARCHAR2
372: ,x_reservations_tbl OUT NOCOPY gme_common_pvt.reservations_tab)
373: IS
374: l_api_name CONSTANT VARCHAR2 (30) := 'get_material_reservations';
375: l_msg_count NUMBER;
376: l_msg_data VARCHAR2(32767);

Line 386: AND demand_source_type_id = gme_common_pvt.g_txn_source_type

382: IS
383: SELECT mr.*
384: FROM mtl_reservations mr
385: WHERE organization_id = v_org_id
386: AND demand_source_type_id = gme_common_pvt.g_txn_source_type
387: AND demand_source_header_id = v_batch_id
388: AND demand_source_line_id = v_material_detail_id
389: AND NOT EXISTS (SELECT 1
390: FROM mtl_material_transactions_temp

Line 467: gme_common_pvt.eff_locator_control

463: IF (p_reservation_rec.locator_id IS NOT NULL) THEN
464: x_reservation_type := 1; -- its DLR
465: ELSE
466: l_eff_locator_control :=
467: gme_common_pvt.eff_locator_control
468: (p_organization_id => p_reservation_rec.organization_id
469: ,p_org_control => gme_common_pvt.g_org_locator_control
470: ,p_subinventory => p_reservation_rec.subinventory_code
471: ,p_item_control => p_item_location_control

Line 469: ,p_org_control => gme_common_pvt.g_org_locator_control

465: ELSE
466: l_eff_locator_control :=
467: gme_common_pvt.eff_locator_control
468: (p_organization_id => p_reservation_rec.organization_id
469: ,p_org_control => gme_common_pvt.g_org_locator_control
470: ,p_subinventory => p_reservation_rec.subinventory_code
471: ,p_item_control => p_item_location_control
472: ,p_item_loc_restrict => p_item_restrict_locators
473: ,p_action => gme_common_pvt.g_ing_issue_txn_action);

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

469: ,p_org_control => gme_common_pvt.g_org_locator_control
470: ,p_subinventory => p_reservation_rec.subinventory_code
471: ,p_item_control => p_item_location_control
472: ,p_item_loc_restrict => p_item_restrict_locators
473: ,p_action => gme_common_pvt.g_ing_issue_txn_action);
474:
475: IF (l_eff_locator_control = 1) THEN
476: x_reservation_type := 1; -- its DLR
477: ELSE

Line 542: gme_common_pvt.eff_locator_control

538: END IF;
539: END IF;
540: /* Bug 5441643 Added NVL condition for location control code*/
541: l_eff_locator_control :=
542: gme_common_pvt.eff_locator_control
543: (p_organization_id => x_reservation_rec.organization_id
544: ,p_org_control => gme_common_pvt.g_org_locator_control
545: ,p_subinventory => x_reservation_rec.subinventory_code
546: ,p_item_control => NVL(p_item_rec.location_control_code,1)

Line 544: ,p_org_control => gme_common_pvt.g_org_locator_control

540: /* Bug 5441643 Added NVL condition for location control code*/
541: l_eff_locator_control :=
542: gme_common_pvt.eff_locator_control
543: (p_organization_id => x_reservation_rec.organization_id
544: ,p_org_control => gme_common_pvt.g_org_locator_control
545: ,p_subinventory => x_reservation_rec.subinventory_code
546: ,p_item_control => NVL(p_item_rec.location_control_code,1)
547: ,p_item_loc_restrict => p_item_rec.restrict_locators_code
548: ,p_action => gme_common_pvt.g_ing_issue_txn_action);

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

544: ,p_org_control => gme_common_pvt.g_org_locator_control
545: ,p_subinventory => x_reservation_rec.subinventory_code
546: ,p_item_control => NVL(p_item_rec.location_control_code,1)
547: ,p_item_loc_restrict => p_item_rec.restrict_locators_code
548: ,p_action => gme_common_pvt.g_ing_issue_txn_action);
549:
550: IF (l_eff_locator_control <> 1 AND p_reservation_rec.locator_id IS NULL) THEN
551: /* Bug 5441643 Added NVL condition for location control code*/
552: IF (NVL(p_item_rec.location_control_code,1) <> 1) THEN

Line 598: AND d.line_type = gme_common_pvt.g_line_type_ing

594: SELECT d.material_detail_id, d.batch_id, d.organization_id
595: FROM gme_material_details d, mtl_system_items_b i
596: WHERE d.organization_id = p_organization_id
597: AND d.batch_id = p_batch_id
598: AND d.line_type = gme_common_pvt.g_line_type_ing
599: AND i.organization_id = d.organization_id
600: AND i.inventory_item_id = d.inventory_item_id
601: AND i.reservable_type = 1;
602: BEGIN

Line 650: l_rsv_tbl gme_common_pvt.reservations_tab;

646: ,x_return_status OUT NOCOPY VARCHAR2)
647: IS
648: l_api_name CONSTANT VARCHAR2 (30) := 'delete_material_reservations';
649: l_return_status VARCHAR2 (1);
650: l_rsv_tbl gme_common_pvt.reservations_tab;
651: del_resvn_error EXCEPTION;
652: BEGIN
653: IF g_debug <= gme_debug.g_log_procedure THEN
654: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

Line 807: ,PRECISION => gme_common_pvt.g_precision

803: inv_convert.inv_um_convert
804: (item_id => p_reservation_rec.inventory_item_id
805: ,lot_number => p_reservation_rec.lot_number
806: ,organization_id => p_reservation_rec.organization_id
807: ,PRECISION => gme_common_pvt.g_precision
808: ,from_quantity => p_reservation_rec.reservation_quantity
809: ,from_unit => p_reservation_rec.reservation_uom_code
810: ,to_unit => p_uom_code
811: ,from_name => NULL

Line 859: l_resv_tbl gme_common_pvt.reservations_tab;

855: ,x_return_status OUT NOCOPY VARCHAR2)
856: IS
857: l_api_name CONSTANT VARCHAR2 (30) := 'get_reserved_qty';
858: l_mtl_dtl_rec gme_material_details%ROWTYPE;
859: l_resv_tbl gme_common_pvt.reservations_tab;
860: l_temp_qty NUMBER;
861: l_return_status VARCHAR2 (1);
862:
863: CURSOR cur_get_resvns

Line 867: WHERE mr.demand_source_type_id = gme_common_pvt.g_txn_source_type

863: CURSOR cur_get_resvns
864: IS
865: SELECT mr.*
866: FROM mtl_reservations mr
867: WHERE mr.demand_source_type_id = gme_common_pvt.g_txn_source_type
868: AND mr.demand_source_header_id = l_mtl_dtl_rec.batch_id
869: AND mr.demand_source_line_id = l_mtl_dtl_rec.material_detail_id
870: AND ( (p_supply_sub_only = fnd_api.g_false)
871: OR (mr.subinventory_code = l_mtl_dtl_rec.subinventory) )

Line 1245: gme_common_pvt.g_txn_source_type

1241: SELECT 1
1242: FROM mtl_reservations mr
1243: WHERE organization_id = v_org_id
1244: AND demand_source_type_id =
1245: gme_common_pvt.g_txn_source_type
1246: AND demand_source_header_id = v_batch_id
1247: AND demand_source_line_id = v_material_detail_id
1248: AND NOT EXISTS (
1249: SELECT 1

Line 1339: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'

1335:
1336: IF cur_fetch_item%NOTFOUND THEN
1337: CLOSE cur_fetch_item;
1338:
1339: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
1340: ,'TABLE_NAME'
1341: ,'MTL_SYSTEM_ITEMS');
1342:
1343: IF g_debug <= gme_debug.g_log_statement THEN

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

1355: CLOSE cur_fetch_item;
1356:
1357: /* Ensure the item is transaction enabled */
1358: IF l_item_rec.mtl_transactions_enabled_flag <> 'Y' THEN
1359: gme_common_pvt.log_message ('GME_ITEM_NOT_TRANSACTABLE');
1360: RAISE validation_error;
1361: END IF;
1362:
1363: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

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

1359: gme_common_pvt.log_message ('GME_ITEM_NOT_TRANSACTABLE');
1360: RAISE validation_error;
1361: END IF;
1362:
1363: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
1364: /* Verify that the reservation is fully detailed */
1365: l_rsv_type :=
1366: gme_reservations_pvt.reservation_fully_specified
1367: (p_reservation_rec => p_reservation_rec

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

1377: || TO_CHAR (l_rsv_type) );
1378: END IF;
1379:
1380: IF l_rsv_type = -1 THEN
1381: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');
1382: RAISE error_unexpected;
1383: END IF;
1384:
1385: IF l_rsv_type IN (0, 2) THEN -- Not fully detailed

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

1401: || x_return_status);
1402: END IF;
1403:
1404: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1405: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');
1406: RAISE detail_reservation_error;
1407: END IF;
1408: ELSE -- fully detailed
1409: l_reservation_rec := p_reservation_rec;

Line 1438: ,PRECISION => gme_common_pvt.g_precision

1434: inv_convert.inv_um_convert
1435: (item_id => l_reservation_rec.inventory_item_id
1436: ,organization_id => l_reservation_rec.organization_id
1437: ,lot_number => l_reservation_rec.lot_number
1438: ,PRECISION => gme_common_pvt.g_precision
1439: ,from_quantity => l_reservation_rec.primary_reservation_quantity
1440: ,from_unit => l_reservation_rec.primary_uom_code
1441: ,to_unit => p_material_details_rec.dtl_um
1442: ,from_name => NULL

Line 1515: gme_common_pvt.count_and_get (x_count => x_message_count

1511: END IF;
1512: EXCEPTION
1513: WHEN error_unexpected OR uom_conversion_failure OR fetch_error OR validation_error OR create_transaction_error OR detail_reservation_error THEN
1514: x_return_status := fnd_api.g_ret_sts_error;
1515: gme_common_pvt.count_and_get (x_count => x_message_count
1516: ,p_encoded => fnd_api.g_false
1517: ,x_data => x_message_list);
1518: WHEN OTHERS THEN
1519: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 1529: gme_common_pvt.count_and_get (x_count => x_message_count

1525: || SQLERRM);
1526: END IF;
1527:
1528: x_return_status := fnd_api.g_ret_sts_unexp_error;
1529: gme_common_pvt.count_and_get (x_count => x_message_count
1530: ,p_encoded => fnd_api.g_false
1531: ,x_data => x_message_list);
1532: END convert_dtl_reservation;
1533:

Line 1541: l_rsv_tbl gme_common_pvt.reservations_tab;

1537: IS
1538: l_api_name CONSTANT VARCHAR2 (30) := 'auto_detail_line';
1539: l_item_rec mtl_system_items_b%ROWTYPE;
1540: l_rsv_rec mtl_reservations%ROWTYPE;
1541: l_rsv_tbl gme_common_pvt.reservations_tab;
1542: l_reservations_tbl inv_reservation_global.mtl_reservation_tbl_type;
1543: l_rsv_type NUMBER;
1544: l_open_qty NUMBER;
1545: l_msg_count NUMBER;

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

1598: END IF;
1599: -- Pawan kumar made changes for 5294184
1600:
1601: IF NOT (p_material_details_rec.material_requirement_date < SYSDATE +
1602: NVL(gme_common_pvt.g_rule_based_resv_horizon,10000)) THEN
1603: gme_common_pvt.log_message ('GME_NO_ING_TIME');
1604: RETURN ;
1605: END IF;
1606:

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

1599: -- Pawan kumar made changes for 5294184
1600:
1601: IF NOT (p_material_details_rec.material_requirement_date < SYSDATE +
1602: NVL(gme_common_pvt.g_rule_based_resv_horizon,10000)) THEN
1603: gme_common_pvt.log_message ('GME_NO_ING_TIME');
1604: RETURN ;
1605: END IF;
1606:
1607: --Bug#4604943 End

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

1615:
1616: IF cur_get_item_rec%NOTFOUND THEN
1617: CLOSE cur_get_item_rec;
1618:
1619: gme_common_pvt.log_message ('PM_INVALID_ITEM');
1620:
1621: IF g_debug <= gme_debug.g_log_statement THEN
1622: gme_debug.put_line ( g_pkg_name
1623: || '.'

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

1678: || TO_CHAR (l_rsv_type) );
1679: END IF;
1680:
1681: IF l_rsv_type = -1 THEN
1682: gme_common_pvt.log_message ('GME_RSV_DETAIL_REQUIRED');
1683: RAISE error_unexpected;
1684: END IF;
1685:
1686: IF l_rsv_type = 0 /*HLT*/ THEN

Line 1710: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => p_material_details_rec

1706: l_count := l_count + 1;
1707: END LOOP;
1708:
1709: /* Assess the open quantity */
1710: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => p_material_details_rec
1711: ,p_called_by => 'R'
1712: ,x_open_qty => l_open_qty
1713: ,x_return_status => x_return_status);
1714:

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

1772:
1773: IF cur_get_mo_rec%NOTFOUND THEN
1774: CLOSE cur_get_mo_rec;
1775:
1776: gme_common_pvt.log_message ('GME_NO_DATA_FOUND','TABLE_NAME','MTL_TXN_REQUEST_LINES');
1777:
1778: IF g_debug <= gme_debug.g_log_statement THEN
1779: gme_debug.put_line ( g_pkg_name
1780: || '.'

Line 1926: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => p_material_details_rec

1922: END IF;
1923:
1924: /* Create a High Level Reservation for any outstanding open quantity */
1925: /* start by determining what the outstanding open quantity is */
1926: gme_common_pvt.get_open_qty (p_mtl_dtl_rec => p_material_details_rec
1927: ,p_called_by => 'R'
1928: ,x_open_qty => l_open_qty
1929: ,x_return_status => x_return_status);
1930:

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

2020: l_found NUMBER := 0;
2021: l_api_name CONSTANT VARCHAR2(30) := 'auto_detail_batch' ;
2022:
2023: auto_detail_failure EXCEPTION;
2024: -- Pawan kumar made changes for 5294184- add gme_common_pvt.g_rule_based_resv_horizon
2025: /* Retrieve Ingredient rows */
2026: CURSOR cur_get_reservable_ings
2027: IS
2028: SELECT d.*

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

2028: SELECT d.*
2029: FROM gme_material_details d,mtl_system_items_b i
2030: WHERE d.batch_id = p_batch_rec.batch_id
2031: AND d.line_type = -1
2032: AND d.material_requirement_date < SYSDATE + NVL(gme_common_pvt.g_rule_based_resv_horizon,p_timefence)
2033: AND i. inventory_item_id = d.inventory_item_id
2034: AND i.organization_id = d.organization_id
2035: AND i.reservable_type = 1
2036: ORDER BY d.line_no;

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

2042:
2043: x_return_status := FND_API.G_RET_STS_SUCCESS;
2044:
2045: IF g_debug <= gme_debug.g_log_statement THEN
2046: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'gme_common_pvt.g_rule_based_resv_horizon
2047: is '||gme_common_pvt.g_rule_based_resv_horizon);
2048: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Retrieve Material Detail lines for batch_id '||p_batch_rec.batch_id);
2049: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Timefence is '||p_timefence);
2050: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch Status is '||p_batch_rec.batch_status);

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

2043: x_return_status := FND_API.G_RET_STS_SUCCESS;
2044:
2045: IF g_debug <= gme_debug.g_log_statement THEN
2046: gme_debug.put_line(g_pkg_name||'.'||l_api_name||'gme_common_pvt.g_rule_based_resv_horizon
2047: is '||gme_common_pvt.g_rule_based_resv_horizon);
2048: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Retrieve Material Detail lines for batch_id '||p_batch_rec.batch_id);
2049: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Timefence is '||p_timefence);
2050: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch Status is '||p_batch_rec.batch_status);
2051:

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

2082: --END IF;
2083: END LOOP;
2084: -- Pawan kumar made changes for 5294184
2085: IF l_found = 0 THEN
2086: gme_common_pvt.log_message ('GME_NO_ING_TIME');
2087: END IF;
2088: IF g_debug <= gme_debug.g_log_statement THEN
2089: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
2090: END IF;

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

2127: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec, l_batch_header_rec)) THEN
2128: RAISE fetch_failure;
2129: END IF;
2130:
2131: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
2132: --pending batch just return
2133: IF g_debug <= gme_debug.g_log_statement THEN
2134: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is Pending status');
2135: END IF;

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

2133: IF g_debug <= gme_debug.g_log_statement THEN
2134: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is Pending status');
2135: END IF;
2136: RETURN;
2137: ELSIF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN
2138: /* In WIP Bathes, do not create reservations for automatic and automatic by step if assoc step is not released*/
2139: IF p_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN
2140: IF g_debug <= gme_debug.g_log_statement THEN
2141: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is manual/incremental');

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

2135: END IF;
2136: RETURN;
2137: ELSIF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip THEN
2138: /* In WIP Bathes, do not create reservations for automatic and automatic by step if assoc step is not released*/
2139: IF p_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_manual_release,gme_common_pvt.g_mtl_incremental_release) THEN
2140: IF g_debug <= gme_debug.g_log_statement THEN
2141: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is manual/incremental');
2142: END IF;
2143: RETURN;

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

2140: IF g_debug <= gme_debug.g_log_statement THEN
2141: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is manual/incremental');
2142: END IF;
2143: RETURN;
2144: ELSIF p_material_detail_rec.release_type = gme_common_pvt.g_mtl_autobystep_release THEN
2145: /* if automatic by step then check step status */
2146: IF g_debug <= gme_debug.g_log_statement THEN
2147: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is Autoby step');
2148: END IF;

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

2145: /* if automatic by step then check step status */
2146: IF g_debug <= gme_debug.g_log_statement THEN
2147: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is Autoby step');
2148: END IF;
2149: IF NOT gme_common_pvt.get_assoc_step(p_material_detail_rec.material_detail_id,l_step_id,l_step_status) THEN
2150: RAISE demand_line_error;
2151: ELSIF l_step_id IS NOT NULL AND NVL(l_step_status,-1) <> gme_common_pvt.g_step_pending THEN
2152: RAISE demand_line_error;
2153: END IF;

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

2147: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' Batch is in WIP and material line is Autoby step');
2148: END IF;
2149: IF NOT gme_common_pvt.get_assoc_step(p_material_detail_rec.material_detail_id,l_step_id,l_step_status) THEN
2150: RAISE demand_line_error;
2151: ELSIF l_step_id IS NOT NULL AND NVL(l_step_status,-1) <> gme_common_pvt.g_step_pending THEN
2152: RAISE demand_line_error;
2153: END IF;
2154: ELSE
2155: IF g_debug <= gme_debug.g_log_statement THEN

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

2167: EXCEPTION
2168: WHEN fetch_failure THEN
2169: x_return_status := fnd_api.g_ret_sts_error;
2170: WHEN demand_line_error THEN
2171: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
2172: x_return_status := fnd_api.g_ret_sts_error;
2173: WHEN batch_status_error THEN
2174: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS','PROCESS','RESERVATIONS');
2175: x_return_status := fnd_api.g_ret_sts_error;

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

2170: WHEN demand_line_error THEN
2171: gme_common_pvt.log_message('GME_INVALID_DEMAND_LINE');
2172: x_return_status := fnd_api.g_ret_sts_error;
2173: WHEN batch_status_error THEN
2174: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS','PROCESS','RESERVATIONS');
2175: x_return_status := fnd_api.g_ret_sts_error;
2176: WHEN OTHERS THEN
2177: IF g_debug <= gme_debug.g_log_unexpected THEN
2178: gme_debug.put_line ( 'When others exception in '