DBA Data[Home] [Help]

PACKAGE: APPS.WSH_DLVB_COMMON_ACTIONS

Source


1 PACKAGE WSH_DLVB_COMMON_ACTIONS as
2 /* $Header: WSHDDCMS.pls 120.0 2005/05/26 17:09:08 appldev noship $ */
3 
4 
5 /*
6 -----------------------------------------------------------------------------
7    PROCEDURE  : Assign_Details
8    PARAMETERS : p_detail_tab - table of ids for assigning; could be delivery
9 		lines or containers
10 		p_parent_detail_id -  parent delivery detail id that details
11 		need to be assigned to
12 		p_delivery_id - delivery_id for assignment of details
13 		x_pack_status - status of container after assignment - whether
14 		underpacked, overpacked or success.
15 		x_return_status - return status of API
16   DESCRIPTION : This procedure takes as input a table of delivery details -
17 		both lines and containers and creates an assignment to a parent
18 		detail (container) and/or a delivery.  The API loops through
19 		all input ids and creates the assignment by calling the
20 		appropriate delivery detail or container API. This API serves
21 		as the wrapper API to handle a multi-selection of both lines
22 		and containers.
23 
24 ------------------------------------------------------------------------------
25 */
26 
27 
28 PROCEDURE Assign_Details (
29 		p_detail_tab IN WSH_UTIL_CORE.id_tab_type,
30 		p_parent_detail_id IN NUMBER,
31 		p_delivery_id IN NUMBER,
32                 p_group_api_flag IN VARCHAR2 DEFAULT NULL,
33 		x_pack_status OUT NOCOPY  VARCHAR2,
34 		x_return_status OUT NOCOPY  VARCHAR2);
35 
36 
37 /*
38 -----------------------------------------------------------------------------
39    PROCEDURE  : Unassign_Details
40    PARAMETERS : p_detail_tab - table of ids for unassigning; could be delivery
41 		lines or containers
42 		p_parent_detail_flag -  'Y' or 'N' to indicate whether to
43 		unassign from parent delivery detail id
44 		p_delivery_flag - 'Y' or 'N' to indicate whether to unassign
45 		from delivery
46 		x_return_status - return status of API
47   DESCRIPTION : This procedure takes as input a table of delivery details -
48 		both lines and containers and unassigns the details from either
49 		containers or deliveries or both.  The API loops through
50 		all input ids and unassigns the details based on the two input
51 		flags. If the flags are set to 'Y' then the unassigning is
52 		done from that entity. If both the flags are set to 'N' then
53 		detail is unassigned from both the container and the delivery.
54 		The container and delivery weight volumes are re-calculated
55 		after the unassigning.
56 
57 ------------------------------------------------------------------------------
58 */
59 
60 
61 PROCEDURE Unassign_Details (
62 		p_detail_tab IN WSH_UTIL_CORE.id_tab_type,
63 		p_parent_detail_flag IN VARCHAR2,
64 		p_delivery_flag IN VARCHAR2,
65                 p_group_api_flag IN VARCHAR2 DEFAULT NULL,
66 		x_return_status OUT NOCOPY  VARCHAR2,
67         p_action_prms  IN wsh_glbl_var_strct_grp.dd_action_parameters_rec_type   -- J-IB-NPARIKH
68        );
69 
70 
71 /*
72 -----------------------------------------------------------------------------
73    PROCEDURE  : Unassign_Details
74    PARAMETERS : p_detail_tab - table of ids for unassigning; could be delivery
75         lines or containers
76         p_parent_detail_flag -  'Y' or 'N' to indicate whether to
77         unassign from parent delivery detail id
78         p_delivery_flag - 'Y' or 'N' to indicate whether to unassign
79         from delivery
80         x_return_status - return status of API
81   DESCRIPTION : This procedure is for backward compatibility only. Do not use this.
82 
83 ------------------------------------------------------------------------------
84 */
85 
86 
87 PROCEDURE Unassign_Details (
88         p_detail_tab IN WSH_UTIL_CORE.id_tab_type,
89         p_parent_detail_flag IN VARCHAR2,
90         p_delivery_flag IN VARCHAR2,
91                 p_group_api_flag IN VARCHAR2 DEFAULT NULL,
92         x_return_status OUT NOCOPY  VARCHAR2);
93 
94 /*
95 -----------------------------------------------------------------------------
96    PROCEDURE  : Auto_Pack_Lines
97    PARAMETERS :	p_group_id_tab - table of group ids if the grouping for the
98 		lines are already known.
99 		p_detail_tab - table of ids for assigning; could be delivery
100 		lines or containers
101 		p_pack_cont_flag - 'Y' or 'N' to determine whether to autopack
102 		detail containers into master containers while autopacking
103 		x_cont_inst_tab - table of delivery detail ids (containers)
104 		that were created due to the autopack.
105 		x_return_status - return status of API
106   DESCRIPTION : This procedure takes as input a table of delivery details -
107 		both lines and containers and eliminates all container ids and
108 		with the remaining delivery lines, it calls the auto pack API
109 		in the container actions package. This API serves as the
110 		wrapper API to handle a multi-selection of both lines and
111 		containers.
112 
113 ------------------------------------------------------------------------------
114 */
115 
116 
117 PROCEDURE Auto_Pack_Lines (
118 		p_group_id_tab IN WSH_UTIL_CORE.id_tab_type,
119 		p_detail_tab IN WSH_UTIL_CORE.id_tab_type,
120 		p_pack_cont_flag IN VARCHAR2,
121                 p_group_api_flag IN VARCHAR2 DEFAULT NULL,
122 		x_cont_inst_tab OUT NOCOPY  WSH_UTIL_CORE.id_tab_type,
123 		x_return_status OUT NOCOPY  VARCHAR2);
124 
125 
126 
127 /*
128 -----------------------------------------------------------------------------
129    PROCEDURE  : Separate_Details
130    PARAMETERS :	p_input_tab - table of ids in input; could be delivery
131 		lines or containers
132 		x_cont_inst_tab - table of delivery detail ids that are
133 		containers
134 		x_detail_tab - table of delivery_details that are lines.
135 		x_error_tab - table of any ids that are erroneous
136 		x_return_status - return status of API
137 		p_wms_filter_flag - Y = do not include records in WMS orgs.
138 				    N = include all records.
139 				    Default = N
140 				    Bug 1678527: disable packing actions
141 				 	for delivery details in WMS orgs.
142   DESCRIPTION : This procedure takes as input a table of delivery details -
143 		both lines and containers and separates all container ids and
144 		delivery lines. It returns three tables - one for containers,
145 		one for delivery lines and one for any erroroneous ids.
146 
147 ------------------------------------------------------------------------------
148 */
149 
150 
151 PROCEDURE Separate_Details (
152 		p_input_tab IN WSH_UTIL_CORE.id_tab_type,
153 		x_cont_inst_tab OUT NOCOPY  WSH_UTIL_CORE.id_tab_type,
154 		x_detail_tab OUT NOCOPY  WSH_UTIL_CORE.id_tab_type,
155 		x_error_tab OUT NOCOPY  WSH_UTIL_CORE.id_tab_type,
156 		x_return_status OUT NOCOPY  VARCHAR2,
157 		p_wms_filter_flag IN VARCHAR2 DEFAULT 'N');
158 
159 
160 
161 /*
162 -----------------------------------------------------------------------------
163    PROCEDURE  : Calc_Cont_Avail
164    PARAMETERS :	p_container_instance_id - delivery detail id of container
165 		x_avail_wt - available weight capacity of container
166 		x_avail_vol - available volume capacity of container
167 		x_wt_uom - weight uom code for above weights
168 		x_vol_uom - volume uom code for above volumes
169 		x_return_status - return status of API
170   DESCRIPTION : This procedure takes as input a container (delivery detail id)
171 		and returns the	available weight and volume capacity for the
172 		container.
173 
174 ------------------------------------------------------------------------------
175 */
176 
177 
178 PROCEDURE Calc_Cont_Avail (
179 			p_container_instance_id IN NUMBER,
180 			x_avail_wt OUT NOCOPY  NUMBER,
181 			x_avail_vol OUT NOCOPY  NUMBER,
182 			x_wt_uom OUT NOCOPY  VARCHAR2,
183 			x_vol_uom OUT NOCOPY  VARCHAR2,
184 			x_return_status OUT NOCOPY  VARCHAR2);
185 
186 
187 /*
188 -----------------------------------------------------------------------------
189    PROCEDURE  : Calc_Item_Total
190    PARAMETERS :	p_delivery_detail_id - delivery detail id of line
191 		x_item_wt - weight of line
192 		x_item_vol - volume of line
193 		x_wt_uom - weight uom code for above weights
194 		x_vol_uom - volume uom code for above volumes
195 		x_return_status - return status of API
196   DESCRIPTION : This procedure takes as input a delivery detail id and
197 		returns the total item weight and volume for the line.
198 
199 ------------------------------------------------------------------------------
200 */
201 
202 
203 PROCEDURE Calc_Item_Total (
204 			p_delivery_detail_id IN NUMBER,
205 			x_item_wt OUT NOCOPY  NUMBER,
206 			x_item_vol OUT NOCOPY  NUMBER,
207 			x_wt_uom OUT NOCOPY  VARCHAR2,
208 			x_vol_uom OUT NOCOPY  VARCHAR2,
209 			x_return_status OUT NOCOPY  VARCHAR2);
210 
211 
212 /*
213 -----------------------------------------------------------------------------
214    PROCEDURE  : Calculate_Total_Capacities
215    PARAMETERS :	p_detail_input_tab - table of ids in input; could be delivery
216 		lines or containers
217 		x_cont_wt_avail - total available weight capacity of all
218 		containers in the selection of input ids
219 		x_cont_vol_avail - total available volume capacity of all
220 		containers in the selection of input ids.
221 		x_item_wt_total - total weight of all lines in the input
222 		selection of ids.
223 		x_item_vol_total - total volume of all lines in the input
224 		selection of ids.
225 		x_wt_uom - weight uom code for above weights
226 		x_vol_uom - volume uom code for above volumes
227 		x_return_status - return status of API
228   DESCRIPTION : This procedure takes as input a table of delivery details -
229 		both lines and containers and separates all container ids and
230 		delivery lines. It returns the available container weight and
231 		volume capacities and total weight and volume of lines.
232 
233 ------------------------------------------------------------------------------
234 */
235 
236 
237 PROCEDURE Calculate_Total_Capacities (
238 			p_detail_input_tab IN WSH_UTIL_CORE.id_tab_type,
239 			x_cont_wt_avail OUT NOCOPY  NUMBER,
240 			x_cont_vol_avail OUT NOCOPY  NUMBER,
241 			x_item_wt_total OUT NOCOPY  NUMBER,
242 			x_item_vol_total OUT NOCOPY  NUMBER,
243 			x_wt_uom OUT NOCOPY  VARCHAR2,
244 			x_vol_uom OUT NOCOPY  VARCHAR2,
245 			x_return_status OUT NOCOPY  VARCHAR2);
246 
247 
248 
249 END WSH_DLVB_COMMON_ACTIONS;