1 PACKAGE gme_api_pub AS
2 /* $Header: GMEPAPIS.pls 120.32.12010000.1 2008/07/25 10:29:13 appldev ship $ */
3 /*#
4 * This file contains the headers for the Process Execution (GME) APIs in
5 * Oracle Process Manufacturing (OPM). Each procedure has a common set of
6 * parameters to which API-specific parameters are appended.
7 * @rep:scope public
8 * @rep:product GME
9 * @rep:displayname Production Management public api's
10 * @rep:lifecycle active
11 * @rep:category BUSINESS_ENTITY GME_BATCH
12 */
13
14 /*#
15 * Save Batch Procedure
16 * This procedure allows the user to save a batch.
17 * It is used to consolidate all the transactions from the temporary
18 * tables and write them to the main tables.
19 * @param p_header_id NUMBER Optional.
20 * @param p_table NUMBER Optional To indicate which table to be processed by Transaction Manager.
21 * @param p_clear_qty_cache BOOLEAN default to true to clear qty cache
22 * @param x_return_status return status
23 * @param p_commit commit flag - default is 'F'
24 * @rep:scope public
25 * @rep:lifecycle active
26 * @rep:displayname save_batch
27 */
28 /*================================================================================
29 Procedure
30 save_batch
31 Description
32 This procedure is used to consolidate all the transactions from the temporary
33 tables and write them to the main tables.
34 Parameters
35 p_header_id (O) The header_id used by the inventory transaction manager.
36 p_table (O) Table to process by Transaction Manager
37 1 - temp table
38 2 - interface table
39 x_return_status outcome of the API call
40 S - Success
41 E - Error
42 U - Unexpected Error
43 p_commit Indicates whether to commit.
44 'T' (FND_API.G_TRUE) - to commit work
45 'F' (FND_API.G_FALSE) - Not to commit work
46 This is defaulted 'F'
47 ================================================================================*/
48 /* Bug 5255959 added p_clear_qty_cache parameter */
49 PROCEDURE save_batch (
50 p_header_id IN NUMBER DEFAULT NULL
51 ,p_table IN NUMBER DEFAULT NULL
52 ,p_commit IN VARCHAR2 := fnd_api.g_false
53 ,x_return_status OUT NOCOPY VARCHAR2
54 --Bug#5584699 Changed the datatype from boolean to varchar2.
55 ,p_clear_qty_cache IN VARCHAR2 := fnd_api.g_true);
56 --,p_clear_qty_cache IN BOOLEAN DEFAULT TRUE);
57
58 /*#
59 * Create Batch Procedure
60 * This procedure creates batch, then check for Items failing allocation and
61 * inventory shortages.
62 * @param p_api_version Version of the api
63 * @param p_validation_level validation level
64 * @param p_init_msg_list message list flag - default is 'F'
65 * @param p_commit commit flag - default is 'F'
66 * @param x_message_count # of messages
67 * @param x_message_list List of messages
68 * @param x_return_status return status
69 * @param p_org_code Inventory Organization (Plant or Lab)
70 * @param p_batch_header_rec gme_batch_header rowtype
71 * @param x_batch_header_rec gme_batch_header rowtype
72 * @param p_batch_size batch size
73 * @param p_batch_size_uom batch size uom
74 * @param p_creation_mode creation mode
75 * @param p_recipe_id recipe id
76 * @param p_recipe_no recipe no
77 * @param p_recipe_version recipe version
78 * @param p_product_no product no
79 * @param p_item_revision item revision of the product, if revision control
80 * @param p_product_id product id
81 * @param p_ignore_qty_below_cap ignore below capacity qty
82 * @param p_use_workday_cal use shop calendar flag
83 * @param p_contiguity_override contiguity override flag
84 * @param p_use_least_cost_validity_rule use least cost validity rule to create batch
85 * @param x_exception_material_tbl table of exception records
86 * @rep:scope public
87 * @rep:lifecycle active
88 * @rep:displayname create_batch
89 */
90
91 /*================================================================================
92 Procedure
93 create_batch
94 Description
95 This procedure creates batch, then check for inventory shortages.
96 Parameters
97 p_org_code (O) Organization code of the plant or lab
98 p_batch_header_rec (R) The batch header row to identify the batch
99 Following columns are used from this row.
100 organization_id (R)
101 recipe_validity_rule_id (R)
102 batch_type (R)
103 update_inventory_ind (R)
104 batch_no (R In case of manual document ordering)
105 plan_start_date (O)
106 plan_cmplt_date (O)
107 due_date (O)
108 wip_whse_code (O)
109 p_batch_size (R) Batch Size (Total input, total output or product quantity)
110 Batch size is NULL for recipe mode of creation.
111 p_batch_size_uom (R) UOM for p_batch_size
112 p_creation_mode (R) How the batch is created
113 RECIPE
114 PRODUCT
115 TOTAL_OUTPUT
116 TOTAL_INPUT
117 p_recipe_id (O) Recipe_id for which the batch is to be created.
118 p_recipe_no (O) Recipe number along with recipe_version for which the
119 batch is to be created.
120 p_recipe_version (O) Version of the recipe for which the batch is t be created.
121 p_product_no (O) Item number for which the batch is to be created.
122 p_item_revision (O) Item revision of the product if it is revision controlled
123 p_product_id (O) Item ID for which the batch is to be created.
124 p_ignore_qty_below_cap (O)Whether the batch is to be created or not, when resource
125 quantity goes below minimum capacity of the resource.
126 'T' (Default)
127 'F'
128 p_use_workday_cal VARCHAR2('F','T') - to use workday calendar or not.
129 p_contiguity_override VARCHAR2('F','T') - for contigious period of calendar.
130 p_use_least_cost_validity_rule VARCHAR2('F','T') - for least cost batch validity rule.
131 x_batch_header_rec The batch header that is returned,
132 x_return_status outcome of the API call
133 S - Success
134 E - Error
135 U - Unexpected Error
136 V - Inventory shortage exists
137 x_exception_material_tbl Table of exception records
138 ================================================================================*/
139 PROCEDURE create_batch (
140 p_api_version IN NUMBER
141 ,p_validation_level IN NUMBER
142 := gme_common_pvt.g_max_errors
143 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
144 ,p_commit IN VARCHAR2 := fnd_api.g_false
145 ,x_message_count OUT NOCOPY NUMBER
146 ,x_message_list OUT NOCOPY VARCHAR2
147 ,x_return_status OUT NOCOPY VARCHAR2
148 ,p_org_code IN VARCHAR2 := NULL
149 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
150 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
151 ,p_batch_size IN NUMBER := NULL
152 ,p_batch_size_uom IN VARCHAR2 := NULL
153 ,p_creation_mode IN VARCHAR2
154 ,p_recipe_id IN NUMBER := NULL
155 ,p_recipe_no IN VARCHAR2 := NULL
156 ,p_recipe_version IN NUMBER := NULL
157 ,p_product_no IN VARCHAR2 := NULL
158 ,p_item_revision IN VARCHAR2 := NULL
159 ,p_product_id IN NUMBER := NULL
160 ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
161 ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
162 ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
163 ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
164 ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab);
165
166 /*#
167 * Create Phantom Procedure
168 * This procedure creates batch, then check for Items failing allocation and
169 * inventory shortages.
170 * @param p_api_version Version of the api
171 * @param p_validation_level validation level
172 * @param p_init_msg_list message list flag - default is 'F'
173 * @param p_commit commit flag - default is 'F'
174 * @param x_message_count # of messages
175 * @param x_message_list List of messages
176 * @param x_return_status return status
177 * @param p_material_detail_rec gme_material_details rowtype
178 * @param p_org_code Inventory Organization (Plant or Lab)
179 * @param p_batch_no batch no
180 * @param x_material_detail_rec gme_material_details rowtype
181 * @param p_validity_rule_id validity rule id
182 * @param p_use_workday_cal use shop calendar flag
183 * @param p_contiguity_override contiguity override flag
184 * @param p_use_least_cost_validity_rule use least cost validity rule
185 * @param x_exception_material_tbl table of exception records
186 * @rep:scope public
187 * @rep:lifecycle active
188 * @rep:displayname create_phantom
189 */
190 /*================================================================================
191 Procedure
192 create_phantom
193 Description
194 This procedure creates phantom batch based on the validity rule passsed
195
196 Parameters
197 p_material_details (R) The material detail row to identify the material
198 Following columns are used from this row.
199 material_detail_id (R)
200 p_org_code (O) Organization code of the plant or lab
201 p_batch_no (O) Batch no, in case of manual document ordering
202 p_validity_rule_id (R) validity rule to use for creating phantom batch
203 p_ignore_shortages (R) Do not check for the inventory shortages
204 p_use_workday_cal VARCHAR2('F','T') - to use workday calendar or not.
205 p_contiguity_override VARCHAR2('F','T') - for contigious period of calendar.
206 p_use_least_cost_validity_rule VARCHAR2('F','T') - for least cost batch validity rule.
207 x_material_details_rec The material detail that is returned, with all the data
208 inventory shortage exists
209 x_return_status outcome of the API call
210 S - Success
211 E - Error
212 U - Unexpected Error
213 x_exception_material_tbl Table of exception records
214 ================================================================================*/
215 PROCEDURE create_phantom (
216 p_api_version IN NUMBER
217 ,p_validation_level IN NUMBER
218 := gme_common_pvt.g_max_errors
219 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
220 ,p_commit IN VARCHAR2 := fnd_api.g_false
221 ,x_message_count OUT NOCOPY NUMBER
222 ,x_message_list OUT NOCOPY VARCHAR2
223 ,x_return_status OUT NOCOPY VARCHAR2
224 ,p_material_detail_rec IN gme_material_details%ROWTYPE
225 ,p_batch_header_rec IN gme_batch_header%ROWTYPE --Bug#6738476
226 ,p_org_code IN VARCHAR2
227 ,p_batch_no IN VARCHAR2 DEFAULT NULL
228 ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
229 ,p_validity_rule_id IN NUMBER
230 ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
231 ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
232 ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
233 ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab);
234
235 /*#
236 * Scale Batch Procedure
237 * This procedure reschedules a batch and all associated phantom batches.
238 * It also reschedules all the steps, if requested so.
239 * @param p_api_version Version of the api
240 * @param p_validation_level validation level
241 * @param p_init_msg_list message list flag - default is 'F'
242 * @param p_commit commit flag - default is 'F'
243 * @param x_message_count # of messages
244 * @param x_message_list List of messages
245 * @param x_return_status return status
246 * @param p_batch_header_rec gme_batch_header rowtype
247 * @param p_org_code Inventory Organization (Plant or Lab)
248 * @param p_ignore_exception Ignore exceptions raised during Scale batch
249 * @param p_use_workday_cal use shop calendar flag
250 * @param p_contiguity_override contiguity override
251 * @param p_recalc_dates recalculate dates vased on new resource usage
252 * @param p_scale_factor factor by which quantities should be scaled
253 * @param p_qty_type 1 - batch quantities, 0 - formula quantities
257 * @rep:scope public
254 * @param p_primaries INPUT scale based in Ingredients, OUTPUT scale based on Products
255 * @param x_batch_header_rec gme_batch_header rowtype
256 * @param x_exception_material_tbl table of exception records
258 * @rep:lifecycle active
259 * @rep:displayname reschedule_batch
260 */
261 /*================================================================================
262 Procedure
263 scale_batch
264 Description
265 This procedure reschedules batch and all the phantom batches.
266 It also reschedules all the steps, if requested so.
267
268 Parameters
269 p_batch_header_rec (R) The batch header row to identify the batch
270 Following columns are used from this row.
271 batch_id (R)
272 plan_start_date (R)
273 plan_cmplt_date (R)
274 p_org_code (O) Organization code of the plant or lab
275 p_use_workday_cal VARCHAR2('F','T') - to use workday calendar or not.
276 p_contiguity_override VARCHAR2('F','T') - for contigious period of calendar.
277 p_recalc_dates VARCHAR2('F','T') - recalculate dates or not.
278 p_scale_factor (O) scale factor for scaling
279 p_primaries (R) (INPUT, OUTPUT) scale based on Ingredients or Products
280 p_qty_type (O) (0,1) Use formula quantities or batch quantities
281 x_batch_header_rec The batch header that is returned, with all the data
282 x_return_status outcome of the API call
283 S - Success
284 E - Error
285 U - Unexpected Error
286 x_exception_material_tbl Table of exception records
287 ================================================================================*/
288 PROCEDURE scale_batch (
289 p_api_version IN NUMBER
290 ,p_validation_level IN NUMBER
291 := gme_common_pvt.g_max_errors
292 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
293 ,p_commit IN VARCHAR2 := fnd_api.g_false
294 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
295 ,p_org_code IN VARCHAR2
296 ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
297 ,p_scale_factor IN NUMBER
298 ,p_primaries IN VARCHAR2
299 ,p_qty_type IN NUMBER := 1
300 ,p_recalc_dates IN VARCHAR2 := fnd_api.g_false
301 ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_false
302 ,p_contiguity_override IN VARCHAR2 := fnd_api.g_false
303 ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
304 ,x_message_count OUT NOCOPY NUMBER
305 ,x_message_list OUT NOCOPY VARCHAR2
306 ,x_return_status OUT NOCOPY VARCHAR2
307 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE);
308
309 /*#
310 * Theoretical Yield Batch Procedure
311 * This procedure calculates theoretical yield for the batch, and updates the
312 * quantities for the product lines.
313 * @param p_api_version Version of the api
314 * @param p_validation_level validation level
315 * @param p_init_msg_list message list flag - default is False
316 * @param x_message_count # of messages
317 * @param x_message_list List of messages
318 * @param p_commit commit flag - default is False
319 * @param x_return_status return status
320 * @param p_org_code Inventory Organization (Plant or Lab)
321 * @param p_batch_header_rec gme_batch_header rowtype
322 * @param p_scale_factor scale factor for theoretical yield
323 * @rep:scope public
324 * @rep:lifecycle active
325 * @rep:displayname theoretical_yield_batch
326 */
327
328 /*================================================================================
329 Procedure
330 theoretical_yield_batch
331 Description
332 This procedure calculates theoretical yield for the batch, and updates the
333 quantities for the product lines.
334
335 Parameters
336 p_batch_header (R) The batch header row to identify the batch
337 Following columns are used from this row.
338 batch_id (R)
339 p_org_code (O) Organization code of the plant or lab
343 x_return_status outcome of the API call
340 p_scale_factor (R) Theoretical yield in fractions
341
342 x_batch_header The batch header that is returned, with all the data
344 S - Success
345 E - Error
346 U - Unexpected Error
347 ================================================================================*/
348 PROCEDURE theoretical_yield_batch (
349 p_api_version IN NUMBER := 2.0
350 ,p_validation_level IN NUMBER
351 := gme_common_pvt.g_max_errors
352 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
353 ,p_commit IN VARCHAR2 := fnd_api.g_false
354 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
355 ,p_org_code IN VARCHAR2
356 ,p_scale_factor IN NUMBER
357 ,x_message_count OUT NOCOPY NUMBER
358 ,x_message_list OUT NOCOPY VARCHAR2
359 ,x_return_status OUT NOCOPY VARCHAR2);
360 /*#
361 * Update Actual Resource Usage Procedure
362 * This procedure is used to insert a completed resource txn for a
363 * resource.This procedure removes all the existing resource txn for the specified
364 * resource.This API can be used only bor a WIP or Complete step.
365 * @param p_api_version Version of the api
366 * @param p_validation_level validation level
367 * @param p_init_msg_list message list flag - default is False
368 * @param p_commit commit flag - default is False
369 * @param p_org_code Inventory Organization (Plant or Lab)
370 * @param p_batch_no Batch No
371 * @param p_batchstep_no Batch Step No
372 * @param p_activity Activity
373 * @param p_resource Resource
374 * @param p_rsrc_txn_rec gme_rsrc_txn_rec rowtype
375 * @param p_instance_no Instance No
376 * @param p_reason_name Reason Name from the mtl_transaction_reasons
377 * @param p_validate_flexfields validate flexfields flag ('T','F')
378 * @param x_rsrc_txn_rec gme_rsrc_txn_rec rowtype
379 * @param x_message_count # of messages
380 * @param x_message_list List of messages
381 * @param x_return_status return status
382 * @rep:scope public
383 * @rep:lifecycle active
384 * @rep:displayname update_actual_rsrc_usage
385 */
386
387 /*================================================================================
388 Procedure
389 update_actual_rsrc_usage
390 Description
391 This procedure is used to insert a completed resource txn for a
392 resource.This procedure removes all the existing resource txn for the specified
393 resource.This API can be used only bor a WIP or Complete step.
394
395 Parameters
396 p_org_code (O) Organization code of the plant or lab
397 p_batch_no (R) Batch no.
398 p_batchstep_no (R) Batch Step no .
399 p_activity (R) Activity.
400 p_resource (R) Resource.
401 p_instance_no (O) instance no - for WPS use
402 p_reason_name (O) Reasone Name (reason from mtl_transaction_reasons)
403 p_rsrc_txn_rec (R) gme_resource_txns rowtype
404 p_validate_flexfields (O) validate flexfield flag ('T','F')
405 x_rsrc_txn_rec (R) gme_resource_txns rowtype
406 x_return_status outcome of the API call
407 S - Success
408 E - Error
409 U - Unexpected Error
410 ================================================================================*/
411
412 PROCEDURE update_actual_rsrc_usage (
413 p_api_version IN NUMBER := 2.0
414 ,p_validation_level IN NUMBER
415 := gme_common_pvt.g_max_errors
416 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
417 ,p_commit IN VARCHAR2 := fnd_api.g_false
418 ,p_org_code IN VARCHAR2
419 , /* inventory organization under which the batch was created */
420 p_batch_no IN VARCHAR2 := NULL
421 ,p_batchstep_no IN NUMBER := NULL
422 ,p_activity IN VARCHAR2 := NULL
423 ,p_resource IN VARCHAR2 := NULL
424 ,p_instance_no IN NUMBER := NULL
425 ,p_reason_name IN VARCHAR2 := NULL
426 ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
427 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
428 , /* indicates whether to validate the flex fields*/
429 x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
430 ,x_message_count OUT NOCOPY NUMBER
431 ,x_message_list OUT NOCOPY VARCHAR2
432 ,x_return_status OUT NOCOPY VARCHAR2);
433
434 /*#
435 * Insert Incremental Resource Transaction Procedure
436 * This procedure is used to incrementally insert a complete resource txn allocation for a
437 * resource.This API can be used only for a WIP or Complete step.
438 * @param p_api_version Version of the api
439 * @param p_validation_level validation level
440 * @param p_init_msg_list message list flag - default is False
441 * @param p_commit commit flag - default is False
442 * @param p_org_code Inventory Organization (Plant or Lab)
443 * @param p_batch_no Batch No
447 * @param p_rsrc_txn_rec gme_rsrc_txn_rec rowtype
444 * @param p_batchstep_no Batch Step No
445 * @param p_activity Activity
446 * @param p_resource Resource
448 * @param p_instance_no Instance No
449 * @param p_reason_name Reason Name from the mtl_transaction_reasons
450 * @param p_validate_flexfields validate flexfields flag ('T','F')
451 * @param x_rsrc_txn_rec gme_rsrc_txn_rec rowtype
452 * @param x_message_count # of messages
453 * @param x_message_list List of messages
454 * @param x_return_status return status
455 * @rep:scope public
456 * @rep:lifecycle active
457 * @rep:displayname insert_incr_actual_rsrc_txn
458 */
459
460 /*================================================================================
461 Procedure
462 insert_incr_actual_rsrc_txn
463 Description
464 This procedure is used to incrementally insert a complete resource txn allocation for a
465 resource.This API can be used only for a WIP or Complete step.
466
467 Parameters
468 p_org_code (O) Organization code of the plant or lab
469 p_batch_no (R) Batch no.
470 p_batchstep_no (R) Batch Step no .
471 p_activity (R) Activity.
472 p_resource (R) Resource.
473 p_instance_no (O) instance no - for WPS use
474 p_reason_name (O) Reasone Name (reason from mtl_transaction_reasons)
475 p_rsrc_txn_rec (R) gme_resource_txns rowtype
476 p_validate_flexfields (O) validate flexfield flag ('T','F')
477 x_rsrc_txn_rec (R) gme_resource_txns rowtype
478 x_return_status outcome of the API call
479 S - Success
480 E - Error
481 U - Unexpected Error
482 ================================================================================*/
483 PROCEDURE insert_incr_actual_rsrc_txn (
484 p_api_version IN NUMBER := 2.0
485 ,p_validation_level IN NUMBER
486 := gme_common_pvt.g_max_errors
487 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
488 ,p_commit IN VARCHAR2 := fnd_api.g_false
489 ,p_org_code IN VARCHAR2
490 , /* inventory organization under which the batch was created.*/
491 p_batch_no IN VARCHAR2 := NULL
492 ,p_batchstep_no IN NUMBER := NULL
493 ,p_activity IN VARCHAR2 := NULL
494 ,p_resource IN VARCHAR2 := NULL
495 ,p_instance_no IN NUMBER := NULL
496 ,p_reason_name IN VARCHAR2 := NULL
497 ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
498 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
499 , /* indicates whether to validate the flex fields */
500 x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
501 ,x_message_count OUT NOCOPY NUMBER
502 ,x_message_list OUT NOCOPY VARCHAR2
503 ,x_return_status OUT NOCOPY VARCHAR2);
504
505 /*#
506 * Insert Timed Actual Resource Transaction Procedure
507 * This procedure is used to insert a complete resource txn allocation for a
508 * resource.usage is calculated from txn dates supplied.
509 * This API can be used only bor a WIP or Complete step.
510 * @param p_api_version Version of the api
511 * @param p_validation_level validation level
512 * @param p_init_msg_list message list flag - default is False
513 * @param p_commit commit flag - default is False
514 * @param p_org_code Inventory Organization (Plant or Lab)
515 * @param p_batch_no Batch No
516 * @param p_batchstep_no Batch Step No
517 * @param p_activity Activity
518 * @param p_resource Resource
519 * @param p_rsrc_txn_rec gme_rsrc_txn_rec rowtype
520 * @param p_instance_no Instance No
521 * @param p_reason_name Reason Name from the mtl_transaction_reasons
522 * @param p_validate_flexfields validate flexfields flag ('T','F')
523 * @param x_rsrc_txn_rec gme_rsrc_txn_rec rowtype
524 * @param x_message_count # of messages
525 * @param x_message_list List of messages
526 * @param x_return_status return status
527 * @rep:scope public
528 * @rep:lifecycle active
529 * @rep:displayname insert_timed_actual_rsrc_txn
530 */
531
535 Description
532 /*================================================================================
533 Procedure
534 insert_timed_actual_rsrc_txn
536 This procedure is used to insert a complete resource txn allocation for a
537 resource.usage is calculated from txn dates supplied.
538 This API can be used only for a WIP or Complete step.
539
540 Parameters
541 p_org_code (O) Organization code of the plant or lab
542 p_batch_no (R) Batch no.
543 p_batchstep_no (R) Batch Step no .
544 p_activity (R) Activity.
545 p_resource (R) Resource.
546 p_instance_no (O) instance no - for WPS use
547 p_reason_name (O) Reasone Name (reason from mtl_transaction_reasons)
548 p_rsrc_txn_rec (R) gme_resource_txns rowtype
549 p_validate_flexfields (O) validate flexfield flag ('T','F')
550 x_rsrc_txn_rec (R) gme_resource_txns rowtype
551 x_return_status outcome of the API call
552 S - Success
553 E - Error
554 U - Unexpected Error
555 ================================================================================*/
556 PROCEDURE insert_timed_actual_rsrc_txn (
557 p_api_version IN NUMBER := 2.0
558 ,p_validation_level IN NUMBER
559 := gme_common_pvt.g_max_errors
560 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
561 ,p_commit IN VARCHAR2 := fnd_api.g_false
562 ,p_org_code IN VARCHAR2
563 , /* inventory organization under which the batch was created. */
564 p_batch_no IN VARCHAR2 := NULL
565 ,p_batchstep_no IN NUMBER := NULL
566 ,p_activity IN VARCHAR2 := NULL
567 ,p_resource IN VARCHAR2 := NULL
568 ,p_instance_no IN NUMBER := NULL
569 ,p_reason_name IN VARCHAR2 := NULL
570 ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
571 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
572 , /* indicates whether to validate the flex fields */
573 x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
574 ,x_message_count OUT NOCOPY NUMBER
575 ,x_message_list OUT NOCOPY VARCHAR2
576 ,x_return_status OUT NOCOPY VARCHAR2);
577
578 /*#
579 * Start Complete Actual Resource Transaction Procedure
580 * This procedure is used to start a complete resource txn for a resource.
581 * usage of the txn is 0 as the txn has just started.end_cmplt_actual_rsrc_txn
582 * API is used to complete a started txn
583 * @param p_api_version Version of the api
584 * @param p_validation_level validation level
585 * @param p_init_msg_list message list flag - default is False
586 * @param p_commit commit flag - default is False
587 * @param p_org_code Inventory Organization (Plant or Lab)
588 * @param p_batch_no Batch No
589 * @param p_batchstep_no Batch Step No
590 * @param p_activity Activity
591 * @param p_resource Resource
592 * @param p_rsrc_txn_rec gme_rsrc_txn_rec rowtype
593 * @param p_instance_no Instance No
594 * @param p_reason_name Reason Name from the mtl_transaction_reasons
595 * @param p_validate_flexfields validate flexfields flag ('T','F')
596 * @param x_rsrc_txn_rec gme_rsrc_txn_rec rowtype
597 * @param x_message_count # of messages
598 * @param x_message_list List of messages
599 * @param x_return_status return status
600 * @rep:scope public
601 * @rep:lifecycle active
602 * @rep:displayname start_cmplt_actual_rsrc_txn
603 */
604
605 /*================================================================================
606 Procedure
607 start_cmplt_actual_rsrc_txn
608 Description
609 This procedure is used to start a complete resource txn for a resource.
610 usage of the txn is 0 as the txn has just started.end_cmplt_actual_rsrc_txn
611 API is used to complete a started txn
612
613 Parameters
614 p_org_code (O) Organization code of the plant or lab
615 p_batch_no (R) Batch no.
616 p_batchstep_no (R) Batch Step no .
617 p_activity (R) Activity.
618 p_resource (R) Resource.
619 p_instance_no (O) instance no - for WPS use
620 p_reason_name (O) Reasone Name (reason from mtl_transaction_reasons)
621 p_rsrc_txn_rec (R) gme_resource_txns rowtype
622 p_validate_flexfields (O) validate flexfield flag ('T','F')
623 x_rsrc_txn_rec (R) gme_resource_txns rowtype
624 x_return_status outcome of the API call
625 S - Success
626 E - Error
627 U - Unexpected Error
628 ================================================================================*/
629 PROCEDURE start_cmplt_actual_rsrc_txn (
630 p_api_version IN NUMBER := 2.0
631 ,p_validation_level IN NUMBER
632 := gme_common_pvt.g_max_errors
633 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
634 ,p_commit IN VARCHAR2 := fnd_api.g_false
635 ,p_org_code IN VARCHAR2
639 ,p_activity IN VARCHAR2 := NULL
636 , /*inventory organization under which the batch was created.*/
637 p_batch_no IN VARCHAR2 := NULL
638 ,p_batchstep_no IN NUMBER := NULL
640 ,p_resource IN VARCHAR2 := NULL
641 ,p_instance_no IN NUMBER
642 ,p_reason_name IN VARCHAR2 := NULL
643 , /*instance of the resource for which the transaction is being added.*/
644 p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
645 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
646 , /*indicates whether to validate the flex fields*/
647 x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
648 ,x_message_count OUT NOCOPY NUMBER
649 ,x_message_list OUT NOCOPY VARCHAR2
650 ,x_return_status OUT NOCOPY VARCHAR2);
651
652 /*#
653 * End Complete Actual Resource Transaction Procedure
654 * This procedure is used to start a complete resource txn for a resource.
655 * usage of the txn is 0 as the txn has just started.end_cmplt_actual_rsrc_txn
656 * API is used to complete a started txn
657 * @param p_api_version Version of the api
658 * @param p_validation_level validation level
659 * @param p_init_msg_list message list flag - default is False
660 * @param p_commit commit flag - default is False
661 * @param p_rsrc_txn_rec gme_rsrc_txn_rec rowtype
662 * @param p_instance_no Instance No
663 * @param p_reason_name Reason Name from the mtl_transaction_reasons
664 * @param p_validate_flexfields validate flexfields flag ('T','F')
665 * @param x_rsrc_txn_rec gme_rsrc_txn_rec rowtype
666 * @param x_message_count # of messages
667 * @param x_message_list List of messages
668 * @param x_return_status return status
669 * @rep:scope public
670 * @rep:lifecycle active
671 * @rep:displayname end_cmplt_actual_rsrc_txn
672 */
673
674 /*================================================================================
675 Procedure
676 end_cmplt_actual_rsrc_txn
677 Description
678 This procedure is used to end a rsrc txn that was started earlier using
679 start_cmplt_actual_rsrc_txn API. The usage of specified txn must be 0.
680
681 Parameters
682 p_instance_no (O) instance no - for WPS use
683 p_reason_name (O) Reasone Name (reason from mtl_transaction_reasons)
684 p_rsrc_txn_rec (R) gme_resource_txns rowtype
685 p_validate_flexfields (O) validate flexfield flag ('T','F')
686 x_rsrc_txn_rec (R) gme_resource_txns rowtype
687 x_return_status outcome of the API call
688 S - Success
689 E - Error
690 U - Unexpected Error
691 ================================================================================*/
692 PROCEDURE end_cmplt_actual_rsrc_txn (
693 p_api_version IN NUMBER := 2.0
694 ,p_validation_level IN NUMBER
695 := gme_common_pvt.g_max_errors
696 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
697 ,p_commit IN VARCHAR2 := fnd_api.g_false
698 ,p_instance_no IN NUMBER := NULL
699 ,p_reason_name IN VARCHAR2 := NULL
700 ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
701 , /*contains information for resource_transaction to be completed*/
702 p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
703 , /* indicates whether to validate the flex fields */
704 x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
705 ,x_message_count OUT NOCOPY NUMBER
706 ,x_message_list OUT NOCOPY VARCHAR2
707 ,x_return_status OUT NOCOPY VARCHAR2);
708
709 /*#
710 * Reschedule Batch Procedure
711 * This procedure reschedules a batch and all associated phantom batches.
712 * It also reschedules all the steps, if requested so.
713 * @param p_api_version Version of the api
714 * @param p_validation_level validation level
715 * @param p_init_msg_list message list flag - default is False
716 * @param p_commit commit flag - default is False
717 * @param x_message_count # of messages
718 * @param x_message_list List of messages
719 * @param x_return_status return status
720 * @param p_org_code Inventory Organization (Plant or Lab)
721 * @param p_batch_header_rec gme_batch_header rowtype
722 * @param p_use_workday_cal use shop calendar flag
723 * @param p_contiguity_override contiguity override
724 * @param x_batch_header_rec gme_batch_header rowtype
725 * @rep:scope public
726 * @rep:lifecycle active
727 * @rep:displayname reschedule_batch
728 */
729
730 /*================================================================================
731 Procedure
732 reschedule_batch
733 Description
734 This procedure reschedules batch and all the phantom batches.
735 It also reschedules all the steps, if requested so.
736
737 Parameters
738 p_org_code (O) Organization code of the plant or lab
739 p_batch_header (R) The batch header row to identify the batch
740 Following columns are used from this row.
741 batch_id (R)
745 p_contiguity_override VARCHAR2('F','T') - for contigious period of calendar.
742 plan_start_date (R)
743 plan_cmplt_date (R)
744 p_use_workday_cal VARCHAR2('F','T') - to use workday calendar or not.
746 x_batch_header The batch header that is returned, with all the data
747 x_return_status outcome of the API call
748 S - Success
749 E - Error
750 U - Unexpected Error
751 ================================================================================*/
752 PROCEDURE reschedule_batch (
753 p_api_version IN NUMBER := 2.0
754 ,p_validation_level IN NUMBER
755 := gme_common_pvt.g_max_errors
756 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
757 ,p_commit IN VARCHAR2 := fnd_api.g_false
758 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
759 ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_false
760 ,p_contiguity_override IN VARCHAR2 := fnd_api.g_false
761 ,p_org_code IN VARCHAR2
762 ,x_message_count OUT NOCOPY NUMBER
763 ,x_message_list OUT NOCOPY VARCHAR2
764 ,x_return_status OUT NOCOPY VARCHAR2
765 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE);
766
767 /*#
768 * Reschedule Step Procedure
769 * This procedure reschedules a step and all the subsequent steps, if requested so.
770 * @param p_api_version Version of the api
771 * @param p_validation_level validation level
772 * @param p_init_msg_list message list flag - default is False
773 * @param p_commit commit flag - default is False
774 * @param x_message_count # of messages
775 * @param x_message_list List of messages
776 * @param x_return_status return status
777 * @param p_org_code Inventory Organization (Plant or Lab)
778 * @param p_batch_no batch number
779 * @param p_batch_type NUMBER (0,10) Batch, FPO
780 * @param p_batch_step_rec gme_batch_steps rowtype
781 * @param p_reschedule_preceding reschedule preceding steps flag - default is 'T'
782 * @param p_reschedule_succeeding reschedule succeeding steps flag - default is 'T'
783 * @param p_use_workday_cal use shop calendar flag
784 * @param p_contiguity_override contiguity override
785 * @param x_batch_step_rec gme_batch_steps rowtype
786 * @rep:scope public
787 * @rep:lifecycle active
788 * @rep:displayname reschedule_step
789 */
790
791 /*================================================================================
792 Procedure
793 reschedule_step
794 Description
795 This procedure reschedules step and all the subsequent steps, if requested so.
796
797 Parameters
798 p_org_code (O) Organization code of the plant or lab
799 p_batch_no (O) batch no
800 p_batch_type (O) batch type (0/10) Batch/FPO
801 p_batch_step_rec (R) The batch step row to identify the step
802 Following columns are used from this row.
803 batchstep_id (R)
804 plan_start_date (R)
805 plan_cmplt_date (R)
806 p_reschedule_preceding (O) Whether to reschedule preceding steps.
807 p_reschedule_succeeding (O) Whether to reschedule succeeding steps.
808 p_use_workday_cal VARCHAR2('F','T') - to use workday calendar or not.
809 p_contiguity_override VARCHAR2('F','T') - for contigious period of calendar.
810 x_batch_step_rec The batch step that is returned, with all the data
811 x_return_status outcome of the API call
812 S - Success
813 E - Error
814 U - Unexpected Error
815 ================================================================================*/
816 PROCEDURE reschedule_step (
817 p_api_version IN NUMBER := 2.0
818 ,p_validation_level IN NUMBER
819 := gme_common_pvt.g_max_errors
820 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
821 ,p_commit IN VARCHAR2 := fnd_api.g_false
822 ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
823 ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_false
824 ,p_contiguity_override IN VARCHAR2 := fnd_api.g_false
825 ,p_org_code IN VARCHAR2
826 ,p_batch_no IN VARCHAR2
827 ,p_batch_type IN NUMBER
828 ,p_reschedule_preceding IN VARCHAR2 := fnd_api.g_false
829 ,p_reschedule_succeeding IN VARCHAR2 := fnd_api.g_true
830 ,x_message_count OUT NOCOPY NUMBER
831 ,x_message_list OUT NOCOPY VARCHAR2
832 ,x_return_status OUT NOCOPY VARCHAR2
833 ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE);
834
835 /*#
836 * Create Batch Reservations Procedure
837 * This procedure Creaates high level reservations for all the ingredients
838 * of a given batch and all associated phantom batches.
839 * @param p_api_version Version of the api
840 * @param p_validation_level validation level
844 * @param x_message_list List of messages
841 * @param p_init_msg_list message list flag - default is False
842 * @param p_commit commit flag - default is False
843 * @param x_message_count # of messages
845 * @param x_return_status return status
846 * @param p_org_code Inventory Organization (Plant or Lab)
847 * @param p_batch_rec gme_batch_header rowtype
848 * @rep:scope public
849 * @rep:lifecycle active
850 * @rep:displayname create_batch_reservations
851 */
852 /*================================================================================
853 Procedure
854 create_batch_reservations
855 Description
856 This procedure creates high level reservations (at organization level) for ingredient
857 lines within a batch.
858 Parameters
859 p_api_version (O) Required API version.
860 p_init_msg_list (O) Instructs TRUE or FALSE (T/F) on whether the message stack
861 should be initialized
862 p_commit (O) Instructs TRUE or FALSE (T/F) on whether a COMMIT should
863 be issued on completion of successful processing
864 p_batch_rec (R) The batch header row to identify the batch
865 against which high level reservations will be created
866 Supply either:
867 p_batch_rec.batch_no p_batch_rec.batch_type with p_org_code
868 OR
869 p_batch_rec.batch_id
870 p_org_code (O) Must be supplied if p_batch_rec.organization_id is not populated.
871 Identifies the organization associated with the batch.
872 x_message_count Number of messages accumulated on the stack during processing
873 x_message_list Messages accumulated during processing
874 x_return_status outcome of the API call
875 S - Success
876 E - Error
877 U - Unexpected Error
878 N - Items failed auto allocation
879 V - Inventory shortage exists
880 ================================================================================*/
881 PROCEDURE create_batch_reservations (
882 p_api_version IN NUMBER := 2.0
883 ,p_validation_level IN NUMBER
884 := gme_common_pvt.g_max_errors
885 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
886 ,p_commit IN VARCHAR2 := fnd_api.g_false
887 ,p_batch_rec IN gme_batch_header%ROWTYPE
888 ,p_org_code IN VARCHAR2
889 ,x_message_count OUT NOCOPY NUMBER
890 ,x_message_list OUT NOCOPY VARCHAR2
891 ,x_return_status OUT NOCOPY VARCHAR2);
892
893 /*#
894 * Create Line Reservations Procedure
895 * This procedure Creaates high level reservations for the given ingredient line
896 * @param p_api_version Version of the api
897 * @param p_validation_level validation level
898 * @param p_init_msg_list message list flag - default is False
899 * @param p_commit commit flag - default is False
900 * @param x_message_count # of messages
901 * @param x_message_list List of messages
902 * @param x_return_status return status
903 * @param p_org_code Inventory Organization (Plant or Lab)
904 * @param p_batch_no Batch number
905 * @param p_line_no Line number of the ingredient
906 * @param p_material_detail_id Identifier for the ingredient line
907 * @rep:scope public
908 * @rep:lifecycle active
909 * @rep:displayname create_line_reservations
910 */
911 /*================================================================================
912 Procedure
913 create_line_reservations
914 Description
915 This procedure creates high level reservations (at organization level) for the input
916 batch ingredient line.
917 Parameters
918 p_api_version (O) Required API version.
919 p_init_msg_list (O) Instructs TRUE or FALSE (T/F) on whether the message stack
920 should be initialized
921 p_commit (O) Instructs TRUE or FALSE (T/F) on whether a COMMIT should
922 be issued on completion of successful processing
923 p_material_detail_id (O) The identifier for the ingredient material detail row
924 against which a high level reservation will be created
925 If this is not supplied, then org_code, batch_no,line_no must be input
926 p_org_code (O) Organization with which the batch and ingredient line are associated
927 p_batch_no (O) Owning batch for the ingredient line.
928 p_line_no (O) Ingredient line.
929 x_message_count Number of messages accumulated on the stack during processing
930 x_message_list Messages accumulated during processing
931 x_return_status outcome of the API call
932 S - Success
933 E - Error
934 U - Unexpected Error
935 N - Items failed auto allocation
936 V - Inventory shortage exists
937 ================================================================================*/
938 PROCEDURE create_line_reservations (
942 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
939 p_api_version IN NUMBER := 2.0
940 ,p_validation_level IN NUMBER
941 := gme_common_pvt.g_max_errors
943 ,p_commit IN VARCHAR2 := fnd_api.g_false
944 ,p_material_detail_id IN NUMBER
945 ,p_org_code IN VARCHAR2
946 ,p_batch_no IN VARCHAR2
947 ,p_line_no IN NUMBER
948 ,x_message_count OUT NOCOPY NUMBER
949 ,x_message_list OUT NOCOPY VARCHAR2
950 ,x_return_status OUT NOCOPY VARCHAR2);
951
952 /*#
953 * Insert Process Parameter Procedure
954 * This particular procedure is used to insert parameter for an resource
955 * @param p_api_version Version of the api
956 * @param p_validation_level validation level
957 * @param p_init_msg_list message list flag - default is False
958 * @param p_commit commit flag - default is False
959 * @param x_message_count # of messages
960 * @param x_message_list List of messages
961 * @param x_return_status return status
962 * @param p_batch_no Batch Number
963 * @param p_org_code Inventory Organization (Plant or Lab)
964 * @param p_validate_flexfields Indicates whether to validate the flex fields
965 * @param p_batchstep_no Batch Step Number
966 * @param p_activity activity
967 * @param p_parameter process parameter
968 * @param p_process_param_rec gme_process_parameters row type
969 * @param x_process_param_rec gme_process_parameters row type
970 * @rep:scope public
971 * @rep:lifecycle active
972 * @rep:displayname insert_process_parameter
973 */
974 /*===========================================================================================
975 Procedure
976 insert_process_parameter
977 Description
978 This particular procedure is used to insert parameter for an resource
979 Parameters
980 p_process_param_rec.batchstep_resource_id (R) OR
981 p_org_code (O) Organization Code (Plant or Lab)
982 p_batch_no (O) Batch Number
983 p_batchstep_no (O) Batch Step Number
984 p_activity (O) Activity
985 p_resource (O) Resource
986 p_parameter (O) Process Parameter
987 All of the above to uniquely identify an process parameter
988 p_process_param_rec Gme_process_parameters%ROWTYPE - details of the process parameter
989 x_process_param_rec Gme_process_parameters%ROWTYPE - Output of the API with all the data
990 x_return_status Reflects return status of the API
991 S - Success
992 E - Failure
993 U - Unexpected
994 =============================================================================================*/
995 PROCEDURE insert_process_parameter (
996 p_api_version IN NUMBER := 2.0
997 ,p_validation_level IN NUMBER
998 := gme_common_pvt.g_max_errors
999 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1000 ,p_commit IN VARCHAR2 := fnd_api.g_false
1001 ,x_message_count OUT NOCOPY NUMBER
1002 ,x_message_list OUT NOCOPY VARCHAR2
1003 ,x_return_status OUT NOCOPY VARCHAR2
1004 ,p_batch_no IN VARCHAR2 := NULL
1005 ,p_org_code IN VARCHAR2 := NULL
1006 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
1007 ,p_batchstep_no IN NUMBER := NULL
1008 ,p_activity IN VARCHAR2 := NULL
1009 ,p_parameter IN VARCHAR2 := NULL
1010 ,p_process_param_rec IN gme_process_parameters%ROWTYPE
1011 ,x_process_param_rec OUT NOCOPY gme_process_parameters%ROWTYPE);
1012
1013 /*#
1014 * Update Process Parameter Procedure
1015 * This particular procedure is used to insert parameter for an resource
1016 * @param p_api_version Version of the api
1017 * @param p_validation_level validation level
1018 * @param p_init_msg_list message list flag - default is False
1019 * @param p_commit commit flag - default is False
1020 * @param x_message_count # of messages
1021 * @param x_message_list List of messages
1022 * @param x_return_status return status
1023 * @param p_batch_no Batch Number
1024 * @param p_org_code Inventory Organization (Plant or Lab)
1025 * @param p_validate_flexfields Indicates whether to validate the flex fields
1026 * @param p_batchstep_no Batch Step Number
1027 * @param p_activity activity
1028 * @param p_parameter process parameter
1029 * @param p_process_param_rec gme_process_parameters row type
1030 * @param x_process_param_rec gme_process_parameters row type
1031 * @rep:scope public
1032 * @rep:lifecycle active
1033 * @rep:displayname update_process_parameter
1034 */
1035
1036 /*===========================================================================================
1037 Procedure
1038 update_process_parameter
1039 Description
1040 This particular procedure is used to insert parameter for an resource
1041 Parameters
1042 p_process_param_rec.batchstep_resource_id (R) OR
1043 p_org_code (O) Organization Code (Plant or Lab)
1044 p_batch_no (O) Batch Number
1045 p_batchstep_no (O) Batch Step Number
1046 p_activity (O) Activity
1050 p_process_param_rec Gme_process_parameters%ROWTYPE - details of the process parameter
1047 p_resource (O) Resource
1048 p_parameter (O) Process Parameter
1049 All of the above to uniquely identify an process parameter
1051 x_process_param_rec Gme_process_parameters%ROWTYPE - Output of the API with all the data
1052 x_return_status Reflects return status of the API
1053 S - Success
1054 E - Failure
1055 U - Unexpected
1056 =============================================================================================*/
1057 PROCEDURE update_process_parameter (
1058 p_api_version IN NUMBER := 2.0
1059 ,p_validation_level IN NUMBER
1060 := gme_common_pvt.g_max_errors
1061 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1062 ,p_commit IN VARCHAR2 := fnd_api.g_false
1063 ,x_message_count OUT NOCOPY NUMBER
1064 ,x_message_list OUT NOCOPY VARCHAR2
1065 ,x_return_status OUT NOCOPY VARCHAR2
1066 ,p_batch_no IN VARCHAR2 := NULL
1067 ,p_org_code IN VARCHAR2 := NULL
1068 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
1069 ,p_batchstep_no IN NUMBER := NULL
1070 ,p_activity IN VARCHAR2 := NULL
1071 ,p_parameter IN VARCHAR2 := NULL
1072 ,p_process_param_rec IN gme_process_parameters%ROWTYPE
1073 ,x_process_param_rec OUT NOCOPY gme_process_parameters%ROWTYPE);
1074
1075 /*#
1076 * Delete Process Parameter Procedure
1077 * This particular procedure is used to delete a parameter for a given resource
1078 * @param p_api_version Version of the api
1079 * @param p_validation_level validation level
1080 * @param p_init_msg_list message list flag - default is False
1081 * @param p_commit commit flag - default is False
1082 * @param x_message_count # of messages
1083 * @param x_message_list List of messages
1084 * @param x_return_status return status
1085 * @param p_org_code Inventory Organization (Plant or Lab)
1086 * @param p_batch_no Batch Number
1087 * @param p_batchstep_no Batch Step Number
1088 * @param p_activity activity
1089 * @param p_parameter parameter
1090 * @param p_process_param_rec gme_process_parameters row type
1091 * @rep:scope public
1092 * @rep:lifecycle active
1093 * @rep:displayname delete_process_parameter
1094 *//*===========================================================================================
1095 Procedure
1096 delete_process_parameter
1097 Description
1098 This particular procedure is used to insert parameter for an resource
1099 Parameters
1100 p_process_param_rec.batchstep_resource_id (R) OR
1101 p_org_code (O) Organization Code (Plant or Lab)
1102 p_batch_no (O) Batch Number
1103 p_batchstep_no (O) Batch Step Number
1104 p_activity (O) Activity
1105 p_resource (O) Resource
1106 p_parameter (O) Process Parameter
1107 All of the above to uniquely identify an process parameter
1108 p_process_param_rec Gme_process_parameters%ROWTYPE - details of the process parameter
1109 x_return_status Reflects return status of the API
1110 S - Success
1111 E - Failure
1112 U - Unexpected
1113 =============================================================================================*/
1114 PROCEDURE delete_process_parameter (
1115 p_api_version IN NUMBER := 2.0
1116 ,p_validation_level IN NUMBER
1117 := gme_common_pvt.g_max_errors
1118 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1119 ,p_commit IN VARCHAR2 := fnd_api.g_false
1120 ,x_message_count OUT NOCOPY NUMBER
1121 ,x_message_list OUT NOCOPY VARCHAR2
1122 ,x_return_status OUT NOCOPY VARCHAR2
1123 ,p_batch_no IN VARCHAR2 := NULL
1124 ,p_org_code IN VARCHAR2 := NULL
1125 ,p_batchstep_no IN NUMBER := NULL
1126 ,p_activity IN VARCHAR2 := NULL
1127 ,p_parameter IN VARCHAR2 := NULL
1128 ,p_process_param_rec IN gme_process_parameters%ROWTYPE);
1129
1130 /*#
1131 * Insert batch step procedure
1132 * This procedure inserts the new step to the batch
1133 * @param p_api_version Version of the api
1134 * @param p_validation_level validation level
1135 * @param p_init_msg_list message list flag - default is False
1136 * @param p_commit commit flag - default is False
1137 * @param x_message_count # of messages
1138 * @param x_message_list List of messages
1139 * @param x_return_status return status
1140 * @param p_org_code Inventory Organization (Plant or Lab)
1141 * @param p_validate_flexfields validate flex fields flag - default is False
1142 * @param p_oprn_no Operation Number
1143 * @param p_oprn_vers Operation Version
1144 * @param p_batch_header_rec gme_batch_header rowtype
1145 * @param p_batch_step_rec gme_batch_steps rowtype
1146 * @param x_batch_step_rec gme_batch_steps rowtype
1147 * @rep:scope public
1148 * @rep:lifecycle active
1149 * @rep:displayname insert_step
1150 */
1151
1155 Description
1152 /*================================================================================
1153 Procedure
1154 insert_step
1156 This procedure inserts the new step to the batch
1157
1158 Parameters
1159 p_org_code Organization Code of Plan or Lab
1160 p_batch_header_rec (R) The batch header to identify unique batch.
1161 p_batch_step_rec (R) The batch step row to insert to the batch.
1162 p_oprn_no Operation Number
1163 p_oprn_vers Operation Version
1164 x_batch_step_rec The batch step that is returned, with all the data
1165 x_return_status outcome of the API call
1166 S - Success
1167 E - Error
1168 U - Unexpected Error
1169 HISTORY
1170 SivakumarG FPBug#4395561 16-NOV-2005
1171 Added new argument p_validate_flexfields
1172 ================================================================================*/
1173 PROCEDURE insert_step (
1174 p_api_version IN NUMBER := 2.0
1175 ,p_validation_level IN NUMBER
1176 := gme_common_pvt.g_max_errors
1177 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1178 ,p_commit IN VARCHAR2
1179 ,p_org_code IN VARCHAR2
1180 /*FPBug#4395561*/
1181 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
1182 , /* The inventory organization under which the batch exists.*/
1183 p_oprn_no IN VARCHAR2
1184 , /* The operation number for the step */
1185 p_oprn_vers IN NUMBER
1186 , /* The operation version for the step */
1187 p_batch_header_rec IN gme_batch_header%ROWTYPE
1188 ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
1189 ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
1190 ,x_message_count OUT NOCOPY NUMBER
1191 ,x_message_list OUT NOCOPY VARCHAR2
1192 ,x_return_status OUT NOCOPY VARCHAR2);
1193
1194 /*#
1195 * Insert Material line procedure
1196 * This procedure inserts new material line in a batch
1197 * @param p_api_version Version of the api
1198 * @param p_validation_level validation level
1199 * @param p_init_msg_list message list flag - default is False
1200 * @param p_commit commit flag - default is False
1201 * @param x_message_count # of messages
1202 * @param x_message_list List of messages
1203 * @param x_return_status return status
1204 * @param p_batch_header_rec gme_batch_header rowtype
1205 * @param p_material_detail_rec gme_material_details rowtype
1206 * @param p_locator_code Default Consumption/Yield Locator Code
1207 * @param p_org_code Inventory Organization
1208 * @param p_batchstep_no Batch Step Number
1209 * @param p_validate_flexfields whether to validate flex fields value is 'T' or 'F'
1210 * @param x_material_detail_rec gme_material_details rowtype
1211 * @rep:scope public
1212 * @rep:lifecycle active
1213 * @rep:displayname insert_material_line
1214 */
1215
1216 /*================================================================================
1217 Procedure
1218 insert_material_line
1219 Description
1220 This procedure is used to insert a material line
1221
1222 Parameters
1223 p_batch_header_rec (R) batch for which material line has to be updated
1224 p_material_detail_rec (R) material line details line that has to be inserted
1225 p_locator_code (O) Default Consumption/Yield Locator Code
1226 p_org_code (O) organization code
1227 p_batchstep_no(O) batch step no to be associated with
1228 p_validate_flexfields (O) Whether to validate the flexfields
1229 x_material_detail_rec inserted material detail record
1230 x_return_status outcome of the API call
1231 S - Success
1232 E - Error
1233 U - Unexpected Error
1234 HISTORY
1235 SivakumarG Bug#5078853 02-MAR-2006
1236 Procedure Created
1237 ================================================================================*/
1238 PROCEDURE insert_material_line (
1239 p_api_version IN NUMBER := 2.0
1240 ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1241 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
1242 ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
1243 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1244 ,p_material_detail_rec IN gme_material_details%ROWTYPE
1245 ,p_locator_code IN VARCHAR2
1246 ,p_org_code IN VARCHAR2
1247 ,p_batchstep_no IN NUMBER := NULL
1248 ,p_validate_flexfields IN VARCHAR2 DEFAULT fnd_api.g_false
1249 ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
1250 ,x_message_count OUT NOCOPY NUMBER
1251 ,x_message_list OUT NOCOPY VARCHAR2
1252 ,x_return_status OUT NOCOPY VARCHAR2);
1253
1254
1255 /*#
1256 * Update Material line procedure
1257 * This procedure updates the existing material line in a batch
1258 * @param p_api_version Version of the api
1262 * @param x_message_count # of messages
1259 * @param p_validation_level validation level
1260 * @param p_init_msg_list message list flag - default is False
1261 * @param p_commit commit flag - default is False
1263 * @param x_message_list List of messages
1264 * @param x_return_status return status
1265 * @param p_batch_header_rec gme_batch_header rowtype
1266 * @param p_material_detail_rec gme_material_details rowtype
1267 * @param p_locator_code Default Consumption/Yield Locator Code
1268 * @param p_org_code Inventory Organization
1269 * @param p_scale_phantom flag to indicate whether only phantom product to be scaled or complete phantom batch default is False
1270 * @param p_validate_flexfields whether to validate flex fields value is 'T' or 'F'
1271 * @param x_material_detail_rec gme_material_details rowtype
1272 * @rep:scope public
1273 * @rep:lifecycle active
1274 * @rep:displayname update_material_line
1275 */
1276
1277
1278 /*================================================================================
1279 Procedure
1280 update_material_line
1281 Description
1282 This procedure is used to update a material line
1283
1284 Parameters
1285 p_batch_header_rec (R) batch for which material line has to be updated
1286 p_material_detail_rec (R) material line that has to be updated
1287 p_locator_code (O) Default Consumption/Yield Locator Code
1288 p_org_code (O) organization code
1289 p_scale_phantom (O) to scale phantom product only or total batch
1290 p_validate_flexfields (O) Whether to validate the flexfields
1291 x_material_detail_rec updated material detail record
1292 x_return_status outcome of the API call
1293 S - Success
1294 E - Error
1295 U - Unexpected Error
1296 HISTORY
1297 SivakumarG Bug#5078853 02-MAR-2006
1298 Procedure Created
1299 ================================================================================*/
1300 PROCEDURE update_material_line (
1301 p_api_version IN NUMBER := 2.0
1302 ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1303 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
1304 ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
1305 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1306 ,p_material_detail_rec IN gme_material_details%ROWTYPE
1307 ,p_locator_code IN VARCHAR2
1308 ,p_org_code IN VARCHAR2
1309 ,p_scale_phantom IN VARCHAR2 DEFAULT fnd_api.g_false
1310 ,p_validate_flexfields IN VARCHAR2 DEFAULT fnd_api.g_false
1311 ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
1312 ,x_message_count OUT NOCOPY NUMBER
1313 ,x_message_list OUT NOCOPY VARCHAR2
1314 ,x_return_status OUT NOCOPY VARCHAR2 );
1315
1316
1317 /*#
1318 * Delete Material line procedure
1319 * This procedure deltes the existing material line in a batch
1320 * @param p_api_version Version of the api
1321 * @param p_validation_level validation level
1322 * @param p_init_msg_list message list flag - default is False
1323 * @param p_commit commit flag - default is False
1324 * @param x_message_count # of messages
1325 * @param x_message_list List of messages
1326 * @param x_return_status return status
1327 * @param p_batch_header_rec gme_batch_header rowtype
1328 * @param p_material_detail_rec gme_material_details rowtype
1329 * @param p_org_code Inventory Organization
1330 * @rep:scope public
1331 * @rep:lifecycle active
1332 * @rep:displayname delete_material_line
1333 */
1334
1335 /*================================================================================
1336 Procedure
1337 delete_material_line
1338 Description
1339 This procedure is used to delete a material line
1340
1341 Parameters
1342 p_batch_header_rec (R) batch for which material line has to be updated
1343 p_material_detail_rec (R) material line that has to be updated
1344 p_org_code (O) organization code
1345 x_return_status outcome of the API call
1346 S - Success
1347 E - Error
1348 U - Unexpected Error
1349 HISTORY
1350 SivakumarG Bug#5078853 02-MAR-2006
1351 Procedure Created
1352 ================================================================================*/
1353 PROCEDURE delete_material_line (
1354 p_api_version IN NUMBER := 2.0
1355 ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1356 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
1357 ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
1358 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1359 ,p_material_detail_rec IN gme_material_details%ROWTYPE
1360 ,p_org_code IN VARCHAR2
1361 ,x_message_count OUT NOCOPY NUMBER
1362 ,x_message_list OUT NOCOPY VARCHAR2
1363 ,x_return_status OUT NOCOPY VARCHAR2);
1364
1365
1366 /*#
1367 * Delete batch step procedure
1368 * This procedure deletes an existing step from a batch
1372 * @param p_commit commit flag - default is False
1369 * @param p_api_version Version of the api
1370 * @param p_validation_level validation level
1371 * @param p_init_msg_list message list flag - default is False
1373 * @param x_message_count # of messages
1374 * @param x_message_list List of messages
1375 * @param x_return_status return status
1376 * @param p_org_code Inventory Organization (Plant or Lab)
1377 * @param p_batch_no Batch Number
1378 * @param p_batch_step_rec gme_batch_steps rowtype
1379 * @rep:scope public
1380 * @rep:lifecycle active
1381 * @rep:displayname delete_step
1382 */
1383 /*================================================================================
1384 Procedure
1385 delete_step
1386 Description
1387 This procedure deletes the step associated with the batch
1388
1389 Parameters
1390 p_org_code Organization_code of Plant or Lab
1391 p_batch_step_rec (R) The batch step row to identify the step
1392 Following columns are used from this row.
1393 batchstep_id (R)
1394 x_return_status outcome of the API call
1395 S - Success
1396 E - Error
1397 U - Unexpected Error
1398 ================================================================================*/
1399 PROCEDURE delete_step (
1400 p_api_version IN NUMBER := 2.0
1401 ,p_validation_level IN NUMBER
1402 := gme_common_pvt.g_max_errors
1403 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1404 ,p_commit IN VARCHAR2
1405 ,p_org_code IN VARCHAR2
1406 ,p_batch_no IN VARCHAR2
1407 ,x_message_count OUT NOCOPY NUMBER
1408 ,x_message_list OUT NOCOPY VARCHAR2
1409 ,x_return_status OUT NOCOPY VARCHAR2
1410 ,p_batch_step_rec IN gme_batch_steps%ROWTYPE);
1411 /*#
1412 * Revert Batch Procedure
1413 * This procedure closes batch.
1414 * @param p_api_version Version of the api
1415 * @param p_validation_level validation level
1416 * @param p_init_msg_list message list flag - default is False
1417 * @param p_commit commit flag - default is False
1418 * @param x_message_count # of messages
1419 * @param x_message_list List of messages
1420 * @param x_return_status return status
1421 * @param p_batch_header_rec gme_batch_steps rowtype
1422 * @param p_org_code Inventory Organization (Plant or Lab)
1423 * @param x_batch_header_rec gme_batch_steps rowtype
1424 * @rep:scope public
1425 * @rep:lifecycle active
1426 * @rep:displayname revert_batch
1427 */
1428 /*================================================================================
1429 Procedure
1430 revert_batch
1431 Description
1432 This procedure revert batch and all the phantom batches.
1433 It also closes all the steps.
1434
1435 Parameters
1436 p_org_code (O) Organization code of Plant or Lab
1437 p_batch_header_rec (R) The batch header row to identify the batch
1438 Following columns are used from this row.
1439 batch_id (R)
1440 batch_close_date (O)
1441
1442 x_batch_header_rec The batch header that is returned, with all the data
1443 x_return_status outcome of the API call
1444 S - Success
1445 E - Error
1446 U - Unexpected Error
1447 ================================================================================*/
1448 PROCEDURE revert_batch (
1449 p_api_version IN NUMBER := 2.0
1450 ,p_validation_level IN NUMBER
1451 ,p_init_msg_list IN VARCHAR2
1452 ,p_commit IN VARCHAR2
1453 ,x_message_count OUT NOCOPY NUMBER
1454 ,x_message_list OUT NOCOPY VARCHAR2
1455 ,x_return_status OUT NOCOPY VARCHAR2
1456 ,p_org_code IN VARCHAR2
1457 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1458 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE);
1459
1460 /*#
1461 * Revert Batch Step Procedure
1462 * This procedure revert step.
1463 * @param p_api_version Version of the api
1464 * @param p_validation_level validation level
1465 * @param p_init_msg_list message list flag - default is False
1466 * @param p_commit commit flag - default is False
1467 * @param x_message_count # of messages
1468 * @param x_message_list List of messages
1469 * @param x_return_status return status
1470 * @param p_org_code Inventory Organization (Plant or Lab)
1471 * @param p_batch_no Batch Number
1472 * @param p_batch_step_rec gme_batch_steps rowtype
1473 * @param x_batch_step_rec gme_batch_steps rowtype
1474 * @rep:scope public
1475 * @rep:lifecycle active
1476 * @rep:displayname revert_step
1477 */
1478
1479 /*================================================================================
1480 Procedure
1481 revert_step
1482 Description
1483 This procedure revert step.
1484
1485 Parameters
1486 p_org_code (O) Organization Code for Plant or Lab
1490 batchstep_id (R)
1487 p_batch_no (O) Batch Number to uniquely Identify
1488 p_batch_step_rec (R) The batch step row to identify the step
1489 Following columns are used from this row.
1491
1492 x_batch_step_rec The batch step that is returned, with all the data
1493 x_return_status outcome of the API call
1494 S - Success
1495 E - Error
1496 U - Unexpected Error
1497 ================================================================================*/
1498 PROCEDURE revert_step (
1499 p_api_version IN NUMBER := 2.0
1500 ,p_validation_level IN NUMBER
1501 ,p_init_msg_list IN VARCHAR2
1502 ,p_commit IN VARCHAR2
1503 ,x_message_count OUT NOCOPY NUMBER
1504 ,x_message_list OUT NOCOPY VARCHAR2
1505 ,x_return_status OUT NOCOPY VARCHAR2
1506 ,p_org_code IN VARCHAR2
1507 ,p_batch_no IN VARCHAR2
1508 ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
1509 ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE);
1510
1511
1512 /*#
1513 * Close Batch Procedure
1514 * This procedure closes batch.
1515 * @param p_api_version Version of the api
1516 * @param p_validation_level validation level
1517 * @param p_init_msg_list message list flag - default is False
1518 * @param p_commit commit flag - default is False
1519 * @param x_message_count # of messages
1520 * @param x_message_list List of messages
1521 * @param x_return_status return status
1522 * @param p_batch_header_rec gme_batch_steps rowtype
1523 * @param p_org_code Inventory Organization (Plant or Lab)
1524 * @param x_batch_header_rec gme_batch_steps rowtype
1525 * @rep:scope public
1526 * @rep:lifecycle active
1527 * @rep:displayname close_batch
1528 */
1529 /*================================================================================
1530 Procedure
1531 close_batch
1532 Description
1533 This procedure closes batch and all the phantom batches.
1534 It also closes all the steps.
1535
1536 Parameters
1537 p_org_code (O) Organization code of Plant or Lab
1538 p_batch_header_rec (R) The batch header row to identify the batch
1539 Following columns are used from this row.
1540 batch_id (R)
1541 batch_close_date (O)
1542
1543 x_batch_header_rec The batch header that is returned, with all the data
1544 x_return_status outcome of the API call
1545 S - Success
1546 E - Error
1547 U - Unexpected Error
1548 ================================================================================*/
1549 PROCEDURE close_batch (
1550 p_api_version IN NUMBER := 2.0
1551 ,p_validation_level IN NUMBER
1552 ,p_init_msg_list IN VARCHAR2
1553 ,p_commit IN VARCHAR2
1554 ,x_message_count OUT NOCOPY NUMBER
1555 ,x_message_list OUT NOCOPY VARCHAR2
1556 ,x_return_status OUT NOCOPY VARCHAR2
1557 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1558 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
1559 ,p_org_code IN VARCHAR2);
1560
1561 /*#
1562 * Close Batch Step Procedure
1563 * This procedure closes step.
1564 * @param p_api_version Version of the api
1565 * @param p_validation_level validation level
1566 * @param p_init_msg_list message list flag - default is False
1567 * @param p_commit commit flag - default is False
1568 * @param x_message_count # of messages
1569 * @param x_message_list List of messages
1570 * @param x_return_status return status
1571 * @param p_org_code Inventory Organization (Plant or Lab)
1572 * @param p_batch_no Batch Number
1573 * @param p_batch_step_rec gme_batch_steps rowtype
1574 * @param p_delete_pending delete pending flag - default is 'F'
1575 * @param x_batch_step_rec gme_batch_steps rowtype
1576 * @rep:scope public
1577 * @rep:lifecycle active
1578 * @rep:displayname close_step
1579 */
1580
1581 /*================================================================================
1582 Procedure
1583 close_step
1584 Description
1585 This procedure closes step.
1586
1587 Parameters
1588 p_org_code (O) Organization Code for Plant or Lab
1589 p_batch_no (O) Batch Number to uniquely Identify
1590 p_batch_step_rec (R) The batch step row to identify the step
1591 Following columns are used from this row.
1592 batchstep_id (R)
1593 step_close_date (O)
1594 p_delete_pending (R) Delete the pending allocations if any for the
1595 material lines associated with the step.
1596
1597 x_batch_step_rec The batch step that is returned, with all the data
1598 x_return_status outcome of the API call
1599 S - Success
1600 E - Error
1604 p_api_version IN NUMBER := 2
1601 U - Unexpected Error
1602 ================================================================================*/
1603 PROCEDURE close_step (
1605 , /* Punit Kumar */
1606 p_validation_level IN NUMBER
1607 := gme_common_pvt.g_max_errors
1608 , /* Punit Kumar */
1609 p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1610 ,p_commit IN VARCHAR2
1611 ,x_message_count OUT NOCOPY NUMBER
1612 ,x_message_list OUT NOCOPY VARCHAR2
1613 ,x_return_status OUT NOCOPY VARCHAR2
1614 ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
1615 ,p_delete_pending IN VARCHAR2 := fnd_api.g_false
1616 ,p_org_code IN VARCHAR2
1617 ,p_batch_no IN VARCHAR2
1618 ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE);
1619
1620 /*#
1621 * Cancel Batch Procedure
1622 * This procedure cancels a batch and all associated phantom batches.
1623 * It also cancels all the steps.
1624 * @param p_api_version Version of the api
1625 * @param p_validation_level validation level
1626 * @param p_init_msg_list message list flag - default is False
1627 * @param p_commit commit flag - default is False
1628 * @param x_message_count # of messages
1629 * @param x_message_list List of messages
1630 * @param x_return_status return status
1631 * @param p_org_code Inventory Organization (Plant or Lab)
1632 * @param p_batch_header_rec gme_batch_header rowtype
1633 * @param x_batch_header_rec gme_batch_header rowtype
1634 * @rep:scope public
1635 * @rep:lifecycle active
1636 * @rep:displayname cancel_batch
1637 */
1638 /*================================================================================
1639 Procedure
1640 cancel_batch
1641 Description
1642 This procedure cancels batch and all the phantom batches.
1643 It also cancels all the steps.
1644
1645 Parameters
1646 p_batch_header_rec (R) The batch header row to identify the batch
1647 Following columns are used from this row.
1648 batch_id (R)
1649 p_org_code The name of organization to which this batch belongs
1650 x_batch_header_rec The batch header that is returned, with all the data
1651 x_return_status outcome of the API call
1652 S - Success
1653 E - Error
1654 U - Unexpected Error
1655 ================================================================================*/
1656 PROCEDURE cancel_batch (
1657 p_api_version IN NUMBER := 2.0
1658 ,p_validation_level IN NUMBER
1659 := gme_common_pvt.g_max_errors
1660 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1661 ,p_commit IN VARCHAR2 := fnd_api.g_false
1662 ,x_message_count OUT NOCOPY NUMBER
1663 ,x_message_list OUT NOCOPY VARCHAR2
1664 ,x_return_status OUT NOCOPY VARCHAR2
1665 ,p_org_code IN VARCHAR2
1666 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1667 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE);
1668
1669 /*#
1670 * Reopen Batch Procedure
1671 * This procedure reopens a batch and all associated phantom batches.
1672 * It also reopens all the steps, if requested
1673 * @param p_api_version Version of the api
1674 * @param p_validation_level validation level
1675 * @param p_init_msg_list message list flag - default is False
1676 * @param p_commit commit flag - default is False
1677 * @param x_message_count # of messages
1678 * @param x_message_list List of messages
1679 * @param x_return_status return status
1680 * @param p_org_code Inventory Organization (Plant or Lab)
1681 * @param p_batch_header_rec gme_batch_header rowtype
1682 * @param p_reopen_steps reopen steps flag - default is 'F'
1683 * @param x_batch_header_rec gme_batch_header rowtype
1684 * @rep:scope public
1685 * @rep:lifecycle active
1686 * @rep:displayname reopen_batch
1687 */
1688 /*================================================================================
1689 Procedure
1690 reopen_batch
1691 Description
1692 This procedure reopens batch and all the phantom batches.
1693 It also reopens all the steps, if requested so.
1694
1695 Parameters
1696 p_org_code Organization code for the Plant or Lab
1697 p_batch_header_rec (R) The batch header row to identify the batch
1698 Following columns are used from this row.
1699 batch_id (R)
1700 p_reopen_steps (O) Reopen all the steps.
1701
1702 x_batch_header_rec The batch header that is returned, with all the data
1703 x_return_status outcome of the API call
1704 S - Success
1705 E - Error
1706 U - Unexpected Error
1707 ================================================================================*/
1708 PROCEDURE reopen_batch (
1709 p_api_version IN NUMBER := 2
1713 , /* Punit Kumar */
1710 , /* Punit Kumar */
1711 p_validation_level IN NUMBER
1712 := gme_common_pvt.g_max_errors
1714 p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1715 ,p_commit IN VARCHAR2
1716 ,x_message_count OUT NOCOPY NUMBER
1717 ,x_message_list OUT NOCOPY VARCHAR2
1718 ,x_return_status OUT NOCOPY VARCHAR2
1719 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1720 ,p_org_code IN VARCHAR2
1721 ,p_reopen_steps IN VARCHAR2 := fnd_api.g_false
1722 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE);
1723
1724 /*#
1725 * Reopen Step Procedure
1726 * This procedure reopens a step.
1727 * @param p_api_version Version of the api
1728 * @param p_validation_level validation level
1729 * @param p_init_msg_list message list flag - default is False
1730 * @param p_commit commit flag - default is False
1731 * @param x_message_count # of messages
1732 * @param x_message_list List of messages
1733 * @param x_return_status return status
1734 * @param p_org_code Inventory Organization (Plant or Lab)
1735 * @param p_batch_header_rec gme_batch_header rowtype
1736 * @param p_batch_step_rec gme_batch_steps rowtype
1737 * @param x_batch_step_rec gme_batch_steps rowtype
1738 * @rep:scope public
1739 * @rep:lifecycle active
1740 * @rep:displayname reopen_step
1741 */
1742
1743 /*================================================================================
1744 Procedure
1745 reopen_step
1746 Description
1747 This procedure reopens step.
1748
1749 Parameters
1750 p_batch_step_rec (R) The batch header row to identify the batch
1751 Following columns are used from this row.
1752 batchstep_id (R)
1753
1754 x_batch_step_rec The batch step that is returned, with all the data
1755 p_batch_header_rec The batch header to identify unique batch
1756 x_return_status outcome of the API call
1757 S - Success
1758 E - Error
1759 U - Unexpected Error
1760 ================================================================================*/
1761 PROCEDURE reopen_step (
1762 p_api_version IN NUMBER := 2
1763 , /* Punit Kumar */
1764 p_validation_level IN NUMBER
1765 := gme_common_pvt.g_max_errors
1766 , /* Punit Kumar */
1767 p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1768 ,p_commit IN VARCHAR2
1769 ,x_message_count OUT NOCOPY NUMBER
1770 ,x_message_list OUT NOCOPY VARCHAR2
1771 ,x_return_status OUT NOCOPY VARCHAR2
1772 ,p_org_code IN VARCHAR2
1773 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1774 ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
1775 ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE);
1776
1777 /*#
1778 * Incremental Backflush Procedure
1779 * This particular procedure is used to delete a parameter for a given resource
1780 * @param p_api_version Version of the api
1781 * @param p_validation_level validation level
1782 * @param p_init_msg_list message list flag - default is False
1783 * @param p_commit commit flag - default is False
1784 * @param x_message_count # of messages
1785 * @param x_message_list List of messages
1786 * @param x_return_status return status
1787 * @param p_batch_header_rec gme_batch_header rowtype
1788 * @param p_org_code Organization code that the batch belongs to
1789 * @param p_material_detail_rec gme_material_details rowtype
1790 * @param p_qty Incremental Quantity
1791 * @param p_qty_type Supplied quantity type (incremental, actual, percentage)
1792 * @param p_trans_date Transaction Date for the incremental backflush
1793 * @param p_ignore_exception Ignore exceptions raised during Incremental Backflush
1794 * @param p_adjust_cmplt Treat the Incremental backflush as adjustment for the completed batch
1795 * @param x_exception_material_tbl table of exception records
1796 * @rep:scope public
1797 * @rep:lifecycle active
1798 * @rep:displayname incremental_batckflush
1799 */
1800 /*===========================================================================================
1801 Procedure
1802 incremental_backflush
1803 Description
1804 This particular procedure is used to incrementally backflush a batch.
1805
1806 =============================================================================================*/
1807 PROCEDURE incremental_backflush (
1808 p_api_version IN NUMBER
1809 ,p_validation_level IN NUMBER
1810 := gme_common_pvt.g_max_errors
1811 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1812 ,p_commit IN VARCHAR2 := fnd_api.g_false
1813 ,x_message_count OUT NOCOPY NUMBER
1814 ,x_message_list OUT NOCOPY VARCHAR2
1815 ,x_return_status OUT NOCOPY VARCHAR2
1816 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1820 ,p_qty_type IN NUMBER := 0
1817 ,p_org_code IN VARCHAR2
1818 ,p_material_detail_rec IN gme_material_details%ROWTYPE
1819 ,p_qty IN NUMBER
1821 ,p_trans_date IN DATE
1822 ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
1823 ,p_adjust_cmplt IN VARCHAR2 := fnd_api.g_true
1824 ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab);
1825 /*#
1826 * Create Material Transaction Procedure
1827 * This procedure Creates a Material Transaction.
1828 * @param p_api_version Version of the api
1829 * @param p_validation_level validation level
1830 * @param p_init_msg_list message list flag - default is False
1831 * @param p_commit commit flag - default is False
1832 * @param x_message_count # of messages
1833 * @param x_message_list List of messages
1834 * @param x_return_status return status
1835 * @param p_org_code Inventory Organization (Plant or Lab)
1836 * @param p_mmti_rec mtl_transactions_interface rowtype
1837 * @param p_mmli_tbl table of lot records
1838 * @param p_batch_no Batch Number
1839 * @param p_line_no Line Number
1840 * @param p_line_type Material Type (Ingredient, Product, Byproduct)
1841 * @param p_create_lot If new lot should be created ('T','F')
1842 * @param p_generate_lot If lot should be generated ('T','F')
1843 * @param p_generate_parent_lot If parent lot should be generated ('T','F')
1844 * @param x_mmt_rec mtl_material_transactions rowtype with the data
1845 * @param x_mmln_tbl table of lot records, those were inserted
1846 * @rep:scope public
1847 * @rep:lifecycle active
1848 * @rep:displayname create_material_txn
1849 */
1850
1851 /*================================================================================
1852 Procedure
1853 create_material_txn
1854 Description
1855 This procedure creates material transaction.
1856
1857 Parameters
1858 x_return_status outcome of the API call
1859 S - Success
1860 E - Error
1861 U - Unexpected Error
1862 ================================================================================*/
1863
1864 PROCEDURE create_material_txn (
1865 p_api_version IN NUMBER := 2.0
1866 ,p_validation_level IN NUMBER
1867 := gme_common_pvt.g_max_errors
1868 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1869 ,p_commit IN VARCHAR2 := fnd_api.g_false
1870 ,x_message_count OUT NOCOPY NUMBER
1871 ,x_message_list OUT NOCOPY VARCHAR2
1872 ,x_return_status OUT NOCOPY VARCHAR2
1873 ,p_org_code IN VARCHAR2 := NULL
1874 ,p_mmti_rec IN mtl_transactions_interface%ROWTYPE
1875 ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl
1876 ,p_batch_no IN VARCHAR2 := NULL
1877 ,p_line_no IN NUMBER := NULL
1878 ,p_line_type IN NUMBER := NULL
1879 ,p_create_lot IN VARCHAR2 := NULL
1880 ,p_generate_lot IN VARCHAR2 := NULL
1881 ,p_generate_parent_lot IN VARCHAR2 := NULL
1882 ,x_mmt_rec OUT NOCOPY mtl_material_transactions%ROWTYPE
1883 ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl);
1884 /*#
1885 * Update Material Transaction Procedure
1886 * This procedure Creates a Material Transaction.
1887 * @param p_api_version Version of the api
1888 * @param p_validation_level validation level
1889 * @param p_init_msg_list message list flag - default is False
1890 * @param p_commit commit flag - default is False
1891 * @param x_message_count # of messages
1892 * @param x_message_list List of messages
1893 * @param x_return_status return status
1894 * @param p_transaction_id Identifier to the transaction to be updated.
1895 * @param p_mmti_rec mtl_transactions_interface rowtype
1896 * @param p_mmli_tbl table of lot records
1897 * @param p_create_lot If new lot should be created ('T','F')
1898 * @param p_generate_lot If lot should be generated ('T','F')
1899 * @param p_generate_parent_lot If parent lot should be generated ('T','F')
1900 * @param x_mmt_rec mtl_material_transactions rowtype with the data
1901 * @param x_mmln_tbl table of lot records, those were inserted
1902 * @rep:scope public
1903 * @rep:lifecycle active
1904 * @rep:displayname update_material_txn
1905 */
1906
1907 /*================================================================================
1908 Procedure
1909 update_material_txn
1910 Description
1911 This procedure updates material transaction.
1912
1913 Parameters
1914 x_return_status outcome of the API call
1915 S - Success
1916 E - Error
1917 U - Unexpected Error
1918 ================================================================================*/
1919
1920 PROCEDURE update_material_txn (
1921 p_api_version IN NUMBER := 2.0
1922 ,p_validation_level IN NUMBER
1923 := gme_common_pvt.g_max_errors
1924 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1928 ,x_return_status OUT NOCOPY VARCHAR2
1925 ,p_commit IN VARCHAR2 := fnd_api.g_false
1926 ,x_message_count OUT NOCOPY NUMBER
1927 ,x_message_list OUT NOCOPY VARCHAR2
1929 ,p_transaction_id IN NUMBER
1930 ,p_mmti_rec IN mtl_transactions_interface%ROWTYPE
1931 ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl
1932 ,p_create_lot IN VARCHAR2 := NULL
1933 ,p_generate_lot IN VARCHAR2 := NULL
1934 ,p_generate_parent_lot IN VARCHAR2 := NULL
1935 ,x_mmt_rec OUT NOCOPY mtl_material_transactions%ROWTYPE
1936 ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl);
1937
1938 /*#
1939 * Delete Material Transaction Procedure
1940 * This procedure deletes a Material Transaction.
1941 * @param p_api_version Version of the api
1942 * @param p_validation_level validation level
1943 * @param p_init_msg_list message list flag - default is False
1944 * @param p_commit commit flag - default is False
1945 * @param x_message_count # of messages
1946 * @param x_message_list List of messages
1947 * @param x_return_status return status
1948 * @param p_transaction_id Identifier to the transaction to be updated.
1949 * @rep:scope public
1950 * @rep:lifecycle active
1951 * @rep:displayname delete_material_txn
1952 */
1953
1954 /*================================================================================
1955 Procedure
1956 delete_material_txn
1957 Description
1958 This procedure updates material transaction.
1959
1960 Parameters
1961 x_return_status outcome of the API call
1962 S - Success
1963 E - Error
1964 U - Unexpected Error
1965 ================================================================================*/
1966 PROCEDURE delete_material_txn (
1967 p_api_version IN NUMBER := 2.0
1968 ,p_validation_level IN NUMBER
1969 := gme_common_pvt.g_max_errors
1970 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1971 ,p_commit IN VARCHAR2 := fnd_api.g_false
1972 ,x_message_count OUT NOCOPY NUMBER
1973 ,x_message_list OUT NOCOPY VARCHAR2
1974 ,x_return_status OUT NOCOPY VARCHAR2
1975 ,p_transaction_id IN NUMBER);
1976
1977 /*#
1978 * Reroute Batch Procedure
1979 * This procedure reroutes batch (typically change the route associated with the batch).
1980 * @param p_api_version Version of the api
1981 * @param p_validation_level validation level
1982 * @param p_init_msg_list message list flag - default is False
1983 * @param p_commit commit flag - default is False
1984 * @param x_message_count # of messages
1985 * @param x_message_list List of messages
1986 * @param x_return_status return status
1987 * @param p_batch_header_rec gme_batch_header rowtype
1988 * @param p_validity_rule_id validity rule id
1989 * @param x_batch_header_rec gme_batch_header rowtype
1990 * @param p_org_code Inventory Organization (Plant or Lab)
1991 * @param p_use_workday_cal Whether workday calendar will be used for batch date calculations
1992 * @param p_contiguity_override Whether indicates batch needs to be completed in one contiguous block of time
1993 * @rep:scope public
1994 * @rep:lifecycle active
1995 * @rep:displayname reroute_batch
1996 */
1997
1998 /*================================================================================
1999 Procedure
2000 reroute_batch
2001 Description
2002 This procedure reroutes batch (typically change the route associated with the batch).
2003
2004 Parameters
2005 p_batch_header_rec (R) The batch header row to identify the batch
2006 Following columns are used from this row.
2007 batch_id (R)
2008 p_org_code (R) if batch_no is specified instead of batch_id
2009 on batch header row
2010 p_validity_rule_id (R) Recipe validity rule id for the new recipe.
2011 p_use_workday_cal VARCHAR2('F','T') - to use workday calendar or not.
2012 p_contiguity_override VARCHAR2('F','T') - for contigious period of calendar.
2013 x_batch_header_rec The batch header that is returned, with all the data
2014 x_return_status outcome of the API call
2015 S - Success
2016 E - Error
2017 U - Unexpected Error
2018 C - No continous periods found
2019 ================================================================================*/
2020 PROCEDURE reroute_batch (
2021 p_api_version IN NUMBER := 2.0
2022 ,p_validation_level IN NUMBER
2023 := gme_common_pvt.g_max_errors
2024 ,p_init_msg_list IN VARCHAR2
2025 DEFAULT fnd_api.g_false
2026 ,p_commit IN VARCHAR2
2027 DEFAULT fnd_api.g_false
2028 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
2029 ,p_validity_rule_id IN NUMBER
2030 ,p_org_code IN VARCHAR2
2031 ,p_use_workday_cal IN VARCHAR2
2035 ,x_message_count OUT NOCOPY NUMBER
2032 DEFAULT fnd_api.g_false
2033 ,p_contiguity_override IN VARCHAR2
2034 DEFAULT fnd_api.g_false
2036 ,x_message_list OUT NOCOPY VARCHAR2
2037 ,x_return_status OUT NOCOPY VARCHAR2
2038 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE);
2039
2040
2041 /*#
2042 * Terminate Batch Procedure
2043 * This procedure terminates a batch and all associated phantom batches.
2044 * It also terminates all the steps.
2045 * @param p_api_version Version of the api
2046 * @param p_validation_level validation level
2047 * @param p_init_msg_list message list flag - default is False
2048 * @param p_commit commit flag - default is False
2049 * @param x_message_count # of messages
2050 * @param x_message_list List of messages
2051 * @param x_return_status return status
2052 * @param p_org_code Inventory Organization (Plant or Lab)
2053 * @param p_reason_name Reason Code for termination
2054 * @param p_batch_header_rec gme_batch_header rowtype
2055 * @param x_batch_header_rec gme_batch_header rowtype
2056 * @rep:scope public
2057 * @rep:lifecycle active
2058 * @rep:displayname terminate_batch
2059 */
2060 /*================================================================================
2061 Procedure
2062 terminate_batch
2063
2064 Description
2065 This procedure terminates batch and all the phantom batches.
2066 It also terminates all the steps.
2067
2068 Parameters
2069 p_batch_header_rec (R) The batch header row to identify the batch
2070 Following columns are used from this row.
2071 batch_id (R)
2072 p_org_code (O) The name of organization to which this batch belongs
2073 p_reason_name (O) Reason to terminate the batch
2074 x_batch_header_rec The batch header that is returned, with all the data
2075 x_return_status outcome of the API call
2076 S - Success
2077 E - Error
2078 U - Unexpected Error
2079 ================================================================================*/
2080 PROCEDURE terminate_batch (
2081 p_api_version IN NUMBER := 2.0
2082 ,p_validation_level IN NUMBER
2083 := gme_common_pvt.g_max_errors
2084 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2085 ,p_commit IN VARCHAR2 := fnd_api.g_false
2086 ,x_message_count OUT NOCOPY NUMBER
2087 ,x_message_list OUT NOCOPY VARCHAR2
2088 ,x_return_status OUT NOCOPY VARCHAR2
2089 ,p_org_code IN VARCHAR2
2090 ,p_reason_name IN VARCHAR2
2091 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
2092 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE);
2093
2094 /*#
2095 * Convert Detail Reservation Procedure
2096 * This procedure converted detail level reservation into transaction
2097 * It also relieves the reservation.
2098 * @param p_api_version Version of the api
2099 * @param p_validation_level validation level
2100 * @param p_init_msg_list message list flag - default is False
2101 * @param p_commit commit flag - default is False
2102 * @param x_message_count # of messages
2103 * @param x_message_list List of messages
2104 * @param x_return_status return status
2105 * @param p_qty_convert IQuantity to be converted
2106 * @param p_reservation_rec mtl_reservations rowtype
2107 * @rep:scope public
2108 * @rep:lifecycle active
2109 * @rep:displayname convert_dtl_reservation
2110 */
2111 /*================================================================================
2112 Procedure
2113 convert_dtl_reservation
2114 Description
2115 This procedure is used to convert a detailed reservation to WIP issue transaction.
2116 The full reservation quantity or a part quantity can be converted. The reservation
2117 will be relieved accordingly. Where the reservation is fully relieved, it is deleted.
2118 Where a reservation is at high level or part level and subinventory or locator information
2119 is missing, there will be an attempt to complete the detailing by defaulting values from
2120 the material detail line or org params.
2121
2122 Parameters
2123 p_api_version (O) Requested api version. Currently at 2.0
2124
2125 p_init_msg_list (O) To initialize the message stack. Default is FALSE
2126
2127 p_commit (O) Indicates whether to commit. This is defaulted to FALSE
2128
2129 x_message_count Number of messages returned by the processing
2130
2131 x_message_list Message stack returned by the processing
2132
2133 x_return_status outcome of the API call
2134 S - Success
2135 E - Error
2136 U - Unexpected Error
2137
2138 p_reservation_rec (R) The reservation row identifying the target reservation
2139 Following columns are used from this row.
2140 reservation_id (R)
2141
2142 p_qty_convert (O) The quantity to be converted to an inventory transaction
2146 ================================================================================*/
2143 This can be the full reservation quantity or part of it.
2144 Reflects the UOM defined for gme_material_details.dtl_um
2145 Default value is the full reservation quantity
2147 PROCEDURE convert_dtl_reservation (
2148 p_api_version IN NUMBER := 2.0
2149 ,p_validation_level IN NUMBER
2150 := gme_common_pvt.g_max_errors
2151 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2152 ,p_commit IN VARCHAR2 := fnd_api.g_false
2153 ,x_message_count OUT NOCOPY NUMBER
2154 ,x_message_list OUT NOCOPY VARCHAR2
2155 ,x_return_status OUT NOCOPY VARCHAR2
2156 ,p_reservation_rec IN mtl_reservations%ROWTYPE
2157 ,p_qty_convert IN NUMBER := NULL);
2158
2159 /*#
2160 * Insert Batch Step Resource Procedure
2161 * This procedure is used to insert a resource in a batchstep activity.
2162 * @param p_api_version Version of the api
2163 * @param p_validation_level validation level
2164 * @param p_init_msg_list message list flag - default is False
2165 * @param p_commit commit flag - default is False
2166 * @param p_org_code Inventory Organization (Plant or Lab)
2167 * @param p_batch_no Batch Number
2168 * @param p_batchstep_no Batch Step Number
2169 * @param p_activity Activity
2170 * @param p_ignore_qty_below_cap Ignore if peocess qty is below capacity of the resource
2171 * @param p_batchstep_resource_rec gme_batchstep_resource rowtype
2172 * @param p_validate_flexfields validate flexfields flag ('T','F')
2173 * @param x_batchstep_resource_rec gme_batchstep_resource rowtype
2174 * @param x_message_count # of messages
2175 * @param x_message_list List of messages
2176 * @param x_return_status return status
2177 * @rep:scope public
2178 * @rep:lifecycle active
2179 * @rep:displayname insert_batchstep_resource
2180 */
2181 /*================================================================================
2182 Procedure
2183 insert_batchstep_resource
2184 Description
2185 This procedure is used to insert a resource for an activity of a step
2186 The target placement for the new resource can be identified using the ID
2187 columns within p_batchstep_resource_rec.
2188 Alternatively the following keys can be used together
2189 p_org_code
2190 p_batch_no
2191 p_batchstep_no
2192 p_activity
2193 p_batchstep_resource_rec.resources
2194
2195 The procedure will return the newly inserted row including the identifier
2196 x_batchstep_resource.batchstep_resource_id
2197
2198 Parameters
2199 p_api_version required API version
2200 p_validation_level required level of validation
2201 p_init_msg_list initialization of message stack
2202 p_commit controls whether or not commit is issued
2203 p_batchstep_resource_rec batchstep resource to be inserted for an activity
2204 Ensure that the resources column is populated.
2205 p_org_code organization code
2206 p_batch_no batch number
2207 p_batchstep_no batch step number
2208 p_activity batch step activity
2209 p_ignore_qty_below_cap controls whether or not rsrc_qty can go below rsrc capacity
2210 p_validate_flexfield controls whether or not flexfield validation is instigated
2211 x_batchstep_resource returns inserted batchstep resource row
2212 x_message_count number of messages on stack
2213 x_message_list messages added to the stack during processing
2214 x_return_status outcome of the API call
2215 S - Success
2216 E - Error
2217 U - Unexpected Error
2218 ================================================================================*/
2219 PROCEDURE insert_batchstep_resource (
2220 p_api_version IN NUMBER
2221 ,p_validation_level IN NUMBER
2222 := gme_common_pvt.g_max_errors
2223 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2224 ,p_commit IN VARCHAR2 := fnd_api.g_false
2225 ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
2226 ,p_org_code IN VARCHAR2 := NULL
2227 ,p_batch_no IN VARCHAR2 := NULL
2228 ,p_batchstep_no IN NUMBER := NULL
2229 ,p_activity IN VARCHAR2 := NULL
2230 ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_false
2231 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
2232 ,x_batchstep_resource_rec OUT NOCOPY gme_batch_step_resources%ROWTYPE
2233 ,x_message_count OUT NOCOPY NUMBER
2234 ,x_message_list OUT NOCOPY VARCHAR2
2235 ,x_return_status OUT NOCOPY VARCHAR2);
2236
2237 /*#
2238 * Update Batch Step Resource Procedure
2239 * This procedure is used to insert a resource in a batchstep activity.
2240 * @param p_api_version Version of the api
2241 * @param p_validation_level validation level
2242 * @param p_init_msg_list message list flag - default is False
2246 * @param p_batchstep_no Batch Step Number
2243 * @param p_commit commit flag - default is False
2244 * @param p_org_code Inventory Organization (Plant or Lab)
2245 * @param p_batch_no Batch Number
2247 * @param p_activity Activity
2248 * @param p_ignore_qty_below_cap Ignore if peocess qty is below capacity of the resource
2249 * @param p_batchstep_resource_rec gme_batchstep_resource rowtype
2250 * @param p_validate_flexfields validate flexfields flag ('T','F')
2251 * @param x_batchstep_resource_rec gme_batchstep_resource rowtype
2252 * @param x_message_count # of messages
2253 * @param x_message_list List of messages
2254 * @param x_return_status return status
2255 * @rep:scope public
2256 * @rep:lifecycle active
2257 * @rep:displayname update_batchstep_resource
2258 */
2259 /*================================================================================
2260 Procedure
2261 update_batchstep_resource
2262 Description
2263 This procedure is used to update an existing resource of an activity of a step
2264 Provide either a unique identifier or key field values to target the row for update.
2265
2266 Parameters
2267 p_api_version required API version
2268 p_validation_level required level of validation
2269 p_init_msg_list initialization of message stack
2270 p_commit controls whether or not commit is issued
2271 p_batchstep_resource_rec batchstep resource updates to be applied
2272 provide batchstep_resource_id as a unique identifier for the target row
2273 Alternatively, populate key fields below in conjunction with
2274 resources
2275 p_org_code organization code
2276 p_batch_no batch number
2277 p_batchstep_no batch step number
2278 p_activity batch step activity
2279 p_ignore_qty_below_cap controls whether or not rsrc_qty can go below rsrc capacity
2280 p_validate_flexfield controls whether or not flexfield validation is instigated
2281 x_batchstep_resource returns inserted batchstep resource row
2282 x_message_count number of messages on stack
2283 x_message_list messages added to the stack during processing
2284 x_return_status outcome of the API call
2285 S - Success
2286 E - Error
2287 U - Unexpected Error
2288 ================================================================================*/
2289 PROCEDURE update_batchstep_resource (
2290 p_api_version IN NUMBER
2291 ,p_validation_level IN NUMBER
2292 := gme_common_pvt.g_max_errors
2293 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2294 ,p_commit IN VARCHAR2 := fnd_api.g_false
2295 ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
2296 ,p_org_code IN VARCHAR2 := NULL
2297 ,p_batch_no IN VARCHAR2 := NULL
2298 ,p_batchstep_no IN NUMBER := NULL
2299 ,p_activity IN VARCHAR2 := NULL
2300 ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_false
2301 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
2302 ,x_batchstep_resource_rec OUT NOCOPY gme_batch_step_resources%ROWTYPE
2303 ,x_message_count OUT NOCOPY NUMBER
2304 ,x_message_list OUT NOCOPY VARCHAR2
2305 ,x_return_status OUT NOCOPY VARCHAR2);
2306
2307 /*#
2308 * Delete Batch Step Resource Procedure
2309 * This procedure is used to delete a resource from a batchstep activity.
2310 * @param p_api_version Version of the api
2311 * @param p_validation_level validation level
2312 * @param p_init_msg_list message list flag - default is False
2313 * @param p_commit commit flag - default is False
2314 * @param p_org_code Inventory Organization (Plant or Lab)
2315 * @param p_batch_no Batch Number
2316 * @param p_batchstep_no Batch Step Number
2317 * @param p_activity Activity
2318 * @param p_batchstep_resource_id To uniquely identify gme_batchstep_resource
2319 * @param p_resource Resource Name
2320 * @param x_message_count # of messages
2321 * @param x_message_list List of messages
2322 * @param x_return_status return status
2323 * @rep:scope public
2324 * @rep:lifecycle active
2325 * @rep:displayname delete_batchstep_resource
2326 */
2327 /*================================================================================
2328 Procedure
2329 delete_batchstep_resource
2330 Description
2331 This procedure is used to delete an existing resource of an activity of a step
2332 Provide either a unique identifier or key field values to target the row.
2333
2334 Parameters
2335 p_api_version required API version
2336 p_validation_level required level of validation
2337 p_init_msg_list initialization of message stack
2338 p_commit controls whether or not commit is issued
2339 p_batchstep_resource_id uniquely identifies the batchstep resource for deletion
2340 p_org_code organization code
2341 p_batch_no batch number
2342 p_batchstep_no batch step number
2346 S - Success
2343 p_activity batch step activity
2344 p_resource batch step activity resource
2345 x_return_status outcome of the API call
2347 E - Error
2348 U - Unexpected Error
2349 ================================================================================*/
2350 PROCEDURE delete_batchstep_resource (
2351 p_api_version IN NUMBER := 2.0
2352 ,p_validation_level IN NUMBER
2353 := gme_common_pvt.g_max_errors
2354 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2355 ,p_commit IN VARCHAR2 := fnd_api.g_false
2356 ,p_batchstep_resource_id IN NUMBER := NULL
2357 ,p_org_code IN VARCHAR2 := NULL
2358 ,p_batch_no IN VARCHAR2 := NULL
2359 ,p_batchstep_no IN NUMBER := NULL
2360 ,p_activity IN VARCHAR2 := NULL
2361 ,p_resource IN VARCHAR2 := NULL
2362 ,x_message_count OUT NOCOPY NUMBER
2363 ,x_message_list OUT NOCOPY VARCHAR2
2364 ,x_return_status OUT NOCOPY VARCHAR2);
2365
2366 /*#
2367 * Auto Detail Line Procedure
2368 * This procedure Creates detail level reservations for the given ingredient line
2369 * as per the picking rules defined.
2370 * @param p_api_version Version of the api
2371 * @param p_validation_level validation level
2372 * @param p_init_msg_list message list flag - default is False
2373 * @param p_commit commit flag - default is False
2374 * @param x_message_count # of messages
2375 * @param x_message_list List of messages
2376 * @param x_return_status return status
2377 * @param p_org_code Inventory Organization (Plant or Lab)
2378 * @param p_batch_no Batch number
2379 * @param p_line_no Line number of the ingredient
2380 * @param p_material_detail_id Identifier for the ingredient line
2381 * @rep:scope public
2382 * @rep:lifecycle active
2383 * @rep:displayname auto_detail_line
2384 */
2385 /*================================================================================
2386 Procedure
2387 auto_detail_line
2388 Description
2389 This procedure is used to generate detailed reservations for an ingredient line.
2390 The WMS rules engine is called to determine which inventory is reserved according to
2391 availability and selection rules.
2392 The ingredeint line MUST be identified either using p_material_detail_id OR
2393 the combination of p_org_code,p_batch_no,p_line_no
2394
2395 Parameters
2396 p_api_version (O) Requested api version. Currently at 2.0
2397 p_init_msg_list (O) To initialize the message stack. Default is FALSE
2398 p_commit (O) Indicates whether to commit. This is defaulted to FALSE
2399 x_message_count Number of messages returned by the processing
2400 x_message_list Message stack returned by the processing
2401 x_return_status outcome of the API call
2402 S - Success
2403 E - Error
2404 U - Unexpected Error
2405
2406 p_material_detail_id (O) Identifier for the ingredient row against which
2407 detailed reservations will be placed.
2408 Must be supplied if org/batch/line below are not.
2409
2410 p_org_code (O) Organization owning the production batch
2411 p_batch_no (O) Production batch
2412 p_line_no (O) Ingredient line within the production batch
2413 ================================================================================*/
2414 PROCEDURE auto_detail_line (
2415 p_api_version IN NUMBER := 2.0
2416 ,p_validation_level IN NUMBER
2417 := gme_common_pvt.g_max_errors
2418 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2419 ,p_commit IN VARCHAR2 := fnd_api.g_false
2420 ,x_message_count OUT NOCOPY NUMBER
2421 ,x_message_list OUT NOCOPY VARCHAR2
2422 ,x_return_status OUT NOCOPY VARCHAR2
2423 ,p_material_detail_id IN NUMBER
2424 ,p_org_code IN VARCHAR2
2425 ,p_batch_no IN VARCHAR2
2426 ,p_line_no IN NUMBER);
2427
2428 /*#
2429 * Auto Detail Batch Reservations Procedure
2430 * This procedure Creates detail level reservations for each ingredient line
2431 * in the production batch as per the picking rules defined.
2432 * @param p_api_version Version of the api
2433 * @param p_init_msg_list message list flag - default is False
2434 * @param p_commit commit flag - default is False
2435 * @param x_message_count # of messages
2436 * @param x_message_list List of messages
2437 * @param x_return_status return status
2438 * @param p_org_code Inventory Organization
2439 * @param p_batch_rec Batch header row
2440 * @rep:scope public
2441 * @rep:lifecycle active
2442 * @rep:displayname auto_detail_batch
2443 */
2444 /*================================================================================
2445 Procedure
2446 auto_detail_batch
2447 Description
2448 This procedure is used to generate detailed reservations for the ingredient lines
2452
2449 of a production batch.
2450 The WMS rules engine is called to determine which inventory is reserved according to
2451 availability and selection rules.
2453 Parameters
2454 p_api_version (O) Requested api version. Currently at 2.0
2455 p_init_msg_list (O) To initialize the message stack. Default is FALSE
2456 p_commit (O) Indicates whether to commit. This is defaulted to FALSE
2457 x_message_count Number of messages returned by the processing
2458 x_message_list Message stack returned by the processing
2459 x_return_status outcome of the API call
2460 S - Success
2461 E - Error
2462 U - Unexpected Error
2463
2464 p_org_code (R) Organization owning the production batch
2465 p_batch_rec (R) Production batch
2466 ================================================================================*/
2467
2468 PROCEDURE auto_detail_batch (p_api_version IN NUMBER := 2.0
2469 ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
2470 ,p_commit IN VARCHAR2 := FND_API.G_FALSE
2471 ,x_message_count OUT NOCOPY NUMBER
2472 ,x_message_list OUT NOCOPY VARCHAR2
2473 ,x_return_status OUT NOCOPY VARCHAR2
2474 ,p_org_code IN VARCHAR2
2475 ,p_batch_rec IN GME_BATCH_HEADER%ROWTYPE);
2476 /*#
2477 * Inserts an activity for a step.
2478 * @param p_api_version Version of the api
2479 * @param p_validation_level validation level
2480 * @param p_init_msg_list message list flag - default is False
2481 * @param p_commit commit flag - default is False
2482 * @param x_message_count # of messages
2483 * @param x_message_list List of messages
2484 * @param x_return_status return status
2485 * @param p_batchstep_activity_rec Batch step activity record to identify step activities
2486 * @param p_batchstep_resource_tbl Resources table
2487 * @param p_org_code Organization Code
2488 * @param p_batch_no Batch Number
2489 * @param p_batchstep_no Batch Step Number
2490 * @param p_ignore_qty_below_cap Ignore quantity below cap flag - default is False
2491 * @param p_validate_flexfield Whether to validate the flexfields - default is False
2492 * @param x_batchstep_activity_rec Batch step activity record to identify step activities
2493 * @rep:scope public
2494 * @rep:lifecycle active
2495 * @rep:displayname Insert Batchstep Activity
2496 */
2497
2498 /*================================================================================
2499 Procedure
2500 insert_batchstep_activity
2501 Description
2502 This procedure is used to insert an activity for a step
2503
2504 Parameters
2505 p_batchstep_activity_rec (R) activity to be inserted for a step
2506 p_batchstep_resource_tbl (R) one or more resources to be inserted for the activity
2507 p_org_code (O) organization code
2508 p_batch_no (O) batch number
2509 p_batchstep_no(O) batch step number
2510 p_ignore_qty_below_cap (O) controls - allow rsrc_qty going below rsrc capacity
2511 p_validate_flexfield (O) Whether to validate the flexfields
2512 x_batchstep_activity_rec newly inserted activity row, can be used for update etc
2513 x_return_status outcome of the API call
2514 S - Success
2515 E - Error
2516 U - Unexpected Error
2517 ================================================================================*/
2518 PROCEDURE insert_batchstep_activity (
2519 p_api_version IN NUMBER ,
2520 p_validation_level IN NUMBER
2521 := gme_common_pvt.g_max_errors,
2522 p_init_msg_list IN VARCHAR2
2523 DEFAULT fnd_api.g_false,
2524 p_commit IN VARCHAR2
2525 DEFAULT fnd_api.g_false,
2526 p_org_code IN VARCHAR2,
2527 p_batchstep_activity_rec IN gme_batch_step_activities%ROWTYPE,
2528 p_batchstep_resource_tbl IN gme_create_step_pvt.resources_tab,
2529 p_batch_no IN VARCHAR2 := NULL,
2530 p_batchstep_no IN NUMBER := NULL,
2531 p_ignore_qty_below_cap IN VARCHAR2
2532 DEFAULT fnd_api.g_false,
2533 p_validate_flexfield IN VARCHAR2
2534 DEFAULT fnd_api.g_false,
2535 x_batchstep_activity_rec OUT NOCOPY gme_batch_step_activities%ROWTYPE,
2536 x_message_count OUT NOCOPY NUMBER,
2537 x_message_list OUT NOCOPY VARCHAR2,
2538 x_return_status OUT NOCOPY VARCHAR2
2539 );
2540
2541 /*#
2542 * Updates an activity for a step.
2543 * @param p_api_version Version of the api
2544 * @param p_validation_level validation level
2545 * @param p_init_msg_list message list flag - default is False
2546 * @param p_commit commit flag - default is False
2547 * @param x_message_count # of messages
2548 * @param x_message_list List of messages
2549 * @param x_return_status return status
2553 * @param p_batchstep_no Batch Step Number
2550 * @param p_batchstep_activity_rec Batch step activity record to identify step activities
2551 * @param p_org_code Organization Code
2552 * @param p_batch_no Batch Number
2554 * @param p_validate_flexfield Whether to validate the flexfields - default is False
2555 * @param x_batchstep_activity_rec Batch step activity record to identify step activities
2556 * @rep:scope public
2557 * @rep:lifecycle active
2558 * @rep:displayname Update Batchstep Activity
2559 */
2560
2561 /*================================================================================
2562 Procedure
2563 update_batchstep_activity
2564 Description
2565 This procedure is used to update an activity for a step
2566
2567 Parameters
2568 p_batchstep_activity (R) activity to be updated
2569 p_org_code (O) organization code
2570 p_batch_no (O) batch number
2571 p_batchstep_no(O) batch step number
2572 p_validate_flexfield (O) Whether to validate the flexfields
2573 x_batchstep_activity updated activity row
2574 x_return_status outcome of the API call
2575 S - Success
2576 E - Error
2577 U - Unexpected Error
2578 ================================================================================*/
2579 PROCEDURE update_batchstep_activity (
2580 p_api_version IN NUMBER ,
2581 p_validation_level IN NUMBER
2582 := gme_common_pvt.g_max_errors,
2583 p_init_msg_list IN VARCHAR2
2584 DEFAULT fnd_api.g_false,
2585 p_commit IN VARCHAR2
2586 DEFAULT fnd_api.g_false,
2587 p_org_code IN VARCHAR2,
2588 p_batchstep_activity_rec IN gme_batch_step_activities%ROWTYPE,
2589 p_batch_no IN VARCHAR2 := NULL,
2590 p_batchstep_no IN NUMBER := NULL,
2591 p_validate_flexfield IN VARCHAR2
2592 DEFAULT fnd_api.g_false,
2593 x_batchstep_activity_rec OUT NOCOPY gme_batch_step_activities%ROWTYPE,
2594 x_message_count OUT NOCOPY NUMBER,
2595 x_message_list OUT NOCOPY VARCHAR2,
2596 x_return_status OUT NOCOPY VARCHAR2
2597 );
2598
2599 /*#
2600 * Deletes an activity from a step. Note that proper identification like
2601 * activity id or a combination of organization code, batch number, and batch step
2602 * number must be provided for the batch step to be deleted.
2603 * @param p_api_version Version of the API
2604 * @param p_validation_level Validation level
2605 * @param p_init_msg_list Message list flag - default is False
2606 * @param p_commit Commit flag - default is False
2607 * @param p_batchstep_activity_id Batch step activity id
2608 * @param p_org_code Organization Code
2609 * @param p_batch_no Batch Number
2610 * @param p_batchstep_no Batch Step Number
2611 * @param p_activity Activity
2612 * @param x_message_count Number of messages
2613 * @param x_message_list List of messages
2614 * @param x_return_status Indicates the return status of an API.
2615 * @rep:scope public
2616 * @rep:lifecycle active
2617 * @rep:displayname Delete Batchstep Activity
2618 */
2619
2620 /*================================================================================
2621 Procedure
2622 delete_batchstep_activity
2623 Description
2624 This procedure is used to delete an activity from a step. Note that either the
2625 activity_id must be provided or the combination of organization_code, batch_no, batchstep_no,
2626 and activity in order to uniquely identify an activity to be deleted.
2627
2628 Parameters
2629 p_batchstep_activity_id (O) activity_id to be deleted
2630 p_org_code (O) organization code
2631 p_batch_no (O) batch number
2632 p_batchstep_no(O) batch step number
2633 p_activity(O) activity
2634 x_return_status outcome of the API call
2635 S - Success
2636 E - Error
2637 U - Unexpected Error
2638 ================================================================================*/
2639 PROCEDURE delete_batchstep_activity (
2640 p_api_version IN NUMBER := 2.0,
2641 p_validation_level IN NUMBER
2642 := gme_common_pvt.g_max_errors,
2643 p_init_msg_list IN VARCHAR2
2644 DEFAULT fnd_api.g_false,
2645 p_commit IN VARCHAR2
2646 DEFAULT fnd_api.g_false,
2647 p_org_code IN VARCHAR2,
2648 p_batchstep_activity_id IN NUMBER := NULL,
2649 p_batch_no IN VARCHAR2 := NULL,
2650 p_batchstep_no IN NUMBER := NULL,
2651 p_activity IN VARCHAR2 := NULL,
2652 x_message_count OUT NOCOPY NUMBER,
2653 x_message_list OUT NOCOPY VARCHAR2,
2654 x_return_status OUT NOCOPY VARCHAR2
2655 );
2656 /*#
2657 * Convert Fpo Procedure
2658 * This procedure is used to convert the firm planned order to one of many batches.
2659 * @param p_api_version Version of the api
2663 * @param x_message_count # of messages
2660 * @param p_validation_level validation level
2661 * @param p_init_msg_list message list flag - default is False
2662 * @param p_commit commit flag - default is False
2664 * @param x_message_list List of messages
2665 * @param p_enforce_vldt_check enforce validity check
2666 * @param x_return_status return status
2667 * @param p_org_code organization code
2668 * @param p_batch_header gme_batch_header rowtype
2669 * @param x_batch_header gme_batch_header rowtype
2670 * @param p_batch_size batch size
2671 * @param p_num_batches number of batches
2672 * @param p_validity_rule_id recipe_validity_rule_id Validity rule id
2673 * @param p_validity_rule_tab recipe_validity_rule_tab record type
2674 * @param p_leadtime leadtime
2675 * @param p_batch_offset batch offset
2676 * @param p_offset_type offset type
2677 * @param p_plan_start_date plan start date
2678 * @param p_plan_cmplt_date plan cmplt date
2679 * @param p_use_shop_cal use shop calendar flag
2680 * @param p_contiguity_override contiguity override
2681 * @param p_use_for_all use validity rule for all batches flag - default is True
2682 * @rep:scope public
2683 * @rep:lifecycle active
2684 * @rep:displayname convert_fpo
2685 */
2686
2687 /*================================================================================
2688 Procedure
2689 convert_fpo
2690 Description
2691 This procedure is used to convert a firm planned order to one or many batches.
2692
2693 Parameters
2694 p_api_version (O) API version number
2695 p_validation_level (O) Required level of validation
2696 p_init_msg_list (O) Indicates whether or not message stack should be initialized
2697 p_commit (O) T/F to instigate a COMMIT or not
2698 p_enforce_vldt_check (O) T/F for validity rule verification
2699 p_org_code (O) Organization Code associated with the batch
2700 p_batch_header (R) The FPO row to identify the FPO
2701 Following columns are used from this row.
2702 batch_id (R) organization_id
2703 p_batch_size (R) The size of the batch to be created.
2704 p_num_batches (R) Number of batches to be created.
2705 p_validity_rule_id (R) The validity rule to be used to create the batch (if
2706 converting to 1 batch or p_use_for_all is set to True)
2707 p_validity_rule_tab (O) The validity rules tab (if converting to multiple batches)
2708 p_leadtime (O) The batch duration in case routing data or
2709 production rules does not exists.
2710 p_batch_offset (O) The offset time between batches.
2711 p_offset_type (O) The offset type.
2712 0 - Start to start
2713 1 - Finish to start
2714 p_plan_start_date (O) The start date of the first batch. Must be provided if plan_cmplt_date is not.
2715 p_plan_cmplt_date (O) The completion date of the last batch
2716 p_use_shop_cal (O) T/F - to use shop calendar or not.
2717 p_contiguity_override (O) T/F - for contigious period of calendar.
2718 p_use_for_all (O) T/F - Use the same validity rule for all the batches.
2719 x_return_status outcome of the API call
2720 S - Success
2721 E - Error
2722 U - Unexpected Error
2723 V - Inventory shortages exist
2724 ================================================================================*/
2725
2726 PROCEDURE convert_fpo (
2727 p_api_version IN NUMBER := 2.0
2728 ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
2729 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2730 ,p_commit IN VARCHAR2 := fnd_api.g_false
2731 ,x_message_count OUT NOCOPY NUMBER
2732 ,x_message_list OUT NOCOPY VARCHAR2
2733 ,p_enforce_vldt_check IN VARCHAR2 := fnd_api.g_true
2734 ,x_return_status OUT NOCOPY VARCHAR2
2735 ,p_org_code IN VARCHAR2 := NULL
2736 ,p_batch_header IN gme_batch_header%ROWTYPE
2737 ,x_batch_header OUT NOCOPY gme_batch_header%ROWTYPE
2738 ,p_batch_size IN NUMBER
2739 ,p_num_batches IN NUMBER
2740 ,p_validity_rule_id IN NUMBER
2741 ,p_validity_rule_tab IN gme_common_pvt.recipe_validity_rule_tab
2742 ,p_leadtime IN NUMBER DEFAULT 0
2743 ,p_batch_offset IN NUMBER DEFAULT 0
2744 ,p_offset_type IN NUMBER DEFAULT 0
2745 ,p_plan_start_date IN gme_batch_header.plan_start_date%TYPE
2746 ,p_plan_cmplt_date IN gme_batch_header.plan_cmplt_date%TYPE
2747 ,p_use_shop_cal IN VARCHAR2 := fnd_api.g_false
2748 ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
2749 ,p_use_for_all IN VARCHAR2 := fnd_api.g_true);
2750
2751 /*#
2752 * Create a pending product lot. Note that identification must be provided:
2753 * material detail id or batch_id, line_no, line_type or
2754 * batch_no, org_code, line_no, line_type (batch_type is assumed to be Batch)
2755 * @param p_api_version Version of the API
2756 * @param p_validation_level Validation level
2757 * @param p_init_msg_list Message list flag - default is False
2758 * @param p_commit Commit flag - default is False
2762 * @param p_pending_product_lots_rec Pending product lot record with data to populate
2759 * @param p_batch_header_rec Batch header record with optional key specified
2760 * @param p_org_code Organization Code
2761 * @param p_material_detail_rec Material detail record with key combination specified
2763 * @param p_expiration_date Expiration date for item with expiration control as user-defined.
2764 * @param p_create_lot Create product lot if it does not exist. Product and by-product only.
2765 * @param p_generate_lot Generate product lot if nothing is passed. Product and by-product only.
2766 * @param p_generate_parent_lot Generate parent product lot. Product and by-product only.
2767 * @param x_pending_product_lots_rec Output Pending product lot record.
2768 * @param x_message_count Number of messages
2769 * @param x_message_list List of messages
2770 * @param x_return_status Indicates the return status of an API.
2771 * @rep:scope public
2772 * @rep:lifecycle active
2773 * @rep:displayname Create Pending Product Lot
2774 */
2775
2776 /*================================================================================
2777 Procedure
2778 create_pending_product_lot
2779 Description
2780 This procedure is used to create a pending product lot record for a specified
2781 material detail record.
2782 Following key sequences can be specified:
2783 material_detail_id OR
2784 batch_id, line_no, line_type OR
2785 batch_no, org_code, line_no, line_type (batch_type is assumed to be Batch)
2786
2787 Parameters
2788 p_batch_header_rec (O) batch header record
2789 p_org_code (O) organization code
2790 p_material_detail_rec (O) material detail record
2791 p_pending_product_lots_rec (R) pending product lots record
2792 p_create_lot (O) This indicates whether to create the lot if the lot does
2793 not exist. Default to False, do not create the lot. This
2794 applies to products and by-products only.
2795 p_expiration_date If Expiration control is user-defined, this parameter is used
2796 to provide the expiration date. It is applicable if p_create_lot is True
2797 p_generate_lot (O) This indicates to generate a lot if there is nothing passed
2798 in the lot number field of p_pending_product_lots_rec. Default
2799 to False, do not generate the lot. This applies to products and
2800 by-products only.
2801 p_generate_parent_lot (O) This indicates to generate a parent lot. Default
2802 to False, do not generate the parent lot. This applies to products and
2803 by-products only.
2804 x_return_status outcome of the API call
2805 S - Success
2806 E - Error
2807 U - Unexpected Error
2808 ================================================================================*/
2809
2810 PROCEDURE create_pending_product_lot
2811 (p_api_version IN NUMBER
2812 ,p_validation_level IN NUMBER
2813 := gme_common_pvt.g_max_errors
2814 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2815 ,p_commit IN VARCHAR2 := fnd_api.g_false
2816 ,x_message_count OUT NOCOPY NUMBER
2817 ,x_message_list OUT NOCOPY VARCHAR2
2818 ,x_return_status OUT NOCOPY VARCHAR2
2819 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
2820 ,p_org_code IN VARCHAR2
2821 ,p_create_lot IN VARCHAR2 := fnd_api.g_false
2822 ,p_generate_lot IN VARCHAR2 := fnd_api.g_false
2823 ,p_generate_parent_lot IN VARCHAR2 := fnd_api.g_false
2824 ,p_material_detail_rec IN gme_material_details%ROWTYPE
2825 /* nsinghi bug#4486074 Added the p_expiration_dt parameter. */
2826 ,p_expiration_date IN mtl_lot_numbers.expiration_date%TYPE := NULL
2827 ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
2828 ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE);
2829
2830 /*#
2831 * Update a pending product lot. Note that identification:
2832 * pending product lot id or a combination of keys must be provided.
2833 * @param p_api_version Version of the API
2834 * @param p_validation_level Validation level
2835 * @param p_init_msg_list Message list flag - default is False
2836 * @param p_commit Commit flag - default is False
2837 * @param p_batch_header_rec Batch header record with optional key specified
2838 * @param p_org_code Organization Code
2839 * @param p_material_detail_rec Material detail record with key combination specified
2840 * @param p_pending_product_lots_rec Pending product lot record with data to update
2841 * @param x_pending_product_lots_rec Output Pending product lot record.
2842 * @param x_message_count Number of messages
2843 * @param x_message_list List of messages
2844 * @param x_return_status Indicates the return status of an API.
2845 * @rep:scope public
2846 * @rep:lifecycle active
2847 * @rep:displayname Update Pending Product Lot
2848 */
2849
2850 /*================================================================================
2851 Procedure
2852 update_pending_product_lot
2853 Description
2857 pending_product_lot_id OR
2854 This procedure is used to update a pending product lot record for a specified
2855 pending product lot record
2856 Following key sequences can be specified:
2858 batch_id, line_no, line_type, sequence OR
2859 batch_no, org_code, line_no, line_type, sequence (batch_type is assumed to be Batch)
2860
2861 Parameters
2862 p_batch_header_rec (O) batch header record
2863 p_org_code (O) organization code
2864 p_material_detail_rec (O) material detail record
2865 p_pending_product_lots_rec (R) pending product lots record
2866 x_return_status outcome of the API call
2867 S - Success
2868 E - Error
2869 U - Unexpected Error
2870 ================================================================================*/
2871
2872 PROCEDURE update_pending_product_lot
2873 (p_api_version IN NUMBER
2874 ,p_validation_level IN NUMBER
2875 := gme_common_pvt.g_max_errors
2876 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2877 ,p_commit IN VARCHAR2 := fnd_api.g_false
2878 ,x_message_count OUT NOCOPY NUMBER
2879 ,x_message_list OUT NOCOPY VARCHAR2
2880 ,x_return_status OUT NOCOPY VARCHAR2
2881 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
2882 ,p_org_code IN VARCHAR2
2883 ,p_material_detail_rec IN gme_material_details%ROWTYPE
2884 ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE
2885 ,x_pending_product_lots_rec OUT NOCOPY gme_pending_product_lots%ROWTYPE);
2886
2887 /*#
2888 * Delete a pending product lot. Note that identification:
2889 * pending product lot id or a combination of keys must be provided.
2890 * @param p_api_version Version of the API
2891 * @param p_validation_level Validation level
2892 * @param p_init_msg_list Message list flag - default is False
2893 * @param p_commit Commit flag - default is False
2894 * @param p_batch_header_rec Batch header record with optional key specified
2895 * @param p_org_code Organization Code
2896 * @param p_material_detail_rec Material detail record with key combination specified
2897 * @param p_pending_product_lots_rec Pending product lot record to delete
2898 * @param x_message_count Number of messages
2899 * @param x_message_list List of messages
2900 * @param x_return_status Indicates the return status of an API.
2901 * @rep:scope public
2902 * @rep:lifecycle active
2903 * @rep:displayname Delete Pending Product Lot
2904 */
2905
2906 /*================================================================================
2907 Procedure
2908 Delete_pending_product_lot
2909 Description
2910 This procedure is used to delete a pending product lot record for a specified
2911 pending product lot record
2912 Following key sequences can be specified:
2913 pending_product_lot_id OR
2914 batch_id, line_no, line_type, sequence OR
2915 batch_no, org_code, line_no, line_type, sequence (batch_type is assumed to be Batch)
2916
2917 Parameters
2918 p_batch_header_rec (O) batch header record
2919 p_org_code (O) organization code
2920 p_material_detail_rec (O) material detail record
2921 p_pending_product_lots_rec (R) pending product lots record
2922 x_return_status outcome of the API call
2923 S - Success
2924 E - Error
2925 U - Unexpected Error
2926 ================================================================================*/
2927
2928 PROCEDURE delete_pending_product_lot
2929 (p_api_version IN NUMBER
2930 ,p_validation_level IN NUMBER
2931 := gme_common_pvt.g_max_errors
2932 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2933 ,p_commit IN VARCHAR2 := fnd_api.g_false
2934 ,x_message_count OUT NOCOPY NUMBER
2935 ,x_message_list OUT NOCOPY VARCHAR2
2936 ,x_return_status OUT NOCOPY VARCHAR2
2937 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
2938 ,p_org_code IN VARCHAR2
2939 ,p_material_detail_rec IN gme_material_details%ROWTYPE
2940 ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE);
2941
2942 /*#
2943 * Unrelease a batch. Note that identification is required:
2944 * p_batch_id or p_batch_no and p_org_code (batch_type is assumed to be batch)
2945 * @param p_api_version Version of the API
2946 * @param p_validation_level Validation level
2947 * @param p_init_msg_list Message list flag - default is False
2948 * @param p_commit Commit flag - default is False
2949 * @param p_batch_header_rec Identifies what batch to unrelease
2950 * @param p_org_code Organization Code
2951 * @param p_create_resv_pend_lots Indicates to create Reservations for ingredients and Pending Product Lots for Products
2952 * @param x_batch_header_rec Batch Header output record after unrelease
2953 * @param x_message_count Number of messages
2954 * @param x_message_list List of messages
2955 * @param x_return_status Indicates the return status of an API.
2956 * @rep:scope public
2957 * @rep:lifecycle active
2961 /*================================================================================
2958 * @rep:displayname Unrelease Batch
2959 */
2960
2962 Procedure
2963 unrelease_batch
2964 Description
2965 This procedure is used to unrelease a WIP batch.
2966 One of the following key sequences must be specified:
2967 batch_id OR
2968 batch_no, org_code batch_type assumed to be batch
2969
2970 Parameters
2971 p_batch_header_rec (O) batch header to identify the batch to unrelease
2972 p_org_code (O) organization code to identigy the batch is conjunction with p_batch_no
2973 p_create_resv_pend_lots (R) indicates whether to create reservations or pending product lots
2974 depending on the line type.
2975 x_batch_header_rec Output batch header record after unrelease
2976 x_return_status outcome of the API call
2977 S - Success
2978 E - Error
2979 U - Unexpected Error
2980 ================================================================================*/
2981 PROCEDURE unrelease_batch
2982 (p_api_version IN NUMBER
2983 ,p_validation_level IN NUMBER
2984 := gme_common_pvt.g_max_errors
2985 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2986 ,p_commit IN VARCHAR2 := fnd_api.g_false
2987 ,x_message_count OUT NOCOPY NUMBER
2988 ,x_message_list OUT NOCOPY VARCHAR2
2989 ,x_return_status OUT NOCOPY VARCHAR2
2990 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
2991 ,p_org_code IN VARCHAR2
2992 ,p_create_resv_pend_lots IN NUMBER
2993 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE);
2994
2995 /*#
2996 * Unrelease a step. Note that identification is required:
2997 * p_batchstep_id or p_batch_id, p_batchstep_no or p_batch_no, p_org_code
2998 * and batchstep_no (batch_type is assumed to be batch)
2999 * @param p_api_version Version of the API
3000 * @param p_validation_level Validation level
3001 * @param p_init_msg_list Message list flag - default is False
3002 * @param p_commit Commit flag - default is False
3003 * @param p_batch_step_rec Identifies what step to unrelease
3004 * @param p_batch_no Batch Number
3005 * @param p_org_code Organization Code
3006 * @param p_create_resv_pend_lots Indicates to create Reservations for ingredients and Pending Product Lots for Products associated to the step
3007 * @param x_batch_step_rec Batch Header output record after unrelease
3008 * @param x_message_count Number of messages
3009 * @param x_message_list List of messages
3010 * @param x_return_status Indicates the return status of an API.
3011 * @rep:scope public
3012 * @rep:lifecycle active
3013 * @rep:displayname Unrelease Step
3014 */
3015
3016 /*================================================================================
3017 Procedure
3018 unrelease_step
3019 Description
3020 This procedure is used to unrelease a WIP step.
3021 One of the following key sequences must be specified:
3022 batchstep_id OR
3023 batch_id, batchstep_no OR
3024 batch_no, org_code, batchstep_no batch_type assumed to be batch
3025
3026 Parameters
3027 p_batch_step_rec (O) batch step to identify the step to unrelease.
3028 p_batch_no (O) batch number to identify the step
3029 p_org_code (O) organization code to identify the step
3030 p_create_resv_pend_lots (R) indicates whether to create reservations or pending product lots
3031 depending on the line type associated to the step.
3032 x_batch_step_rec Output step record after unrelease
3033 x_return_status outcome of the API call
3034 S - Success
3035 E - Error
3036 U - Unexpected Error
3037 ================================================================================*/
3038 PROCEDURE unrelease_step
3039 (p_api_version IN NUMBER
3040 ,p_validation_level IN NUMBER
3041 := gme_common_pvt.g_max_errors
3042 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3043 ,p_commit IN VARCHAR2 := fnd_api.g_false
3044 ,x_message_count OUT NOCOPY NUMBER
3045 ,x_message_list OUT NOCOPY VARCHAR2
3046 ,x_return_status OUT NOCOPY VARCHAR2
3047 ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
3048 ,p_batch_no IN VARCHAR2
3049 ,p_org_code IN VARCHAR2
3050 ,p_create_resv_pend_lots IN NUMBER
3051 ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE);
3052
3053 /*#
3054 * Complete a batch. Note that identification is required:
3055 * batch_id or batch_no and p_org_code (batch_type is assumed to be batch)
3056 * @param p_api_version Version of the API
3057 * @param p_validation_level Validation level
3058 * @param p_init_msg_list Message list flag - default is False
3059 * @param p_commit Commit flag - default is False
3060 * @param p_batch_header_rec Identifies what batch to complete; also contains actual dates
3064 * @param x_batch_header_rec Batch Header output record after complete
3061 * @param p_org_code Organization Code
3062 * @param p_ignore_exception Indicates whether to ignore batch exceptions.
3063 * @param p_validate_flexfields Indicates whether to validate flexfields
3065 * @param x_exception_material_tbl Contains the exception material that was found.
3066 * @param x_message_count Number of messages
3067 * @param x_message_list List of messages
3068 * @param x_return_status Indicates the return status of an API.
3069 * @rep:scope public
3070 * @rep:lifecycle active
3071 * @rep:displayname Complete Batch
3072 */
3073
3074 /*================================================================================
3075 Procedure
3076 complete_batch
3077 Description
3078 This procedure is used to complete a Pending or WIP batch.
3079 One of the following key sequences must be specified:
3080 batch_id OR
3081 batch_no, org_code batch_type assumed to be batch
3082
3083 Parameters
3084 p_batch_header_rec (O) batch header to identify the batch to complete;
3085 p_org_code (O) organization code to identify the batch is conjunction with batch_no in p_batch_header_rec
3086 p_ignore_exception (O) indicates whether to ignore exceptions; if exceptions are ignored,
3087 x_exception_material_tbl won't be populated ever if exceptions were found
3088 p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;
3089 this is used for direct completion only because of release batch
3090 x_batch_header_rec Output batch header record after complete
3091 x_exception_material_tbl Batch exceptions found during batch complete. Won't be reported if
3092 p_ignore_exception is set to fnd_api.g_true.
3093 x_return_status outcome of the API call
3094 S - Success
3095 E - Error
3096 U - Unexpected Error
3097 X - Batch Exception
3098 ================================================================================*/
3099 PROCEDURE complete_batch
3100 (p_api_version IN NUMBER
3101 ,p_validation_level IN NUMBER
3102 := gme_common_pvt.g_max_errors
3103 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3104 ,p_commit IN VARCHAR2 := fnd_api.g_false
3105 ,x_message_count OUT NOCOPY NUMBER
3106 ,x_message_list OUT NOCOPY VARCHAR2
3107 ,x_return_status OUT NOCOPY VARCHAR2
3108 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3109 ,p_org_code IN VARCHAR2
3110 ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
3111 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
3112 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
3113 ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab);
3114
3115 /*#
3116 * Complete a step. Note that identification is required:
3117 * batchstep_id or batch_id, batchstep_no or batch_no, p_org_code and batchstep_no
3118 * (batch_type is assumed to be batch)
3119 * @param p_api_version Version of the API
3120 * @param p_validation_level Validation level
3121 * @param p_init_msg_list Message list flag - default is False
3122 * @param p_commit Commit flag - default is False
3123 * @param p_batch_step_rec Identifies what step to complete; also contains actual dates
3124 * @param p_batch_no Batch number to identify step
3125 * @param p_org_code Organization Code
3126 * @param p_ignore_exception Indicates whether to ignore step exceptions.
3127 * @param p_override_quality Indicates whether to override quality status.
3128 * @param p_validate_flexfields Indicates whether to validate flexfields (for pending batch only)
3129 * @param x_batch_step_rec Batch Step output record after complete
3130 * @param x_exception_material_tbl Contains the exception material that was found.
3131 * @param x_message_count Number of messages
3132 * @param x_message_list List of messages
3133 * @param x_return_status Indicates the return status of an API.
3134 * @rep:scope public
3135 * @rep:lifecycle active
3136 * @rep:displayname Complete Step
3137 */
3138
3139 /*================================================================================
3140 Procedure
3141 complete_step
3142 Description
3143 This procedure is used to complete a step
3144 One of the following key sequences must be specified:
3145 batchstep_id
3146 batch_id, batchstep_no OR
3147 batch_no, org_code, batchstep_no batch_type assumed to be batch
3148
3149 Parameters
3150 p_batch_step_rec (O) batch step to identify the step to complete.
3151 p_batch_no (O) batch_no to identify the step
3152 p_org_code (O) organization code to identify the step is conjunction with batch_no in p_batch_header_rec
3153 p_ignore_exception (O) indicates whether to ignore exceptions; if exceptions are ignored,
3154 x_exception_material_tbl won't be populated ever if exceptions were found
3155 p_override_quality (O) Override quality indicator; defaults to fnd_api.g_false
3156 p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;
3160 x_return_status outcome of the API call
3157 this is used for direct step completion (pending_batch) only, because of release batch
3158 x_batch_step_rec Output batch step record after complete
3159 x_exception_material_tbl Material exceptions found in complete step (only those associated to step)
3161 S - Success
3162 E - Error
3163 U - Unexpected Error
3164 X - Batch Exception
3165 ================================================================================*/
3166 PROCEDURE complete_step
3167 (p_api_version IN NUMBER
3168 ,p_validation_level IN NUMBER
3169 := gme_common_pvt.g_max_errors
3170 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3171 ,p_commit IN VARCHAR2 := fnd_api.g_false
3172 ,x_message_count OUT NOCOPY NUMBER
3173 ,x_message_list OUT NOCOPY VARCHAR2
3174 ,x_return_status OUT NOCOPY VARCHAR2
3175 ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
3176 ,p_batch_no IN VARCHAR2
3177 ,p_org_code IN VARCHAR2
3178 ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
3179 ,p_override_quality IN VARCHAR2 := fnd_api.g_false
3180 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
3181 ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
3182 ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab);
3183
3184 /*#
3185 * Release a batch. Note that identification is required:
3186 * batch_id or batch_no and p_org_code (batch_type is assumed to be batch)
3187 * @param p_api_version Version of the API
3188 * @param p_validation_level Validation level
3189 * @param p_init_msg_list Message list flag - default is False
3190 * @param p_commit Commit flag - default is False
3191 * @param p_batch_header_rec Identifies what batch to release; also contains actual start date
3192 * @param p_org_code Organization Code
3193 * @param p_ignore_exception Indicates whether to ignore batch exceptions.
3194 * @param p_validate_flexfields Indicates whether to validate flexfields
3195 * @param x_batch_header_rec Batch Header output record after release
3196 * @param x_exception_material_tbl Contains the exception material that was found.
3197 * @param x_message_count Number of messages
3198 * @param x_message_list List of messages
3199 * @param x_return_status Indicates the return status of an API.
3200 * @rep:scope public
3201 * @rep:lifecycle active
3202 * @rep:displayname Release Batch
3203 */
3204
3205 /*================================================================================
3206 Procedure
3207 release_batch
3208 Description
3209 This procedure is used to release a batch
3210 One of the following key sequences must be specified:
3211 batch_id OR
3212 batch_no, org_code, batch_type assumed to be batch
3213
3214 Parameters
3215 p_batch_header_rec (O) batch header to identify the batch to release;
3216 p_org_code (O) organization code to identify the batch is conjunction with batch_no in p_batch_header_rec
3217 p_ignore_exception (O) indicates whether to ignore exceptions; if exceptions are ignored,
3218 x_exception_material_tbl won't be populated even if exceptions were found
3219 p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;
3220 x_batch_header_rec Output batch header record after release
3221 x_exception_material_tbl Batch exceptions found in release batch
3222 x_return_status outcome of the API call
3223 S - Success
3224 E - Error
3225 U - Unexpected Error
3226 X - Batch Exception
3227 ================================================================================*/
3228 PROCEDURE release_batch
3229 (p_api_version IN NUMBER
3230 ,p_validation_level IN NUMBER
3231 := gme_common_pvt.g_max_errors
3232 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3233 ,p_commit IN VARCHAR2 := fnd_api.g_false
3234 ,x_message_count OUT NOCOPY NUMBER
3235 ,x_message_list OUT NOCOPY VARCHAR2
3236 ,x_return_status OUT NOCOPY VARCHAR2
3237 ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3238 ,p_org_code IN VARCHAR2
3239 ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
3240 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
3241 ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
3242 ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab);
3243
3244 /*#
3245 * Release a step. Note that identification is required:
3246 * batchstep_id or batch_id, batchstep_no or batch_no, p_org_code and batchstep_no
3247 * (batch_type is assumed to be batch)
3248 * @param p_api_version Version of the API
3249 * @param p_validation_level Validation level
3250 * @param p_init_msg_list Message list flag - default is False
3251 * @param p_commit Commit flag - default is False
3255 * @param p_ignore_exception Indicates whether to ignore step exceptions.
3252 * @param p_batch_step_rec Identifies what step to release; also contains actual start date
3253 * @param p_batch_no Batch number to identify step
3254 * @param p_org_code Organization Code
3256 * @param p_validate_flexfields Indicates whether to validate flexfields (for step or batch (when pending))
3257 * @param x_batch_step_rec Batch Step output record after release
3258 * @param x_exception_material_tbl Contains the exception material that was found.
3259 * @param x_message_count Number of messages
3260 * @param x_message_list List of messages
3261 * @param x_return_status Indicates the return status of an API.
3262 * @rep:scope public
3263 * @rep:lifecycle active
3264 * @rep:displayname Release Step
3265 */
3266
3267 /*================================================================================
3268 Procedure
3269 release_step
3270 Description
3271 This procedure is used to release a step
3272 One of the following key sequences must be specified:
3273 batchstep_id
3274 batch_id, batchstep_no OR
3275 batch_no, org_code, batchstep_no batch_type assumed to be batch
3276
3277 Parameters
3278 p_batch step_rec (O) batch step to identify the step to release.
3279 p_batch_no (O) batch_no to identify the step
3280 p_org_code (O) organization code to identify the step is conjunction with batch_no in p_batch_header_rec
3281 p_ignore_exception (O) indicates whether to ignore exceptions; if exceptions are ignored,
3282 x_exception_material_tbl won't be populated ever if exceptions were found
3283 p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;
3284 x_batch_step_rec Output batch step record after release
3285 x_exception_material_tbl Material exceptions found in release step (only those associated to step and processed dep steps)
3286 x_return_status outcome of the API call
3287 S - Success
3288 E - Error
3289 U - Unexpected Error
3290 X - Batch Exception
3291 ================================================================================*/
3292 PROCEDURE release_step
3293 (p_api_version IN NUMBER
3294 ,p_validation_level IN NUMBER
3295 := gme_common_pvt.g_max_errors
3296 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3297 ,p_commit IN VARCHAR2 := fnd_api.g_false
3298 ,x_message_count OUT NOCOPY NUMBER
3299 ,x_message_list OUT NOCOPY VARCHAR2
3300 ,x_return_status OUT NOCOPY VARCHAR2
3301 ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
3302 ,p_batch_no IN VARCHAR2
3303 ,p_org_code IN VARCHAR2
3304 ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
3305 ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
3306 ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
3307 ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab);
3308
3309 /*#
3310 * Process a Group.
3311 * This API is used to perform mass batch actions on a group of batches.
3312 * Required parameters are - group_name, org_code, action and on_error_flag.
3313 * group_name and org_code.
3314 * @param p_api_version Version of the API
3315 * @param p_validation_level Validation level
3316 * @param p_init_msg_list Message list flag - default is False
3317 * @param p_commit Commit flag - default is False
3318 * @param p_group_name Group name.
3319 * @param p_org_code Organization code
3320 * @param p_action Identifies what batch action to perform. Valid values from lookup type GME_BATCH_GROUP_ACTION (3,4,5,6,7,8,9,10,11)
3321 * @param p_on_error_flag Indicates whether to continue or stop processing in case of an error. Valid values are 'STOP' OR 'CONTINUE'
3322 * @param x_message_count Number of messages
3323 * @param x_message_list List of messages
3324 * @param x_return_status Indicates the return status of an API.
3325 * @rep:scope public
3326 * @rep:lifecycle active
3327 * @rep:displayname Process Group
3328 */
3329
3330 /*================================================================================
3331 Procedure
3332 process_group
3333 Description
3334 This procedure is used to perform mass batch actions on group of batches.
3335 Required parameters are:
3336 group_name, org_code, action and on_error_flag.
3337
3338 Parameters
3339 p_group_name Group name to identify the group of batches to process;
3340 Set of batches can grouped under a group name which can be created
3341 from the batch group management form.
3342 p_org_code organization code to identify the group_name is conjunction with group_name in p_batch_header_rec
3343 p_action Identifies what batch action to perform
3344 Valid values from lookup type GME_BATCH_GROUP_ACTION (3,4,5,6,7,8,9,10,11)
3345 p_on_error_flag Indicates whether to continue or stop processing in case of an error.
3346 Valid values are 'STOP' OR 'CONTINUE'
3347 x_return_status outcome of the API call
3348 S - Success
3349 E - Error
3350 U - Unexpected Error
3351 X - Batch Exception
3352 ================================================================================*/
3353 PROCEDURE process_group
3354 (p_api_version IN NUMBER
3355 ,p_validation_level IN NUMBER
3356 := gme_common_pvt.g_max_errors
3357 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3358 ,p_commit IN VARCHAR2 := fnd_api.g_false
3359 ,p_group_name IN VARCHAR2
3360 ,p_org_code IN VARCHAR2
3361 ,p_action IN NUMBER
3362 ,p_on_error_flag IN VARCHAR2
3363 ,x_message_count OUT NOCOPY NUMBER
3364 ,x_message_list OUT NOCOPY VARCHAR2
3365 ,x_return_status OUT NOCOPY VARCHAR2
3366 );
3367 END gme_api_pub;