The following lines contain the word 'select', 'insert', 'update' or 'delete':
as the wrapper API to handle a multi-selection of both lines
and containers.
------------------------------------------------------------------------------
*/
--
G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_DLVB_COMMON_ACTIONS';
select delivery_id
from wsh_delivery_assignments_v da
where da.delivery_detail_id = p_detail_id;
select organization_id
from wsh_new_deliveries
where delivery_id = p_delivery_id;
l_entity_ids.delete;
l_entity_ids.delete;
SELECT nvl(minimum_fill_percent,0)
FROM WSH_DELIVERY_DETAILS
WHERE delivery_detail_id = v_cont_id
AND container_flag = 'Y';
wrapper API to handle a multi-selection of both lines and
containers.
------------------------------------------------------------------------------
*/
PROCEDURE Auto_Pack_Lines (
p_group_id_tab IN WSH_UTIL_CORE.id_tab_type,
p_detail_tab IN WSH_UTIL_CORE.id_tab_type,
p_pack_cont_flag IN VARCHAR2,
p_group_api_flag IN VARCHAR2 DEFAULT NULL,
x_cont_inst_tab OUT NOCOPY WSH_UTIL_CORE.id_tab_type,
x_return_status OUT NOCOPY VARCHAR2) IS
l_cont_tab WSH_UTIL_CORE.id_tab_type;
l_entity_ids.delete;
l_cont_inst_tab.delete;
CURSOR Select_Cont_Flag (v_detail_id NUMBER) IS
SELECT nvl(wdd.container_flag,'N'),
NVL(mp.wms_enabled_flag, 'N'),
nvl(line_direction,'O') line_direction -- J-IB-NPARIKH
FROM WSH_DELIVERY_DETAILS wdd,
MTL_PARAMETERS mp
WHERE wdd.delivery_detail_id = v_detail_id
AND mp.organization_id(+) = wdd.organization_id;
OPEN Select_Cont_Flag (p_input_tab(i));
FETCH Select_Cont_Flag INTO l_cont_flag, l_wms_enabled,l_line_direction;
IF Select_Cont_Flag%NOTFOUND THEN
err_cnt := err_cnt + 1;
CLOSE Select_Cont_Flag;
IF Select_Cont_Flag%ISOPEN THEN
CLOSE Select_Cont_Flag;
SELECT inventory_item_id, gross_weight, net_weight, filled_volume,
maximum_load_weight, maximum_volume,
weight_uom_code, volume_uom_code, organization_id
FROM WSH_DELIVERY_DETAILS
WHERE delivery_detail_id = p_container_instance_id
and container_flag = 'Y';
SELECT inventory_item_id, net_weight, volume,
weight_uom_code, volume_uom_code, organization_id
FROM WSH_DELIVERY_DETAILS
WHERE delivery_detail_id = p_delivery_detail_id
AND nvl(container_flag,'N') = 'N';
p_update_flag => 'N',
x_net_weight => tmp_net_wt,
x_volume => tmp_vol,
x_return_status => l_ret_sts);
containers in the selection of input ids
x_cont_vol_avail - total available volume capacity of all
containers in the selection of input ids.
x_item_wt_total - total weight of all lines in the input
selection of ids.
x_item_vol_total - total volume of all lines in the input
selection of ids.
x_wt_uom - weight uom code for above weights
x_vol_uom - volume uom code for above volumes
x_return_status - return status of API
DESCRIPTION : This procedure takes as input a table of delivery details -
both lines and containers and separates all container ids and
delivery lines. It returns the available container weight and
volume capacities and total weight and volume of lines.
------------------------------------------------------------------------------
*/
PROCEDURE Calculate_Total_Capacities (
p_detail_input_tab IN WSH_UTIL_CORE.id_tab_type,
x_cont_wt_avail OUT NOCOPY NUMBER,
x_cont_vol_avail OUT NOCOPY NUMBER,
x_item_wt_total OUT NOCOPY NUMBER,
x_item_vol_total OUT NOCOPY NUMBER,
x_wt_uom OUT NOCOPY VARCHAR2,
x_vol_uom OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2) IS
l_cont_tab WSH_UTIL_CORE.id_tab_type;