DBA Data[Home] [Help]

APPS.INV_PICK_RELEASE_PUB dependencies on INV_CACHE

Line 14: -- stored for the current pick release batch (refers to INV_CACHE.wpb_rec.allocation_method)

10: g_organization_id NUMBER;
11: g_print_mode VARCHAR2(1);
12:
13: -- Bug# 4258360: Added these global constants which refer to the allocation method
14: -- stored for the current pick release batch (refers to INV_CACHE.wpb_rec.allocation_method)
15: g_inventory_only CONSTANT VARCHAR2(1) := 'I';
16: g_crossdock_only CONSTANT VARCHAR2(1) := 'C';
17: g_prioritize_inventory CONSTANT VARCHAR2(1) := 'N';
18: g_prioritize_crossdock CONSTANT VARCHAR2(1) := 'X';

Line 977: l_return_value := inv_cache.set_pick_release(TRUE); --Added for bug3237702

973: print_debug('Inside Pick_Release', 'INV_Pick_Release_Pub.Pick_Release');
974: print_debug('p_dynamic_replenishment :'||p_dynamic_replenishment, 'INV_Pick_Release_Pub.Pick_Release');
975: End If;
976:
977: l_return_value := inv_cache.set_pick_release(TRUE); --Added for bug3237702
978: inv_log_util.g_maintain_log_profile := TRUE; -- Bug 5558315 - duplication so no dependency btw inv_cache and inv_log
979:
980: SAVEPOINT Pick_Release_PUB;
981:

Line 978: inv_log_util.g_maintain_log_profile := TRUE; -- Bug 5558315 - duplication so no dependency btw inv_cache and inv_log

974: print_debug('p_dynamic_replenishment :'||p_dynamic_replenishment, 'INV_Pick_Release_Pub.Pick_Release');
975: End If;
976:
977: l_return_value := inv_cache.set_pick_release(TRUE); --Added for bug3237702
978: inv_log_util.g_maintain_log_profile := TRUE; -- Bug 5558315 - duplication so no dependency btw inv_cache and inv_log
979:
980: SAVEPOINT Pick_Release_PUB;
981:
982: -- Standard Call to check for call compatibility

Line 1018: inv_cache.mo_transaction_date := p_mo_transact_date;

1014: END IF;
1015:
1016: -- Set move order transaction date if passed in as not NULL
1017: IF p_mo_transact_date <> fnd_api.g_miss_date THEN
1018: inv_cache.mo_transaction_date := p_mo_transact_date;
1019: END IF;
1020:
1021: -- Validate that all move order lines are from the same org, that all lines
1022: -- have a status of pre-approved(7) or approved(3),and that all of the move

Line 1073: l_return_value := INV_CACHE.set_mtrh_rec(l_mo_line.header_Id);

1069: END IF;
1070:
1071: IF l_mo_line.header_id <> l_current_header_id OR
1072: l_current_header_id IS NULL THEN
1073: l_return_value := INV_CACHE.set_mtrh_rec(l_mo_line.header_Id);
1074: If NOT l_return_value Then
1075: If is_debug then
1076: print_debug('Error setting cache for move order header ',
1077: 'INV_Pick_Release_Pub.Pick_Release');

Line 1081: l_mo_type := INV_CACHE.mtrh_rec.move_order_type;

1077: 'INV_Pick_Release_Pub.Pick_Release');
1078: End If;
1079: RAISE fnd_api.g_exc_unexpected_error;
1080: End If;
1081: l_mo_type := INV_CACHE.mtrh_rec.move_order_type;
1082: l_mo_number := INV_CACHE.mtrh_rec.request_number;
1083: l_current_header_id := l_mo_line.header_id;
1084: END IF;
1085:

Line 1082: l_mo_number := INV_CACHE.mtrh_rec.request_number;

1078: End If;
1079: RAISE fnd_api.g_exc_unexpected_error;
1080: End If;
1081: l_mo_type := INV_CACHE.mtrh_rec.move_order_type;
1082: l_mo_number := INV_CACHE.mtrh_rec.request_number;
1083: l_current_header_id := l_mo_line.header_id;
1084: END IF;
1085:
1086: IF l_mo_type <> 3 THEN

Line 1296: l_return_value := INV_CACHE.set_mso_rec(l_oe_header_id);

1292: -- FND_MSG_PUB.Add;
1293: -- RAISE fnd_api.g_exc_unexpected_error;
1294: END;
1295:
1296: l_return_value := INV_CACHE.set_mso_rec(l_oe_header_id);
1297: IF NOT l_return_value THEN
1298: l_mso_header_id :=-9999;
1299: If is_debug then
1300: print_debug('No Mtl_Sales_Order ID found for oe header',

Line 1304: l_mso_header_id := INV_CACHE.mso_rec.sales_order_id;

1300: print_debug('No Mtl_Sales_Order ID found for oe header',
1301: 'Inv_Pick_Release_PUB.Process_Line');
1302: End If;
1303: ELSE
1304: l_mso_header_id := INV_CACHE.mso_rec.sales_order_id;
1305: END IF;
1306:
1307: BEGIN
1308: select t.transaction_source_type_id

Line 1383: l_return_value := INV_CACHE.set_wms_installed(l_organization_id);

1379: -- now sort the move order line by the header_id
1380: --BENCHMARK - check cache
1381: --l_wms_installed := inv_install.adv_inv_installed(
1382: -- l_mo_line_tbl(l_line_index).organization_id);
1383: l_return_value := INV_CACHE.set_wms_installed(l_organization_id);
1384: If NOT l_return_value Then
1385: If is_debug then
1386: print_debug('Error setting cache for wms installed',
1387: 'INV_Pick_Release_Pub.Pick_Release');

Line 1391: l_wms_installed := INV_CACHE.wms_installed;

1387: 'INV_Pick_Release_Pub.Pick_Release');
1388: End If;
1389: RAISE fnd_api.g_exc_unexpected_error;
1390: End If;
1391: l_wms_installed := INV_CACHE.wms_installed;
1392: --sort only necessary if wms installed and multiple headers in the
1393: -- line_tbl
1394: IF l_wms_installed and l_multiple_headers THEN
1395: sort(l_mo_line_tbl, l_mo_line_tbl.FIRST, l_mo_line_tbl.LAST);

Line 1414: l_return_value := INV_CACHE.set_org_rec(l_organization_id);

1410: l_auto_pick_confirm := p_auto_pick_confirm;
1411: END IF;
1412: ELSE
1413: -- Retrieve the org-level parameter for auto-pick confirm
1414: l_return_value := INV_CACHE.set_org_rec(l_organization_id);
1415: If NOT l_return_value Then
1416: If is_debug then
1417: print_debug('Error setting cache for organization',
1418: 'INV_Pick_Release_Pub.Pick_Release');

Line 1422: l_auto_pick_confirm:= INV_CACHE.org_rec.mo_pick_confirm_required;

1418: 'INV_Pick_Release_Pub.Pick_Release');
1419: End If;
1420: RAISE fnd_api.g_exc_unexpected_error;
1421: End If;
1422: l_auto_pick_confirm:= INV_CACHE.org_rec.mo_pick_confirm_required;
1423: END IF;
1424:
1425: -- Determine what printing mode to use when pick releasing lines.
1426: IF g_organization_id IS NOT NULL AND

Line 1486: -- order header record should be cached by now in INV_CACHE. 'Batch' refers to

1482:
1483: -- Bug# 4258360: Query for and cache the picking batch record.
1484: -- Even if multiple move order headers are created for this batch (not likely),
1485: -- they should all refer to the same picking batch record. A value for the move
1486: -- order header record should be cached by now in INV_CACHE. 'Batch' refers to
1487: -- the set of MOL's passed into the pick release API and not the entire set of pick
1488: -- release lines.
1489: -- {{
1490: -- Pick Release a batch such that you have orders from multiple

Line 1494: IF (NOT INV_CACHE.set_wpb_rec

1490: -- Pick Release a batch such that you have orders from multiple
1491: -- organizations. This will cause multiple MOH to be created.
1492: -- If successfully pick released, then no bug.
1493: -- }}
1494: IF (NOT INV_CACHE.set_wpb_rec
1495: (p_batch_id => NULL,
1496: p_request_number => INV_CACHE.mtrh_rec.request_number)) THEN
1497: IF (is_debug) THEN
1498: print_debug('Error setting cache for WSH picking batch record',

Line 1496: p_request_number => INV_CACHE.mtrh_rec.request_number)) THEN

1492: -- If successfully pick released, then no bug.
1493: -- }}
1494: IF (NOT INV_CACHE.set_wpb_rec
1495: (p_batch_id => NULL,
1496: p_request_number => INV_CACHE.mtrh_rec.request_number)) THEN
1497: IF (is_debug) THEN
1498: print_debug('Error setting cache for WSH picking batch record',
1499: 'INV_Pick_Release_Pub.Pick_Release');
1500: END IF;

Line 1504: l_allocation_method := NVL(INV_CACHE.wpb_rec.allocation_method, g_inventory_only);

1500: END IF;
1501: RAISE fnd_api.g_exc_unexpected_error;
1502: END IF;
1503: -- Set the allocation method variable
1504: l_allocation_method := NVL(INV_CACHE.wpb_rec.allocation_method, g_inventory_only);
1505:
1506: -- Bug# 4258360: Validate that p_trolin_delivery_ids and p_del_detail_id tables have the
1507: -- same number of entries. There should be a one to one relationship between the tables
1508: -- and the indices used. If NULL tables are passed, the counts should still match (0 = 0).

Line 1565: l_return_value := INV_CACHE.set_mtrh_rec(l_mo_line.header_id);

1561: IF (l_mo_line.return_status <> FND_API.G_RET_STS_UNEXP_ERROR and
1562: l_mo_line.return_status <> FND_API.G_RET_STS_ERROR) THEN
1563: -- First retrieve the new Grouping Rule ID if necessary.
1564: IF l_get_header_rule = 1 THEN
1565: l_return_value := INV_CACHE.set_mtrh_rec(l_mo_line.header_id);
1566: If NOT l_return_value Then
1567: If is_debug then
1568: print_debug('Error setting cache for move order header ',
1569: 'INV_Pick_Release_Pub.Pick_Release');

Line 1573: l_grouping_rule_id := INV_CACHE.mtrh_rec.grouping_rule_id;

1569: 'INV_Pick_Release_Pub.Pick_Release');
1570: End If;
1571: RAISE fnd_api.g_exc_unexpected_error;
1572: End If;
1573: l_grouping_rule_id := INV_CACHE.mtrh_rec.grouping_rule_id;
1574:
1575: -- If the header did not have a grouping rule ID, retrieve it from
1576: -- the organization-level default.
1577: IF l_grouping_rule_id IS NULL THEN

Line 1934: l_return_value := INV_CACHE.set_wdd_rec(l_mo_line.line_id);

1930: print_debug('Backorder mo line:' || l_mo_line.line_id,
1931: 'Inv_Pick_Release_Pub.Pick_Release');
1932: End If;
1933:
1934: l_return_value := INV_CACHE.set_wdd_rec(l_mo_line.line_id);
1935: If NOT l_return_value Then
1936: If is_debug then
1937: print_debug('Error setting cache for delivery line',
1938: 'INV_Pick_Release_Pub.Pick_Release');

Line 1942: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;

1938: 'INV_Pick_Release_Pub.Pick_Release');
1939: End If;
1940: RAISE fnd_api.g_exc_unexpected_error;
1941: End If;
1942: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
1943: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
1944: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
1945: l_released_status := INV_CACHE.wdd_rec.released_status;
1946:

Line 1943: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;

1939: End If;
1940: RAISE fnd_api.g_exc_unexpected_error;
1941: End If;
1942: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
1943: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
1944: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
1945: l_released_status := INV_CACHE.wdd_rec.released_status;
1946:
1947:

Line 1944: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;

1940: RAISE fnd_api.g_exc_unexpected_error;
1941: End If;
1942: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
1943: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
1944: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
1945: l_released_status := INV_CACHE.wdd_rec.released_status;
1946:
1947:
1948: --Call Update_Shipping_Attributes to backorder detail line

Line 1945: l_released_status := INV_CACHE.wdd_rec.released_status;

1941: End If;
1942: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
1943: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
1944: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
1945: l_released_status := INV_CACHE.wdd_rec.released_status;
1946:
1947:
1948: --Call Update_Shipping_Attributes to backorder detail line
1949: l_shipping_attr(1).source_header_id := l_source_header_id;

Line 2289: l_return_value := INV_CACHE.set_wdd_rec(l_mo_line.line_id);

2285: print_debug('New line qty: ' || l_new_line_quantity,
2286: 'Inv_Pick_Release_Pub.Pick_Release');
2287: End If;
2288:
2289: l_return_value := INV_CACHE.set_wdd_rec(l_mo_line.line_id);
2290: If NOT l_return_value Then
2291: If is_debug then
2292: print_debug('Error setting cache for delivery line',
2293: 'INV_Pick_Release_Pub.Pick_Release');

Line 2297: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;

2293: 'INV_Pick_Release_Pub.Pick_Release');
2294: End If;
2295: RAISE fnd_api.g_exc_unexpected_error;
2296: End If;
2297: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
2298: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
2299: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
2300: l_released_status := INV_CACHE.wdd_rec.released_status;
2301:

Line 2298: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;

2294: End If;
2295: RAISE fnd_api.g_exc_unexpected_error;
2296: End If;
2297: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
2298: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
2299: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
2300: l_released_status := INV_CACHE.wdd_rec.released_status;
2301:
2302: --Call Update_Shipping_Attributes to backorder detail line

Line 2299: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;

2295: RAISE fnd_api.g_exc_unexpected_error;
2296: End If;
2297: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
2298: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
2299: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
2300: l_released_status := INV_CACHE.wdd_rec.released_status;
2301:
2302: --Call Update_Shipping_Attributes to backorder detail line
2303: l_shipping_attr(1).source_header_id := l_source_header_id;

Line 2300: l_released_status := INV_CACHE.wdd_rec.released_status;

2296: End If;
2297: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
2298: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
2299: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
2300: l_released_status := INV_CACHE.wdd_rec.released_status;
2301:
2302: --Call Update_Shipping_Attributes to backorder detail line
2303: l_shipping_attr(1).source_header_id := l_source_header_id;
2304: l_shipping_attr(1).source_line_id := l_source_line_id;

Line 2481: l_return_value := INV_CACHE.set_wdd_rec(l_mo_line.line_id);

2477: -- Move order line is not fully allocated and it is not part of a
2478: -- shipset or ship model
2479:
2480: -- Retrieve the WDD record corresponding to the current MOL
2481: l_return_value := INV_CACHE.set_wdd_rec(l_mo_line.line_id);
2482: IF (NOT l_return_value) THEN
2483: IF (is_debug) THEN
2484: print_debug('Error setting cache for delivery line',
2485: 'INV_Pick_Release_Pub.Pick_Release');

Line 2489: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;

2485: 'INV_Pick_Release_Pub.Pick_Release');
2486: END IF;
2487: RAISE fnd_api.g_exc_unexpected_error;
2488: END IF;
2489: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
2490: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
2491: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
2492: l_released_status := INV_CACHE.wdd_rec.released_status;
2493:

Line 2490: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;

2486: END IF;
2487: RAISE fnd_api.g_exc_unexpected_error;
2488: END IF;
2489: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
2490: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
2491: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
2492: l_released_status := INV_CACHE.wdd_rec.released_status;
2493:
2494: -- Bug# 4258360: If allocation mode = N (Prioritize Inventory), instead of simply

Line 2491: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;

2487: RAISE fnd_api.g_exc_unexpected_error;
2488: END IF;
2489: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
2490: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
2491: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
2492: l_released_status := INV_CACHE.wdd_rec.released_status;
2493:
2494: -- Bug# 4258360: If allocation mode = N (Prioritize Inventory), instead of simply
2495: -- backordering the unallocated quantity on the WDD record, we need to perform

Line 2492: l_released_status := INV_CACHE.wdd_rec.released_status;

2488: END IF;
2489: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
2490: l_source_header_id := INV_CACHE.wdd_rec.source_header_id;
2491: l_source_line_id := INV_CACHE.wdd_rec.source_line_id;
2492: l_released_status := INV_CACHE.wdd_rec.released_status;
2493:
2494: -- Bug# 4258360: If allocation mode = N (Prioritize Inventory), instead of simply
2495: -- backordering the unallocated quantity on the WDD record, we need to perform
2496: -- new logic to support crossdocking. The WDD record needs to be split or updated

Line 2821: IF (NOT INV_CACHE.set_wdd_rec(l_mo_line.line_id)) THEN

2817: -- x-docking.
2818: -- }}
2819: IF (l_allocation_method = g_prioritize_inventory) THEN
2820: -- Retrieve the WDD record associated with the current MOL
2821: IF (NOT INV_CACHE.set_wdd_rec(l_mo_line.line_id)) THEN
2822: IF (is_debug) THEN
2823: print_debug('Error setting cache for WDD delivery line',
2824: 'INV_Pick_Release_Pub.Pick_Release');
2825: END IF;

Line 2828: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;

2824: 'INV_Pick_Release_Pub.Pick_Release');
2825: END IF;
2826: RAISE fnd_api.g_exc_unexpected_error;
2827: END IF;
2828: l_delivery_detail_id := INV_CACHE.wdd_rec.delivery_detail_id;
2829:
2830: -- Update WDD record in release table with a released status of 'S'
2831: IF (p_wsh_release_table.COUNT > 0) THEN
2832: p_wsh_release_table(l_wdd_index_tbl(l_delivery_detail_id)).released_status := 'S';

Line 3279: p_batch_id => INV_CACHE.wpb_rec.batch_id,

3275: p_commit => fnd_api.g_false,
3276: x_return_status => l_api_return_status,
3277: x_msg_count => x_msg_count,
3278: x_msg_data => x_msg_data,
3279: p_batch_id => INV_CACHE.wpb_rec.batch_id,
3280: p_wsh_release_table => p_wsh_release_table,
3281: p_trolin_delivery_ids => p_trolin_delivery_ids,
3282: p_del_detail_id => p_del_detail_id);
3283:

Line 3315: inv_cache.mo_transaction_date := NULL;

3311: print_Debug('x_return_status is ' || x_return_status,
3312: 'Inv_Pick_Release_Pub.Pick_Release');
3313: END IF;
3314:
3315: inv_cache.mo_transaction_date := NULL;
3316: l_return_value := inv_cache.set_pick_release(FALSE); --Added bug3237702
3317: inv_log_util.g_maintain_log_profile := FALSE;
3318:
3319: EXCEPTION

Line 3316: l_return_value := inv_cache.set_pick_release(FALSE); --Added bug3237702

3312: 'Inv_Pick_Release_Pub.Pick_Release');
3313: END IF;
3314:
3315: inv_cache.mo_transaction_date := NULL;
3316: l_return_value := inv_cache.set_pick_release(FALSE); --Added bug3237702
3317: inv_log_util.g_maintain_log_profile := FALSE;
3318:
3319: EXCEPTION
3320: WHEN FND_API.G_EXC_ERROR THEN

Line 3323: l_return_value := inv_cache.set_pick_release(FALSE); --Added bug3237702

3319: EXCEPTION
3320: WHEN FND_API.G_EXC_ERROR THEN
3321: --
3322: x_return_status := FND_API.G_RET_STS_ERROR;
3323: l_return_value := inv_cache.set_pick_release(FALSE); --Added bug3237702
3324: inv_log_util.g_maintain_log_profile := TRUE;
3325: --
3326: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
3327: , p_data => x_msg_data);

Line 3332: l_return_value := inv_cache.set_pick_release(FALSE); --Added bug3237702

3328: --
3329: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3330: --
3331: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3332: l_return_value := inv_cache.set_pick_release(FALSE); --Added bug3237702
3333: inv_log_util.g_maintain_log_profile := TRUE;
3334: --
3335: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
3336: , p_data => x_msg_data);

Line 3346: l_return_value := inv_cache.set_pick_release(FALSE); --Added bug3237702

3342: END IF;
3343:
3344: ROLLBACK TO Pick_Release_PUB;
3345: --
3346: l_return_value := inv_cache.set_pick_release(FALSE); --Added bug3237702
3347: inv_log_util.g_maintain_log_profile := TRUE;
3348: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3349: --
3350: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN