1 PACKAGE AHL_RSV_RESERVATIONS_PVT AS
2 /* $Header: AHLVRSVS.pls 120.3.12010000.2 2008/11/13 14:27:12 skpathak ship $ */
3
4 G_PKG_NAME CONSTANT VARCHAR2(30) := 'AHL_RSV_RESERVATIONS_PVT';
5
6 -- Definition of serial number table type
7 /**** {{ R12 Enhanced reservations code changes }}****/
8 TYPE serial_number_rec_type IS RECORD
9 (
10 inventory_item_id NUMBER
11 ,serial_number VARCHAR2(30)
12 );
13
14 TYPE serial_number_tbl_type IS TABLE OF serial_number_rec_type
15 INDEX BY BINARY_INTEGER;
16
17 ---------------------------------------------------------------------------------------------------------
18 -- Declare Procedures --
19 ---------------------------------------------------------------------------------------------------------
20 -- Start of Comments --
21 -- Procedure name : CREATE_RESERVATION
22 -- Type : Private
23 -- Function : Reserves the serial numbers in the p_serial_number_tbl
24 -- Pre-reqs :
25 -- Standard IN Parameters :
26 -- p_api_version IN NUMBER Required
27 -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
28 -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
29 -- p_validation_level IN NUMBER Default FND_API.G_VALID_LEVEL_FULL
30 -- p_module_type IN VARCHAR2 Default NULL
31 -- Standard OUT Parameters :
32 -- x_return_status OUT VARCHAR2 Required
33 -- x_msg_count OUT NUMBER Required
34 -- x_msg_data OUT VARCHAR2 Required
35
36 --
37 -- CREATE_RESERVATION Parameters:
38 -- p_scheduled_material_id : The Schedule Material Id
39 -- p_serial_number_tbl : The table of Serial Numbers to be reserved
40 -- End of Comments.
41 ---------------------------------------------------------------------------------------------------------
42 PROCEDURE CREATE_RESERVATION(
43 p_api_version IN NUMBER := 1.0,
44 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
45 p_commit IN VARCHAR2 := FND_API.G_FALSE,
46 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
47 p_module_type IN VARCHAR2,
48 x_return_status OUT NOCOPY VARCHAR2,
49 x_msg_count OUT NOCOPY NUMBER,
50 x_msg_data OUT NOCOPY VARCHAR2,
51 p_scheduled_material_id IN NUMBER ,
52 p_serial_number_tbl IN serial_number_tbl_type);
53
54
55 ---------------------------------------------------------------------------------------------------------
56 -- Declare Procedures --
57 ---------------------------------------------------------------------------------------------------------
58 -- Start of Comments --
59 -- Procedure name : UPDATE_RESERVATION
60 -- Type : Private
61 -- Function : Updates reservation for serial numbers in the p_serial_number_tbl
62 -- Pre-reqs :
63 -- Standard IN Parameters :
64 -- p_api_version IN NUMBER Required
65 -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
66 -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
67 -- p_validation_level IN NUMBER Default FND_API.G_VALID_LEVEL_FULL
68 -- p_module_type IN VARCHAR2 Default NULL
69 -- Standard OUT Parameters :
70 -- x_return_status OUT VARCHAR2 Required
71 -- x_msg_count OUT NUMBER Required
72 -- x_msg_data OUT VARCHAR2 Required
73
74 --
75 -- UPDATE_RESERVATION Parameters:
76 -- p_scheduled_material_id : The Schedule Material Id
77 -- p_requested_date : The new date for which the reservations need to chaned
78 -- End of Comments.
79 ---------------------------------------------------------------------------------------------------------
80 PROCEDURE UPDATE_RESERVATION(
81 p_api_version IN NUMBER := 1.0,
82 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
83 p_commit IN VARCHAR2 := FND_API.G_FALSE,
84 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
85 p_module_type IN VARCHAR2,
86 x_return_status OUT NOCOPY VARCHAR2,
87 x_msg_count OUT NOCOPY NUMBER,
88 x_msg_data OUT NOCOPY VARCHAR2,
89 p_scheduled_material_id IN NUMBER ,
90 p_requested_date IN DATE);
91
92
93 ---------------------------------------------------------------------------------------------------------
94 -- Declare Procedures --
95 ---------------------------------------------------------------------------------------------------------
96 -- Start of Comments --
97 -- Procedure name : DELETE_RESERVATION
98 -- Type : Private
99 -- Function : API to delete all the reservation made for a requirement
100 -- Pre-reqs :
101 -- Standard IN Parameters :
102 -- p_api_version IN NUMBER Required
103 -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
104 -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
105 -- p_validation_level IN NUMBER Default FND_API.G_VALID_LEVEL_FULL
106 -- p_module_type IN VARCHAR2 Default NULL
107 -- Standard OUT Parameters :
108 -- x_return_status OUT VARCHAR2 Required
109 -- x_msg_count OUT NUMBER Required
110 -- x_msg_data OUT VARCHAR2 Required
111
112 --
113 -- DELETE_RESERVATION Parameters:
114 -- p_scheduled_material_id : The Schedule Material Id
115 -- p_sub_inventory_code : If not null then only reservations from this subinventory will be deleted, if null all the reservations will be deleted.
116 -- p_serial_number : If not null, then only the reservation (may have other serials also) with this serial number will be deleted.
117 -- End of Comments.
118 ---------------------------------------------------------------------------------------------------------
119 PROCEDURE DELETE_RESERVATION(
120 p_api_version IN NUMBER := 1.0,
121 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
122 p_commit IN VARCHAR2 := FND_API.G_FALSE,
123 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
124 p_module_type IN VARCHAR2,
125 x_return_status OUT NOCOPY VARCHAR2,
126 x_msg_count OUT NOCOPY NUMBER,
127 x_msg_data OUT NOCOPY VARCHAR2,
128 p_scheduled_material_id IN NUMBER ,
129 p_sub_inventory_code IN VARCHAR2 := NULL,
130 p_serial_number IN VARCHAR2 := NULL);
131 ---------------------------------------------------------------------------------------------------------
132 -- Declare Procedures --
133 ---------------------------------------------------------------------------------------------------------
134 -- Start of Comments --
135 -- Procedure name : RELIEVE_RESERVATION
136 -- Type : Private
137 -- Function : API to delete the reservation made for a particular serial number
138 -- Pre-reqs :
139 -- Standard IN Parameters :
140 -- p_api_version IN NUMBER Required
141 -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
142 -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
143 -- p_validation_level IN NUMBER Default FND_API.G_VALID_LEVEL_FULL
144 -- p_module_type IN VARCHAR2 Default NULL
145 -- Standard OUT Parameters :
146 -- x_return_status OUT VARCHAR2 Required
147 -- x_msg_count OUT NUMBER Required
148 -- x_msg_data OUT VARCHAR2 Required
149
150 --
151 -- RELIEVE_RESERVATION Parameters:
152 -- p_scheduled_material_id : The Schedule Material Id
153 -- p_serial_number : The Serial number whose reservation has to be deleted
154 -- End of Comments.
155 ---------------------------------------------------------------------------------------------------------
156 PROCEDURE RELIEVE_RESERVATION(
157 p_api_version IN NUMBER := 1.0,
158 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
159 p_commit IN VARCHAR2 := FND_API.G_FALSE,
160 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
161 p_module_type IN VARCHAR2,
162 x_return_status OUT NOCOPY VARCHAR2,
163 x_msg_count OUT NOCOPY NUMBER,
164 x_msg_data OUT NOCOPY VARCHAR2,
165 p_scheduled_material_id IN NUMBER ,
166 p_serial_number IN VARCHAR2);
167
168
169
170 ---------------------------------------------------------------------------------------------------------
171 -- Declare Procedures --
172 ---------------------------------------------------------------------------------------------------------
173 -- Start of Comments --
174 -- Procedure name : TRANSFER_RESERVATION
175 -- Type : Private
176 -- Function : API to delete the reservation made for a particular serial number
177 -- Pre-reqs :
178 -- Standard IN Parameters :
179 -- p_api_version IN NUMBER Required
180 -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
181 -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
182 -- p_validation_level IN NUMBER Default FND_API.G_VALID_LEVEL_FULL
183 -- p_module_type IN VARCHAR2 Default NULL
184 -- Standard OUT Parameters :
185 -- x_return_status OUT VARCHAR2 Required
186 -- x_msg_count OUT NUMBER Required
187 -- x_msg_data OUT VARCHAR2 Required
188
189 --
190 -- TRANSFER_RESERVATION Parameters:
191 -- p_visit_id : The id of the visit for which the reservations need to be transferred.
192 -- End of Comments.
193 ---------------------------------------------------------------------------------------------------------
194 PROCEDURE TRANSFER_RESERVATION(
195 p_api_version IN NUMBER := 1.0,
196 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
197 p_commit IN VARCHAR2 := FND_API.G_FALSE,
198 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
199 p_module_type IN VARCHAR2,
200 x_return_status OUT NOCOPY VARCHAR2,
201 x_msg_count OUT NOCOPY NUMBER,
202 x_msg_data OUT NOCOPY VARCHAR2,
203 p_visit_id IN NUMBER);
204
205
206
207 ---------------------------------------------------------------------------------------------------------
208 -- Declare Procedures --
209 ---------------------------------------------------------------------------------------------------------
210 -- Start of Comments --
211 -- Procedure name : UPDATE_VISIT_RESERVATIONS
212 -- Type : Private
213 -- Function : API to update all the reservations for s particular visit
214 -- Pre-reqs :
215 -- Standard IN Parameters :
216 -- Standard OUT Parameters :
217 -- x_return_status OUT VARCHAR2 Required
218 --
219 -- UPDATE_VISIT_RESERVATIONS Parameters:
220 -- p_visit_id : The visit id for which the reservations need to be transferred.
221 -- End of Comments.
222 ---------------------------------------------------------------------------------------------------------
223 PROCEDURE UPDATE_VISIT_RESERVATIONS(
224 x_return_status OUT NOCOPY VARCHAR2,
225 p_visit_id IN NUMBER);
226
227
228 ---------------------------------------------------------------------------------------------------------
229 -- Declare Procedures --
230 ---------------------------------------------------------------------------------------------------------
231 -- Start of Comments --
232 -- Procedure name : DELETE_VISIT_RESERVATIONS
233 -- Type : Private
234 -- Function : API to delete all the reservations for s particular visit
235 -- Pre-reqs :
236 -- Standard IN Parameters :
237 -- Standard OUT Parameters :
238 -- x_return_status OUT VARCHAR2 Required
239 --
240 -- DELETE_VISIT_RESERVATIONS Parameters:
241 -- p_visit_id : The visit id for which the reservations need to be deleted
242 -- End of Comments.
243 ---------------------------------------------------------------------------------------------------------
244 PROCEDURE DELETE_VISIT_RESERVATIONS(
245 x_return_status OUT NOCOPY VARCHAR2,
246 p_visit_id IN NUMBER);
247
248
249 ---------------------------------------------------------------------------------------------------------
250 -- Declare Procedures --
251 ---------------------------------------------------------------------------------------------------------
252 -- Start of Comments --
253 -- Procedure name : TRANSFER_RESERVATION_MATRL_REQR
254 -- Type : Private
255 -- Function : API to transfer reservations for a particular material requirement
256 -- Pre-reqs :
257 -- Standard IN Parameters :
258 -- Standard OUT Parameters :
259 -- x_return_status OUT VARCHAR2 Required
260 -- x_msg_count
261 -- x_msg_data
262 -- DELETE_VISIT_RESERVATIONS Parameters:
263 -- p_visit_task_id : The task id for which the reservations need to be transferred
264 -- p_from_mat_req_id : The scheduled material id of the from record
265 -- p_to_mat_req_id : The scheduled material id of the to record
266 -- End of Comments.
267 ---------------------------------------------------------------------------------------------------------
268 PROCEDURE TRNSFR_RSRV_FOR_MATRL_REQR(
269 p_api_version IN NUMBER := 1.0,
270 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
271 p_commit IN VARCHAR2 := FND_API.G_FALSE,
272 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
273 p_module_type IN VARCHAR2,
274 x_return_status OUT NOCOPY VARCHAR2,
275 x_msg_count OUT NOCOPY NUMBER,
276 x_msg_data OUT NOCOPY VARCHAR2,
277 p_visit_task_id IN NUMBER,
278 p_from_mat_req_id IN NUMBER,
279 p_to_mat_req_id IN NUMBER
280 );
281
282 END AHL_RSV_RESERVATIONS_PVT;