Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
A. Business Requirement
Bug number for the task is - 13343630 - USAF SERIAL NUMBER RESERVATIONS FOR RECEIVED
INTERNAL ORDERS.
Product: 508 - Oracle Inventory Management
Desired Behavior –
CMRO user will identify an item in another organization where a specific instance is required
(associated IB attributes and maintenance requirements - CMRO tracks). Reservations at an
instance level is required (Internal Order) rather than just at an item level. Initiating Inventory
move from one organization to another organization will require reservations be specific to
instance level (serial number association) attributes. When the item arrives at the demand
location, we need the reservation to transfer from internal order to inventory. This process
also requires instance to be at the serial number level. Serial Number Reservation association
is required to be visible by Inventory, ASCP and CMRO users.
Business Impact –
Without Inventory Serial Number Reservation enhancement, an item instance could be
transferred or issued to non-desired/low priority CMRO WO. Aircraft Inventory has a very high
monetary value and the availability is extremely important to Aircraft Operations and to our
CMRO customers. It is essential for the following users of EBS; Inventory, ASCP and CMRO to
be able to view associated CMRO WO serial number reservations. We anticipate that serial
number reservation enhancement will only pertain to CMRO work orders.
B. Technical Overview
When an ISO (Internal Sales Order) is created from CMRO’s Material Management Workbench –
Demand and Supply UI, an IR (Internal Requisition) to WIP (Demand work order) type of
reservation is created in the demand organization.
In supply organization the selected serials are reserved against the sales order line(s) of the ISO.
ER (Existing Reservations) tab captures the IR to WIP reservation details, the serials picked for the
ISO and displays in the result table.
When ISO is completed and the reserved serials are shipped to the demand organization i.e. the
required serials are received in the demand organization against the IR, the IR to WIP reservation
should get converted into Inventory to WIP reservation.
Though Inventory currently supports this logic, serial numbers are not reserved as of today.
The custom logic mentioned in this document needs to be added in inventory code to support
serial reservation.
The fix has been put to INV_MAINTAIN_RESERVATION_PUB.TRANSFER_RES() procedure.
Due to some constraints, INV could not check in the code. Hence user has to manually apply the
code changes into the environment.
This customization is implemented only if the IR reservation is against a CMRO work order.
Following are the details.
C. Pre-reqs
INV patch - Apply the patch 13503144:R12.INV.B to the environment.
Profile Setup needed - Set the profile INV: Create RCV Shipments in Bulk value to Yes.
Add code.
Please find following existing code in the procedure TRANSFER_RES().
inv_reservation_pvt.transfer_reservation
(
p_api_version_number => 1.0
, p_init_msg_lst => fnd_api.g_false
, x_return_status => l_return_status
, x_msg_count => x_msg_count
, x_msg_data => x_msg_data
--, p_is_transfer_supply => fnd_api.g_true
, p_original_rsv_rec => l_rsv
, p_to_rsv_rec => l_rsv_new
, p_original_serial_number => g_dummy_sn_tbl -- no serial contorl
-- , p_to_serial_number => g_dummy_sn_tbl -- no serial control
, p_validation_flag => fnd_api.g_true
, x_reservation_id => l_new_rsv_id
);
Please add the following code right before the call to the above mentioned API call.
/* Added BEGIN block for bug 13829182 so that for reservation of all other flows should not
raise any exception and execute inv_reservation_pvt.transfer_reservation */
BEGIN
-- Check if the reservation id is IR type and belongs to AHL
SELECT RESERVATION_ID,
ORGANIZATION_ID,
INVENTORY_ITEM_ID
INTO L_AHL_RESERVATION_ID,
L_ORG_ID,
L_INV_ITEM_ID
FROM MTL_RESERVATIONS
WHERE SUPPLY_SOURCE_TYPE_ID =
INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_INTERNAL_REQ
AND DEMAND_SOURCE_TYPE_ID = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP
AND EXTERNAL_SOURCE_CODE = 'AHL'
AND RESERVATION_ID = P_FROM_RESERVATION_ID;
-- Check if the item is serial controlled for both Demand and Supply Org.
IF(L_SUP_SERIAL_CONTROL_FLAG = 'Y' and L_DEM_SERIAL_CONTROL_FLAG = 'Y')
THEN
l_Fnd_Log_message := 'This is a serial controlled item. Get the Serial details and mark
those with the reservation id';
IF G_debug= C_Debug_Enabled THEN
MYDEBUG(L_FND_LOG_MESSAGE, C_API_NAME,9);
END IF;
SELECT MAX(SHIPMENT_LINE_ID),
MAX(NVL(MMT_TRANSACTION_ID,0))
INTO L_SHIP_LINE_ID,
L_MMT_TXN_ID
FROM RCV_SHIPMENT_LINES
WHERE REQUISITION_LINE_ID = P_FROM_SOURCE_LINE_ID
AND SOURCE_DOCUMENT_CODE = 'REQ'
AND DESTINATION_TYPE_CODE = 'INVENTORY'
AND QUANTITY_RECEIVED = P_PRIMARY_RES_QUANTITY;
for j in 1 ..l_serial_number_table.count
LOOP
l_fnd_log_message := 'L_SERIAL_NUMBER_TABLE(' || j || ') - ' ||
L_SERIAL_NUMBER_TABLE(J).SERIAL_NUMBER;
IF G_debug= C_Debug_Enabled THEN
mydebug(l_fnd_log_message, c_api_name,9);
END IF;
END LOOP;
FOR J IN 1 ..L_SERIAL_NUMBER_TABLE.COUNT
LOOP
l_Fnd_Log_message := 'Marking Serial - ' ||
L_SERIAL_NUMBER_TABLE(J).SERIAL_NUMBER || ' for the reservation - ' ||
P_FROM_RESERVATION_ID;
IF G_debug= C_Debug_Enabled THEN
mydebug(l_Fnd_Log_Message, c_api_name,9);
END IF;
L_MARKING_SUCCESS := L_SUCCESS;
-- sansatpa - adding for Marshalling - to transfer IR reservation to INV - for serial marking -
ends
-- Code added by CMRO for IR to INV reservation transfer task – Ends
Add code.
Please find following existing code in the same PROCEDURE TRANSFER_RES() procedure.
inv_reservation_pvt.transfer_reservation
(
p_api_version_number => 1.0
, p_init_msg_lst => fnd_api.g_false
, x_return_status => l_return_status
, x_msg_count => x_msg_count
, x_msg_data => x_msg_data
--, p_is_transfer_supply => fnd_api.g_true
, p_original_rsv_rec => l_rsv
, p_to_rsv_rec => l_rsv_new
, p_original_serial_number => g_dummy_sn_tbl -- no serial contorl
-- , p_to_serial_number => g_dummy_sn_tbl -- no serial control
, p_validation_flag => fnd_api.g_true
, x_reservation_id => l_new_rsv_id
);
Add the following code immediately after the above mentioned API call.
NB: Text in BROWN indicates the code added for the feature.
F. Testing Process