DBA Data[Home] [Help]

APPS.GME_API_MAIN dependencies on FND_API

Line 10: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

6: /*************************************************************************/
7: PROCEDURE create_batch (
8: p_validation_level IN NUMBER
9: := gme_common_pvt.g_max_errors
10: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
11: ,x_message_count OUT NOCOPY NUMBER
12: ,x_message_list OUT NOCOPY VARCHAR2
13: ,x_return_status OUT NOCOPY VARCHAR2
14: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 25: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true

21: ,p_recipe_version IN NUMBER := NULL
22: ,p_product_no IN VARCHAR2 := NULL
23: ,p_product_id IN NUMBER := NULL
24: ,p_sum_all_prod_lines IN VARCHAR2 := 'A'
25: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
26: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
27: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_false
28: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
29: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

Line 26: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true

22: ,p_product_no IN VARCHAR2 := NULL
23: ,p_product_id IN NUMBER := NULL
24: ,p_sum_all_prod_lines IN VARCHAR2 := 'A'
25: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
26: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
27: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_false
28: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
29: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
30: IS

Line 27: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_false

23: ,p_product_id IN NUMBER := NULL
24: ,p_sum_all_prod_lines IN VARCHAR2 := 'A'
25: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
26: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
27: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_false
28: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
29: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
30: IS
31: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_BATCH';

Line 28: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false

24: ,p_sum_all_prod_lines IN VARCHAR2 := 'A'
25: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
26: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
27: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_false
28: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
29: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
30: IS
31: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_BATCH';
32: setup_failure EXCEPTION;

Line 52: x_return_status := fnd_api.g_ret_sts_error;

48: gme_common_pvt.g_setup_done :=
49: gme_common_pvt.setup (p_batch_header_rec.organization_id);
50:
51: IF NOT gme_common_pvt.g_setup_done THEN
52: x_return_status := fnd_api.g_ret_sts_error;
53: RAISE setup_failure;
54: END IF;
55: END IF;
56:

Line 58: x_return_status := fnd_api.g_ret_sts_success;

54: END IF;
55: END IF;
56:
57: /* Set the return status to success initially */
58: x_return_status := fnd_api.g_ret_sts_success;
59:
60: -- Initialize message list and count if needed
61: IF p_init_msg_list = fnd_api.g_true THEN
62: fnd_msg_pub.initialize;

Line 61: IF p_init_msg_list = fnd_api.g_true THEN

57: /* Set the return status to success initially */
58: x_return_status := fnd_api.g_ret_sts_success;
59:
60: -- Initialize message list and count if needed
61: IF p_init_msg_list = fnd_api.g_true THEN
62: fnd_msg_pub.initialize;
63: gme_common_pvt.g_error_count := 0;
64: END IF;
65:

Line 82: IF x_return_status <> fnd_api.g_ret_sts_success THEN

78: ,x_batch_header_rec => x_batch_header_rec
79: ,x_exception_material_tbl => x_exception_material_tbl
80: ,x_return_status => x_return_status);
81:
82: IF x_return_status <> fnd_api.g_ret_sts_success THEN
83: RAISE batch_creation_failure;
84: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
85:
86: IF x_message_count = 0 THEN

Line 84: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

80: ,x_return_status => x_return_status);
81:
82: IF x_return_status <> fnd_api.g_ret_sts_success THEN
83: RAISE batch_creation_failure;
84: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
85:
86: IF x_message_count = 0 THEN
87: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
88: END IF;

Line 91: ,p_encoded => fnd_api.g_false

87: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
88: END IF;
89:
90: gme_common_pvt.count_and_get (x_count => x_message_count
91: ,p_encoded => fnd_api.g_false
92: ,x_data => x_message_list);
93:
94: IF (g_debug IS NOT NULL) THEN
95: gme_debug.put_line ( 'Completed '

Line 112: ,p_encoded => fnd_api.g_false

108: x_batch_header_rec := NULL;
109: END IF;
110:
111: gme_common_pvt.count_and_get (x_count => x_message_count
112: ,p_encoded => fnd_api.g_false
113: ,x_data => x_message_list);
114: WHEN setup_failure THEN
115: ROLLBACK TO SAVEPOINT create_batch;
116: x_batch_header_rec := NULL;

Line 118: ,p_encoded => fnd_api.g_false

114: WHEN setup_failure THEN
115: ROLLBACK TO SAVEPOINT create_batch;
116: x_batch_header_rec := NULL;
117: gme_common_pvt.count_and_get (x_count => x_message_count
118: ,p_encoded => fnd_api.g_false
119: ,x_data => x_message_list);
120: x_return_status := fnd_api.g_ret_sts_error;
121: WHEN OTHERS THEN
122: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 120: x_return_status := fnd_api.g_ret_sts_error;

116: x_batch_header_rec := NULL;
117: gme_common_pvt.count_and_get (x_count => x_message_count
118: ,p_encoded => fnd_api.g_false
119: ,x_data => x_message_list);
120: x_return_status := fnd_api.g_ret_sts_error;
121: WHEN OTHERS THEN
122: IF g_debug <= gme_debug.g_log_unexpected THEN
123: gme_debug.put_line ( 'When others exception in '
124: || g_pkg_name

Line 134: ,p_encoded => fnd_api.g_false

130:
131: ROLLBACK TO SAVEPOINT create_batch;
132: x_batch_header_rec := NULL;
133: gme_common_pvt.count_and_get (x_count => x_message_count
134: ,p_encoded => fnd_api.g_false
135: ,x_data => x_message_list);
136: x_return_status := fnd_api.g_ret_sts_unexp_error;
137: END create_batch;
138:

Line 136: x_return_status := fnd_api.g_ret_sts_unexp_error;

132: x_batch_header_rec := NULL;
133: gme_common_pvt.count_and_get (x_count => x_message_count
134: ,p_encoded => fnd_api.g_false
135: ,x_data => x_message_list);
136: x_return_status := fnd_api.g_ret_sts_unexp_error;
137: END create_batch;
138:
139: /*************************************************************************/
140: PROCEDURE create_phantom (

Line 143: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

139: /*************************************************************************/
140: PROCEDURE create_phantom (
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: ,x_message_count OUT NOCOPY NUMBER
145: ,x_message_list OUT NOCOPY VARCHAR2
146: ,x_return_status OUT NOCOPY VARCHAR2
147: ,p_material_detail_rec IN gme_material_details%ROWTYPE

Line 152: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true

148: ,p_batch_header_rec IN gme_batch_header%ROWTYPE --Bug#6738476
149: ,p_batch_no IN VARCHAR2 DEFAULT NULL
150: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
151: ,p_validity_rule_id IN NUMBER
152: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
153: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
154: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
155: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
156: IS

Line 153: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true

149: ,p_batch_no IN VARCHAR2 DEFAULT NULL
150: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
151: ,p_validity_rule_id IN NUMBER
152: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
153: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
154: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
155: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
156: IS
157: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_PHANTOM';

Line 154: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false

150: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
151: ,p_validity_rule_id IN NUMBER
152: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
153: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
154: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
155: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
156: IS
157: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_PHANTOM';
158: setup_failure EXCEPTION;

Line 179: x_return_status := fnd_api.g_ret_sts_error;

175: gme_common_pvt.g_setup_done :=
176: gme_common_pvt.setup (p_material_detail_rec.organization_id);
177:
178: IF NOT gme_common_pvt.g_setup_done THEN
179: x_return_status := fnd_api.g_ret_sts_error;
180: RAISE setup_failure;
181: END IF;
182: END IF;
183:

Line 185: IF p_init_msg_list = fnd_api.g_true THEN

181: END IF;
182: END IF;
183:
184: -- Initialize message list and count if needed
185: IF p_init_msg_list = fnd_api.g_true THEN
186: fnd_msg_pub.initialize;
187: gme_common_pvt.g_error_count := 0;
188: END IF;
189:

Line 191: x_return_status := fnd_api.g_ret_sts_success;

187: gme_common_pvt.g_error_count := 0;
188: END IF;
189:
190: /* Set the return status to success initially */
191: x_return_status := fnd_api.g_ret_sts_success;
192: gme_common_pvt.set_timestamp;
193: gme_phantom_pvt.create_phantom
194: (p_material_detail_rec => p_material_detail_rec
195: ,p_batch_header_rec => p_batch_header_rec --Bug#6738476

Line 205: IF x_return_status <> fnd_api.g_ret_sts_success THEN

201: ,p_use_least_cost_validity_rule => p_use_least_cost_validity_rule
202: ,x_exception_material_tbl => x_exception_material_tbl
203: ,x_return_status => x_return_status);
204:
205: IF x_return_status <> fnd_api.g_ret_sts_success THEN
206: RAISE phantom_creation_failure;
207: END IF;
208:
209: IF (g_debug <= gme_debug.g_log_procedure) THEN

Line 220: ,p_encoded => fnd_api.g_false

216: WHEN phantom_creation_failure OR setup_failure THEN
217: ROLLBACK TO SAVEPOINT create_phantom;
218: x_material_detail_rec := NULL;
219: gme_common_pvt.count_and_get (x_count => x_message_count
220: ,p_encoded => fnd_api.g_false
221: ,x_data => x_message_list);
222: WHEN OTHERS THEN
223: IF g_debug <= gme_debug.g_log_unexpected THEN
224: gme_debug.put_line ( 'When others exception in '

Line 236: ,p_encoded => fnd_api.g_false

232: ROLLBACK TO SAVEPOINT create_phantom;
233: x_material_detail_rec := NULL;
234: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
235: gme_common_pvt.count_and_get (x_count => x_message_count
236: ,p_encoded => fnd_api.g_false
237: ,x_data => x_message_list);
238: x_return_status := fnd_api.g_ret_sts_unexp_error;
239: END create_phantom;
240:

Line 238: x_return_status := fnd_api.g_ret_sts_unexp_error;

234: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
235: gme_common_pvt.count_and_get (x_count => x_message_count
236: ,p_encoded => fnd_api.g_false
237: ,x_data => x_message_list);
238: x_return_status := fnd_api.g_ret_sts_unexp_error;
239: END create_phantom;
240:
241: PROCEDURE scale_batch (
242: p_validation_level IN NUMBER

Line 281: x_return_status := fnd_api.g_ret_sts_error;

277: gme_common_pvt.g_setup_done :=
278: gme_common_pvt.setup (p_batch_header_rec.organization_id);
279:
280: IF NOT gme_common_pvt.g_setup_done THEN
281: x_return_status := fnd_api.g_ret_sts_error;
282: RAISE setup_failure;
283: END IF;
284: END IF;
285:

Line 288: IF p_init_msg_list = fnd_api.g_true THEN

284: END IF;
285:
286:
287: /* Initialize message list and count if needed */
288: IF p_init_msg_list = fnd_api.g_true THEN
289: fnd_msg_pub.initialize;
290: gme_common_pvt.g_error_count := 0;
291: END IF;
292:

Line 309: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, 'C', 'W') THEN

305: ,x_batch_header_rec => x_batch_header_rec
306: ,x_return_status => x_return_status);
307: x_message_count := 0;
308: -- pawan kumar bug 5358705 add condition for different return status 'c' and 'w'
309: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, 'C', 'W') THEN
310: RAISE scale_batch_failed;
311: END IF;
312: gme_common_pvt.log_message ('GME_SCALE_SUCCESS');
313: IF (g_debug <= gme_debug.g_log_procedure) THEN

Line 323: x_return_status := fnd_api.g_ret_sts_error;

319: EXCEPTION
320: WHEN setup_failure THEN
321: ROLLBACK TO SAVEPOINT scale_batch;
322: x_batch_header_rec := NULL;
323: x_return_status := fnd_api.g_ret_sts_error;
324: gme_common_pvt.count_and_get (x_count => x_message_count
325: ,p_encoded => fnd_api.g_false
326: ,x_data => x_message_list);
327: WHEN scale_batch_failed THEN

Line 325: ,p_encoded => fnd_api.g_false

321: ROLLBACK TO SAVEPOINT scale_batch;
322: x_batch_header_rec := NULL;
323: x_return_status := fnd_api.g_ret_sts_error;
324: gme_common_pvt.count_and_get (x_count => x_message_count
325: ,p_encoded => fnd_api.g_false
326: ,x_data => x_message_list);
327: WHEN scale_batch_failed THEN
328: ROLLBACK TO SAVEPOINT scale_batch;
329: x_batch_header_rec := NULL;

Line 331: ,p_encoded => fnd_api.g_false

327: WHEN scale_batch_failed THEN
328: ROLLBACK TO SAVEPOINT scale_batch;
329: x_batch_header_rec := NULL;
330: gme_common_pvt.count_and_get (x_count => x_message_count
331: ,p_encoded => fnd_api.g_false
332: ,x_data => x_message_list);
333: WHEN batch_save_failed OR batch_fetch_error THEN
334: ROLLBACK TO SAVEPOINT scale_batch;
335: x_batch_header_rec := NULL;

Line 337: ,p_encoded => fnd_api.g_false

333: WHEN batch_save_failed OR batch_fetch_error THEN
334: ROLLBACK TO SAVEPOINT scale_batch;
335: x_batch_header_rec := NULL;
336: gme_common_pvt.count_and_get (x_count => x_message_count
337: ,p_encoded => fnd_api.g_false
338: ,x_data => x_message_list);
339: WHEN OTHERS THEN
340: ROLLBACK TO SAVEPOINT scale_batch;
341: x_batch_header_rec := NULL;

Line 344: ,p_encoded => fnd_api.g_false

340: ROLLBACK TO SAVEPOINT scale_batch;
341: x_batch_header_rec := NULL;
342: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
343: gme_common_pvt.count_and_get (x_count => x_message_count
344: ,p_encoded => fnd_api.g_false
345: ,x_data => x_message_list);
346: x_return_status := fnd_api.g_ret_sts_unexp_error;
347: END scale_batch;
348:

Line 346: x_return_status := fnd_api.g_ret_sts_unexp_error;

342: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
343: gme_common_pvt.count_and_get (x_count => x_message_count
344: ,p_encoded => fnd_api.g_false
345: ,x_data => x_message_list);
346: x_return_status := fnd_api.g_ret_sts_unexp_error;
347: END scale_batch;
348:
349: /*************************************************************************/
350: PROCEDURE theoretical_yield_batch (

Line 389: IF p_init_msg_list = fnd_api.g_true THEN

385: END IF;
386: END IF;
387:
388: /* Initialize message list and count if needed */
389: IF p_init_msg_list = fnd_api.g_true THEN
390: fnd_msg_pub.initialize;
391: gme_common_pvt.g_error_count := 0;
392: END IF;
393:

Line 400: IF x_return_status <> fnd_api.g_ret_sts_success THEN

396: (p_batch_header_rec => p_batch_header_rec
397: ,p_scale_factor => p_scale_factor
398: ,x_return_status => x_return_status);
399:
400: IF x_return_status <> fnd_api.g_ret_sts_success THEN
401: RAISE theoretical_yield_failed;
402: END IF;
403:
404: gme_common_pvt.count_and_get (x_count => x_message_count

Line 405: ,p_encoded => fnd_api.g_false

401: RAISE theoretical_yield_failed;
402: END IF;
403:
404: gme_common_pvt.count_and_get (x_count => x_message_count
405: ,p_encoded => fnd_api.g_false
406: ,x_data => x_message_list);
407:
408: IF (g_debug <= gme_debug.g_log_procedure) THEN
409: gme_debug.put_line ( 'Completed '

Line 417: x_return_status := fnd_api.g_ret_sts_error;

413: END IF;
414: EXCEPTION
415: WHEN setup_failure THEN
416: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
417: x_return_status := fnd_api.g_ret_sts_error;
418: gme_common_pvt.count_and_get (x_count => x_message_count
419: ,p_encoded => fnd_api.g_false
420: ,x_data => x_message_list);
421: WHEN theoretical_yield_failed OR batch_save_failed THEN

Line 419: ,p_encoded => fnd_api.g_false

415: WHEN setup_failure THEN
416: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
417: x_return_status := fnd_api.g_ret_sts_error;
418: gme_common_pvt.count_and_get (x_count => x_message_count
419: ,p_encoded => fnd_api.g_false
420: ,x_data => x_message_list);
421: WHEN theoretical_yield_failed OR batch_save_failed THEN
422: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
423: gme_common_pvt.count_and_get (x_count => x_message_count

Line 424: ,p_encoded => fnd_api.g_false

420: ,x_data => x_message_list);
421: WHEN theoretical_yield_failed OR batch_save_failed THEN
422: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
423: gme_common_pvt.count_and_get (x_count => x_message_count
424: ,p_encoded => fnd_api.g_false
425: ,x_data => x_message_list);
426: WHEN OTHERS THEN
427: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
428: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 430: ,p_encoded => fnd_api.g_false

426: WHEN OTHERS THEN
427: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
428: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
429: gme_common_pvt.count_and_get (x_count => x_message_count
430: ,p_encoded => fnd_api.g_false
431: ,x_data => x_message_list);
432: x_return_status := fnd_api.g_ret_sts_unexp_error;
433: END theoretical_yield_batch;
434:

Line 432: x_return_status := fnd_api.g_ret_sts_unexp_error;

428: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
429: gme_common_pvt.count_and_get (x_count => x_message_count
430: ,p_encoded => fnd_api.g_false
431: ,x_data => x_message_list);
432: x_return_status := fnd_api.g_ret_sts_unexp_error;
433: END theoretical_yield_batch;
434:
435: /*************************************************************************/
436: PROCEDURE insert_material_line (

Line 439: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

435: /*************************************************************************/
436: PROCEDURE insert_material_line (
437: p_validation_level IN NUMBER
438: := gme_common_pvt.g_max_errors
439: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
440: ,x_message_count OUT NOCOPY NUMBER
441: ,x_message_list OUT NOCOPY VARCHAR2
442: ,x_return_status OUT NOCOPY VARCHAR2
443: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 463: x_return_status := fnd_api.g_ret_sts_success;

459: l_message_list VARCHAR2(2000);
460: BEGIN
461:
462: /* Set the return status to success initially */
463: x_return_status := fnd_api.g_ret_sts_success;
464:
465: SAVEPOINT insert_material_line1;
466:
467: IF (g_debug IS NOT NULL) THEN

Line 481: x_return_status := fnd_api.g_ret_sts_error;

477: gme_common_pvt.g_setup_done :=
478: gme_common_pvt.setup (p_batch_header_rec.organization_id);
479:
480: IF NOT gme_common_pvt.g_setup_done THEN
481: x_return_status := fnd_api.g_ret_sts_error;
482: RAISE setup_failure;
483: END IF;
484: END IF;
485:

Line 487: IF p_init_msg_list = fnd_api.g_true THEN

483: END IF;
484: END IF;
485:
486: -- Initialize message list and count if needed
487: IF p_init_msg_list = fnd_api.g_true THEN
488: fnd_msg_pub.initialize;
489: gme_common_pvt.g_error_count := 0;
490: END IF;
491:

Line 498: RAISE fnd_api.g_exc_error;

494: IF p_batch_step_id IS NOT NULL THEN
495: l_batch_step_rec.batchstep_id := p_batch_step_id;
496:
497: IF NOT gme_batch_steps_dbl.fetch_row(l_batch_step_rec, l_batch_step_rec) THEN
498: RAISE fnd_api.g_exc_error;
499: END IF;
500: END IF;
501:
502: insert_material_line (p_validation_level => p_validation_level

Line 514: IF x_return_status <> fnd_api.g_ret_sts_success THEN

510: ,p_trans_id => p_trans_id
511: ,x_transacted => x_transacted
512: ,x_material_detail_rec => x_material_detail_rec);
513:
514: IF x_return_status <> fnd_api.g_ret_sts_success THEN
515: RAISE ins_mtl_line_failure;
516: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
517:
518:

Line 516: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

512: ,x_material_detail_rec => x_material_detail_rec);
513:
514: IF x_return_status <> fnd_api.g_ret_sts_success THEN
515: RAISE ins_mtl_line_failure;
516: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
517:
518:
519: -- NEW
520: GME_ERES_PKG.INSERT_EVENT(P_EVENT_NAME => gme_common_pvt.G_BATCHMTL_ADDED

Line 531: IF x_return_status <> fnd_api.g_ret_sts_success THEN

527: ,P_PARENT_EVENT => NULL
528: ,P_PARENT_EVENT_KEY => NULL
529: ,P_PARENT_ERECORD_ID => NULL
530: ,X_STATUS => x_return_status);
531: IF x_return_status <> fnd_api.g_ret_sts_success THEN
532: RAISE ins_mtl_line_failure;
533: END IF;
534:
535: -- Bug 13070352 -- Moved GMF call after ERES.

Line 540: p_init_msg_list => FND_API.G_FALSE,

536:
537: -- Bug 5903208 -- call to GMF
538: GMF_VIB.Update_Batch_Requirements
539: ( p_api_version => 1.0,
540: p_init_msg_list => FND_API.G_FALSE,
541: p_batch_id => p_batch_header_rec.batch_id,
542: x_return_status => x_return_status,
543: x_msg_count => l_message_count,
544: x_msg_data => l_message_list);

Line 546: IF x_return_status <> FND_API.G_RET_STS_SUCCESS

542: x_return_status => x_return_status,
543: x_msg_count => l_message_count,
544: x_msg_data => l_message_list);
545:
546: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
547: THEN
548: RAISE gmf_cost_failure;
549: END IF;
550:

Line 552: ,p_encoded => fnd_api.g_false

548: RAISE gmf_cost_failure;
549: END IF;
550:
551: gme_common_pvt.count_and_get (x_count => x_message_count
552: ,p_encoded => fnd_api.g_false
553: ,x_data => x_message_list);
554:
555: IF (g_debug IS NOT NULL) THEN
556: gme_debug.put_line ( 'Completed '

Line 562: x_return_status := fnd_api.g_ret_sts_success;

558: || ' at '
559: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
560: END IF;
561: IF (x_return_status IS NULL) THEN
562: x_return_status := fnd_api.g_ret_sts_success;
563: END IF;
564: EXCEPTION
565: WHEN gmf_cost_failure THEN
566: -- Bug 5903208

Line 585: ,p_encoded => fnd_api.g_false

581: x_material_detail_rec := NULL;
582: END IF;
583:
584: gme_common_pvt.count_and_get (x_count => x_message_count
585: ,p_encoded => fnd_api.g_false
586: ,x_data => x_message_list);
587: WHEN setup_failure THEN
588: ROLLBACK TO SAVEPOINT insert_material_line1;
589: x_material_detail_rec := NULL;

Line 591: ,p_encoded => fnd_api.g_false

587: WHEN setup_failure THEN
588: ROLLBACK TO SAVEPOINT insert_material_line1;
589: x_material_detail_rec := NULL;
590: gme_common_pvt.count_and_get (x_count => x_message_count
591: ,p_encoded => fnd_api.g_false
592: ,x_data => x_message_list);
593: x_return_status := fnd_api.g_ret_sts_error;
594: WHEN OTHERS THEN
595: ROLLBACK TO SAVEPOINT insert_material_line1;

Line 593: x_return_status := fnd_api.g_ret_sts_error;

589: x_material_detail_rec := NULL;
590: gme_common_pvt.count_and_get (x_count => x_message_count
591: ,p_encoded => fnd_api.g_false
592: ,x_data => x_message_list);
593: x_return_status := fnd_api.g_ret_sts_error;
594: WHEN OTHERS THEN
595: ROLLBACK TO SAVEPOINT insert_material_line1;
596: x_material_detail_rec := NULL;
597:

Line 608: ,p_encoded => fnd_api.g_false

604: || SQLERRM);
605: END IF;
606:
607: gme_common_pvt.count_and_get (x_count => x_message_count
608: ,p_encoded => fnd_api.g_false
609: ,x_data => x_message_list);
610: x_return_status := fnd_api.g_ret_sts_unexp_error;
611: END insert_material_line;
612:

Line 610: x_return_status := fnd_api.g_ret_sts_unexp_error;

606:
607: gme_common_pvt.count_and_get (x_count => x_message_count
608: ,p_encoded => fnd_api.g_false
609: ,x_data => x_message_list);
610: x_return_status := fnd_api.g_ret_sts_unexp_error;
611: END insert_material_line;
612:
613: /*************************************************************************/
614: PROCEDURE insert_material_line (

Line 617: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

613: /*************************************************************************/
614: PROCEDURE insert_material_line (
615: p_validation_level IN NUMBER
616: := gme_common_pvt.g_max_errors
617: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
618: ,x_message_count OUT NOCOPY NUMBER
619: ,x_message_list OUT NOCOPY VARCHAR2
620: ,x_return_status OUT NOCOPY VARCHAR2
621: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 634: x_return_status := fnd_api.g_ret_sts_success;

630: ins_mtl_line_failure EXCEPTION;
631: BEGIN
632:
633: /* Set the return status to success initially */
634: x_return_status := fnd_api.g_ret_sts_success;
635:
636: SAVEPOINT insert_material_line;
637:
638: IF (g_debug IS NOT NULL) THEN

Line 652: x_return_status := fnd_api.g_ret_sts_error;

648: gme_common_pvt.g_setup_done :=
649: gme_common_pvt.setup (p_batch_header_rec.organization_id);
650:
651: IF NOT gme_common_pvt.g_setup_done THEN
652: x_return_status := fnd_api.g_ret_sts_error;
653: RAISE setup_failure;
654: END IF;
655: END IF;
656:

Line 658: IF p_init_msg_list = fnd_api.g_true THEN

654: END IF;
655: END IF;
656:
657: -- Initialize message list and count if needed
658: IF p_init_msg_list = fnd_api.g_true THEN
659: fnd_msg_pub.initialize;
660: gme_common_pvt.g_error_count := 0;
661: END IF;
662:

Line 674: IF x_return_status <> fnd_api.g_ret_sts_success THEN

670: ,x_transacted => x_transacted
671: ,x_material_detail_rec => x_material_detail_rec
672: ,x_return_status => x_return_status);
673:
674: IF x_return_status <> fnd_api.g_ret_sts_success THEN
675: RAISE ins_mtl_line_failure;
676: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
677:
678: gme_common_pvt.log_message ('GME_MTL_LINE_INSERTED');

Line 676: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

672: ,x_return_status => x_return_status);
673:
674: IF x_return_status <> fnd_api.g_ret_sts_success THEN
675: RAISE ins_mtl_line_failure;
676: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
677:
678: gme_common_pvt.log_message ('GME_MTL_LINE_INSERTED');
679:
680:

Line 682: ,p_encoded => fnd_api.g_false

678: gme_common_pvt.log_message ('GME_MTL_LINE_INSERTED');
679:
680:
681: gme_common_pvt.count_and_get (x_count => x_message_count
682: ,p_encoded => fnd_api.g_false
683: ,x_data => x_message_list);
684:
685: IF (g_debug IS NOT NULL) THEN
686: gme_debug.put_line ( 'Completed '

Line 692: x_return_status := fnd_api.g_ret_sts_success;

688: || ' at '
689: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
690: END IF;
691: IF (x_return_status IS NULL) THEN
692: x_return_status := fnd_api.g_ret_sts_success;
693: END IF;
694: EXCEPTION
695: WHEN ins_mtl_line_failure THEN
696: IF x_return_status NOT IN (gme_common_pvt.g_inv_short_err) THEN

Line 702: ,p_encoded => fnd_api.g_false

698: x_material_detail_rec := NULL;
699: END IF;
700:
701: gme_common_pvt.count_and_get (x_count => x_message_count
702: ,p_encoded => fnd_api.g_false
703: ,x_data => x_message_list);
704: WHEN setup_failure THEN
705: ROLLBACK TO SAVEPOINT insert_material_line;
706: x_material_detail_rec := NULL;

Line 708: ,p_encoded => fnd_api.g_false

704: WHEN setup_failure THEN
705: ROLLBACK TO SAVEPOINT insert_material_line;
706: x_material_detail_rec := NULL;
707: gme_common_pvt.count_and_get (x_count => x_message_count
708: ,p_encoded => fnd_api.g_false
709: ,x_data => x_message_list);
710: x_return_status := fnd_api.g_ret_sts_error;
711: WHEN OTHERS THEN
712: ROLLBACK TO SAVEPOINT insert_material_line;

Line 710: x_return_status := fnd_api.g_ret_sts_error;

706: x_material_detail_rec := NULL;
707: gme_common_pvt.count_and_get (x_count => x_message_count
708: ,p_encoded => fnd_api.g_false
709: ,x_data => x_message_list);
710: x_return_status := fnd_api.g_ret_sts_error;
711: WHEN OTHERS THEN
712: ROLLBACK TO SAVEPOINT insert_material_line;
713: x_material_detail_rec := NULL;
714:

Line 725: ,p_encoded => fnd_api.g_false

721: || SQLERRM);
722: END IF;
723:
724: gme_common_pvt.count_and_get (x_count => x_message_count
725: ,p_encoded => fnd_api.g_false
726: ,x_data => x_message_list);
727: x_return_status := fnd_api.g_ret_sts_unexp_error;
728: END insert_material_line;
729:

Line 727: x_return_status := fnd_api.g_ret_sts_unexp_error;

723:
724: gme_common_pvt.count_and_get (x_count => x_message_count
725: ,p_encoded => fnd_api.g_false
726: ,x_data => x_message_list);
727: x_return_status := fnd_api.g_ret_sts_unexp_error;
728: END insert_material_line;
729:
730: /*************************************************************************/
731: PROCEDURE update_material_line (

Line 735: := fnd_api.g_false

731: PROCEDURE update_material_line (
732: p_validation_level IN NUMBER
733: := gme_common_pvt.g_max_errors
734: ,p_init_msg_list IN VARCHAR2
735: := fnd_api.g_false
736: ,x_message_count OUT NOCOPY NUMBER
737: ,x_message_list OUT NOCOPY VARCHAR2
738: ,x_return_status OUT NOCOPY VARCHAR2
739: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 742: ,p_scale_phantom IN VARCHAR2 := fnd_api.g_false

738: ,x_return_status OUT NOCOPY VARCHAR2
739: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
740: ,p_material_detail_rec IN gme_material_details%ROWTYPE
741: ,p_batch_step_id IN NUMBER := NULL
742: ,p_scale_phantom IN VARCHAR2 := fnd_api.g_false
743: ,p_trans_id IN NUMBER
744: ,x_transacted OUT NOCOPY VARCHAR2
745: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE)
746: IS

Line 762: x_return_status := fnd_api.g_ret_sts_success;

758: l_message_list VARCHAR2(2000);
759: BEGIN
760:
761: /* Set the return status to success initially */
762: x_return_status := fnd_api.g_ret_sts_success;
763:
764: SAVEPOINT update_material_line1;
765:
766: IF (g_debug IS NOT NULL) THEN

Line 780: x_return_status := fnd_api.g_ret_sts_error;

776: gme_common_pvt.g_setup_done :=
777: gme_common_pvt.setup (p_batch_header_rec.organization_id);
778:
779: IF NOT gme_common_pvt.g_setup_done THEN
780: x_return_status := fnd_api.g_ret_sts_error;
781: RAISE setup_failure;
782: END IF;
783: END IF;
784:

Line 786: IF p_init_msg_list = fnd_api.g_true THEN

782: END IF;
783: END IF;
784:
785: -- Initialize message list and count if needed
786: IF p_init_msg_list = fnd_api.g_true THEN
787: fnd_msg_pub.initialize;
788: gme_common_pvt.g_error_count := 0;
789: END IF;
790:

Line 797: RAISE fnd_api.g_exc_error;

793: IF p_batch_step_id IS NOT NULL THEN
794: l_batch_step_rec.batchstep_id := p_batch_step_id;
795:
796: IF NOT gme_batch_steps_dbl.fetch_row(l_batch_step_rec, l_batch_step_rec) THEN
797: RAISE fnd_api.g_exc_error;
798: END IF;
799: END IF;
800:
801: l_stored_material_detail_rec.material_detail_id := p_material_detail_rec.material_detail_id;

Line 805: RAISE fnd_api.g_exc_error;

801: l_stored_material_detail_rec.material_detail_id := p_material_detail_rec.material_detail_id;
802:
803: IF NOT gme_material_details_dbl.fetch_row
804: (l_stored_material_detail_rec,l_stored_material_detail_rec) THEN
805: RAISE fnd_api.g_exc_error;
806: END IF;
807:
808: update_material_line
809: (p_validation_level => p_validation_level

Line 823: IF x_return_status <> fnd_api.g_ret_sts_success THEN

819: ,p_trans_id => p_trans_id
820: ,x_transacted => x_transacted
821: ,x_material_detail_rec => x_material_detail_rec);
822:
823: IF x_return_status <> fnd_api.g_ret_sts_success THEN
824: RAISE upd_mtl_line_failure;
825: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
826:
827: -- NEW

Line 825: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

821: ,x_material_detail_rec => x_material_detail_rec);
822:
823: IF x_return_status <> fnd_api.g_ret_sts_success THEN
824: RAISE upd_mtl_line_failure;
825: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
826:
827: -- NEW
828: GME_ERES_PKG.INSERT_EVENT(P_EVENT_NAME => gme_common_pvt.G_BATCHMTL_UPDATED
829: ,P_EVENT_KEY => p_material_detail_rec.batch_id||'-'||p_material_detail_rec.material_detail_id

Line 840: IF x_return_status <> fnd_api.g_ret_sts_success THEN

836: ,P_PARENT_EVENT_KEY => NULL
837: ,P_PARENT_ERECORD_ID => NULL
838: ,X_STATUS => x_return_status);
839:
840: IF x_return_status <> fnd_api.g_ret_sts_success THEN
841: RAISE upd_mtl_line_failure;
842: END IF;
843:
844: -- Bug 13070352 - Added GMF call that was missing for UPDATE material line.

Line 849: p_init_msg_list => FND_API.G_FALSE,

845:
846: -- Bug 5903208 -- call to GMF
847: GMF_VIB.Update_Batch_Requirements
848: ( p_api_version => 1.0,
849: p_init_msg_list => FND_API.G_FALSE,
850: p_batch_id => p_batch_header_rec.batch_id,
851: x_return_status => x_return_status,
852: x_msg_count => l_message_count,
853: x_msg_data => l_message_list);

Line 855: IF x_return_status <> FND_API.G_RET_STS_SUCCESS

851: x_return_status => x_return_status,
852: x_msg_count => l_message_count,
853: x_msg_data => l_message_list);
854:
855: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
856: THEN
857: RAISE gmf_cost_failure;
858: END IF;
859:

Line 861: ,p_encoded => fnd_api.g_false

857: RAISE gmf_cost_failure;
858: END IF;
859:
860: gme_common_pvt.count_and_get (x_count => x_message_count
861: ,p_encoded => fnd_api.g_false
862: ,x_data => x_message_list);
863:
864: IF (g_debug IS NOT NULL) THEN
865: gme_debug.put_line ( 'Completed '

Line 871: x_return_status := fnd_api.g_ret_sts_success;

867: || ' at '
868: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
869: END IF;
870: IF (x_return_status IS NULL) THEN
871: x_return_status := fnd_api.g_ret_sts_success;
872: END IF;
873: EXCEPTION
874:
875: -- Bug 13070352 - Added exception.

Line 898: ,p_encoded => fnd_api.g_false

894: x_material_detail_rec := NULL;
895: END IF;
896:
897: gme_common_pvt.count_and_get (x_count => x_message_count
898: ,p_encoded => fnd_api.g_false
899: ,x_data => x_message_list);
900: WHEN setup_failure THEN
901: ROLLBACK TO SAVEPOINT update_material_line1;
902: x_material_detail_rec := NULL;

Line 904: ,p_encoded => fnd_api.g_false

900: WHEN setup_failure THEN
901: ROLLBACK TO SAVEPOINT update_material_line1;
902: x_material_detail_rec := NULL;
903: gme_common_pvt.count_and_get (x_count => x_message_count
904: ,p_encoded => fnd_api.g_false
905: ,x_data => x_message_list);
906: x_return_status := fnd_api.g_ret_sts_error;
907: WHEN OTHERS THEN
908: ROLLBACK TO SAVEPOINT update_material_line1;

Line 906: x_return_status := fnd_api.g_ret_sts_error;

902: x_material_detail_rec := NULL;
903: gme_common_pvt.count_and_get (x_count => x_message_count
904: ,p_encoded => fnd_api.g_false
905: ,x_data => x_message_list);
906: x_return_status := fnd_api.g_ret_sts_error;
907: WHEN OTHERS THEN
908: ROLLBACK TO SAVEPOINT update_material_line1;
909: x_material_detail_rec := NULL;
910:

Line 921: ,p_encoded => fnd_api.g_false

917: || SQLERRM);
918: END IF;
919:
920: gme_common_pvt.count_and_get (x_count => x_message_count
921: ,p_encoded => fnd_api.g_false
922: ,x_data => x_message_list);
923: x_return_status := fnd_api.g_ret_sts_unexp_error;
924: END update_material_line;
925:

Line 923: x_return_status := fnd_api.g_ret_sts_unexp_error;

919:
920: gme_common_pvt.count_and_get (x_count => x_message_count
921: ,p_encoded => fnd_api.g_false
922: ,x_data => x_message_list);
923: x_return_status := fnd_api.g_ret_sts_unexp_error;
924: END update_material_line;
925:
926: /*************************************************************************/
927: PROCEDURE update_material_line (

Line 931: := fnd_api.g_false

927: PROCEDURE update_material_line (
928: p_validation_level IN NUMBER
929: := gme_common_pvt.g_max_errors
930: ,p_init_msg_list IN VARCHAR2
931: := fnd_api.g_false
932: ,x_message_count OUT NOCOPY NUMBER
933: ,x_message_list OUT NOCOPY VARCHAR2
934: ,x_return_status OUT NOCOPY VARCHAR2
935: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 940: := fnd_api.g_false

936: ,p_material_detail_rec IN gme_material_details%ROWTYPE
937: ,p_stored_material_detail_rec IN gme_material_details%ROWTYPE
938: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
939: ,p_scale_phantom IN VARCHAR2
940: := fnd_api.g_false
941: ,p_trans_id IN NUMBER
942: ,x_transacted OUT NOCOPY VARCHAR2
943: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE)
944: IS

Line 965: x_return_status := fnd_api.g_ret_sts_error;

961: gme_common_pvt.g_setup_done :=
962: gme_common_pvt.setup (p_batch_header_rec.organization_id);
963:
964: IF NOT gme_common_pvt.g_setup_done THEN
965: x_return_status := fnd_api.g_ret_sts_error;
966: RAISE setup_failure;
967: END IF;
968: END IF;
969:

Line 971: x_return_status := fnd_api.g_ret_sts_success;

967: END IF;
968: END IF;
969:
970: /* Set the return status to success initially */
971: x_return_status := fnd_api.g_ret_sts_success;
972:
973: -- Initialize message list and count if needed
974: IF p_init_msg_list = fnd_api.g_true THEN
975: fnd_msg_pub.initialize;

Line 974: IF p_init_msg_list = fnd_api.g_true THEN

970: /* Set the return status to success initially */
971: x_return_status := fnd_api.g_ret_sts_success;
972:
973: -- Initialize message list and count if needed
974: IF p_init_msg_list = fnd_api.g_true THEN
975: fnd_msg_pub.initialize;
976: gme_common_pvt.g_error_count := 0;
977: END IF;
978:

Line 991: IF x_return_status <> fnd_api.g_ret_sts_success THEN

987: ,x_transacted => x_transacted
988: ,x_return_status => x_return_status
989: ,x_material_detail_rec => x_material_detail_rec);
990:
991: IF x_return_status <> fnd_api.g_ret_sts_success THEN
992: RAISE upd_mtl_line_failure;
993: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
994:
995: gme_common_pvt.log_message ('GME_MTL_LINE_UPDATED');

Line 993: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

989: ,x_material_detail_rec => x_material_detail_rec);
990:
991: IF x_return_status <> fnd_api.g_ret_sts_success THEN
992: RAISE upd_mtl_line_failure;
993: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
994:
995: gme_common_pvt.log_message ('GME_MTL_LINE_UPDATED');
996:
997:

Line 999: ,p_encoded => fnd_api.g_false

995: gme_common_pvt.log_message ('GME_MTL_LINE_UPDATED');
996:
997:
998: gme_common_pvt.count_and_get (x_count => x_message_count
999: ,p_encoded => fnd_api.g_false
1000: ,x_data => x_message_list);
1001:
1002: IF (g_debug IS NOT NULL) THEN
1003: gme_debug.put_line ( 'Completed '

Line 1009: x_return_status := fnd_api.g_ret_sts_success;

1005: || ' at '
1006: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1007: END IF;
1008: IF (x_return_status IS NULL) THEN
1009: x_return_status := fnd_api.g_ret_sts_success;
1010: END IF;
1011: EXCEPTION
1012: WHEN upd_mtl_line_failure THEN
1013: IF x_return_status NOT IN (gme_common_pvt.g_inv_short_err) THEN

Line 1019: ,p_encoded => fnd_api.g_false

1015: x_material_detail_rec := NULL;
1016: END IF;
1017:
1018: gme_common_pvt.count_and_get (x_count => x_message_count
1019: ,p_encoded => fnd_api.g_false
1020: ,x_data => x_message_list);
1021: WHEN setup_failure THEN
1022: ROLLBACK TO SAVEPOINT update_material_line;
1023: x_material_detail_rec := NULL;

Line 1025: ,p_encoded => fnd_api.g_false

1021: WHEN setup_failure THEN
1022: ROLLBACK TO SAVEPOINT update_material_line;
1023: x_material_detail_rec := NULL;
1024: gme_common_pvt.count_and_get (x_count => x_message_count
1025: ,p_encoded => fnd_api.g_false
1026: ,x_data => x_message_list);
1027: x_return_status := fnd_api.g_ret_sts_error;
1028: WHEN OTHERS THEN
1029: ROLLBACK TO SAVEPOINT update_material_line;

Line 1027: x_return_status := fnd_api.g_ret_sts_error;

1023: x_material_detail_rec := NULL;
1024: gme_common_pvt.count_and_get (x_count => x_message_count
1025: ,p_encoded => fnd_api.g_false
1026: ,x_data => x_message_list);
1027: x_return_status := fnd_api.g_ret_sts_error;
1028: WHEN OTHERS THEN
1029: ROLLBACK TO SAVEPOINT update_material_line;
1030: x_material_detail_rec := NULL;
1031:

Line 1042: ,p_encoded => fnd_api.g_false

1038: || SQLERRM);
1039: END IF;
1040:
1041: gme_common_pvt.count_and_get (x_count => x_message_count
1042: ,p_encoded => fnd_api.g_false
1043: ,x_data => x_message_list);
1044: x_return_status := fnd_api.g_ret_sts_unexp_error;
1045: END update_material_line;
1046:

Line 1044: x_return_status := fnd_api.g_ret_sts_unexp_error;

1040:
1041: gme_common_pvt.count_and_get (x_count => x_message_count
1042: ,p_encoded => fnd_api.g_false
1043: ,x_data => x_message_list);
1044: x_return_status := fnd_api.g_ret_sts_unexp_error;
1045: END update_material_line;
1046:
1047: /*************************************************************************/
1048: PROCEDURE delete_material_line (

Line 1051: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

1047: /*************************************************************************/
1048: PROCEDURE delete_material_line (
1049: p_validation_level IN NUMBER
1050: := gme_common_pvt.g_max_errors
1051: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1052: ,x_message_count OUT NOCOPY NUMBER
1053: ,x_message_list OUT NOCOPY VARCHAR2
1054: ,x_return_status OUT NOCOPY VARCHAR2
1055: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 1076: x_return_status := fnd_api.g_ret_sts_success;

1072:
1073: BEGIN
1074:
1075: /* Set the return status to success initially */
1076: x_return_status := fnd_api.g_ret_sts_success;
1077:
1078: SAVEPOINT delete_material_line1;
1079:
1080: IF (g_debug IS NOT NULL) THEN

Line 1094: x_return_status := fnd_api.g_ret_sts_error;

1090: gme_common_pvt.g_setup_done :=
1091: gme_common_pvt.setup (p_batch_header_rec.organization_id);
1092:
1093: IF NOT gme_common_pvt.g_setup_done THEN
1094: x_return_status := fnd_api.g_ret_sts_error;
1095: RAISE setup_failure;
1096: END IF;
1097: END IF;
1098:

Line 1100: IF p_init_msg_list = fnd_api.g_true THEN

1096: END IF;
1097: END IF;
1098:
1099: -- Initialize message list and count if needed
1100: IF p_init_msg_list = fnd_api.g_true THEN
1101: fnd_msg_pub.initialize;
1102: gme_common_pvt.g_error_count := 0;
1103: END IF;
1104:

Line 1111: RAISE fnd_api.g_exc_error;

1107: IF p_batch_step_id IS NOT NULL THEN
1108: l_batch_step_rec.batchstep_id := p_batch_step_id;
1109:
1110: IF NOT gme_batch_steps_dbl.fetch_row(l_batch_step_rec, l_batch_step_rec) THEN
1111: RAISE fnd_api.g_exc_error;
1112: END IF;
1113: END IF;
1114:
1115: delete_material_line (

Line 1126: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1122: ,p_material_detail_rec => p_material_detail_rec
1123: ,p_batch_step_rec => l_batch_step_rec
1124: ,x_transacted => x_transacted);
1125:
1126: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1127: RAISE del_mtl_line_failure;
1128: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
1129:
1130: -- Bug 13070352

Line 1128: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

1124: ,x_transacted => x_transacted);
1125:
1126: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1127: RAISE del_mtl_line_failure;
1128: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
1129:
1130: -- Bug 13070352
1131: -- Bypass GMF and ERES call if deleting a line that has been inserted in the same session.
1132: IF (p_bypass_gmf = 'N') THEN

Line 1138: p_init_msg_list => FND_API.G_FALSE,

1134: -- Bug 5903208 -- call to GMF
1135: --
1136: GMF_VIB.Update_Batch_Requirements
1137: ( p_api_version => 1.0,
1138: p_init_msg_list => FND_API.G_FALSE,
1139: p_batch_id => p_batch_header_rec.batch_id,
1140: x_return_status => x_return_status,
1141: x_msg_count => l_message_count,
1142: x_msg_data => l_message_list);

Line 1143: IF x_return_status <> FND_API.G_RET_STS_SUCCESS

1139: p_batch_id => p_batch_header_rec.batch_id,
1140: x_return_status => x_return_status,
1141: x_msg_count => l_message_count,
1142: x_msg_data => l_message_list);
1143: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
1144: THEN
1145: RAISE gmf_cost_failure;
1146: END IF;
1147: -- End Bug 5903208

Line 1162: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1158: ,P_PARENT_EVENT_KEY => NULL
1159: ,P_PARENT_ERECORD_ID => NULL
1160: ,X_STATUS => x_return_status);
1161:
1162: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1163: RAISE del_mtl_line_failure;
1164: END IF;
1165: END IF; -- IF p_bypass_gmf
1166:

Line 1168: ,p_encoded => fnd_api.g_false

1164: END IF;
1165: END IF; -- IF p_bypass_gmf
1166:
1167: gme_common_pvt.count_and_get (x_count => x_message_count
1168: ,p_encoded => fnd_api.g_false
1169: ,x_data => x_message_list);
1170:
1171: IF (g_debug IS NOT NULL) THEN
1172: gme_debug.put_line ( 'Completed '

Line 1179: x_return_status := fnd_api.g_ret_sts_success;

1175: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1176: END IF;
1177:
1178: IF (x_return_status IS NULL) THEN
1179: x_return_status := fnd_api.g_ret_sts_success;
1180: END IF;
1181: EXCEPTION
1182: WHEN gmf_cost_failure THEN
1183: -- Bug 5903208

Line 1184: x_return_status := FND_API.G_RET_STS_ERROR;

1180: END IF;
1181: EXCEPTION
1182: WHEN gmf_cost_failure THEN
1183: -- Bug 5903208
1184: x_return_status := FND_API.G_RET_STS_ERROR;
1185:
1186: WHEN del_mtl_line_failure THEN
1187: IF x_return_status NOT IN (gme_common_pvt.g_inv_short_err) THEN
1188: ROLLBACK TO SAVEPOINT delete_material_line1;

Line 1192: ,p_encoded => fnd_api.g_false

1188: ROLLBACK TO SAVEPOINT delete_material_line1;
1189: END IF;
1190:
1191: gme_common_pvt.count_and_get (x_count => x_message_count
1192: ,p_encoded => fnd_api.g_false
1193: ,x_data => x_message_list);
1194: WHEN setup_failure THEN
1195: ROLLBACK TO SAVEPOINT delete_material_line1;
1196: gme_common_pvt.count_and_get (x_count => x_message_count

Line 1197: ,p_encoded => fnd_api.g_false

1193: ,x_data => x_message_list);
1194: WHEN setup_failure THEN
1195: ROLLBACK TO SAVEPOINT delete_material_line1;
1196: gme_common_pvt.count_and_get (x_count => x_message_count
1197: ,p_encoded => fnd_api.g_false
1198: ,x_data => x_message_list);
1199: x_return_status := fnd_api.g_ret_sts_error;
1200: WHEN OTHERS THEN
1201: ROLLBACK TO SAVEPOINT delete_material_line1;

Line 1199: x_return_status := fnd_api.g_ret_sts_error;

1195: ROLLBACK TO SAVEPOINT delete_material_line1;
1196: gme_common_pvt.count_and_get (x_count => x_message_count
1197: ,p_encoded => fnd_api.g_false
1198: ,x_data => x_message_list);
1199: x_return_status := fnd_api.g_ret_sts_error;
1200: WHEN OTHERS THEN
1201: ROLLBACK TO SAVEPOINT delete_material_line1;
1202:
1203: IF (g_debug <= gme_debug.g_log_unexpected) THEN

Line 1213: ,p_encoded => fnd_api.g_false

1209: || SQLERRM);
1210: END IF;
1211:
1212: gme_common_pvt.count_and_get (x_count => x_message_count
1213: ,p_encoded => fnd_api.g_false
1214: ,x_data => x_message_list);
1215: x_return_status := fnd_api.g_ret_sts_unexp_error;
1216: END delete_material_line;
1217:

Line 1215: x_return_status := fnd_api.g_ret_sts_unexp_error;

1211:
1212: gme_common_pvt.count_and_get (x_count => x_message_count
1213: ,p_encoded => fnd_api.g_false
1214: ,x_data => x_message_list);
1215: x_return_status := fnd_api.g_ret_sts_unexp_error;
1216: END delete_material_line;
1217:
1218: /*************************************************************************/
1219: PROCEDURE delete_material_line (

Line 1222: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

1218: /*************************************************************************/
1219: PROCEDURE delete_material_line (
1220: p_validation_level IN NUMBER
1221: := gme_common_pvt.g_max_errors
1222: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1223: ,x_message_count OUT NOCOPY NUMBER
1224: ,x_message_list OUT NOCOPY VARCHAR2
1225: ,x_return_status OUT NOCOPY VARCHAR2
1226: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 1237: x_return_status := fnd_api.g_ret_sts_success;

1233: setup_failure EXCEPTION;
1234: BEGIN
1235:
1236: /* Set the return status to success initially */
1237: x_return_status := fnd_api.g_ret_sts_success;
1238:
1239: SAVEPOINT delete_material_line;
1240:
1241: IF (g_debug IS NOT NULL) THEN

Line 1255: x_return_status := fnd_api.g_ret_sts_error;

1251: gme_common_pvt.g_setup_done :=
1252: gme_common_pvt.setup (p_batch_header_rec.organization_id);
1253:
1254: IF NOT gme_common_pvt.g_setup_done THEN
1255: x_return_status := fnd_api.g_ret_sts_error;
1256: RAISE setup_failure;
1257: END IF;
1258: END IF;
1259:

Line 1261: IF p_init_msg_list = fnd_api.g_true THEN

1257: END IF;
1258: END IF;
1259:
1260: -- Initialize message list and count if needed
1261: IF p_init_msg_list = fnd_api.g_true THEN
1262: fnd_msg_pub.initialize;
1263: gme_common_pvt.g_error_count := 0;
1264: END IF;
1265:

Line 1274: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1270: ,p_batch_step_rec => p_batch_step_rec
1271: ,x_transacted => x_transacted
1272: ,x_return_status => x_return_status);
1273:
1274: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1275: RAISE del_mtl_line_failure;
1276: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
1277:
1278: gme_common_pvt.log_message ('GME_MTL_LINE_DELETED');

Line 1276: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

1272: ,x_return_status => x_return_status);
1273:
1274: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1275: RAISE del_mtl_line_failure;
1276: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
1277:
1278: gme_common_pvt.log_message ('GME_MTL_LINE_DELETED');
1279:
1280: gme_common_pvt.count_and_get (x_count => x_message_count

Line 1281: ,p_encoded => fnd_api.g_false

1277:
1278: gme_common_pvt.log_message ('GME_MTL_LINE_DELETED');
1279:
1280: gme_common_pvt.count_and_get (x_count => x_message_count
1281: ,p_encoded => fnd_api.g_false
1282: ,x_data => x_message_list);
1283:
1284: IF (g_debug IS NOT NULL) THEN
1285: gme_debug.put_line ( 'Completed '

Line 1291: x_return_status := fnd_api.g_ret_sts_success;

1287: || ' at '
1288: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1289: END IF;
1290: IF (x_return_status IS NULL) THEN
1291: x_return_status := fnd_api.g_ret_sts_success;
1292: END IF;
1293: EXCEPTION
1294: WHEN del_mtl_line_failure THEN
1295: IF x_return_status NOT IN (gme_common_pvt.g_inv_short_err) THEN

Line 1300: ,p_encoded => fnd_api.g_false

1296: ROLLBACK TO SAVEPOINT delete_material_line;
1297: END IF;
1298:
1299: gme_common_pvt.count_and_get (x_count => x_message_count
1300: ,p_encoded => fnd_api.g_false
1301: ,x_data => x_message_list);
1302: WHEN setup_failure THEN
1303: ROLLBACK TO SAVEPOINT delete_material_line;
1304: gme_common_pvt.count_and_get (x_count => x_message_count

Line 1305: ,p_encoded => fnd_api.g_false

1301: ,x_data => x_message_list);
1302: WHEN setup_failure THEN
1303: ROLLBACK TO SAVEPOINT delete_material_line;
1304: gme_common_pvt.count_and_get (x_count => x_message_count
1305: ,p_encoded => fnd_api.g_false
1306: ,x_data => x_message_list);
1307: x_return_status := fnd_api.g_ret_sts_error;
1308: WHEN OTHERS THEN
1309: ROLLBACK TO SAVEPOINT delete_material_line;

Line 1307: x_return_status := fnd_api.g_ret_sts_error;

1303: ROLLBACK TO SAVEPOINT delete_material_line;
1304: gme_common_pvt.count_and_get (x_count => x_message_count
1305: ,p_encoded => fnd_api.g_false
1306: ,x_data => x_message_list);
1307: x_return_status := fnd_api.g_ret_sts_error;
1308: WHEN OTHERS THEN
1309: ROLLBACK TO SAVEPOINT delete_material_line;
1310:
1311: IF (g_debug <= gme_debug.g_log_unexpected) THEN

Line 1321: ,p_encoded => fnd_api.g_false

1317: || SQLERRM);
1318: END IF;
1319:
1320: gme_common_pvt.count_and_get (x_count => x_message_count
1321: ,p_encoded => fnd_api.g_false
1322: ,x_data => x_message_list);
1323: x_return_status := fnd_api.g_ret_sts_unexp_error;
1324: END delete_material_line;
1325:

Line 1323: x_return_status := fnd_api.g_ret_sts_unexp_error;

1319:
1320: gme_common_pvt.count_and_get (x_count => x_message_count
1321: ,p_encoded => fnd_api.g_false
1322: ,x_data => x_message_list);
1323: x_return_status := fnd_api.g_ret_sts_unexp_error;
1324: END delete_material_line;
1325:
1326: /*************************************************************************/
1327: PROCEDURE reschedule_batch (

Line 1360: x_return_status := fnd_api.g_ret_sts_error;

1356: gme_common_pvt.g_setup_done :=
1357: gme_common_pvt.setup (p_batch_header_rec.organization_id);
1358:
1359: IF NOT gme_common_pvt.g_setup_done THEN
1360: x_return_status := fnd_api.g_ret_sts_error;
1361: RAISE setup_failure;
1362: END IF;
1363: END IF;
1364:

Line 1366: IF p_init_msg_list = fnd_api.g_true THEN

1362: END IF;
1363: END IF;
1364:
1365: /* Initialize message list and count if needed */
1366: IF p_init_msg_list = fnd_api.g_true THEN
1367: fnd_msg_pub.initialize;
1368: gme_common_pvt.g_error_count := 0;
1369: END IF;
1370:

Line 1393: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, 'C') THEN

1389: gme_debug.put_line
1390: ( 'Came back from Pvt Reschedule Batch with status '
1391: || x_return_status);
1392: END IF;
1393: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, 'C') THEN
1394: RAISE reschedule_batch_failed;
1395: END IF;
1396:
1397: gme_common_pvt.count_and_get (x_count => x_message_count

Line 1398: ,p_encoded => fnd_api.g_false

1394: RAISE reschedule_batch_failed;
1395: END IF;
1396:
1397: gme_common_pvt.count_and_get (x_count => x_message_count
1398: ,p_encoded => fnd_api.g_false
1399: ,x_data => x_message_list);
1400:
1401: IF g_debug <= gme_debug.g_log_procedure THEN
1402: gme_debug.put_line ( g_pkg_name

Line 1415: x_return_status := fnd_api.g_ret_sts_error;

1411: EXCEPTION
1412: WHEN setup_failure THEN
1413: ROLLBACK TO SAVEPOINT reschedule_batch;
1414: x_batch_header_rec := NULL;
1415: x_return_status := fnd_api.g_ret_sts_error;
1416: gme_common_pvt.count_and_get (x_count => x_message_count
1417: ,p_encoded => fnd_api.g_false
1418: ,x_data => x_message_list);
1419: WHEN reschedule_batch_failed THEN

Line 1417: ,p_encoded => fnd_api.g_false

1413: ROLLBACK TO SAVEPOINT reschedule_batch;
1414: x_batch_header_rec := NULL;
1415: x_return_status := fnd_api.g_ret_sts_error;
1416: gme_common_pvt.count_and_get (x_count => x_message_count
1417: ,p_encoded => fnd_api.g_false
1418: ,x_data => x_message_list);
1419: WHEN reschedule_batch_failed THEN
1420: ROLLBACK TO SAVEPOINT reschedule_batch;
1421: x_batch_header_rec := NULL;

Line 1423: ,p_encoded => fnd_api.g_false

1419: WHEN reschedule_batch_failed THEN
1420: ROLLBACK TO SAVEPOINT reschedule_batch;
1421: x_batch_header_rec := NULL;
1422: gme_common_pvt.count_and_get (x_count => x_message_count
1423: ,p_encoded => fnd_api.g_false
1424: ,x_data => x_message_list);
1425: WHEN OTHERS THEN
1426: ROLLBACK TO SAVEPOINT reschedule_batch;
1427: x_batch_header_rec := NULL;

Line 1430: ,p_encoded => fnd_api.g_false

1426: ROLLBACK TO SAVEPOINT reschedule_batch;
1427: x_batch_header_rec := NULL;
1428: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1429: gme_common_pvt.count_and_get (x_count => x_message_count
1430: ,p_encoded => fnd_api.g_false
1431: ,x_data => x_message_list);
1432: x_return_status := fnd_api.g_ret_sts_unexp_error;
1433: END reschedule_batch;
1434:

Line 1432: x_return_status := fnd_api.g_ret_sts_unexp_error;

1428: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1429: gme_common_pvt.count_and_get (x_count => x_message_count
1430: ,p_encoded => fnd_api.g_false
1431: ,x_data => x_message_list);
1432: x_return_status := fnd_api.g_ret_sts_unexp_error;
1433: END reschedule_batch;
1434:
1435: /*************************************************************************/
1436: PROCEDURE reschedule_step (

Line 1477: x_return_status := fnd_api.g_ret_sts_error;

1473: gme_common_pvt.g_setup_done :=
1474: gme_common_pvt.setup (p_batch_header_rec.organization_id);
1475:
1476: IF NOT gme_common_pvt.g_setup_done THEN
1477: x_return_status := fnd_api.g_ret_sts_error;
1478: RAISE setup_failure;
1479: END IF;
1480: END IF;
1481:

Line 1483: IF p_init_msg_list = fnd_api.g_true THEN

1479: END IF;
1480: END IF;
1481:
1482: /* Initialize message list and count if needed */
1483: IF p_init_msg_list = fnd_api.g_true THEN
1484: fnd_msg_pub.initialize;
1485: gme_common_pvt.g_error_count := 0;
1486: END IF;
1487:

Line 1514: IF x_return_status = fnd_api.g_ret_sts_success THEN

1510: ( 'Came back from Pvt Reschedule Step with status '
1511: || x_return_status);
1512: END IF;
1513:
1514: IF x_return_status = fnd_api.g_ret_sts_success THEN
1515: -- OM-GME integration - call in private layer at the end
1516: -- need to retrieve batch header record here... it's already retrieved in pvt.
1517: NULL;
1518: ELSE

Line 1526: ,p_encoded => fnd_api.g_false

1522: gme_common_pvt.log_message ('GME_API_STEP_RESCH');
1523:
1524:
1525: gme_common_pvt.count_and_get (x_count => x_message_count
1526: ,p_encoded => fnd_api.g_false
1527: ,x_data => x_message_list);
1528:
1529: IF g_debug <= gme_debug.g_log_procedure THEN
1530: gme_debug.put_line ( g_pkg_name

Line 1544: ,p_encoded => fnd_api.g_false

1540: WHEN reschedule_step_failed OR setup_failure THEN
1541: ROLLBACK TO SAVEPOINT reschedule_batch_step;
1542: x_batch_step_rec := NULL;
1543: gme_common_pvt.count_and_get (x_count => x_message_count
1544: ,p_encoded => fnd_api.g_false
1545: ,x_data => x_message_list);
1546: WHEN expected_error THEN
1547: ROLLBACK TO SAVEPOINT reschedule_batch_step;
1548: x_batch_step_rec := NULL;

Line 1549: x_return_status := fnd_api.g_ret_sts_error;

1545: ,x_data => x_message_list);
1546: WHEN expected_error THEN
1547: ROLLBACK TO SAVEPOINT reschedule_batch_step;
1548: x_batch_step_rec := NULL;
1549: x_return_status := fnd_api.g_ret_sts_error;
1550: WHEN OTHERS THEN
1551: ROLLBACK TO SAVEPOINT reschedule_batch_step;
1552: x_batch_step_rec := NULL;
1553: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 1555: ,p_encoded => fnd_api.g_false

1551: ROLLBACK TO SAVEPOINT reschedule_batch_step;
1552: x_batch_step_rec := NULL;
1553: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1554: gme_common_pvt.count_and_get (x_count => x_message_count
1555: ,p_encoded => fnd_api.g_false
1556: ,x_data => x_message_list);
1557: x_return_status := fnd_api.g_ret_sts_unexp_error;
1558: END reschedule_step;
1559:

Line 1557: x_return_status := fnd_api.g_ret_sts_unexp_error;

1553: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1554: gme_common_pvt.count_and_get (x_count => x_message_count
1555: ,p_encoded => fnd_api.g_false
1556: ,x_data => x_message_list);
1557: x_return_status := fnd_api.g_ret_sts_unexp_error;
1558: END reschedule_step;
1559:
1560: /*************************************************************************/
1561: PROCEDURE create_batch_reservations (

Line 1562: p_init_msg_list IN VARCHAR2 := fnd_api.g_false

1558: END reschedule_step;
1559:
1560: /*************************************************************************/
1561: PROCEDURE create_batch_reservations (
1562: p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1563: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
1564: ,x_message_count OUT NOCOPY NUMBER
1565: ,x_message_list OUT NOCOPY VARCHAR2
1566: ,x_return_status OUT NOCOPY VARCHAR2)

Line 1594: x_return_status := fnd_api.g_ret_sts_success;

1590: END IF;
1591: END IF;
1592:
1593: /* Set the return status to success initially */
1594: x_return_status := fnd_api.g_ret_sts_success;
1595:
1596: -- Initialize message list and count if needed
1597: IF p_init_msg_list = fnd_api.g_true THEN
1598: fnd_msg_pub.initialize;

Line 1597: IF p_init_msg_list = fnd_api.g_true THEN

1593: /* Set the return status to success initially */
1594: x_return_status := fnd_api.g_ret_sts_success;
1595:
1596: -- Initialize message list and count if needed
1597: IF p_init_msg_list = fnd_api.g_true THEN
1598: fnd_msg_pub.initialize;
1599: gme_common_pvt.g_error_count := 0;
1600: END IF;
1601:

Line 1608: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1604: (p_batch_id => p_batch_header_rec.batch_id
1605: ,p_timefence => 1000000
1606: ,x_return_status => x_return_status);
1607:
1608: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1609: gme_common_pvt.log_message ('GME_BATCH_HL_RESERVATION_FAIL');
1610: RAISE batch_reservations_failure;
1611: END IF;
1612:

Line 1629: ,p_encoded => fnd_api.g_false

1625: EXCEPTION
1626: WHEN batch_reservations_failure THEN
1627: ROLLBACK TO SAVEPOINT create_batch_reservations;
1628: gme_common_pvt.count_and_get (x_count => x_message_count
1629: ,p_encoded => fnd_api.g_false
1630: ,x_data => x_message_list);
1631: WHEN OTHERS THEN
1632: IF g_debug <= gme_debug.g_log_unexpected THEN
1633: gme_debug.put_line ( 'When others exception in '

Line 1643: ,p_encoded => fnd_api.g_false

1639: END IF;
1640:
1641: ROLLBACK TO SAVEPOINT create_batch_reservations;
1642: gme_common_pvt.count_and_get (x_count => x_message_count
1643: ,p_encoded => fnd_api.g_false
1644: ,x_data => x_message_list);
1645: x_return_status := fnd_api.g_ret_sts_unexp_error;
1646: END create_batch_reservations;
1647:

Line 1645: x_return_status := fnd_api.g_ret_sts_unexp_error;

1641: ROLLBACK TO SAVEPOINT create_batch_reservations;
1642: gme_common_pvt.count_and_get (x_count => x_message_count
1643: ,p_encoded => fnd_api.g_false
1644: ,x_data => x_message_list);
1645: x_return_status := fnd_api.g_ret_sts_unexp_error;
1646: END create_batch_reservations;
1647:
1648: PROCEDURE create_line_reservations (
1649: p_init_msg_list IN VARCHAR2 := fnd_api.g_false

Line 1649: p_init_msg_list IN VARCHAR2 := fnd_api.g_false

1645: x_return_status := fnd_api.g_ret_sts_unexp_error;
1646: END create_batch_reservations;
1647:
1648: PROCEDURE create_line_reservations (
1649: p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1650: ,p_matl_dtl_rec IN gme_material_details%ROWTYPE
1651: ,x_message_count OUT NOCOPY NUMBER
1652: ,x_message_list OUT NOCOPY VARCHAR2
1653: ,x_return_status OUT NOCOPY VARCHAR2)

Line 1692: x_return_status := fnd_api.g_ret_sts_success;

1688: END IF;
1689: END IF;
1690:
1691: /* Set the return status to success initially */
1692: x_return_status := fnd_api.g_ret_sts_success;
1693:
1694: -- Initialize message list and count if needed
1695: IF p_init_msg_list = fnd_api.g_true THEN
1696: fnd_msg_pub.initialize;

Line 1695: IF p_init_msg_list = fnd_api.g_true THEN

1691: /* Set the return status to success initially */
1692: x_return_status := fnd_api.g_ret_sts_success;
1693:
1694: -- Initialize message list and count if needed
1695: IF p_init_msg_list = fnd_api.g_true THEN
1696: fnd_msg_pub.initialize;
1697: gme_common_pvt.g_error_count := 0;
1698: END IF;
1699:

Line 1732: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1728: || 'get_open_qty returns open_qty: '
1729: || l_open_qty);
1730: END IF;
1731:
1732: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1733: RAISE get_open_qty_failure;
1734: END IF;
1735:
1736: /* Create a high level reservation (at organization level) for the outstanding qty */

Line 1751: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1747: || 'create_material_reservations returns status: '
1748: || x_return_status);
1749: END IF;
1750:
1751: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1752: -- Bug 7261728
1753: -- Commented the line below so message - INV_INVALID_RESERVATION_QTY
1754: -- from inv_reservation_pub will be displayedd.
1755: --gme_common_pvt.log_message ('GME_LINE_HL_RESERVATION_FAIL');

Line 1774: ,p_encoded => fnd_api.g_false

1770: EXCEPTION
1771: WHEN setup_failure OR get_open_qty_failure OR line_reservation_failure THEN
1772: ROLLBACK TO SAVEPOINT create_line_reservations;
1773: gme_common_pvt.count_and_get (x_count => x_message_count
1774: ,p_encoded => fnd_api.g_false
1775: ,x_data => x_message_list);
1776: x_return_status := fnd_api.g_ret_sts_error;
1777: WHEN OTHERS THEN
1778: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 1776: x_return_status := fnd_api.g_ret_sts_error;

1772: ROLLBACK TO SAVEPOINT create_line_reservations;
1773: gme_common_pvt.count_and_get (x_count => x_message_count
1774: ,p_encoded => fnd_api.g_false
1775: ,x_data => x_message_list);
1776: x_return_status := fnd_api.g_ret_sts_error;
1777: WHEN OTHERS THEN
1778: IF g_debug <= gme_debug.g_log_unexpected THEN
1779: gme_debug.put_line ( 'When others exception in '
1780: || g_pkg_name

Line 1789: ,p_encoded => fnd_api.g_false

1785: END IF;
1786:
1787: ROLLBACK TO SAVEPOINT create_line_reservations;
1788: gme_common_pvt.count_and_get (x_count => x_message_count
1789: ,p_encoded => fnd_api.g_false
1790: ,x_data => x_message_list);
1791: x_return_status := fnd_api.g_ret_sts_unexp_error;
1792: END create_line_reservations;
1793:

Line 1791: x_return_status := fnd_api.g_ret_sts_unexp_error;

1787: ROLLBACK TO SAVEPOINT create_line_reservations;
1788: gme_common_pvt.count_and_get (x_count => x_message_count
1789: ,p_encoded => fnd_api.g_false
1790: ,x_data => x_message_list);
1791: x_return_status := fnd_api.g_ret_sts_unexp_error;
1792: END create_line_reservations;
1793:
1794: /*************************************************************************/
1795: PROCEDURE release_batch (

Line 1798: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

1794: /*************************************************************************/
1795: PROCEDURE release_batch (
1796: p_validation_level IN NUMBER
1797: := gme_common_pvt.g_max_errors
1798: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1799: ,x_message_count OUT NOCOPY NUMBER
1800: ,x_message_list OUT NOCOPY VARCHAR2
1801: ,x_return_status OUT NOCOPY VARCHAR2
1802: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 1828: x_return_status := fnd_api.g_ret_sts_error;

1824: gme_common_pvt.g_setup_done :=
1825: gme_common_pvt.setup (p_batch_header_rec.organization_id);
1826:
1827: IF NOT gme_common_pvt.g_setup_done THEN
1828: x_return_status := fnd_api.g_ret_sts_error;
1829: RAISE setup_failure;
1830: END IF;
1831: END IF;
1832:

Line 1834: x_return_status := fnd_api.g_ret_sts_success;

1830: END IF;
1831: END IF;
1832:
1833: /* Set the return status to success initially */
1834: x_return_status := fnd_api.g_ret_sts_success;
1835:
1836: -- Initialize message list and count if needed
1837: IF p_init_msg_list = fnd_api.g_true THEN
1838: fnd_msg_pub.initialize;

Line 1837: IF p_init_msg_list = fnd_api.g_true THEN

1833: /* Set the return status to success initially */
1834: x_return_status := fnd_api.g_ret_sts_success;
1835:
1836: -- Initialize message list and count if needed
1837: IF p_init_msg_list = fnd_api.g_true THEN
1838: fnd_msg_pub.initialize;
1839: gme_common_pvt.g_error_count := 0;
1840: END IF;
1841:

Line 1850: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN

1846: ,x_batch_header_rec => x_batch_header_rec
1847: ,x_return_status => x_return_status
1848: ,x_exception_material_tbl => x_exception_material_tbl);
1849:
1850: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN
1851: RAISE batch_release_failure;
1852: END IF; /* IF x_return_status NOT IN */
1853:
1854: /*Bug#5186328 rework if return status is X then log message saying batch has exceptions*/

Line 1855: IF NVL(p_ignore_exception,fnd_api.g_false) = fnd_api.g_false AND

1851: RAISE batch_release_failure;
1852: END IF; /* IF x_return_status NOT IN */
1853:
1854: /*Bug#5186328 rework if return status is X then log message saying batch has exceptions*/
1855: IF NVL(p_ignore_exception,fnd_api.g_false) = fnd_api.g_false AND
1856: x_return_status = gme_common_pvt.g_exceptions_err THEN
1857: gme_common_pvt.log_message('GME_MATERIAL_EXCEPTIONS');
1858: ELSE
1859: gme_common_pvt.log_message ('GME_API_BATCH_RELEASED');

Line 1864: ,p_encoded => fnd_api.g_false

1860: END IF;
1861:
1862:
1863: gme_common_pvt.count_and_get (x_count => x_message_count
1864: ,p_encoded => fnd_api.g_false
1865: ,x_data => x_message_list);
1866:
1867: IF (g_debug IS NOT NULL) THEN
1868: gme_debug.put_line ( 'Completed '

Line 1882: ,p_encoded => fnd_api.g_false

1878: WHEN batch_release_failure THEN
1879: ROLLBACK TO SAVEPOINT release_batch;
1880: x_batch_header_rec := NULL;
1881: gme_common_pvt.count_and_get (x_count => x_message_count
1882: ,p_encoded => fnd_api.g_false
1883: ,x_data => x_message_list);
1884: WHEN setup_failure THEN
1885: ROLLBACK TO SAVEPOINT release_batch;
1886: x_batch_header_rec := NULL;

Line 1888: ,p_encoded => fnd_api.g_false

1884: WHEN setup_failure THEN
1885: ROLLBACK TO SAVEPOINT release_batch;
1886: x_batch_header_rec := NULL;
1887: gme_common_pvt.count_and_get (x_count => x_message_count
1888: ,p_encoded => fnd_api.g_false
1889: ,x_data => x_message_list);
1890: x_return_status := fnd_api.g_ret_sts_error;
1891: WHEN OTHERS THEN
1892: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 1890: x_return_status := fnd_api.g_ret_sts_error;

1886: x_batch_header_rec := NULL;
1887: gme_common_pvt.count_and_get (x_count => x_message_count
1888: ,p_encoded => fnd_api.g_false
1889: ,x_data => x_message_list);
1890: x_return_status := fnd_api.g_ret_sts_error;
1891: WHEN OTHERS THEN
1892: IF g_debug <= gme_debug.g_log_unexpected THEN
1893: gme_debug.put_line ( 'When others exception in '
1894: || g_pkg_name

Line 1904: ,p_encoded => fnd_api.g_false

1900:
1901: ROLLBACK TO SAVEPOINT release_batch;
1902: x_batch_header_rec := NULL;
1903: gme_common_pvt.count_and_get (x_count => x_message_count
1904: ,p_encoded => fnd_api.g_false
1905: ,x_data => x_message_list);
1906: x_return_status := fnd_api.g_ret_sts_unexp_error;
1907: END release_batch;
1908:

Line 1906: x_return_status := fnd_api.g_ret_sts_unexp_error;

1902: x_batch_header_rec := NULL;
1903: gme_common_pvt.count_and_get (x_count => x_message_count
1904: ,p_encoded => fnd_api.g_false
1905: ,x_data => x_message_list);
1906: x_return_status := fnd_api.g_ret_sts_unexp_error;
1907: END release_batch;
1908:
1909: /*************************************************************************/
1910: PROCEDURE release_step (

Line 1913: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

1909: /*************************************************************************/
1910: PROCEDURE release_step (
1911: p_validation_level IN NUMBER
1912: := gme_common_pvt.g_max_errors
1913: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1914: ,x_message_count OUT NOCOPY NUMBER
1915: ,x_message_list OUT NOCOPY VARCHAR2
1916: ,x_return_status OUT NOCOPY VARCHAR2
1917: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE

Line 1944: x_return_status := fnd_api.g_ret_sts_error;

1940: gme_common_pvt.g_setup_done :=
1941: gme_common_pvt.setup (p_batch_header_rec.organization_id);
1942:
1943: IF NOT gme_common_pvt.g_setup_done THEN
1944: x_return_status := fnd_api.g_ret_sts_error;
1945: RAISE setup_failure;
1946: END IF;
1947: END IF;
1948:

Line 1950: x_return_status := fnd_api.g_ret_sts_success;

1946: END IF;
1947: END IF;
1948:
1949: /* Set the return status to success initially */
1950: x_return_status := fnd_api.g_ret_sts_success;
1951:
1952: -- Initialize message list and count if needed
1953: IF p_init_msg_list = fnd_api.g_true THEN
1954: fnd_msg_pub.initialize;

Line 1953: IF p_init_msg_list = fnd_api.g_true THEN

1949: /* Set the return status to success initially */
1950: x_return_status := fnd_api.g_ret_sts_success;
1951:
1952: -- Initialize message list and count if needed
1953: IF p_init_msg_list = fnd_api.g_true THEN
1954: fnd_msg_pub.initialize;
1955: gme_common_pvt.g_error_count := 0;
1956: END IF;
1957:

Line 1966: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN

1962: ,x_batch_step_rec => x_batch_step_rec
1963: ,x_exception_material_tbl => x_exception_material_tbl
1964: ,x_return_status => x_return_status);
1965:
1966: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN
1967: RAISE step_release_failure;
1968: END IF; /* IF x_return_status NOT IN */
1969:
1970: /*Bug#5186328 rework if return status is X then log message saying batch has exceptions*/

Line 1971: IF NVL(p_ignore_exception,fnd_api.g_false) = fnd_api.g_false AND

1967: RAISE step_release_failure;
1968: END IF; /* IF x_return_status NOT IN */
1969:
1970: /*Bug#5186328 rework if return status is X then log message saying batch has exceptions*/
1971: IF NVL(p_ignore_exception,fnd_api.g_false) = fnd_api.g_false AND
1972: x_return_status = gme_common_pvt.g_exceptions_err THEN
1973: gme_common_pvt.log_message('GME_MATERIAL_EXCEPTIONS');
1974: ELSE
1975: gme_common_pvt.log_message ('GME_API_STEP_RELEASED');

Line 1980: ,p_encoded => fnd_api.g_false

1976: END IF;
1977:
1978:
1979: gme_common_pvt.count_and_get (x_count => x_message_count
1980: ,p_encoded => fnd_api.g_false
1981: ,x_data => x_message_list);
1982:
1983: IF (g_debug IS NOT NULL) THEN
1984: gme_debug.put_line ( 'Completed '

Line 1998: ,p_encoded => fnd_api.g_false

1994: WHEN step_release_failure THEN
1995: ROLLBACK TO SAVEPOINT release_step;
1996: x_batch_step_rec := NULL;
1997: gme_common_pvt.count_and_get (x_count => x_message_count
1998: ,p_encoded => fnd_api.g_false
1999: ,x_data => x_message_list);
2000: WHEN setup_failure THEN
2001: ROLLBACK TO SAVEPOINT release_step;
2002: x_batch_step_rec := NULL;

Line 2004: ,p_encoded => fnd_api.g_false

2000: WHEN setup_failure THEN
2001: ROLLBACK TO SAVEPOINT release_step;
2002: x_batch_step_rec := NULL;
2003: gme_common_pvt.count_and_get (x_count => x_message_count
2004: ,p_encoded => fnd_api.g_false
2005: ,x_data => x_message_list);
2006: x_return_status := fnd_api.g_ret_sts_error;
2007: WHEN OTHERS THEN
2008: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 2006: x_return_status := fnd_api.g_ret_sts_error;

2002: x_batch_step_rec := NULL;
2003: gme_common_pvt.count_and_get (x_count => x_message_count
2004: ,p_encoded => fnd_api.g_false
2005: ,x_data => x_message_list);
2006: x_return_status := fnd_api.g_ret_sts_error;
2007: WHEN OTHERS THEN
2008: IF g_debug <= gme_debug.g_log_unexpected THEN
2009: gme_debug.put_line ( 'When others exception in '
2010: || g_pkg_name

Line 2020: ,p_encoded => fnd_api.g_false

2016:
2017: ROLLBACK TO SAVEPOINT release_step;
2018: x_batch_step_rec := NULL;
2019: gme_common_pvt.count_and_get (x_count => x_message_count
2020: ,p_encoded => fnd_api.g_false
2021: ,x_data => x_message_list);
2022: x_return_status := fnd_api.g_ret_sts_unexp_error;
2023: END release_step;
2024:

Line 2022: x_return_status := fnd_api.g_ret_sts_unexp_error;

2018: x_batch_step_rec := NULL;
2019: gme_common_pvt.count_and_get (x_count => x_message_count
2020: ,p_encoded => fnd_api.g_false
2021: ,x_data => x_message_list);
2022: x_return_status := fnd_api.g_ret_sts_unexp_error;
2023: END release_step;
2024:
2025: /*************************************************************************/
2026: PROCEDURE complete_batch (

Line 2029: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

2025: /*************************************************************************/
2026: PROCEDURE complete_batch (
2027: p_validation_level IN NUMBER
2028: := gme_common_pvt.g_max_errors
2029: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2030: ,x_message_count OUT NOCOPY NUMBER
2031: ,x_message_list OUT NOCOPY VARCHAR2
2032: ,x_return_status OUT NOCOPY VARCHAR2
2033: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 2059: x_return_status := fnd_api.g_ret_sts_error;

2055: gme_common_pvt.g_setup_done :=
2056: gme_common_pvt.setup (p_batch_header_rec.organization_id);
2057:
2058: IF NOT gme_common_pvt.g_setup_done THEN
2059: x_return_status := fnd_api.g_ret_sts_error;
2060: RAISE setup_failure;
2061: END IF;
2062: END IF;
2063:

Line 2065: x_return_status := fnd_api.g_ret_sts_success;

2061: END IF;
2062: END IF;
2063:
2064: /* Set the return status to success initially */
2065: x_return_status := fnd_api.g_ret_sts_success;
2066:
2067: -- Initialize message list and count if needed
2068: IF p_init_msg_list = fnd_api.g_true THEN
2069: fnd_msg_pub.initialize;

Line 2068: IF p_init_msg_list = fnd_api.g_true THEN

2064: /* Set the return status to success initially */
2065: x_return_status := fnd_api.g_ret_sts_success;
2066:
2067: -- Initialize message list and count if needed
2068: IF p_init_msg_list = fnd_api.g_true THEN
2069: fnd_msg_pub.initialize;
2070: gme_common_pvt.g_error_count := 0;
2071: END IF;
2072:

Line 2080: IF x_return_status NOT IN(fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN

2076: ,x_exception_material_tbl => x_exception_material_tbl
2077: ,x_batch_header_rec => x_batch_header_rec
2078: ,x_return_status => x_return_status);
2079:
2080: IF x_return_status NOT IN(fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN
2081: RAISE batch_complete_failure;
2082: END IF; /* IF x_return_status NOT IN */
2083:
2084: /*Bug#5186328 rework if return status is X then log message saying batch has exceptions*/

Line 2085: IF NVL(p_ignore_exception,fnd_api.g_false) = fnd_api.g_false AND

2081: RAISE batch_complete_failure;
2082: END IF; /* IF x_return_status NOT IN */
2083:
2084: /*Bug#5186328 rework if return status is X then log message saying batch has exceptions*/
2085: IF NVL(p_ignore_exception,fnd_api.g_false) = fnd_api.g_false AND
2086: x_return_status = gme_common_pvt.g_exceptions_err THEN
2087: gme_common_pvt.log_message('GME_MATERIAL_EXCEPTIONS');
2088: ELSE
2089: gme_common_pvt.log_message ('GME_API_BATCH_COMPLETED');

Line 2093: ,p_encoded => fnd_api.g_false

2089: gme_common_pvt.log_message ('GME_API_BATCH_COMPLETED');
2090: END IF;
2091:
2092: gme_common_pvt.count_and_get (x_count => x_message_count
2093: ,p_encoded => fnd_api.g_false
2094: ,x_data => x_message_list);
2095:
2096: IF (g_debug IS NOT NULL) THEN
2097: gme_debug.put_line ( 'Completed '

Line 2111: ,p_encoded => fnd_api.g_false

2107: WHEN batch_complete_failure THEN
2108: ROLLBACK TO SAVEPOINT complete_batch;
2109: x_batch_header_rec := NULL;
2110: gme_common_pvt.count_and_get (x_count => x_message_count
2111: ,p_encoded => fnd_api.g_false
2112: ,x_data => x_message_list);
2113: WHEN setup_failure THEN
2114: ROLLBACK TO SAVEPOINT complete_batch;
2115: x_batch_header_rec := NULL;

Line 2117: ,p_encoded => fnd_api.g_false

2113: WHEN setup_failure THEN
2114: ROLLBACK TO SAVEPOINT complete_batch;
2115: x_batch_header_rec := NULL;
2116: gme_common_pvt.count_and_get (x_count => x_message_count
2117: ,p_encoded => fnd_api.g_false
2118: ,x_data => x_message_list);
2119: x_return_status := fnd_api.g_ret_sts_error;
2120: WHEN OTHERS THEN
2121: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 2119: x_return_status := fnd_api.g_ret_sts_error;

2115: x_batch_header_rec := NULL;
2116: gme_common_pvt.count_and_get (x_count => x_message_count
2117: ,p_encoded => fnd_api.g_false
2118: ,x_data => x_message_list);
2119: x_return_status := fnd_api.g_ret_sts_error;
2120: WHEN OTHERS THEN
2121: IF g_debug <= gme_debug.g_log_unexpected THEN
2122: gme_debug.put_line ( 'When others exception in '
2123: || g_pkg_name

Line 2133: ,p_encoded => fnd_api.g_false

2129:
2130: ROLLBACK TO SAVEPOINT complete_batch;
2131: x_batch_header_rec := NULL;
2132: gme_common_pvt.count_and_get (x_count => x_message_count
2133: ,p_encoded => fnd_api.g_false
2134: ,x_data => x_message_list);
2135: x_return_status := fnd_api.g_ret_sts_unexp_error;
2136: END complete_batch;
2137:

Line 2135: x_return_status := fnd_api.g_ret_sts_unexp_error;

2131: x_batch_header_rec := NULL;
2132: gme_common_pvt.count_and_get (x_count => x_message_count
2133: ,p_encoded => fnd_api.g_false
2134: ,x_data => x_message_list);
2135: x_return_status := fnd_api.g_ret_sts_unexp_error;
2136: END complete_batch;
2137:
2138: /*************************************************************************/
2139: PROCEDURE complete_step (

Line 2142: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

2138: /*************************************************************************/
2139: PROCEDURE complete_step (
2140: p_validation_level IN NUMBER
2141: := gme_common_pvt.g_max_errors
2142: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2143: ,x_message_count OUT NOCOPY NUMBER
2144: ,x_message_list OUT NOCOPY VARCHAR2
2145: ,x_return_status OUT NOCOPY VARCHAR2
2146: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE

Line 2173: x_return_status := fnd_api.g_ret_sts_error;

2169: gme_common_pvt.g_setup_done :=
2170: gme_common_pvt.setup (p_batch_header_rec.organization_id);
2171:
2172: IF NOT gme_common_pvt.g_setup_done THEN
2173: x_return_status := fnd_api.g_ret_sts_error;
2174: RAISE setup_failure;
2175: END IF;
2176: END IF;
2177:

Line 2179: x_return_status := fnd_api.g_ret_sts_success;

2175: END IF;
2176: END IF;
2177:
2178: /* Set the return status to success initially */
2179: x_return_status := fnd_api.g_ret_sts_success;
2180:
2181: -- Initialize message list and count if needed
2182: IF p_init_msg_list = fnd_api.g_true THEN
2183: fnd_msg_pub.initialize;

Line 2182: IF p_init_msg_list = fnd_api.g_true THEN

2178: /* Set the return status to success initially */
2179: x_return_status := fnd_api.g_ret_sts_success;
2180:
2181: -- Initialize message list and count if needed
2182: IF p_init_msg_list = fnd_api.g_true THEN
2183: fnd_msg_pub.initialize;
2184: gme_common_pvt.g_error_count := 0;
2185: END IF;
2186:

Line 2195: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN

2191: ,x_batch_step_rec => x_batch_step_rec
2192: ,x_exception_material_tbl => x_exception_material_tbl
2193: ,x_return_status => x_return_status);
2194:
2195: IF x_return_status NOT IN (fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN
2196: RAISE step_complete_failure;
2197: END IF; /* IF x_return_status NOT IN */
2198:
2199:

Line 2201: IF NVL(p_ignore_exception,fnd_api.g_false) = fnd_api.g_false AND

2197: END IF; /* IF x_return_status NOT IN */
2198:
2199:
2200: /*Bug#5186328 rework if return status is X then log message saying batch has exceptions*/
2201: IF NVL(p_ignore_exception,fnd_api.g_false) = fnd_api.g_false AND
2202: x_return_status = gme_common_pvt.g_exceptions_err THEN
2203: gme_common_pvt.log_message('GME_MATERIAL_EXCEPTIONS');
2204: ELSE
2205: gme_common_pvt.log_message ('GME_API_STEP_COMPLETED');

Line 2209: ,p_encoded => fnd_api.g_false

2205: gme_common_pvt.log_message ('GME_API_STEP_COMPLETED');
2206: END IF;
2207:
2208: gme_common_pvt.count_and_get (x_count => x_message_count
2209: ,p_encoded => fnd_api.g_false
2210: ,x_data => x_message_list);
2211:
2212: IF (g_debug IS NOT NULL) THEN
2213: gme_debug.put_line ( 'Completed '

Line 2227: ,p_encoded => fnd_api.g_false

2223: WHEN step_complete_failure THEN
2224: ROLLBACK TO SAVEPOINT complete_step;
2225: x_batch_step_rec := NULL;
2226: gme_common_pvt.count_and_get (x_count => x_message_count
2227: ,p_encoded => fnd_api.g_false
2228: ,x_data => x_message_list);
2229: WHEN setup_failure THEN
2230: ROLLBACK TO SAVEPOINT complete_step;
2231: x_batch_step_rec := NULL;

Line 2233: ,p_encoded => fnd_api.g_false

2229: WHEN setup_failure THEN
2230: ROLLBACK TO SAVEPOINT complete_step;
2231: x_batch_step_rec := NULL;
2232: gme_common_pvt.count_and_get (x_count => x_message_count
2233: ,p_encoded => fnd_api.g_false
2234: ,x_data => x_message_list);
2235: x_return_status := fnd_api.g_ret_sts_error;
2236: WHEN OTHERS THEN
2237: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 2235: x_return_status := fnd_api.g_ret_sts_error;

2231: x_batch_step_rec := NULL;
2232: gme_common_pvt.count_and_get (x_count => x_message_count
2233: ,p_encoded => fnd_api.g_false
2234: ,x_data => x_message_list);
2235: x_return_status := fnd_api.g_ret_sts_error;
2236: WHEN OTHERS THEN
2237: IF g_debug <= gme_debug.g_log_unexpected THEN
2238: gme_debug.put_line ( 'When others exception in '
2239: || g_pkg_name

Line 2249: ,p_encoded => fnd_api.g_false

2245:
2246: ROLLBACK TO SAVEPOINT complete_step;
2247: x_batch_step_rec := NULL;
2248: gme_common_pvt.count_and_get (x_count => x_message_count
2249: ,p_encoded => fnd_api.g_false
2250: ,x_data => x_message_list);
2251: x_return_status := fnd_api.g_ret_sts_unexp_error;
2252: END complete_step;
2253:

Line 2251: x_return_status := fnd_api.g_ret_sts_unexp_error;

2247: x_batch_step_rec := NULL;
2248: gme_common_pvt.count_and_get (x_count => x_message_count
2249: ,p_encoded => fnd_api.g_false
2250: ,x_data => x_message_list);
2251: x_return_status := fnd_api.g_ret_sts_unexp_error;
2252: END complete_step;
2253:
2254: /*************************************************************************/
2255: PROCEDURE delete_step (

Line 2258: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

2254: /*************************************************************************/
2255: PROCEDURE delete_step (
2256: p_validation_level IN NUMBER
2257: := gme_common_pvt.g_max_errors
2258: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2259: ,x_message_count OUT NOCOPY NUMBER
2260: ,x_message_list OUT NOCOPY VARCHAR2
2261: ,x_return_status OUT NOCOPY VARCHAR2
2262: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE

Line 2284: x_return_status := fnd_api.g_ret_sts_success;

2280: || 'Entering');
2281: END IF;
2282:
2283: /* Set the return status to success initially */
2284: x_return_status := fnd_api.g_ret_sts_success;
2285:
2286: IF NOT gme_common_pvt.g_setup_done THEN
2287: gme_common_pvt.g_setup_done :=
2288: gme_common_pvt.setup (p_batch_header_rec.organization_id);

Line 2291: x_return_status := fnd_api.g_ret_sts_error;

2287: gme_common_pvt.g_setup_done :=
2288: gme_common_pvt.setup (p_batch_header_rec.organization_id);
2289:
2290: IF NOT gme_common_pvt.g_setup_done THEN
2291: x_return_status := fnd_api.g_ret_sts_error;
2292: RAISE setup_failure;
2293: END IF;
2294: END IF;
2295: /* Initialize message list and count if needed */

Line 2296: IF p_init_msg_list = fnd_api.g_true THEN

2292: RAISE setup_failure;
2293: END IF;
2294: END IF;
2295: /* Initialize message list and count if needed */
2296: IF p_init_msg_list = fnd_api.g_true THEN
2297: fnd_msg_pub.initialize;
2298: gme_common_pvt.g_error_count := 0;
2299: END IF;
2300:

Line 2308: IF x_return_status = fnd_api.g_ret_sts_success THEN

2304: (x_return_status => x_return_status
2305: ,p_batch_step_rec => p_batch_step_rec
2306: ,p_reroute_flag => FALSE);
2307:
2308: IF x_return_status = fnd_api.g_ret_sts_success THEN
2309: NULL;
2310: ELSE
2311: RAISE delete_step_failed;
2312: END IF;

Line 2325: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2321: ,P_PARENT_EVENT => NULL
2322: ,P_PARENT_EVENT_KEY => NULL
2323: ,P_PARENT_ERECORD_ID => NULL
2324: ,X_STATUS => x_return_status);
2325: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2326: RAISE delete_step_failed;
2327: END IF;
2328:
2329:

Line 2342: ,p_encoded => fnd_api.g_false

2338: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2339: END IF;
2340:
2341: gme_common_pvt.count_and_get (x_count => x_message_count
2342: ,p_encoded => fnd_api.g_false
2343: ,x_data => x_message_list);
2344: EXCEPTION
2345: WHEN setup_failure THEN
2346: ROLLBACK TO SAVEPOINT delete_step;

Line 2347: x_return_status := fnd_api.g_ret_sts_error;

2343: ,x_data => x_message_list);
2344: EXCEPTION
2345: WHEN setup_failure THEN
2346: ROLLBACK TO SAVEPOINT delete_step;
2347: x_return_status := fnd_api.g_ret_sts_error;
2348: gme_common_pvt.count_and_get (x_count => x_message_count
2349: ,p_encoded => fnd_api.g_false
2350: ,x_data => x_message_list);
2351: WHEN delete_step_failed OR batch_save_failed THEN

Line 2349: ,p_encoded => fnd_api.g_false

2345: WHEN setup_failure THEN
2346: ROLLBACK TO SAVEPOINT delete_step;
2347: x_return_status := fnd_api.g_ret_sts_error;
2348: gme_common_pvt.count_and_get (x_count => x_message_count
2349: ,p_encoded => fnd_api.g_false
2350: ,x_data => x_message_list);
2351: WHEN delete_step_failed OR batch_save_failed THEN
2352: ROLLBACK TO SAVEPOINT delete_step;
2353: gme_common_pvt.count_and_get (x_count => x_message_count

Line 2354: ,p_encoded => fnd_api.g_false

2350: ,x_data => x_message_list);
2351: WHEN delete_step_failed OR batch_save_failed THEN
2352: ROLLBACK TO SAVEPOINT delete_step;
2353: gme_common_pvt.count_and_get (x_count => x_message_count
2354: ,p_encoded => fnd_api.g_false
2355: ,x_data => x_message_list);
2356: WHEN OTHERS THEN
2357: ROLLBACK TO SAVEPOINT delete_step;
2358: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2360: ,p_encoded => fnd_api.g_false

2356: WHEN OTHERS THEN
2357: ROLLBACK TO SAVEPOINT delete_step;
2358: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2359: gme_common_pvt.count_and_get (x_count => x_message_count
2360: ,p_encoded => fnd_api.g_false
2361: ,x_data => x_message_list);
2362: x_return_status := fnd_api.g_ret_sts_unexp_error;
2363: END delete_step;
2364:

Line 2362: x_return_status := fnd_api.g_ret_sts_unexp_error;

2358: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2359: gme_common_pvt.count_and_get (x_count => x_message_count
2360: ,p_encoded => fnd_api.g_false
2361: ,x_data => x_message_list);
2362: x_return_status := fnd_api.g_ret_sts_unexp_error;
2363: END delete_step;
2364:
2365: /*************************************************************************
2366: Procedure: insert_step

Line 2374: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

2370: /*************************************************************************/
2371: PROCEDURE insert_step (
2372: p_validation_level IN NUMBER
2373: := gme_common_pvt.g_max_errors
2374: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2375: ,x_message_count OUT NOCOPY NUMBER
2376: ,x_message_list OUT NOCOPY VARCHAR2
2377: ,x_return_status OUT NOCOPY VARCHAR2
2378: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 2408: x_return_status := fnd_api.g_ret_sts_success;

2404: || 'Entering');
2405: END IF;
2406:
2407: /* Set the return status to success initially */
2408: x_return_status := fnd_api.g_ret_sts_success;
2409:
2410: IF NOT gme_common_pvt.g_setup_done THEN
2411: gme_common_pvt.g_setup_done :=
2412: gme_common_pvt.setup (p_batch_header_rec.organization_id);

Line 2415: x_return_status := fnd_api.g_ret_sts_error;

2411: gme_common_pvt.g_setup_done :=
2412: gme_common_pvt.setup (p_batch_header_rec.organization_id);
2413:
2414: IF NOT gme_common_pvt.g_setup_done THEN
2415: x_return_status := fnd_api.g_ret_sts_error;
2416: RAISE setup_failure;
2417: END IF;
2418: END IF;
2419: IF p_init_msg_list = fnd_api.g_true THEN

Line 2419: IF p_init_msg_list = fnd_api.g_true THEN

2415: x_return_status := fnd_api.g_ret_sts_error;
2416: RAISE setup_failure;
2417: END IF;
2418: END IF;
2419: IF p_init_msg_list = fnd_api.g_true THEN
2420: fnd_msg_pub.initialize;
2421: gme_common_pvt.g_error_count := 0;
2422: END IF;
2423:

Line 2432: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2428: ,p_gme_batch_step => p_batch_step_rec
2429: ,x_gme_batch_step => x_batch_step
2430: ,x_return_status => x_return_status);
2431:
2432: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2433: RAISE insert_step_failed;
2434: END IF;
2435:
2436: --

Line 2441: p_init_msg_list => FND_API.G_FALSE,

2437: -- Bug 5903208 -- call to GMF
2438: --
2439: GMF_VIB.Update_Batch_Requirements
2440: ( p_api_version => 1.0,
2441: p_init_msg_list => FND_API.G_FALSE,
2442: p_batch_id => p_batch_header_rec.batch_id,
2443: x_return_status => x_return_status,
2444: x_msg_count => l_message_count,
2445: x_msg_data => l_message_list);

Line 2446: IF x_return_status <> FND_API.G_RET_STS_SUCCESS

2442: p_batch_id => p_batch_header_rec.batch_id,
2443: x_return_status => x_return_status,
2444: x_msg_count => l_message_count,
2445: x_msg_data => l_message_list);
2446: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
2447: THEN
2448: RAISE gmf_cost_failure;
2449: END IF;
2450: -- End Bug 5903208

Line 2464: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2460: ,P_PARENT_EVENT => NULL
2461: ,P_PARENT_EVENT_KEY => NULL
2462: ,P_PARENT_ERECORD_ID => NULL
2463: ,X_STATUS => x_return_status);
2464: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2465: RAISE insert_step_failed;
2466: END IF;
2467: gme_common_pvt.log_message ('GME_INSERT_STEP');
2468: IF (g_debug <= gme_debug.g_log_procedure) THEN

Line 2477: x_return_status := FND_API.G_RET_STS_ERROR;

2473: END IF;
2474: EXCEPTION
2475: WHEN gmf_cost_failure THEN
2476: -- Bug 5903208
2477: x_return_status := FND_API.G_RET_STS_ERROR;
2478:
2479: WHEN setup_failure THEN
2480: ROLLBACK TO SAVEPOINT insert_step;
2481: x_batch_step := NULL;

Line 2482: x_return_status := fnd_api.g_ret_sts_error;

2478:
2479: WHEN setup_failure THEN
2480: ROLLBACK TO SAVEPOINT insert_step;
2481: x_batch_step := NULL;
2482: x_return_status := fnd_api.g_ret_sts_error;
2483: gme_common_pvt.count_and_get (x_count => x_message_count
2484: ,p_encoded => fnd_api.g_false
2485: ,x_data => x_message_list);
2486: WHEN insert_step_failed OR batch_save_failed THEN

Line 2484: ,p_encoded => fnd_api.g_false

2480: ROLLBACK TO SAVEPOINT insert_step;
2481: x_batch_step := NULL;
2482: x_return_status := fnd_api.g_ret_sts_error;
2483: gme_common_pvt.count_and_get (x_count => x_message_count
2484: ,p_encoded => fnd_api.g_false
2485: ,x_data => x_message_list);
2486: WHEN insert_step_failed OR batch_save_failed THEN
2487: ROLLBACK TO SAVEPOINT insert_step;
2488: x_batch_step := NULL;

Line 2490: ,p_encoded => fnd_api.g_false

2486: WHEN insert_step_failed OR batch_save_failed THEN
2487: ROLLBACK TO SAVEPOINT insert_step;
2488: x_batch_step := NULL;
2489: gme_common_pvt.count_and_get (x_count => x_message_count
2490: ,p_encoded => fnd_api.g_false
2491: ,x_data => x_message_list);
2492: WHEN OTHERS THEN
2493: ROLLBACK TO SAVEPOINT insert_step;
2494: x_batch_step := NULL;

Line 2497: ,p_encoded => fnd_api.g_false

2493: ROLLBACK TO SAVEPOINT insert_step;
2494: x_batch_step := NULL;
2495: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2496: gme_common_pvt.count_and_get (x_count => x_message_count
2497: ,p_encoded => fnd_api.g_false
2498: ,x_data => x_message_list);
2499: x_return_status := fnd_api.g_ret_sts_unexp_error;
2500: END insert_step;
2501:

Line 2499: x_return_status := fnd_api.g_ret_sts_unexp_error;

2495: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2496: gme_common_pvt.count_and_get (x_count => x_message_count
2497: ,p_encoded => fnd_api.g_false
2498: ,x_data => x_message_list);
2499: x_return_status := fnd_api.g_ret_sts_unexp_error;
2500: END insert_step;
2501:
2502:
2503: PROCEDURE revert_batch (

Line 2505: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE

2501:
2502:
2503: PROCEDURE revert_batch (
2504: p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
2505: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
2506: ,x_message_count OUT NOCOPY NUMBER
2507: ,x_message_list OUT NOCOPY VARCHAR2
2508: ,x_return_status OUT NOCOPY VARCHAR2
2509: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 2531: x_return_status := fnd_api.g_ret_sts_success;

2527: || 'Entering');
2528: END IF;
2529:
2530: /* Set the return status to success initially */
2531: x_return_status := fnd_api.g_ret_sts_success;
2532:
2533: IF NOT gme_common_pvt.g_setup_done THEN
2534: gme_common_pvt.g_setup_done :=
2535: gme_common_pvt.setup (p_batch_header_rec.organization_id);

Line 2538: x_return_status := fnd_api.g_ret_sts_error;

2534: gme_common_pvt.g_setup_done :=
2535: gme_common_pvt.setup (p_batch_header_rec.organization_id);
2536:
2537: IF NOT gme_common_pvt.g_setup_done THEN
2538: x_return_status := fnd_api.g_ret_sts_error;
2539: RAISE setup_failure;
2540: END IF;
2541: END IF;
2542:

Line 2544: IF p_init_msg_list = fnd_api.g_true THEN

2540: END IF;
2541: END IF;
2542:
2543: -- Initialize message list and count if needed
2544: IF p_init_msg_list = fnd_api.g_true THEN
2545: fnd_msg_pub.initialize;
2546: gme_common_pvt.g_error_count := 0;
2547: END IF;
2548:

Line 2573: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2569: || 'x_return_status='
2570: || x_return_status);
2571: END IF;
2572:
2573: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2574: RAISE batch_revert_failure;
2575: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
2576:
2577:

Line 2575: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

2571: END IF;
2572:
2573: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2574: RAISE batch_revert_failure;
2575: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
2576:
2577:
2578: gme_common_pvt.log_message ('GME_API_BATCH_UNCERTIFIED');
2579:

Line 2582: p_encoded => fnd_api.g_false,

2578: gme_common_pvt.log_message ('GME_API_BATCH_UNCERTIFIED');
2579:
2580:
2581: gme_common_pvt.count_and_get (x_count => x_message_count,
2582: p_encoded => fnd_api.g_false,
2583: x_data => x_message_list);
2584:
2585: IF (g_debug IS NOT NULL) THEN
2586: gme_debug.put_line ( 'Completed '

Line 2604: p_encoded => fnd_api.g_false,

2600: WHEN batch_revert_failure THEN
2601: ROLLBACK TO SAVEPOINT revert_batch;
2602: x_batch_header_rec := NULL;
2603: gme_common_pvt.count_and_get (x_count => x_message_count,
2604: p_encoded => fnd_api.g_false,
2605: x_data => x_message_list);
2606: WHEN setup_failure THEN
2607: ROLLBACK TO SAVEPOINT revert_batch;
2608: x_batch_header_rec := NULL;

Line 2610: p_encoded => fnd_api.g_false,

2606: WHEN setup_failure THEN
2607: ROLLBACK TO SAVEPOINT revert_batch;
2608: x_batch_header_rec := NULL;
2609: gme_common_pvt.count_and_get (x_count => x_message_count,
2610: p_encoded => fnd_api.g_false,
2611: x_data => x_message_list);
2612: x_return_status := fnd_api.g_ret_sts_error;
2613: WHEN OTHERS THEN
2614: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 2612: x_return_status := fnd_api.g_ret_sts_error;

2608: x_batch_header_rec := NULL;
2609: gme_common_pvt.count_and_get (x_count => x_message_count,
2610: p_encoded => fnd_api.g_false,
2611: x_data => x_message_list);
2612: x_return_status := fnd_api.g_ret_sts_error;
2613: WHEN OTHERS THEN
2614: IF g_debug <= gme_debug.g_log_unexpected THEN
2615: gme_debug.put_line ( 'When others exception in '
2616: || g_pkg_name

Line 2626: p_encoded => fnd_api.g_false,

2622:
2623: ROLLBACK TO SAVEPOINT revert_batch;
2624: x_batch_header_rec := NULL;
2625: gme_common_pvt.count_and_get (x_count => x_message_count,
2626: p_encoded => fnd_api.g_false,
2627: x_data => x_message_list);
2628: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2629:
2630:

Line 2628: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2624: x_batch_header_rec := NULL;
2625: gme_common_pvt.count_and_get (x_count => x_message_count,
2626: p_encoded => fnd_api.g_false,
2627: x_data => x_message_list);
2628: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2629:
2630:
2631: END revert_batch;
2632:

Line 2635: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE

2631: END revert_batch;
2632:
2633: PROCEDURE revert_step (
2634: p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
2635: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
2636: ,x_message_count OUT NOCOPY NUMBER
2637: ,x_message_list OUT NOCOPY VARCHAR2
2638: ,x_return_status OUT NOCOPY VARCHAR2
2639: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE

Line 2662: x_return_status := fnd_api.g_ret_sts_success;

2658: || 'Entering');
2659: END IF;
2660:
2661: /* Set the return status to success initially */
2662: x_return_status := fnd_api.g_ret_sts_success;
2663:
2664: IF NOT gme_common_pvt.g_setup_done THEN
2665: gme_common_pvt.g_setup_done :=
2666: gme_common_pvt.setup (p_batch_header_rec.organization_id);

Line 2669: x_return_status := fnd_api.g_ret_sts_error;

2665: gme_common_pvt.g_setup_done :=
2666: gme_common_pvt.setup (p_batch_header_rec.organization_id);
2667:
2668: IF NOT gme_common_pvt.g_setup_done THEN
2669: x_return_status := fnd_api.g_ret_sts_error;
2670: RAISE setup_failure;
2671: END IF;
2672: END IF;
2673:

Line 2675: IF p_init_msg_list = fnd_api.g_true THEN

2671: END IF;
2672: END IF;
2673:
2674: -- Initialize message list and count if needed
2675: IF p_init_msg_list = fnd_api.g_true THEN
2676: fnd_msg_pub.initialize;
2677: gme_common_pvt.g_error_count := 0;
2678: END IF;
2679:

Line 2705: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2701: || 'x_return_status='
2702: || x_return_status);
2703: END IF;
2704:
2705: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2706: RAISE step_revert_failure;
2707: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
2708:
2709:

Line 2707: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

2703: END IF;
2704:
2705: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2706: RAISE step_revert_failure;
2707: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
2708:
2709:
2710: gme_common_pvt.log_message ('GME_BATCH_STEP_UNCERTIFIED');
2711:

Line 2714: p_encoded => fnd_api.g_false,

2710: gme_common_pvt.log_message ('GME_BATCH_STEP_UNCERTIFIED');
2711:
2712:
2713: gme_common_pvt.count_and_get (x_count => x_message_count,
2714: p_encoded => fnd_api.g_false,
2715: x_data => x_message_list);
2716:
2717: IF (g_debug IS NOT NULL) THEN
2718: gme_debug.put_line ( 'Completed '

Line 2736: p_encoded => fnd_api.g_false,

2732: WHEN step_revert_failure THEN
2733: ROLLBACK TO SAVEPOINT revert_step;
2734: x_batch_step_rec := NULL;
2735: gme_common_pvt.count_and_get (x_count => x_message_count,
2736: p_encoded => fnd_api.g_false,
2737: x_data => x_message_list);
2738: WHEN setup_failure THEN
2739: ROLLBACK TO SAVEPOINT revert_step;
2740: x_batch_step_rec := NULL;

Line 2742: p_encoded => fnd_api.g_false,

2738: WHEN setup_failure THEN
2739: ROLLBACK TO SAVEPOINT revert_step;
2740: x_batch_step_rec := NULL;
2741: gme_common_pvt.count_and_get (x_count => x_message_count,
2742: p_encoded => fnd_api.g_false,
2743: x_data => x_message_list);
2744: x_return_status := fnd_api.g_ret_sts_error;
2745: WHEN OTHERS THEN
2746: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 2744: x_return_status := fnd_api.g_ret_sts_error;

2740: x_batch_step_rec := NULL;
2741: gme_common_pvt.count_and_get (x_count => x_message_count,
2742: p_encoded => fnd_api.g_false,
2743: x_data => x_message_list);
2744: x_return_status := fnd_api.g_ret_sts_error;
2745: WHEN OTHERS THEN
2746: IF g_debug <= gme_debug.g_log_unexpected THEN
2747: gme_debug.put_line ( 'When others exception in '
2748: || g_pkg_name

Line 2758: p_encoded => fnd_api.g_false,

2754:
2755: ROLLBACK TO SAVEPOINT revert_step;
2756: x_batch_step_rec := NULL;
2757: gme_common_pvt.count_and_get (x_count => x_message_count,
2758: p_encoded => fnd_api.g_false,
2759: x_data => x_message_list);
2760: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2761: END revert_step;
2762: /*************************************************************************/

Line 2760: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2756: x_batch_step_rec := NULL;
2757: gme_common_pvt.count_and_get (x_count => x_message_count,
2758: p_encoded => fnd_api.g_false,
2759: x_data => x_message_list);
2760: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2761: END revert_step;
2762: /*************************************************************************/
2763: PROCEDURE close_batch (
2764: p_validation_level IN NUMBER

Line 2794: x_return_status := fnd_api.g_ret_sts_error;

2790: gme_common_pvt.g_setup_done :=
2791: gme_common_pvt.setup (p_batch_header_rec.organization_id);
2792:
2793: IF NOT gme_common_pvt.g_setup_done THEN
2794: x_return_status := fnd_api.g_ret_sts_error;
2795: RAISE setup_failure;
2796: END IF;
2797: END IF;
2798:

Line 2800: IF p_init_msg_list = fnd_api.g_true THEN

2796: END IF;
2797: END IF;
2798:
2799: /* Initialize message list and count if needed */
2800: IF p_init_msg_list = fnd_api.g_true THEN
2801: fnd_msg_pub.initialize;
2802: gme_common_pvt.g_error_count := 0;
2803: END IF;
2804:

Line 2821: IF x_return_status = fnd_api.g_ret_sts_success THEN

2817: gme_debug.put_line ( 'Came back from Pvt Close Batch with status '
2818: || x_return_status);
2819: END IF;
2820:
2821: IF x_return_status = fnd_api.g_ret_sts_success THEN
2822: /* This comment has to be removed after this api becomes available.
2823: GME_TRANS_ENGINE_PVT.inform_OM
2824: ( p_action => 'DELETE'
2825: , p_trans_id => NULL

Line 2841: ,p_encoded => fnd_api.g_false

2837: gme_common_pvt.log_message ('GME_API_BATCH_CLOSED');
2838:
2839:
2840: gme_common_pvt.count_and_get (x_count => x_message_count
2841: ,p_encoded => fnd_api.g_false
2842: ,x_data => x_message_list);
2843:
2844: IF g_debug <= gme_debug.g_log_procedure THEN
2845: gme_debug.put_line ( 'Completed '

Line 2855: ,p_encoded => fnd_api.g_false

2851: WHEN setup_failure OR batch_close_failure OR batch_save_failed THEN
2852: ROLLBACK TO SAVEPOINT close_batch;
2853: x_batch_header_rec := NULL;
2854: gme_common_pvt.count_and_get (x_count => x_message_count
2855: ,p_encoded => fnd_api.g_false
2856: ,x_data => x_message_list);
2857: WHEN OTHERS THEN
2858: ROLLBACK TO SAVEPOINT close_batch;
2859: x_batch_header_rec := NULL;

Line 2862: ,p_encoded => fnd_api.g_false

2858: ROLLBACK TO SAVEPOINT close_batch;
2859: x_batch_header_rec := NULL;
2860: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2861: gme_common_pvt.count_and_get (x_count => x_message_count
2862: ,p_encoded => fnd_api.g_false
2863: ,x_data => x_message_list);
2864: x_return_status := fnd_api.g_ret_sts_unexp_error;
2865: END close_batch;
2866:

Line 2864: x_return_status := fnd_api.g_ret_sts_unexp_error;

2860: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2861: gme_common_pvt.count_and_get (x_count => x_message_count
2862: ,p_encoded => fnd_api.g_false
2863: ,x_data => x_message_list);
2864: x_return_status := fnd_api.g_ret_sts_unexp_error;
2865: END close_batch;
2866:
2867: /*************************************************************************/
2868: PROCEDURE close_step (

Line 2872: p_init_msg_list IN VARCHAR2 := fnd_api.g_false

2868: PROCEDURE close_step (
2869: p_validation_level IN NUMBER
2870: := gme_common_pvt.g_max_errors
2871: , /* Punit Kumar */
2872: p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2873: ,x_message_count OUT NOCOPY NUMBER
2874: ,x_message_list OUT NOCOPY VARCHAR2
2875: ,x_return_status OUT NOCOPY VARCHAR2
2876: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 2878: ,p_delete_pending IN VARCHAR2 := fnd_api.g_false

2874: ,x_message_list OUT NOCOPY VARCHAR2
2875: ,x_return_status OUT NOCOPY VARCHAR2
2876: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
2877: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
2878: ,p_delete_pending IN VARCHAR2 := fnd_api.g_false
2879: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE)
2880: IS
2881: l_api_name CONSTANT VARCHAR2 (30) := 'CLOSE_STEP';
2882: setup_failure EXCEPTION;

Line 2900: x_return_status := fnd_api.g_ret_sts_success;

2896: || 'Entering');
2897: END IF;
2898:
2899: /* Set the return status to success initially */
2900: x_return_status := fnd_api.g_ret_sts_success;
2901:
2902: IF NOT gme_common_pvt.g_setup_done THEN
2903: gme_common_pvt.g_setup_done :=
2904: gme_common_pvt.setup (p_batch_header_rec.organization_id);

Line 2907: x_return_status := fnd_api.g_ret_sts_error;

2903: gme_common_pvt.g_setup_done :=
2904: gme_common_pvt.setup (p_batch_header_rec.organization_id);
2905:
2906: IF NOT gme_common_pvt.g_setup_done THEN
2907: x_return_status := fnd_api.g_ret_sts_error;
2908: RAISE setup_failure;
2909: END IF;
2910: END IF;
2911: /* Initialize message list and count if needed */

Line 2912: IF p_init_msg_list = fnd_api.g_true THEN

2908: RAISE setup_failure;
2909: END IF;
2910: END IF;
2911: /* Initialize message list and count if needed */
2912: IF p_init_msg_list = fnd_api.g_true THEN
2913: fnd_msg_pub.initialize;
2914: gme_common_pvt.g_error_count := 0;
2915: END IF;
2916:

Line 2924: IF x_return_status = fnd_api.g_ret_sts_success THEN

2920: ,p_delete_pending => p_delete_pending
2921: ,x_batch_step_rec => x_batch_step_rec
2922: ,x_return_status => x_return_status);
2923:
2924: IF x_return_status = fnd_api.g_ret_sts_success THEN
2925: NULL;
2926: ELSE
2927: RAISE step_close_failed;
2928: END IF;

Line 2942: ,p_encoded => fnd_api.g_false

2938: gme_common_pvt.log_message ('GME_BATCH_STEP_CLOSED');
2939:
2940:
2941: gme_common_pvt.count_and_get (x_count => x_message_count
2942: ,p_encoded => fnd_api.g_false
2943: ,x_data => x_message_list);
2944: EXCEPTION
2945: WHEN setup_failure OR step_close_failed OR batch_save_failed THEN
2946: ROLLBACK TO SAVEPOINT close_batch_step;

Line 2950: ,p_encoded => fnd_api.g_false

2946: ROLLBACK TO SAVEPOINT close_batch_step;
2947: x_batch_step_rec := NULL;
2948: /*N Punit Kumar */
2949: gme_common_pvt.count_and_get (x_count => x_message_count
2950: ,p_encoded => fnd_api.g_false
2951: ,x_data => x_message_list);
2952: WHEN OTHERS THEN
2953: ROLLBACK TO SAVEPOINT close_batch_step;
2954: x_batch_step_rec := NULL;

Line 2958: ,p_encoded => fnd_api.g_false

2954: x_batch_step_rec := NULL;
2955: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2956: /*N Punit Kumar */
2957: gme_common_pvt.count_and_get (x_count => x_message_count
2958: ,p_encoded => fnd_api.g_false
2959: ,x_data => x_message_list);
2960: x_return_status := fnd_api.g_ret_sts_unexp_error;
2961: END close_step;
2962:

Line 2960: x_return_status := fnd_api.g_ret_sts_unexp_error;

2956: /*N Punit Kumar */
2957: gme_common_pvt.count_and_get (x_count => x_message_count
2958: ,p_encoded => fnd_api.g_false
2959: ,x_data => x_message_list);
2960: x_return_status := fnd_api.g_ret_sts_unexp_error;
2961: END close_step;
2962:
2963: /*************************************************************************/
2964: PROCEDURE reopen_batch (

Line 2968: p_init_msg_list IN VARCHAR2 := fnd_api.g_false

2964: PROCEDURE reopen_batch (
2965: p_validation_level IN NUMBER
2966: := gme_common_pvt.g_max_errors
2967: ,
2968: p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2969: ,x_message_count OUT NOCOPY NUMBER
2970: ,x_message_list OUT NOCOPY VARCHAR2
2971: ,x_return_status OUT NOCOPY VARCHAR2
2972: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 2973: ,p_reopen_steps IN VARCHAR2 := fnd_api.g_false

2969: ,x_message_count OUT NOCOPY NUMBER
2970: ,x_message_list OUT NOCOPY VARCHAR2
2971: ,x_return_status OUT NOCOPY VARCHAR2
2972: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
2973: ,p_reopen_steps IN VARCHAR2 := fnd_api.g_false
2974: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE)
2975: IS
2976: l_api_name CONSTANT VARCHAR2 (30) := 'REOPEN_BATCH';
2977: setup_failure EXCEPTION;

Line 2994: IF p_init_msg_list = fnd_api.g_true THEN

2990: || 'Entering');
2991: END IF;
2992:
2993: /* Initialize message list and count if needed*/
2994: IF p_init_msg_list = fnd_api.g_true THEN
2995: fnd_msg_pub.initialize;
2996: gme_common_pvt.g_error_count := 0;
2997: END IF;
2998:

Line 3000: x_return_status := fnd_api.g_ret_sts_success;

2996: gme_common_pvt.g_error_count := 0;
2997: END IF;
2998:
2999: /* Set the success staus to success inititally*/
3000: x_return_status := fnd_api.g_ret_sts_success;
3001:
3002: -- Pawan kumar added for bug 4956087
3003: IF NOT gme_common_pvt.g_setup_done THEN
3004: gme_common_pvt.g_setup_done :=

Line 3008: x_return_status := fnd_api.g_ret_sts_error;

3004: gme_common_pvt.g_setup_done :=
3005: gme_common_pvt.setup (p_batch_header_rec.organization_id);
3006:
3007: IF NOT gme_common_pvt.g_setup_done THEN
3008: x_return_status := fnd_api.g_ret_sts_error;
3009: RAISE setup_failure;
3010: END IF;
3011: END IF;
3012: gme_common_pvt.set_timestamp;

Line 3030: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

3026: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
3027: || 'after private layer with sts'||x_return_status);
3028: END IF;
3029:
3030: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3031: NULL;
3032: ELSE
3033: RAISE batch_reopen_failure;
3034: END IF;

Line 3048: ,p_encoded => fnd_api.g_false

3044: END IF;
3045:
3046:
3047: gme_common_pvt.count_and_get (x_count => x_message_count
3048: ,p_encoded => fnd_api.g_false
3049: ,x_data => x_message_list);
3050:
3051:
3052: EXCEPTION

Line 3063: x_return_status := fnd_api.g_ret_sts_error;

3059: ||'reopen_batch error : SETUP_FAILURE'
3060: );
3061: END IF;
3062:
3063: x_return_status := fnd_api.g_ret_sts_error;
3064: /*N Punit Kumar */
3065: gme_common_pvt.count_and_get (x_count => x_message_count
3066: ,p_encoded => fnd_api.g_false
3067: ,x_data => x_message_list);

Line 3066: ,p_encoded => fnd_api.g_false

3062:
3063: x_return_status := fnd_api.g_ret_sts_error;
3064: /*N Punit Kumar */
3065: gme_common_pvt.count_and_get (x_count => x_message_count
3066: ,p_encoded => fnd_api.g_false
3067: ,x_data => x_message_list);
3068: WHEN batch_reopen_failure OR batch_save_failed THEN
3069: ROLLBACK TO SAVEPOINT reopen_batch;
3070: x_batch_header_rec := NULL;

Line 3080: ,p_encoded => fnd_api.g_false

3076: END IF;
3077:
3078: /*N Punit Kumar */
3079: gme_common_pvt.count_and_get (x_count => x_message_count
3080: ,p_encoded => fnd_api.g_false
3081: ,x_data => x_message_list);
3082: x_return_status := fnd_api.g_ret_sts_error;
3083: WHEN OTHERS THEN
3084: ROLLBACK TO SAVEPOINT reopen_batch;

Line 3082: x_return_status := fnd_api.g_ret_sts_error;

3078: /*N Punit Kumar */
3079: gme_common_pvt.count_and_get (x_count => x_message_count
3080: ,p_encoded => fnd_api.g_false
3081: ,x_data => x_message_list);
3082: x_return_status := fnd_api.g_ret_sts_error;
3083: WHEN OTHERS THEN
3084: ROLLBACK TO SAVEPOINT reopen_batch;
3085: x_batch_header_rec := NULL;
3086:

Line 3096: ,p_encoded => fnd_api.g_false

3092:
3093: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3094:
3095: gme_common_pvt.count_and_get (x_count => x_message_count
3096: ,p_encoded => fnd_api.g_false
3097: ,x_data => x_message_list);
3098: x_return_status := fnd_api.g_ret_sts_unexp_error;
3099: END reopen_batch;
3100:

Line 3098: x_return_status := fnd_api.g_ret_sts_unexp_error;

3094:
3095: gme_common_pvt.count_and_get (x_count => x_message_count
3096: ,p_encoded => fnd_api.g_false
3097: ,x_data => x_message_list);
3098: x_return_status := fnd_api.g_ret_sts_unexp_error;
3099: END reopen_batch;
3100:
3101: /*************************************************************************/
3102: PROCEDURE reopen_step (

Line 3106: p_init_msg_list IN VARCHAR2 := fnd_api.g_false

3102: PROCEDURE reopen_step (
3103: p_validation_level IN NUMBER
3104: := gme_common_pvt.g_max_errors
3105: , /* Punit Kumar */
3106: p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3107: ,x_message_count OUT NOCOPY NUMBER
3108: ,x_message_list OUT NOCOPY VARCHAR2
3109: ,x_return_status OUT NOCOPY VARCHAR2
3110: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 3124: IF p_init_msg_list = fnd_api.g_true THEN

3120: -- Set the save point before proceeding
3121: SAVEPOINT reopen_batch_step;
3122:
3123: /* Initialize message list and count if needed*/
3124: IF p_init_msg_list = fnd_api.g_true THEN
3125: fnd_msg_pub.initialize;
3126: gme_common_pvt.g_error_count := 0; /* Punit Kumar */
3127: END IF;
3128:

Line 3142: x_return_status := fnd_api.g_ret_sts_error;

3138: gme_common_pvt.g_setup_done :=
3139: gme_common_pvt.setup (p_batch_header_rec.organization_id);
3140:
3141: IF NOT gme_common_pvt.g_setup_done THEN
3142: x_return_status := fnd_api.g_ret_sts_error;
3143: RAISE setup_failure;
3144: END IF;
3145: END IF;
3146: /* Set the success staus to success inititally*/

Line 3147: x_return_status := fnd_api.g_ret_sts_success;

3143: RAISE setup_failure;
3144: END IF;
3145: END IF;
3146: /* Set the success staus to success inititally*/
3147: x_return_status := fnd_api.g_ret_sts_success;
3148: /* Punit Kumar */
3149: gme_common_pvt.set_timestamp;
3150:
3151: IF (g_debug <= gme_debug.g_log_procedure) THEN

Line 3165: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

3161: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
3162: || 'existing private layer with status'||x_return_status );
3163: END IF;
3164:
3165: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3166: NULL;
3167: ELSE
3168: RAISE step_reopen_failure;
3169: END IF;

Line 3183: ,p_encoded => fnd_api.g_false

3179: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
3180: END IF;
3181:
3182: gme_common_pvt.count_and_get (x_count => x_message_count
3183: ,p_encoded => fnd_api.g_false
3184: ,x_data => x_message_list);
3185:
3186: IF (g_debug <= gme_debug.g_log_procedure) THEN
3187: gme_debug.put_line ('Normal end of Public Reopen_Step.'

Line 3202: x_return_status := fnd_api.g_ret_sts_error;

3198: ||'reopen_step error : SETUP_FAILURE.'
3199: );
3200: END IF;
3201:
3202: x_return_status := fnd_api.g_ret_sts_error;
3203: /* Punit Kumar */
3204: gme_common_pvt.count_and_get (x_count => x_message_count
3205: ,p_encoded => fnd_api.g_false
3206: ,x_data => x_message_list);

Line 3205: ,p_encoded => fnd_api.g_false

3201:
3202: x_return_status := fnd_api.g_ret_sts_error;
3203: /* Punit Kumar */
3204: gme_common_pvt.count_and_get (x_count => x_message_count
3205: ,p_encoded => fnd_api.g_false
3206: ,x_data => x_message_list);
3207: WHEN step_reopen_failure OR step_save_failed THEN
3208: ROLLBACK TO SAVEPOINT reopen_batch_step;
3209: x_batch_step_rec := NULL;

Line 3220: ,p_encoded => fnd_api.g_false

3216: END IF;
3217:
3218: /* Punit Kumar */
3219: gme_common_pvt.count_and_get (x_count => x_message_count
3220: ,p_encoded => fnd_api.g_false
3221: ,x_data => x_message_list);
3222: x_return_status := fnd_api.g_ret_sts_error;
3223: WHEN OTHERS THEN
3224: ROLLBACK TO SAVEPOINT reopen_batch_step;

Line 3222: x_return_status := fnd_api.g_ret_sts_error;

3218: /* Punit Kumar */
3219: gme_common_pvt.count_and_get (x_count => x_message_count
3220: ,p_encoded => fnd_api.g_false
3221: ,x_data => x_message_list);
3222: x_return_status := fnd_api.g_ret_sts_error;
3223: WHEN OTHERS THEN
3224: ROLLBACK TO SAVEPOINT reopen_batch_step;
3225: x_batch_step_rec := NULL;
3226:

Line 3236: ,p_encoded => fnd_api.g_false

3232:
3233: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3234: /* Punit Kumar */
3235: gme_common_pvt.count_and_get (x_count => x_message_count
3236: ,p_encoded => fnd_api.g_false
3237: ,x_data => x_message_list);
3238: x_return_status := fnd_api.g_ret_sts_unexp_error;
3239: END reopen_step;
3240:

Line 3238: x_return_status := fnd_api.g_ret_sts_unexp_error;

3234: /* Punit Kumar */
3235: gme_common_pvt.count_and_get (x_count => x_message_count
3236: ,p_encoded => fnd_api.g_false
3237: ,x_data => x_message_list);
3238: x_return_status := fnd_api.g_ret_sts_unexp_error;
3239: END reopen_step;
3240:
3241: /*================================================================================
3242: Procedure

Line 3281: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

3277: ================================================================================*/
3278: PROCEDURE incremental_backflush (
3279: p_validation_level IN NUMBER
3280: := gme_common_pvt.g_max_errors
3281: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3282: ,x_message_count OUT NOCOPY NUMBER
3283: ,x_message_list OUT NOCOPY VARCHAR2
3284: ,x_return_status OUT NOCOPY VARCHAR2
3285: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 3307: x_return_status := fnd_api.g_ret_sts_success;

3303: IF (g_debug IS NOT NULL) THEN
3304: gme_debug.log_initialize ('IncrementalBackflush');
3305: END IF;
3306: /* Set the return status to success initially */
3307: x_return_status := fnd_api.g_ret_sts_success;
3308:
3309: /* Setup the common constants used across the apis */
3310: IF NOT gme_common_pvt.g_setup_done THEN
3311: gme_common_pvt.g_setup_done :=

Line 3315: x_return_status := fnd_api.g_ret_sts_error;

3311: gme_common_pvt.g_setup_done :=
3312: gme_common_pvt.setup (p_batch_header_rec.organization_id);
3313:
3314: IF NOT gme_common_pvt.g_setup_done THEN
3315: x_return_status := fnd_api.g_ret_sts_error;
3316: RAISE setup_failure;
3317: END IF;
3318: END IF;
3319:

Line 3321: IF p_init_msg_list = fnd_api.g_true THEN

3317: END IF;
3318: END IF;
3319:
3320: /* Initialize message list and count if needed */
3321: IF p_init_msg_list = fnd_api.g_true THEN
3322: fnd_msg_pub.initialize;
3323: gme_common_pvt.g_error_count := 0;
3324: END IF;
3325:

Line 3370: (fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN

3366: -- Bug 13017256 - Reset flag.
3367: -- gme_common_pvt.g_ib_timestamp_set := 0;
3368:
3369: IF x_return_status NOT IN
3370: (fnd_api.g_ret_sts_success, gme_common_pvt.g_exceptions_err) THEN
3371: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
3372: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after gme_incremental_backflush_pvt.incremental_backflush; x_return_status= '||x_return_status);
3373: END IF;
3374:

Line 3401: ,p_encoded => fnd_api.g_false

3397: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
3398: END IF;
3399:
3400: gme_common_pvt.count_and_get (x_count => x_message_count
3401: ,p_encoded => fnd_api.g_false
3402: ,x_data => x_message_list);
3403: EXCEPTION
3404: WHEN setup_failure THEN
3405: ROLLBACK TO SAVEPOINT incremental_backflush;

Line 3406: x_return_status := fnd_api.g_ret_sts_error;

3402: ,x_data => x_message_list);
3403: EXCEPTION
3404: WHEN setup_failure THEN
3405: ROLLBACK TO SAVEPOINT incremental_backflush;
3406: x_return_status := fnd_api.g_ret_sts_error;
3407: gme_common_pvt.count_and_get (x_count => x_message_count
3408: ,p_encoded => fnd_api.g_false
3409: ,x_data => x_message_list);
3410: WHEN incremental_backflush_failed THEN

Line 3408: ,p_encoded => fnd_api.g_false

3404: WHEN setup_failure THEN
3405: ROLLBACK TO SAVEPOINT incremental_backflush;
3406: x_return_status := fnd_api.g_ret_sts_error;
3407: gme_common_pvt.count_and_get (x_count => x_message_count
3408: ,p_encoded => fnd_api.g_false
3409: ,x_data => x_message_list);
3410: WHEN incremental_backflush_failed THEN
3411: ROLLBACK TO SAVEPOINT incremental_backflush;
3412: -- Bug 8639523 - Clear the cache just in case any transactions hit the tree.

Line 3415: ,p_encoded => fnd_api.g_false

3411: ROLLBACK TO SAVEPOINT incremental_backflush;
3412: -- Bug 8639523 - Clear the cache just in case any transactions hit the tree.
3413: inv_quantity_tree_pub.clear_quantity_cache;
3414: gme_common_pvt.count_and_get (x_count => x_message_count
3415: ,p_encoded => fnd_api.g_false
3416: ,x_data => x_message_list);
3417: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
3418: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in exception block; x_return_status= '||x_return_status);
3419: END IF;

Line 3424: ,p_encoded => fnd_api.g_false

3420: WHEN OTHERS THEN
3421: ROLLBACK TO SAVEPOINT incremental_backflush;
3422: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3423: gme_common_pvt.count_and_get (x_count => x_message_count
3424: ,p_encoded => fnd_api.g_false
3425: ,x_data => x_message_list);
3426: x_return_status := fnd_api.g_ret_sts_unexp_error;
3427: END incremental_backflush;
3428:

Line 3426: x_return_status := fnd_api.g_ret_sts_unexp_error;

3422: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3423: gme_common_pvt.count_and_get (x_count => x_message_count
3424: ,p_encoded => fnd_api.g_false
3425: ,x_data => x_message_list);
3426: x_return_status := fnd_api.g_ret_sts_unexp_error;
3427: END incremental_backflush;
3428:
3429: /*================================================================================
3430: Procedure

Line 3451: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false

3447: ================================================================================*/
3448: PROCEDURE reroute_batch (
3449: p_validation_level IN NUMBER
3450: := gme_common_pvt.g_max_errors
3451: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3452: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3453: ,p_validity_rule_id IN NUMBER
3454: ,p_use_workday_cal IN VARCHAR2 DEFAULT fnd_api.g_false
3455: ,p_contiguity_override IN VARCHAR2 DEFAULT fnd_api.g_false

Line 3454: ,p_use_workday_cal IN VARCHAR2 DEFAULT fnd_api.g_false

3450: := gme_common_pvt.g_max_errors
3451: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3452: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3453: ,p_validity_rule_id IN NUMBER
3454: ,p_use_workday_cal IN VARCHAR2 DEFAULT fnd_api.g_false
3455: ,p_contiguity_override IN VARCHAR2 DEFAULT fnd_api.g_false
3456: ,x_message_count OUT NOCOPY NUMBER
3457: ,x_message_list OUT NOCOPY VARCHAR2
3458: ,x_return_status OUT NOCOPY VARCHAR2

Line 3455: ,p_contiguity_override IN VARCHAR2 DEFAULT fnd_api.g_false

3451: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3452: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3453: ,p_validity_rule_id IN NUMBER
3454: ,p_use_workday_cal IN VARCHAR2 DEFAULT fnd_api.g_false
3455: ,p_contiguity_override IN VARCHAR2 DEFAULT fnd_api.g_false
3456: ,x_message_count OUT NOCOPY NUMBER
3457: ,x_message_list OUT NOCOPY VARCHAR2
3458: ,x_return_status OUT NOCOPY VARCHAR2
3459: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE)

Line 3478: IF (fnd_api.to_boolean (p_init_msg_list) ) THEN

3474: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
3475: || 'Entering');
3476: END IF;
3477:
3478: IF (fnd_api.to_boolean (p_init_msg_list) ) THEN
3479: fnd_msg_pub.initialize;
3480: gme_common_pvt.g_error_count := 0;
3481: END IF;
3482:

Line 3484: x_return_status := fnd_api.g_ret_sts_success;

3480: gme_common_pvt.g_error_count := 0;
3481: END IF;
3482:
3483: /* Set the return status to success initially */
3484: x_return_status := fnd_api.g_ret_sts_success;
3485:
3486: IF NOT gme_common_pvt.g_setup_done THEN
3487: gme_common_pvt.g_setup_done :=
3488: gme_common_pvt.setup (p_batch_header_rec.organization_id);

Line 3491: x_return_status := fnd_api.g_ret_sts_error;

3487: gme_common_pvt.g_setup_done :=
3488: gme_common_pvt.setup (p_batch_header_rec.organization_id);
3489:
3490: IF NOT gme_common_pvt.g_setup_done THEN
3491: x_return_status := fnd_api.g_ret_sts_error;
3492: RAISE setup_failure;
3493: END IF;
3494: END IF;
3495:

Line 3507: ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN

3503: ,x_batch_header_rec => x_batch_header_rec);
3504:
3505: IF (x_return_status = 'C') THEN
3506: RAISE no_continous_periods;
3507: ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN
3508: RAISE fnd_api.g_exc_error;
3509: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3510: RAISE fnd_api.g_exc_unexpected_error;
3511: ELSE

Line 3508: RAISE fnd_api.g_exc_error;

3504:
3505: IF (x_return_status = 'C') THEN
3506: RAISE no_continous_periods;
3507: ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN
3508: RAISE fnd_api.g_exc_error;
3509: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3510: RAISE fnd_api.g_exc_unexpected_error;
3511: ELSE
3512: --FPBug#5040865 Begin

Line 3509: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN

3505: IF (x_return_status = 'C') THEN
3506: RAISE no_continous_periods;
3507: ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN
3508: RAISE fnd_api.g_exc_error;
3509: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3510: RAISE fnd_api.g_exc_unexpected_error;
3511: ELSE
3512: --FPBug#5040865 Begin
3513: IF x_batch_header_rec.batch_type = 0 THEN

Line 3510: RAISE fnd_api.g_exc_unexpected_error;

3506: RAISE no_continous_periods;
3507: ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN
3508: RAISE fnd_api.g_exc_error;
3509: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3510: RAISE fnd_api.g_exc_unexpected_error;
3511: ELSE
3512: --FPBug#5040865 Begin
3513: IF x_batch_header_rec.batch_type = 0 THEN
3514: FND_MESSAGE.SET_NAME('GME','GME_BATCH');

Line 3523: ,p_encoded => fnd_api.g_false

3519: --FPBug#5040865 End
3520: END IF;
3521:
3522: gme_common_pvt.count_and_get (x_count => x_message_count
3523: ,p_encoded => fnd_api.g_false
3524: ,x_data => x_message_list);
3525:
3526: IF (NVL (g_debug, 0) IN
3527: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN

Line 3540: ,p_encoded => fnd_api.g_false

3536: WHEN setup_failure THEN
3537: ROLLBACK TO SAVEPOINT reroute_batch_main;
3538: x_batch_header_rec := NULL;
3539: gme_common_pvt.count_and_get (x_count => x_message_count
3540: ,p_encoded => fnd_api.g_false
3541: ,x_data => x_message_list);
3542: x_return_status := fnd_api.g_ret_sts_error;
3543: WHEN no_continous_periods THEN
3544: gme_common_pvt.count_and_get (x_count => x_message_count

Line 3542: x_return_status := fnd_api.g_ret_sts_error;

3538: x_batch_header_rec := NULL;
3539: gme_common_pvt.count_and_get (x_count => x_message_count
3540: ,p_encoded => fnd_api.g_false
3541: ,x_data => x_message_list);
3542: x_return_status := fnd_api.g_ret_sts_error;
3543: WHEN no_continous_periods THEN
3544: gme_common_pvt.count_and_get (x_count => x_message_count
3545: ,p_encoded => fnd_api.g_false
3546: ,x_data => x_message_list);

Line 3545: ,p_encoded => fnd_api.g_false

3541: ,x_data => x_message_list);
3542: x_return_status := fnd_api.g_ret_sts_error;
3543: WHEN no_continous_periods THEN
3544: gme_common_pvt.count_and_get (x_count => x_message_count
3545: ,p_encoded => fnd_api.g_false
3546: ,x_data => x_message_list);
3547: WHEN fnd_api.g_exc_error THEN
3548: ROLLBACK TO SAVEPOINT reroute_batch_main;
3549: x_batch_header_rec := NULL;

Line 3547: WHEN fnd_api.g_exc_error THEN

3543: WHEN no_continous_periods THEN
3544: gme_common_pvt.count_and_get (x_count => x_message_count
3545: ,p_encoded => fnd_api.g_false
3546: ,x_data => x_message_list);
3547: WHEN fnd_api.g_exc_error THEN
3548: ROLLBACK TO SAVEPOINT reroute_batch_main;
3549: x_batch_header_rec := NULL;
3550: x_return_status := fnd_api.g_ret_sts_error;
3551: gme_common_pvt.count_and_get (x_count => x_message_count

Line 3550: x_return_status := fnd_api.g_ret_sts_error;

3546: ,x_data => x_message_list);
3547: WHEN fnd_api.g_exc_error THEN
3548: ROLLBACK TO SAVEPOINT reroute_batch_main;
3549: x_batch_header_rec := NULL;
3550: x_return_status := fnd_api.g_ret_sts_error;
3551: gme_common_pvt.count_and_get (x_count => x_message_count
3552: ,p_encoded => fnd_api.g_false
3553: ,x_data => x_message_list);
3554: WHEN fnd_api.g_exc_unexpected_error THEN

Line 3552: ,p_encoded => fnd_api.g_false

3548: ROLLBACK TO SAVEPOINT reroute_batch_main;
3549: x_batch_header_rec := NULL;
3550: x_return_status := fnd_api.g_ret_sts_error;
3551: gme_common_pvt.count_and_get (x_count => x_message_count
3552: ,p_encoded => fnd_api.g_false
3553: ,x_data => x_message_list);
3554: WHEN fnd_api.g_exc_unexpected_error THEN
3555: ROLLBACK TO SAVEPOINT reroute_batch_main;
3556: x_batch_header_rec := NULL;

Line 3554: WHEN fnd_api.g_exc_unexpected_error THEN

3550: x_return_status := fnd_api.g_ret_sts_error;
3551: gme_common_pvt.count_and_get (x_count => x_message_count
3552: ,p_encoded => fnd_api.g_false
3553: ,x_data => x_message_list);
3554: WHEN fnd_api.g_exc_unexpected_error THEN
3555: ROLLBACK TO SAVEPOINT reroute_batch_main;
3556: x_batch_header_rec := NULL;
3557: x_return_status := fnd_api.g_ret_sts_unexp_error;
3558:

Line 3557: x_return_status := fnd_api.g_ret_sts_unexp_error;

3553: ,x_data => x_message_list);
3554: WHEN fnd_api.g_exc_unexpected_error THEN
3555: ROLLBACK TO SAVEPOINT reroute_batch_main;
3556: x_batch_header_rec := NULL;
3557: x_return_status := fnd_api.g_ret_sts_unexp_error;
3558:
3559: IF (NVL (g_debug, 0) > 0) THEN
3560: gme_debug.put_line ( g_pkg_name
3561: || '.'

Line 3569: ,p_encoded => fnd_api.g_false

3565: || SQLERRM);
3566: END IF;
3567:
3568: gme_common_pvt.count_and_get (x_count => x_message_count
3569: ,p_encoded => fnd_api.g_false
3570: ,x_data => x_message_list);
3571: WHEN OTHERS THEN
3572: ROLLBACK TO SAVEPOINT reroute_batch_main;
3573: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 3575: x_return_status := fnd_api.g_ret_sts_unexp_error;

3571: WHEN OTHERS THEN
3572: ROLLBACK TO SAVEPOINT reroute_batch_main;
3573: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3574: x_batch_header_rec := NULL;
3575: x_return_status := fnd_api.g_ret_sts_unexp_error;
3576:
3577: IF (NVL (g_debug, 0) > 0) THEN
3578: gme_debug.put_line ( g_pkg_name
3579: || '.'

Line 3587: ,p_encoded => fnd_api.g_false

3583: || SQLERRM);
3584: END IF;
3585:
3586: gme_common_pvt.count_and_get (x_count => x_message_count
3587: ,p_encoded => fnd_api.g_false
3588: ,x_data => x_message_list);
3589: END reroute_batch;
3590:
3591: /*================================================================================

Line 3611: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

3607: ================================================================================*/
3608: PROCEDURE cancel_batch (
3609: p_validation_level IN NUMBER
3610: := gme_common_pvt.g_max_errors
3611: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3612: ,x_message_count OUT NOCOPY NUMBER
3613: ,x_message_list OUT NOCOPY VARCHAR2
3614: ,x_return_status OUT NOCOPY VARCHAR2
3615: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 3634: x_return_status := fnd_api.g_ret_sts_success;

3630: || 'Entering');
3631: END IF;
3632:
3633: /* Set the return status to success initially */
3634: x_return_status := fnd_api.g_ret_sts_success;
3635:
3636: IF NOT gme_common_pvt.g_setup_done THEN
3637: gme_common_pvt.g_setup_done :=
3638: gme_common_pvt.setup (p_batch_header_rec.organization_id);

Line 3641: x_return_status := fnd_api.g_ret_sts_error;

3637: gme_common_pvt.g_setup_done :=
3638: gme_common_pvt.setup (p_batch_header_rec.organization_id);
3639:
3640: IF NOT gme_common_pvt.g_setup_done THEN
3641: x_return_status := fnd_api.g_ret_sts_error;
3642: RAISE setup_failure;
3643: END IF;
3644: END IF;
3645:

Line 3647: IF p_init_msg_list = fnd_api.g_true THEN

3643: END IF;
3644: END IF;
3645:
3646: -- Initialize message list and count if needed
3647: IF p_init_msg_list = fnd_api.g_true THEN
3648: fnd_msg_pub.initialize;
3649: gme_common_pvt.g_error_count := 0;
3650: END IF;
3651:

Line 3676: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3672: || 'x_return_status='
3673: || x_return_status);
3674: END IF;
3675:
3676: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3677: RAISE batch_cancel_failure;
3678: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
3679:
3680: --FPBug#5040865 Begin

Line 3678: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

3674: END IF;
3675:
3676: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3677: RAISE batch_cancel_failure;
3678: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
3679:
3680: --FPBug#5040865 Begin
3681: IF x_batch_header_rec.batch_type = 0 THEN
3682: FND_MESSAGE.SET_NAME('GME','GME_BATCH');

Line 3690: ,p_encoded => fnd_api.g_false

3686: gme_common_pvt.log_message ('GME_API_BATCH_CANCELLED','DOC',FND_MESSAGE.GET);
3687: --FPBug#5040865 End
3688:
3689: gme_common_pvt.count_and_get (x_count => x_message_count
3690: ,p_encoded => fnd_api.g_false
3691: ,x_data => x_message_list);
3692:
3693: IF (g_debug IS NOT NULL) THEN
3694: gme_debug.put_line ( 'Completed '

Line 3712: ,p_encoded => fnd_api.g_false

3708: WHEN batch_cancel_failure THEN
3709: ROLLBACK TO SAVEPOINT cancel_batch;
3710: x_batch_header_rec := NULL;
3711: gme_common_pvt.count_and_get (x_count => x_message_count
3712: ,p_encoded => fnd_api.g_false
3713: ,x_data => x_message_list);
3714: WHEN setup_failure THEN
3715: ROLLBACK TO SAVEPOINT cancel_batch;
3716: x_batch_header_rec := NULL;

Line 3718: ,p_encoded => fnd_api.g_false

3714: WHEN setup_failure THEN
3715: ROLLBACK TO SAVEPOINT cancel_batch;
3716: x_batch_header_rec := NULL;
3717: gme_common_pvt.count_and_get (x_count => x_message_count
3718: ,p_encoded => fnd_api.g_false
3719: ,x_data => x_message_list);
3720: x_return_status := fnd_api.g_ret_sts_error;
3721: WHEN OTHERS THEN
3722: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 3720: x_return_status := fnd_api.g_ret_sts_error;

3716: x_batch_header_rec := NULL;
3717: gme_common_pvt.count_and_get (x_count => x_message_count
3718: ,p_encoded => fnd_api.g_false
3719: ,x_data => x_message_list);
3720: x_return_status := fnd_api.g_ret_sts_error;
3721: WHEN OTHERS THEN
3722: IF g_debug <= gme_debug.g_log_unexpected THEN
3723: gme_debug.put_line ( 'When others exception in '
3724: || g_pkg_name

Line 3734: ,p_encoded => fnd_api.g_false

3730:
3731: ROLLBACK TO SAVEPOINT cancel_batch;
3732: x_batch_header_rec := NULL;
3733: gme_common_pvt.count_and_get (x_count => x_message_count
3734: ,p_encoded => fnd_api.g_false
3735: ,x_data => x_message_list);
3736: x_return_status := fnd_api.g_ret_sts_unexp_error;
3737: END cancel_batch;
3738:

Line 3736: x_return_status := fnd_api.g_ret_sts_unexp_error;

3732: x_batch_header_rec := NULL;
3733: gme_common_pvt.count_and_get (x_count => x_message_count
3734: ,p_encoded => fnd_api.g_false
3735: ,x_data => x_message_list);
3736: x_return_status := fnd_api.g_ret_sts_unexp_error;
3737: END cancel_batch;
3738:
3739: /*================================================================================
3740: Procedure

Line 3761: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

3757: ================================================================================*/
3758: PROCEDURE terminate_batch (
3759: p_validation_level IN NUMBER
3760: := gme_common_pvt.g_max_errors
3761: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3762: ,x_message_count OUT NOCOPY NUMBER
3763: ,x_message_list OUT NOCOPY VARCHAR2
3764: ,x_return_status OUT NOCOPY VARCHAR2
3765: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 3785: x_return_status := fnd_api.g_ret_sts_success;

3781: || 'Entering');
3782: END IF;
3783:
3784: /* Set the return status to success initially */
3785: x_return_status := fnd_api.g_ret_sts_success;
3786:
3787: IF NOT gme_common_pvt.g_setup_done THEN
3788: gme_common_pvt.g_setup_done :=
3789: gme_common_pvt.setup (p_batch_header_rec.organization_id);

Line 3792: x_return_status := fnd_api.g_ret_sts_error;

3788: gme_common_pvt.g_setup_done :=
3789: gme_common_pvt.setup (p_batch_header_rec.organization_id);
3790:
3791: IF NOT gme_common_pvt.g_setup_done THEN
3792: x_return_status := fnd_api.g_ret_sts_error;
3793: RAISE setup_failure;
3794: END IF;
3795: END IF;
3796:

Line 3798: IF p_init_msg_list = fnd_api.g_true THEN

3794: END IF;
3795: END IF;
3796:
3797: -- Initialize message list and count if needed
3798: IF p_init_msg_list = fnd_api.g_true THEN
3799: fnd_msg_pub.initialize;
3800: gme_common_pvt.g_error_count := 0;
3801: END IF;
3802:

Line 3827: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3823: || 'x_return_status='
3824: || x_return_status);
3825: END IF;
3826:
3827: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3828: RAISE batch_terminate_failure;
3829: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
3830:
3831: gme_common_pvt.log_message ('GME_API_BATCH_TERMINATED');

Line 3829: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

3825: END IF;
3826:
3827: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3828: RAISE batch_terminate_failure;
3829: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
3830:
3831: gme_common_pvt.log_message ('GME_API_BATCH_TERMINATED');
3832:
3833:

Line 3835: ,p_encoded => fnd_api.g_false

3831: gme_common_pvt.log_message ('GME_API_BATCH_TERMINATED');
3832:
3833:
3834: gme_common_pvt.count_and_get (x_count => x_message_count
3835: ,p_encoded => fnd_api.g_false
3836: ,x_data => x_message_list);
3837:
3838: IF (g_debug IS NOT NULL) THEN
3839: gme_debug.put_line ( 'Completed '

Line 3866: x_return_status := fnd_api.g_ret_sts_error;

3862: || ':'
3863: || 'SETUP_FAILURE.');
3864: END IF;
3865:
3866: x_return_status := fnd_api.g_ret_sts_error;
3867: gme_common_pvt.count_and_get (x_count => x_message_count
3868: ,p_encoded => fnd_api.g_false
3869: ,x_data => x_message_list);
3870: WHEN batch_terminate_failure THEN

Line 3868: ,p_encoded => fnd_api.g_false

3864: END IF;
3865:
3866: x_return_status := fnd_api.g_ret_sts_error;
3867: gme_common_pvt.count_and_get (x_count => x_message_count
3868: ,p_encoded => fnd_api.g_false
3869: ,x_data => x_message_list);
3870: WHEN batch_terminate_failure THEN
3871: ROLLBACK TO SAVEPOINT terminate_batch;
3872: x_batch_header_rec := NULL;

Line 3884: ,p_encoded => fnd_api.g_false

3880: || 'BATCH_TERMINATE_FAILURE OR BATCH_SAVE_FAILED.');
3881: END IF;
3882:
3883: gme_common_pvt.count_and_get (x_count => x_message_count
3884: ,p_encoded => fnd_api.g_false
3885: ,x_data => x_message_list);
3886: WHEN OTHERS THEN
3887: ROLLBACK TO SAVEPOINT terminate_batch;
3888: x_batch_header_rec := NULL;

Line 3901: ,p_encoded => fnd_api.g_false

3897: END IF;
3898:
3899: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3900: gme_common_pvt.count_and_get (x_count => x_message_count
3901: ,p_encoded => fnd_api.g_false
3902: ,x_data => x_message_list);
3903: x_return_status := fnd_api.g_ret_sts_unexp_error;
3904: END terminate_batch;
3905:

Line 3903: x_return_status := fnd_api.g_ret_sts_unexp_error;

3899: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3900: gme_common_pvt.count_and_get (x_count => x_message_count
3901: ,p_encoded => fnd_api.g_false
3902: ,x_data => x_message_list);
3903: x_return_status := fnd_api.g_ret_sts_unexp_error;
3904: END terminate_batch;
3905:
3906: /*************************************************************************/
3907: PROCEDURE unrelease_batch (

Line 3910: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

3906: /*************************************************************************/
3907: PROCEDURE unrelease_batch (
3908: p_validation_level IN NUMBER
3909: := gme_common_pvt.g_max_errors
3910: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3911: ,x_message_count OUT NOCOPY NUMBER
3912: ,x_message_list OUT NOCOPY VARCHAR2
3913: ,x_return_status OUT NOCOPY VARCHAR2
3914: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 3938: x_return_status := fnd_api.g_ret_sts_error;

3934: gme_common_pvt.g_setup_done :=
3935: gme_common_pvt.setup (p_batch_header_rec.organization_id);
3936:
3937: IF NOT gme_common_pvt.g_setup_done THEN
3938: x_return_status := fnd_api.g_ret_sts_error;
3939: RAISE setup_failure;
3940: END IF;
3941: END IF;
3942:

Line 3944: x_return_status := fnd_api.g_ret_sts_success;

3940: END IF;
3941: END IF;
3942:
3943: /* Set the return status to success initially */
3944: x_return_status := fnd_api.g_ret_sts_success;
3945:
3946: -- Initialize message list and count if needed
3947: IF p_init_msg_list = fnd_api.g_true THEN
3948: fnd_msg_pub.initialize;

Line 3947: IF p_init_msg_list = fnd_api.g_true THEN

3943: /* Set the return status to success initially */
3944: x_return_status := fnd_api.g_ret_sts_success;
3945:
3946: -- Initialize message list and count if needed
3947: IF p_init_msg_list = fnd_api.g_true THEN
3948: fnd_msg_pub.initialize;
3949: gme_common_pvt.g_error_count := 0;
3950: END IF;
3951:

Line 3960: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3956: ,p_create_resv_pend_lots => p_create_resv_pend_lots
3957: ,x_batch_header_rec => x_batch_header_rec
3958: ,x_return_status => x_return_status);
3959:
3960: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3961: RAISE batch_unrelease_failure;
3962: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
3963:
3964: gme_common_pvt.log_message ('GME_API_BATCH_UNRELEASED');

Line 3962: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

3958: ,x_return_status => x_return_status);
3959:
3960: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3961: RAISE batch_unrelease_failure;
3962: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
3963:
3964: gme_common_pvt.log_message ('GME_API_BATCH_UNRELEASED');
3965:
3966: gme_common_pvt.count_and_get (x_count => x_message_count

Line 3967: ,p_encoded => fnd_api.g_false

3963:
3964: gme_common_pvt.log_message ('GME_API_BATCH_UNRELEASED');
3965:
3966: gme_common_pvt.count_and_get (x_count => x_message_count
3967: ,p_encoded => fnd_api.g_false
3968: ,x_data => x_message_list);
3969:
3970: IF (g_debug IS NOT NULL) THEN
3971: gme_debug.put_line ( 'Completed '

Line 3985: ,p_encoded => fnd_api.g_false

3981: WHEN batch_unrelease_failure THEN
3982: ROLLBACK TO SAVEPOINT unrelease_batch;
3983: x_batch_header_rec := NULL;
3984: gme_common_pvt.count_and_get (x_count => x_message_count
3985: ,p_encoded => fnd_api.g_false
3986: ,x_data => x_message_list);
3987: WHEN setup_failure THEN
3988: ROLLBACK TO SAVEPOINT unrelease_batch;
3989: x_batch_header_rec := NULL;

Line 3991: ,p_encoded => fnd_api.g_false

3987: WHEN setup_failure THEN
3988: ROLLBACK TO SAVEPOINT unrelease_batch;
3989: x_batch_header_rec := NULL;
3990: gme_common_pvt.count_and_get (x_count => x_message_count
3991: ,p_encoded => fnd_api.g_false
3992: ,x_data => x_message_list);
3993: x_return_status := fnd_api.g_ret_sts_error;
3994: WHEN OTHERS THEN
3995: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 3993: x_return_status := fnd_api.g_ret_sts_error;

3989: x_batch_header_rec := NULL;
3990: gme_common_pvt.count_and_get (x_count => x_message_count
3991: ,p_encoded => fnd_api.g_false
3992: ,x_data => x_message_list);
3993: x_return_status := fnd_api.g_ret_sts_error;
3994: WHEN OTHERS THEN
3995: IF g_debug <= gme_debug.g_log_unexpected THEN
3996: gme_debug.put_line ( 'When others exception in '
3997: || g_pkg_name

Line 4007: ,p_encoded => fnd_api.g_false

4003:
4004: ROLLBACK TO SAVEPOINT unrelease_batch;
4005: x_batch_header_rec := NULL;
4006: gme_common_pvt.count_and_get (x_count => x_message_count
4007: ,p_encoded => fnd_api.g_false
4008: ,x_data => x_message_list);
4009: x_return_status := fnd_api.g_ret_sts_unexp_error;
4010: END unrelease_batch;
4011:

Line 4009: x_return_status := fnd_api.g_ret_sts_unexp_error;

4005: x_batch_header_rec := NULL;
4006: gme_common_pvt.count_and_get (x_count => x_message_count
4007: ,p_encoded => fnd_api.g_false
4008: ,x_data => x_message_list);
4009: x_return_status := fnd_api.g_ret_sts_unexp_error;
4010: END unrelease_batch;
4011:
4012: /*************************************************************************/
4013: PROCEDURE unrelease_step (

Line 4016: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

4012: /*************************************************************************/
4013: PROCEDURE unrelease_step (
4014: p_validation_level IN NUMBER
4015: := gme_common_pvt.g_max_errors
4016: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4017: ,x_message_count OUT NOCOPY NUMBER
4018: ,x_message_list OUT NOCOPY VARCHAR2
4019: ,x_return_status OUT NOCOPY VARCHAR2
4020: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE

Line 4045: x_return_status := fnd_api.g_ret_sts_error;

4041: gme_common_pvt.g_setup_done :=
4042: gme_common_pvt.setup (p_batch_header_rec.organization_id);
4043:
4044: IF NOT gme_common_pvt.g_setup_done THEN
4045: x_return_status := fnd_api.g_ret_sts_error;
4046: RAISE setup_failure;
4047: END IF;
4048: END IF;
4049:

Line 4051: x_return_status := fnd_api.g_ret_sts_success;

4047: END IF;
4048: END IF;
4049:
4050: /* Set the return status to success initially */
4051: x_return_status := fnd_api.g_ret_sts_success;
4052:
4053: -- Initialize message list and count if needed
4054: IF p_init_msg_list = fnd_api.g_true THEN
4055: fnd_msg_pub.initialize;

Line 4054: IF p_init_msg_list = fnd_api.g_true THEN

4050: /* Set the return status to success initially */
4051: x_return_status := fnd_api.g_ret_sts_success;
4052:
4053: -- Initialize message list and count if needed
4054: IF p_init_msg_list = fnd_api.g_true THEN
4055: fnd_msg_pub.initialize;
4056: gme_common_pvt.g_error_count := 0;
4057: END IF;
4058:

Line 4069: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4065: ,p_from_unrelease_batch => 0
4066: ,x_batch_step_rec => x_batch_step_rec
4067: ,x_return_status => x_return_status);
4068:
4069: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4070: RAISE step_unrelease_failure;
4071: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
4072:
4073:

Line 4071: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

4067: ,x_return_status => x_return_status);
4068:
4069: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4070: RAISE step_unrelease_failure;
4071: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
4072:
4073:
4074: gme_common_pvt.log_message ('GME_BATCH_STEP_UNRELEASED');
4075:

Line 4077: ,p_encoded => fnd_api.g_false

4073:
4074: gme_common_pvt.log_message ('GME_BATCH_STEP_UNRELEASED');
4075:
4076: gme_common_pvt.count_and_get (x_count => x_message_count
4077: ,p_encoded => fnd_api.g_false
4078: ,x_data => x_message_list);
4079:
4080: IF (g_debug IS NOT NULL) THEN
4081: gme_debug.put_line ( 'Completed '

Line 4095: ,p_encoded => fnd_api.g_false

4091: WHEN step_unrelease_failure THEN
4092: ROLLBACK TO SAVEPOINT unrelease_step;
4093: x_batch_step_rec := NULL;
4094: gme_common_pvt.count_and_get (x_count => x_message_count
4095: ,p_encoded => fnd_api.g_false
4096: ,x_data => x_message_list);
4097: WHEN setup_failure THEN
4098: ROLLBACK TO SAVEPOINT unrelease_step;
4099: x_batch_step_rec := NULL;

Line 4101: ,p_encoded => fnd_api.g_false

4097: WHEN setup_failure THEN
4098: ROLLBACK TO SAVEPOINT unrelease_step;
4099: x_batch_step_rec := NULL;
4100: gme_common_pvt.count_and_get (x_count => x_message_count
4101: ,p_encoded => fnd_api.g_false
4102: ,x_data => x_message_list);
4103: x_return_status := fnd_api.g_ret_sts_error;
4104: WHEN OTHERS THEN
4105: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 4103: x_return_status := fnd_api.g_ret_sts_error;

4099: x_batch_step_rec := NULL;
4100: gme_common_pvt.count_and_get (x_count => x_message_count
4101: ,p_encoded => fnd_api.g_false
4102: ,x_data => x_message_list);
4103: x_return_status := fnd_api.g_ret_sts_error;
4104: WHEN OTHERS THEN
4105: IF g_debug <= gme_debug.g_log_unexpected THEN
4106: gme_debug.put_line ( 'When others exception in '
4107: || g_pkg_name

Line 4117: ,p_encoded => fnd_api.g_false

4113:
4114: ROLLBACK TO SAVEPOINT unrelease_step;
4115: x_batch_step_rec := NULL;
4116: gme_common_pvt.count_and_get (x_count => x_message_count
4117: ,p_encoded => fnd_api.g_false
4118: ,x_data => x_message_list);
4119: x_return_status := fnd_api.g_ret_sts_unexp_error;
4120: END unrelease_step;
4121:

Line 4119: x_return_status := fnd_api.g_ret_sts_unexp_error;

4115: x_batch_step_rec := NULL;
4116: gme_common_pvt.count_and_get (x_count => x_message_count
4117: ,p_encoded => fnd_api.g_false
4118: ,x_data => x_message_list);
4119: x_return_status := fnd_api.g_ret_sts_unexp_error;
4120: END unrelease_step;
4121:
4122: /*************************************************************************/
4123: PROCEDURE auto_detail_line (

Line 4124: p_init_msg_list IN VARCHAR2 := fnd_api.g_false

4120: END unrelease_step;
4121:
4122: /*************************************************************************/
4123: PROCEDURE auto_detail_line (
4124: p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4125: ,x_message_count OUT NOCOPY NUMBER
4126: ,x_message_list OUT NOCOPY VARCHAR2
4127: ,x_return_status OUT NOCOPY VARCHAR2
4128: ,p_material_detail_rec IN gme_material_details%ROWTYPE)

Line 4151: x_return_status := fnd_api.g_ret_sts_error;

4147: gme_common_pvt.g_setup_done :=
4148: gme_common_pvt.setup (p_material_detail_rec.organization_id);
4149:
4150: IF NOT gme_common_pvt.g_setup_done THEN
4151: x_return_status := fnd_api.g_ret_sts_error;
4152: RAISE setup_failure;
4153: END IF;
4154: END IF;
4155:

Line 4157: IF p_init_msg_list = fnd_api.g_true THEN

4153: END IF;
4154: END IF;
4155:
4156: -- Initialize message list and count if needed
4157: IF p_init_msg_list = fnd_api.g_true THEN
4158: fnd_msg_pub.initialize;
4159: gme_common_pvt.g_error_count := 0;
4160: END IF;
4161:

Line 4163: x_return_status := fnd_api.g_ret_sts_success;

4159: gme_common_pvt.g_error_count := 0;
4160: END IF;
4161:
4162: /* Set the return status to success initially */
4163: x_return_status := fnd_api.g_ret_sts_success;
4164: /* Set the timestamp */
4165: gme_common_pvt.set_timestamp;
4166: gme_reservations_pvt.auto_detail_line
4167: (p_material_details_rec => p_material_detail_rec

Line 4170: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4166: gme_reservations_pvt.auto_detail_line
4167: (p_material_details_rec => p_material_detail_rec
4168: ,x_return_status => x_return_status);
4169:
4170: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4171: RAISE auto_detail_failure;
4172: END IF;
4173:
4174: gme_common_pvt.log_message ('GME_BATCH_AUTO_DETAIL_LINE');

Line 4186: ,p_encoded => fnd_api.g_false

4182: EXCEPTION
4183: WHEN auto_detail_failure OR setup_failure THEN
4184: ROLLBACK TO SAVEPOINT auto_detail_line;
4185: gme_common_pvt.count_and_get (x_count => x_message_count
4186: ,p_encoded => fnd_api.g_false
4187: ,x_data => x_message_list);
4188: WHEN OTHERS THEN
4189: IF g_debug <= gme_debug.g_log_unexpected THEN
4190: gme_debug.put_line ( 'When others exception in '

Line 4201: ,p_encoded => fnd_api.g_false

4197:
4198: ROLLBACK TO SAVEPOINT auto_detail_line;
4199: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4200: gme_common_pvt.count_and_get (x_count => x_message_count
4201: ,p_encoded => fnd_api.g_false
4202: ,x_data => x_message_list);
4203: x_return_status := fnd_api.g_ret_sts_unexp_error;
4204: END auto_detail_line;
4205: /*************************************************************************/

Line 4203: x_return_status := fnd_api.g_ret_sts_unexp_error;

4199: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4200: gme_common_pvt.count_and_get (x_count => x_message_count
4201: ,p_encoded => fnd_api.g_false
4202: ,x_data => x_message_list);
4203: x_return_status := fnd_api.g_ret_sts_unexp_error;
4204: END auto_detail_line;
4205: /*************************************************************************/
4206: PROCEDURE auto_detail_batch(
4207: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

Line 4207: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

4203: x_return_status := fnd_api.g_ret_sts_unexp_error;
4204: END auto_detail_line;
4205: /*************************************************************************/
4206: PROCEDURE auto_detail_batch(
4207: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
4208: x_message_count OUT NOCOPY NUMBER,
4209: x_message_list OUT NOCOPY VARCHAR2,
4210: x_return_status OUT NOCOPY VARCHAR2,
4211: p_batch_rec IN gme_batch_header%ROWTYPE) IS

Line 4235: x_return_status := fnd_api.g_ret_sts_error;

4231: gme_common_pvt.g_setup_done :=
4232: gme_common_pvt.setup (p_batch_rec.organization_id);
4233:
4234: IF NOT gme_common_pvt.g_setup_done THEN
4235: x_return_status := fnd_api.g_ret_sts_error;
4236: RAISE setup_failure;
4237: END IF;
4238: END IF;
4239:

Line 4241: IF p_init_msg_list = fnd_api.g_true THEN

4237: END IF;
4238: END IF;
4239:
4240: -- Initialize message list and count if needed
4241: IF p_init_msg_list = fnd_api.g_true THEN
4242: fnd_msg_pub.initialize;
4243: gme_common_pvt.g_error_count := 0;
4244: END IF;
4245:

Line 4247: x_return_status := fnd_api.g_ret_sts_success;

4243: gme_common_pvt.g_error_count := 0;
4244: END IF;
4245:
4246: /* Set the return status to success initially */
4247: x_return_status := fnd_api.g_ret_sts_success;
4248:
4249: /* Set the timestamp */
4250: gme_common_pvt.set_timestamp;
4251:

Line 4255: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4251:
4252: gme_reservations_pvt.auto_detail_batch(p_batch_rec => p_batch_rec
4253: ,x_return_status => x_return_status);
4254:
4255: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4256: RAISE auto_detail_failure;
4257: END IF;
4258: gme_common_pvt.log_message ('GME_BATCH_AUTO_DETAIL_BATCH');
4259: IF (g_debug <= gme_debug.g_log_procedure) THEN

Line 4269: p_encoded => fnd_api.g_false,

4265: EXCEPTION
4266: WHEN auto_detail_failure OR setup_failure THEN
4267: ROLLBACK TO SAVEPOINT auto_detail_batch;
4268: gme_common_pvt.count_and_get (x_count => x_message_count,
4269: p_encoded => fnd_api.g_false,
4270: x_data => x_message_list);
4271: WHEN OTHERS THEN
4272: IF g_debug <= gme_debug.g_log_unexpected THEN
4273: gme_debug.put_line ( 'When others exception in '

Line 4284: p_encoded => fnd_api.g_false,

4280:
4281: ROLLBACK TO SAVEPOINT auto_detail_batch;
4282: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4283: gme_common_pvt.count_and_get (x_count => x_message_count,
4284: p_encoded => fnd_api.g_false,
4285: x_data => x_message_list);
4286: x_return_status := fnd_api.g_ret_sts_unexp_error;
4287: END auto_detail_batch;
4288:

Line 4286: x_return_status := fnd_api.g_ret_sts_unexp_error;

4282: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4283: gme_common_pvt.count_and_get (x_count => x_message_count,
4284: p_encoded => fnd_api.g_false,
4285: x_data => x_message_list);
4286: x_return_status := fnd_api.g_ret_sts_unexp_error;
4287: END auto_detail_batch;
4288:
4289: /*************************************************************************/
4290: PROCEDURE create_pending_product_lot (

Line 4293: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

4289: /*************************************************************************/
4290: PROCEDURE create_pending_product_lot (
4291: p_validation_level IN NUMBER
4292: := gme_common_pvt.g_max_errors
4293: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4294: ,x_message_count OUT NOCOPY NUMBER
4295: ,x_message_list OUT NOCOPY VARCHAR2
4296: ,x_return_status OUT NOCOPY VARCHAR2
4297: ,p_org_id IN NUMBER

Line 4321: x_return_status := fnd_api.g_ret_sts_error;

4317: gme_common_pvt.g_setup_done :=
4318: gme_common_pvt.setup (p_org_id);
4319:
4320: IF NOT gme_common_pvt.g_setup_done THEN
4321: x_return_status := fnd_api.g_ret_sts_error;
4322: RAISE setup_failure;
4323: END IF;
4324: END IF;
4325:

Line 4327: x_return_status := fnd_api.g_ret_sts_success;

4323: END IF;
4324: END IF;
4325:
4326: /* Set the return status to success initially */
4327: x_return_status := fnd_api.g_ret_sts_success;
4328:
4329: -- Initialize message list and count if needed
4330: IF p_init_msg_list = fnd_api.g_true THEN
4331: fnd_msg_pub.initialize;

Line 4330: IF p_init_msg_list = fnd_api.g_true THEN

4326: /* Set the return status to success initially */
4327: x_return_status := fnd_api.g_ret_sts_success;
4328:
4329: -- Initialize message list and count if needed
4330: IF p_init_msg_list = fnd_api.g_true THEN
4331: fnd_msg_pub.initialize;
4332: gme_common_pvt.g_error_count := 0;
4333: END IF;
4334:

Line 4341: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4337: (p_pending_product_lots_rec => p_pending_product_lots_rec
4338: ,x_pending_product_lots_rec => x_pending_product_lots_rec
4339: ,x_return_status => x_return_status);
4340:
4341: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4342: RAISE create_pp_lot_failure;
4343: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
4344:
4345:

Line 4343: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

4339: ,x_return_status => x_return_status);
4340:
4341: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4342: RAISE create_pp_lot_failure;
4343: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
4344:
4345:
4346: gme_common_pvt.log_message ('GME_API_PP_LOT_CREATED');
4347:

Line 4349: ,p_encoded => fnd_api.g_false

4345:
4346: gme_common_pvt.log_message ('GME_API_PP_LOT_CREATED');
4347:
4348: gme_common_pvt.count_and_get (x_count => x_message_count
4349: ,p_encoded => fnd_api.g_false
4350: ,x_data => x_message_list);
4351:
4352: IF (g_debug IS NOT NULL) THEN
4353: gme_debug.put_line ( 'Completed '

Line 4367: ,p_encoded => fnd_api.g_false

4363: WHEN create_pp_lot_failure THEN
4364: ROLLBACK TO SAVEPOINT create_pp_lot;
4365: x_pending_product_lots_rec := NULL;
4366: gme_common_pvt.count_and_get (x_count => x_message_count
4367: ,p_encoded => fnd_api.g_false
4368: ,x_data => x_message_list);
4369: WHEN setup_failure THEN
4370: ROLLBACK TO SAVEPOINT create_pp_lot;
4371: x_pending_product_lots_rec := NULL;

Line 4373: ,p_encoded => fnd_api.g_false

4369: WHEN setup_failure THEN
4370: ROLLBACK TO SAVEPOINT create_pp_lot;
4371: x_pending_product_lots_rec := NULL;
4372: gme_common_pvt.count_and_get (x_count => x_message_count
4373: ,p_encoded => fnd_api.g_false
4374: ,x_data => x_message_list);
4375: x_return_status := fnd_api.g_ret_sts_error;
4376: WHEN OTHERS THEN
4377: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 4375: x_return_status := fnd_api.g_ret_sts_error;

4371: x_pending_product_lots_rec := NULL;
4372: gme_common_pvt.count_and_get (x_count => x_message_count
4373: ,p_encoded => fnd_api.g_false
4374: ,x_data => x_message_list);
4375: x_return_status := fnd_api.g_ret_sts_error;
4376: WHEN OTHERS THEN
4377: IF g_debug <= gme_debug.g_log_unexpected THEN
4378: gme_debug.put_line ( 'When others exception in '
4379: || g_pkg_name

Line 4389: ,p_encoded => fnd_api.g_false

4385:
4386: ROLLBACK TO SAVEPOINT create_pp_lot;
4387: x_pending_product_lots_rec := NULL;
4388: gme_common_pvt.count_and_get (x_count => x_message_count
4389: ,p_encoded => fnd_api.g_false
4390: ,x_data => x_message_list);
4391: x_return_status := fnd_api.g_ret_sts_unexp_error;
4392: END create_pending_product_lot;
4393:

Line 4391: x_return_status := fnd_api.g_ret_sts_unexp_error;

4387: x_pending_product_lots_rec := NULL;
4388: gme_common_pvt.count_and_get (x_count => x_message_count
4389: ,p_encoded => fnd_api.g_false
4390: ,x_data => x_message_list);
4391: x_return_status := fnd_api.g_ret_sts_unexp_error;
4392: END create_pending_product_lot;
4393:
4394: PROCEDURE update_pending_product_lot (
4395: p_validation_level IN NUMBER

Line 4397: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

4393:
4394: PROCEDURE update_pending_product_lot (
4395: p_validation_level IN NUMBER
4396: := gme_common_pvt.g_max_errors
4397: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4398: ,x_message_count OUT NOCOPY NUMBER
4399: ,x_message_list OUT NOCOPY VARCHAR2
4400: ,x_return_status OUT NOCOPY VARCHAR2
4401: ,p_org_id IN NUMBER

Line 4425: x_return_status := fnd_api.g_ret_sts_error;

4421: gme_common_pvt.g_setup_done :=
4422: gme_common_pvt.setup (p_org_id);
4423:
4424: IF NOT gme_common_pvt.g_setup_done THEN
4425: x_return_status := fnd_api.g_ret_sts_error;
4426: RAISE setup_failure;
4427: END IF;
4428: END IF;
4429:

Line 4431: x_return_status := fnd_api.g_ret_sts_success;

4427: END IF;
4428: END IF;
4429:
4430: /* Set the return status to success initially */
4431: x_return_status := fnd_api.g_ret_sts_success;
4432:
4433: -- Initialize message list and count if needed
4434: IF p_init_msg_list = fnd_api.g_true THEN
4435: fnd_msg_pub.initialize;

Line 4434: IF p_init_msg_list = fnd_api.g_true THEN

4430: /* Set the return status to success initially */
4431: x_return_status := fnd_api.g_ret_sts_success;
4432:
4433: -- Initialize message list and count if needed
4434: IF p_init_msg_list = fnd_api.g_true THEN
4435: fnd_msg_pub.initialize;
4436: gme_common_pvt.g_error_count := 0;
4437: END IF;
4438:

Line 4445: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4441: (p_pending_product_lots_rec => p_pending_product_lots_rec
4442: ,x_pending_product_lots_rec => x_pending_product_lots_rec
4443: ,x_return_status => x_return_status);
4444:
4445: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4446: RAISE update_pp_lot_failure;
4447: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
4448:
4449:

Line 4447: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

4443: ,x_return_status => x_return_status);
4444:
4445: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4446: RAISE update_pp_lot_failure;
4447: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
4448:
4449:
4450: gme_common_pvt.log_message ('GME_API_PP_LOT_UPDATED');
4451:

Line 4454: ,p_encoded => fnd_api.g_false

4450: gme_common_pvt.log_message ('GME_API_PP_LOT_UPDATED');
4451:
4452:
4453: gme_common_pvt.count_and_get (x_count => x_message_count
4454: ,p_encoded => fnd_api.g_false
4455: ,x_data => x_message_list);
4456:
4457: IF (g_debug IS NOT NULL) THEN
4458: gme_debug.put_line ( 'Completed '

Line 4472: ,p_encoded => fnd_api.g_false

4468: WHEN update_pp_lot_failure THEN
4469: ROLLBACK TO SAVEPOINT update_pp_lot;
4470: x_pending_product_lots_rec := NULL;
4471: gme_common_pvt.count_and_get (x_count => x_message_count
4472: ,p_encoded => fnd_api.g_false
4473: ,x_data => x_message_list);
4474: WHEN setup_failure THEN
4475: ROLLBACK TO SAVEPOINT update_pp_lot;
4476: x_pending_product_lots_rec := NULL;

Line 4478: ,p_encoded => fnd_api.g_false

4474: WHEN setup_failure THEN
4475: ROLLBACK TO SAVEPOINT update_pp_lot;
4476: x_pending_product_lots_rec := NULL;
4477: gme_common_pvt.count_and_get (x_count => x_message_count
4478: ,p_encoded => fnd_api.g_false
4479: ,x_data => x_message_list);
4480: x_return_status := fnd_api.g_ret_sts_error;
4481: WHEN OTHERS THEN
4482: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 4480: x_return_status := fnd_api.g_ret_sts_error;

4476: x_pending_product_lots_rec := NULL;
4477: gme_common_pvt.count_and_get (x_count => x_message_count
4478: ,p_encoded => fnd_api.g_false
4479: ,x_data => x_message_list);
4480: x_return_status := fnd_api.g_ret_sts_error;
4481: WHEN OTHERS THEN
4482: IF g_debug <= gme_debug.g_log_unexpected THEN
4483: gme_debug.put_line ( 'When others exception in '
4484: || g_pkg_name

Line 4494: ,p_encoded => fnd_api.g_false

4490:
4491: ROLLBACK TO SAVEPOINT update_pp_lot;
4492: x_pending_product_lots_rec := NULL;
4493: gme_common_pvt.count_and_get (x_count => x_message_count
4494: ,p_encoded => fnd_api.g_false
4495: ,x_data => x_message_list);
4496: x_return_status := fnd_api.g_ret_sts_unexp_error;
4497: END update_pending_product_lot;
4498:

Line 4496: x_return_status := fnd_api.g_ret_sts_unexp_error;

4492: x_pending_product_lots_rec := NULL;
4493: gme_common_pvt.count_and_get (x_count => x_message_count
4494: ,p_encoded => fnd_api.g_false
4495: ,x_data => x_message_list);
4496: x_return_status := fnd_api.g_ret_sts_unexp_error;
4497: END update_pending_product_lot;
4498:
4499: PROCEDURE delete_pending_product_lot (
4500: p_validation_level IN NUMBER

Line 4502: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false

4498:
4499: PROCEDURE delete_pending_product_lot (
4500: p_validation_level IN NUMBER
4501: := gme_common_pvt.g_max_errors
4502: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4503: ,x_message_count OUT NOCOPY NUMBER
4504: ,x_message_list OUT NOCOPY VARCHAR2
4505: ,x_return_status OUT NOCOPY VARCHAR2
4506: ,p_org_id IN NUMBER

Line 4529: x_return_status := fnd_api.g_ret_sts_error;

4525: gme_common_pvt.g_setup_done :=
4526: gme_common_pvt.setup (p_org_id);
4527:
4528: IF NOT gme_common_pvt.g_setup_done THEN
4529: x_return_status := fnd_api.g_ret_sts_error;
4530: RAISE setup_failure;
4531: END IF;
4532: END IF;
4533:

Line 4535: x_return_status := fnd_api.g_ret_sts_success;

4531: END IF;
4532: END IF;
4533:
4534: /* Set the return status to success initially */
4535: x_return_status := fnd_api.g_ret_sts_success;
4536:
4537: -- Initialize message list and count if needed
4538: IF p_init_msg_list = fnd_api.g_true THEN
4539: fnd_msg_pub.initialize;

Line 4538: IF p_init_msg_list = fnd_api.g_true THEN

4534: /* Set the return status to success initially */
4535: x_return_status := fnd_api.g_ret_sts_success;
4536:
4537: -- Initialize message list and count if needed
4538: IF p_init_msg_list = fnd_api.g_true THEN
4539: fnd_msg_pub.initialize;
4540: gme_common_pvt.g_error_count := 0;
4541: END IF;
4542:

Line 4548: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4544: gme_pending_product_lots_pvt.delete_pending_product_lot
4545: (p_pending_product_lots_rec => p_pending_product_lots_rec
4546: ,x_return_status => x_return_status);
4547:
4548: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4549: RAISE delete_pp_lot_failure;
4550: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
4551:
4552: gme_common_pvt.log_message ('GME_API_PP_LOT_DELETED');

Line 4550: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */

4546: ,x_return_status => x_return_status);
4547:
4548: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4549: RAISE delete_pp_lot_failure;
4550: END IF; /* IF x_return_status <> FND_API.G_RET_STS_SUCCESS */
4551:
4552: gme_common_pvt.log_message ('GME_API_PP_LOT_DELETED');
4553:
4554:

Line 4556: ,p_encoded => fnd_api.g_false

4552: gme_common_pvt.log_message ('GME_API_PP_LOT_DELETED');
4553:
4554:
4555: gme_common_pvt.count_and_get (x_count => x_message_count
4556: ,p_encoded => fnd_api.g_false
4557: ,x_data => x_message_list);
4558:
4559: IF (g_debug IS NOT NULL) THEN
4560: gme_debug.put_line ( 'Completed '

Line 4573: ,p_encoded => fnd_api.g_false

4569: EXCEPTION
4570: WHEN delete_pp_lot_failure THEN
4571: ROLLBACK TO SAVEPOINT delete_pp_lot;
4572: gme_common_pvt.count_and_get (x_count => x_message_count
4573: ,p_encoded => fnd_api.g_false
4574: ,x_data => x_message_list);
4575: WHEN setup_failure THEN
4576: ROLLBACK TO SAVEPOINT delete_pp_lot;
4577: gme_common_pvt.count_and_get (x_count => x_message_count

Line 4578: ,p_encoded => fnd_api.g_false

4574: ,x_data => x_message_list);
4575: WHEN setup_failure THEN
4576: ROLLBACK TO SAVEPOINT delete_pp_lot;
4577: gme_common_pvt.count_and_get (x_count => x_message_count
4578: ,p_encoded => fnd_api.g_false
4579: ,x_data => x_message_list);
4580: x_return_status := fnd_api.g_ret_sts_error;
4581: WHEN OTHERS THEN
4582: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 4580: x_return_status := fnd_api.g_ret_sts_error;

4576: ROLLBACK TO SAVEPOINT delete_pp_lot;
4577: gme_common_pvt.count_and_get (x_count => x_message_count
4578: ,p_encoded => fnd_api.g_false
4579: ,x_data => x_message_list);
4580: x_return_status := fnd_api.g_ret_sts_error;
4581: WHEN OTHERS THEN
4582: IF g_debug <= gme_debug.g_log_unexpected THEN
4583: gme_debug.put_line ( 'When others exception in '
4584: || g_pkg_name

Line 4593: ,p_encoded => fnd_api.g_false

4589: END IF;
4590:
4591: ROLLBACK TO SAVEPOINT delete_pp_lot;
4592: gme_common_pvt.count_and_get (x_count => x_message_count
4593: ,p_encoded => fnd_api.g_false
4594: ,x_data => x_message_list);
4595: x_return_status := fnd_api.g_ret_sts_unexp_error;
4596: END delete_pending_product_lot;
4597:

Line 4595: x_return_status := fnd_api.g_ret_sts_unexp_error;

4591: ROLLBACK TO SAVEPOINT delete_pp_lot;
4592: gme_common_pvt.count_and_get (x_count => x_message_count
4593: ,p_encoded => fnd_api.g_false
4594: ,x_data => x_message_list);
4595: x_return_status := fnd_api.g_ret_sts_unexp_error;
4596: END delete_pending_product_lot;
4597:
4598: END gme_api_main;