DBA Data[Home] [Help]

PACKAGE: APPS.OE_SHIPPING_INTEGRATION_PVT

Source


1 PACKAGE OE_Shipping_Integration_PVT AUTHID CURRENT_USER AS
2 /* $Header: OEXVSHPS.pls 120.2.12010000.1 2008/07/25 08:07:32 appldev ship $ */
3 
4 --  Start of Comments
5 --  API name    OE_Shipping_Integration_PVT
6 --  Type        Private
7 --  Version     Current version = 1.0
8 --              Initial version = 1.0
9 
10 -- Record definition to be used to determine the shipped quantity for a model
11 -- and class in case of PTO, SMC PTO and KIT.
12 
13 G_DEBUG_MSG  VARCHAR2(2000);
14 G_DEBUG_CALL NUMBER;
15 G_BULK_WSH_INTERFACE_CALLED  BOOLEAN := FALSE; -- ADDED FOR BUG 4070931
16 
17 
18 TYPE Shipment_Rec_Type IS RECORD
19 (	line_id				NUMBER	:= FND_API.G_MISS_NUM
20 ,	ordered_quantity	NUMBER	:= FND_API.G_MISS_NUM
21 ,	shipped_quantity	NUMBER	:= FND_API.G_MISS_NUM
22 ,	ratio_to_top_model	NUMBER	:= FND_API.G_MISS_NUM
23 ,	ratio_to_parent		NUMBER	:= FND_API.G_MISS_NUM
24 ,	link_to_line_id		NUMBER	:= FND_API.G_MISS_NUM
25 ,	top_model_line_id	NUMBER	:= FND_API.G_MISS_NUM
26 ,	shippable_flag		VARCHAR2(1) := FND_API.G_MISS_CHAR
27 );
28 
29 TYPE Shipment_Tbl_Type IS TABLE OF Shipment_Rec_Type
30 	INDEX BY BINARY_INTEGER;
31 
32 PROCEDURE Call_Process_Order
33 (p_line_tbl		IN	OE_Order_PUB.Line_Tbl_Type
34 ,p_control_rec		IN	OE_GLOBALS.Control_Rec_Type DEFAULT OE_GLOBALS.G_MISS_CONTROL_REC
35 ,p_process_requests     IN BOOLEAN := FALSE
36 ,x_return_status OUT NOCOPY VARCHAR2
37 
38 );
39 
40 PROCEDURE Validate_Release_Status
41 (
42 	p_application_id		IN	NUMBER
43 ,	p_entity_short_name		IN	VARCHAR2
44 ,	p_validation_entity_short_name	IN	VARCHAR2
45 ,	p_validation_tmplt_short_name	IN	VARCHAR2
46 ,	p_record_set_short_name	        IN	VARCHAR2
47 ,	p_scope				IN	VARCHAR2
48 , x_result_out OUT NOCOPY NUMBER
49 
50 );
51 
52 PROCEDURE Validate_Pick
53 (
54 	p_application_id		IN	NUMBER
55 ,	p_entity_short_name		IN	VARCHAR2
56 ,	p_validation_entity_short_name	IN	VARCHAR2
57 ,	p_validation_tmplt_short_name	IN	VARCHAR2
58 ,	p_record_set_short_name		IN	VARCHAR2
59 ,	p_scope				IN	VARCHAR2
60 , x_result_out OUT NOCOPY NUMBER
61 
62 );
63 
64 --	Start of Comments
65 --	API name    :	Get_PTO_Shipped_Quantity
66 --	Type        :	Private
67 --	Pre-reqs	:	None.
68 --	Function	:	This procedure is to calculate the shipped quantities for
69 --					the non shippable component of a model/kit.
70 --	Parameters	:	p_top_model_line_id		IN NUMBER 	Optional
71 --						The top_model_line_id of the model/kit for which the
72 --						shipped quantity calculation is required. If this passed
73 --						the procedure will get the shipped quantities for
74 --						shippable components from the database.
75 --					p_line_tbl				IN Table of line records Optional
76 --						A table of records of lines for a top model/kit. This
77 --						needs to be passed when the calculation is required
78 --						and the shipped quantities for shippable components are
79 --						not in tha database.
80 --	Version     :	Current version = 1.0
81 --  	            Initial version = 1.0
82 --	End of Comments
83 --
84 PROCEDURE Get_PTO_Shipped_Quantity
85 (
86 	p_top_model_line_id		IN	NUMBER DEFAULT FND_API.G_MISS_NUM
87 ,	p_x_line_tbl			IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
88 , x_ratio_status OUT NOCOPY VARCHAR2
89 
90 , x_return_status OUT NOCOPY VARCHAR2
91 
92 );
93 
94 --	Start of Comments
95 --	API name    :	Update_Shipping_PVT
96 --	Type        :	Private
97 --	Pre-reqs	:	None.
98 --	Function	:	This procedure is a cover for Update_Shipping_From_OE and
99 --					will be used when a line reaches to SHIP_LINE work flow
100 --					activity or a hold is applied or released, to inform
101 --					shipping about these.
102 --	Parameters	:	p_line_id				IN NUMBER 	Required
103 --						The line_id of the line for which shipping update needs
104 --						to be called.
105 --					p_hold_type				IN VARCHAR2
106 --						The hold type if a hold is applied on the line or
107 --						'RELEASED' if a hold has been released.
108 --					p_shipping_activity		IN VARCHAR2
109 --						It should be FND_API.G_TRUE if a line has reached
110 --						SHIP_LINE workflow activity.
111 --	Version     :	Current version = 1.0
112 --  	            Initial version = 1.0
113 --	End of Comments
114 --
115 PROCEDURE Update_Shipping_PVT
116 (
117 	p_line_id			IN	NUMBER
118 ,	p_hold_type			IN	VARCHAR2	DEFAULT FND_API.G_MISS_CHAR
119 ,	p_shipping_activity	IN	VARCHAR2 	DEFAULT FND_API.G_MISS_CHAR
120 , x_return_status OUT NOCOPY VARCHAR2
121 
122 );
123 
124 --	Start of Comments
125 --	API name    :	Update_Shipping_From_OE
126 --	Type        :	Private
127 --	Pre-reqs	:	None.
128 --	Function	:	This procedure will get the line records for each line
129 --					passed in the table from the database. Will do the credit
130 --					and hold check if the line has reached to SHIP_LINE work
131 --					activity and will call
132 --					WSH_INTERFACE.Update_Shipping_Attributes API to inform
133 --					Shipping about any changes which have taken place in OE.
134 --	Parameters	: 	p_update_lines_tb IN OE_Order_Pub.Request_Tbl_Type Required
135 --						A table of record with line_id's for which shipping
136 --						update API needs to be called.
137 --	Version     :	Current version = 1.0
138 --  	            Initial version = 1.0
139 --	End of Comments
140 --
141 PROCEDURE Update_Shipping_From_OE
142 (
143 	p_update_lines_tbl	IN	OE_ORDER_PUB.Request_Tbl_Type
144 , x_return_status OUT NOCOPY VARCHAR2
145 
146 );
147 
148 --	Start of Comments
149 --	API name    :	Check_Shipment_Line
150 --	Type        :	Private
151 --	Pre-reqs	:	None.
152 --	Function	:	This procedure will check the shipment status of a line
153 --					and will return the result(e.g. 'Fully Shipped', 'Shipped
154 --					within tolerance below').
155 --	Parameters	:	p_line_rec				IN Record 	Required
156 --						The line record of a line for which the shipment status
157 --						is required.
158 --					p_shipped_quantity		IN NUMBER   Optional
159 --						Shipped quantity of the line. This is required if the
160 --						check is required with a shipped quantity which is yet
161 --						not in the database.
162 --	Version     :	Current version = 1.0
163 --  	            Initial version = 1.0
164 --	End of Comments
165 --
166 PROCEDURE Check_Shipment_Line
167 (
168 	p_line_rec				IN	OE_Order_Pub.Line_Rec_Type
169 ,	p_shipped_quantity		IN	NUMBER DEFAULT 0
170 , x_result_out OUT NOCOPY VARCHAR2
171 
172 );
173 
174 --	Start of Comments
175 --	API name    :	Ship_Confirm_Ship_Set
176 --	Type        :	Private
177 --	Pre-reqs	:	None.
178 --	Function	:	This procedure does the ship confirmation procesing for the
179 --					Ship set.
180 --	Parameters	:	p_ship_set_id				IN NUMBER 	Required
181 --						The ship set id for which ship confirmation needs to
182 --						be performed.
183 --	Version     :	Current version = 1.0
184 --  	            Initial version = 1.0
185 --	End of Comments
186 --
187 PROCEDURE Ship_Confirm_Ship_Set
188 (
189 	p_ship_set_id		IN	NUMBER
190 , x_return_status OUT NOCOPY VARCHAR2
191 
192 );
193 
194 --	Start of Comments
195 --	API name    :	Ship_Confirm_PTO_KIT
196 --	Type        :	Private
197 --	Pre-reqs	:	None.
198 --	Function	:	This procedure will perform the ship confirm process for
199 --					a SMC PTO, PTO or a KIT.
200 --	Parameters	:	p_top_model_line_id		IN NUMBER 	Required
201 --						The top_model_line_id for the PTO for which ship
202 --						confirmation process needs to be performed.
203 --	Version     :	Current version = 1.0
204 --  	            Initial version = 1.0
205 --	End of Comments
206 --
207 PROCEDURE Ship_Confirm_PTO_KIT
208 (
209 	p_top_model_line_id		IN	NUMBER
210 , x_return_status OUT NOCOPY VARCHAR2
211 
212 );
213 
214 --	Start of Comments
215 --	API name    :	Ship_Confirm_Standard_Line
216 --	Type        :	Private
217 --	Pre-reqs	:	None.
218 --	Function	:	This procedure performs the ship confirmation processing
219 --					for a standard line. It wil complete the SHIP_LINE work
220 --					flow activity for the ship confirmed line, it may split
221 --					the line if the line has been shipped partially.
222 --	Parameters	:	p_line_id				IN NUMBER
223 --						The line_id of the line for which ship confirmation
224 --						needs to be performed.
225 --					p_line_rec				IN OE_order_Pub.line_rec_type
226 --						The line record for the line for which ship confirmation
227 --						needs to be performed.
228 --					p_shipment_status		IN VARCHAR2
229 --						The shipment status of the line if known.
230 --	Version     :	Current version = 1.0
231 --  	            Initial version = 1.0
232 --	End of Comments
233 --
234 
235 PROCEDURE Ship_Confirm_Standard_Line
236 (p_line_id	IN	NUMBER DEFAULT FND_API.G_MISS_NUM
237 ,p_line_rec	IN	OE_ORDER_PUB.line_rec_type
238                         DEFAULT OE_ORDER_PUB.G_MISS_LINE_REC
239 ,p_shipment_status	IN	VARCHAR2 DEFAULT FND_API.G_MISS_CHAR
240 ,p_check_line_set  IN  VARCHAR2 := 'Y'
241 , x_return_status  OUT NOCOPY VARCHAR2
242 
243 );
244 
245 --	Start of Comments
246 --	API name    :	Process_Ship_Conform
247 --	Type        :	Private
248 --	Pre-reqs	:	None.
249 --	Function	:	This procedure is called from the delayed request process
250 --					whenever there is a ship confirmation from shipping. This
251 --					call different procedures to perform the ship confirmation
252 --					process for standard line, PTO, ATO or ship set.
253 --	Parameters	:	p_process_id		IN NUMBER	Required
254 --						The id of the item for which the ship confirmation
255 --						process need to be performed, for example it should be
256 --						top_model_line_id if the ship confirmation is for a PTO
257 --						or a kit, it should be ship set id if the ship
258 --						confirmation is for a shipset.
259 --					p_process_type		IN NUMBER 	Required
260 --						The type of the item for which the ship confirmation
261 --						to be performed.It could be 'SHIP_SET', 'STANDARD',
262 --						'PTO_KIT' etc..
263 --	Version     :	Current version = 1.0
264 --  	            Initial version = 1.0
265 --	End of Comments
266 --
267 PROCEDURE Process_Ship_Confirm
268 (
269 	p_process_id		IN	NUMBER
270 ,	p_process_type		IN	VARCHAR2
271 , x_return_status OUT NOCOPY VARCHAR2
272 
273 );
274 
275 --	Start of Comments
276 --	API name    :	Process_Shipping_Activity
277 --	Type        :	Private
278 --	Pre-reqs	:	None.
279 --	Function	:	This procedure is called when ever a line reaches SHIP_LINE
280 --					work flow activity. This prcedure will check if the line is
281 --					shippable it will call shipping update to inform that the
282 --					line is ready for pick, if the line is a non shippable line
283 --					it will complete the SHIP_LINE work flow activity with
284 --					result 'NON_SHIPPABLE'. If a SMC PTO or a MODEL/CLASS
285 --					reaches the SHIP_LINE work flow activity and the explosion
286 --					for included item has not taken place the SMC PTO, MODEL or
287 --					CLASS will be exploded at this point.
288 --	Parameters	:	p_api_version_number	IN NUMBER	Required
289 --					p_line_id				IN NUMBER 	Required
290 --						The line_id of the line which has reached SHIP_LINE work
291 --						flow activity.
292 --	Version     :	Current version = 1.0
293 --  	            Initial version = 1.0
294 --	End of Comments
295 --
296 PROCEDURE Process_Shipping_Activity
297 (
298 	p_api_version_number	IN	NUMBER
299 , 	p_line_id				IN	NUMBER
300 , x_result_out OUT NOCOPY VARCHAR2
301 
302 , x_return_status OUT NOCOPY VARCHAR2
303 
304 , x_msg_count OUT NOCOPY VARCHAR2
305 
306 , x_msg_data OUT NOCOPY VARCHAR2
307 
308 );
309 
310 PROCEDURE Process_SMC_Shipping
311 ( p_line_id                IN  NUMBER
312  ,p_top_model_line_id      IN  NUMBER
313 ,x_return_status OUT NOCOPY VARCHAR2);
314 
315 
316 PROCEDURE OM_To_WSH_Interface
317 ( p_line_rec      IN  OUT NOCOPY OE_WSH_BULK_GRP.LINE_REC_TYPE
318  ,p_header_rec    IN  OE_BULK_ORDER_PVT.HEADER_REC_TYPE
319  ,x_return_status OUT NOCOPY VARCHAR2);
320 
321 
322 PROCEDURE Handle_Config_Parent
323 ( p_ato_line_id   IN  NUMBER);
324 
325 
326 /* Added for bug 6021460 */
327 PROCEDURE ship_complete
328 (
329   p_application_id    IN  NUMBER
330 , p_entity_short_name   IN  VARCHAR2
331 , p_validation_entity_short_name  IN  VARCHAR2
332 , p_validation_tmplt_short_name IN  VARCHAR2
333 , p_record_set_short_name     IN  VARCHAR2
334 , p_scope             IN  VARCHAR2
335 , x_result_out OUT NOCOPY NUMBER
336 
337 );
338 
339 
340 
341 END OE_Shipping_Integration_PVT;