The following lines contain the word 'select', 'insert', 'update' or 'delete':
, p_allow_delete IN VARCHAR2 DEFAULT NULL
, x_pick_release_status OUT NOCOPY INV_Pick_Release_PUB.INV_Release_Status_Tbl_Type
, x_return_status OUT NOCOPY VARCHAR2
, x_msg_count OUT NOCOPY NUMBER
, x_msg_data OUT NOCOPY VARCHAR2
) IS
-- HW BUG#:1941429 cross_docking
CURSOR FIND_QTY (l_source_line_id NUMBER)IS
select sum(ABS(trans_qty)), nvl(ABS(sum(trans_qty2)),0)
from IC_TRAN_PND
where line_id = l_source_line_id
AND completed_ind = 0
AND delete_mark = 0
AND lot_id <> 0
AND staged_ind = 0;
select trans_id
from ic_tran_pnd
where line_id = l_source_line_id
AND completed_ind = 0
AND delete_mark = 0
AND staged_ind = 0;
l_p_allow_delete VARCHAR2(3);
SELECT NVL(print_pick_slip_mode, 'E')
INTO l_print_mode
FROM WSH_SHIPPING_PARAMETERS
WHERE organization_id = l_organization_id;
l_p_allow_delete := p_allow_delete;
GMI_Reservation_Util.PrintLn('l_p_allow_delete = ' || l_p_allow_delete) ;
,p_allow_delete => l_p_allow_delete
,x_detail_rec_count => l_detail_rec_count
,x_return_status => l_api_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
x_pick_release_status.delete;
/* select line_status into l_line_status
from ic_txn_request_lines
where line_id = l_mo_line.line_id ;
gmi_reservation_util.println('In Aut_detail Going to select line_id from shipping');
select source_line_id,delivery_detail_id into
l_source_line_id, l_delivery_detail_id
from wsh_delivery_details
where move_order_line_id = l_mo_line.line_id ;
select sum(requested_quantity),nvl(sum(requested_quantity2),0)
into l_quantity, l_secondary_quantity
from wsh_delivery_details
where source_line_id=l_source_line_id ;
select delivery_detail_id, source_header_id, source_line_id,
released_status
into l_delivery_detail_id, l_source_header_id, l_source_line_id,
l_released_status
from wsh_delivery_details
where source_line_id = l_source_line_id
and move_order_line_id is NULL
and released_status = 'R';
gmi_reservation_util.println('In Auto_detail going to call update_shipping');
gmi_reservation_util.println('value of l_shipping_attr(1).cycle_count_quantity1 before calling update shipping att is '||l_shipping_attr(1).cycle_count_quantity);
gmi_reservation_util.println('value of l_shipping_attr(1).cycle_count_quantity2 before calling update shipping att is '||l_shipping_attr(1).cycle_count_quantity2);
WSH_INTERFACE.Update_Shipping_Attributes
(p_source_code => 'INV',
p_changed_attributes => l_shipping_attr,
x_return_status => l_api_return_status
);
GMI_Reservation_Util.Println('Retrun error from update shipping attributes',
'GMI_Pick_Release_Pub.Auto_Detail');
UPDATE IC_TXN_REQUEST_LINES
SET quantity = l_transaction_quantity,
secondary_quantity = l_transaction_quantity2
where line_id = l_mo_line.line_id;
/* Update the Pick Release API's return status to an error if the line could
not be processed. Note that processing of other lines will continue.
*/
IF l_api_return_status = FND_API.G_RET_STS_UNEXP_ERROR OR
l_api_return_status = FND_API.G_RET_STS_ERROR THEN
x_return_status := FND_API.G_RET_STS_ERROR;