DBA Data[Home] [Help]

APPS.GME_API_PUB dependencies on FND_API

Line 24: ,p_encoded => fnd_api.g_false

20: gme_debug.put_line(g_pkg_name||'.'||p_api_name||':'||'When others exception:'||SQLERRM);
21: END IF;
22: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
23: gme_common_pvt.count_and_get (x_count => x_message_count
24: ,p_encoded => fnd_api.g_false
25: ,x_data => x_message_list);
26: x_return_status := fnd_api.g_ret_sts_unexp_error;
27:
28: END gme_when_others ;

Line 26: x_return_status := fnd_api.g_ret_sts_unexp_error;

22: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
23: gme_common_pvt.count_and_get (x_count => x_message_count
24: ,p_encoded => fnd_api.g_false
25: ,x_data => x_message_list);
26: x_return_status := fnd_api.g_ret_sts_unexp_error;
27:
28: END gme_when_others ;
29:
30:

Line 36: ,p_commit IN VARCHAR2 := fnd_api.g_false

32: /* Bug 5255959 added p_clear_qty_cache parameter */
33: PROCEDURE save_batch (
34: p_header_id IN NUMBER DEFAULT NULL
35: ,p_table IN NUMBER DEFAULT NULL
36: ,p_commit IN VARCHAR2 := fnd_api.g_false
37: ,x_return_status OUT NOCOPY VARCHAR2
38: --Bug#5584699 Changed variable from boolean to varchar2
39: ,p_clear_qty_cache IN VARCHAR2 := FND_API.g_true)
40: --,p_clear_qty_cache IN BOOLEAN DEFAULT TRUE)

Line 39: ,p_clear_qty_cache IN VARCHAR2 := FND_API.g_true)

35: ,p_table IN NUMBER DEFAULT NULL
36: ,p_commit IN VARCHAR2 := fnd_api.g_false
37: ,x_return_status OUT NOCOPY VARCHAR2
38: --Bug#5584699 Changed variable from boolean to varchar2
39: ,p_clear_qty_cache IN VARCHAR2 := FND_API.g_true)
40: --,p_clear_qty_cache IN BOOLEAN DEFAULT TRUE)
41: IS
42: l_api_name CONSTANT VARCHAR2 (30) := 'SAVE_BATCH';
43: l_header_id NUMBER;

Line 66: x_return_status := fnd_api.g_ret_sts_success;

62: gme_debug.put_line ('p_header_id = ' || p_header_id);
63: gme_debug.put_line ('p_table = ' || p_table);
64: END IF;
65:
66: x_return_status := fnd_api.g_ret_sts_success;
67:
68: FOR header_row IN header_cursor LOOP
69: -- Check that there is one and only one primary resource
70: IF gme_common_pvt.g_check_primary_rsrc = 1

Line 71: AND p_commit = fnd_api.g_true THEN

67:
68: FOR header_row IN header_cursor LOOP
69: -- Check that there is one and only one primary resource
70: IF gme_common_pvt.g_check_primary_rsrc = 1
71: AND p_commit = fnd_api.g_true THEN
72: gme_resource_engine_pvt.check_primary_resource
73: (p_batch_id => header_row.batch_id
74: ,p_batchstep_id => NULL
75: ,x_return_status => x_return_status);

Line 77: IF x_return_status <> fnd_api.g_ret_sts_success THEN

73: (p_batch_id => header_row.batch_id
74: ,p_batchstep_id => NULL
75: ,x_return_status => x_return_status);
76:
77: IF x_return_status <> fnd_api.g_ret_sts_success THEN
78: RAISE error_save_batch;
79: END IF;
80: END IF; -- IF gme_common_pvt.g_check_primary_rsrc = 1 THEN
81:

Line 86: IF x_return_status <> fnd_api.g_ret_sts_success THEN

82: gme_resource_engine_pvt.consolidate_batch_resources
83: (header_row.batch_id
84: ,x_return_status);
85:
86: IF x_return_status <> fnd_api.g_ret_sts_success THEN
87: RAISE error_save_batch;
88: END IF;
89: END LOOP;
90:

Line 98: ,p_init_msg_list => fnd_api.g_false

94: IF (NVL (l_header_id, 0) <> 0) THEN
95: /* Bug 5255959 added p_clear_qty_cache parameter */
96: gme_transactions_pvt.process_transactions
97: (p_api_version => 2.0
98: ,p_init_msg_list => fnd_api.g_false
99: ,p_commit => fnd_api.g_false
100: ,p_validation_level => fnd_api.g_valid_level_full
101: ,p_table => p_table
102: ,p_header_id => l_header_id

Line 99: ,p_commit => fnd_api.g_false

95: /* Bug 5255959 added p_clear_qty_cache parameter */
96: gme_transactions_pvt.process_transactions
97: (p_api_version => 2.0
98: ,p_init_msg_list => fnd_api.g_false
99: ,p_commit => fnd_api.g_false
100: ,p_validation_level => fnd_api.g_valid_level_full
101: ,p_table => p_table
102: ,p_header_id => l_header_id
103: ,x_return_status => x_return_status

Line 100: ,p_validation_level => fnd_api.g_valid_level_full

96: gme_transactions_pvt.process_transactions
97: (p_api_version => 2.0
98: ,p_init_msg_list => fnd_api.g_false
99: ,p_commit => fnd_api.g_false
100: ,p_validation_level => fnd_api.g_valid_level_full
101: ,p_table => p_table
102: ,p_header_id => l_header_id
103: ,x_return_status => x_return_status
104: ,x_msg_count => l_msg_count

Line 109: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

105: ,x_msg_data => l_msg_data
106: ,x_trans_count => l_trans_count
107: ,p_clear_qty_cache => p_clear_qty_cache);
108:
109: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
110: IF g_debug <= gme_debug.g_log_statement THEN
111: gme_debug.put_line( g_pkg_name
112: || '.'
113: || l_api_name

Line 123: IF p_commit = fnd_api.g_true THEN

119: RAISE error_save_batch;
120: END IF;
121: END IF; /* IF (NVL (l_header_id, 0) <> 0) */
122:
123: IF p_commit = fnd_api.g_true THEN
124: COMMIT;
125: END IF;
126:
127: IF g_debug <= gme_debug.g_log_procedure THEN

Line 133: ,p_encoded => fnd_api.g_false

129: END IF;
130: EXCEPTION
131: WHEN error_save_batch THEN
132: gme_common_pvt.count_and_get (x_count => l_msg_count
133: ,p_encoded => fnd_api.g_false
134: ,x_data => l_msg_data);
135: WHEN OTHERS THEN
136: gme_when_others ( p_api_name => l_api_name
137: ,x_message_count => l_msg_count

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

143: PROCEDURE create_batch (
144: p_api_version IN NUMBER
145: ,p_validation_level IN NUMBER
146: := gme_common_pvt.g_max_errors
147: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
148: ,p_commit IN VARCHAR2 := fnd_api.g_false
149: ,x_message_count OUT NOCOPY NUMBER
150: ,x_message_list OUT NOCOPY VARCHAR2
151: ,x_return_status OUT NOCOPY VARCHAR2

Line 148: ,p_commit IN VARCHAR2 := fnd_api.g_false

144: p_api_version IN NUMBER
145: ,p_validation_level IN NUMBER
146: := gme_common_pvt.g_max_errors
147: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
148: ,p_commit IN VARCHAR2 := fnd_api.g_false
149: ,x_message_count OUT NOCOPY NUMBER
150: ,x_message_list OUT NOCOPY VARCHAR2
151: ,x_return_status OUT NOCOPY VARCHAR2
152: ,p_org_code IN VARCHAR2 := NULL

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

160: ,p_recipe_version IN NUMBER := NULL
161: ,p_product_no IN VARCHAR2 := NULL
162: ,p_item_revision IN VARCHAR2 := NULL
163: ,p_product_id IN NUMBER := NULL
164: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
165: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
166: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
167: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
168: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

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

161: ,p_product_no IN VARCHAR2 := NULL
162: ,p_item_revision IN VARCHAR2 := NULL
163: ,p_product_id IN NUMBER := NULL
164: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
165: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
166: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
167: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
168: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
169: IS

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

162: ,p_item_revision IN VARCHAR2 := NULL
163: ,p_product_id IN NUMBER := NULL
164: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
165: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
166: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
167: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
168: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
169: IS
170: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_BATCH';

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

163: ,p_product_id IN NUMBER := NULL
164: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
165: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
166: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
167: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
168: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
169: IS
170: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_BATCH';
171: l_batch_header gme_batch_header%ROWTYPE;

Line 220: x_return_status := fnd_api.g_ret_sts_success;

216: || l_api_name);
217: END IF;
218:
219: /* Set the return status to success initially */
220: x_return_status := fnd_api.g_ret_sts_success;
221:
222: IF p_init_msg_list = fnd_api.g_true THEN
223: fnd_msg_pub.initialize;
224: END IF;

Line 222: IF p_init_msg_list = fnd_api.g_true THEN

218:
219: /* Set the return status to success initially */
220: x_return_status := fnd_api.g_ret_sts_success;
221:
222: IF p_init_msg_list = fnd_api.g_true THEN
223: fnd_msg_pub.initialize;
224: END IF;
225:
226: IF NOT fnd_api.compatible_api_call (2.0

Line 226: IF NOT fnd_api.compatible_api_call (2.0

222: IF p_init_msg_list = fnd_api.g_true THEN
223: fnd_msg_pub.initialize;
224: END IF;
225:
226: IF NOT fnd_api.compatible_api_call (2.0
227: ,p_api_version
228: ,'create_batch'
229: ,g_pkg_name) THEN
230: RAISE fnd_api.g_exc_error;

Line 230: RAISE fnd_api.g_exc_error;

226: IF NOT fnd_api.compatible_api_call (2.0
227: ,p_api_version
228: ,'create_batch'
229: ,g_pkg_name) THEN
230: RAISE fnd_api.g_exc_error;
231: END IF;
232:
233: l_batch_header := p_batch_header_rec;
234:

Line 238: RAISE fnd_api.g_exc_error;

234:
235: IF (l_batch_header.organization_id IS NULL AND p_org_code IS NULL) THEN
236: fnd_message.set_name ('INV', 'INV_ORG_REQUIRED');
237: fnd_msg_pub.ADD;
238: RAISE fnd_api.g_exc_error;
239: END IF;
240:
241: IF (l_batch_header.batch_type NOT IN
242: (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo) ) THEN

Line 244: RAISE fnd_api.g_exc_error;

240:
241: IF (l_batch_header.batch_type NOT IN
242: (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo) ) THEN
243: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
244: RAISE fnd_api.g_exc_error;
245: END IF;
246:
247: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
248: gme_common_pvt.log_message ('GME_INVALID_FIELD'

Line 247: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

243: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
244: RAISE fnd_api.g_exc_error;
245: END IF;
246:
247: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
248: gme_common_pvt.log_message ('GME_INVALID_FIELD'
249: ,'FIELD'
250: ,'p_contiguity_override');
251: RAISE fnd_api.g_exc_error;

Line 251: RAISE fnd_api.g_exc_error;

247: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
248: gme_common_pvt.log_message ('GME_INVALID_FIELD'
249: ,'FIELD'
250: ,'p_contiguity_override');
251: RAISE fnd_api.g_exc_error;
252: ELSE
253: l_contiguity_override := p_contiguity_override;
254: END IF;
255:

Line 256: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

252: ELSE
253: l_contiguity_override := p_contiguity_override;
254: END IF;
255:
256: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
257: gme_common_pvt.log_message ('GME_INVALID_FIELD'
258: ,'FIELD'
259: ,'p_use_workday_cal');
260: RAISE fnd_api.g_exc_error;

Line 260: RAISE fnd_api.g_exc_error;

256: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
257: gme_common_pvt.log_message ('GME_INVALID_FIELD'
258: ,'FIELD'
259: ,'p_use_workday_cal');
260: RAISE fnd_api.g_exc_error;
261: END IF;
262:
263: IF (p_ignore_qty_below_cap NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
264: gme_common_pvt.log_message ('GME_INVALID_FIELD'

Line 263: IF (p_ignore_qty_below_cap NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

259: ,'p_use_workday_cal');
260: RAISE fnd_api.g_exc_error;
261: END IF;
262:
263: IF (p_ignore_qty_below_cap NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
264: gme_common_pvt.log_message ('GME_INVALID_FIELD'
265: ,'FIELD'
266: ,'p_ignore_qty_below_cap');
267: RAISE fnd_api.g_exc_error;

Line 267: RAISE fnd_api.g_exc_error;

263: IF (p_ignore_qty_below_cap NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
264: gme_common_pvt.log_message ('GME_INVALID_FIELD'
265: ,'FIELD'
266: ,'p_ignore_qty_below_cap');
267: RAISE fnd_api.g_exc_error;
268: END IF;
269:
270: IF (p_creation_mode NOT IN ('INPUT', 'OUTPUT', 'RECIPE', 'PRODUCT') ) THEN
271: gme_common_pvt.log_message ('GME_API_UNSUPPORTED_MODE'

Line 274: RAISE fnd_api.g_exc_error;

270: IF (p_creation_mode NOT IN ('INPUT', 'OUTPUT', 'RECIPE', 'PRODUCT') ) THEN
271: gme_common_pvt.log_message ('GME_API_UNSUPPORTED_MODE'
272: ,'MODE'
273: ,p_creation_mode);
274: RAISE fnd_api.g_exc_error;
275: ELSIF (p_creation_mode IN ('INPUT', 'OUTPUT', 'PRODUCT') ) THEN
276: IF (p_batch_size IS NULL) THEN
277: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
278: ,'FIELD_NAME'

Line 280: RAISE fnd_api.g_exc_error;

276: IF (p_batch_size IS NULL) THEN
277: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
278: ,'FIELD_NAME'
279: ,'p_batch_size');
280: RAISE fnd_api.g_exc_error;
281: ELSIF (p_batch_size < 0) THEN
282: gme_common_pvt.log_message ('GME_INVALID_FIELD'
283: ,'FIELD'
284: ,'p_batch_size');

Line 285: RAISE fnd_api.g_exc_error;

281: ELSIF (p_batch_size < 0) THEN
282: gme_common_pvt.log_message ('GME_INVALID_FIELD'
283: ,'FIELD'
284: ,'p_batch_size');
285: RAISE fnd_api.g_exc_error;
286: END IF;
287:
288: IF (p_batch_size_uom IS NULL) THEN
289: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

Line 292: RAISE fnd_api.g_exc_error;

288: IF (p_batch_size_uom IS NULL) THEN
289: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
290: ,'FIELD_NAME'
291: ,'p_batch_size_uom');
292: RAISE fnd_api.g_exc_error;
293: ELSE
294: OPEN cur_validate_uom (p_batch_size_uom);
295:
296: FETCH cur_validate_uom

Line 304: RAISE fnd_api.g_exc_error;

300: gme_common_pvt.log_message ('GME_INVALID_FIELD'
301: ,'FIELD'
302: ,'p_batch_size_uom');
303: CLOSE cur_validate_uom;
304: RAISE fnd_api.g_exc_error;
305: END IF;
306:
307: CLOSE cur_validate_uom;
308: END IF;

Line 321: RAISE fnd_api.g_exc_error;

317: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
318: ,p_org_code => p_org_code);
319:
320: IF NOT gme_common_pvt.g_setup_done THEN
321: RAISE fnd_api.g_exc_error;
322: ELSE
323: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
324: END IF;
325:

Line 332: RAISE fnd_api.g_exc_error;

328: END IF;
329:
330: IF (gme_common_pvt.g_lab_ind = 0 AND l_batch_header.laboratory_ind = 1) THEN
331: gme_common_pvt.log_message ('GME_NOT_LAB_ORG');
332: RAISE fnd_api.g_exc_error;
333: END IF;
334:
335: IF (gme_common_pvt.g_plant_ind = 0 AND l_batch_header.batch_type = 10) THEN
336: gme_common_pvt.log_message ('GME_FPO_NO_CREATE');

Line 337: RAISE fnd_api.g_exc_error;

333: END IF;
334:
335: IF (gme_common_pvt.g_plant_ind = 0 AND l_batch_header.batch_type = 10) THEN
336: gme_common_pvt.log_message ('GME_FPO_NO_CREATE');
337: RAISE fnd_api.g_exc_error;
338: END IF;
339:
340: IF (gme_common_pvt.g_lab_ind = 1 AND gme_common_pvt.g_plant_ind = 1) THEN
341: IF (l_batch_header.laboratory_ind = 1) THEN

Line 345: l_object_type := fnd_api.g_false;

341: IF (l_batch_header.laboratory_ind = 1) THEN
342: l_object_type := 'L';
343: ELSE
344: IF (l_batch_header.batch_type = gme_common_pvt.g_doc_type_fpo) THEN
345: l_object_type := fnd_api.g_false;
346: ELSE
347: l_object_type := 'P';
348: END IF;
349: END IF;

Line 354: l_object_type := fnd_api.g_false;

350: ELSIF (gme_common_pvt.g_lab_ind = 1) THEN
351: l_object_type := 'L';
352: ELSIF (gme_common_pvt.g_plant_ind = 1) THEN
353: IF (l_batch_header.batch_type = 10) THEN
354: l_object_type := fnd_api.g_false;
355: ELSE
356: l_object_type := 'P';
357: END IF;
358: END IF;

Line 385: RAISE fnd_api.g_exc_error;

381: ELSE
382: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
383: ,'FIELD_NAME'
384: ,'p_product_no or p_product_id');
385: RAISE fnd_api.g_exc_error;
386: END IF;
387: --All error messages will be logged in this procedure itself..
388: gme_material_detail_pvt.validate_item_id(
389: p_org_id => l_batch_header.organization_id

Line 394: IF l_return_status <> fnd_api.g_ret_sts_success THEN

390: ,p_item_id => l_item_id
391: ,x_item_rec => l_item_rec
392: ,x_return_status => l_return_status);
393:
394: IF l_return_status <> fnd_api.g_ret_sts_success THEN
395: RAISE fnd_api.g_exc_error;
396: END IF;
397: --Bug#5256138 End
398: ELSIF p_creation_mode = 'OUTPUT' THEN

Line 395: RAISE fnd_api.g_exc_error;

391: ,x_item_rec => l_item_rec
392: ,x_return_status => l_return_status);
393:
394: IF l_return_status <> fnd_api.g_ret_sts_success THEN
395: RAISE fnd_api.g_exc_error;
396: END IF;
397: --Bug#5256138 End
398: ELSIF p_creation_mode = 'OUTPUT' THEN
399: l_total_output := p_batch_size;

Line 429: IF l_return_status <> fnd_api.g_ret_sts_success THEN

425: ,x_msg_data => l_msg_list
426: ,x_return_code => l_return_code
427: ,x_recipe_validity_out => l_validity_tbl);
428:
429: IF l_return_status <> fnd_api.g_ret_sts_success THEN
430: RAISE fnd_api.g_exc_error;
431: ELSIF l_validity_tbl.COUNT = 0 THEN
432: fnd_message.set_name ('GMD', 'GMD_NO_VLDTY_RLE_CRIT');
433: fnd_msg_pub.ADD;

Line 430: RAISE fnd_api.g_exc_error;

426: ,x_return_code => l_return_code
427: ,x_recipe_validity_out => l_validity_tbl);
428:
429: IF l_return_status <> fnd_api.g_ret_sts_success THEN
430: RAISE fnd_api.g_exc_error;
431: ELSIF l_validity_tbl.COUNT = 0 THEN
432: fnd_message.set_name ('GMD', 'GMD_NO_VLDTY_RLE_CRIT');
433: fnd_msg_pub.ADD;
434: RAISE fnd_api.g_exc_error;

Line 434: RAISE fnd_api.g_exc_error;

430: RAISE fnd_api.g_exc_error;
431: ELSIF l_validity_tbl.COUNT = 0 THEN
432: fnd_message.set_name ('GMD', 'GMD_NO_VLDTY_RLE_CRIT');
433: fnd_msg_pub.ADD;
434: RAISE fnd_api.g_exc_error;
435: ELSE
436: l_batch_header.recipe_validity_rule_id :=
437: l_validity_tbl (1).recipe_validity_rule_id;
438: END IF;

Line 462: RAISE fnd_api.g_exc_error;

458: ,p_object_type => l_object_type
459: ,p_start_date => p_batch_header_rec.plan_start_date
460: ,p_cmplt_date => p_batch_header_rec.plan_cmplt_date
461: ,p_creation_mode => p_creation_mode) ) THEN
462: RAISE fnd_api.g_exc_error;
463: END IF;
464: END IF;
465:
466: IF g_debug <= gme_debug.g_log_statement THEN

Line 473: IF l_use = fnd_api.g_true THEN

469:
470: IF p_use_workday_cal IS NOT NULL THEN
471: l_use := p_use_workday_cal;
472:
473: IF l_use = fnd_api.g_true THEN
474: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
475: IF (p_batch_header_rec.plan_start_date IS NOT NULL) THEN
476: IF NOT gmp_calendar_api.is_working_daytime
477: (1.0

Line 488: RAISE fnd_api.g_exc_error;

484: ('GME_NON_WORKING_TIME'
485: ,'PDATE'
486: ,fnd_date.date_to_displaydt
487: (p_batch_header_rec.plan_start_date) );
488: RAISE fnd_api.g_exc_error;
489: END IF;
490: END IF;
491:
492: IF (p_batch_header_rec.plan_cmplt_date IS NOT NULL) THEN

Line 505: RAISE fnd_api.g_exc_error;

501: ('GME_NON_WORKING_TIME'
502: ,'PDATE'
503: ,TO_CHAR (p_batch_header_rec.plan_cmplt_date
504: ,'DD-MON-YYYY HH24:MI:SS') );
505: RAISE fnd_api.g_exc_error;
506: END IF;
507: END IF;
508:
509: IF p_batch_header_rec.plan_cmplt_date IS NULL

Line 523: RAISE fnd_api.g_exc_error;

519: ('GME_NON_WORKING_TIME'
520: ,'PDATE'
521: ,TO_CHAR (SYSDATE
522: ,'DD-MON-YYYY HH24:MI:SS') );
523: RAISE fnd_api.g_exc_error;
524: END IF;
525: END IF;
526: END IF;
527: END IF;

Line 536: ,p_init_msg_list => fnd_api.g_false

532: END IF;
533:
534: gme_api_main.create_batch
535: (p_validation_level => p_validation_level
536: ,p_init_msg_list => fnd_api.g_false
537: ,x_message_count => x_message_count
538: ,x_message_list => x_message_list
539: ,x_return_status => x_return_status
540: ,p_batch_header_rec => l_batch_header

Line 556: IF ( x_return_status <> fnd_api.g_ret_sts_success

552: ,p_contiguity_override => l_contiguity_override
553: ,p_use_least_cost_validity_rule => p_use_least_cost_validity_rule
554: ,x_exception_material_tbl => x_exception_material_tbl);
555:
556: IF ( x_return_status <> fnd_api.g_ret_sts_success
557: AND x_return_status <> gme_common_pvt.g_inv_short_err) THEN
558: RAISE fnd_api.g_exc_error;
559: END IF;
560:

Line 558: RAISE fnd_api.g_exc_error;

554: ,x_exception_material_tbl => x_exception_material_tbl);
555:
556: IF ( x_return_status <> fnd_api.g_ret_sts_success
557: AND x_return_status <> gme_common_pvt.g_inv_short_err) THEN
558: RAISE fnd_api.g_exc_error;
559: END IF;
560:
561: IF (p_commit = fnd_api.g_true) THEN
562: COMMIT;

Line 561: IF (p_commit = fnd_api.g_true) THEN

557: AND x_return_status <> gme_common_pvt.g_inv_short_err) THEN
558: RAISE fnd_api.g_exc_error;
559: END IF;
560:
561: IF (p_commit = fnd_api.g_true) THEN
562: COMMIT;
563: END IF;
564:
565: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');

Line 567: ,p_encoded => fnd_api.g_false

563: END IF;
564:
565: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
566: gme_common_pvt.count_and_get (x_count => x_message_count
567: ,p_encoded => fnd_api.g_false
568: ,x_data => x_message_list);
569:
570: IF g_debug <= gme_debug.g_log_procedure THEN
571: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '

Line 575: WHEN fnd_api.g_exc_error THEN

571: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '
572: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
573: END IF;
574: EXCEPTION
575: WHEN fnd_api.g_exc_error THEN
576: x_batch_header_rec := NULL;
577: x_return_status := fnd_api.g_ret_sts_error;
578: gme_common_pvt.count_and_get (x_count => x_message_count
579: ,p_encoded => fnd_api.g_false

Line 577: x_return_status := fnd_api.g_ret_sts_error;

573: END IF;
574: EXCEPTION
575: WHEN fnd_api.g_exc_error THEN
576: x_batch_header_rec := NULL;
577: x_return_status := fnd_api.g_ret_sts_error;
578: gme_common_pvt.count_and_get (x_count => x_message_count
579: ,p_encoded => fnd_api.g_false
580: ,x_data => x_message_list);
581: WHEN OTHERS THEN

Line 579: ,p_encoded => fnd_api.g_false

575: WHEN fnd_api.g_exc_error THEN
576: x_batch_header_rec := NULL;
577: x_return_status := fnd_api.g_ret_sts_error;
578: gme_common_pvt.count_and_get (x_count => x_message_count
579: ,p_encoded => fnd_api.g_false
580: ,x_data => x_message_list);
581: WHEN OTHERS THEN
582: x_batch_header_rec := NULL;
583: gme_when_others ( p_api_name => l_api_name

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

590: PROCEDURE create_phantom (
591: p_api_version IN NUMBER
592: ,p_validation_level IN NUMBER
593: := gme_common_pvt.g_max_errors
594: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
595: ,p_commit IN VARCHAR2 := fnd_api.g_false
596: ,x_message_count OUT NOCOPY NUMBER
597: ,x_message_list OUT NOCOPY VARCHAR2
598: ,x_return_status OUT NOCOPY VARCHAR2

Line 595: ,p_commit IN VARCHAR2 := fnd_api.g_false

591: p_api_version IN NUMBER
592: ,p_validation_level IN NUMBER
593: := gme_common_pvt.g_max_errors
594: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
595: ,p_commit IN VARCHAR2 := fnd_api.g_false
596: ,x_message_count OUT NOCOPY NUMBER
597: ,x_message_list OUT NOCOPY VARCHAR2
598: ,x_return_status OUT NOCOPY VARCHAR2
599: ,p_material_detail_rec IN gme_material_details%ROWTYPE

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

601: ,p_org_code IN VARCHAR2
602: ,p_batch_no IN VARCHAR2 DEFAULT NULL
603: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
604: ,p_validity_rule_id IN NUMBER
605: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
606: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
607: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
608: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
609: IS

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

602: ,p_batch_no IN VARCHAR2 DEFAULT NULL
603: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
604: ,p_validity_rule_id IN NUMBER
605: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
606: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
607: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
608: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
609: IS
610: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_PHANTOM';

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

603: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
604: ,p_validity_rule_id IN NUMBER
605: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
606: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
607: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
608: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
609: IS
610: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_PHANTOM';
611: phantom_creation_failure EXCEPTION;

Line 624: x_return_status := fnd_api.g_ret_sts_success;

620: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
621: || l_api_name);
622: END IF;
623:
624: x_return_status := fnd_api.g_ret_sts_success;
625:
626: /* Set savepoint here */
627: SAVEPOINT create_phantom;
628:

Line 629: IF p_init_msg_list = fnd_api.g_true THEN

625:
626: /* Set savepoint here */
627: SAVEPOINT create_phantom;
628:
629: IF p_init_msg_list = fnd_api.g_true THEN
630: fnd_msg_pub.initialize;
631: gme_common_pvt.g_error_count := 0;
632: END IF;
633:

Line 634: IF NOT fnd_api.compatible_api_call (2.0

630: fnd_msg_pub.initialize;
631: gme_common_pvt.g_error_count := 0;
632: END IF;
633:
634: IF NOT fnd_api.compatible_api_call (2.0
635: ,p_api_version
636: ,'create_phantom'
637: ,g_pkg_name) THEN
638: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 639: RAISE fnd_api.g_exc_error;

635: ,p_api_version
636: ,'create_phantom'
637: ,g_pkg_name) THEN
638: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
639: RAISE fnd_api.g_exc_error;
640: END IF;
641:
642: IF (p_material_detail_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
643: fnd_message.set_name ('INV', 'INV_ORG_REQUIRED');

Line 645: RAISE fnd_api.g_exc_error;

641:
642: IF (p_material_detail_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
643: fnd_message.set_name ('INV', 'INV_ORG_REQUIRED');
644: fnd_msg_pub.ADD;
645: RAISE fnd_api.g_exc_error;
646: END IF;
647:
648: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
649: gme_common_pvt.log_message ('GME_INVALID_FIELD'

Line 648: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

644: fnd_msg_pub.ADD;
645: RAISE fnd_api.g_exc_error;
646: END IF;
647:
648: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
649: gme_common_pvt.log_message ('GME_INVALID_FIELD'
650: ,'FIELD'
651: ,'p_contiguity_override');
652: RAISE fnd_api.g_exc_error;

Line 652: RAISE fnd_api.g_exc_error;

648: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
649: gme_common_pvt.log_message ('GME_INVALID_FIELD'
650: ,'FIELD'
651: ,'p_contiguity_override');
652: RAISE fnd_api.g_exc_error;
653: END IF;
654:
655: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
656: gme_common_pvt.log_message ('GME_INVALID_FIELD'

Line 655: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

651: ,'p_contiguity_override');
652: RAISE fnd_api.g_exc_error;
653: END IF;
654:
655: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
656: gme_common_pvt.log_message ('GME_INVALID_FIELD'
657: ,'FIELD'
658: ,'p_use_workday_cal');
659: RAISE fnd_api.g_exc_error;

Line 659: RAISE fnd_api.g_exc_error;

655: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
656: gme_common_pvt.log_message ('GME_INVALID_FIELD'
657: ,'FIELD'
658: ,'p_use_workday_cal');
659: RAISE fnd_api.g_exc_error;
660: END IF;
661:
662: l_material_detail := p_material_detail_rec;
663: gme_common_pvt.g_setup_done :=

Line 668: RAISE fnd_api.g_exc_error;

664: gme_common_pvt.setup (p_material_detail_rec.organization_id
665: ,p_org_code);
666:
667: IF NOT gme_common_pvt.g_setup_done THEN
668: RAISE fnd_api.g_exc_error;
669: ELSE
670: l_material_detail.organization_id :=
671: gme_common_pvt.g_organization_id;
672: END IF;

Line 676: ,p_init_msg_list => fnd_api.g_false

672: END IF;
673:
674: gme_api_main.create_phantom
675: (p_validation_level => p_validation_level
676: ,p_init_msg_list => fnd_api.g_false
677: ,x_message_count => x_message_count
678: ,x_message_list => x_message_list
679: ,x_return_status => x_return_status
680: ,p_material_detail_rec => l_material_detail

Line 690: IF x_return_status <> fnd_api.g_ret_sts_success THEN

686: ,p_contiguity_override => p_contiguity_override
687: ,p_use_least_cost_validity_rule => p_use_least_cost_validity_rule
688: ,x_exception_material_tbl => x_exception_material_tbl);
689:
690: IF x_return_status <> fnd_api.g_ret_sts_success THEN
691: RAISE phantom_creation_failure;
692: END IF;
693:
694: IF (p_commit = fnd_api.g_true) THEN

Line 694: IF (p_commit = fnd_api.g_true) THEN

690: IF x_return_status <> fnd_api.g_ret_sts_success THEN
691: RAISE phantom_creation_failure;
692: END IF;
693:
694: IF (p_commit = fnd_api.g_true) THEN
695: COMMIT;
696: END IF;
697:
698: IF g_debug <= gme_debug.g_log_procedure THEN

Line 707: ,p_encoded => fnd_api.g_false

703: WHEN phantom_creation_failure THEN
704: ROLLBACK TO SAVEPOINT create_phantom;
705: x_material_detail_rec := NULL;
706: gme_common_pvt.count_and_get (x_count => x_message_count
707: ,p_encoded => fnd_api.g_false
708: ,x_data => x_message_list);
709: WHEN fnd_api.g_exc_error THEN
710: ROLLBACK TO SAVEPOINT create_phantom;
711: x_material_detail_rec := NULL;

Line 709: WHEN fnd_api.g_exc_error THEN

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

Line 712: x_return_status := fnd_api.g_ret_sts_error;

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

Line 714: ,p_encoded => fnd_api.g_false

710: ROLLBACK TO SAVEPOINT create_phantom;
711: x_material_detail_rec := NULL;
712: x_return_status := fnd_api.g_ret_sts_error;
713: gme_common_pvt.count_and_get (x_count => x_message_count
714: ,p_encoded => fnd_api.g_false
715: ,x_data => x_message_list);
716: WHEN OTHERS THEN
717: ROLLBACK TO SAVEPOINT create_phantom;
718: x_material_detail_rec := NULL;

Line 762: x_return_status := fnd_api.g_ret_sts_success;

758: || l_api_name);
759: END IF;
760:
761: /* Set the return status to success initially */
762: x_return_status := fnd_api.g_ret_sts_success;
763:
764: /* Set savepoint here */
765: SAVEPOINT scale_batch;
766:

Line 768: IF p_init_msg_list = fnd_api.g_true THEN

764: /* Set savepoint here */
765: SAVEPOINT scale_batch;
766:
767: -- Initialize message list and count if needed
768: IF p_init_msg_list = fnd_api.g_true THEN
769: fnd_msg_pub.initialize;
770: END IF;
771:
772: /* Make sure we are call compatible */

Line 773: IF NOT fnd_api.compatible_api_call (2.0

769: fnd_msg_pub.initialize;
770: END IF;
771:
772: /* Make sure we are call compatible */
773: IF NOT fnd_api.compatible_api_call (2.0
774: ,p_api_version
775: ,'scale_batch'
776: ,g_pkg_name) THEN
777: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 778: RAISE fnd_api.g_exc_error;

774: ,p_api_version
775: ,'scale_batch'
776: ,g_pkg_name) THEN
777: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
778: RAISE fnd_api.g_exc_error;
779: END IF;
780: gme_common_pvt.validate_batch
781: (p_batch_header_rec => p_batch_header_rec
782: ,p_org_code => p_org_code

Line 789: IF x_return_status <> fnd_api.g_ret_sts_success THEN

785: ,x_message_count => x_message_count
786: ,x_message_list => x_message_list
787: ,x_return_status => x_return_status );
788:
789: IF x_return_status <> fnd_api.g_ret_sts_success THEN
790: IF (g_debug = gme_debug.g_log_statement) THEN
791: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
792: || ': batch validate error ');
793: END IF;

Line 794: RAISE fnd_api.g_exc_error;

790: IF (g_debug = gme_debug.g_log_statement) THEN
791: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
792: || ': batch validate error ');
793: END IF;
794: RAISE fnd_api.g_exc_error;
795: END IF;
796:
797: /* Check for p_qty_type */
798: IF (p_qty_type NOT IN (0, 1) ) THEN

Line 800: RAISE fnd_api.g_exc_error;

796:
797: /* Check for p_qty_type */
798: IF (p_qty_type NOT IN (0, 1) ) THEN
799: gme_common_pvt.log_message ('GME_INVALID_QUANTITY_TYPE');
800: RAISE fnd_api.g_exc_error;
801: END IF;
802:
803: /* Check for p_recalc_dates */
804: IF (p_recalc_dates NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

Line 804: IF (p_recalc_dates NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

800: RAISE fnd_api.g_exc_error;
801: END IF;
802:
803: /* Check for p_recalc_dates */
804: IF (p_recalc_dates NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
805: gme_common_pvt.log_message ('GME_INVALID_FIELD'
806: ,'FIELD'
807: ,'p_recalc_dates');
808: RAISE fnd_api.g_exc_error;

Line 808: RAISE fnd_api.g_exc_error;

804: IF (p_recalc_dates NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
805: gme_common_pvt.log_message ('GME_INVALID_FIELD'
806: ,'FIELD'
807: ,'p_recalc_dates');
808: RAISE fnd_api.g_exc_error;
809: END IF;
810:
811: /* Check for p_use_workday_cal */
812: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

Line 812: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

808: RAISE fnd_api.g_exc_error;
809: END IF;
810:
811: /* Check for p_use_workday_cal */
812: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
813: gme_common_pvt.log_message ('GME_INVALID_FIELD'
814: ,'FIELD'
815: ,'p_use_workday_cal');
816: RAISE fnd_api.g_exc_error;

Line 816: RAISE fnd_api.g_exc_error;

812: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
813: gme_common_pvt.log_message ('GME_INVALID_FIELD'
814: ,'FIELD'
815: ,'p_use_workday_cal');
816: RAISE fnd_api.g_exc_error;
817: END IF;
818:
819: /* Check for p_contiguity_override */
820: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

Line 820: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

816: RAISE fnd_api.g_exc_error;
817: END IF;
818:
819: /* Check for p_contiguity_override */
820: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
821: gme_common_pvt.log_message ('GME_INVALID_FIELD'
822: ,'FIELD'
823: ,'p_contiguity_override');
824: RAISE fnd_api.g_exc_error;

Line 824: RAISE fnd_api.g_exc_error;

820: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
821: gme_common_pvt.log_message ('GME_INVALID_FIELD'
822: ,'FIELD'
823: ,'p_contiguity_override');
824: RAISE fnd_api.g_exc_error;
825: END IF;
826:
827: x_batch_header_rec := l_batch_header_rec;
828: gme_api_main.scale_batch

Line 830: ,p_init_msg_list => fnd_api.g_false

826:
827: x_batch_header_rec := l_batch_header_rec;
828: gme_api_main.scale_batch
829: (p_validation_level => p_validation_level
830: ,p_init_msg_list => fnd_api.g_false
831: ,x_message_count => x_message_count
832: ,x_message_list => x_message_list
833: ,x_return_status => x_return_status
834: ,p_batch_header_rec => l_batch_header_rec

Line 846: IF x_return_status = fnd_api.g_ret_sts_success THEN

842: ,x_exception_material_tbl => x_exception_material_tbl);
843: x_message_count := 0;
844:
845: --Bug#5459105 Begin
846: IF x_return_status = fnd_api.g_ret_sts_success THEN
847: IF p_commit = fnd_api.g_true THEN
848: gme_api_pub.save_batch (p_header_id => NULL
849: ,p_table => NULL
850: ,p_commit => fnd_api.g_false

Line 847: IF p_commit = fnd_api.g_true THEN

843: x_message_count := 0;
844:
845: --Bug#5459105 Begin
846: IF x_return_status = fnd_api.g_ret_sts_success THEN
847: IF p_commit = fnd_api.g_true THEN
848: gme_api_pub.save_batch (p_header_id => NULL
849: ,p_table => NULL
850: ,p_commit => fnd_api.g_false
851: ,x_return_status => x_return_status);

Line 850: ,p_commit => fnd_api.g_false

846: IF x_return_status = fnd_api.g_ret_sts_success THEN
847: IF p_commit = fnd_api.g_true THEN
848: gme_api_pub.save_batch (p_header_id => NULL
849: ,p_table => NULL
850: ,p_commit => fnd_api.g_false
851: ,x_return_status => x_return_status);
852:
853: IF x_return_status = fnd_api.g_ret_sts_success THEN
854: COMMIT;

Line 853: IF x_return_status = fnd_api.g_ret_sts_success THEN

849: ,p_table => NULL
850: ,p_commit => fnd_api.g_false
851: ,x_return_status => x_return_status);
852:
853: IF x_return_status = fnd_api.g_ret_sts_success THEN
854: COMMIT;
855: ELSE
856: RAISE fnd_api.g_exc_error;
857: END IF;

Line 856: RAISE fnd_api.g_exc_error;

852:
853: IF x_return_status = fnd_api.g_ret_sts_success THEN
854: COMMIT;
855: ELSE
856: RAISE fnd_api.g_exc_error;
857: END IF;
858: END IF;
859: ELSE
860: RAISE scale_batch_failed;

Line 866: ,p_encoded => fnd_api.g_false

862: --Bug#5459105 End
863:
864: gme_common_pvt.log_message ('GME_SCALE_SUCCESS');
865: gme_common_pvt.count_and_get (x_count => x_message_count
866: ,p_encoded => fnd_api.g_false
867: ,x_data => x_message_list);
868:
869: IF g_debug <= gme_debug.g_log_procedure THEN
870: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '

Line 878: ,p_encoded => fnd_api.g_false

874: WHEN scale_batch_failed THEN
875: ROLLBACK TO SAVEPOINT scale_batch;
876: x_batch_header_rec := NULL;
877: gme_common_pvt.count_and_get (x_count => x_message_count
878: ,p_encoded => fnd_api.g_false
879: ,x_data => x_message_list);
880: WHEN fnd_api.g_exc_error THEN
881: ROLLBACK TO SAVEPOINT scale_batch;
882: x_batch_header_rec := NULL;

Line 880: WHEN fnd_api.g_exc_error THEN

876: x_batch_header_rec := NULL;
877: gme_common_pvt.count_and_get (x_count => x_message_count
878: ,p_encoded => fnd_api.g_false
879: ,x_data => x_message_list);
880: WHEN fnd_api.g_exc_error THEN
881: ROLLBACK TO SAVEPOINT scale_batch;
882: x_batch_header_rec := NULL;
883: x_return_status := fnd_api.g_ret_sts_error;
884: gme_common_pvt.count_and_get (x_count => x_message_count

Line 883: x_return_status := fnd_api.g_ret_sts_error;

879: ,x_data => x_message_list);
880: WHEN fnd_api.g_exc_error THEN
881: ROLLBACK TO SAVEPOINT scale_batch;
882: x_batch_header_rec := NULL;
883: x_return_status := fnd_api.g_ret_sts_error;
884: gme_common_pvt.count_and_get (x_count => x_message_count
885: ,p_encoded => fnd_api.g_false
886: ,x_data => x_message_list);
887: WHEN OTHERS THEN

Line 885: ,p_encoded => fnd_api.g_false

881: ROLLBACK TO SAVEPOINT scale_batch;
882: x_batch_header_rec := NULL;
883: x_return_status := fnd_api.g_ret_sts_error;
884: gme_common_pvt.count_and_get (x_count => x_message_count
885: ,p_encoded => fnd_api.g_false
886: ,x_data => x_message_list);
887: WHEN OTHERS THEN
888: ROLLBACK TO SAVEPOINT scale_batch;
889: x_batch_header_rec := NULL;

Line 925: x_return_status := fnd_api.g_ret_sts_success;

921: || l_api_name);
922: END IF;
923:
924: /* Set the return status to success initially */
925: x_return_status := fnd_api.g_ret_sts_success;
926:
927: /* Set savepoint here */
928: SAVEPOINT theoretical_yield_batch;
929:

Line 931: IF p_init_msg_list = fnd_api.g_true THEN

927: /* Set savepoint here */
928: SAVEPOINT theoretical_yield_batch;
929:
930: /* Initialize message list and count if needed */
931: IF p_init_msg_list = fnd_api.g_true THEN
932: fnd_msg_pub.initialize;
933: END IF;
934:
935: /* Make sure we are call compatible */

Line 936: IF NOT fnd_api.compatible_api_call (2.0

932: fnd_msg_pub.initialize;
933: END IF;
934:
935: /* Make sure we are call compatible */
936: IF NOT fnd_api.compatible_api_call (2.0
937: ,p_api_version
938: ,'theoretical_yield_batch'
939: ,g_pkg_name) THEN
940: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 941: RAISE fnd_api.g_exc_error;

937: ,p_api_version
938: ,'theoretical_yield_batch'
939: ,g_pkg_name) THEN
940: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
941: RAISE fnd_api.g_exc_error;
942: END IF;
943: gme_common_pvt.validate_batch
944: (p_batch_header_rec => p_batch_header_rec
945: ,p_org_code => p_org_code

Line 952: IF x_return_status <> fnd_api.g_ret_sts_success THEN

948: ,x_message_count => x_message_count
949: ,x_message_list => x_message_list
950: ,x_return_status => x_return_status );
951:
952: IF x_return_status <> fnd_api.g_ret_sts_success THEN
953: IF (g_debug = gme_debug.g_log_statement) THEN
954: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
955: || ': batch validate error ');
956: END IF;

Line 957: RAISE fnd_api.g_exc_error;

953: IF (g_debug = gme_debug.g_log_statement) THEN
954: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
955: || ': batch validate error ');
956: END IF;
957: RAISE fnd_api.g_exc_error;
958: END IF;
959: gme_api_main.theoretical_yield_batch
960: (p_validation_level => p_validation_level
961: ,p_init_msg_list => fnd_api.g_false

Line 961: ,p_init_msg_list => fnd_api.g_false

957: RAISE fnd_api.g_exc_error;
958: END IF;
959: gme_api_main.theoretical_yield_batch
960: (p_validation_level => p_validation_level
961: ,p_init_msg_list => fnd_api.g_false
962: ,x_message_count => x_message_count
963: ,x_message_list => x_message_list
964: ,p_batch_header_rec => l_batch_header_rec
965: ,p_scale_factor => p_scale_factor

Line 969: IF x_return_status = fnd_api.g_ret_sts_success THEN

965: ,p_scale_factor => p_scale_factor
966: ,x_return_status => x_return_status);
967:
968: --Bug#5459105 Begin
969: IF x_return_status = fnd_api.g_ret_sts_success THEN
970: IF p_commit = fnd_api.g_true THEN
971: gme_api_pub.save_batch (p_header_id => NULL
972: ,p_table => NULL
973: ,p_commit => fnd_api.g_false

Line 970: IF p_commit = fnd_api.g_true THEN

966: ,x_return_status => x_return_status);
967:
968: --Bug#5459105 Begin
969: IF x_return_status = fnd_api.g_ret_sts_success THEN
970: IF p_commit = fnd_api.g_true THEN
971: gme_api_pub.save_batch (p_header_id => NULL
972: ,p_table => NULL
973: ,p_commit => fnd_api.g_false
974: ,x_return_status => x_return_status);

Line 973: ,p_commit => fnd_api.g_false

969: IF x_return_status = fnd_api.g_ret_sts_success THEN
970: IF p_commit = fnd_api.g_true THEN
971: gme_api_pub.save_batch (p_header_id => NULL
972: ,p_table => NULL
973: ,p_commit => fnd_api.g_false
974: ,x_return_status => x_return_status);
975:
976: IF x_return_status = fnd_api.g_ret_sts_success THEN
977: COMMIT;

Line 976: IF x_return_status = fnd_api.g_ret_sts_success THEN

972: ,p_table => NULL
973: ,p_commit => fnd_api.g_false
974: ,x_return_status => x_return_status);
975:
976: IF x_return_status = fnd_api.g_ret_sts_success THEN
977: COMMIT;
978: ELSE
979: RAISE fnd_api.g_exc_error;
980: END IF;

Line 979: RAISE fnd_api.g_exc_error;

975:
976: IF x_return_status = fnd_api.g_ret_sts_success THEN
977: COMMIT;
978: ELSE
979: RAISE fnd_api.g_exc_error;
980: END IF;
981: END IF;
982: ELSE
983: RAISE theoretical_yield_failed;

Line 992: WHEN fnd_api.g_exc_error THEN

988: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '
989: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
990: END IF;
991: EXCEPTION
992: WHEN fnd_api.g_exc_error THEN
993: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
994: x_return_status := fnd_api.g_ret_sts_error;
995: gme_common_pvt.count_and_get (x_count => x_message_count
996: ,p_encoded => fnd_api.g_false

Line 994: x_return_status := fnd_api.g_ret_sts_error;

990: END IF;
991: EXCEPTION
992: WHEN fnd_api.g_exc_error THEN
993: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
994: x_return_status := fnd_api.g_ret_sts_error;
995: gme_common_pvt.count_and_get (x_count => x_message_count
996: ,p_encoded => fnd_api.g_false
997: ,x_data => x_message_list);
998: WHEN theoretical_yield_failed THEN

Line 996: ,p_encoded => fnd_api.g_false

992: WHEN fnd_api.g_exc_error THEN
993: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
994: x_return_status := fnd_api.g_ret_sts_error;
995: gme_common_pvt.count_and_get (x_count => x_message_count
996: ,p_encoded => fnd_api.g_false
997: ,x_data => x_message_list);
998: WHEN theoretical_yield_failed THEN
999: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
1000: gme_common_pvt.count_and_get (x_count => x_message_count

Line 1001: ,p_encoded => fnd_api.g_false

997: ,x_data => x_message_list);
998: WHEN theoretical_yield_failed THEN
999: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
1000: gme_common_pvt.count_and_get (x_count => x_message_count
1001: ,p_encoded => fnd_api.g_false
1002: ,x_data => x_message_list);
1003: WHEN OTHERS THEN
1004: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
1005: gme_when_others ( p_api_name => l_api_name

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

1018: #########################################################################*/
1019: PROCEDURE update_actual_rsrc_usage (
1020: p_api_version IN NUMBER := 2.0
1021: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1022: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1023: ,p_commit IN VARCHAR2 := fnd_api.g_false
1024: ,p_org_code IN VARCHAR2
1025: ,p_batch_no IN VARCHAR2 := NULL
1026: ,p_batchstep_no IN NUMBER := NULL

Line 1023: ,p_commit IN VARCHAR2 := fnd_api.g_false

1019: PROCEDURE update_actual_rsrc_usage (
1020: p_api_version IN NUMBER := 2.0
1021: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1022: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1023: ,p_commit IN VARCHAR2 := fnd_api.g_false
1024: ,p_org_code IN VARCHAR2
1025: ,p_batch_no IN VARCHAR2 := NULL
1026: ,p_batchstep_no IN NUMBER := NULL
1027: ,p_activity IN VARCHAR2 := NULL

Line 1032: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

1028: ,p_resource IN VARCHAR2 := NULL
1029: ,p_instance_no IN NUMBER := NULL
1030: ,p_reason_name IN VARCHAR2 := NULL
1031: ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
1032: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
1033: ,x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
1034: ,x_message_count OUT NOCOPY NUMBER
1035: ,x_message_list OUT NOCOPY VARCHAR2
1036: ,x_return_status OUT NOCOPY VARCHAR2)

Line 1065: x_return_status := fnd_api.g_ret_sts_success;

1061: IF g_debug <> -1 THEN
1062: gme_debug.log_initialize ('UpdateResource');
1063: END IF;
1064: /* Set the return status to success initially */
1065: x_return_status := fnd_api.g_ret_sts_success;
1066: /* Initialize message list and count if needed */
1067: IF p_init_msg_list = fnd_api.g_true THEN
1068: fnd_msg_pub.initialize;
1069: gme_common_pvt.g_error_count := 0;

Line 1067: IF p_init_msg_list = fnd_api.g_true THEN

1063: END IF;
1064: /* Set the return status to success initially */
1065: x_return_status := fnd_api.g_ret_sts_success;
1066: /* Initialize message list and count if needed */
1067: IF p_init_msg_list = fnd_api.g_true THEN
1068: fnd_msg_pub.initialize;
1069: gme_common_pvt.g_error_count := 0;
1070: END IF;
1071:

Line 1076: RAISE fnd_api.g_exc_error;

1072: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1073: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1074: gme_common_pvt.log_message(p_product_code => 'INV'
1075: ,p_message_code => 'INV_ORG_REQUIRED');
1076: RAISE fnd_api.g_exc_error;
1077: END IF;
1078: /* Setup the common constants used accross the apis */
1079: gme_common_pvt.g_setup_done :=
1080: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id

Line 1084: RAISE fnd_api.g_exc_error;

1080: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1081: ,p_org_code => p_org_code);
1082:
1083: IF NOT gme_common_pvt.g_setup_done THEN
1084: RAISE fnd_api.g_exc_error;
1085: ELSE
1086: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1087: END IF;
1088:

Line 1090: IF NOT fnd_api.compatible_api_call (2.0

1086: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1087: END IF;
1088:
1089: /* Make sure we are call compatible */
1090: IF NOT fnd_api.compatible_api_call (2.0
1091: ,p_api_version
1092: ,'update_actual_resource_usage'
1093: ,g_pkg_name) THEN
1094: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 1095: RAISE fnd_api.g_exc_error;

1091: ,p_api_version
1092: ,'update_actual_resource_usage'
1093: ,g_pkg_name) THEN
1094: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1095: RAISE fnd_api.g_exc_error;
1096: END IF;
1097:
1098: IF p_validate_flexfields = 'T' THEN
1099: gme_common_pvt.g_flex_validate_prof := 1;

Line 1126: IF x_return_status = fnd_api.g_ret_sts_success THEN

1122: gme_common_pvt.g_flex_validate_prof := 0;
1123:
1124: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1125:
1126: IF x_return_status = fnd_api.g_ret_sts_success THEN
1127: IF p_commit = fnd_api.g_true THEN
1128: gme_api_pub.save_batch (p_header_id => NULL
1129: ,p_table => NULL
1130: ,p_commit => fnd_api.g_false

Line 1127: IF p_commit = fnd_api.g_true THEN

1123:
1124: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1125:
1126: IF x_return_status = fnd_api.g_ret_sts_success THEN
1127: IF p_commit = fnd_api.g_true THEN
1128: gme_api_pub.save_batch (p_header_id => NULL
1129: ,p_table => NULL
1130: ,p_commit => fnd_api.g_false
1131: ,x_return_status => x_return_status);

Line 1130: ,p_commit => fnd_api.g_false

1126: IF x_return_status = fnd_api.g_ret_sts_success THEN
1127: IF p_commit = fnd_api.g_true THEN
1128: gme_api_pub.save_batch (p_header_id => NULL
1129: ,p_table => NULL
1130: ,p_commit => fnd_api.g_false
1131: ,x_return_status => x_return_status);
1132:
1133: IF x_return_status = fnd_api.g_ret_sts_success THEN
1134: COMMIT;

Line 1133: IF x_return_status = fnd_api.g_ret_sts_success THEN

1129: ,p_table => NULL
1130: ,p_commit => fnd_api.g_false
1131: ,x_return_status => x_return_status);
1132:
1133: IF x_return_status = fnd_api.g_ret_sts_success THEN
1134: COMMIT;
1135: ELSE
1136: RAISE fnd_api.g_exc_error;
1137: END IF;

Line 1136: RAISE fnd_api.g_exc_error;

1132:
1133: IF x_return_status = fnd_api.g_ret_sts_success THEN
1134: COMMIT;
1135: ELSE
1136: RAISE fnd_api.g_exc_error;
1137: END IF;
1138: END IF;
1139: ELSE
1140: RAISE update_rsrc_usage;

Line 1145: IF p_commit = fnd_api.g_true THEN

1141: END IF;
1142:
1143: /* In order to get the poc_trans_id */
1144: /* Lets now load the transactions associated with the batch into the temporary table */
1145: IF p_commit = fnd_api.g_true THEN
1146: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header
1147: ,l_batch_header) ) THEN
1148: RAISE fnd_api.g_exc_error;
1149: END IF;

Line 1148: RAISE fnd_api.g_exc_error;

1144: /* Lets now load the transactions associated with the batch into the temporary table */
1145: IF p_commit = fnd_api.g_true THEN
1146: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header
1147: ,l_batch_header) ) THEN
1148: RAISE fnd_api.g_exc_error;
1149: END IF;
1150: gme_trans_engine_util.load_rsrc_trans
1151: (p_batch_row => l_batch_header
1152: ,x_rsc_row_count => l_rsrc_trans_count

Line 1155: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1151: (p_batch_row => l_batch_header
1152: ,x_rsc_row_count => l_rsrc_trans_count
1153: ,x_return_status => x_return_status);
1154:
1155: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1156: RAISE fnd_api.g_exc_error;
1157: END IF;
1158:
1159: OPEN cur_get_trans_id (x_rsrc_txn_rec.line_id);

Line 1156: RAISE fnd_api.g_exc_error;

1152: ,x_rsc_row_count => l_rsrc_trans_count
1153: ,x_return_status => x_return_status);
1154:
1155: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1156: RAISE fnd_api.g_exc_error;
1157: END IF;
1158:
1159: OPEN cur_get_trans_id (x_rsrc_txn_rec.line_id);
1160: FETCH cur_get_trans_id INTO x_rsrc_txn_rec;

Line 1171: ,p_encoded => fnd_api.g_false

1167: END IF;
1168:
1169: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1170: gme_common_pvt.count_and_get (x_count => x_message_count
1171: ,p_encoded => fnd_api.g_false
1172: ,x_data => x_message_list);
1173: EXCEPTION
1174: WHEN fnd_api.g_exc_error THEN
1175: x_return_status := fnd_api.g_ret_sts_error;

Line 1174: WHEN fnd_api.g_exc_error THEN

1170: gme_common_pvt.count_and_get (x_count => x_message_count
1171: ,p_encoded => fnd_api.g_false
1172: ,x_data => x_message_list);
1173: EXCEPTION
1174: WHEN fnd_api.g_exc_error THEN
1175: x_return_status := fnd_api.g_ret_sts_error;
1176: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1177: gme_common_pvt.count_and_get (x_count => x_message_count
1178: ,p_encoded => fnd_api.g_false

Line 1175: x_return_status := fnd_api.g_ret_sts_error;

1171: ,p_encoded => fnd_api.g_false
1172: ,x_data => x_message_list);
1173: EXCEPTION
1174: WHEN fnd_api.g_exc_error THEN
1175: x_return_status := fnd_api.g_ret_sts_error;
1176: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1177: gme_common_pvt.count_and_get (x_count => x_message_count
1178: ,p_encoded => fnd_api.g_false
1179: ,x_data => x_message_list);

Line 1178: ,p_encoded => fnd_api.g_false

1174: WHEN fnd_api.g_exc_error THEN
1175: x_return_status := fnd_api.g_ret_sts_error;
1176: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1177: gme_common_pvt.count_and_get (x_count => x_message_count
1178: ,p_encoded => fnd_api.g_false
1179: ,x_data => x_message_list);
1180: WHEN update_rsrc_usage THEN
1181: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1182: gme_common_pvt.count_and_get (x_count => x_message_count

Line 1183: ,p_encoded => fnd_api.g_false

1179: ,x_data => x_message_list);
1180: WHEN update_rsrc_usage THEN
1181: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1182: gme_common_pvt.count_and_get (x_count => x_message_count
1183: ,p_encoded => fnd_api.g_false
1184: ,x_data => x_message_list);
1185: WHEN OTHERS THEN
1186: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1187: gme_when_others ( p_api_name => l_api_name

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

1200: #########################################################################*/
1201: PROCEDURE insert_incr_actual_rsrc_txn (
1202: p_api_version IN NUMBER := 2.0
1203: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1204: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1205: ,p_commit IN VARCHAR2 := fnd_api.g_false
1206: ,p_org_code IN VARCHAR2
1207: ,p_batch_no IN VARCHAR2 := NULL
1208: ,p_batchstep_no IN NUMBER := NULL

Line 1205: ,p_commit IN VARCHAR2 := fnd_api.g_false

1201: PROCEDURE insert_incr_actual_rsrc_txn (
1202: p_api_version IN NUMBER := 2.0
1203: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1204: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1205: ,p_commit IN VARCHAR2 := fnd_api.g_false
1206: ,p_org_code IN VARCHAR2
1207: ,p_batch_no IN VARCHAR2 := NULL
1208: ,p_batchstep_no IN NUMBER := NULL
1209: ,p_activity IN VARCHAR2 := NULL

Line 1214: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

1210: ,p_resource IN VARCHAR2 := NULL
1211: ,p_instance_no IN NUMBER := NULL
1212: ,p_reason_name IN VARCHAR2 := NULL
1213: ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
1214: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
1215: ,x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
1216: ,x_message_count OUT NOCOPY NUMBER
1217: ,x_message_list OUT NOCOPY VARCHAR2
1218: ,x_return_status OUT NOCOPY VARCHAR2)

Line 1231: x_return_status := fnd_api.g_ret_sts_success;

1227: IF g_debug <> -1 THEN
1228: gme_debug.log_initialize ('InsertIncr');
1229: END IF;
1230: /* Set the return status to success initially */
1231: x_return_status := fnd_api.g_ret_sts_success;
1232: /* Initialize message list and count if needed */
1233: IF p_init_msg_list = fnd_api.g_true THEN
1234: fnd_msg_pub.initialize;
1235: gme_common_pvt.g_error_count := 0;

Line 1233: IF p_init_msg_list = fnd_api.g_true THEN

1229: END IF;
1230: /* Set the return status to success initially */
1231: x_return_status := fnd_api.g_ret_sts_success;
1232: /* Initialize message list and count if needed */
1233: IF p_init_msg_list = fnd_api.g_true THEN
1234: fnd_msg_pub.initialize;
1235: gme_common_pvt.g_error_count := 0;
1236: END IF;
1237:

Line 1242: RAISE fnd_api.g_exc_error;

1238: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1239: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1240: gme_common_pvt.log_message(p_product_code => 'INV'
1241: ,p_message_code => 'INV_ORG_REQUIRED');
1242: RAISE fnd_api.g_exc_error;
1243: END IF;
1244: gme_common_pvt.g_setup_done :=
1245: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1246: ,p_org_code => p_org_code);

Line 1249: RAISE fnd_api.g_exc_error;

1245: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1246: ,p_org_code => p_org_code);
1247:
1248: IF NOT gme_common_pvt.g_setup_done THEN
1249: RAISE fnd_api.g_exc_error;
1250: ELSE
1251: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1252: END IF;
1253:

Line 1255: IF NOT fnd_api.compatible_api_call (2.0

1251: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1252: END IF;
1253:
1254: /* Make sure we are call compatible */
1255: IF NOT fnd_api.compatible_api_call (2.0
1256: ,p_api_version
1257: ,'insert_incr_actual_rsrc_txn'
1258: ,g_pkg_name) THEN
1259: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 1260: RAISE fnd_api.g_exc_error;

1256: ,p_api_version
1257: ,'insert_incr_actual_rsrc_txn'
1258: ,g_pkg_name) THEN
1259: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1260: RAISE fnd_api.g_exc_error;
1261: END IF;
1262:
1263: /*Validate if org_code or organization_id is passed, or give error.*/
1264: IF p_validate_flexfields = 'T' THEN

Line 1289: IF x_return_status = fnd_api.g_ret_sts_success THEN

1285: --Reset flex global
1286: gme_common_pvt.g_flex_validate_prof := 0;
1287: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1288:
1289: IF x_return_status = fnd_api.g_ret_sts_success THEN
1290: IF p_commit = fnd_api.g_true THEN
1291: gme_api_pub.save_batch (p_header_id => NULL
1292: ,p_table => NULL
1293: ,p_commit => fnd_api.g_false

Line 1290: IF p_commit = fnd_api.g_true THEN

1286: gme_common_pvt.g_flex_validate_prof := 0;
1287: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1288:
1289: IF x_return_status = fnd_api.g_ret_sts_success THEN
1290: IF p_commit = fnd_api.g_true THEN
1291: gme_api_pub.save_batch (p_header_id => NULL
1292: ,p_table => NULL
1293: ,p_commit => fnd_api.g_false
1294: ,x_return_status => x_return_status);

Line 1293: ,p_commit => fnd_api.g_false

1289: IF x_return_status = fnd_api.g_ret_sts_success THEN
1290: IF p_commit = fnd_api.g_true THEN
1291: gme_api_pub.save_batch (p_header_id => NULL
1292: ,p_table => NULL
1293: ,p_commit => fnd_api.g_false
1294: ,x_return_status => x_return_status);
1295:
1296: IF x_return_status = fnd_api.g_ret_sts_success THEN
1297: COMMIT;

Line 1296: IF x_return_status = fnd_api.g_ret_sts_success THEN

1292: ,p_table => NULL
1293: ,p_commit => fnd_api.g_false
1294: ,x_return_status => x_return_status);
1295:
1296: IF x_return_status = fnd_api.g_ret_sts_success THEN
1297: COMMIT;
1298: ELSE
1299: RAISE fnd_api.g_exc_error;
1300: END IF;

Line 1299: RAISE fnd_api.g_exc_error;

1295:
1296: IF x_return_status = fnd_api.g_ret_sts_success THEN
1297: COMMIT;
1298: ELSE
1299: RAISE fnd_api.g_exc_error;
1300: END IF;
1301: END IF;
1302: ELSE
1303: RAISE fnd_api.g_exc_error;

Line 1303: RAISE fnd_api.g_exc_error;

1299: RAISE fnd_api.g_exc_error;
1300: END IF;
1301: END IF;
1302: ELSE
1303: RAISE fnd_api.g_exc_error;
1304: END IF;
1305:
1306: IF g_debug <= gme_debug.g_log_procedure THEN
1307: gme_debug.put_line ( 'Insert Incr Actual rsrc usage at '

Line 1313: ,p_encoded => fnd_api.g_false

1309: END IF;
1310:
1311: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1312: gme_common_pvt.count_and_get (x_count => x_message_count
1313: ,p_encoded => fnd_api.g_false
1314: ,x_data => x_message_list);
1315: EXCEPTION
1316: WHEN fnd_api.g_exc_error THEN
1317: x_return_status := fnd_api.g_ret_sts_error;

Line 1316: WHEN fnd_api.g_exc_error THEN

1312: gme_common_pvt.count_and_get (x_count => x_message_count
1313: ,p_encoded => fnd_api.g_false
1314: ,x_data => x_message_list);
1315: EXCEPTION
1316: WHEN fnd_api.g_exc_error THEN
1317: x_return_status := fnd_api.g_ret_sts_error;
1318: ROLLBACK TO SAVEPOINT insert_incr_actual_rsrc_txn;
1319: gme_common_pvt.count_and_get (x_count => x_message_count
1320: ,p_encoded => fnd_api.g_false

Line 1317: x_return_status := fnd_api.g_ret_sts_error;

1313: ,p_encoded => fnd_api.g_false
1314: ,x_data => x_message_list);
1315: EXCEPTION
1316: WHEN fnd_api.g_exc_error THEN
1317: x_return_status := fnd_api.g_ret_sts_error;
1318: ROLLBACK TO SAVEPOINT insert_incr_actual_rsrc_txn;
1319: gme_common_pvt.count_and_get (x_count => x_message_count
1320: ,p_encoded => fnd_api.g_false
1321: ,x_data => x_message_list);

Line 1320: ,p_encoded => fnd_api.g_false

1316: WHEN fnd_api.g_exc_error THEN
1317: x_return_status := fnd_api.g_ret_sts_error;
1318: ROLLBACK TO SAVEPOINT insert_incr_actual_rsrc_txn;
1319: gme_common_pvt.count_and_get (x_count => x_message_count
1320: ,p_encoded => fnd_api.g_false
1321: ,x_data => x_message_list);
1322: WHEN OTHERS THEN
1323: ROLLBACK TO SAVEPOINT insert_incr_actual_rsrc_txn;
1324: gme_when_others ( p_api_name => l_api_name

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

1339: #########################################################################*/
1340: PROCEDURE insert_timed_actual_rsrc_txn (
1341: p_api_version IN NUMBER := 2.0
1342: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1343: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1344: ,p_commit IN VARCHAR2 := fnd_api.g_false
1345: ,p_org_code IN VARCHAR2
1346: ,p_batch_no IN VARCHAR2 := NULL
1347: ,p_batchstep_no IN NUMBER := NULL

Line 1344: ,p_commit IN VARCHAR2 := fnd_api.g_false

1340: PROCEDURE insert_timed_actual_rsrc_txn (
1341: p_api_version IN NUMBER := 2.0
1342: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1343: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1344: ,p_commit IN VARCHAR2 := fnd_api.g_false
1345: ,p_org_code IN VARCHAR2
1346: ,p_batch_no IN VARCHAR2 := NULL
1347: ,p_batchstep_no IN NUMBER := NULL
1348: ,p_activity IN VARCHAR2 := NULL

Line 1353: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

1349: ,p_resource IN VARCHAR2 := NULL
1350: ,p_instance_no IN NUMBER := NULL
1351: ,p_reason_name IN VARCHAR2 := NULL
1352: ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
1353: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
1354: ,x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
1355: ,x_message_count OUT NOCOPY NUMBER
1356: ,x_message_list OUT NOCOPY VARCHAR2
1357: ,x_return_status OUT NOCOPY VARCHAR2)

Line 1367: x_return_status := fnd_api.g_ret_sts_success;

1363: BEGIN
1364: /* Set the savepoint */
1365: SAVEPOINT insert_timed_actual_rsrc_txn;
1366: /* Set the return status to success initially */
1367: x_return_status := fnd_api.g_ret_sts_success;
1368: IF g_debug <> -1 THEN
1369: gme_debug.log_initialize ('InsertTimed');
1370: END IF;
1371:

Line 1373: IF p_init_msg_list = fnd_api.g_true THEN

1369: gme_debug.log_initialize ('InsertTimed');
1370: END IF;
1371:
1372: /* Initialize message list and count if needed */
1373: IF p_init_msg_list = fnd_api.g_true THEN
1374: fnd_msg_pub.initialize;
1375: gme_common_pvt.g_error_count := 0;
1376: END IF;
1377: l_rsrc_txn_rec := p_rsrc_txn_rec ;

Line 1381: RAISE fnd_api.g_exc_error;

1377: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1378: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1379: gme_common_pvt.log_message(p_product_code => 'INV'
1380: ,p_message_code => 'INV_ORG_REQUIRED');
1381: RAISE fnd_api.g_exc_error;
1382: END IF;
1383:
1384: gme_common_pvt.g_setup_done :=
1385: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id

Line 1389: RAISE fnd_api.g_exc_error;

1385: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1386: ,p_org_code => p_org_code);
1387:
1388: IF NOT gme_common_pvt.g_setup_done THEN
1389: RAISE fnd_api.g_exc_error;
1390: ELSE
1391: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1392: END IF;
1393:

Line 1395: IF NOT fnd_api.compatible_api_call (2.0

1391: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1392: END IF;
1393:
1394: /* Make sure we are call compatible */
1395: IF NOT fnd_api.compatible_api_call (2.0
1396: ,p_api_version
1397: ,'insert_timed_actual_rsrc_txn'
1398: ,g_pkg_name) THEN
1399: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 1400: RAISE fnd_api.g_exc_error;

1396: ,p_api_version
1397: ,'insert_timed_actual_rsrc_txn'
1398: ,g_pkg_name) THEN
1399: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1400: RAISE fnd_api.g_exc_error;
1401: END IF;
1402:
1403: gme_common_pvt.set_timestamp;
1404:

Line 1431: IF x_return_status = fnd_api.g_ret_sts_success THEN

1427: --Reset flex global
1428: gme_common_pvt.g_flex_validate_prof := 0;
1429: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1430:
1431: IF x_return_status = fnd_api.g_ret_sts_success THEN
1432: IF p_commit = fnd_api.g_true THEN
1433: gme_api_pub.save_batch (p_header_id => NULL
1434: ,p_table => NULL
1435: ,p_commit => fnd_api.g_false

Line 1432: IF p_commit = fnd_api.g_true THEN

1428: gme_common_pvt.g_flex_validate_prof := 0;
1429: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1430:
1431: IF x_return_status = fnd_api.g_ret_sts_success THEN
1432: IF p_commit = fnd_api.g_true THEN
1433: gme_api_pub.save_batch (p_header_id => NULL
1434: ,p_table => NULL
1435: ,p_commit => fnd_api.g_false
1436: ,x_return_status => x_return_status);

Line 1435: ,p_commit => fnd_api.g_false

1431: IF x_return_status = fnd_api.g_ret_sts_success THEN
1432: IF p_commit = fnd_api.g_true THEN
1433: gme_api_pub.save_batch (p_header_id => NULL
1434: ,p_table => NULL
1435: ,p_commit => fnd_api.g_false
1436: ,x_return_status => x_return_status);
1437:
1438: IF x_return_status = fnd_api.g_ret_sts_success THEN
1439: COMMIT;

Line 1438: IF x_return_status = fnd_api.g_ret_sts_success THEN

1434: ,p_table => NULL
1435: ,p_commit => fnd_api.g_false
1436: ,x_return_status => x_return_status);
1437:
1438: IF x_return_status = fnd_api.g_ret_sts_success THEN
1439: COMMIT;
1440: ELSE
1441: RAISE fnd_api.g_exc_error;
1442: END IF;

Line 1441: RAISE fnd_api.g_exc_error;

1437:
1438: IF x_return_status = fnd_api.g_ret_sts_success THEN
1439: COMMIT;
1440: ELSE
1441: RAISE fnd_api.g_exc_error;
1442: END IF;
1443: END IF;
1444: ELSE
1445: RAISE fnd_api.g_exc_error;

Line 1445: RAISE fnd_api.g_exc_error;

1441: RAISE fnd_api.g_exc_error;
1442: END IF;
1443: END IF;
1444: ELSE
1445: RAISE fnd_api.g_exc_error;
1446: END IF;
1447:
1448: IF g_debug <= gme_debug.g_log_procedure THEN
1449: gme_debug.put_line ( 'Insert timed Actual rsrc usage at '

Line 1455: ,p_encoded => fnd_api.g_false

1451: END IF;
1452:
1453: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1454: gme_common_pvt.count_and_get (x_count => x_message_count
1455: ,p_encoded => fnd_api.g_false
1456: ,x_data => x_message_list);
1457: EXCEPTION
1458: WHEN fnd_api.g_exc_error THEN
1459: x_return_status := fnd_api.g_ret_sts_error;

Line 1458: WHEN fnd_api.g_exc_error THEN

1454: gme_common_pvt.count_and_get (x_count => x_message_count
1455: ,p_encoded => fnd_api.g_false
1456: ,x_data => x_message_list);
1457: EXCEPTION
1458: WHEN fnd_api.g_exc_error THEN
1459: x_return_status := fnd_api.g_ret_sts_error;
1460: ROLLBACK TO SAVEPOINT insert_timed_actual_rsrc_txn;
1461: gme_common_pvt.count_and_get (x_count => x_message_count
1462: ,p_encoded => fnd_api.g_false

Line 1459: x_return_status := fnd_api.g_ret_sts_error;

1455: ,p_encoded => fnd_api.g_false
1456: ,x_data => x_message_list);
1457: EXCEPTION
1458: WHEN fnd_api.g_exc_error THEN
1459: x_return_status := fnd_api.g_ret_sts_error;
1460: ROLLBACK TO SAVEPOINT insert_timed_actual_rsrc_txn;
1461: gme_common_pvt.count_and_get (x_count => x_message_count
1462: ,p_encoded => fnd_api.g_false
1463: ,x_data => x_message_list);

Line 1462: ,p_encoded => fnd_api.g_false

1458: WHEN fnd_api.g_exc_error THEN
1459: x_return_status := fnd_api.g_ret_sts_error;
1460: ROLLBACK TO SAVEPOINT insert_timed_actual_rsrc_txn;
1461: gme_common_pvt.count_and_get (x_count => x_message_count
1462: ,p_encoded => fnd_api.g_false
1463: ,x_data => x_message_list);
1464: WHEN OTHERS THEN
1465: ROLLBACK TO SAVEPOINT insert_timed_actual_rsrc_txn;
1466: gme_when_others ( p_api_name => l_api_name

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

1487: PROCEDURE start_cmplt_actual_rsrc_txn (
1488: p_api_version IN NUMBER := 2.0
1489: ,p_validation_level IN NUMBER
1490: := gme_common_pvt.g_max_errors
1491: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1492: ,p_commit IN VARCHAR2 := fnd_api.g_false
1493: ,p_org_code IN VARCHAR2
1494: ,p_batch_no IN VARCHAR2 := NULL
1495: ,p_batchstep_no IN NUMBER := NULL

Line 1492: ,p_commit IN VARCHAR2 := fnd_api.g_false

1488: p_api_version IN NUMBER := 2.0
1489: ,p_validation_level IN NUMBER
1490: := gme_common_pvt.g_max_errors
1491: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1492: ,p_commit IN VARCHAR2 := fnd_api.g_false
1493: ,p_org_code IN VARCHAR2
1494: ,p_batch_no IN VARCHAR2 := NULL
1495: ,p_batchstep_no IN NUMBER := NULL
1496: ,p_activity IN VARCHAR2 := NULL

Line 1501: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

1497: ,p_resource IN VARCHAR2 := NULL
1498: ,p_instance_no IN NUMBER
1499: ,p_reason_name IN VARCHAR2 := NULL
1500: ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
1501: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
1502: ,x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
1503: ,x_message_count OUT NOCOPY NUMBER
1504: ,x_message_list OUT NOCOPY VARCHAR2
1505: ,x_return_status OUT NOCOPY VARCHAR2)

Line 1515: x_return_status := fnd_api.g_ret_sts_success;

1511: BEGIN
1512: /* Set the savepoint */
1513: SAVEPOINT start_cmplt_actual_rsrc_txn;
1514: /* Set the return status to success initially */
1515: x_return_status := fnd_api.g_ret_sts_success;
1516: IF g_debug <> -1 THEN
1517: gme_debug.log_initialize ('StartCmplt');
1518: END IF;
1519:

Line 1521: IF p_init_msg_list = fnd_api.g_true THEN

1517: gme_debug.log_initialize ('StartCmplt');
1518: END IF;
1519:
1520: /* Initialize message list and count if needed */
1521: IF p_init_msg_list = fnd_api.g_true THEN
1522: fnd_msg_pub.initialize;
1523: gme_common_pvt.g_error_count := 0;
1524: END IF;
1525: l_rsrc_txn_rec := p_rsrc_txn_rec ;

Line 1529: RAISE fnd_api.g_exc_error;

1525: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1526: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1527: gme_common_pvt.log_message(p_product_code => 'INV'
1528: ,p_message_code => 'INV_ORG_REQUIRED');
1529: RAISE fnd_api.g_exc_error;
1530: END IF;
1531: gme_common_pvt.g_setup_done :=
1532: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1533: ,p_org_code => p_org_code);

Line 1535: RAISE fnd_api.g_exc_error;

1531: gme_common_pvt.g_setup_done :=
1532: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1533: ,p_org_code => p_org_code);
1534: IF NOT gme_common_pvt.g_setup_done THEN
1535: RAISE fnd_api.g_exc_error;
1536: ELSE
1537: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1538: END IF;
1539:

Line 1541: IF NOT fnd_api.compatible_api_call (2.0,p_api_version,

1537: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1538: END IF;
1539:
1540: /* Make sure we are call compatible */
1541: IF NOT fnd_api.compatible_api_call (2.0,p_api_version,
1542: 'start_cmplt_actual_rsrc_txn',g_pkg_name) THEN
1543: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1544: RAISE fnd_api.g_exc_error;
1545: END IF;

Line 1544: RAISE fnd_api.g_exc_error;

1540: /* Make sure we are call compatible */
1541: IF NOT fnd_api.compatible_api_call (2.0,p_api_version,
1542: 'start_cmplt_actual_rsrc_txn',g_pkg_name) THEN
1543: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1544: RAISE fnd_api.g_exc_error;
1545: END IF;
1546: gme_common_pvt.set_timestamp;
1547: IF p_validate_flexfields = 'T' THEN
1548: gme_common_pvt.g_flex_validate_prof := 1;

Line 1574: IF x_return_status = fnd_api.g_ret_sts_success THEN

1570: gme_common_pvt.g_flex_validate_prof := 0;
1571: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1572:
1573: /*end */
1574: IF x_return_status = fnd_api.g_ret_sts_success THEN
1575: IF p_commit = fnd_api.g_true THEN
1576: gme_api_pub.save_batch (p_header_id => NULL
1577: ,p_table => NULL
1578: ,p_commit => fnd_api.g_false

Line 1575: IF p_commit = fnd_api.g_true THEN

1571: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1572:
1573: /*end */
1574: IF x_return_status = fnd_api.g_ret_sts_success THEN
1575: IF p_commit = fnd_api.g_true THEN
1576: gme_api_pub.save_batch (p_header_id => NULL
1577: ,p_table => NULL
1578: ,p_commit => fnd_api.g_false
1579: ,x_return_status => x_return_status);

Line 1578: ,p_commit => fnd_api.g_false

1574: IF x_return_status = fnd_api.g_ret_sts_success THEN
1575: IF p_commit = fnd_api.g_true THEN
1576: gme_api_pub.save_batch (p_header_id => NULL
1577: ,p_table => NULL
1578: ,p_commit => fnd_api.g_false
1579: ,x_return_status => x_return_status);
1580:
1581: IF x_return_status = fnd_api.g_ret_sts_success THEN
1582: COMMIT;

Line 1581: IF x_return_status = fnd_api.g_ret_sts_success THEN

1577: ,p_table => NULL
1578: ,p_commit => fnd_api.g_false
1579: ,x_return_status => x_return_status);
1580:
1581: IF x_return_status = fnd_api.g_ret_sts_success THEN
1582: COMMIT;
1583: ELSE
1584: RAISE fnd_api.g_exc_error;
1585: END IF;

Line 1584: RAISE fnd_api.g_exc_error;

1580:
1581: IF x_return_status = fnd_api.g_ret_sts_success THEN
1582: COMMIT;
1583: ELSE
1584: RAISE fnd_api.g_exc_error;
1585: END IF;
1586: END IF;
1587: ELSE
1588: RAISE fnd_api.g_exc_error;

Line 1588: RAISE fnd_api.g_exc_error;

1584: RAISE fnd_api.g_exc_error;
1585: END IF;
1586: END IF;
1587: ELSE
1588: RAISE fnd_api.g_exc_error;
1589: END IF;
1590:
1591: IF g_debug <= gme_debug.g_log_procedure THEN
1592: gme_debug.put_line ( 'start Actual rsrc txn at '

Line 1598: ,p_encoded => fnd_api.g_false

1594: END IF;
1595:
1596: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1597: gme_common_pvt.count_and_get (x_count => x_message_count
1598: ,p_encoded => fnd_api.g_false
1599: ,x_data => x_message_list);
1600: EXCEPTION
1601: WHEN fnd_api.g_exc_error THEN
1602: x_return_status := fnd_api.g_ret_sts_error;

Line 1601: WHEN fnd_api.g_exc_error THEN

1597: gme_common_pvt.count_and_get (x_count => x_message_count
1598: ,p_encoded => fnd_api.g_false
1599: ,x_data => x_message_list);
1600: EXCEPTION
1601: WHEN fnd_api.g_exc_error THEN
1602: x_return_status := fnd_api.g_ret_sts_error;
1603: ROLLBACK TO SAVEPOINT start_cmplt_actual_rsrc_txn;
1604: gme_common_pvt.count_and_get (x_count => x_message_count
1605: ,p_encoded => fnd_api.g_false

Line 1602: x_return_status := fnd_api.g_ret_sts_error;

1598: ,p_encoded => fnd_api.g_false
1599: ,x_data => x_message_list);
1600: EXCEPTION
1601: WHEN fnd_api.g_exc_error THEN
1602: x_return_status := fnd_api.g_ret_sts_error;
1603: ROLLBACK TO SAVEPOINT start_cmplt_actual_rsrc_txn;
1604: gme_common_pvt.count_and_get (x_count => x_message_count
1605: ,p_encoded => fnd_api.g_false
1606: ,x_data => x_message_list);

Line 1605: ,p_encoded => fnd_api.g_false

1601: WHEN fnd_api.g_exc_error THEN
1602: x_return_status := fnd_api.g_ret_sts_error;
1603: ROLLBACK TO SAVEPOINT start_cmplt_actual_rsrc_txn;
1604: gme_common_pvt.count_and_get (x_count => x_message_count
1605: ,p_encoded => fnd_api.g_false
1606: ,x_data => x_message_list);
1607: WHEN OTHERS THEN
1608: ROLLBACK TO SAVEPOINT start_cmplt_actual_rsrc_txn;
1609: gme_when_others ( p_api_name => l_api_name

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

1625: #########################################################################*/
1626: PROCEDURE end_cmplt_actual_rsrc_txn (
1627: p_api_version IN NUMBER := 2.0
1628: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1629: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1630: ,p_commit IN VARCHAR2 := fnd_api.g_false
1631: ,p_instance_no IN NUMBER := NULL
1632: ,p_reason_name IN VARCHAR2 := NULL
1633: ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE

Line 1630: ,p_commit IN VARCHAR2 := fnd_api.g_false

1626: PROCEDURE end_cmplt_actual_rsrc_txn (
1627: p_api_version IN NUMBER := 2.0
1628: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1629: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1630: ,p_commit IN VARCHAR2 := fnd_api.g_false
1631: ,p_instance_no IN NUMBER := NULL
1632: ,p_reason_name IN VARCHAR2 := NULL
1633: ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
1634: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

Line 1634: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

1630: ,p_commit IN VARCHAR2 := fnd_api.g_false
1631: ,p_instance_no IN NUMBER := NULL
1632: ,p_reason_name IN VARCHAR2 := NULL
1633: ,p_rsrc_txn_rec IN gme_resource_txns%ROWTYPE
1634: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
1635: ,x_rsrc_txn_rec IN OUT NOCOPY gme_resource_txns%ROWTYPE
1636: ,x_message_count OUT NOCOPY NUMBER
1637: ,x_message_list OUT NOCOPY VARCHAR2
1638: ,x_return_status OUT NOCOPY VARCHAR2)

Line 1652: IF p_init_msg_list = fnd_api.g_true THEN

1648: gme_debug.log_initialize ('EndCmplt');
1649: END IF;
1650:
1651: /* Initialize message list and count if needed */
1652: IF p_init_msg_list = fnd_api.g_true THEN
1653: fnd_msg_pub.initialize;
1654: gme_common_pvt.g_error_count := 0;
1655: END IF;
1656: /* Set the return status to success initially */

Line 1657: x_return_status := fnd_api.g_ret_sts_success;

1653: fnd_msg_pub.initialize;
1654: gme_common_pvt.g_error_count := 0;
1655: END IF;
1656: /* Set the return status to success initially */
1657: x_return_status := fnd_api.g_ret_sts_success;
1658: l_rsrc_txn_rec := p_rsrc_txn_rec;
1659: IF (l_rsrc_txn_rec.organization_id IS NULL ) THEN
1660: gme_common_pvt.log_message(p_product_code => 'INV'
1661: ,p_message_code => 'INV_ORG_REQUIRED');

Line 1662: RAISE fnd_api.g_exc_error;

1658: l_rsrc_txn_rec := p_rsrc_txn_rec;
1659: IF (l_rsrc_txn_rec.organization_id IS NULL ) THEN
1660: gme_common_pvt.log_message(p_product_code => 'INV'
1661: ,p_message_code => 'INV_ORG_REQUIRED');
1662: RAISE fnd_api.g_exc_error;
1663: END IF;
1664: /* Setup the common constants used accross the apis */
1665: gme_common_pvt.g_setup_done :=
1666: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id

Line 1670: RAISE fnd_api.g_exc_error;

1666: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1667: ,p_org_code => null);
1668:
1669: IF NOT gme_common_pvt.g_setup_done THEN
1670: RAISE fnd_api.g_exc_error;
1671: ELSE
1672: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1673: END IF;
1674:

Line 1676: IF NOT fnd_api.compatible_api_call (2.0

1672: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1673: END IF;
1674:
1675: /* Make sure we are call compatible */
1676: IF NOT fnd_api.compatible_api_call (2.0
1677: ,p_api_version
1678: ,'end_cmplt_actual_rsrc_txn'
1679: ,g_pkg_name) THEN
1680: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 1681: RAISE fnd_api.g_exc_error;

1677: ,p_api_version
1678: ,'end_cmplt_actual_rsrc_txn'
1679: ,g_pkg_name) THEN
1680: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1681: RAISE fnd_api.g_exc_error;
1682: END IF;
1683: gme_common_pvt.set_timestamp;
1684: IF p_validate_flexfields = 'T' THEN
1685: gme_common_pvt.g_flex_validate_prof := 1;

Line 1706: IF x_return_status = fnd_api.g_ret_sts_success THEN

1702: gme_common_pvt.g_flex_validate_prof := 0;
1703: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1704:
1705: /* end */
1706: IF x_return_status = fnd_api.g_ret_sts_success THEN
1707: IF p_commit = fnd_api.g_true THEN
1708: gme_api_pub.save_batch (p_header_id => NULL
1709: ,p_table => NULL
1710: ,p_commit => fnd_api.g_false

Line 1707: IF p_commit = fnd_api.g_true THEN

1703: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1704:
1705: /* end */
1706: IF x_return_status = fnd_api.g_ret_sts_success THEN
1707: IF p_commit = fnd_api.g_true THEN
1708: gme_api_pub.save_batch (p_header_id => NULL
1709: ,p_table => NULL
1710: ,p_commit => fnd_api.g_false
1711: ,x_return_status => x_return_status);

Line 1710: ,p_commit => fnd_api.g_false

1706: IF x_return_status = fnd_api.g_ret_sts_success THEN
1707: IF p_commit = fnd_api.g_true THEN
1708: gme_api_pub.save_batch (p_header_id => NULL
1709: ,p_table => NULL
1710: ,p_commit => fnd_api.g_false
1711: ,x_return_status => x_return_status);
1712:
1713: IF x_return_status = fnd_api.g_ret_sts_success THEN
1714: COMMIT;

Line 1713: IF x_return_status = fnd_api.g_ret_sts_success THEN

1709: ,p_table => NULL
1710: ,p_commit => fnd_api.g_false
1711: ,x_return_status => x_return_status);
1712:
1713: IF x_return_status = fnd_api.g_ret_sts_success THEN
1714: COMMIT;
1715: ELSE
1716: RAISE fnd_api.g_exc_error;
1717: END IF;

Line 1716: RAISE fnd_api.g_exc_error;

1712:
1713: IF x_return_status = fnd_api.g_ret_sts_success THEN
1714: COMMIT;
1715: ELSE
1716: RAISE fnd_api.g_exc_error;
1717: END IF;
1718: END IF;
1719: ELSE
1720: RAISE fnd_api.g_exc_error;

Line 1720: RAISE fnd_api.g_exc_error;

1716: RAISE fnd_api.g_exc_error;
1717: END IF;
1718: END IF;
1719: ELSE
1720: RAISE fnd_api.g_exc_error;
1721: END IF;
1722:
1723: IF g_debug <= gme_debug.g_log_procedure THEN
1724: gme_debug.put_line ( 'Insert Incr Actual rsrc usage at '

Line 1730: ,p_encoded => fnd_api.g_false

1726: END IF;
1727:
1728: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1729: gme_common_pvt.count_and_get (x_count => x_message_count
1730: ,p_encoded => fnd_api.g_false
1731: ,x_data => x_message_list);
1732: EXCEPTION
1733: WHEN fnd_api.g_exc_error THEN
1734: x_return_status := fnd_api.g_ret_sts_error;

Line 1733: WHEN fnd_api.g_exc_error THEN

1729: gme_common_pvt.count_and_get (x_count => x_message_count
1730: ,p_encoded => fnd_api.g_false
1731: ,x_data => x_message_list);
1732: EXCEPTION
1733: WHEN fnd_api.g_exc_error THEN
1734: x_return_status := fnd_api.g_ret_sts_error;
1735: ROLLBACK TO SAVEPOINT end_cmplt_actual_rsrc_txn;
1736: gme_common_pvt.count_and_get (x_count => x_message_count
1737: ,p_encoded => fnd_api.g_false

Line 1734: x_return_status := fnd_api.g_ret_sts_error;

1730: ,p_encoded => fnd_api.g_false
1731: ,x_data => x_message_list);
1732: EXCEPTION
1733: WHEN fnd_api.g_exc_error THEN
1734: x_return_status := fnd_api.g_ret_sts_error;
1735: ROLLBACK TO SAVEPOINT end_cmplt_actual_rsrc_txn;
1736: gme_common_pvt.count_and_get (x_count => x_message_count
1737: ,p_encoded => fnd_api.g_false
1738: ,x_data => x_message_list);

Line 1737: ,p_encoded => fnd_api.g_false

1733: WHEN fnd_api.g_exc_error THEN
1734: x_return_status := fnd_api.g_ret_sts_error;
1735: ROLLBACK TO SAVEPOINT end_cmplt_actual_rsrc_txn;
1736: gme_common_pvt.count_and_get (x_count => x_message_count
1737: ,p_encoded => fnd_api.g_false
1738: ,x_data => x_message_list);
1739: WHEN OTHERS THEN
1740: ROLLBACK TO SAVEPOINT end_cmplt_actual_rsrc_txn;
1741: gme_when_others ( p_api_name => l_api_name

Line 1779: x_return_status := fnd_api.g_ret_sts_success;

1775: || 'Entering');
1776: END IF;
1777:
1778: /* Set the return status to success initially */
1779: x_return_status := fnd_api.g_ret_sts_success;
1780:
1781: /* Set savepoint here */
1782: SAVEPOINT reschedule_batch;
1783:

Line 1785: IF p_init_msg_list = fnd_api.g_true THEN

1781: /* Set savepoint here */
1782: SAVEPOINT reschedule_batch;
1783:
1784: /* Initialize message list and count if needed */
1785: IF p_init_msg_list = fnd_api.g_true THEN
1786: fnd_msg_pub.initialize;
1787: END IF;
1788: gme_common_pvt.validate_batch
1789: (p_batch_header_rec => p_batch_header_rec

Line 1797: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1793: ,x_message_count => x_message_count
1794: ,x_message_list => x_message_list
1795: ,x_return_status => x_return_status );
1796:
1797: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1798: IF (g_debug = gme_debug.g_log_statement) THEN
1799: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
1800: || ': batch validate error ');
1801: END IF;

Line 1802: RAISE fnd_api.g_exc_error;

1798: IF (g_debug = gme_debug.g_log_statement) THEN
1799: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
1800: || ': batch validate error ');
1801: END IF;
1802: RAISE fnd_api.g_exc_error;
1803: END IF;
1804:
1805: /* Make sure we are call compatible */
1806: IF NOT fnd_api.compatible_api_call (2.0

Line 1806: IF NOT fnd_api.compatible_api_call (2.0

1802: RAISE fnd_api.g_exc_error;
1803: END IF;
1804:
1805: /* Make sure we are call compatible */
1806: IF NOT fnd_api.compatible_api_call (2.0
1807: ,p_api_version
1808: ,'reschedule_batch'
1809: ,g_pkg_name) THEN
1810: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 1811: RAISE fnd_api.g_exc_error;

1807: ,p_api_version
1808: ,'reschedule_batch'
1809: ,g_pkg_name) THEN
1810: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1811: RAISE fnd_api.g_exc_error;
1812: END IF;
1813:
1814: IF g_debug <= gme_debug.g_log_procedure THEN
1815: gme_debug.put_line ( ' Value of Plan_start_date : ' || TO_CHAR

Line 1825: RAISE fnd_api.g_exc_error;

1821:
1822: IF l_batch_header_rec.plan_start_date IS NULL
1823: AND l_batch_header_rec.plan_cmplt_date IS NULL THEN
1824: gme_common_pvt.log_message ('GME_NO_NULL_DATES');
1825: RAISE fnd_api.g_exc_error;
1826: END IF;
1827:
1828: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending) THEN
1829: IF l_batch_header_rec.plan_start_date IS NOT NULL

Line 1835: RAISE fnd_api.g_exc_error;

1831: AND l_batch_header_rec.plan_start_date >
1832: l_batch_header_rec.plan_cmplt_date THEN
1833: --Bug#5439736 replaced the message
1834: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
1835: RAISE fnd_api.g_exc_error;
1836: END IF;
1837: ELSIF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip) THEN
1838: IF l_batch_header_rec.plan_cmplt_date IS NULL THEN
1839: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');

Line 1840: RAISE fnd_api.g_exc_error;

1836: END IF;
1837: ELSIF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip) THEN
1838: IF l_batch_header_rec.plan_cmplt_date IS NULL THEN
1839: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
1840: RAISE fnd_api.g_exc_error;
1841: ELSE
1842: IF NVL (l_batch_header_rec.plan_start_date
1843: ,l_batch_header_rec.plan_start_date) <>
1844: l_batch_header_rec.plan_start_date THEN

Line 1846: RAISE fnd_api.g_exc_error;

1842: IF NVL (l_batch_header_rec.plan_start_date
1843: ,l_batch_header_rec.plan_start_date) <>
1844: l_batch_header_rec.plan_start_date THEN
1845: gme_common_pvt.log_message ('GME_NO_PLAN_DT_UPD');
1846: RAISE fnd_api.g_exc_error;
1847: END IF;
1848:
1849: IF l_batch_header_rec.plan_cmplt_date <
1850: l_batch_header_rec.plan_start_date THEN

Line 1852: RAISE fnd_api.g_exc_error;

1848:
1849: IF l_batch_header_rec.plan_cmplt_date <
1850: l_batch_header_rec.plan_start_date THEN
1851: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
1852: RAISE fnd_api.g_exc_error;
1853: END IF;
1854: END IF;
1855: ELSE /* batch status other than pending, WIP */
1856: -- Batch cannot be rescheduled. Batch must have a status of pending or WIP to be rescheduled.

Line 1858: RAISE fnd_api.g_exc_error;

1854: END IF;
1855: ELSE /* batch status other than pending, WIP */
1856: -- Batch cannot be rescheduled. Batch must have a status of pending or WIP to be rescheduled.
1857: gme_common_pvt.log_message ('GME_API_INV_BATCH_RESCHED');
1858: RAISE fnd_api.g_exc_error;
1859: END IF;
1860: /* Check plan_start_date > plan_cmplt_date if batch_status = pending */
1861: IF p_use_workday_cal IS NOT NULL THEN
1862: IF p_use_workday_cal IN (fnd_api.g_true, fnd_api.g_false) THEN

Line 1862: IF p_use_workday_cal IN (fnd_api.g_true, fnd_api.g_false) THEN

1858: RAISE fnd_api.g_exc_error;
1859: END IF;
1860: /* Check plan_start_date > plan_cmplt_date if batch_status = pending */
1861: IF p_use_workday_cal IS NOT NULL THEN
1862: IF p_use_workday_cal IN (fnd_api.g_true, fnd_api.g_false) THEN
1863: l_use := p_use_workday_cal;
1864: ELSE
1865: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
1866: ,'FIELD_NAME'

Line 1868: RAISE fnd_api.g_exc_error;

1864: ELSE
1865: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
1866: ,'FIELD_NAME'
1867: ,'p_use_workday_cal');
1868: RAISE fnd_api.g_exc_error;
1869: END IF;
1870: IF p_contiguity_override IS NOT NULL THEN
1871: IF p_contiguity_override NOT IN
1872: (fnd_api.g_true, fnd_api.g_false) THEN

Line 1872: (fnd_api.g_true, fnd_api.g_false) THEN

1868: RAISE fnd_api.g_exc_error;
1869: END IF;
1870: IF p_contiguity_override IS NOT NULL THEN
1871: IF p_contiguity_override NOT IN
1872: (fnd_api.g_true, fnd_api.g_false) THEN
1873: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
1874: ,'FIELD_NAME'
1875: ,'p_contiguity_override');
1876: RAISE fnd_api.g_exc_error;

Line 1876: RAISE fnd_api.g_exc_error;

1872: (fnd_api.g_true, fnd_api.g_false) THEN
1873: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
1874: ,'FIELD_NAME'
1875: ,'p_contiguity_override');
1876: RAISE fnd_api.g_exc_error;
1877: END IF;
1878: END IF;
1879: ELSE
1880: l_use := fnd_api.g_false;

Line 1880: l_use := fnd_api.g_false;

1876: RAISE fnd_api.g_exc_error;
1877: END IF;
1878: END IF;
1879: ELSE
1880: l_use := fnd_api.g_false;
1881: END IF; /* p_use_workday_cal IS NOT NULL */
1882:
1883: IF l_use = fnd_api.g_true THEN
1884: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN

Line 1883: IF l_use = fnd_api.g_true THEN

1879: ELSE
1880: l_use := fnd_api.g_false;
1881: END IF; /* p_use_workday_cal IS NOT NULL */
1882:
1883: IF l_use = fnd_api.g_true THEN
1884: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
1885: -- Check if plan_start_date falls on non working day for pending batch.
1886: IF l_batch_header_rec.batch_status =
1887: gme_common_pvt.g_batch_pending

Line 1901: RAISE fnd_api.g_exc_error;

1897: ('GME_NON_WORKING_TIME'
1898: ,'PDATE'
1899: ,TO_CHAR (l_batch_header_rec.plan_start_date
1900: ,'DD-MON-YYYY HH24:MI:SS') );
1901: RAISE fnd_api.g_exc_error;
1902: END IF;
1903: END IF;
1904:
1905: /* l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending */

Line 1924: RAISE fnd_api.g_exc_error;

1920: ('GME_NON_WORKING_TIME'
1921: ,'PDATE'
1922: ,TO_CHAR (l_batch_header_rec.plan_cmplt_date
1923: ,'DD-MON-YYYY HH24:MI:SS') );
1924: RAISE fnd_api.g_exc_error;
1925: END IF;
1926: END IF;
1927:
1928: /* l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) */

Line 1940: RAISE fnd_api.g_exc_error;

1936: ,0
1937: ,l_return_status) THEN
1938: gme_common_pvt.log_message ('GME_NON_WORKING_TIME' ,'PDATE'
1939: ,TO_CHAR (SYSDATE,'DD-MON-YYYY HH24:MI:SS') );
1940: RAISE fnd_api.g_exc_error;
1941: END IF;
1942: END IF; /* l_batch_header_rec.plan_cmplt_date IS NULL */
1943: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */
1944: END IF; /* l_use = FND_API.G_TRUE */

Line 1944: END IF; /* l_use = FND_API.G_TRUE */

1940: RAISE fnd_api.g_exc_error;
1941: END IF;
1942: END IF; /* l_batch_header_rec.plan_cmplt_date IS NULL */
1943: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */
1944: END IF; /* l_use = FND_API.G_TRUE */
1945:
1946: IF (g_debug = gme_debug.g_log_statement) THEN
1947: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':'
1948: || 'Calling Main Reschedule Batch');

Line 1954: ,p_init_msg_list => fnd_api.g_false

1950:
1951: l_batch_header_rec.plan_start_date := p_batch_header_rec.plan_start_date;
1952: gme_api_main.reschedule_batch
1953: (p_validation_level => p_validation_level
1954: ,p_init_msg_list => fnd_api.g_false
1955: ,p_batch_header_rec => l_batch_header_rec
1956: ,p_use_workday_cal => l_use
1957: ,p_contiguity_override => p_contiguity_override
1958: ,x_message_count => x_message_count

Line 1969: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1965: ( 'Came back from Main Reschedule Batch with status '
1966: || x_return_status);
1967: END IF;
1968:
1969: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1970: RAISE reschedule_batch_failed;
1971: ELSE
1972: IF p_commit = fnd_api.g_true THEN
1973: gme_api_pub.save_batch (p_header_id => NULL

Line 1972: IF p_commit = fnd_api.g_true THEN

1968:
1969: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1970: RAISE reschedule_batch_failed;
1971: ELSE
1972: IF p_commit = fnd_api.g_true THEN
1973: gme_api_pub.save_batch (p_header_id => NULL
1974: ,p_table => NULL
1975: ,p_commit => fnd_api.g_false
1976: ,x_return_status => x_return_status);

Line 1975: ,p_commit => fnd_api.g_false

1971: ELSE
1972: IF p_commit = fnd_api.g_true THEN
1973: gme_api_pub.save_batch (p_header_id => NULL
1974: ,p_table => NULL
1975: ,p_commit => fnd_api.g_false
1976: ,x_return_status => x_return_status);
1977:
1978: IF x_return_status = fnd_api.g_ret_sts_success THEN
1979: COMMIT;

Line 1978: IF x_return_status = fnd_api.g_ret_sts_success THEN

1974: ,p_table => NULL
1975: ,p_commit => fnd_api.g_false
1976: ,x_return_status => x_return_status);
1977:
1978: IF x_return_status = fnd_api.g_ret_sts_success THEN
1979: COMMIT;
1980: ELSE
1981: RAISE fnd_api.g_exc_error;
1982: END IF;

Line 1981: RAISE fnd_api.g_exc_error;

1977:
1978: IF x_return_status = fnd_api.g_ret_sts_success THEN
1979: COMMIT;
1980: ELSE
1981: RAISE fnd_api.g_exc_error;
1982: END IF;
1983: END IF;
1984: END IF;
1985:

Line 1992: WHEN fnd_api.g_exc_error THEN

1988: 'Exiting with ' || x_return_status || ' at '
1989: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1990: END IF;
1991: EXCEPTION
1992: WHEN fnd_api.g_exc_error THEN
1993: ROLLBACK TO SAVEPOINT reschedule_batch;
1994: x_batch_header_rec := NULL;
1995: x_return_status := fnd_api.g_ret_sts_error;
1996: gme_common_pvt.count_and_get (x_count => x_message_count

Line 1995: x_return_status := fnd_api.g_ret_sts_error;

1991: EXCEPTION
1992: WHEN fnd_api.g_exc_error THEN
1993: ROLLBACK TO SAVEPOINT reschedule_batch;
1994: x_batch_header_rec := NULL;
1995: x_return_status := fnd_api.g_ret_sts_error;
1996: gme_common_pvt.count_and_get (x_count => x_message_count
1997: ,p_encoded => fnd_api.g_false
1998: ,x_data => x_message_list);
1999: WHEN reschedule_batch_failed THEN

Line 1997: ,p_encoded => fnd_api.g_false

1993: ROLLBACK TO SAVEPOINT reschedule_batch;
1994: x_batch_header_rec := NULL;
1995: x_return_status := fnd_api.g_ret_sts_error;
1996: gme_common_pvt.count_and_get (x_count => x_message_count
1997: ,p_encoded => fnd_api.g_false
1998: ,x_data => x_message_list);
1999: WHEN reschedule_batch_failed THEN
2000: ROLLBACK TO SAVEPOINT reschedule_batch;
2001: x_batch_header_rec := NULL;

Line 2003: ,p_encoded => fnd_api.g_false

1999: WHEN reschedule_batch_failed THEN
2000: ROLLBACK TO SAVEPOINT reschedule_batch;
2001: x_batch_header_rec := NULL;
2002: gme_common_pvt.count_and_get (x_count => x_message_count
2003: ,p_encoded => fnd_api.g_false
2004: ,x_data => x_message_list);
2005: WHEN OTHERS THEN
2006: ROLLBACK TO SAVEPOINT reschedule_batch;
2007: x_batch_header_rec := NULL;

Line 2055: x_return_status := fnd_api.g_ret_sts_success;

2051: || 'Entering');
2052: END IF;
2053:
2054: /* Set the return status to success initially */
2055: x_return_status := fnd_api.g_ret_sts_success;
2056:
2057: /* Set savepoint here */
2058: SAVEPOINT reschedule_step;
2059:

Line 2061: IF p_init_msg_list = fnd_api.g_true THEN

2057: /* Set savepoint here */
2058: SAVEPOINT reschedule_step;
2059:
2060: /* Initialize message list and count if needed */
2061: IF p_init_msg_list = fnd_api.g_true THEN
2062: fnd_msg_pub.initialize;
2063: END IF;
2064:
2065: /* Validate Input parameters */

Line 2076: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2072: ,x_message_count => x_message_count
2073: ,x_message_list => x_message_list
2074: ,x_return_status => x_return_status) ;
2075:
2076: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2077: IF (g_debug = gme_debug.g_log_statement) THEN
2078: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
2079: || ': batch step validate error ');
2080: END IF;

Line 2081: RAISE fnd_api.g_exc_error;

2077: IF (g_debug = gme_debug.g_log_statement) THEN
2078: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
2079: || ': batch step validate error ');
2080: END IF;
2081: RAISE fnd_api.g_exc_error;
2082: END IF;
2083:
2084: /* Make sure we are call compatible */
2085: IF NOT fnd_api.compatible_api_call (2.0

Line 2085: IF NOT fnd_api.compatible_api_call (2.0

2081: RAISE fnd_api.g_exc_error;
2082: END IF;
2083:
2084: /* Make sure we are call compatible */
2085: IF NOT fnd_api.compatible_api_call (2.0
2086: ,p_api_version
2087: ,'reschedule_batch_step'
2088: ,g_pkg_name) THEN
2089: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 2090: RAISE fnd_api.g_exc_error;

2086: ,p_api_version
2087: ,'reschedule_batch_step'
2088: ,g_pkg_name) THEN
2089: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2090: RAISE fnd_api.g_exc_error;
2091: END IF;
2092:
2093: /* Navin: Check whether both l_batch_step_rec.plan_start_date, l_batch_step_rec.plan_cmplt_date are null. If so, RAISE error; */
2094: IF p_batch_step_rec.plan_start_date IS NULL

Line 2098: RAISE fnd_api.g_exc_error;

2094: IF p_batch_step_rec.plan_start_date IS NULL
2095: AND p_batch_step_rec.plan_cmplt_date IS NULL THEN
2096: -- Both planned start and planned completion dates cannot be null.
2097: gme_common_pvt.log_message ('GME_NO_NULL_DATES');
2098: RAISE fnd_api.g_exc_error;
2099: END IF;
2100:
2101: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN
2102: -- You cannot reschedule steps for firm planned orders.

Line 2105: RAISE fnd_api.g_exc_error;

2101: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN
2102: -- You cannot reschedule steps for firm planned orders.
2103: gme_common_pvt.log_message ('GME_FPO_STEP_RESCH_ERR');
2104: -- Navin: PENDING: New Message
2105: RAISE fnd_api.g_exc_error;
2106: END IF;
2107:
2108: IF p_reschedule_preceding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN
2109: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

Line 2108: IF p_reschedule_preceding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN

2104: -- Navin: PENDING: New Message
2105: RAISE fnd_api.g_exc_error;
2106: END IF;
2107:
2108: IF p_reschedule_preceding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN
2109: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2110: ,'FIELD_NAME'
2111: ,'p_reschedule_preceding');
2112: RAISE fnd_api.g_exc_error;

Line 2112: RAISE fnd_api.g_exc_error;

2108: IF p_reschedule_preceding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN
2109: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2110: ,'FIELD_NAME'
2111: ,'p_reschedule_preceding');
2112: RAISE fnd_api.g_exc_error;
2113: END IF;
2114:
2115: IF p_reschedule_succeeding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN
2116: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

Line 2115: IF p_reschedule_succeeding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN

2111: ,'p_reschedule_preceding');
2112: RAISE fnd_api.g_exc_error;
2113: END IF;
2114:
2115: IF p_reschedule_succeeding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN
2116: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2117: ,'FIELD_NAME'
2118: ,'p_reschedule_succeeding');
2119: RAISE fnd_api.g_exc_error;

Line 2119: RAISE fnd_api.g_exc_error;

2115: IF p_reschedule_succeeding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN
2116: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2117: ,'FIELD_NAME'
2118: ,'p_reschedule_succeeding');
2119: RAISE fnd_api.g_exc_error;
2120: END IF;
2121:
2122: l_batch_step_rec.plan_start_date := p_batch_step_rec.plan_start_date;
2123: l_batch_step_rec.plan_cmplt_date := p_batch_step_rec.plan_cmplt_date;

Line 2133: RAISE fnd_api.g_exc_error;

2129: l_batch_step_rec.plan_cmplt_date THEN
2130: -- The planned start cannot be greater than the planned completion date.
2131: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
2132: -- Navin: PENDING: New Message
2133: RAISE fnd_api.g_exc_error;
2134: END IF;
2135: ELSIF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_wip) THEN
2136: IF l_batch_step_rec.plan_cmplt_date IS NULL THEN
2137: -- Planned completion dates cannot be null for a batch with status of WIP.

Line 2140: RAISE fnd_api.g_exc_error;

2136: IF l_batch_step_rec.plan_cmplt_date IS NULL THEN
2137: -- Planned completion dates cannot be null for a batch with status of WIP.
2138: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
2139: -- Navin: PENDING: New Message
2140: RAISE fnd_api.g_exc_error;
2141: ELSE
2142: IF NVL (l_batch_step_rec.plan_start_date
2143: ,l_batch_step_rec.plan_start_date) <>
2144: l_batch_step_rec.plan_start_date THEN

Line 2148: RAISE fnd_api.g_exc_error;

2144: l_batch_step_rec.plan_start_date THEN
2145: -- Cannot update planned start date.
2146: gme_common_pvt.log_message ('GME_NO_PLAN_DT_UPD');
2147: -- Navin: PENDING: New Message
2148: RAISE fnd_api.g_exc_error;
2149: END IF;
2150:
2151: IF l_batch_step_rec.plan_cmplt_date <
2152: l_batch_step_rec.plan_start_date THEN

Line 2156: RAISE fnd_api.g_exc_error;

2152: l_batch_step_rec.plan_start_date THEN
2153: -- Planned completion date cannot be earlier than the planned start date.
2154: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
2155: -- Navin: PENDING: New Message
2156: RAISE fnd_api.g_exc_error;
2157: END IF;
2158: END IF;
2159: ELSE /*step status other than pending, WIP */
2160: --Bug#5439736

Line 2162: RAISE fnd_api.g_exc_error;

2158: END IF;
2159: ELSE /*step status other than pending, WIP */
2160: --Bug#5439736
2161: gme_common_pvt.log_message ('GME_API_INV_STEP_STAT_RESCH');
2162: RAISE fnd_api.g_exc_error;
2163: END IF;
2164:
2165: -- When enforce_step_dependency option is enforced then override Reschedule_preceding, Reschedule_succeeding fields.
2166: IF l_batch_header_rec.enforce_step_dependency = 1 THEN

Line 2167: l_reschedule_preceding := fnd_api.g_true;

2163: END IF;
2164:
2165: -- When enforce_step_dependency option is enforced then override Reschedule_preceding, Reschedule_succeeding fields.
2166: IF l_batch_header_rec.enforce_step_dependency = 1 THEN
2167: l_reschedule_preceding := fnd_api.g_true;
2168: l_reschedule_succeeding := fnd_api.g_true;
2169: ELSE
2170: l_reschedule_preceding := p_reschedule_preceding;
2171: l_reschedule_succeeding := p_reschedule_succeeding;

Line 2168: l_reschedule_succeeding := fnd_api.g_true;

2164:
2165: -- When enforce_step_dependency option is enforced then override Reschedule_preceding, Reschedule_succeeding fields.
2166: IF l_batch_header_rec.enforce_step_dependency = 1 THEN
2167: l_reschedule_preceding := fnd_api.g_true;
2168: l_reschedule_succeeding := fnd_api.g_true;
2169: ELSE
2170: l_reschedule_preceding := p_reschedule_preceding;
2171: l_reschedule_succeeding := p_reschedule_succeeding;
2172: END IF;

Line 2175: IF p_use_workday_cal IN (fnd_api.g_true, fnd_api.g_false) THEN

2171: l_reschedule_succeeding := p_reschedule_succeeding;
2172: END IF;
2173:
2174: IF p_use_workday_cal IS NOT NULL THEN
2175: IF p_use_workday_cal IN (fnd_api.g_true, fnd_api.g_false) THEN
2176: l_use := p_use_workday_cal;
2177: ELSE
2178: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2179: ,'FIELD_NAME'

Line 2181: RAISE fnd_api.g_exc_error;

2177: ELSE
2178: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2179: ,'FIELD_NAME'
2180: ,'p_use_workday_cal');
2181: RAISE fnd_api.g_exc_error;
2182: END IF;
2183:
2184: IF p_contiguity_override IS NOT NULL THEN
2185: IF p_contiguity_override NOT IN

Line 2186: (fnd_api.g_true, fnd_api.g_false) THEN

2182: END IF;
2183:
2184: IF p_contiguity_override IS NOT NULL THEN
2185: IF p_contiguity_override NOT IN
2186: (fnd_api.g_true, fnd_api.g_false) THEN
2187: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2188: ,'FIELD_NAME'
2189: ,'p_contiguity_override');
2190: RAISE fnd_api.g_exc_error;

Line 2190: RAISE fnd_api.g_exc_error;

2186: (fnd_api.g_true, fnd_api.g_false) THEN
2187: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2188: ,'FIELD_NAME'
2189: ,'p_contiguity_override');
2190: RAISE fnd_api.g_exc_error;
2191: END IF;
2192: END IF; /* p_contiguity_override */
2193: ELSE
2194: l_use := fnd_api.g_false;

Line 2194: l_use := fnd_api.g_false;

2190: RAISE fnd_api.g_exc_error;
2191: END IF;
2192: END IF; /* p_contiguity_override */
2193: ELSE
2194: l_use := fnd_api.g_false;
2195: END IF; /* p_use_workday_cal IS NOT NULL */
2196:
2197: IF l_use = fnd_api.g_true THEN
2198: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN

Line 2197: IF l_use = fnd_api.g_true THEN

2193: ELSE
2194: l_use := fnd_api.g_false;
2195: END IF; /* p_use_workday_cal IS NOT NULL */
2196:
2197: IF l_use = fnd_api.g_true THEN
2198: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
2199: -- Check if plan_start_date falls on non working day for pending batch step.
2200: IF l_batch_step_rec.step_status =
2201: gme_common_pvt.g_step_pending

Line 2215: RAISE fnd_api.g_exc_error;

2211: ('GME_NON_WORKING_TIME'
2212: ,'PDATE'
2213: ,TO_CHAR (l_batch_step_rec.plan_start_date
2214: ,'DD-MON-YYYY HH24:MI:SS') );
2215: RAISE fnd_api.g_exc_error;
2216: END IF;
2217: END IF;
2218:
2219: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch step.

Line 2238: RAISE fnd_api.g_exc_error;

2234: ('GME_NON_WORKING_TIME'
2235: ,'PDATE'
2236: ,TO_CHAR (l_batch_step_rec.plan_cmplt_date
2237: ,'DD-MON-YYYY HH24:MI:SS') );
2238: RAISE fnd_api.g_exc_error;
2239: END IF;
2240: END IF;
2241:
2242: IF l_batch_step_rec.plan_cmplt_date IS NULL

Line 2256: RAISE fnd_api.g_exc_error;

2252: ('GME_NON_WORKING_TIME'
2253: ,'PDATE'
2254: ,TO_CHAR (SYSDATE
2255: ,'DD-MON-YYYY HH24:MI:SS') );
2256: RAISE fnd_api.g_exc_error;
2257: END IF;
2258: END IF; /* l_batch_step_rec.plan_cmplt_date IS NULL */
2259: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */
2260: END IF; /* l_use = FND_API.G_TRUE */

Line 2260: END IF; /* l_use = FND_API.G_TRUE */

2256: RAISE fnd_api.g_exc_error;
2257: END IF;
2258: END IF; /* l_batch_step_rec.plan_cmplt_date IS NULL */
2259: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */
2260: END IF; /* l_use = FND_API.G_TRUE */
2261:
2262: IF (g_debug = gme_debug.g_log_statement) THEN
2263: gme_debug.put_line ( g_pkg_name
2264: || '.'

Line 2272: ,p_init_msg_list => fnd_api.g_false

2268: END IF;
2269:
2270: gme_api_main.reschedule_step
2271: (p_validation_level => p_validation_level
2272: ,p_init_msg_list => fnd_api.g_false
2273: ,p_batch_header_rec => l_batch_header_rec
2274: ,p_batch_step_rec => l_batch_step_rec
2275: ,p_reschedule_preceding => p_reschedule_preceding
2276: ,p_reschedule_succeeding => p_reschedule_succeeding

Line 2290: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2286: ( 'Came back from Main Reschedule Step with status '
2287: || x_return_status);
2288: END IF;
2289:
2290: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2291: RAISE reschedule_step_failed;
2292: ELSE
2293: IF p_commit = fnd_api.g_true THEN
2294: gme_api_pub.save_batch (p_header_id => NULL

Line 2293: IF p_commit = fnd_api.g_true THEN

2289:
2290: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2291: RAISE reschedule_step_failed;
2292: ELSE
2293: IF p_commit = fnd_api.g_true THEN
2294: gme_api_pub.save_batch (p_header_id => NULL
2295: ,p_table => NULL
2296: ,p_commit => fnd_api.g_false
2297: ,x_return_status => x_return_status);

Line 2296: ,p_commit => fnd_api.g_false

2292: ELSE
2293: IF p_commit = fnd_api.g_true THEN
2294: gme_api_pub.save_batch (p_header_id => NULL
2295: ,p_table => NULL
2296: ,p_commit => fnd_api.g_false
2297: ,x_return_status => x_return_status);
2298:
2299: IF x_return_status = fnd_api.g_ret_sts_success THEN
2300: COMMIT;

Line 2299: IF x_return_status = fnd_api.g_ret_sts_success THEN

2295: ,p_table => NULL
2296: ,p_commit => fnd_api.g_false
2297: ,x_return_status => x_return_status);
2298:
2299: IF x_return_status = fnd_api.g_ret_sts_success THEN
2300: COMMIT;
2301: ELSE
2302: RAISE fnd_api.g_exc_error;
2303: END IF;

Line 2302: RAISE fnd_api.g_exc_error;

2298:
2299: IF x_return_status = fnd_api.g_ret_sts_success THEN
2300: COMMIT;
2301: ELSE
2302: RAISE fnd_api.g_exc_error;
2303: END IF;
2304: END IF;
2305: END IF;
2306:

Line 2322: ,p_encoded => fnd_api.g_false

2318: WHEN reschedule_step_failed THEN
2319: ROLLBACK TO SAVEPOINT reschedule_step;
2320: x_batch_step_rec := NULL;
2321: gme_common_pvt.count_and_get (x_count => x_message_count
2322: ,p_encoded => fnd_api.g_false
2323: ,x_data => x_message_list);
2324: WHEN fnd_api.g_exc_error THEN
2325: ROLLBACK TO SAVEPOINT reschedule_step;
2326: x_return_status := fnd_api.g_ret_sts_error;

Line 2324: WHEN fnd_api.g_exc_error THEN

2320: x_batch_step_rec := NULL;
2321: gme_common_pvt.count_and_get (x_count => x_message_count
2322: ,p_encoded => fnd_api.g_false
2323: ,x_data => x_message_list);
2324: WHEN fnd_api.g_exc_error THEN
2325: ROLLBACK TO SAVEPOINT reschedule_step;
2326: x_return_status := fnd_api.g_ret_sts_error;
2327: gme_common_pvt.count_and_get (x_count => x_message_count
2328: ,p_encoded => fnd_api.g_false

Line 2326: x_return_status := fnd_api.g_ret_sts_error;

2322: ,p_encoded => fnd_api.g_false
2323: ,x_data => x_message_list);
2324: WHEN fnd_api.g_exc_error THEN
2325: ROLLBACK TO SAVEPOINT reschedule_step;
2326: x_return_status := fnd_api.g_ret_sts_error;
2327: gme_common_pvt.count_and_get (x_count => x_message_count
2328: ,p_encoded => fnd_api.g_false
2329: ,x_data => x_message_list);
2330: WHEN OTHERS THEN

Line 2328: ,p_encoded => fnd_api.g_false

2324: WHEN fnd_api.g_exc_error THEN
2325: ROLLBACK TO SAVEPOINT reschedule_step;
2326: x_return_status := fnd_api.g_ret_sts_error;
2327: gme_common_pvt.count_and_get (x_count => x_message_count
2328: ,p_encoded => fnd_api.g_false
2329: ,x_data => x_message_list);
2330: WHEN OTHERS THEN
2331: ROLLBACK TO SAVEPOINT reschedule_step;
2332: x_batch_step_rec := NULL;

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

2340: PROCEDURE create_batch_reservations (
2341: p_api_version IN NUMBER := 2.0
2342: ,p_validation_level IN NUMBER
2343: := gme_common_pvt.g_max_errors
2344: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2345: ,p_commit IN VARCHAR2 := fnd_api.g_false
2346: ,p_batch_rec IN gme_batch_header%ROWTYPE
2347: ,p_org_code IN VARCHAR2
2348: ,x_message_count OUT NOCOPY NUMBER

Line 2345: ,p_commit IN VARCHAR2 := fnd_api.g_false

2341: p_api_version IN NUMBER := 2.0
2342: ,p_validation_level IN NUMBER
2343: := gme_common_pvt.g_max_errors
2344: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2345: ,p_commit IN VARCHAR2 := fnd_api.g_false
2346: ,p_batch_rec IN gme_batch_header%ROWTYPE
2347: ,p_org_code IN VARCHAR2
2348: ,x_message_count OUT NOCOPY NUMBER
2349: ,x_message_list OUT NOCOPY VARCHAR2

Line 2363: x_return_status := fnd_api.g_ret_sts_success;

2359:
2360: /* Set the savepoint */
2361: SAVEPOINT create_batch_reservations;
2362: /* Set the return status to success initially */
2363: x_return_status := fnd_api.g_ret_sts_success;
2364:
2365: IF g_debug <> -1 THEN
2366: gme_debug.log_initialize ('CreateBatchReservations');
2367: END IF;

Line 2370: IF NOT fnd_api.compatible_api_call (2.0

2366: gme_debug.log_initialize ('CreateBatchReservations');
2367: END IF;
2368:
2369: /* Make sure we are call compatible */
2370: IF NOT fnd_api.compatible_api_call (2.0
2371: ,p_api_version
2372: ,'insert_batchstep_resource'
2373: ,g_pkg_name) THEN
2374: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 2375: RAISE fnd_api.g_exc_error;

2371: ,p_api_version
2372: ,'insert_batchstep_resource'
2373: ,g_pkg_name) THEN
2374: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2375: RAISE fnd_api.g_exc_error;
2376: END IF;
2377:
2378: /* Initialize message list and count if needed */
2379: IF p_init_msg_list = fnd_api.g_true THEN

Line 2379: IF p_init_msg_list = fnd_api.g_true THEN

2375: RAISE fnd_api.g_exc_error;
2376: END IF;
2377:
2378: /* Initialize message list and count if needed */
2379: IF p_init_msg_list = fnd_api.g_true THEN
2380: fnd_msg_pub.initialize;
2381: END IF;
2382:
2383: gme_common_pvt.set_timestamp;

Line 2387: RAISE fnd_api.g_exc_error;

2383: gme_common_pvt.set_timestamp;
2384:
2385: /* IF p_batch_rec.batch_no IS NULL AND p_batch_rec.batch_id IS NULL THEN
2386: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
2387: RAISE fnd_api.g_exc_error;
2388: END IF; */
2389: gme_common_pvt.validate_batch
2390: (p_batch_header_rec => p_batch_rec
2391: ,p_org_code => p_org_code

Line 2398: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2394: ,x_message_count => x_message_count
2395: ,x_message_list => x_message_list
2396: ,x_return_status => x_return_status );
2397:
2398: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2399: IF (g_debug = gme_debug.g_log_statement) THEN
2400: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
2401: || ': batch validate error ');
2402: END IF;

Line 2403: RAISE fnd_api.g_exc_error;

2399: IF (g_debug = gme_debug.g_log_statement) THEN
2400: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
2401: || ': batch validate error ');
2402: END IF;
2403: RAISE fnd_api.g_exc_error;
2404: END IF;
2405:
2406: /* Verify Batch to be in pending or WIP status */
2407: IF l_batch_header_rec.batch_status NOT IN

Line 2412: RAISE fnd_api.g_exc_error;

2408: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2409: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2410: ,'PROCESS'
2411: ,'CREATE_LINE_RESERVATIONS');
2412: RAISE fnd_api.g_exc_error;
2413: END IF;
2414:
2415: gme_api_main.create_batch_reservations
2416: (p_init_msg_list => p_init_msg_list

Line 2427: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2423: gme_debug.put_line ( 'create batch reservations returns '
2424: || x_return_status);
2425: END IF;
2426:
2427: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2428: RAISE fnd_api.g_exc_error;
2429: END IF;
2430:
2431: IF p_commit = fnd_api.g_true THEN

Line 2428: RAISE fnd_api.g_exc_error;

2424: || x_return_status);
2425: END IF;
2426:
2427: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2428: RAISE fnd_api.g_exc_error;
2429: END IF;
2430:
2431: IF p_commit = fnd_api.g_true THEN
2432: COMMIT;

Line 2431: IF p_commit = fnd_api.g_true THEN

2427: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2428: RAISE fnd_api.g_exc_error;
2429: END IF;
2430:
2431: IF p_commit = fnd_api.g_true THEN
2432: COMMIT;
2433: END IF;
2434:
2435: gme_debug.put_line ( 'End of Create_Batch_Reservations at '

Line 2439: WHEN fnd_api.g_exc_error THEN

2435: gme_debug.put_line ( 'End of Create_Batch_Reservations at '
2436: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2437: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2438: EXCEPTION
2439: WHEN fnd_api.g_exc_error THEN
2440: x_return_status := fnd_api.g_ret_sts_error;
2441: ROLLBACK TO SAVEPOINT create_batch_reservations;
2442: gme_common_pvt.count_and_get(x_count => x_message_count
2443: ,p_encoded => fnd_api.g_false

Line 2440: x_return_status := fnd_api.g_ret_sts_error;

2436: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2437: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2438: EXCEPTION
2439: WHEN fnd_api.g_exc_error THEN
2440: x_return_status := fnd_api.g_ret_sts_error;
2441: ROLLBACK TO SAVEPOINT create_batch_reservations;
2442: gme_common_pvt.count_and_get(x_count => x_message_count
2443: ,p_encoded => fnd_api.g_false
2444: ,x_data => x_message_list);

Line 2443: ,p_encoded => fnd_api.g_false

2439: WHEN fnd_api.g_exc_error THEN
2440: x_return_status := fnd_api.g_ret_sts_error;
2441: ROLLBACK TO SAVEPOINT create_batch_reservations;
2442: gme_common_pvt.count_and_get(x_count => x_message_count
2443: ,p_encoded => fnd_api.g_false
2444: ,x_data => x_message_list);
2445: WHEN OTHERS THEN
2446: ROLLBACK TO SAVEPOINT create_batch_reservations;
2447: gme_when_others ( p_api_name => l_api_name

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

2453: PROCEDURE create_line_reservations (
2454: p_api_version IN NUMBER := 2.0
2455: ,p_validation_level IN NUMBER
2456: := gme_common_pvt.g_max_errors
2457: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2458: ,p_commit IN VARCHAR2 := fnd_api.g_false
2459: ,p_material_detail_id IN NUMBER
2460: ,p_org_code IN VARCHAR2
2461: ,p_batch_no IN VARCHAR2

Line 2458: ,p_commit IN VARCHAR2 := fnd_api.g_false

2454: p_api_version IN NUMBER := 2.0
2455: ,p_validation_level IN NUMBER
2456: := gme_common_pvt.g_max_errors
2457: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2458: ,p_commit IN VARCHAR2 := fnd_api.g_false
2459: ,p_material_detail_id IN NUMBER
2460: ,p_org_code IN VARCHAR2
2461: ,p_batch_no IN VARCHAR2
2462: ,p_line_no IN NUMBER

Line 2481: x_return_status := fnd_api.g_ret_sts_success;

2477:
2478: /* Set the savepoint */
2479: SAVEPOINT create_line_reservations;
2480: /* Set the return status to success initially */
2481: x_return_status := fnd_api.g_ret_sts_success;
2482:
2483: IF g_debug <> -1 THEN
2484: gme_debug.log_initialize ('CreateLineReservations');
2485: END IF;

Line 2488: IF NOT fnd_api.compatible_api_call (2.0

2484: gme_debug.log_initialize ('CreateLineReservations');
2485: END IF;
2486:
2487: /* Make sure we are call compatible */
2488: IF NOT fnd_api.compatible_api_call (2.0
2489: ,p_api_version
2490: ,'insert_batchstep_resource'
2491: ,g_pkg_name) THEN
2492: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 2493: RAISE fnd_api.g_exc_error;

2489: ,p_api_version
2490: ,'insert_batchstep_resource'
2491: ,g_pkg_name) THEN
2492: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2493: RAISE fnd_api.g_exc_error;
2494: END IF;
2495:
2496: /* Initialize message list and count if needed */
2497: IF p_init_msg_list = fnd_api.g_true THEN

Line 2497: IF p_init_msg_list = fnd_api.g_true THEN

2493: RAISE fnd_api.g_exc_error;
2494: END IF;
2495:
2496: /* Initialize message list and count if needed */
2497: IF p_init_msg_list = fnd_api.g_true THEN
2498: fnd_msg_pub.initialize;
2499: END IF;
2500:
2501: gme_common_pvt.set_timestamp;

Line 2518: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2514: ,x_material_detail_rec => l_material_details_rec_out
2515: ,x_message_count => x_message_count
2516: ,x_message_list => x_message_list
2517: ,x_return_status => x_return_status );
2518: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2519: IF (g_debug = gme_debug.g_log_statement) THEN
2520: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
2521: || ': batch mateiral validate error ');
2522: END IF;

Line 2523: RAISE fnd_api.g_exc_error;

2519: IF (g_debug = gme_debug.g_log_statement) THEN
2520: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
2521: || ': batch mateiral validate error ');
2522: END IF;
2523: RAISE fnd_api.g_exc_error;
2524: END IF;
2525: l_material_details_rec := l_material_details_rec_out;
2526:
2527: /* Reservation cannot be against a phantom */

Line 2530: RAISE fnd_api.g_exc_error;

2526:
2527: /* Reservation cannot be against a phantom */
2528: IF l_material_details_rec.phantom_type IN (1, 2) THEN
2529: gme_common_pvt.log_message ('GME_INVALID_RSV_FOR_PHANTOM');
2530: RAISE fnd_api.g_exc_error;
2531: END IF;
2532:
2533: /* Reservation cannot be against a phantom */
2534: IF l_material_details_rec.line_type <> -1 THEN

Line 2536: RAISE fnd_api.g_exc_error;

2532:
2533: /* Reservation cannot be against a phantom */
2534: IF l_material_details_rec.line_type <> -1 THEN
2535: gme_common_pvt.log_message ('GME_INVALID_LINE_FOR_RSV');
2536: RAISE fnd_api.g_exc_error;
2537: END IF;
2538:
2539: /* Verify that update_inventory is permitted for this batch */
2540: IF l_batch_header_rec.update_inventory_ind <> 'Y' THEN

Line 2542: RAISE fnd_api.g_exc_error;

2538:
2539: /* Verify that update_inventory is permitted for this batch */
2540: IF l_batch_header_rec.update_inventory_ind <> 'Y' THEN
2541: gme_common_pvt.log_message ('GME_INVENTORY_UPDATE_BLOCKED');
2542: RAISE fnd_api.g_exc_error;
2543: END IF;
2544:
2545: -- gme_debug.put_line(l_batch_header_rec.batch_status);
2546:

Line 2553: RAISE fnd_api.g_exc_error;

2549: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2550: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2551: ,'PROCESS'
2552: ,'CREATE_RESERVATION');
2553: RAISE fnd_api.g_exc_error;
2554: END IF;
2555:
2556: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
2557: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');

Line 2558: RAISE fnd_api.g_exc_error;

2554: END IF;
2555:
2556: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
2557: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
2558: RAISE fnd_api.g_exc_error;
2559: END IF;
2560: gme_api_main.create_line_reservations
2561: (p_init_msg_list => p_init_msg_list
2562: ,p_matl_dtl_rec => l_material_details_rec

Line 2572: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2568: gme_debug.put_line ( 'create line reservation returns '
2569: || x_return_status);
2570: END IF;
2571:
2572: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2573: RAISE fnd_api.g_exc_error;
2574: END IF;
2575:
2576: IF p_commit = fnd_api.g_true THEN

Line 2573: RAISE fnd_api.g_exc_error;

2569: || x_return_status);
2570: END IF;
2571:
2572: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2573: RAISE fnd_api.g_exc_error;
2574: END IF;
2575:
2576: IF p_commit = fnd_api.g_true THEN
2577: COMMIT;

Line 2576: IF p_commit = fnd_api.g_true THEN

2572: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2573: RAISE fnd_api.g_exc_error;
2574: END IF;
2575:
2576: IF p_commit = fnd_api.g_true THEN
2577: COMMIT;
2578: END IF;
2579:
2580: gme_debug.put_line ( 'End of Create_Line_Reservations at '

Line 2584: WHEN fnd_api.g_exc_error THEN

2580: gme_debug.put_line ( 'End of Create_Line_Reservations at '
2581: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2582: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2583: EXCEPTION
2584: WHEN fnd_api.g_exc_error THEN
2585: x_return_status := fnd_api.g_ret_sts_error;
2586: ROLLBACK TO SAVEPOINT create_line_reservations;
2587: gme_common_pvt.count_and_get(x_count => x_message_count
2588: ,p_encoded => fnd_api.g_false

Line 2585: x_return_status := fnd_api.g_ret_sts_error;

2581: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2582: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2583: EXCEPTION
2584: WHEN fnd_api.g_exc_error THEN
2585: x_return_status := fnd_api.g_ret_sts_error;
2586: ROLLBACK TO SAVEPOINT create_line_reservations;
2587: gme_common_pvt.count_and_get(x_count => x_message_count
2588: ,p_encoded => fnd_api.g_false
2589: ,x_data => x_message_list);

Line 2588: ,p_encoded => fnd_api.g_false

2584: WHEN fnd_api.g_exc_error THEN
2585: x_return_status := fnd_api.g_ret_sts_error;
2586: ROLLBACK TO SAVEPOINT create_line_reservations;
2587: gme_common_pvt.count_and_get(x_count => x_message_count
2588: ,p_encoded => fnd_api.g_false
2589: ,x_data => x_message_list);
2590: WHEN OTHERS THEN
2591: ROLLBACK TO SAVEPOINT create_line_reservations;
2592: gme_when_others ( p_api_name => l_api_name

Line 2632: x_return_status := fnd_api.g_ret_sts_success;

2628: gme_debug.log_initialize ('InsertProcessParameters');
2629: END IF;
2630:
2631: /* Set the return status to success initially */
2632: x_return_status := fnd_api.g_ret_sts_success;
2633:
2634: IF p_init_msg_list = fnd_api.g_true THEN
2635: fnd_msg_pub.initialize;
2636: END IF;

Line 2634: IF p_init_msg_list = fnd_api.g_true THEN

2630:
2631: /* Set the return status to success initially */
2632: x_return_status := fnd_api.g_ret_sts_success;
2633:
2634: IF p_init_msg_list = fnd_api.g_true THEN
2635: fnd_msg_pub.initialize;
2636: END IF;
2637: -- Make sure we are call compatible
2638: IF NOT fnd_api.compatible_api_call (2.0

Line 2638: IF NOT fnd_api.compatible_api_call (2.0

2634: IF p_init_msg_list = fnd_api.g_true THEN
2635: fnd_msg_pub.initialize;
2636: END IF;
2637: -- Make sure we are call compatible
2638: IF NOT fnd_api.compatible_api_call (2.0
2639: ,p_api_version
2640: ,'Insert_process_parameter'
2641: ,g_pkg_name) THEN
2642: x_return_status := fnd_api.g_ret_sts_error;

Line 2642: x_return_status := fnd_api.g_ret_sts_error;

2638: IF NOT fnd_api.compatible_api_call (2.0
2639: ,p_api_version
2640: ,'Insert_process_parameter'
2641: ,g_pkg_name) THEN
2642: x_return_status := fnd_api.g_ret_sts_error;
2643: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
2644: RAISE fnd_api.g_exc_error;
2645: END IF;
2646:

Line 2644: RAISE fnd_api.g_exc_error;

2640: ,'Insert_process_parameter'
2641: ,g_pkg_name) THEN
2642: x_return_status := fnd_api.g_ret_sts_error;
2643: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
2644: RAISE fnd_api.g_exc_error;
2645: END IF;
2646:
2647: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2648:

Line 2653: RAISE fnd_api.g_exc_error;

2649: IF NOT gme_common_pvt.g_setup_done THEN
2650: IF (g_debug = gme_debug.g_log_statement) THEN
2651: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
2652: END IF;
2653: RAISE fnd_api.g_exc_error;
2654: END IF;
2655: IF (g_debug <= gme_debug.g_log_procedure) THEN
2656: gme_debug.put_line ('Calling Insert process parameters');
2657: END IF;

Line 2677: IF x_return_status = fnd_api.g_ret_sts_success THEN

2673: ( 'Came back from Pvt insert process parameter with status '
2674: || x_return_status);
2675: END IF;
2676:
2677: IF x_return_status = fnd_api.g_ret_sts_success THEN
2678: IF p_commit = fnd_api.g_true THEN
2679: COMMIT;
2680: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2681: END IF;

Line 2678: IF p_commit = fnd_api.g_true THEN

2674: || x_return_status);
2675: END IF;
2676:
2677: IF x_return_status = fnd_api.g_ret_sts_success THEN
2678: IF p_commit = fnd_api.g_true THEN
2679: COMMIT;
2680: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2681: END IF;
2682: ELSE

Line 2696: WHEN fnd_api.g_exc_error THEN

2692: || ' at '
2693: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2694: END IF;
2695: EXCEPTION
2696: WHEN fnd_api.g_exc_error THEN
2697: x_return_status := fnd_api.g_ret_sts_error;
2698: ROLLBACK TO SAVEPOINT insert_process_parameter;
2699: gme_common_pvt.count_and_get (x_count => x_message_count
2700: ,p_encoded => fnd_api.g_false

Line 2697: x_return_status := fnd_api.g_ret_sts_error;

2693: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2694: END IF;
2695: EXCEPTION
2696: WHEN fnd_api.g_exc_error THEN
2697: x_return_status := fnd_api.g_ret_sts_error;
2698: ROLLBACK TO SAVEPOINT insert_process_parameter;
2699: gme_common_pvt.count_and_get (x_count => x_message_count
2700: ,p_encoded => fnd_api.g_false
2701: ,x_data => x_message_list);

Line 2700: ,p_encoded => fnd_api.g_false

2696: WHEN fnd_api.g_exc_error THEN
2697: x_return_status := fnd_api.g_ret_sts_error;
2698: ROLLBACK TO SAVEPOINT insert_process_parameter;
2699: gme_common_pvt.count_and_get (x_count => x_message_count
2700: ,p_encoded => fnd_api.g_false
2701: ,x_data => x_message_list);
2702: WHEN insert_parameter_failed THEN
2703: ROLLBACK TO SAVEPOINT insert_process_parameter;
2704: gme_common_pvt.count_and_get (x_count => x_message_count

Line 2705: ,p_encoded => fnd_api.g_false

2701: ,x_data => x_message_list);
2702: WHEN insert_parameter_failed THEN
2703: ROLLBACK TO SAVEPOINT insert_process_parameter;
2704: gme_common_pvt.count_and_get (x_count => x_message_count
2705: ,p_encoded => fnd_api.g_false
2706: ,x_data => x_message_list);
2707: WHEN OTHERS THEN
2708: ROLLBACK TO SAVEPOINT insert_process_parameter;
2709: gme_when_others ( p_api_name => l_api_name

Line 2749: x_return_status := fnd_api.g_ret_sts_success;

2745: gme_debug.log_initialize ('UpdateProcessParameter');
2746: END IF;
2747:
2748: /* Initially let us assign the return status to success */
2749: x_return_status := fnd_api.g_ret_sts_success;
2750:
2751: IF p_init_msg_list = fnd_api.g_true THEN
2752: fnd_msg_pub.initialize;
2753: gme_common_pvt.g_error_count := 0;

Line 2751: IF p_init_msg_list = fnd_api.g_true THEN

2747:
2748: /* Initially let us assign the return status to success */
2749: x_return_status := fnd_api.g_ret_sts_success;
2750:
2751: IF p_init_msg_list = fnd_api.g_true THEN
2752: fnd_msg_pub.initialize;
2753: gme_common_pvt.g_error_count := 0;
2754: END IF;
2755:

Line 2757: IF NOT fnd_api.compatible_api_call (2.0

2753: gme_common_pvt.g_error_count := 0;
2754: END IF;
2755:
2756: -- Make sure we are call compatible
2757: IF NOT fnd_api.compatible_api_call (2.0
2758: ,p_api_version
2759: ,'Insert_process_parameter'
2760: ,g_pkg_name) THEN
2761: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 2762: RAISE fnd_api.g_exc_error;

2758: ,p_api_version
2759: ,'Insert_process_parameter'
2760: ,g_pkg_name) THEN
2761: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2762: RAISE fnd_api.g_exc_error;
2763: END IF;
2764:
2765: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2766:

Line 2768: x_return_status := fnd_api.g_ret_sts_error;

2764:
2765: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2766:
2767: IF NOT gme_common_pvt.g_setup_done THEN
2768: x_return_status := fnd_api.g_ret_sts_error;
2769: RAISE fnd_api.g_exc_error;
2770: END IF;
2771:
2772: gme_common_pvt.set_timestamp;

Line 2769: RAISE fnd_api.g_exc_error;

2765: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2766:
2767: IF NOT gme_common_pvt.g_setup_done THEN
2768: x_return_status := fnd_api.g_ret_sts_error;
2769: RAISE fnd_api.g_exc_error;
2770: END IF;
2771:
2772: gme_common_pvt.set_timestamp;
2773: gme_process_parameters_pvt.update_process_parameter

Line 2790: IF x_return_status = fnd_api.g_ret_sts_success THEN

2786: ( 'Came back from Pvt update process parameter with status '
2787: || x_return_status);
2788: END IF;
2789:
2790: IF x_return_status = fnd_api.g_ret_sts_success THEN
2791: IF p_commit = fnd_api.g_true THEN
2792: COMMIT;
2793: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2794: END IF;

Line 2791: IF p_commit = fnd_api.g_true THEN

2787: || x_return_status);
2788: END IF;
2789:
2790: IF x_return_status = fnd_api.g_ret_sts_success THEN
2791: IF p_commit = fnd_api.g_true THEN
2792: COMMIT;
2793: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2794: END IF;
2795: ELSE

Line 2810: WHEN fnd_api.g_exc_error THEN

2806: || ' at '
2807: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2808: END IF;
2809: EXCEPTION
2810: WHEN fnd_api.g_exc_error THEN
2811: x_return_status := fnd_api.g_ret_sts_error;
2812: ROLLBACK TO SAVEPOINT update_process_parameter;
2813: gme_common_pvt.count_and_get (x_count => x_message_count
2814: ,p_encoded => fnd_api.g_false

Line 2811: x_return_status := fnd_api.g_ret_sts_error;

2807: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2808: END IF;
2809: EXCEPTION
2810: WHEN fnd_api.g_exc_error THEN
2811: x_return_status := fnd_api.g_ret_sts_error;
2812: ROLLBACK TO SAVEPOINT update_process_parameter;
2813: gme_common_pvt.count_and_get (x_count => x_message_count
2814: ,p_encoded => fnd_api.g_false
2815: ,x_data => x_message_list);

Line 2814: ,p_encoded => fnd_api.g_false

2810: WHEN fnd_api.g_exc_error THEN
2811: x_return_status := fnd_api.g_ret_sts_error;
2812: ROLLBACK TO SAVEPOINT update_process_parameter;
2813: gme_common_pvt.count_and_get (x_count => x_message_count
2814: ,p_encoded => fnd_api.g_false
2815: ,x_data => x_message_list);
2816: WHEN update_parameter_failed THEN
2817: ROLLBACK TO SAVEPOINT update_process_parameter;
2818: gme_common_pvt.count_and_get (x_count => x_message_count

Line 2819: ,p_encoded => fnd_api.g_false

2815: ,x_data => x_message_list);
2816: WHEN update_parameter_failed THEN
2817: ROLLBACK TO SAVEPOINT update_process_parameter;
2818: gme_common_pvt.count_and_get (x_count => x_message_count
2819: ,p_encoded => fnd_api.g_false
2820: ,x_data => x_message_list);
2821: WHEN OTHERS THEN
2822: ROLLBACK TO SAVEPOINT update_process_parameter;
2823: gme_when_others ( p_api_name => l_api_name

Line 2861: x_return_status := fnd_api.g_ret_sts_success;

2857: gme_debug.log_initialize ('DeleteProcessParameter');
2858: END IF;
2859:
2860: /* Set the return status to success initially */
2861: x_return_status := fnd_api.g_ret_sts_success;
2862:
2863: IF p_init_msg_list = fnd_api.g_true THEN
2864: fnd_msg_pub.initialize;
2865: gme_common_pvt.g_error_count := 0;

Line 2863: IF p_init_msg_list = fnd_api.g_true THEN

2859:
2860: /* Set the return status to success initially */
2861: x_return_status := fnd_api.g_ret_sts_success;
2862:
2863: IF p_init_msg_list = fnd_api.g_true THEN
2864: fnd_msg_pub.initialize;
2865: gme_common_pvt.g_error_count := 0;
2866: END IF;
2867:

Line 2869: IF NOT fnd_api.compatible_api_call (2.0

2865: gme_common_pvt.g_error_count := 0;
2866: END IF;
2867:
2868: -- Make sure we are call compatible
2869: IF NOT fnd_api.compatible_api_call (2.0
2870: ,p_api_version
2871: ,'Insert_process_parameter'
2872: ,g_pkg_name) THEN
2873: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 2874: RAISE fnd_api.g_exc_error;

2870: ,p_api_version
2871: ,'Insert_process_parameter'
2872: ,g_pkg_name) THEN
2873: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2874: RAISE fnd_api.g_exc_error;
2875: END IF;
2876:
2877: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2878:

Line 2880: x_return_status := fnd_api.g_ret_sts_error;

2876:
2877: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2878:
2879: IF NOT gme_common_pvt.g_setup_done THEN
2880: x_return_status := fnd_api.g_ret_sts_error;
2881: RAISE fnd_api.g_exc_error;
2882: END IF;
2883:
2884: IF (g_debug <= gme_debug.g_log_procedure) THEN

Line 2881: RAISE fnd_api.g_exc_error;

2877: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2878:
2879: IF NOT gme_common_pvt.g_setup_done THEN
2880: x_return_status := fnd_api.g_ret_sts_error;
2881: RAISE fnd_api.g_exc_error;
2882: END IF;
2883:
2884: IF (g_debug <= gme_debug.g_log_procedure) THEN
2885: gme_debug.put_line ('Calling Insert process parameters');

Line 2904: IF x_return_status = fnd_api.g_ret_sts_success THEN

2900: ( 'Came back from Pvt delete process parameter with status '
2901: || x_return_status);
2902: END IF;
2903:
2904: IF x_return_status = fnd_api.g_ret_sts_success THEN
2905: IF p_commit = fnd_api.g_true THEN
2906: COMMIT;
2907: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2908: END IF;

Line 2905: IF p_commit = fnd_api.g_true THEN

2901: || x_return_status);
2902: END IF;
2903:
2904: IF x_return_status = fnd_api.g_ret_sts_success THEN
2905: IF p_commit = fnd_api.g_true THEN
2906: COMMIT;
2907: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2908: END IF;
2909: ELSE

Line 2919: WHEN fnd_api.g_exc_error THEN

2915: 'Exiting with ' || x_return_status || ' at '
2916: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2917: END IF;
2918: EXCEPTION
2919: WHEN fnd_api.g_exc_error THEN
2920: x_return_status := fnd_api.g_ret_sts_error;
2921: ROLLBACK TO SAVEPOINT delete_process_parameter;
2922: gme_common_pvt.count_and_get (x_count => x_message_count
2923: ,p_encoded => fnd_api.g_false

Line 2920: x_return_status := fnd_api.g_ret_sts_error;

2916: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2917: END IF;
2918: EXCEPTION
2919: WHEN fnd_api.g_exc_error THEN
2920: x_return_status := fnd_api.g_ret_sts_error;
2921: ROLLBACK TO SAVEPOINT delete_process_parameter;
2922: gme_common_pvt.count_and_get (x_count => x_message_count
2923: ,p_encoded => fnd_api.g_false
2924: ,x_data => x_message_list);

Line 2923: ,p_encoded => fnd_api.g_false

2919: WHEN fnd_api.g_exc_error THEN
2920: x_return_status := fnd_api.g_ret_sts_error;
2921: ROLLBACK TO SAVEPOINT delete_process_parameter;
2922: gme_common_pvt.count_and_get (x_count => x_message_count
2923: ,p_encoded => fnd_api.g_false
2924: ,x_data => x_message_list);
2925: WHEN delete_parameter_failed THEN
2926: ROLLBACK TO SAVEPOINT delete_process_parameter;
2927: gme_common_pvt.count_and_get (x_count => x_message_count

Line 2928: ,p_encoded => fnd_api.g_false

2924: ,x_data => x_message_list);
2925: WHEN delete_parameter_failed THEN
2926: ROLLBACK TO SAVEPOINT delete_process_parameter;
2927: gme_common_pvt.count_and_get (x_count => x_message_count
2928: ,p_encoded => fnd_api.g_false
2929: ,x_data => x_message_list);
2930: WHEN OTHERS THEN
2931: ROLLBACK TO SAVEPOINT delete_process_parameter;
2932: gme_when_others ( p_api_name => l_api_name

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

2939: PROCEDURE delete_step (
2940: p_api_version IN NUMBER := 2.0
2941: ,p_validation_level IN NUMBER
2942: := gme_common_pvt.g_max_errors
2943: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2944: ,p_commit IN VARCHAR2
2945: ,p_org_code IN VARCHAR2
2946: ,p_batch_no IN VARCHAR2
2947: ,x_message_count OUT NOCOPY NUMBER

Line 2957: x_return_status := fnd_api.g_ret_sts_success;

2953: l_batch_header_rec gme_batch_header%rowtype;
2954: delete_step_failed EXCEPTION;
2955: BEGIN
2956: /* Set the return status to success initially */
2957: x_return_status := fnd_api.g_ret_sts_success;
2958:
2959: /* Set savepoint here */
2960: SAVEPOINT delete_step;
2961:

Line 2963: IF p_init_msg_list = fnd_api.g_true THEN

2959: /* Set savepoint here */
2960: SAVEPOINT delete_step;
2961:
2962: /* Initialize message list and count if needed */
2963: IF p_init_msg_list = fnd_api.g_true THEN
2964: fnd_msg_pub.initialize;
2965: gme_common_pvt.g_error_count := 0;
2966: END IF;
2967:

Line 2972: RAISE fnd_api.g_exc_error;

2968: /* Setup the common constants used accross the apis */
2969: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2970:
2971: IF NOT gme_common_pvt.g_setup_done THEN
2972: RAISE fnd_api.g_exc_error;
2973: END IF;
2974:
2975: /* Make sure we are call compatible */
2976: IF NOT fnd_api.compatible_api_call (2

Line 2976: IF NOT fnd_api.compatible_api_call (2

2972: RAISE fnd_api.g_exc_error;
2973: END IF;
2974:
2975: /* Make sure we are call compatible */
2976: IF NOT fnd_api.compatible_api_call (2
2977: ,p_api_version
2978: ,'delete_step'
2979: ,g_pkg_name) THEN
2980: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 2981: RAISE fnd_api.g_exc_error;

2977: ,p_api_version
2978: ,'delete_step'
2979: ,g_pkg_name) THEN
2980: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2981: RAISE fnd_api.g_exc_error;
2982: END IF;
2983: gme_api_main.delete_step (p_validation_level => p_validation_level
2984: ,p_init_msg_list => fnd_api.g_false
2985: ,x_message_count => x_message_count

Line 2984: ,p_init_msg_list => fnd_api.g_false

2980: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2981: RAISE fnd_api.g_exc_error;
2982: END IF;
2983: gme_api_main.delete_step (p_validation_level => p_validation_level
2984: ,p_init_msg_list => fnd_api.g_false
2985: ,x_message_count => x_message_count
2986: ,x_message_list => x_message_list
2987: ,x_return_status => x_return_status
2988: ,p_batch_header_rec => l_batch_header_rec

Line 2991: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2987: ,x_return_status => x_return_status
2988: ,p_batch_header_rec => l_batch_header_rec
2989: ,p_batch_step_rec => p_batch_step_rec);
2990:
2991: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2992: RAISE delete_step_failed;
2993: ELSE
2994: IF p_commit = fnd_api.g_true THEN
2995: gme_api_pub.save_batch (p_header_id => null

Line 2994: IF p_commit = fnd_api.g_true THEN

2990:
2991: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2992: RAISE delete_step_failed;
2993: ELSE
2994: IF p_commit = fnd_api.g_true THEN
2995: gme_api_pub.save_batch (p_header_id => null
2996: ,p_table => 1
2997: ,p_commit => fnd_api.g_false
2998: ,x_return_status => x_return_status);

Line 2997: ,p_commit => fnd_api.g_false

2993: ELSE
2994: IF p_commit = fnd_api.g_true THEN
2995: gme_api_pub.save_batch (p_header_id => null
2996: ,p_table => 1
2997: ,p_commit => fnd_api.g_false
2998: ,x_return_status => x_return_status);
2999:
3000: IF x_return_status = fnd_api.g_ret_sts_success THEN
3001: COMMIT;

Line 3000: IF x_return_status = fnd_api.g_ret_sts_success THEN

2996: ,p_table => 1
2997: ,p_commit => fnd_api.g_false
2998: ,x_return_status => x_return_status);
2999:
3000: IF x_return_status = fnd_api.g_ret_sts_success THEN
3001: COMMIT;
3002: ELSE
3003: RAISE fnd_api.g_exc_error;
3004: END IF;

Line 3003: RAISE fnd_api.g_exc_error;

2999:
3000: IF x_return_status = fnd_api.g_ret_sts_success THEN
3001: COMMIT;
3002: ELSE
3003: RAISE fnd_api.g_exc_error;
3004: END IF;
3005: END IF;
3006: END IF;
3007:

Line 3013: WHEN fnd_api.g_exc_error THEN

3009: gme_debug.put_line ( 'Completed ' || l_api_name || ' at ' || TO_CHAR
3010: (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
3011: END IF;
3012: EXCEPTION
3013: WHEN fnd_api.g_exc_error THEN
3014: ROLLBACK TO SAVEPOINT delete_step;
3015: x_return_status := fnd_api.g_ret_sts_error;
3016: gme_common_pvt.count_and_get (x_count => x_message_count
3017: ,p_encoded => fnd_api.g_false

Line 3015: x_return_status := fnd_api.g_ret_sts_error;

3011: END IF;
3012: EXCEPTION
3013: WHEN fnd_api.g_exc_error THEN
3014: ROLLBACK TO SAVEPOINT delete_step;
3015: x_return_status := fnd_api.g_ret_sts_error;
3016: gme_common_pvt.count_and_get (x_count => x_message_count
3017: ,p_encoded => fnd_api.g_false
3018: ,x_data => x_message_list);
3019: WHEN delete_step_failed THEN

Line 3017: ,p_encoded => fnd_api.g_false

3013: WHEN fnd_api.g_exc_error THEN
3014: ROLLBACK TO SAVEPOINT delete_step;
3015: x_return_status := fnd_api.g_ret_sts_error;
3016: gme_common_pvt.count_and_get (x_count => x_message_count
3017: ,p_encoded => fnd_api.g_false
3018: ,x_data => x_message_list);
3019: WHEN delete_step_failed THEN
3020: ROLLBACK TO SAVEPOINT delete_step;
3021: gme_common_pvt.count_and_get (x_count => x_message_count

Line 3022: ,p_encoded => fnd_api.g_false

3018: ,x_data => x_message_list);
3019: WHEN delete_step_failed THEN
3020: ROLLBACK TO SAVEPOINT delete_step;
3021: gme_common_pvt.count_and_get (x_count => x_message_count
3022: ,p_encoded => fnd_api.g_false
3023: ,x_data => x_message_list);
3024: WHEN OTHERS THEN
3025: ROLLBACK TO SAVEPOINT delete_step;
3026: gme_when_others ( p_api_name => l_api_name

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

3040: /*************************************************************************/
3041: PROCEDURE insert_step (
3042: p_api_version IN NUMBER := 2.0
3043: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3044: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3045: ,p_commit IN VARCHAR2
3046: ,p_org_code IN VARCHAR2
3047: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
3048: ,p_oprn_no IN VARCHAR2

Line 3047: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

3043: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3044: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3045: ,p_commit IN VARCHAR2
3046: ,p_org_code IN VARCHAR2
3047: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
3048: ,p_oprn_no IN VARCHAR2
3049: ,p_oprn_vers IN NUMBER
3050: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3051: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE

Line 3088: x_return_status := fnd_api.g_ret_sts_success;

3084: AND oprn_vers = l_oprn_vers
3085: AND owner_organization_id = l_org_id);
3086: BEGIN
3087: /* Set the return status to success initially */
3088: x_return_status := fnd_api.g_ret_sts_success;
3089:
3090: /* Set savepoint here */
3091: SAVEPOINT insert_step;
3092:

Line 3094: IF p_init_msg_list = fnd_api.g_true THEN

3090: /* Set savepoint here */
3091: SAVEPOINT insert_step;
3092:
3093: /* Initialize message list and count if needed */
3094: IF p_init_msg_list = fnd_api.g_true THEN
3095: fnd_msg_pub.initialize;
3096: gme_common_pvt.g_error_count := 0;
3097: END IF;
3098: gme_common_pvt.g_setup_done :=

Line 3103: RAISE fnd_api.g_exc_error;

3099: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
3100: ,p_org_code => p_org_code);
3101:
3102: IF NOT gme_common_pvt.g_setup_done THEN
3103: RAISE fnd_api.g_exc_error;
3104: END IF;
3105:
3106: /* Make sure we are call compatible */
3107: IF NOT fnd_api.compatible_api_call (2

Line 3107: IF NOT fnd_api.compatible_api_call (2

3103: RAISE fnd_api.g_exc_error;
3104: END IF;
3105:
3106: /* Make sure we are call compatible */
3107: IF NOT fnd_api.compatible_api_call (2
3108: ,p_api_version
3109: ,'insert_step'
3110: ,g_pkg_name) THEN
3111: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 3112: RAISE fnd_api.g_exc_error;

3108: ,p_api_version
3109: ,'insert_step'
3110: ,g_pkg_name) THEN
3111: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3112: RAISE fnd_api.g_exc_error;
3113: END IF;
3114:
3115: IF (p_batch_step_rec.batch_id IS NOT NULL) THEN
3116: l_batch_header_rec.batch_id := p_batch_step_rec.batch_id;

Line 3120: RAISE fnd_api.g_exc_error;

3116: l_batch_header_rec.batch_id := p_batch_step_rec.batch_id;
3117:
3118: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec
3119: ,l_batch_header_rec) ) THEN
3120: RAISE fnd_api.g_exc_error;
3121: END IF;
3122: ELSE
3123: IF NOT (gme_batch_header_dbl.fetch_row (p_batch_header_rec
3124: ,l_batch_header_rec) ) THEN

Line 3125: RAISE fnd_api.g_exc_error;

3121: END IF;
3122: ELSE
3123: IF NOT (gme_batch_header_dbl.fetch_row (p_batch_header_rec
3124: ,l_batch_header_rec) ) THEN
3125: RAISE fnd_api.g_exc_error;
3126: END IF;
3127: END IF;
3128:
3129: /* Bug 2766460 Added check not to allow insert step if batch is completed/closed or cancelled */

Line 3134: RAISE fnd_api.g_exc_error;

3130: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,
3131: gme_common_pvt.g_batch_completed,
3132: gme_common_pvt.g_batch_closed) ) THEN
3133: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3134: RAISE fnd_api.g_exc_error;
3135: END IF;
3136:
3137: -- Bug 2979072 Stop insert if there is no routing associated with this batch.
3138: IF (l_batch_header_rec.routing_id IS NULL) THEN

Line 3141: RAISE fnd_api.g_exc_error;

3137: -- Bug 2979072 Stop insert if there is no routing associated with this batch.
3138: IF (l_batch_header_rec.routing_id IS NULL) THEN
3139: gme_common_pvt.log_message
3140: (p_message_code => 'GME_API_NO_ROUTING_ASSOCIATED');
3141: RAISE fnd_api.g_exc_error;
3142: END IF;
3143:
3144: /* Punit Kumar , bringing this code from GMEVINSB.pls*/
3145: IF (p_batch_step_rec.steprelease_type NOT IN (1, 2) ) THEN

Line 3147: RAISE fnd_api.g_exc_error;

3143:
3144: /* Punit Kumar , bringing this code from GMEVINSB.pls*/
3145: IF (p_batch_step_rec.steprelease_type NOT IN (1, 2) ) THEN
3146: gme_common_pvt.log_message ('GME_INVALID_STEPRELEASE');
3147: RAISE fnd_api.g_exc_error;
3148: END IF;
3149:
3150: /* End Bug 2397077 */
3151: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_closed)

Line 3155: RAISE fnd_api.g_exc_error;

3151: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_closed)
3152: OR (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_cancelled) THEN
3153: -- Closed or cancelled batch not valid for step insert...
3154: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3155: RAISE fnd_api.g_exc_error;
3156: END IF;
3157:
3158: IF p_batch_step_rec.oprn_id IS NOT NULL THEN
3159: OPEN get_oprn (p_batch_step_rec.oprn_id);

Line 3206: IF p_validate_flexfields = fnd_api.g_true THEN

3202: RAISE insert_step_failed;
3203: END IF;
3204: END IF;
3205:
3206: IF p_validate_flexfields = fnd_api.g_true THEN
3207: gme_common_pvt.g_flex_validate_prof := 1;
3208: ELSE
3209: gme_common_pvt.g_flex_validate_prof := 0;
3210: END IF;

Line 3212: ,p_init_msg_list => fnd_api.g_false

3208: ELSE
3209: gme_common_pvt.g_flex_validate_prof := 0;
3210: END IF;
3211: gme_api_main.insert_step (p_validation_level => p_validation_level
3212: ,p_init_msg_list => fnd_api.g_false
3213: ,x_message_count => x_message_count
3214: ,x_message_list => x_message_list
3215: ,x_return_status => x_return_status
3216: ,p_batch_header_rec => l_batch_header_rec

Line 3222: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3218: ,x_batch_step => x_batch_step_rec);
3219:
3220: gme_common_pvt.g_flex_validate_prof := 0;
3221:
3222: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3223: RAISE insert_step_failed;
3224: ELSE
3225: IF p_commit = fnd_api.g_true THEN
3226: gme_api_pub.save_batch (p_header_id => null

Line 3225: IF p_commit = fnd_api.g_true THEN

3221:
3222: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3223: RAISE insert_step_failed;
3224: ELSE
3225: IF p_commit = fnd_api.g_true THEN
3226: gme_api_pub.save_batch (p_header_id => null
3227: ,p_table => 1
3228: ,p_commit => fnd_api.g_false
3229: ,x_return_status => x_return_status);

Line 3228: ,p_commit => fnd_api.g_false

3224: ELSE
3225: IF p_commit = fnd_api.g_true THEN
3226: gme_api_pub.save_batch (p_header_id => null
3227: ,p_table => 1
3228: ,p_commit => fnd_api.g_false
3229: ,x_return_status => x_return_status);
3230:
3231: IF x_return_status = fnd_api.g_ret_sts_success THEN
3232: COMMIT;

Line 3231: IF x_return_status = fnd_api.g_ret_sts_success THEN

3227: ,p_table => 1
3228: ,p_commit => fnd_api.g_false
3229: ,x_return_status => x_return_status);
3230:
3231: IF x_return_status = fnd_api.g_ret_sts_success THEN
3232: COMMIT;
3233: ELSE
3234: RAISE fnd_api.g_exc_error;
3235: END IF;

Line 3234: RAISE fnd_api.g_exc_error;

3230:
3231: IF x_return_status = fnd_api.g_ret_sts_success THEN
3232: COMMIT;
3233: ELSE
3234: RAISE fnd_api.g_exc_error;
3235: END IF;
3236: END IF;
3237: END IF;
3238:

Line 3240: ,p_encoded => fnd_api.g_false

3236: END IF;
3237: END IF;
3238:
3239: gme_common_pvt.count_and_get (x_count => x_message_count
3240: ,p_encoded => fnd_api.g_false
3241: ,x_data => x_message_list);
3242:
3243: IF g_debug <= gme_debug.g_log_procedure THEN
3244: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '

Line 3248: WHEN fnd_api.g_exc_error THEN

3244: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '
3245: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
3246: END IF;
3247: EXCEPTION
3248: WHEN fnd_api.g_exc_error THEN
3249: ROLLBACK TO SAVEPOINT insert_step;
3250: x_return_status := fnd_api.g_ret_sts_error;
3251: gme_common_pvt.count_and_get (x_count => x_message_count
3252: ,p_encoded => fnd_api.g_false

Line 3250: x_return_status := fnd_api.g_ret_sts_error;

3246: END IF;
3247: EXCEPTION
3248: WHEN fnd_api.g_exc_error THEN
3249: ROLLBACK TO SAVEPOINT insert_step;
3250: x_return_status := fnd_api.g_ret_sts_error;
3251: gme_common_pvt.count_and_get (x_count => x_message_count
3252: ,p_encoded => fnd_api.g_false
3253: ,x_data => x_message_list);
3254: WHEN insert_step_failed THEN

Line 3252: ,p_encoded => fnd_api.g_false

3248: WHEN fnd_api.g_exc_error THEN
3249: ROLLBACK TO SAVEPOINT insert_step;
3250: x_return_status := fnd_api.g_ret_sts_error;
3251: gme_common_pvt.count_and_get (x_count => x_message_count
3252: ,p_encoded => fnd_api.g_false
3253: ,x_data => x_message_list);
3254: WHEN insert_step_failed THEN
3255: ROLLBACK TO SAVEPOINT insert_step;
3256: x_batch_step_rec := NULL;

Line 3258: ,p_encoded => fnd_api.g_false

3254: WHEN insert_step_failed THEN
3255: ROLLBACK TO SAVEPOINT insert_step;
3256: x_batch_step_rec := NULL;
3257: gme_common_pvt.count_and_get (x_count => x_message_count
3258: ,p_encoded => fnd_api.g_false
3259: ,x_data => x_message_list);
3260: WHEN OTHERS THEN
3261: ROLLBACK TO SAVEPOINT insert_step;
3262: x_batch_step_rec := NULL;

Line 3294: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false

3290: ================================================================================*/
3291: PROCEDURE insert_material_line (
3292: p_api_version IN NUMBER := 2.0
3293: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3294: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3295: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3296: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3297: ,p_material_detail_rec IN gme_material_details%ROWTYPE
3298: ,p_locator_code IN VARCHAR2

Line 3295: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false

3291: PROCEDURE insert_material_line (
3292: p_api_version IN NUMBER := 2.0
3293: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3294: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3295: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3296: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3297: ,p_material_detail_rec IN gme_material_details%ROWTYPE
3298: ,p_locator_code IN VARCHAR2
3299: ,p_org_code IN VARCHAR2

Line 3301: ,p_validate_flexfields IN VARCHAR2 DEFAULT fnd_api.g_false

3297: ,p_material_detail_rec IN gme_material_details%ROWTYPE
3298: ,p_locator_code IN VARCHAR2
3299: ,p_org_code IN VARCHAR2
3300: ,p_batchstep_no IN NUMBER := NULL
3301: ,p_validate_flexfields IN VARCHAR2 DEFAULT fnd_api.g_false
3302: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
3303: ,x_message_count OUT NOCOPY NUMBER
3304: ,x_message_list OUT NOCOPY VARCHAR2
3305: ,x_return_status OUT NOCOPY VARCHAR2 )

Line 3335: x_return_status := fnd_api.g_ret_sts_success;

3331: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
3332: END IF;
3333:
3334: /* Set the return status to success initially */
3335: x_return_status := fnd_api.g_ret_sts_success;
3336:
3337: /* Set savepoint here */
3338: SAVEPOINT insert_material_line;
3339:

Line 3341: IF NOT fnd_api.compatible_api_call (2.0

3337: /* Set savepoint here */
3338: SAVEPOINT insert_material_line;
3339:
3340: /* Make sure we are call compatible */
3341: IF NOT fnd_api.compatible_api_call (2.0
3342: ,p_api_version
3343: ,'insert_material_line'
3344: ,g_pkg_name) THEN
3345: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 3346: RAISE fnd_api.g_exc_error;

3342: ,p_api_version
3343: ,'insert_material_line'
3344: ,g_pkg_name) THEN
3345: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3346: RAISE fnd_api.g_exc_error;
3347: END IF;
3348:
3349: /* Initialize message list and count if needed */
3350: IF p_init_msg_list = fnd_api.g_true THEN

Line 3350: IF p_init_msg_list = fnd_api.g_true THEN

3346: RAISE fnd_api.g_exc_error;
3347: END IF;
3348:
3349: /* Initialize message list and count if needed */
3350: IF p_init_msg_list = fnd_api.g_true THEN
3351: fnd_msg_pub.initialize;
3352: END IF;
3353:
3354: /* intialize local variable */

Line 3365: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3361: ,x_message_count => x_message_count
3362: ,x_message_list => x_message_list
3363: ,x_return_status => x_return_status );
3364:
3365: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3366: IF (g_debug = gme_debug.g_log_statement) THEN
3367: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
3368: || ': batch validate error ');
3369: END IF;

Line 3370: RAISE fnd_api.g_exc_error;

3366: IF (g_debug = gme_debug.g_log_statement) THEN
3367: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
3368: || ': batch validate error ');
3369: END IF;
3370: RAISE fnd_api.g_exc_error;
3371: END IF;
3372:
3373: /*for ASQC batches batchstep_no is required */
3374: IF l_batch_header_rec.automatic_step_calculation <> 0 AND

Line 3377: RAISE fnd_api.g_exc_error;

3373: /*for ASQC batches batchstep_no is required */
3374: IF l_batch_header_rec.automatic_step_calculation <> 0 AND
3375: p_batchstep_no IS NULL THEN
3376: gme_common_pvt.log_message('GME_ASQC_STEP_REQUIRED');
3377: RAISE fnd_api.g_exc_error;
3378: END IF;
3379:
3380: IF l_batch_header_rec.poc_ind = 'Y' AND
3381: p_batchstep_no IS NOT NULL THEN

Line 3385: RAISE fnd_api.g_exc_error;

3381: p_batchstep_no IS NOT NULL THEN
3382: l_batch_step_rec.batch_id := l_batch_header_rec.batch_id;
3383: l_batch_step_rec.batchstep_no := p_batchstep_no;
3384: IF NOT gme_batch_steps_dbl.fetch_row(l_batch_step_rec, l_batch_step_rec) THEN
3385: RAISE fnd_api.g_exc_error;
3386: END IF;
3387: END IF;
3388:
3389: --validate batch for insertion of material line

Line 3395: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3391: (p_batch_header_rec => l_batch_header_rec
3392: ,p_batch_step_rec => l_batch_step_rec
3393: ,x_return_status => x_return_status );
3394:
3395: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3396: RAISE fnd_api.g_exc_error;
3397: END IF;
3398:
3399: /* getting the locator for entered subinventory */

Line 3396: RAISE fnd_api.g_exc_error;

3392: ,p_batch_step_rec => l_batch_step_rec
3393: ,x_return_status => x_return_status );
3394:
3395: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3396: RAISE fnd_api.g_exc_error;
3397: END IF;
3398:
3399: /* getting the locator for entered subinventory */
3400: IF l_material_detail_rec.subinventory IS NOT NULL AND

Line 3402: IF p_locator_code = fnd_api.g_miss_char THEN

3398:
3399: /* getting the locator for entered subinventory */
3400: IF l_material_detail_rec.subinventory IS NOT NULL AND
3401: p_locator_code IS NOT NULL THEN
3402: IF p_locator_code = fnd_api.g_miss_char THEN
3403: l_material_detail_rec.locator_id := fnd_api.g_miss_num;
3404: ELSE
3405: OPEN c_get_locator(l_batch_header_rec.organization_id, l_material_detail_rec.subinventory);
3406: FETCH c_get_locator INTO l_locator_id;

Line 3403: l_material_detail_rec.locator_id := fnd_api.g_miss_num;

3399: /* getting the locator for entered subinventory */
3400: IF l_material_detail_rec.subinventory IS NOT NULL AND
3401: p_locator_code IS NOT NULL THEN
3402: IF p_locator_code = fnd_api.g_miss_char THEN
3403: l_material_detail_rec.locator_id := fnd_api.g_miss_num;
3404: ELSE
3405: OPEN c_get_locator(l_batch_header_rec.organization_id, l_material_detail_rec.subinventory);
3406: FETCH c_get_locator INTO l_locator_id;
3407: IF c_get_locator%NOTFOUND THEN

Line 3411: RAISE fnd_api.g_exc_error;

3407: IF c_get_locator%NOTFOUND THEN
3408: CLOSE c_get_locator;
3409: gme_common_pvt.log_message(p_product_code => 'INV'
3410: ,p_message_code => 'INV_INVALID_LOCATION');
3411: RAISE fnd_api.g_exc_error;
3412: END IF;
3413: CLOSE c_get_locator;
3414: l_material_detail_rec.locator_id := l_locator_id;
3415: END IF;

Line 3419: IF p_validate_flexfields = FND_API.G_TRUE THEN

3415: END IF;
3416: END IF;
3417:
3418: --setting global flex validate
3419: IF p_validate_flexfields = FND_API.G_TRUE THEN
3420: gme_common_pvt.g_flex_validate_prof := 1;
3421: ELSE
3422: gme_common_pvt.g_flex_validate_prof := 0;
3423: END IF;

Line 3433: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3429: ,p_batch_step_rec => l_batch_step_rec
3430: ,x_material_detail_rec => x_material_detail_rec
3431: ,x_return_status => x_return_status);
3432:
3433: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3434: RAISE fnd_api.g_exc_error;
3435: END IF;
3436: gme_common_pvt.g_flex_validate_prof := 0;
3437: gme_common_pvt.set_timestamp;

Line 3434: RAISE fnd_api.g_exc_error;

3430: ,x_material_detail_rec => x_material_detail_rec
3431: ,x_return_status => x_return_status);
3432:
3433: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3434: RAISE fnd_api.g_exc_error;
3435: END IF;
3436: gme_common_pvt.g_flex_validate_prof := 0;
3437: gme_common_pvt.set_timestamp;
3438: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 3438: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

3434: RAISE fnd_api.g_exc_error;
3435: END IF;
3436: gme_common_pvt.g_flex_validate_prof := 0;
3437: gme_common_pvt.set_timestamp;
3438: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3439: --calling insert material line new API
3440: l_material_detail_rec := x_material_detail_rec;
3441:
3442: gme_api_main.insert_material_line (

Line 3455: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3451: ,p_trans_id => NULL
3452: ,x_transacted => x_transacted
3453: ,x_material_detail_rec => x_material_detail_rec);
3454:
3455: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3456: RAISE fnd_api.g_exc_error;
3457: ELSE
3458: IF p_commit = fnd_api.g_true THEN
3459: gme_api_pub.save_batch (p_header_id => NULL

Line 3456: RAISE fnd_api.g_exc_error;

3452: ,x_transacted => x_transacted
3453: ,x_material_detail_rec => x_material_detail_rec);
3454:
3455: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3456: RAISE fnd_api.g_exc_error;
3457: ELSE
3458: IF p_commit = fnd_api.g_true THEN
3459: gme_api_pub.save_batch (p_header_id => NULL
3460: ,p_table => 1

Line 3458: IF p_commit = fnd_api.g_true THEN

3454:
3455: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3456: RAISE fnd_api.g_exc_error;
3457: ELSE
3458: IF p_commit = fnd_api.g_true THEN
3459: gme_api_pub.save_batch (p_header_id => NULL
3460: ,p_table => 1
3461: ,p_commit => fnd_api.g_false
3462: ,x_return_status => x_return_status);

Line 3461: ,p_commit => fnd_api.g_false

3457: ELSE
3458: IF p_commit = fnd_api.g_true THEN
3459: gme_api_pub.save_batch (p_header_id => NULL
3460: ,p_table => 1
3461: ,p_commit => fnd_api.g_false
3462: ,x_return_status => x_return_status);
3463:
3464: IF x_return_status = fnd_api.g_ret_sts_success THEN
3465: COMMIT;

Line 3464: IF x_return_status = fnd_api.g_ret_sts_success THEN

3460: ,p_table => 1
3461: ,p_commit => fnd_api.g_false
3462: ,x_return_status => x_return_status);
3463:
3464: IF x_return_status = fnd_api.g_ret_sts_success THEN
3465: COMMIT;
3466: ELSE
3467: RAISE fnd_api.g_exc_error;
3468: END IF;

Line 3467: RAISE fnd_api.g_exc_error;

3463:
3464: IF x_return_status = fnd_api.g_ret_sts_success THEN
3465: COMMIT;
3466: ELSE
3467: RAISE fnd_api.g_exc_error;
3468: END IF;
3469: END IF;
3470: NULL;
3471: END IF;

Line 3479: WHEN fnd_api.g_exc_error THEN

3475: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
3476: END IF;
3477:
3478: EXCEPTION
3479: WHEN fnd_api.g_exc_error THEN
3480: ROLLBACK TO SAVEPOINT insert_material_line;
3481: x_return_status := fnd_api.g_ret_sts_error;
3482: x_material_detail_rec := NULL;
3483: gme_common_pvt.count_and_get (x_count => x_message_count

Line 3481: x_return_status := fnd_api.g_ret_sts_error;

3477:
3478: EXCEPTION
3479: WHEN fnd_api.g_exc_error THEN
3480: ROLLBACK TO SAVEPOINT insert_material_line;
3481: x_return_status := fnd_api.g_ret_sts_error;
3482: x_material_detail_rec := NULL;
3483: gme_common_pvt.count_and_get (x_count => x_message_count
3484: ,p_encoded => fnd_api.g_false
3485: ,x_data => x_message_list);

Line 3484: ,p_encoded => fnd_api.g_false

3480: ROLLBACK TO SAVEPOINT insert_material_line;
3481: x_return_status := fnd_api.g_ret_sts_error;
3482: x_material_detail_rec := NULL;
3483: gme_common_pvt.count_and_get (x_count => x_message_count
3484: ,p_encoded => fnd_api.g_false
3485: ,x_data => x_message_list);
3486: WHEN OTHERS THEN
3487: ROLLBACK TO SAVEPOINT insert_material_line;
3488: x_material_detail_rec := NULL;

Line 3520: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false

3516: ================================================================================*/
3517: PROCEDURE update_material_line (
3518: p_api_version IN NUMBER := 2.0
3519: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3520: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3521: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3522: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3523: ,p_material_detail_rec IN gme_material_details%ROWTYPE
3524: ,p_locator_code IN VARCHAR2

Line 3521: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false

3517: PROCEDURE update_material_line (
3518: p_api_version IN NUMBER := 2.0
3519: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3520: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3521: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3522: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3523: ,p_material_detail_rec IN gme_material_details%ROWTYPE
3524: ,p_locator_code IN VARCHAR2
3525: ,p_org_code IN VARCHAR2

Line 3526: ,p_scale_phantom IN VARCHAR2 DEFAULT fnd_api.g_false

3522: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3523: ,p_material_detail_rec IN gme_material_details%ROWTYPE
3524: ,p_locator_code IN VARCHAR2
3525: ,p_org_code IN VARCHAR2
3526: ,p_scale_phantom IN VARCHAR2 DEFAULT fnd_api.g_false
3527: ,p_validate_flexfields IN VARCHAR2 DEFAULT fnd_api.g_false
3528: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
3529: ,x_message_count OUT NOCOPY NUMBER
3530: ,x_message_list OUT NOCOPY VARCHAR2

Line 3527: ,p_validate_flexfields IN VARCHAR2 DEFAULT fnd_api.g_false

3523: ,p_material_detail_rec IN gme_material_details%ROWTYPE
3524: ,p_locator_code IN VARCHAR2
3525: ,p_org_code IN VARCHAR2
3526: ,p_scale_phantom IN VARCHAR2 DEFAULT fnd_api.g_false
3527: ,p_validate_flexfields IN VARCHAR2 DEFAULT fnd_api.g_false
3528: ,x_material_detail_rec OUT NOCOPY gme_material_details%ROWTYPE
3529: ,x_message_count OUT NOCOPY NUMBER
3530: ,x_message_list OUT NOCOPY VARCHAR2
3531: ,x_return_status OUT NOCOPY VARCHAR2 )

Line 3571: x_return_status := fnd_api.g_ret_sts_success;

3567: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
3568: END IF;
3569:
3570: /* Set the return status to success initially */
3571: x_return_status := fnd_api.g_ret_sts_success;
3572:
3573: /* Set savepoint here */
3574: SAVEPOINT update_material_line;
3575:

Line 3577: IF NOT fnd_api.compatible_api_call (2.0

3573: /* Set savepoint here */
3574: SAVEPOINT update_material_line;
3575:
3576: /* Make sure we are call compatible */
3577: IF NOT fnd_api.compatible_api_call (2.0
3578: ,p_api_version
3579: ,'update_material_line'
3580: ,g_pkg_name) THEN
3581: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 3582: RAISE fnd_api.g_exc_error;

3578: ,p_api_version
3579: ,'update_material_line'
3580: ,g_pkg_name) THEN
3581: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3582: RAISE fnd_api.g_exc_error;
3583: END IF;
3584:
3585: /* Initialize message list and count if needed */
3586: IF p_init_msg_list = fnd_api.g_true THEN

Line 3586: IF p_init_msg_list = fnd_api.g_true THEN

3582: RAISE fnd_api.g_exc_error;
3583: END IF;
3584:
3585: /* Initialize message list and count if needed */
3586: IF p_init_msg_list = fnd_api.g_true THEN
3587: fnd_msg_pub.initialize;
3588: END IF;
3589:
3590: /*validatep p_scale_phantom procedure */

Line 3591: IF (p_scale_phantom NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

3587: fnd_msg_pub.initialize;
3588: END IF;
3589:
3590: /*validatep p_scale_phantom procedure */
3591: IF (p_scale_phantom NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
3592: gme_common_pvt.log_message ('GME_INVALID_FIELD'
3593: ,'FIELD'
3594: ,'p_scale_phantom');
3595: RAISE fnd_api.g_exc_error;

Line 3595: RAISE fnd_api.g_exc_error;

3591: IF (p_scale_phantom NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
3592: gme_common_pvt.log_message ('GME_INVALID_FIELD'
3593: ,'FIELD'
3594: ,'p_scale_phantom');
3595: RAISE fnd_api.g_exc_error;
3596: END IF;
3597:
3598: /* assigning local variables */
3599: l_material_detail_rec := p_material_detail_rec;

Line 3610: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3606: ,x_material_detail_rec => l_stored_material_detail_rec
3607: ,x_message_count => x_message_count
3608: ,x_message_list => x_message_list
3609: ,x_return_status => x_return_status );
3610: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3611: IF (g_debug = gme_debug.g_log_statement) THEN
3612: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
3613: || ': batch mateiral validate error ');
3614: END IF;

Line 3615: RAISE fnd_api.g_exc_error;

3611: IF (g_debug = gme_debug.g_log_statement) THEN
3612: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
3613: || ': batch mateiral validate error ');
3614: END IF;
3615: RAISE fnd_api.g_exc_error;
3616: END IF;
3617:
3618: /* get the batch step record if the material line is associated to step*/
3619: IF l_batch_header_rec.poc_ind = 'Y' THEN --routing is there

Line 3627: RAISE fnd_api.g_exc_error;

3623: l_batch_step_rec.batchstep_id := l_batchstep_id;
3624:
3625: IF NOT gme_batch_steps_dbl.fetch_row(l_batch_step_rec, l_batch_step_rec) THEN
3626: CLOSE c_get_step_id;
3627: RAISE fnd_api.g_exc_error;
3628: END IF;
3629: END IF;
3630: CLOSE c_get_step_id;
3631: END IF;

Line 3640: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3636: (p_batch_header_rec => l_batch_header_rec
3637: ,p_batch_step_rec => l_batch_step_rec
3638: ,x_return_status => l_return_status );
3639:
3640: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3641: RAISE fnd_api.g_exc_error;
3642: END IF;
3643:
3644: /*updating the locator will have meaning only sub inv is existing already */

Line 3641: RAISE fnd_api.g_exc_error;

3637: ,p_batch_step_rec => l_batch_step_rec
3638: ,x_return_status => l_return_status );
3639:
3640: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3641: RAISE fnd_api.g_exc_error;
3642: END IF;
3643:
3644: /*updating the locator will have meaning only sub inv is existing already */
3645: l_subinventory := NVL(l_material_detail_rec.subinventory, l_stored_material_detail_rec.subinventory);

Line 3647: IF p_locator_code = fnd_api.g_miss_char THEN

3643:
3644: /*updating the locator will have meaning only sub inv is existing already */
3645: l_subinventory := NVL(l_material_detail_rec.subinventory, l_stored_material_detail_rec.subinventory);
3646: IF l_subinventory IS NOT NULL AND p_locator_code IS NOT NULL THEN
3647: IF p_locator_code = fnd_api.g_miss_char THEN
3648: l_material_detail_rec.locator_id := fnd_api.g_miss_num;
3649: ELSE
3650: OPEN c_get_locator(l_stored_material_detail_rec.organization_id, l_subinventory,p_locator_code);
3651: FETCH c_get_locator INTO l_locator_id;

Line 3648: l_material_detail_rec.locator_id := fnd_api.g_miss_num;

3644: /*updating the locator will have meaning only sub inv is existing already */
3645: l_subinventory := NVL(l_material_detail_rec.subinventory, l_stored_material_detail_rec.subinventory);
3646: IF l_subinventory IS NOT NULL AND p_locator_code IS NOT NULL THEN
3647: IF p_locator_code = fnd_api.g_miss_char THEN
3648: l_material_detail_rec.locator_id := fnd_api.g_miss_num;
3649: ELSE
3650: OPEN c_get_locator(l_stored_material_detail_rec.organization_id, l_subinventory,p_locator_code);
3651: FETCH c_get_locator INTO l_locator_id;
3652: IF c_get_locator%NOTFOUND THEN

Line 3656: RAISE fnd_api.g_exc_error;

3652: IF c_get_locator%NOTFOUND THEN
3653: CLOSE c_get_locator;
3654: gme_common_pvt.log_message(p_product_code => 'INV'
3655: ,p_message_code => 'INV_INVALID_LOCATION');
3656: RAISE fnd_api.g_exc_error;
3657: END IF;
3658: CLOSE c_get_locator;
3659: l_material_detail_rec.locator_id := l_locator_id;
3660: END IF;

Line 3664: IF p_validate_flexfields = FND_API.G_TRUE THEN

3660: END IF;
3661: END IF;
3662:
3663: --setting global flex validate
3664: IF p_validate_flexfields = FND_API.G_TRUE THEN
3665: gme_common_pvt.g_flex_validate_prof := 1;
3666: ELSE
3667: gme_common_pvt.g_flex_validate_prof := 0;
3668: END IF;

Line 3682: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3678:
3679: --resetting global flex validate after validating
3680: gme_common_pvt.g_flex_validate_prof := 0;
3681:
3682: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3683: RAISE fnd_api.g_exc_error;
3684: END IF;
3685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3686: gme_common_pvt.set_timestamp;

Line 3683: RAISE fnd_api.g_exc_error;

3679: --resetting global flex validate after validating
3680: gme_common_pvt.g_flex_validate_prof := 0;
3681:
3682: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3683: RAISE fnd_api.g_exc_error;
3684: END IF;
3685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3686: gme_common_pvt.set_timestamp;
3687: --calling update material line new API

Line 3685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

3681:
3682: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3683: RAISE fnd_api.g_exc_error;
3684: END IF;
3685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3686: gme_common_pvt.set_timestamp;
3687: --calling update material line new API
3688: l_material_detail_rec := x_material_detail_rec;
3689:

Line 3707: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3703: ,x_material_detail_rec => x_material_detail_rec);
3704:
3705:
3706:
3707: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3708: RAISE fnd_api.g_exc_error;
3709: ELSE
3710: IF p_commit = fnd_api.g_true THEN
3711: gme_api_pub.save_batch (p_header_id => NULL

Line 3708: RAISE fnd_api.g_exc_error;

3704:
3705:
3706:
3707: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3708: RAISE fnd_api.g_exc_error;
3709: ELSE
3710: IF p_commit = fnd_api.g_true THEN
3711: gme_api_pub.save_batch (p_header_id => NULL
3712: ,p_table => 1

Line 3710: IF p_commit = fnd_api.g_true THEN

3706:
3707: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3708: RAISE fnd_api.g_exc_error;
3709: ELSE
3710: IF p_commit = fnd_api.g_true THEN
3711: gme_api_pub.save_batch (p_header_id => NULL
3712: ,p_table => 1
3713: ,p_commit => fnd_api.g_false
3714: ,x_return_status => x_return_status);

Line 3713: ,p_commit => fnd_api.g_false

3709: ELSE
3710: IF p_commit = fnd_api.g_true THEN
3711: gme_api_pub.save_batch (p_header_id => NULL
3712: ,p_table => 1
3713: ,p_commit => fnd_api.g_false
3714: ,x_return_status => x_return_status);
3715:
3716: IF x_return_status = fnd_api.g_ret_sts_success THEN
3717: COMMIT;

Line 3716: IF x_return_status = fnd_api.g_ret_sts_success THEN

3712: ,p_table => 1
3713: ,p_commit => fnd_api.g_false
3714: ,x_return_status => x_return_status);
3715:
3716: IF x_return_status = fnd_api.g_ret_sts_success THEN
3717: COMMIT;
3718: ELSE
3719: RAISE fnd_api.g_exc_error;
3720: END IF;

Line 3719: RAISE fnd_api.g_exc_error;

3715:
3716: IF x_return_status = fnd_api.g_ret_sts_success THEN
3717: COMMIT;
3718: ELSE
3719: RAISE fnd_api.g_exc_error;
3720: END IF;
3721: END IF;
3722: NULL;
3723: END IF;

Line 3731: WHEN fnd_api.g_exc_error THEN

3727: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
3728: END IF;
3729:
3730: EXCEPTION
3731: WHEN fnd_api.g_exc_error THEN
3732: ROLLBACK TO SAVEPOINT update_material_line;
3733: x_return_status := fnd_api.g_ret_sts_error;
3734: x_material_detail_rec := NULL;
3735: gme_common_pvt.count_and_get (x_count => x_message_count

Line 3733: x_return_status := fnd_api.g_ret_sts_error;

3729:
3730: EXCEPTION
3731: WHEN fnd_api.g_exc_error THEN
3732: ROLLBACK TO SAVEPOINT update_material_line;
3733: x_return_status := fnd_api.g_ret_sts_error;
3734: x_material_detail_rec := NULL;
3735: gme_common_pvt.count_and_get (x_count => x_message_count
3736: ,p_encoded => fnd_api.g_false
3737: ,x_data => x_message_list);

Line 3736: ,p_encoded => fnd_api.g_false

3732: ROLLBACK TO SAVEPOINT update_material_line;
3733: x_return_status := fnd_api.g_ret_sts_error;
3734: x_material_detail_rec := NULL;
3735: gme_common_pvt.count_and_get (x_count => x_message_count
3736: ,p_encoded => fnd_api.g_false
3737: ,x_data => x_message_list);
3738: WHEN OTHERS THEN
3739: ROLLBACK TO SAVEPOINT update_material_line;
3740: x_material_detail_rec := NULL;

Line 3768: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false

3764: ================================================================================*/
3765: PROCEDURE delete_material_line (
3766: p_api_version IN NUMBER := 2.0
3767: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3768: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3769: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3770: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3771: ,p_material_detail_rec IN gme_material_details%ROWTYPE
3772: ,p_org_code IN VARCHAR2

Line 3769: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false

3765: PROCEDURE delete_material_line (
3766: p_api_version IN NUMBER := 2.0
3767: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3768: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3769: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3770: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3771: ,p_material_detail_rec IN gme_material_details%ROWTYPE
3772: ,p_org_code IN VARCHAR2
3773: ,x_message_count OUT NOCOPY NUMBER

Line 3801: x_return_status := fnd_api.g_ret_sts_success;

3797: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
3798: END IF;
3799:
3800: /* Set the return status to success initially */
3801: x_return_status := fnd_api.g_ret_sts_success;
3802:
3803: /* Set savepoint here */
3804: SAVEPOINT delete_material_line;
3805:

Line 3807: IF NOT fnd_api.compatible_api_call (2.0

3803: /* Set savepoint here */
3804: SAVEPOINT delete_material_line;
3805:
3806: /* Make sure we are call compatible */
3807: IF NOT fnd_api.compatible_api_call (2.0
3808: ,p_api_version
3809: ,'delete_material_line'
3810: ,g_pkg_name) THEN
3811: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 3812: RAISE fnd_api.g_exc_error;

3808: ,p_api_version
3809: ,'delete_material_line'
3810: ,g_pkg_name) THEN
3811: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3812: RAISE fnd_api.g_exc_error;
3813: END IF;
3814:
3815: /* Initialize message list and count if needed */
3816: IF p_init_msg_list = fnd_api.g_true THEN

Line 3816: IF p_init_msg_list = fnd_api.g_true THEN

3812: RAISE fnd_api.g_exc_error;
3813: END IF;
3814:
3815: /* Initialize message list and count if needed */
3816: IF p_init_msg_list = fnd_api.g_true THEN
3817: fnd_msg_pub.initialize;
3818: END IF;
3819:
3820: gme_common_pvt.Validate_material_detail

Line 3830: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3826: ,x_material_detail_rec => l_material_detail_rec
3827: ,x_message_count => x_message_count
3828: ,x_message_list => x_message_list
3829: ,x_return_status => x_return_status );
3830: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3831: IF (g_debug = gme_debug.g_log_statement) THEN
3832: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
3833: || ': batch mateiral validate error ');
3834: END IF;

Line 3835: RAISE fnd_api.g_exc_error;

3831: IF (g_debug = gme_debug.g_log_statement) THEN
3832: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
3833: || ': batch mateiral validate error ');
3834: END IF;
3835: RAISE fnd_api.g_exc_error;
3836: END IF;
3837:
3838: /* get the batch step record if the material line is associated to step*/
3839: IF l_batch_header_rec.poc_ind = 'Y' THEN --routing is there

Line 3847: RAISE fnd_api.g_exc_error;

3843: l_batch_step_rec.batchstep_id := l_batchstep_id;
3844:
3845: IF NOT gme_batch_steps_dbl.fetch_row(l_batch_step_rec, l_batch_step_rec) THEN
3846: CLOSE c_get_step_id;
3847: RAISE fnd_api.g_exc_error;
3848: END IF;
3849: END IF;
3850: CLOSE c_get_step_id;
3851: END IF;

Line 3860: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3856: ,p_material_detail_rec => l_material_detail_rec
3857: ,p_batch_step_rec => l_batch_step_rec
3858: ,x_return_status => x_return_status);
3859:
3860: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3861: RAISE fnd_api.g_exc_error;
3862: END IF;
3863: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3864: --calling delete material line

Line 3861: RAISE fnd_api.g_exc_error;

3857: ,p_batch_step_rec => l_batch_step_rec
3858: ,x_return_status => x_return_status);
3859:
3860: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3861: RAISE fnd_api.g_exc_error;
3862: END IF;
3863: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3864: --calling delete material line
3865: gme_api_main.delete_material_line (

Line 3863: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

3859:
3860: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3861: RAISE fnd_api.g_exc_error;
3862: END IF;
3863: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3864: --calling delete material line
3865: gme_api_main.delete_material_line (
3866: p_validation_level => p_validation_level
3867: ,p_init_msg_list => p_init_msg_list

Line 3876: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3872: ,p_material_detail_rec => l_material_detail_rec
3873: ,p_batch_step_rec => l_batch_step_rec
3874: ,x_transacted => x_transacted );
3875:
3876: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3877: RAISE fnd_api.g_exc_error;
3878: END IF;
3879:
3880: IF g_debug <= gme_debug.g_log_procedure THEN

Line 3877: RAISE fnd_api.g_exc_error;

3873: ,p_batch_step_rec => l_batch_step_rec
3874: ,x_transacted => x_transacted );
3875:
3876: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3877: RAISE fnd_api.g_exc_error;
3878: END IF;
3879:
3880: IF g_debug <= gme_debug.g_log_procedure THEN
3881: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '

Line 3886: WHEN fnd_api.g_exc_error THEN

3882: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
3883: END IF;
3884:
3885: EXCEPTION
3886: WHEN fnd_api.g_exc_error THEN
3887: ROLLBACK TO SAVEPOINT delete_material_line;
3888: x_return_status := fnd_api.g_ret_sts_error;
3889: gme_common_pvt.count_and_get (x_count => x_message_count
3890: ,p_encoded => fnd_api.g_false

Line 3888: x_return_status := fnd_api.g_ret_sts_error;

3884:
3885: EXCEPTION
3886: WHEN fnd_api.g_exc_error THEN
3887: ROLLBACK TO SAVEPOINT delete_material_line;
3888: x_return_status := fnd_api.g_ret_sts_error;
3889: gme_common_pvt.count_and_get (x_count => x_message_count
3890: ,p_encoded => fnd_api.g_false
3891: ,x_data => x_message_list);
3892: WHEN OTHERS THEN

Line 3890: ,p_encoded => fnd_api.g_false

3886: WHEN fnd_api.g_exc_error THEN
3887: ROLLBACK TO SAVEPOINT delete_material_line;
3888: x_return_status := fnd_api.g_ret_sts_error;
3889: gme_common_pvt.count_and_get (x_count => x_message_count
3890: ,p_encoded => fnd_api.g_false
3891: ,x_data => x_message_list);
3892: WHEN OTHERS THEN
3893: ROLLBACK TO SAVEPOINT delete_material_line;
3894: gme_when_others ( p_api_name => l_api_name

Line 3942: x_return_status := FND_API.G_RET_STS_SUCCESS;

3938: IF g_debug <= gme_debug.g_log_procedure THEN
3939: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
3940: END IF;
3941: /* Set the return status to success initially */
3942: x_return_status := FND_API.G_RET_STS_SUCCESS;
3943:
3944: IF p_init_msg_list = FND_API.G_TRUE THEN
3945: fnd_msg_pub.initialize;
3946: END IF;

Line 3944: IF p_init_msg_list = FND_API.G_TRUE THEN

3940: END IF;
3941: /* Set the return status to success initially */
3942: x_return_status := FND_API.G_RET_STS_SUCCESS;
3943:
3944: IF p_init_msg_list = FND_API.G_TRUE THEN
3945: fnd_msg_pub.initialize;
3946: END IF;
3947:
3948: /* Set savepoint here */

Line 3951: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_to_wip_batch', g_pkg_name ) THEN

3947:
3948: /* Set savepoint here */
3949: SAVEPOINT revert_batch;
3950:
3951: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_to_wip_batch', g_pkg_name ) THEN
3952: x_return_status := FND_API.G_RET_STS_ERROR;
3953: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3954: RAISE FND_API.g_exc_error;
3955: END IF;

Line 3952: x_return_status := FND_API.G_RET_STS_ERROR;

3948: /* Set savepoint here */
3949: SAVEPOINT revert_batch;
3950:
3951: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_to_wip_batch', g_pkg_name ) THEN
3952: x_return_status := FND_API.G_RET_STS_ERROR;
3953: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3954: RAISE FND_API.g_exc_error;
3955: END IF;
3956: -- fetch and validate the batch

Line 3954: RAISE FND_API.g_exc_error;

3950:
3951: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_to_wip_batch', g_pkg_name ) THEN
3952: x_return_status := FND_API.G_RET_STS_ERROR;
3953: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3954: RAISE FND_API.g_exc_error;
3955: END IF;
3956: -- fetch and validate the batch
3957: gme_common_pvt.validate_batch
3958: (p_batch_header_rec => p_batch_header_rec

Line 3966: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3962: ,x_message_count => x_message_count
3963: ,x_message_list => x_message_list
3964: ,x_return_status => x_return_status );
3965:
3966: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3967: IF (g_debug = gme_debug.g_log_statement) THEN
3968: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
3969: || ': batch validate error ');
3970: END IF;

Line 3971: RAISE fnd_api.g_exc_error;

3967: IF (g_debug = gme_debug.g_log_statement) THEN
3968: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
3969: || ': batch validate error ');
3970: END IF;
3971: RAISE fnd_api.g_exc_error;
3972: END IF;
3973:
3974: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
3975: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');

Line 3976: RAISE fnd_api.g_exc_error;

3972: END IF;
3973:
3974: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
3975: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');
3976: RAISE fnd_api.g_exc_error;
3977: END IF;
3978: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
3979: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');
3980: RAISE fnd_api.g_exc_error;

Line 3980: RAISE fnd_api.g_exc_error;

3976: RAISE fnd_api.g_exc_error;
3977: END IF;
3978: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
3979: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');
3980: RAISE fnd_api.g_exc_error;
3981: END IF;
3982: IF (NVL(l_batch_header_rec.terminated_ind, 0) = 1) THEN
3983: gme_common_pvt.log_message('GME_API_REV_WIP_TERM_ERROR');
3984: RAISE fnd_api.g_exc_error;

Line 3984: RAISE fnd_api.g_exc_error;

3980: RAISE fnd_api.g_exc_error;
3981: END IF;
3982: IF (NVL(l_batch_header_rec.terminated_ind, 0) = 1) THEN
3983: gme_common_pvt.log_message('GME_API_REV_WIP_TERM_ERROR');
3984: RAISE fnd_api.g_exc_error;
3985: END IF;
3986:
3987: IF g_debug <= gme_debug.g_log_statement THEN
3988: gme_debug.put_line('calling main revert');

Line 3991: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

3987: IF g_debug <= gme_debug.g_log_statement THEN
3988: gme_debug.put_line('calling main revert');
3989: END IF;
3990: --Bug#5327296
3991: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3992: gme_api_main.revert_batch
3993: (p_validation_level => p_validation_level,
3994: p_init_msg_list => FND_API.G_FALSE,
3995: x_message_count => x_message_count,

Line 3994: p_init_msg_list => FND_API.G_FALSE,

3990: --Bug#5327296
3991: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3992: gme_api_main.revert_batch
3993: (p_validation_level => p_validation_level,
3994: p_init_msg_list => FND_API.G_FALSE,
3995: x_message_count => x_message_count,
3996: x_message_list => x_message_list,
3997: x_return_status => x_return_status,
3998: p_batch_header_rec => l_batch_header_rec,

Line 4008: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

4004: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name||
4005: ':'||'return_status from main'||x_return_status );
4006: END IF;
4007:
4008: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4009: IF p_commit = FND_API.G_TRUE THEN
4010: gme_api_pub.save_batch (p_header_id => NULL,
4011: p_table => gme_common_pvt.g_interface_table,
4012: p_commit => p_commit,

Line 4009: IF p_commit = FND_API.G_TRUE THEN

4005: ':'||'return_status from main'||x_return_status );
4006: END IF;
4007:
4008: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4009: IF p_commit = FND_API.G_TRUE THEN
4010: gme_api_pub.save_batch (p_header_id => NULL,
4011: p_table => gme_common_pvt.g_interface_table,
4012: p_commit => p_commit,
4013: x_return_status => x_return_status);

Line 4015: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

4011: p_table => gme_common_pvt.g_interface_table,
4012: p_commit => p_commit,
4013: x_return_status => x_return_status);
4014:
4015: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4016: COMMIT;
4017: ELSE
4018: RAISE fnd_api.g_exc_error;
4019: END IF;

Line 4018: RAISE fnd_api.g_exc_error;

4014:
4015: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4016: COMMIT;
4017: ELSE
4018: RAISE fnd_api.g_exc_error;
4019: END IF;
4020: END IF;
4021: ELSE
4022: RAISE batch_revert_failure;

Line 4027: p_encoded => FND_API.g_false,

4023: END IF;
4024:
4025: gme_common_pvt.count_and_get (
4026: x_count => x_message_count,
4027: p_encoded => FND_API.g_false,
4028: x_data => x_message_list
4029: );
4030:
4031: IF g_debug <= gme_debug.g_log_procedure THEN

Line 4041: p_encoded => FND_API.g_false,

4037: WHEN batch_revert_failure THEN
4038: ROLLBACK TO SAVEPOINT revert_batch;
4039: x_batch_header_rec := NULL;
4040: gme_common_pvt.count_and_get(x_count => x_message_count,
4041: p_encoded => FND_API.g_false,
4042: x_data => x_message_list);
4043: WHEN FND_API.g_exc_error THEN
4044: ROLLBACK TO SAVEPOINT revert_batch;
4045: x_return_status := fnd_api.g_ret_sts_error;

Line 4043: WHEN FND_API.g_exc_error THEN

4039: x_batch_header_rec := NULL;
4040: gme_common_pvt.count_and_get(x_count => x_message_count,
4041: p_encoded => FND_API.g_false,
4042: x_data => x_message_list);
4043: WHEN FND_API.g_exc_error THEN
4044: ROLLBACK TO SAVEPOINT revert_batch;
4045: x_return_status := fnd_api.g_ret_sts_error;
4046: x_batch_header_rec := NULL;
4047: gme_common_pvt.count_and_get (x_count => x_message_count

Line 4045: x_return_status := fnd_api.g_ret_sts_error;

4041: p_encoded => FND_API.g_false,
4042: x_data => x_message_list);
4043: WHEN FND_API.g_exc_error THEN
4044: ROLLBACK TO SAVEPOINT revert_batch;
4045: x_return_status := fnd_api.g_ret_sts_error;
4046: x_batch_header_rec := NULL;
4047: gme_common_pvt.count_and_get (x_count => x_message_count
4048: ,p_encoded => fnd_api.g_false
4049: ,x_data => x_message_list);

Line 4048: ,p_encoded => fnd_api.g_false

4044: ROLLBACK TO SAVEPOINT revert_batch;
4045: x_return_status := fnd_api.g_ret_sts_error;
4046: x_batch_header_rec := NULL;
4047: gme_common_pvt.count_and_get (x_count => x_message_count
4048: ,p_encoded => fnd_api.g_false
4049: ,x_data => x_message_list);
4050: WHEN OTHERS THEN
4051: ROLLBACK TO SAVEPOINT revert_batch;
4052: x_batch_header_rec := NULL;

Line 4107: x_return_status := FND_API.G_RET_STS_SUCCESS;

4103: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
4104: END IF;
4105:
4106: /* Set the return status to success initially */
4107: x_return_status := FND_API.G_RET_STS_SUCCESS;
4108:
4109: /* Set savepoint here */
4110: SAVEPOINT revert_step;
4111:

Line 4112: IF p_init_msg_list = FND_API.G_TRUE THEN

4108:
4109: /* Set savepoint here */
4110: SAVEPOINT revert_step;
4111:
4112: IF p_init_msg_list = FND_API.G_TRUE THEN
4113: fnd_msg_pub.initialize;
4114: END IF;
4115:
4116: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_step', g_pkg_name ) THEN

Line 4116: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_step', g_pkg_name ) THEN

4112: IF p_init_msg_list = FND_API.G_TRUE THEN
4113: fnd_msg_pub.initialize;
4114: END IF;
4115:
4116: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_step', g_pkg_name ) THEN
4117: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4118: RAISE fnd_api.g_exc_error;
4119: END IF;
4120:

Line 4118: RAISE fnd_api.g_exc_error;

4114: END IF;
4115:
4116: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_step', g_pkg_name ) THEN
4117: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4118: RAISE fnd_api.g_exc_error;
4119: END IF;
4120:
4121: /* Validate Input parameters */
4122: gme_common_pvt.Validate_batch_step (

Line 4132: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4128: ,x_message_count => x_message_count
4129: ,x_message_list => x_message_list
4130: ,x_return_status => x_return_status );
4131:
4132: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4133: IF (g_debug = gme_debug.g_log_statement) THEN
4134: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4135: || ': batch step validate error ');
4136: END IF;

Line 4137: RAISE fnd_api.g_exc_error;

4133: IF (g_debug = gme_debug.g_log_statement) THEN
4134: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4135: || ': batch step validate error ');
4136: END IF;
4137: RAISE fnd_api.g_exc_error;
4138: END IF;
4139:
4140: IF (l_batch_header_rec.batch_status <> 2) THEN
4141: gme_common_pvt.log_message ('GME_API_INV_BATCH_UNCERT_STEP');

Line 4142: RAISE fnd_api.g_exc_error;

4138: END IF;
4139:
4140: IF (l_batch_header_rec.batch_status <> 2) THEN
4141: gme_common_pvt.log_message ('GME_API_INV_BATCH_UNCERT_STEP');
4142: RAISE fnd_api.g_exc_error;
4143: END IF;
4144:
4145: IF (l_batch_step_rec.step_status <> 3) THEN
4146: gme_common_pvt.log_message ('GME_API_INV_STEP_STAT_UNCERT');

Line 4147: RAISE fnd_api.g_exc_error;

4143: END IF;
4144:
4145: IF (l_batch_step_rec.step_status <> 3) THEN
4146: gme_common_pvt.log_message ('GME_API_INV_STEP_STAT_UNCERT');
4147: RAISE fnd_api.g_exc_error;
4148: END IF;
4149:
4150: --Bug#5327296
4151: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 4151: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

4147: RAISE fnd_api.g_exc_error;
4148: END IF;
4149:
4150: --Bug#5327296
4151: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
4152: gme_api_main.revert_step
4153: (p_validation_level => p_validation_level,
4154: p_init_msg_list => FND_API.G_FALSE,
4155: x_message_count => x_message_count,

Line 4154: p_init_msg_list => FND_API.G_FALSE,

4150: --Bug#5327296
4151: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
4152: gme_api_main.revert_step
4153: (p_validation_level => p_validation_level,
4154: p_init_msg_list => FND_API.G_FALSE,
4155: x_message_count => x_message_count,
4156: x_message_list => x_message_list,
4157: x_return_status => x_return_status,
4158: p_batch_step_rec => l_batch_step_rec,

Line 4167: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

4163: IF g_debug <= gme_debug.g_log_statement THEN
4164: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'||'return_status from main'||x_return_status );
4165: END IF;
4166:
4167: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4168: IF p_commit = FND_API.G_TRUE THEN
4169: gme_api_pub.save_batch (p_header_id => NULL,
4170: p_table => gme_common_pvt.g_interface_table,
4171: p_commit => FND_API.G_FALSE,

Line 4168: IF p_commit = FND_API.G_TRUE THEN

4164: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'||'return_status from main'||x_return_status );
4165: END IF;
4166:
4167: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4168: IF p_commit = FND_API.G_TRUE THEN
4169: gme_api_pub.save_batch (p_header_id => NULL,
4170: p_table => gme_common_pvt.g_interface_table,
4171: p_commit => FND_API.G_FALSE,
4172: x_return_status => x_return_status);

Line 4171: p_commit => FND_API.G_FALSE,

4167: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4168: IF p_commit = FND_API.G_TRUE THEN
4169: gme_api_pub.save_batch (p_header_id => NULL,
4170: p_table => gme_common_pvt.g_interface_table,
4171: p_commit => FND_API.G_FALSE,
4172: x_return_status => x_return_status);
4173: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4174: COMMIT;
4175: ELSE

Line 4173: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

4169: gme_api_pub.save_batch (p_header_id => NULL,
4170: p_table => gme_common_pvt.g_interface_table,
4171: p_commit => FND_API.G_FALSE,
4172: x_return_status => x_return_status);
4173: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4174: COMMIT;
4175: ELSE
4176: RAISE fnd_api.g_exc_error;
4177: END IF;

Line 4176: RAISE fnd_api.g_exc_error;

4172: x_return_status => x_return_status);
4173: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4174: COMMIT;
4175: ELSE
4176: RAISE fnd_api.g_exc_error;
4177: END IF;
4178: END IF;
4179: ELSE
4180: RAISE step_revert_failure;

Line 4185: p_encoded => FND_API.g_false,

4181: END IF;
4182:
4183: gme_common_pvt.count_and_get (
4184: x_count => x_message_count,
4185: p_encoded => FND_API.g_false,
4186: x_data => x_message_list
4187: );
4188:
4189: IF g_debug <= gme_debug.g_log_procedure THEN

Line 4198: p_encoded => FND_API.g_false,

4194: WHEN step_revert_failure THEN
4195: ROLLBACK TO SAVEPOINT revert_step;
4196: x_batch_step_rec := NULL;
4197: gme_common_pvt.count_and_get(x_count => x_message_count,
4198: p_encoded => FND_API.g_false,
4199: x_data => x_message_list);
4200: WHEN FND_API.g_exc_error THEN
4201: ROLLBACK TO SAVEPOINT revert_step;
4202: x_batch_step_rec := NULL;

Line 4200: WHEN FND_API.g_exc_error THEN

4196: x_batch_step_rec := NULL;
4197: gme_common_pvt.count_and_get(x_count => x_message_count,
4198: p_encoded => FND_API.g_false,
4199: x_data => x_message_list);
4200: WHEN FND_API.g_exc_error THEN
4201: ROLLBACK TO SAVEPOINT revert_step;
4202: x_batch_step_rec := NULL;
4203: x_return_status := fnd_api.g_ret_sts_error;
4204: gme_common_pvt.count_and_get (x_count => x_message_count

Line 4203: x_return_status := fnd_api.g_ret_sts_error;

4199: x_data => x_message_list);
4200: WHEN FND_API.g_exc_error THEN
4201: ROLLBACK TO SAVEPOINT revert_step;
4202: x_batch_step_rec := NULL;
4203: x_return_status := fnd_api.g_ret_sts_error;
4204: gme_common_pvt.count_and_get (x_count => x_message_count
4205: ,p_encoded => fnd_api.g_false
4206: ,x_data => x_message_list);
4207: WHEN OTHERS THEN

Line 4205: ,p_encoded => fnd_api.g_false

4201: ROLLBACK TO SAVEPOINT revert_step;
4202: x_batch_step_rec := NULL;
4203: x_return_status := fnd_api.g_ret_sts_error;
4204: gme_common_pvt.count_and_get (x_count => x_message_count
4205: ,p_encoded => fnd_api.g_false
4206: ,x_data => x_message_list);
4207: WHEN OTHERS THEN
4208: ROLLBACK TO SAVEPOINT revert_step;
4209: x_batch_step_rec := NULL;

Line 4239: x_return_status := fnd_api.g_ret_sts_success;

4235: || l_api_name);
4236: END IF;
4237:
4238: /* Set the return status to success initially */
4239: x_return_status := fnd_api.g_ret_sts_success;
4240:
4241: /* Set savepoint here */
4242: SAVEPOINT close_batch_pub;
4243:

Line 4245: IF p_init_msg_list = fnd_api.g_true THEN

4241: /* Set savepoint here */
4242: SAVEPOINT close_batch_pub;
4243:
4244: /* Initialize message list and count if needed */
4245: IF p_init_msg_list = fnd_api.g_true THEN
4246: fnd_msg_pub.initialize;
4247: END IF;
4248:
4249: /* Make sure we are call compatible */

Line 4250: IF NOT fnd_api.compatible_api_call (2

4246: fnd_msg_pub.initialize;
4247: END IF;
4248:
4249: /* Make sure we are call compatible */
4250: IF NOT fnd_api.compatible_api_call (2
4251: ,p_api_version
4252: ,'close_batch'
4253: ,g_pkg_name) THEN
4254: x_return_status := fnd_api.g_ret_sts_error;

Line 4254: x_return_status := fnd_api.g_ret_sts_error;

4250: IF NOT fnd_api.compatible_api_call (2
4251: ,p_api_version
4252: ,'close_batch'
4253: ,g_pkg_name) THEN
4254: x_return_status := fnd_api.g_ret_sts_error;
4255: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4256: RAISE fnd_api.g_exc_error;
4257: END IF;
4258: gme_common_pvt.validate_batch

Line 4256: RAISE fnd_api.g_exc_error;

4252: ,'close_batch'
4253: ,g_pkg_name) THEN
4254: x_return_status := fnd_api.g_ret_sts_error;
4255: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4256: RAISE fnd_api.g_exc_error;
4257: END IF;
4258: gme_common_pvt.validate_batch
4259: (p_batch_header_rec => p_batch_header_rec
4260: ,p_org_code => p_org_code

Line 4267: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4263: ,x_message_count => x_message_count
4264: ,x_message_list => x_message_list
4265: ,x_return_status => x_return_status );
4266:
4267: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4268: IF (g_debug = gme_debug.g_log_statement) THEN
4269: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4270: || ': batch validate error ');
4271: END IF;

Line 4272: RAISE fnd_api.g_exc_error;

4268: IF (g_debug = gme_debug.g_log_statement) THEN
4269: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4270: || ': batch validate error ');
4271: END IF;
4272: RAISE fnd_api.g_exc_error;
4273: END IF;
4274:
4275:
4276: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN

Line 4278: RAISE fnd_api.g_exc_error;

4274:
4275:
4276: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
4277: gme_common_pvt.log_message ('GME_CLOSE_STATUS_ERR');
4278: RAISE fnd_api.g_exc_error;
4279: END IF;
4280:
4281: IF (p_batch_header_rec.batch_close_date IS NULL) THEN
4282: l_batch_header_rec.batch_close_date := SYSDATE;

Line 4287: RAISE fnd_api.g_exc_error;

4283: ELSIF (p_batch_header_rec.batch_close_date <
4284: l_batch_header_rec.actual_cmplt_date) THEN
4285: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1' ,'Close
4286: date' ,'DATE2','completion date');
4287: RAISE fnd_api.g_exc_error;
4288: ELSIF (p_batch_header_rec.batch_close_date > SYSDATE) THEN
4289: gme_common_pvt.log_message(p_product_code => 'GMA'
4290: ,p_message_code => 'SY_NOFUTUREDATE');
4291: RAISE fnd_api.g_exc_error;

Line 4291: RAISE fnd_api.g_exc_error;

4287: RAISE fnd_api.g_exc_error;
4288: ELSIF (p_batch_header_rec.batch_close_date > SYSDATE) THEN
4289: gme_common_pvt.log_message(p_product_code => 'GMA'
4290: ,p_message_code => 'SY_NOFUTUREDATE');
4291: RAISE fnd_api.g_exc_error;
4292: ELSE
4293: l_batch_header_rec.batch_close_date :=
4294: p_batch_header_rec.batch_close_date;
4295: END IF;

Line 4302: ,p_init_msg_list => fnd_api.g_false

4298: gme_debug.put_line ('Calling gme_api_main.close_batch.');
4299: END IF;
4300:
4301: gme_api_main.close_batch (p_validation_level => p_validation_level
4302: ,p_init_msg_list => fnd_api.g_false
4303: ,x_message_count => x_message_count
4304: ,x_message_list => x_message_list
4305: ,x_return_status => x_return_status
4306: ,p_batch_header_rec => l_batch_header_rec

Line 4314: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4310: gme_debug.put_line('Came back from Main Close Batch with status '
4311: || x_return_status);
4312: END IF;
4313:
4314: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4315: RAISE batch_close_failure;
4316: ELSE
4317: IF (g_debug = gme_debug.g_log_statement) THEN
4318: gme_debug.put_line ('Calling save_batch.');

Line 4323: ,p_commit => fnd_api.g_false

4319: END IF;
4320:
4321: gme_api_pub.save_batch (p_header_id => null
4322: ,p_table => 1
4323: ,p_commit => fnd_api.g_false
4324: ,x_return_status => x_return_status);
4325:
4326: IF (g_debug = gme_debug.g_log_statement) THEN
4327: gme_debug.put_line ( 'Came back from save_batch with status '

Line 4331: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4327: gme_debug.put_line ( 'Came back from save_batch with status '
4328: || x_return_status);
4329: END IF;
4330:
4331: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4332: RAISE fnd_api.g_exc_error;
4333: END IF;
4334:
4335: IF p_commit = fnd_api.g_true THEN

Line 4332: RAISE fnd_api.g_exc_error;

4328: || x_return_status);
4329: END IF;
4330:
4331: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4332: RAISE fnd_api.g_exc_error;
4333: END IF;
4334:
4335: IF p_commit = fnd_api.g_true THEN
4336: COMMIT;

Line 4335: IF p_commit = fnd_api.g_true THEN

4331: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4332: RAISE fnd_api.g_exc_error;
4333: END IF;
4334:
4335: IF p_commit = fnd_api.g_true THEN
4336: COMMIT;
4337: END IF;
4338: END IF;
4339:

Line 4349: ,p_encoded => fnd_api.g_false

4345: WHEN batch_close_failure THEN
4346: ROLLBACK TO SAVEPOINT close_batch_pub;
4347: x_batch_header_rec := NULL;
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: WHEN FND_API.g_exc_error THEN
4352: ROLLBACK TO SAVEPOINT close_batch_pub;
4353: x_batch_header_rec := NULL;

Line 4351: WHEN FND_API.g_exc_error THEN

4347: x_batch_header_rec := NULL;
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: WHEN FND_API.g_exc_error THEN
4352: ROLLBACK TO SAVEPOINT close_batch_pub;
4353: x_batch_header_rec := NULL;
4354: x_return_status := fnd_api.g_ret_sts_error;
4355: gme_common_pvt.count_and_get (x_count => x_message_count

Line 4354: x_return_status := fnd_api.g_ret_sts_error;

4350: ,x_data => x_message_list);
4351: WHEN FND_API.g_exc_error THEN
4352: ROLLBACK TO SAVEPOINT close_batch_pub;
4353: x_batch_header_rec := NULL;
4354: x_return_status := fnd_api.g_ret_sts_error;
4355: gme_common_pvt.count_and_get (x_count => x_message_count
4356: ,p_encoded => fnd_api.g_false
4357: ,x_data => x_message_list);
4358: WHEN OTHERS THEN

Line 4356: ,p_encoded => fnd_api.g_false

4352: ROLLBACK TO SAVEPOINT close_batch_pub;
4353: x_batch_header_rec := NULL;
4354: x_return_status := fnd_api.g_ret_sts_error;
4355: gme_common_pvt.count_and_get (x_count => x_message_count
4356: ,p_encoded => fnd_api.g_false
4357: ,x_data => x_message_list);
4358: WHEN OTHERS THEN
4359: ROLLBACK TO SAVEPOINT close_batch_pub;
4360: x_batch_header_rec := NULL;

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

4367: PROCEDURE close_step (
4368: p_api_version IN NUMBER := 2
4369: /* Punit Kumar */
4370: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4371: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4372: ,p_commit IN VARCHAR2
4373: ,x_message_count OUT NOCOPY NUMBER
4374: ,x_message_list OUT NOCOPY VARCHAR2
4375: ,x_return_status OUT NOCOPY VARCHAR2

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

4373: ,x_message_count OUT NOCOPY NUMBER
4374: ,x_message_list OUT NOCOPY VARCHAR2
4375: ,x_return_status OUT NOCOPY VARCHAR2
4376: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
4377: ,p_delete_pending IN VARCHAR2 := fnd_api.g_false
4378: ,p_org_code IN VARCHAR2
4379: ,p_batch_no IN VARCHAR2
4380: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE)
4381: IS

Line 4394: x_return_status := fnd_api.g_ret_sts_success;

4390: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
4391: || l_api_name);
4392: END IF;
4393: /* Set the return status to success initially */
4394: x_return_status := fnd_api.g_ret_sts_success;
4395:
4396: /* Set savepoint here */
4397: SAVEPOINT close_step_pub;
4398:

Line 4400: IF p_init_msg_list = fnd_api.g_true THEN

4396: /* Set savepoint here */
4397: SAVEPOINT close_step_pub;
4398:
4399: /* Initialize message list and count if needed */
4400: IF p_init_msg_list = fnd_api.g_true THEN
4401: fnd_msg_pub.initialize;
4402: END IF;
4403:
4404: /* Make sure we are call compatible */

Line 4405: IF NOT fnd_api.compatible_api_call (2

4401: fnd_msg_pub.initialize;
4402: END IF;
4403:
4404: /* Make sure we are call compatible */
4405: IF NOT fnd_api.compatible_api_call (2
4406: ,p_api_version
4407: ,'close_batch_step'
4408: ,g_pkg_name) THEN
4409: x_return_status := fnd_api.g_ret_sts_error;

Line 4409: x_return_status := fnd_api.g_ret_sts_error;

4405: IF NOT fnd_api.compatible_api_call (2
4406: ,p_api_version
4407: ,'close_batch_step'
4408: ,g_pkg_name) THEN
4409: x_return_status := fnd_api.g_ret_sts_error;
4410: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4411: RAISE fnd_api.g_exc_error;
4412: END IF;
4413:

Line 4411: RAISE fnd_api.g_exc_error;

4407: ,'close_batch_step'
4408: ,g_pkg_name) THEN
4409: x_return_status := fnd_api.g_ret_sts_error;
4410: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4411: RAISE fnd_api.g_exc_error;
4412: END IF;
4413:
4414: /* Validate Input parameters */
4415: gme_common_pvt.Validate_batch_step (

Line 4425: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4421: ,x_message_count => x_message_count
4422: ,x_message_list => x_message_list
4423: ,x_return_status => x_return_status );
4424:
4425: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4426: IF (g_debug = gme_debug.g_log_statement) THEN
4427: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4428: || ': batch step validate error ');
4429: END IF;

Line 4430: RAISE fnd_api.g_exc_error;

4426: IF (g_debug = gme_debug.g_log_statement) THEN
4427: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4428: || ': batch step validate error ');
4429: END IF;
4430: RAISE fnd_api.g_exc_error;
4431: END IF;
4432:
4433: /* Bug 2404169 all date and status checks */
4434: IF (p_batch_step_rec.step_close_date IS NULL) THEN

Line 4444: RAISE fnd_api.g_exc_error;

4440: ,'DATE1'
4441: ,'Close date'
4442: ,'DATE2'
4443: ,'completion date');
4444: RAISE fnd_api.g_exc_error;
4445: ELSIF (p_batch_step_rec.step_close_date > SYSDATE) THEN
4446: gme_common_pvt.log_message(p_product_code => 'GMA'
4447: ,p_message_code => 'SY_NOFUTUREDATE');
4448: RAISE fnd_api.g_exc_error;

Line 4448: RAISE fnd_api.g_exc_error;

4444: RAISE fnd_api.g_exc_error;
4445: ELSIF (p_batch_step_rec.step_close_date > SYSDATE) THEN
4446: gme_common_pvt.log_message(p_product_code => 'GMA'
4447: ,p_message_code => 'SY_NOFUTUREDATE');
4448: RAISE fnd_api.g_exc_error;
4449: ELSE
4450: l_batch_step_rec.step_close_date := p_batch_step_rec.step_close_date;
4451: END IF;
4452:

Line 4455: RAISE fnd_api.g_exc_error;

4451: END IF;
4452:
4453: IF (l_batch_step_rec.step_status <> 3) THEN
4454: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
4455: RAISE fnd_api.g_exc_error;
4456: END IF;
4457:
4458: gme_api_main.close_step (p_validation_level => p_validation_level
4459: ,p_init_msg_list => fnd_api.g_false

Line 4459: ,p_init_msg_list => fnd_api.g_false

4455: RAISE fnd_api.g_exc_error;
4456: END IF;
4457:
4458: gme_api_main.close_step (p_validation_level => p_validation_level
4459: ,p_init_msg_list => fnd_api.g_false
4460: ,x_message_count => x_message_count
4461: ,x_message_list => x_message_list
4462: ,x_return_status => x_return_status
4463: ,p_batch_header_rec => l_batch_header_rec

Line 4468: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4464: ,p_batch_step_rec => l_batch_step_rec
4465: ,p_delete_pending => p_delete_pending
4466: ,x_batch_step_rec => x_batch_step_rec);
4467:
4468: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4469: RAISE step_close_failed;
4470: ELSE
4471: IF p_commit = fnd_api.g_true THEN
4472: gme_api_pub.save_batch (p_header_id => null

Line 4471: IF p_commit = fnd_api.g_true THEN

4467:
4468: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4469: RAISE step_close_failed;
4470: ELSE
4471: IF p_commit = fnd_api.g_true THEN
4472: gme_api_pub.save_batch (p_header_id => null
4473: ,p_table => 1
4474: ,p_commit => fnd_api.g_false
4475: ,x_return_status => x_return_status);

Line 4474: ,p_commit => fnd_api.g_false

4470: ELSE
4471: IF p_commit = fnd_api.g_true THEN
4472: gme_api_pub.save_batch (p_header_id => null
4473: ,p_table => 1
4474: ,p_commit => fnd_api.g_false
4475: ,x_return_status => x_return_status);
4476:
4477: IF x_return_status = fnd_api.g_ret_sts_success THEN
4478: COMMIT;

Line 4477: IF x_return_status = fnd_api.g_ret_sts_success THEN

4473: ,p_table => 1
4474: ,p_commit => fnd_api.g_false
4475: ,x_return_status => x_return_status);
4476:
4477: IF x_return_status = fnd_api.g_ret_sts_success THEN
4478: COMMIT;
4479: ELSE
4480: RAISE fnd_api.g_exc_error;
4481: END IF;

Line 4480: RAISE fnd_api.g_exc_error;

4476:
4477: IF x_return_status = fnd_api.g_ret_sts_success THEN
4478: COMMIT;
4479: ELSE
4480: RAISE fnd_api.g_exc_error;
4481: END IF;
4482: END IF;
4483: END IF;
4484:

Line 4494: ,p_encoded => fnd_api.g_false

4490: WHEN step_close_failed THEN
4491: ROLLBACK TO SAVEPOINT close_step_pub;
4492: x_batch_step_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: WHEN fnd_api.g_exc_error THEN
4497: ROLLBACK TO SAVEPOINT close_step_pub;
4498: x_batch_step_rec := NULL;

Line 4496: WHEN fnd_api.g_exc_error THEN

4492: x_batch_step_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: WHEN fnd_api.g_exc_error THEN
4497: ROLLBACK TO SAVEPOINT close_step_pub;
4498: x_batch_step_rec := NULL;
4499: x_return_status := fnd_api.g_ret_sts_error;
4500: gme_common_pvt.count_and_get (x_count => x_message_count

Line 4499: x_return_status := fnd_api.g_ret_sts_error;

4495: ,x_data => x_message_list);
4496: WHEN fnd_api.g_exc_error THEN
4497: ROLLBACK TO SAVEPOINT close_step_pub;
4498: x_batch_step_rec := NULL;
4499: x_return_status := fnd_api.g_ret_sts_error;
4500: gme_common_pvt.count_and_get (x_count => x_message_count
4501: ,p_encoded => fnd_api.g_false
4502: ,x_data => x_message_list);
4503: WHEN OTHERS THEN

Line 4501: ,p_encoded => fnd_api.g_false

4497: ROLLBACK TO SAVEPOINT close_step_pub;
4498: x_batch_step_rec := NULL;
4499: x_return_status := fnd_api.g_ret_sts_error;
4500: gme_common_pvt.count_and_get (x_count => x_message_count
4501: ,p_encoded => fnd_api.g_false
4502: ,x_data => x_message_list);
4503: WHEN OTHERS THEN
4504: ROLLBACK TO SAVEPOINT close_step_pub;
4505: x_batch_step_rec := NULL;

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

4513: PROCEDURE reopen_batch (
4514: p_api_version IN NUMBER := 2
4515: ,p_validation_level IN NUMBER
4516: := gme_common_pvt.g_max_errors
4517: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4518: ,p_commit IN VARCHAR2
4519: ,x_message_count OUT NOCOPY NUMBER
4520: ,x_message_list OUT NOCOPY VARCHAR2
4521: ,x_return_status OUT NOCOPY VARCHAR2

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

4520: ,x_message_list OUT NOCOPY VARCHAR2
4521: ,x_return_status OUT NOCOPY VARCHAR2
4522: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
4523: ,p_org_code IN VARCHAR2
4524: ,p_reopen_steps IN VARCHAR2 := fnd_api.g_false
4525: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE)
4526: IS
4527: l_api_name CONSTANT VARCHAR2 (30) := 'REOPEN_BATCH';
4528: l_batch_header_rec gme_batch_header%ROWTYPE;

Line 4536: x_return_status := fnd_api.g_ret_sts_success;

4532: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
4533: || l_api_name);
4534: END IF;
4535: /* Set the success staus to success inititally*/
4536: x_return_status := fnd_api.g_ret_sts_success;
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: END IF;

Line 4538: IF p_init_msg_list = fnd_api.g_true THEN

4534: END IF;
4535: /* Set the success staus to success inititally*/
4536: x_return_status := fnd_api.g_ret_sts_success;
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: END IF;
4541:
4542: /* Make sure we are call compatible */

Line 4543: IF NOT fnd_api.compatible_api_call (2.0 /* Punit Kumar */

4539: fnd_msg_pub.initialize;
4540: END IF;
4541:
4542: /* Make sure we are call compatible */
4543: IF NOT fnd_api.compatible_api_call (2.0 /* Punit Kumar */
4544: ,p_api_version
4545: ,'reopen_batch'
4546: ,g_pkg_name) THEN
4547: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 4548: RAISE fnd_api.g_exc_error;

4544: ,p_api_version
4545: ,'reopen_batch'
4546: ,g_pkg_name) THEN
4547: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4548: RAISE fnd_api.g_exc_error;
4549: END IF;
4550: gme_common_pvt.validate_batch
4551: (p_batch_header_rec => p_batch_header_rec
4552: ,p_org_code => p_org_code

Line 4559: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4555: ,x_message_count => x_message_count
4556: ,x_message_list => x_message_list
4557: ,x_return_status => x_return_status );
4558:
4559: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4560: IF (g_debug = gme_debug.g_log_statement) THEN
4561: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4562: || ': batch validate error ');
4563: END IF;

Line 4564: RAISE fnd_api.g_exc_error;

4560: IF (g_debug = gme_debug.g_log_statement) THEN
4561: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4562: || ': batch validate error ');
4563: END IF;
4564: RAISE fnd_api.g_exc_error;
4565: END IF;
4566: gme_api_main.reopen_batch (p_validation_level => p_validation_level
4567: ,p_init_msg_list => fnd_api.g_false
4568: ,x_message_count => x_message_count

Line 4567: ,p_init_msg_list => fnd_api.g_false

4563: END IF;
4564: RAISE fnd_api.g_exc_error;
4565: END IF;
4566: gme_api_main.reopen_batch (p_validation_level => p_validation_level
4567: ,p_init_msg_list => fnd_api.g_false
4568: ,x_message_count => x_message_count
4569: ,x_message_list => x_message_list
4570: ,x_return_status => x_return_status
4571: ,p_batch_header_rec => l_batch_header_rec

Line 4575: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

4571: ,p_batch_header_rec => l_batch_header_rec
4572: ,p_reopen_steps => p_reopen_steps
4573: ,x_batch_header_rec => x_batch_header_rec);
4574:
4575: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
4576: RAISE batch_reopen_failure;
4577: ELSE
4578: IF p_commit = fnd_api.g_true THEN
4579: gme_api_pub.save_batch

Line 4578: IF p_commit = fnd_api.g_true THEN

4574:
4575: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
4576: RAISE batch_reopen_failure;
4577: ELSE
4578: IF p_commit = fnd_api.g_true THEN
4579: gme_api_pub.save_batch
4580: (p_header_id => null
4581: ,p_table => 1
4582: ,p_commit => fnd_api.g_false

Line 4582: ,p_commit => fnd_api.g_false

4578: IF p_commit = fnd_api.g_true THEN
4579: gme_api_pub.save_batch
4580: (p_header_id => null
4581: ,p_table => 1
4582: ,p_commit => fnd_api.g_false
4583: ,x_return_status => x_return_status);
4584:
4585: IF x_return_status = fnd_api.g_ret_sts_success THEN
4586: COMMIT;

Line 4585: IF x_return_status = fnd_api.g_ret_sts_success THEN

4581: ,p_table => 1
4582: ,p_commit => fnd_api.g_false
4583: ,x_return_status => x_return_status);
4584:
4585: IF x_return_status = fnd_api.g_ret_sts_success THEN
4586: COMMIT;
4587: ELSE
4588: RAISE fnd_api.g_exc_error;
4589: END IF;

Line 4588: RAISE fnd_api.g_exc_error;

4584:
4585: IF x_return_status = fnd_api.g_ret_sts_success THEN
4586: COMMIT;
4587: ELSE
4588: RAISE fnd_api.g_exc_error;
4589: END IF;
4590: END IF;
4591: END IF;
4592:

Line 4601: ,p_encoded => fnd_api.g_false

4597: EXCEPTION
4598: WHEN batch_reopen_failure THEN
4599: x_batch_header_rec := NULL;
4600: gme_common_pvt.count_and_get (x_count => x_message_count
4601: ,p_encoded => fnd_api.g_false
4602: ,x_data => x_message_list);
4603: x_return_status := fnd_api.g_ret_sts_error;
4604: WHEN fnd_api.g_exc_error THEN
4605: x_batch_header_rec := NULL;

Line 4603: x_return_status := fnd_api.g_ret_sts_error;

4599: x_batch_header_rec := NULL;
4600: gme_common_pvt.count_and_get (x_count => x_message_count
4601: ,p_encoded => fnd_api.g_false
4602: ,x_data => x_message_list);
4603: x_return_status := fnd_api.g_ret_sts_error;
4604: WHEN fnd_api.g_exc_error THEN
4605: x_batch_header_rec := NULL;
4606: x_return_status := fnd_api.g_ret_sts_error;
4607: gme_common_pvt.count_and_get (x_count => x_message_count

Line 4604: WHEN fnd_api.g_exc_error THEN

4600: gme_common_pvt.count_and_get (x_count => x_message_count
4601: ,p_encoded => fnd_api.g_false
4602: ,x_data => x_message_list);
4603: x_return_status := fnd_api.g_ret_sts_error;
4604: WHEN fnd_api.g_exc_error THEN
4605: x_batch_header_rec := NULL;
4606: x_return_status := fnd_api.g_ret_sts_error;
4607: gme_common_pvt.count_and_get (x_count => x_message_count
4608: ,p_encoded => fnd_api.g_false

Line 4606: x_return_status := fnd_api.g_ret_sts_error;

4602: ,x_data => x_message_list);
4603: x_return_status := fnd_api.g_ret_sts_error;
4604: WHEN fnd_api.g_exc_error THEN
4605: x_batch_header_rec := NULL;
4606: x_return_status := fnd_api.g_ret_sts_error;
4607: gme_common_pvt.count_and_get (x_count => x_message_count
4608: ,p_encoded => fnd_api.g_false
4609: ,x_data => x_message_list);
4610: WHEN OTHERS THEN

Line 4608: ,p_encoded => fnd_api.g_false

4604: WHEN fnd_api.g_exc_error THEN
4605: x_batch_header_rec := NULL;
4606: x_return_status := fnd_api.g_ret_sts_error;
4607: gme_common_pvt.count_and_get (x_count => x_message_count
4608: ,p_encoded => fnd_api.g_false
4609: ,x_data => x_message_list);
4610: WHEN OTHERS THEN
4611: x_batch_header_rec := NULL;
4612: gme_when_others ( p_api_name => l_api_name

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

4618: /*************************************************************************/
4619: PROCEDURE reopen_step (
4620: p_api_version IN NUMBER := 2
4621: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4622: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4623: ,p_commit IN VARCHAR2
4624: ,x_message_count OUT NOCOPY NUMBER
4625: ,x_message_list OUT NOCOPY VARCHAR2
4626: ,x_return_status OUT NOCOPY VARCHAR2

Line 4642: IF p_init_msg_list = fnd_api.g_true THEN

4638: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
4639: || l_api_name);
4640: END IF;
4641: /* Initialize message list and count if needed*/
4642: IF p_init_msg_list = fnd_api.g_true THEN
4643: fnd_msg_pub.initialize;
4644: END IF;
4645:
4646: /* Make sure we are call compatible */

Line 4647: IF NOT fnd_api.compatible_api_call (2

4643: fnd_msg_pub.initialize;
4644: END IF;
4645:
4646: /* Make sure we are call compatible */
4647: IF NOT fnd_api.compatible_api_call (2
4648: ,p_api_version
4649: ,'reopen_step'
4650: ,g_pkg_name) THEN
4651: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 4652: RAISE fnd_api.g_exc_error;

4648: ,p_api_version
4649: ,'reopen_step'
4650: ,g_pkg_name) THEN
4651: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4652: RAISE fnd_api.g_exc_error;
4653: END IF;
4654:
4655: /* Set the success staus to success inititally*/
4656: x_return_status := fnd_api.g_ret_sts_success;

Line 4656: x_return_status := fnd_api.g_ret_sts_success;

4652: RAISE fnd_api.g_exc_error;
4653: END IF;
4654:
4655: /* Set the success staus to success inititally*/
4656: x_return_status := fnd_api.g_ret_sts_success;
4657: gme_common_pvt.Validate_batch_step (
4658: p_batch_step_rec => p_batch_step_rec
4659: ,p_org_code => p_org_code
4660: ,p_batch_no => p_batch_header_rec.batch_no

Line 4667: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4663: ,x_message_count => x_message_count
4664: ,x_message_list => x_message_list
4665: ,x_return_status => x_return_status );
4666:
4667: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4668: IF (g_debug = gme_debug.g_log_statement) THEN
4669: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4670: || ': batch step validate error ');
4671: END IF;

Line 4672: RAISE fnd_api.g_exc_error;

4668: IF (g_debug = gme_debug.g_log_statement) THEN
4669: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4670: || ': batch step validate error ');
4671: END IF;
4672: RAISE fnd_api.g_exc_error;
4673: END IF;
4674: gme_api_main.reopen_step (p_validation_level => p_validation_level
4675: ,p_init_msg_list => fnd_api.g_false
4676: ,x_message_count => x_message_count

Line 4675: ,p_init_msg_list => fnd_api.g_false

4671: END IF;
4672: RAISE fnd_api.g_exc_error;
4673: END IF;
4674: gme_api_main.reopen_step (p_validation_level => p_validation_level
4675: ,p_init_msg_list => fnd_api.g_false
4676: ,x_message_count => x_message_count
4677: ,x_message_list => x_message_list
4678: ,x_return_status => x_return_status
4679: ,p_batch_header_rec => l_batch_header_rec

Line 4683: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

4679: ,p_batch_header_rec => l_batch_header_rec
4680: ,p_batch_step_rec => l_batch_step_rec
4681: ,x_batch_step_rec => x_batch_step_rec);
4682:
4683: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
4684: RAISE step_reopen_failure;
4685: ELSE
4686: IF p_commit = fnd_api.g_true THEN
4687: gme_api_pub.save_batch (p_header_id => null

Line 4686: IF p_commit = fnd_api.g_true THEN

4682:
4683: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
4684: RAISE step_reopen_failure;
4685: ELSE
4686: IF p_commit = fnd_api.g_true THEN
4687: gme_api_pub.save_batch (p_header_id => null
4688: ,p_table => 1
4689: ,p_commit => fnd_api.g_false
4690: ,x_return_status => x_return_status);

Line 4689: ,p_commit => fnd_api.g_false

4685: ELSE
4686: IF p_commit = fnd_api.g_true THEN
4687: gme_api_pub.save_batch (p_header_id => null
4688: ,p_table => 1
4689: ,p_commit => fnd_api.g_false
4690: ,x_return_status => x_return_status);
4691: IF x_return_status = fnd_api.g_ret_sts_success THEN
4692: COMMIT;
4693: ELSE

Line 4691: IF x_return_status = fnd_api.g_ret_sts_success THEN

4687: gme_api_pub.save_batch (p_header_id => null
4688: ,p_table => 1
4689: ,p_commit => fnd_api.g_false
4690: ,x_return_status => x_return_status);
4691: IF x_return_status = fnd_api.g_ret_sts_success THEN
4692: COMMIT;
4693: ELSE
4694: RAISE fnd_api.g_exc_error;
4695: END IF;

Line 4694: RAISE fnd_api.g_exc_error;

4690: ,x_return_status => x_return_status);
4691: IF x_return_status = fnd_api.g_ret_sts_success THEN
4692: COMMIT;
4693: ELSE
4694: RAISE fnd_api.g_exc_error;
4695: END IF;
4696: END IF;
4697: END IF;
4698:

Line 4707: ,p_encoded => fnd_api.g_false

4703: EXCEPTION
4704: WHEN step_reopen_failure THEN
4705: x_batch_step_rec := NULL;
4706: gme_common_pvt.count_and_get (x_count => x_message_count
4707: ,p_encoded => fnd_api.g_false
4708: ,x_data => x_message_list);
4709: x_return_status := fnd_api.g_ret_sts_error;
4710: WHEN fnd_api.g_exc_error THEN
4711: x_batch_step_rec := NULL;

Line 4709: x_return_status := fnd_api.g_ret_sts_error;

4705: x_batch_step_rec := NULL;
4706: gme_common_pvt.count_and_get (x_count => x_message_count
4707: ,p_encoded => fnd_api.g_false
4708: ,x_data => x_message_list);
4709: x_return_status := fnd_api.g_ret_sts_error;
4710: WHEN fnd_api.g_exc_error THEN
4711: x_batch_step_rec := NULL;
4712: x_return_status := fnd_api.g_ret_sts_error;
4713: gme_common_pvt.count_and_get (x_count => x_message_count

Line 4710: WHEN fnd_api.g_exc_error THEN

4706: gme_common_pvt.count_and_get (x_count => x_message_count
4707: ,p_encoded => fnd_api.g_false
4708: ,x_data => x_message_list);
4709: x_return_status := fnd_api.g_ret_sts_error;
4710: WHEN fnd_api.g_exc_error THEN
4711: x_batch_step_rec := NULL;
4712: x_return_status := fnd_api.g_ret_sts_error;
4713: gme_common_pvt.count_and_get (x_count => x_message_count
4714: ,p_encoded => fnd_api.g_false

Line 4712: x_return_status := fnd_api.g_ret_sts_error;

4708: ,x_data => x_message_list);
4709: x_return_status := fnd_api.g_ret_sts_error;
4710: WHEN fnd_api.g_exc_error THEN
4711: x_batch_step_rec := NULL;
4712: x_return_status := fnd_api.g_ret_sts_error;
4713: gme_common_pvt.count_and_get (x_count => x_message_count
4714: ,p_encoded => fnd_api.g_false
4715: ,x_data => x_message_list);
4716: WHEN OTHERS THEN

Line 4714: ,p_encoded => fnd_api.g_false

4710: WHEN fnd_api.g_exc_error THEN
4711: x_batch_step_rec := NULL;
4712: x_return_status := fnd_api.g_ret_sts_error;
4713: gme_common_pvt.count_and_get (x_count => x_message_count
4714: ,p_encoded => fnd_api.g_false
4715: ,x_data => x_message_list);
4716: WHEN OTHERS THEN
4717: x_batch_step_rec := NULL;
4718: gme_when_others ( p_api_name => l_api_name

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

4724: /*************************************************************************/
4725: PROCEDURE incremental_backflush
4726: (p_api_version IN NUMBER
4727: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4728: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4729: ,p_commit IN VARCHAR2 := fnd_api.g_false
4730: ,x_message_count OUT NOCOPY NUMBER
4731: ,x_message_list OUT NOCOPY VARCHAR2
4732: ,x_return_status OUT NOCOPY VARCHAR2

Line 4729: ,p_commit IN VARCHAR2 := fnd_api.g_false

4725: PROCEDURE incremental_backflush
4726: (p_api_version IN NUMBER
4727: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4728: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4729: ,p_commit IN VARCHAR2 := fnd_api.g_false
4730: ,x_message_count OUT NOCOPY NUMBER
4731: ,x_message_list OUT NOCOPY VARCHAR2
4732: ,x_return_status OUT NOCOPY VARCHAR2
4733: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 4739: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false

4735: ,p_material_detail_rec IN gme_material_details%ROWTYPE
4736: ,p_qty IN NUMBER
4737: ,p_qty_type IN NUMBER
4738: ,p_trans_date IN DATE
4739: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
4740: ,p_adjust_cmplt IN VARCHAR2 := fnd_api.g_true
4741: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
4742: IS
4743: l_api_name CONSTANT VARCHAR2 (30) := 'INCREMENTAL_BACKFLUSH';

Line 4740: ,p_adjust_cmplt IN VARCHAR2 := fnd_api.g_true

4736: ,p_qty IN NUMBER
4737: ,p_qty_type IN NUMBER
4738: ,p_trans_date IN DATE
4739: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
4740: ,p_adjust_cmplt IN VARCHAR2 := fnd_api.g_true
4741: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
4742: IS
4743: l_api_name CONSTANT VARCHAR2 (30) := 'INCREMENTAL_BACKFLUSH';
4744: l_material_detail_rec gme_material_details%ROWTYPE;

Line 4760: x_return_status := fnd_api.g_ret_sts_success;

4756: || l_api_name);
4757: END IF;
4758:
4759: /* Set the return status to success initially */
4760: x_return_status := fnd_api.g_ret_sts_success;
4761:
4762: IF p_init_msg_list = fnd_api.g_true THEN
4763: fnd_msg_pub.initialize;
4764: END IF;

Line 4762: IF p_init_msg_list = fnd_api.g_true THEN

4758:
4759: /* Set the return status to success initially */
4760: x_return_status := fnd_api.g_ret_sts_success;
4761:
4762: IF p_init_msg_list = fnd_api.g_true THEN
4763: fnd_msg_pub.initialize;
4764: END IF;
4765: IF NOT fnd_api.compatible_api_call (2.0
4766: ,p_api_version

Line 4765: IF NOT fnd_api.compatible_api_call (2.0

4761:
4762: IF p_init_msg_list = fnd_api.g_true THEN
4763: fnd_msg_pub.initialize;
4764: END IF;
4765: IF NOT fnd_api.compatible_api_call (2.0
4766: ,p_api_version
4767: ,'incremental_backflush'
4768: ,g_pkg_name) THEN
4769: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 4770: RAISE fnd_api.g_exc_error;

4766: ,p_api_version
4767: ,'incremental_backflush'
4768: ,g_pkg_name) THEN
4769: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4770: RAISE fnd_api.g_exc_error;
4771: END IF;
4772:
4773: /* Retrieve Batch Header and Material Detail Record */
4774: gme_common_pvt.Validate_material_detail

Line 4784: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4780: ,x_material_detail_rec => l_material_detail_rec
4781: ,x_message_count => x_message_count
4782: ,x_message_list => x_message_list
4783: ,x_return_status => x_return_status );
4784: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4785: IF (g_debug = gme_debug.g_log_statement) THEN
4786: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4787: || ': batch mateiral validate error ');
4788: END IF;

Line 4789: RAISE fnd_api.g_exc_error;

4785: IF (g_debug = gme_debug.g_log_statement) THEN
4786: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
4787: || ': batch mateiral validate error ');
4788: END IF;
4789: RAISE fnd_api.g_exc_error;
4790: END IF;
4791: -- Validations
4792: IF p_trans_date IS NOT NULL THEN
4793: IF p_trans_date > SYSDATE THEN

Line 4796: RAISE fnd_api.g_exc_error;

4792: IF p_trans_date IS NOT NULL THEN
4793: IF p_trans_date > SYSDATE THEN
4794: gme_common_pvt.log_message(p_product_code => 'GMA'
4795: ,p_message_code => 'SY_NOFUTUREDATE');
4796: RAISE fnd_api.g_exc_error;
4797: END IF;
4798: END IF;
4799:
4800: /*Bug#5277982 if the batch is completed then we should not allow +veIB through API. so restricting this in public layer.

Line 4809: RAISE fnd_api.g_exc_error;

4805: IF (p_qty_type = 0 AND p_qty > 0) OR
4806: (p_qty_type = 1 AND p_qty > l_material_detail_rec.actual_qty) OR
4807: (p_qty_type = 2 AND (l_material_detail_rec.wip_plan_qty *p_qty/100) > l_material_detail_rec.actual_qty) THEN
4808: gme_common_pvt.log_message('GME_IB_NOT_ALLOWED');
4809: RAISE fnd_api.g_exc_error;
4810: END IF;
4811: END IF;
4812:
4813: gme_incremental_backflush_pvt.validate_material_for_IB

Line 4819: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4815: ,p_batch_header_rec => l_batch_header_rec
4816: ,p_adjust_cmplt => p_adjust_cmplt
4817: ,x_return_status => x_return_status);
4818:
4819: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4820: RAISE fnd_api.g_exc_error;
4821: END IF;
4822:
4823: gme_incremental_backflush_pvt.validate_qty_for_IB

Line 4820: RAISE fnd_api.g_exc_error;

4816: ,p_adjust_cmplt => p_adjust_cmplt
4817: ,x_return_status => x_return_status);
4818:
4819: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4820: RAISE fnd_api.g_exc_error;
4821: END IF;
4822:
4823: gme_incremental_backflush_pvt.validate_qty_for_IB
4824: (p_qty_type => p_qty_type

Line 4829: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4825: ,p_qty => p_qty
4826: ,p_actual_qty => l_material_detail_rec.actual_qty
4827: ,x_return_status => x_return_status);
4828:
4829: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4830: RAISE fnd_api.g_exc_error;
4831: END IF;
4832:
4833: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 4830: RAISE fnd_api.g_exc_error;

4826: ,p_actual_qty => l_material_detail_rec.actual_qty
4827: ,x_return_status => x_return_status);
4828:
4829: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4830: RAISE fnd_api.g_exc_error;
4831: END IF;
4832:
4833: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
4834:

Line 4833: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

4829: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4830: RAISE fnd_api.g_exc_error;
4831: END IF;
4832:
4833: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
4834:
4835: /* Invoke main */
4836: gme_api_main.incremental_backflush
4837: (p_validation_level => p_validation_level

Line 4838: ,p_init_msg_list => fnd_api.g_false

4834:
4835: /* Invoke main */
4836: gme_api_main.incremental_backflush
4837: (p_validation_level => p_validation_level
4838: ,p_init_msg_list => fnd_api.g_false
4839: ,x_message_count => x_message_count
4840: ,x_message_list => x_message_list
4841: ,x_return_status => x_return_status
4842: ,p_batch_header_rec => l_batch_header_rec

Line 4849: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

4845: ,p_qty_type => p_qty_type
4846: ,p_trans_date => p_trans_date
4847: ,x_exception_material_tbl => l_exception_material_tbl);
4848:
4849: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
4850: x_return_status := fnd_api.g_ret_sts_success;
4851: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
4852: x_exception_material_tbl := l_exception_material_tbl;
4853: END IF;

Line 4850: x_return_status := fnd_api.g_ret_sts_success;

4846: ,p_trans_date => p_trans_date
4847: ,x_exception_material_tbl => l_exception_material_tbl);
4848:
4849: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
4850: x_return_status := fnd_api.g_ret_sts_success;
4851: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
4852: x_exception_material_tbl := l_exception_material_tbl;
4853: END IF;
4854:

Line 4855: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4851: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
4852: x_exception_material_tbl := l_exception_material_tbl;
4853: END IF;
4854:
4855: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4856: RAISE error_incr_backflush;
4857: END IF;
4858:
4859: /* Invoke save_batch */

Line 4866: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4862: ,p_table => 1
4863: ,p_commit => p_commit
4864: ,x_return_status => x_return_status);
4865:
4866: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4867: RAISE fnd_api.g_exc_error;
4868: END IF;
4869:
4870: IF g_debug <= gme_debug.g_log_procedure THEN

Line 4867: RAISE fnd_api.g_exc_error;

4863: ,p_commit => p_commit
4864: ,x_return_status => x_return_status);
4865:
4866: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4867: RAISE fnd_api.g_exc_error;
4868: END IF;
4869:
4870: IF g_debug <= gme_debug.g_log_procedure THEN
4871: gme_debug.put_line ( ' Completed '

Line 4879: ,p_encoded => fnd_api.g_false

4875: END IF;
4876: EXCEPTION
4877: WHEN error_incr_backflush THEN
4878: gme_common_pvt.count_and_get (x_count => x_message_count
4879: ,p_encoded => fnd_api.g_false
4880: ,x_data => x_message_list);
4881: WHEN fnd_api.g_exc_error THEN
4882: x_return_status := fnd_api.g_ret_sts_error;
4883: fnd_msg_pub.count_and_get (p_count => x_message_count

Line 4881: WHEN fnd_api.g_exc_error THEN

4877: WHEN error_incr_backflush THEN
4878: gme_common_pvt.count_and_get (x_count => x_message_count
4879: ,p_encoded => fnd_api.g_false
4880: ,x_data => x_message_list);
4881: WHEN fnd_api.g_exc_error THEN
4882: x_return_status := fnd_api.g_ret_sts_error;
4883: fnd_msg_pub.count_and_get (p_count => x_message_count
4884: ,p_encoded => fnd_api.g_false
4885: ,p_data => x_message_list);

Line 4882: x_return_status := fnd_api.g_ret_sts_error;

4878: gme_common_pvt.count_and_get (x_count => x_message_count
4879: ,p_encoded => fnd_api.g_false
4880: ,x_data => x_message_list);
4881: WHEN fnd_api.g_exc_error THEN
4882: x_return_status := fnd_api.g_ret_sts_error;
4883: fnd_msg_pub.count_and_get (p_count => x_message_count
4884: ,p_encoded => fnd_api.g_false
4885: ,p_data => x_message_list);
4886: WHEN OTHERS THEN

Line 4884: ,p_encoded => fnd_api.g_false

4880: ,x_data => x_message_list);
4881: WHEN fnd_api.g_exc_error THEN
4882: x_return_status := fnd_api.g_ret_sts_error;
4883: fnd_msg_pub.count_and_get (p_count => x_message_count
4884: ,p_encoded => fnd_api.g_false
4885: ,p_data => x_message_list);
4886: WHEN OTHERS THEN
4887: gme_when_others ( p_api_name => l_api_name
4888: ,x_message_count => x_message_count

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

4894: PROCEDURE create_material_txn (
4895: p_api_version IN NUMBER := 2.0
4896: ,p_validation_level IN NUMBER
4897: := gme_common_pvt.g_max_errors
4898: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4899: ,p_commit IN VARCHAR2 := fnd_api.g_false
4900: ,x_message_count OUT NOCOPY NUMBER
4901: ,x_message_list OUT NOCOPY VARCHAR2
4902: ,x_return_status OUT NOCOPY VARCHAR2

Line 4899: ,p_commit IN VARCHAR2 := fnd_api.g_false

4895: p_api_version IN NUMBER := 2.0
4896: ,p_validation_level IN NUMBER
4897: := gme_common_pvt.g_max_errors
4898: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4899: ,p_commit IN VARCHAR2 := fnd_api.g_false
4900: ,x_message_count OUT NOCOPY NUMBER
4901: ,x_message_list OUT NOCOPY VARCHAR2
4902: ,x_return_status OUT NOCOPY VARCHAR2
4903: ,p_org_code IN VARCHAR2 := NULL

Line 4961: x_return_status := fnd_api.g_ret_sts_success;

4957: || l_api_name);
4958: END IF;
4959:
4960: /* Set the return status to success initially */
4961: x_return_status := fnd_api.g_ret_sts_success;
4962:
4963: /* Set savepoint here */
4964: SAVEPOINT create_material_txn;
4965:

Line 4966: IF p_init_msg_list = fnd_api.g_true THEN

4962:
4963: /* Set savepoint here */
4964: SAVEPOINT create_material_txn;
4965:
4966: IF p_init_msg_list = fnd_api.g_true THEN
4967: fnd_msg_pub.initialize;
4968: END IF;
4969:
4970: IF NOT fnd_api.compatible_api_call (2.0

Line 4970: IF NOT fnd_api.compatible_api_call (2.0

4966: IF p_init_msg_list = fnd_api.g_true THEN
4967: fnd_msg_pub.initialize;
4968: END IF;
4969:
4970: IF NOT fnd_api.compatible_api_call (2.0
4971: ,p_api_version
4972: ,'create_material_txn'
4973: ,g_pkg_name) THEN
4974: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 4975: RAISE fnd_api.g_exc_error;

4971: ,p_api_version
4972: ,'create_material_txn'
4973: ,g_pkg_name) THEN
4974: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4975: RAISE fnd_api.g_exc_error;
4976: END IF;
4977:
4978: l_mmti_rec := p_mmti_rec;
4979: l_mmli_tbl := p_mmli_tbl;

Line 4984: RAISE fnd_api.g_exc_error;

4980:
4981: IF (l_mmti_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
4982: fnd_message.set_name ('INV', 'INV_ORG_REQUIRED');
4983: fnd_msg_pub.ADD;
4984: RAISE fnd_api.g_exc_error;
4985: END IF;
4986:
4987: /* gme_common_pvt.g_error_count := 0;
4988: gme_common_pvt.g_setup_done :=

Line 4993: RAISE fnd_api.g_exc_error;

4989: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id
4990: ,p_org_code => p_org_code);
4991:
4992: IF NOT gme_common_pvt.g_setup_done THEN
4993: RAISE fnd_api.g_exc_error;
4994: ELSE
4995: l_mmti_rec.organization_id := gme_common_pvt.g_organization_id;
4996: END IF;*/
4997: gme_common_pvt.set_timestamp;

Line 5012: IF x_return_status <> fnd_api.g_ret_sts_success THEN

5008: ,x_material_detail_rec => l_mat_dtl_rec_out
5009: ,x_message_count => x_message_count
5010: ,x_message_list => x_message_list
5011: ,x_return_status => x_return_status );
5012: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5013: IF (g_debug = gme_debug.g_log_statement) THEN
5014: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
5015: || ': batch mateiral validate error ');
5016: END IF;

Line 5017: RAISE fnd_api.g_exc_error;

5013: IF (g_debug = gme_debug.g_log_statement) THEN
5014: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
5015: || ': batch mateiral validate error ');
5016: END IF;
5017: RAISE fnd_api.g_exc_error;
5018: ELSE
5019: l_mat_dtl_rec := l_mat_dtl_rec_out;
5020: l_mmti_rec.trx_source_line_id := l_mat_dtl_rec.material_detail_id;
5021: l_mmti_rec.transaction_source_id := l_batch_header_rec.batch_id;

Line 5034: RAISE fnd_api.g_exc_error;

5030: gme_debug.put_line('Item cursor fetch no record in mtl_system_items_b: ');
5031: gme_debug.put_line('inventory_item_id = '|| TO_CHAR (l_mmti_rec.inventory_item_id) );
5032: gme_debug.put_line('organization_id = '|| TO_CHAR (l_mmti_rec.organization_id) );
5033: END IF;
5034: RAISE fnd_api.g_exc_error;
5035: END IF;
5036: CLOSE cur_get_item_rec;
5037:
5038: /*Bug#5394232 Begin

Line 5047: IF l_return_status <> fnd_api.g_ret_sts_success THEN

5043: ,p_invoke_mode => 'T'
5044: ,x_trans_date => l_trans_date
5045: ,x_return_status => l_return_status );
5046:
5047: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5048: RAISE fnd_api.g_exc_error;
5049: END IF;
5050: --initializing the transaction date according to default rules
5051: l_mmti_rec.transaction_date := l_trans_date;

Line 5048: RAISE fnd_api.g_exc_error;

5044: ,x_trans_date => l_trans_date
5045: ,x_return_status => l_return_status );
5046:
5047: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5048: RAISE fnd_api.g_exc_error;
5049: END IF;
5050: --initializing the transaction date according to default rules
5051: l_mmti_rec.transaction_date := l_trans_date;
5052: ELSE

Line 5057: RAISE fnd_api.g_exc_error;

5053: /* transaction date can't be in future and should not be less than actual start date of the batch*/
5054: IF l_mmti_rec.transaction_date < l_batch_header_rec.actual_start_date OR
5055: l_mmti_rec.transaction_date > SYSDATE THEN
5056: gme_common_pvt.log_message('GME_NOT_VALID_TRANS_DATE');
5057: RAISE fnd_api.g_exc_error;
5058: END IF;
5059: END IF;
5060: --Bug#5394232 End
5061:

Line 5066: IF p_generate_lot = fnd_api.g_true AND

5062: -- code for lot creation
5063: IF l_mat_dtl_rec.line_type IN (1, 2) THEN
5064: -- code for lot creation
5065: IF l_item_rec.lot_control_code = 2 THEN -- lot control
5066: IF p_generate_lot = fnd_api.g_true AND
5067: p_create_lot = fnd_api.g_false THEN
5068: RAISE fnd_api.g_exc_error;
5069: END IF;
5070:

Line 5067: p_create_lot = fnd_api.g_false THEN

5063: IF l_mat_dtl_rec.line_type IN (1, 2) THEN
5064: -- code for lot creation
5065: IF l_item_rec.lot_control_code = 2 THEN -- lot control
5066: IF p_generate_lot = fnd_api.g_true AND
5067: p_create_lot = fnd_api.g_false THEN
5068: RAISE fnd_api.g_exc_error;
5069: END IF;
5070:
5071: IF p_generate_parent_lot = fnd_api.g_true THEN

Line 5068: RAISE fnd_api.g_exc_error;

5064: -- code for lot creation
5065: IF l_item_rec.lot_control_code = 2 THEN -- lot control
5066: IF p_generate_lot = fnd_api.g_true AND
5067: p_create_lot = fnd_api.g_false THEN
5068: RAISE fnd_api.g_exc_error;
5069: END IF;
5070:
5071: IF p_generate_parent_lot = fnd_api.g_true THEN
5072: l_parent_gen_lot :=

Line 5071: IF p_generate_parent_lot = fnd_api.g_true THEN

5067: p_create_lot = fnd_api.g_false THEN
5068: RAISE fnd_api.g_exc_error;
5069: END IF;
5070:
5071: IF p_generate_parent_lot = fnd_api.g_true THEN
5072: l_parent_gen_lot :=
5073: inv_lot_api_pub.auto_gen_lot
5074: (p_org_id => l_mmti_rec.organization_id
5075: ,p_inventory_item_id => l_mmti_rec.inventory_item_id

Line 5090: ,p_init_msg_list => fnd_api.g_false

5086: ,p_transaction_action_id => NULL
5087: ,p_transaction_source_type_id => NULL
5088: ,p_lot_number => NULL
5089: ,p_api_version => 1.0
5090: ,p_init_msg_list => fnd_api.g_false
5091: ,p_commit => fnd_api.g_false
5092: ,p_validation_level => NULL
5093: ,p_parent_lot_number => NULL
5094: ,x_return_status => l_return_status

Line 5091: ,p_commit => fnd_api.g_false

5087: ,p_transaction_source_type_id => NULL
5088: ,p_lot_number => NULL
5089: ,p_api_version => 1.0
5090: ,p_init_msg_list => fnd_api.g_false
5091: ,p_commit => fnd_api.g_false
5092: ,p_validation_level => NULL
5093: ,p_parent_lot_number => NULL
5094: ,x_return_status => l_return_status
5095: ,x_msg_count => l_msg_count

Line 5098: IF l_return_status <> fnd_api.g_ret_sts_success THEN

5094: ,x_return_status => l_return_status
5095: ,x_msg_count => l_msg_count
5096: ,x_msg_data => l_msg_data);
5097:
5098: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5099: RAISE fnd_api.g_exc_error;
5100: END IF;
5101:
5102: IF (g_debug = gme_debug.g_log_statement) THEN

Line 5099: RAISE fnd_api.g_exc_error;

5095: ,x_msg_count => l_msg_count
5096: ,x_msg_data => l_msg_data);
5097:
5098: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5099: RAISE fnd_api.g_exc_error;
5100: END IF;
5101:
5102: IF (g_debug = gme_debug.g_log_statement) THEN
5103: gme_debug.put_line ( 'lot_gen'

Line 5111: IF p_create_lot = fnd_api.g_true

5107: END IF;
5108: END IF; -- p_generate_parent_lot
5109:
5110: FOR i IN 1 .. l_mmli_tbl.COUNT LOOP
5111: IF p_create_lot = fnd_api.g_true
5112: AND l_mmli_tbl (i).lot_number IS NULL THEN
5113: IF p_generate_lot = fnd_api.g_true THEN
5114: l_gen_lot :=
5115: inv_lot_api_pub.auto_gen_lot

Line 5113: IF p_generate_lot = fnd_api.g_true THEN

5109:
5110: FOR i IN 1 .. l_mmli_tbl.COUNT LOOP
5111: IF p_create_lot = fnd_api.g_true
5112: AND l_mmli_tbl (i).lot_number IS NULL THEN
5113: IF p_generate_lot = fnd_api.g_true THEN
5114: l_gen_lot :=
5115: inv_lot_api_pub.auto_gen_lot
5116: (p_org_id => l_mmti_rec.organization_id
5117: ,p_inventory_item_id => l_mmti_rec.inventory_item_id

Line 5132: ,p_init_msg_list => fnd_api.g_false

5128: ,p_transaction_action_id => NULL
5129: ,p_transaction_source_type_id => NULL
5130: ,p_lot_number => NULL
5131: ,p_api_version => 1.0
5132: ,p_init_msg_list => fnd_api.g_false
5133: ,p_commit => fnd_api.g_false
5134: ,p_validation_level => NULL
5135: ,p_parent_lot_number => l_parent_gen_lot
5136: ,x_return_status => l_return_status

Line 5133: ,p_commit => fnd_api.g_false

5129: ,p_transaction_source_type_id => NULL
5130: ,p_lot_number => NULL
5131: ,p_api_version => 1.0
5132: ,p_init_msg_list => fnd_api.g_false
5133: ,p_commit => fnd_api.g_false
5134: ,p_validation_level => NULL
5135: ,p_parent_lot_number => l_parent_gen_lot
5136: ,x_return_status => l_return_status
5137: ,x_msg_count => l_msg_count

Line 5140: IF l_return_status <> fnd_api.g_ret_sts_success THEN

5136: ,x_return_status => l_return_status
5137: ,x_msg_count => l_msg_count
5138: ,x_msg_data => l_msg_data);
5139:
5140: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5141: RAISE fnd_api.g_exc_error;
5142: END IF;
5143:
5144: IF (g_debug = gme_debug.g_log_statement) THEN

Line 5141: RAISE fnd_api.g_exc_error;

5137: ,x_msg_count => l_msg_count
5138: ,x_msg_data => l_msg_data);
5139:
5140: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5141: RAISE fnd_api.g_exc_error;
5142: END IF;
5143:
5144: IF (g_debug = gme_debug.g_log_statement) THEN
5145: gme_debug.put_line ( 'lot_gen'

Line 5165: ,p_init_msg_list => fnd_api.g_true

5161: ,x_lot_rec => x_lot_rec
5162: ,p_lot_rec => l_lot_rec
5163: ,p_source => l_source
5164: ,p_api_version => l_api_version
5165: ,p_init_msg_list => fnd_api.g_true
5166: ,p_commit => fnd_api.g_false
5167: ,p_validation_level => fnd_api.g_valid_level_full
5168: ,p_origin_txn_id => 1);
5169:

Line 5166: ,p_commit => fnd_api.g_false

5162: ,p_lot_rec => l_lot_rec
5163: ,p_source => l_source
5164: ,p_api_version => l_api_version
5165: ,p_init_msg_list => fnd_api.g_true
5166: ,p_commit => fnd_api.g_false
5167: ,p_validation_level => fnd_api.g_valid_level_full
5168: ,p_origin_txn_id => 1);
5169:
5170: IF l_return_status = fnd_api.g_ret_sts_error THEN

Line 5167: ,p_validation_level => fnd_api.g_valid_level_full

5163: ,p_source => l_source
5164: ,p_api_version => l_api_version
5165: ,p_init_msg_list => fnd_api.g_true
5166: ,p_commit => fnd_api.g_false
5167: ,p_validation_level => fnd_api.g_valid_level_full
5168: ,p_origin_txn_id => 1);
5169:
5170: IF l_return_status = fnd_api.g_ret_sts_error THEN
5171: RAISE fnd_api.g_exc_error;

Line 5170: IF l_return_status = fnd_api.g_ret_sts_error THEN

5166: ,p_commit => fnd_api.g_false
5167: ,p_validation_level => fnd_api.g_valid_level_full
5168: ,p_origin_txn_id => 1);
5169:
5170: IF l_return_status = fnd_api.g_ret_sts_error THEN
5171: RAISE fnd_api.g_exc_error;
5172: END IF;
5173:
5174: l_mmli_tbl (i).lot_number := x_lot_rec.lot_number;

Line 5171: RAISE fnd_api.g_exc_error;

5167: ,p_validation_level => fnd_api.g_valid_level_full
5168: ,p_origin_txn_id => 1);
5169:
5170: IF l_return_status = fnd_api.g_ret_sts_error THEN
5171: RAISE fnd_api.g_exc_error;
5172: END IF;
5173:
5174: l_mmli_tbl (i).lot_number := x_lot_rec.lot_number;
5175: END IF; -- p_create_lot

Line 5180: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

5176: END LOOP;
5177: END IF; -- for lot_control
5178: END IF; -- for line_type
5179:
5180: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5181: /* Bug 5554841 Migration will call this with existing header ID*/
5182: --gme_common_pvt.g_transaction_header_id := NULL;
5183: gme_transactions_pvt.create_material_txn
5184: (p_mmti_rec => l_mmti_rec

Line 5188: IF l_return_status = fnd_api.g_ret_sts_success THEN

5184: (p_mmti_rec => l_mmti_rec
5185: ,p_mmli_tbl => l_mmli_tbl
5186: ,x_return_status => l_return_status);
5187:
5188: IF l_return_status = fnd_api.g_ret_sts_success THEN
5189: IF g_debug <= gme_debug.g_log_procedure THEN
5190: gme_debug.put_line ( 'before save batch'
5191: || gme_common_pvt.g_transaction_header_id);
5192: END IF;

Line 5205: IF x_return_status <> fnd_api.g_ret_sts_success THEN

5201: gme_debug.put_line ( 'return from save batch with'
5202: || x_return_status);
5203: END IF;
5204:
5205: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5206: RAISE fnd_api.g_exc_error;
5207: END IF;
5208: ELSE
5209: RAISE create_txn_fail;

Line 5206: RAISE fnd_api.g_exc_error;

5202: || x_return_status);
5203: END IF;
5204:
5205: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5206: RAISE fnd_api.g_exc_error;
5207: END IF;
5208: ELSE
5209: RAISE create_txn_fail;
5210: END IF;

Line 5237: ,p_encoded => fnd_api.g_false

5233: EXCEPTION
5234: WHEN create_txn_fail THEN
5235: ROLLBACK TO SAVEPOINT create_material_txn;
5236: gme_common_pvt.count_and_get (x_count => x_message_count
5237: ,p_encoded => fnd_api.g_false
5238: ,x_data => x_message_list);
5239: /* Bug 5554841 have to set x_return_status*/
5240: x_return_status := l_return_status;
5241: WHEN fnd_api.g_exc_error THEN

Line 5241: WHEN fnd_api.g_exc_error THEN

5237: ,p_encoded => fnd_api.g_false
5238: ,x_data => x_message_list);
5239: /* Bug 5554841 have to set x_return_status*/
5240: x_return_status := l_return_status;
5241: WHEN fnd_api.g_exc_error THEN
5242: ROLLBACK TO SAVEPOINT create_material_txn;
5243: x_return_status := fnd_api.g_ret_sts_error;
5244: gme_common_pvt.count_and_get (x_count => x_message_count
5245: ,p_encoded => fnd_api.g_false

Line 5243: x_return_status := fnd_api.g_ret_sts_error;

5239: /* Bug 5554841 have to set x_return_status*/
5240: x_return_status := l_return_status;
5241: WHEN fnd_api.g_exc_error THEN
5242: ROLLBACK TO SAVEPOINT create_material_txn;
5243: x_return_status := fnd_api.g_ret_sts_error;
5244: gme_common_pvt.count_and_get (x_count => x_message_count
5245: ,p_encoded => fnd_api.g_false
5246: ,x_data => x_message_list);
5247: WHEN OTHERS THEN

Line 5245: ,p_encoded => fnd_api.g_false

5241: WHEN fnd_api.g_exc_error THEN
5242: ROLLBACK TO SAVEPOINT create_material_txn;
5243: x_return_status := fnd_api.g_ret_sts_error;
5244: gme_common_pvt.count_and_get (x_count => x_message_count
5245: ,p_encoded => fnd_api.g_false
5246: ,x_data => x_message_list);
5247: WHEN OTHERS THEN
5248: ROLLBACK TO SAVEPOINT create_material_txn;
5249: gme_when_others ( p_api_name => l_api_name

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

5256: PROCEDURE update_material_txn (
5257: p_api_version IN NUMBER := 2.0
5258: ,p_validation_level IN NUMBER
5259: := gme_common_pvt.g_max_errors
5260: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5261: ,p_commit IN VARCHAR2 := fnd_api.g_false
5262: ,x_message_count OUT NOCOPY NUMBER
5263: ,x_message_list OUT NOCOPY VARCHAR2
5264: ,x_return_status OUT NOCOPY VARCHAR2

Line 5261: ,p_commit IN VARCHAR2 := fnd_api.g_false

5257: p_api_version IN NUMBER := 2.0
5258: ,p_validation_level IN NUMBER
5259: := gme_common_pvt.g_max_errors
5260: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5261: ,p_commit IN VARCHAR2 := fnd_api.g_false
5262: ,x_message_count OUT NOCOPY NUMBER
5263: ,x_message_list OUT NOCOPY VARCHAR2
5264: ,x_return_status OUT NOCOPY VARCHAR2
5265: ,p_transaction_id IN NUMBER

Line 5332: x_return_status := fnd_api.g_ret_sts_success;

5328:
5329: /* Set the savepoint */
5330: SAVEPOINT update_transaction;
5331: /* Set the return status to success initially */
5332: x_return_status := fnd_api.g_ret_sts_success;
5333:
5334: IF p_init_msg_list = fnd_api.g_true THEN
5335: fnd_msg_pub.initialize;
5336: END IF;

Line 5334: IF p_init_msg_list = fnd_api.g_true THEN

5330: SAVEPOINT update_transaction;
5331: /* Set the return status to success initially */
5332: x_return_status := fnd_api.g_ret_sts_success;
5333:
5334: IF p_init_msg_list = fnd_api.g_true THEN
5335: fnd_msg_pub.initialize;
5336: END IF;
5337:
5338: IF NOT fnd_api.compatible_api_call (2.0

Line 5338: IF NOT fnd_api.compatible_api_call (2.0

5334: IF p_init_msg_list = fnd_api.g_true THEN
5335: fnd_msg_pub.initialize;
5336: END IF;
5337:
5338: IF NOT fnd_api.compatible_api_call (2.0
5339: ,p_api_version
5340: ,'update_material_txn'
5341: ,g_pkg_name) THEN
5342: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 5343: RAISE fnd_api.g_exc_error;

5339: ,p_api_version
5340: ,'update_material_txn'
5341: ,g_pkg_name) THEN
5342: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5343: RAISE fnd_api.g_exc_error;
5344: END IF;
5345:
5346: IF (p_transaction_id IS NULL) THEN
5347: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

Line 5350: RAISE fnd_api.g_exc_error;

5346: IF (p_transaction_id IS NULL) THEN
5347: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
5348: ,'FIELD_NAME'
5349: ,'p_transaction_id');
5350: RAISE fnd_api.g_exc_error;
5351: END IF;
5352:
5353: OPEN cur_trans_org (p_transaction_id);
5354: FETCH cur_trans_org INTO l_orgn_id, l_batch_id, l_material_detail_id, l_txn_type_id;

Line 5363: RAISE fnd_api.g_exc_error;

5359: gme_common_pvt.g_error_count := 0;
5360: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => l_orgn_id);
5361:
5362: IF NOT gme_common_pvt.g_setup_done THEN
5363: RAISE fnd_api.g_exc_error;
5364: ELSE
5365: l_orgn_id := gme_common_pvt.g_organization_id;
5366: END IF;
5367:

Line 5374: RAISE fnd_api.g_exc_error;

5370:
5371: IF NOT gme_material_details_dbl.fetch_row
5372: (p_material_detail => l_mat_dtl_rec
5373: ,x_material_detail => l_mat_dtl_rec) THEN
5374: RAISE fnd_api.g_exc_error;
5375: END IF;
5376: /* Added for bug 5597385 */
5377: IF (l_mat_dtl_rec.organization_id <> l_orgn_id
5378: OR l_mat_dtl_rec.batch_id <> l_batch_id

Line 5401: RAISE fnd_api.g_exc_error;

5397: || TO_CHAR (l_mmti_rec.inventory_item_id) );
5398: gme_debug.put_line ( 'organization_id = '
5399: || TO_CHAR (l_mmti_rec.organization_id) );
5400: END IF;
5401: RAISE fnd_api.g_exc_error;
5402: END IF;
5403: CLOSE cur_get_item_rec;
5404:
5405: -- code for lot creation

Line 5407: IF p_generate_lot = fnd_api.g_true

5403: CLOSE cur_get_item_rec;
5404:
5405: -- code for lot creation
5406: IF l_item_rec.lot_control_code = 2 THEN -- lot control
5407: IF p_generate_lot = fnd_api.g_true
5408: AND p_create_lot = fnd_api.g_false THEN
5409: RAISE fnd_api.g_exc_error;
5410: END IF;
5411:

Line 5408: AND p_create_lot = fnd_api.g_false THEN

5404:
5405: -- code for lot creation
5406: IF l_item_rec.lot_control_code = 2 THEN -- lot control
5407: IF p_generate_lot = fnd_api.g_true
5408: AND p_create_lot = fnd_api.g_false THEN
5409: RAISE fnd_api.g_exc_error;
5410: END IF;
5411:
5412: IF p_generate_parent_lot = fnd_api.g_true THEN

Line 5409: RAISE fnd_api.g_exc_error;

5405: -- code for lot creation
5406: IF l_item_rec.lot_control_code = 2 THEN -- lot control
5407: IF p_generate_lot = fnd_api.g_true
5408: AND p_create_lot = fnd_api.g_false THEN
5409: RAISE fnd_api.g_exc_error;
5410: END IF;
5411:
5412: IF p_generate_parent_lot = fnd_api.g_true THEN
5413: l_parent_gen_lot :=

Line 5412: IF p_generate_parent_lot = fnd_api.g_true THEN

5408: AND p_create_lot = fnd_api.g_false THEN
5409: RAISE fnd_api.g_exc_error;
5410: END IF;
5411:
5412: IF p_generate_parent_lot = fnd_api.g_true THEN
5413: l_parent_gen_lot :=
5414: inv_lot_api_pub.auto_gen_lot
5415: (p_org_id => l_mmti_rec.organization_id
5416: ,p_inventory_item_id => l_mmti_rec.inventory_item_id

Line 5431: ,p_init_msg_list => fnd_api.g_false

5427: ,p_transaction_action_id => NULL
5428: ,p_transaction_source_type_id => NULL
5429: ,p_lot_number => NULL
5430: ,p_api_version => 1.0
5431: ,p_init_msg_list => fnd_api.g_false
5432: ,p_commit => fnd_api.g_false
5433: ,p_validation_level => NULL
5434: ,p_parent_lot_number => NULL
5435: ,x_return_status => l_return_status

Line 5432: ,p_commit => fnd_api.g_false

5428: ,p_transaction_source_type_id => NULL
5429: ,p_lot_number => NULL
5430: ,p_api_version => 1.0
5431: ,p_init_msg_list => fnd_api.g_false
5432: ,p_commit => fnd_api.g_false
5433: ,p_validation_level => NULL
5434: ,p_parent_lot_number => NULL
5435: ,x_return_status => l_return_status
5436: ,x_msg_count => l_msg_count

Line 5439: IF l_return_status <> fnd_api.g_ret_sts_success THEN

5435: ,x_return_status => l_return_status
5436: ,x_msg_count => l_msg_count
5437: ,x_msg_data => l_msg_data);
5438:
5439: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5440: RAISE fnd_api.g_exc_error;
5441: END IF;
5442:
5443: IF (g_debug = gme_debug.g_log_statement) THEN

Line 5440: RAISE fnd_api.g_exc_error;

5436: ,x_msg_count => l_msg_count
5437: ,x_msg_data => l_msg_data);
5438:
5439: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5440: RAISE fnd_api.g_exc_error;
5441: END IF;
5442:
5443: IF (g_debug = gme_debug.g_log_statement) THEN
5444: gme_debug.put_line ( 'lot_gen'

Line 5452: IF p_create_lot = fnd_api.g_true

5448: END IF;
5449: END IF; -- p_generate_parent_lot
5450:
5451: FOR i IN 1 .. l_mmli_tbl.COUNT LOOP
5452: IF p_create_lot = fnd_api.g_true
5453: AND l_mmli_tbl (i).lot_number IS NULL THEN
5454: IF p_generate_lot = fnd_api.g_true THEN
5455: l_gen_lot :=
5456: inv_lot_api_pub.auto_gen_lot

Line 5454: IF p_generate_lot = fnd_api.g_true THEN

5450:
5451: FOR i IN 1 .. l_mmli_tbl.COUNT LOOP
5452: IF p_create_lot = fnd_api.g_true
5453: AND l_mmli_tbl (i).lot_number IS NULL THEN
5454: IF p_generate_lot = fnd_api.g_true THEN
5455: l_gen_lot :=
5456: inv_lot_api_pub.auto_gen_lot
5457: (p_org_id => l_mmti_rec.organization_id
5458: ,p_inventory_item_id => l_mmti_rec.inventory_item_id

Line 5473: ,p_init_msg_list => fnd_api.g_false

5469: ,p_transaction_action_id => NULL
5470: ,p_transaction_source_type_id => NULL
5471: ,p_lot_number => NULL
5472: ,p_api_version => 1.0
5473: ,p_init_msg_list => fnd_api.g_false
5474: ,p_commit => fnd_api.g_false
5475: ,p_validation_level => NULL
5476: ,p_parent_lot_number => l_parent_gen_lot
5477: ,x_return_status => l_return_status

Line 5474: ,p_commit => fnd_api.g_false

5470: ,p_transaction_source_type_id => NULL
5471: ,p_lot_number => NULL
5472: ,p_api_version => 1.0
5473: ,p_init_msg_list => fnd_api.g_false
5474: ,p_commit => fnd_api.g_false
5475: ,p_validation_level => NULL
5476: ,p_parent_lot_number => l_parent_gen_lot
5477: ,x_return_status => l_return_status
5478: ,x_msg_count => l_msg_count

Line 5481: IF l_return_status <> fnd_api.g_ret_sts_success THEN

5477: ,x_return_status => l_return_status
5478: ,x_msg_count => l_msg_count
5479: ,x_msg_data => l_msg_data);
5480:
5481: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5482: RAISE fnd_api.g_exc_error;
5483: END IF;
5484:
5485: IF (g_debug = gme_debug.g_log_statement) THEN

Line 5482: RAISE fnd_api.g_exc_error;

5478: ,x_msg_count => l_msg_count
5479: ,x_msg_data => l_msg_data);
5480:
5481: IF l_return_status <> fnd_api.g_ret_sts_success THEN
5482: RAISE fnd_api.g_exc_error;
5483: END IF;
5484:
5485: IF (g_debug = gme_debug.g_log_statement) THEN
5486: gme_debug.put_line ( 'lot_gen'

Line 5506: ,p_init_msg_list => fnd_api.g_true

5502: ,x_lot_rec => x_lot_rec
5503: ,p_lot_rec => l_lot_rec
5504: ,p_source => l_source
5505: ,p_api_version => l_api_version
5506: ,p_init_msg_list => fnd_api.g_true
5507: ,p_commit => fnd_api.g_false
5508: ,p_validation_level => fnd_api.g_valid_level_full
5509: ,p_origin_txn_id => 1);
5510:

Line 5507: ,p_commit => fnd_api.g_false

5503: ,p_lot_rec => l_lot_rec
5504: ,p_source => l_source
5505: ,p_api_version => l_api_version
5506: ,p_init_msg_list => fnd_api.g_true
5507: ,p_commit => fnd_api.g_false
5508: ,p_validation_level => fnd_api.g_valid_level_full
5509: ,p_origin_txn_id => 1);
5510:
5511: IF l_return_status = fnd_api.g_ret_sts_error THEN

Line 5508: ,p_validation_level => fnd_api.g_valid_level_full

5504: ,p_source => l_source
5505: ,p_api_version => l_api_version
5506: ,p_init_msg_list => fnd_api.g_true
5507: ,p_commit => fnd_api.g_false
5508: ,p_validation_level => fnd_api.g_valid_level_full
5509: ,p_origin_txn_id => 1);
5510:
5511: IF l_return_status = fnd_api.g_ret_sts_error THEN
5512: RAISE fnd_api.g_exc_error;

Line 5511: IF l_return_status = fnd_api.g_ret_sts_error THEN

5507: ,p_commit => fnd_api.g_false
5508: ,p_validation_level => fnd_api.g_valid_level_full
5509: ,p_origin_txn_id => 1);
5510:
5511: IF l_return_status = fnd_api.g_ret_sts_error THEN
5512: RAISE fnd_api.g_exc_error;
5513: END IF;
5514:
5515: l_mmli_tbl (i).lot_number := x_lot_rec.lot_number;

Line 5512: RAISE fnd_api.g_exc_error;

5508: ,p_validation_level => fnd_api.g_valid_level_full
5509: ,p_origin_txn_id => 1);
5510:
5511: IF l_return_status = fnd_api.g_ret_sts_error THEN
5512: RAISE fnd_api.g_exc_error;
5513: END IF;
5514:
5515: l_mmli_tbl (i).lot_number := x_lot_rec.lot_number;
5516: END IF; -- p_create_lot

Line 5521: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

5517: END LOOP;
5518: END IF; -- for lot_control
5519: END IF; -- for line_type
5520:
5521: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5522: gme_common_pvt.g_transaction_header_id := NULL;
5523: gme_transactions_pvt.update_material_txn
5524: (p_transaction_id => p_transaction_id
5525: ,p_mmti_rec => l_mmti_rec

Line 5529: IF l_return_status = fnd_api.g_ret_sts_success THEN

5525: ,p_mmti_rec => l_mmti_rec
5526: ,p_mmli_tbl => l_mmli_tbl
5527: ,x_return_status => l_return_status);
5528:
5529: IF l_return_status = fnd_api.g_ret_sts_success THEN
5530: IF g_debug <= gme_debug.g_log_procedure THEN
5531: gme_debug.put_line ( 'before save batch'
5532: || gme_common_pvt.g_transaction_header_id);
5533: END IF;

Line 5546: IF x_return_status <> fnd_api.g_ret_sts_success THEN

5542: gme_debug.put_line ( 'return from save batch with'
5543: || x_return_status);
5544: END IF;
5545:
5546: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5547: RAISE fnd_api.g_exc_error;
5548: END IF;
5549: ELSE
5550: RAISE update_txn_fail;

Line 5547: RAISE fnd_api.g_exc_error;

5543: || x_return_status);
5544: END IF;
5545:
5546: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5547: RAISE fnd_api.g_exc_error;
5548: END IF;
5549: ELSE
5550: RAISE update_txn_fail;
5551: END IF;

Line 5579: x_return_status := fnd_api.g_ret_sts_error;

5575: EXCEPTION
5576: WHEN update_txn_mismatch THEN
5577: ROLLBACK TO SAVEPOINT update_transaction;
5578: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
5579: x_return_status := fnd_api.g_ret_sts_error;
5580: gme_common_pvt.count_and_get (x_count => x_message_count
5581: ,p_encoded => fnd_api.g_false
5582: ,x_data => x_message_list);
5583: WHEN update_txn_fail THEN

Line 5581: ,p_encoded => fnd_api.g_false

5577: ROLLBACK TO SAVEPOINT update_transaction;
5578: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
5579: x_return_status := fnd_api.g_ret_sts_error;
5580: gme_common_pvt.count_and_get (x_count => x_message_count
5581: ,p_encoded => fnd_api.g_false
5582: ,x_data => x_message_list);
5583: WHEN update_txn_fail THEN
5584: ROLLBACK TO SAVEPOINT update_transaction;
5585: gme_common_pvt.count_and_get (x_count => x_message_count

Line 5586: ,p_encoded => fnd_api.g_false

5582: ,x_data => x_message_list);
5583: WHEN update_txn_fail THEN
5584: ROLLBACK TO SAVEPOINT update_transaction;
5585: gme_common_pvt.count_and_get (x_count => x_message_count
5586: ,p_encoded => fnd_api.g_false
5587: ,x_data => x_message_list);
5588: WHEN fnd_api.g_exc_error THEN
5589: ROLLBACK TO SAVEPOINT update_transaction;
5590: x_return_status := fnd_api.g_ret_sts_error;

Line 5588: WHEN fnd_api.g_exc_error THEN

5584: ROLLBACK TO SAVEPOINT update_transaction;
5585: gme_common_pvt.count_and_get (x_count => x_message_count
5586: ,p_encoded => fnd_api.g_false
5587: ,x_data => x_message_list);
5588: WHEN fnd_api.g_exc_error THEN
5589: ROLLBACK TO SAVEPOINT update_transaction;
5590: x_return_status := fnd_api.g_ret_sts_error;
5591: gme_common_pvt.count_and_get (x_count => x_message_count
5592: ,p_encoded => fnd_api.g_false

Line 5590: x_return_status := fnd_api.g_ret_sts_error;

5586: ,p_encoded => fnd_api.g_false
5587: ,x_data => x_message_list);
5588: WHEN fnd_api.g_exc_error THEN
5589: ROLLBACK TO SAVEPOINT update_transaction;
5590: x_return_status := fnd_api.g_ret_sts_error;
5591: gme_common_pvt.count_and_get (x_count => x_message_count
5592: ,p_encoded => fnd_api.g_false
5593: ,x_data => x_message_list);
5594: WHEN OTHERS THEN

Line 5592: ,p_encoded => fnd_api.g_false

5588: WHEN fnd_api.g_exc_error THEN
5589: ROLLBACK TO SAVEPOINT update_transaction;
5590: x_return_status := fnd_api.g_ret_sts_error;
5591: gme_common_pvt.count_and_get (x_count => x_message_count
5592: ,p_encoded => fnd_api.g_false
5593: ,x_data => x_message_list);
5594: WHEN OTHERS THEN
5595: gme_when_others ( p_api_name => l_api_name
5596: ,x_message_count => x_message_count

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

5602: PROCEDURE delete_material_txn (
5603: p_api_version IN NUMBER := 2.0
5604: ,p_validation_level IN NUMBER
5605: := gme_common_pvt.g_max_errors
5606: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5607: ,p_commit IN VARCHAR2 := fnd_api.g_false
5608: ,x_message_count OUT NOCOPY NUMBER
5609: ,x_message_list OUT NOCOPY VARCHAR2
5610: ,x_return_status OUT NOCOPY VARCHAR2

Line 5607: ,p_commit IN VARCHAR2 := fnd_api.g_false

5603: p_api_version IN NUMBER := 2.0
5604: ,p_validation_level IN NUMBER
5605: := gme_common_pvt.g_max_errors
5606: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5607: ,p_commit IN VARCHAR2 := fnd_api.g_false
5608: ,x_message_count OUT NOCOPY NUMBER
5609: ,x_message_list OUT NOCOPY VARCHAR2
5610: ,x_return_status OUT NOCOPY VARCHAR2
5611: ,p_transaction_id IN NUMBER)

Line 5619: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

5615: l_msg_count NUMBER;
5616: l_msg_data VARCHAR2 (2000);
5617: l_msg_index NUMBER (5);
5618: l_txn_count NUMBER;
5619: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
5620: l_orgn_id NUMBER;
5621:
5622: setup_failure EXCEPTION;
5623: error_condition EXCEPTION;

Line 5648: x_return_status := fnd_api.g_ret_sts_success;

5644: /* Set the savepoint */
5645: SAVEPOINT delete_transaction;
5646:
5647: /* Set the return status to success initially */
5648: x_return_status := fnd_api.g_ret_sts_success;
5649:
5650: IF p_init_msg_list = fnd_api.g_true THEN
5651: fnd_msg_pub.initialize;
5652: END IF;

Line 5650: IF p_init_msg_list = fnd_api.g_true THEN

5646:
5647: /* Set the return status to success initially */
5648: x_return_status := fnd_api.g_ret_sts_success;
5649:
5650: IF p_init_msg_list = fnd_api.g_true THEN
5651: fnd_msg_pub.initialize;
5652: END IF;
5653:
5654: IF NOT fnd_api.compatible_api_call (2.0

Line 5654: IF NOT fnd_api.compatible_api_call (2.0

5650: IF p_init_msg_list = fnd_api.g_true THEN
5651: fnd_msg_pub.initialize;
5652: END IF;
5653:
5654: IF NOT fnd_api.compatible_api_call (2.0
5655: ,p_api_version
5656: ,'delete_material_txn'
5657: ,g_pkg_name) THEN
5658: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 5659: RAISE fnd_api.g_exc_error;

5655: ,p_api_version
5656: ,'delete_material_txn'
5657: ,g_pkg_name) THEN
5658: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5659: RAISE fnd_api.g_exc_error;
5660: END IF;
5661:
5662: IF (p_transaction_id IS NULL) THEN
5663: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

Line 5666: RAISE fnd_api.g_exc_error;

5662: IF (p_transaction_id IS NULL) THEN
5663: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
5664: ,'FIELD_NAME'
5665: ,'p_transaction_id');
5666: RAISE fnd_api.g_exc_error;
5667: END IF;
5668:
5669: OPEN cur_trans_org (p_transaction_id);
5670: FETCH cur_trans_org INTO l_orgn_id;

Line 5679: RAISE fnd_api.g_exc_error;

5675: gme_common_pvt.g_setup_done :=
5676: gme_common_pvt.setup (p_org_id => l_orgn_id);
5677:
5678: IF NOT gme_common_pvt.g_setup_done THEN
5679: RAISE fnd_api.g_exc_error;
5680: ELSE
5681: l_orgn_id := gme_common_pvt.g_organization_id;
5682: END IF;
5683:

Line 5685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

5681: l_orgn_id := gme_common_pvt.g_organization_id;
5682: END IF;
5683:
5684: gme_common_pvt.set_timestamp;
5685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5686: gme_common_pvt.g_transaction_header_id := NULL;
5687: l_transaction_id := p_transaction_id;
5688: gme_transactions_pvt.delete_material_txn
5689: (p_transaction_id => l_transaction_id

Line 5692: IF x_return_status = fnd_api.g_ret_sts_success THEN

5688: gme_transactions_pvt.delete_material_txn
5689: (p_transaction_id => l_transaction_id
5690: ,x_return_status => x_return_status);
5691:
5692: IF x_return_status = fnd_api.g_ret_sts_success THEN
5693: IF (p_commit = fnd_api.g_true) THEN
5694: gme_api_pub.save_batch
5695: (p_header_id => gme_common_pvt.get_txn_header_id
5696: ,p_table => 1

Line 5693: IF (p_commit = fnd_api.g_true) THEN

5689: (p_transaction_id => l_transaction_id
5690: ,x_return_status => x_return_status);
5691:
5692: IF x_return_status = fnd_api.g_ret_sts_success THEN
5693: IF (p_commit = fnd_api.g_true) THEN
5694: gme_api_pub.save_batch
5695: (p_header_id => gme_common_pvt.get_txn_header_id
5696: ,p_table => 1
5697: ,p_commit => p_commit

Line 5700: IF x_return_status = fnd_api.g_ret_sts_success THEN

5696: ,p_table => 1
5697: ,p_commit => p_commit
5698: ,x_return_status => x_return_status);
5699:
5700: IF x_return_status = fnd_api.g_ret_sts_success THEN
5701: COMMIT;
5702: ELSE
5703: RAISE fnd_api.g_exc_error;
5704: END IF;

Line 5703: RAISE fnd_api.g_exc_error;

5699:
5700: IF x_return_status = fnd_api.g_ret_sts_success THEN
5701: COMMIT;
5702: ELSE
5703: RAISE fnd_api.g_exc_error;
5704: END IF;
5705: END IF;
5706: ELSE
5707: RAISE delete_txn_fail;

Line 5718: ,p_encoded => fnd_api.g_false

5714: EXCEPTION
5715: WHEN delete_txn_fail THEN
5716: ROLLBACK TO SAVEPOINT delete_transaction;
5717: gme_common_pvt.count_and_get (x_count => x_message_count
5718: ,p_encoded => fnd_api.g_false
5719: ,x_data => x_message_list);
5720: WHEN fnd_api.g_exc_error THEN
5721: ROLLBACK TO SAVEPOINT delete_transaction;
5722: x_return_status := fnd_api.g_ret_sts_error;

Line 5720: WHEN fnd_api.g_exc_error THEN

5716: ROLLBACK TO SAVEPOINT delete_transaction;
5717: gme_common_pvt.count_and_get (x_count => x_message_count
5718: ,p_encoded => fnd_api.g_false
5719: ,x_data => x_message_list);
5720: WHEN fnd_api.g_exc_error THEN
5721: ROLLBACK TO SAVEPOINT delete_transaction;
5722: x_return_status := fnd_api.g_ret_sts_error;
5723: gme_common_pvt.count_and_get (x_count => x_message_count
5724: ,p_encoded => fnd_api.g_false

Line 5722: x_return_status := fnd_api.g_ret_sts_error;

5718: ,p_encoded => fnd_api.g_false
5719: ,x_data => x_message_list);
5720: WHEN fnd_api.g_exc_error THEN
5721: ROLLBACK TO SAVEPOINT delete_transaction;
5722: x_return_status := fnd_api.g_ret_sts_error;
5723: gme_common_pvt.count_and_get (x_count => x_message_count
5724: ,p_encoded => fnd_api.g_false
5725: ,x_data => x_message_list);
5726: WHEN OTHERS THEN

Line 5724: ,p_encoded => fnd_api.g_false

5720: WHEN fnd_api.g_exc_error THEN
5721: ROLLBACK TO SAVEPOINT delete_transaction;
5722: x_return_status := fnd_api.g_ret_sts_error;
5723: gme_common_pvt.count_and_get (x_count => x_message_count
5724: ,p_encoded => fnd_api.g_false
5725: ,x_data => x_message_list);
5726: WHEN OTHERS THEN
5727: gme_when_others ( p_api_name => l_api_name
5728: ,x_message_count => x_message_count

Line 5755: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false

5751: PROCEDURE reroute_batch (
5752: p_api_version IN NUMBER := 2.0
5753: ,p_validation_level IN NUMBER
5754: := gme_common_pvt.g_max_errors
5755: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
5756: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
5757: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
5758: ,p_validity_rule_id IN NUMBER
5759: ,p_org_code IN VARCHAR2

Line 5756: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false

5752: p_api_version IN NUMBER := 2.0
5753: ,p_validation_level IN NUMBER
5754: := gme_common_pvt.g_max_errors
5755: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
5756: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
5757: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
5758: ,p_validity_rule_id IN NUMBER
5759: ,p_org_code IN VARCHAR2
5760: ,p_use_workday_cal IN VARCHAR2 DEFAULT fnd_api.g_false

Line 5760: ,p_use_workday_cal IN VARCHAR2 DEFAULT fnd_api.g_false

5756: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
5757: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
5758: ,p_validity_rule_id IN NUMBER
5759: ,p_org_code IN VARCHAR2
5760: ,p_use_workday_cal IN VARCHAR2 DEFAULT fnd_api.g_false
5761: ,p_contiguity_override IN VARCHAR2 DEFAULT fnd_api.g_false
5762: ,x_message_count OUT NOCOPY NUMBER
5763: ,x_message_list OUT NOCOPY VARCHAR2
5764: ,x_return_status OUT NOCOPY VARCHAR2

Line 5761: ,p_contiguity_override IN VARCHAR2 DEFAULT fnd_api.g_false

5757: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
5758: ,p_validity_rule_id IN NUMBER
5759: ,p_org_code IN VARCHAR2
5760: ,p_use_workday_cal IN VARCHAR2 DEFAULT fnd_api.g_false
5761: ,p_contiguity_override IN VARCHAR2 DEFAULT fnd_api.g_false
5762: ,x_message_count OUT NOCOPY NUMBER
5763: ,x_message_list OUT NOCOPY VARCHAR2
5764: ,x_return_status OUT NOCOPY VARCHAR2
5765: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE)

Line 5781: x_return_status := fnd_api.g_ret_sts_success;

5777: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
5778: || l_api_name);
5779: END IF;
5780: /* Set the return status to success initially */
5781: x_return_status := fnd_api.g_ret_sts_success;
5782:
5783: /* Set savepoint here */
5784: SAVEPOINT reroute_batch_pub;
5785:

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

5782:
5783: /* Set savepoint here */
5784: SAVEPOINT reroute_batch_pub;
5785:
5786: IF (fnd_api.to_boolean (p_init_msg_list) ) THEN
5787: fnd_msg_pub.initialize;
5788: gme_common_pvt.g_error_count := 0;
5789: END IF;
5790:

Line 5792: IF NOT fnd_api.compatible_api_call (2.0

5788: gme_common_pvt.g_error_count := 0;
5789: END IF;
5790:
5791: -- Standard call to check for call compatibility.
5792: IF NOT fnd_api.compatible_api_call (2.0
5793: ,p_api_version
5794: ,l_api_name
5795: ,g_pkg_name) THEN
5796: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 5797: RAISE fnd_api.g_exc_error;

5793: ,p_api_version
5794: ,l_api_name
5795: ,g_pkg_name) THEN
5796: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5797: RAISE fnd_api.g_exc_error;
5798: END IF;
5799:
5800: --FPBug#4585491 Begin
5801: /* Check for p_use_workday_cal */

Line 5802: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

5798: END IF;
5799:
5800: --FPBug#4585491 Begin
5801: /* Check for p_use_workday_cal */
5802: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
5803: gme_common_pvt.log_message ('GME_INVALID_FIELD'
5804: ,'FIELD'
5805: ,'p_use_workday_cal');
5806: RAISE fnd_api.g_exc_error;

Line 5806: RAISE fnd_api.g_exc_error;

5802: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
5803: gme_common_pvt.log_message ('GME_INVALID_FIELD'
5804: ,'FIELD'
5805: ,'p_use_workday_cal');
5806: RAISE fnd_api.g_exc_error;
5807: END IF;
5808:
5809: /* Check for p_contiguity_override */
5810: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

Line 5810: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

5806: RAISE fnd_api.g_exc_error;
5807: END IF;
5808:
5809: /* Check for p_contiguity_override */
5810: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
5811: gme_common_pvt.log_message ('GME_INVALID_FIELD'
5812: ,'FIELD'
5813: ,'p_contiguity_override');
5814: RAISE fnd_api.g_exc_error;

Line 5814: RAISE fnd_api.g_exc_error;

5810: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
5811: gme_common_pvt.log_message ('GME_INVALID_FIELD'
5812: ,'FIELD'
5813: ,'p_contiguity_override');
5814: RAISE fnd_api.g_exc_error;
5815: END IF;
5816: --FPBug#4585491 End
5817:
5818: /* Set the return status to success initially */

Line 5819: x_return_status := fnd_api.g_ret_sts_success;

5815: END IF;
5816: --FPBug#4585491 End
5817:
5818: /* Set the return status to success initially */
5819: x_return_status := fnd_api.g_ret_sts_success;
5820:
5821: /* Get the Batch header */
5822: gme_common_pvt.validate_batch
5823: (p_batch_header_rec => p_batch_header_rec

Line 5831: IF x_return_status <> fnd_api.g_ret_sts_success THEN

5827: ,x_message_count => x_message_count
5828: ,x_message_list => x_message_list
5829: ,x_return_status => x_return_status );
5830:
5831: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5832: IF (g_debug = gme_debug.g_log_statement) THEN
5833: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
5834: || ': batch validate error ');
5835: END IF;

Line 5836: RAISE fnd_api.g_exc_error;

5832: IF (g_debug = gme_debug.g_log_statement) THEN
5833: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
5834: || ': batch validate error ');
5835: END IF;
5836: RAISE fnd_api.g_exc_error;
5837: END IF;
5838:
5839: gme_reroute_batch_pvt.validate_validity_id_from_pub
5840: (p_batch_header_rec => l_batch_header_rec

Line 5844: IF (x_return_status = fnd_api.g_ret_sts_error) THEN

5840: (p_batch_header_rec => l_batch_header_rec
5841: ,p_validity_rule_id => p_validity_rule_id
5842: ,x_return_status => x_return_status);
5843:
5844: IF (x_return_status = fnd_api.g_ret_sts_error) THEN
5845: RAISE fnd_api.g_exc_error;
5846: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5847: RAISE fnd_api.g_exc_unexpected_error;
5848: END IF;

Line 5845: RAISE fnd_api.g_exc_error;

5841: ,p_validity_rule_id => p_validity_rule_id
5842: ,x_return_status => x_return_status);
5843:
5844: IF (x_return_status = fnd_api.g_ret_sts_error) THEN
5845: RAISE fnd_api.g_exc_error;
5846: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5847: RAISE fnd_api.g_exc_unexpected_error;
5848: END IF;
5849:

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

5842: ,x_return_status => x_return_status);
5843:
5844: IF (x_return_status = fnd_api.g_ret_sts_error) THEN
5845: RAISE fnd_api.g_exc_error;
5846: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5847: RAISE fnd_api.g_exc_unexpected_error;
5848: END IF;
5849:
5850: gme_api_main.reroute_batch

Line 5847: RAISE fnd_api.g_exc_unexpected_error;

5843:
5844: IF (x_return_status = fnd_api.g_ret_sts_error) THEN
5845: RAISE fnd_api.g_exc_error;
5846: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5847: RAISE fnd_api.g_exc_unexpected_error;
5848: END IF;
5849:
5850: gme_api_main.reroute_batch
5851: (p_validation_level => p_validation_level

Line 5852: ,p_init_msg_list => fnd_api.g_false

5848: END IF;
5849:
5850: gme_api_main.reroute_batch
5851: (p_validation_level => p_validation_level
5852: ,p_init_msg_list => fnd_api.g_false
5853: ,p_batch_header_rec => l_batch_header_rec
5854: ,p_validity_rule_id => p_validity_rule_id
5855: ,p_use_workday_cal => p_use_workday_cal
5856: ,p_contiguity_override => p_contiguity_override

Line 5863: RAISE fnd_api.g_exc_error; --message will be set on stack in pvt layer itself

5859: ,x_return_status => x_return_status
5860: ,x_batch_header_rec => x_batch_header_rec);
5861:
5862: IF (x_return_status = 'C') THEN
5863: RAISE fnd_api.g_exc_error; --message will be set on stack in pvt layer itself
5864: ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN
5865: RAISE reroute_batch_failed;
5866: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5867: RAISE fnd_api.g_exc_unexpected_error;

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

5860: ,x_batch_header_rec => x_batch_header_rec);
5861:
5862: IF (x_return_status = 'C') THEN
5863: RAISE fnd_api.g_exc_error; --message will be set on stack in pvt layer itself
5864: ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN
5865: RAISE reroute_batch_failed;
5866: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5867: RAISE fnd_api.g_exc_unexpected_error;
5868: END IF;

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

5862: IF (x_return_status = 'C') THEN
5863: RAISE fnd_api.g_exc_error; --message will be set on stack in pvt layer itself
5864: ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN
5865: RAISE reroute_batch_failed;
5866: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5867: RAISE fnd_api.g_exc_unexpected_error;
5868: END IF;
5869: gme_api_pub.save_batch
5870: (p_header_id => NULL

Line 5867: RAISE fnd_api.g_exc_unexpected_error;

5863: RAISE fnd_api.g_exc_error; --message will be set on stack in pvt layer itself
5864: ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN
5865: RAISE reroute_batch_failed;
5866: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5867: RAISE fnd_api.g_exc_unexpected_error;
5868: END IF;
5869: gme_api_pub.save_batch
5870: (p_header_id => NULL
5871: ,p_table => gme_common_pvt.g_interface_table

Line 5875: IF (x_return_status = fnd_api.g_ret_sts_error) THEN

5871: ,p_table => gme_common_pvt.g_interface_table
5872: ,p_commit => p_commit
5873: ,x_return_status => x_return_status);
5874:
5875: IF (x_return_status = fnd_api.g_ret_sts_error) THEN
5876: RAISE fnd_api.g_exc_error;
5877: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5878: RAISE fnd_api.g_exc_unexpected_error;
5879: END IF;

Line 5876: RAISE fnd_api.g_exc_error;

5872: ,p_commit => p_commit
5873: ,x_return_status => x_return_status);
5874:
5875: IF (x_return_status = fnd_api.g_ret_sts_error) THEN
5876: RAISE fnd_api.g_exc_error;
5877: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5878: RAISE fnd_api.g_exc_unexpected_error;
5879: END IF;
5880:

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

5873: ,x_return_status => x_return_status);
5874:
5875: IF (x_return_status = fnd_api.g_ret_sts_error) THEN
5876: RAISE fnd_api.g_exc_error;
5877: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5878: RAISE fnd_api.g_exc_unexpected_error;
5879: END IF;
5880:
5881: IF (fnd_api.to_boolean (p_commit) ) THEN

Line 5878: RAISE fnd_api.g_exc_unexpected_error;

5874:
5875: IF (x_return_status = fnd_api.g_ret_sts_error) THEN
5876: RAISE fnd_api.g_exc_error;
5877: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5878: RAISE fnd_api.g_exc_unexpected_error;
5879: END IF;
5880:
5881: IF (fnd_api.to_boolean (p_commit) ) THEN
5882: COMMIT WORK;

Line 5881: IF (fnd_api.to_boolean (p_commit) ) THEN

5877: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5878: RAISE fnd_api.g_exc_unexpected_error;
5879: END IF;
5880:
5881: IF (fnd_api.to_boolean (p_commit) ) THEN
5882: COMMIT WORK;
5883: END IF;
5884:
5885: gme_common_pvt.count_and_get (x_count => x_message_count

Line 5886: ,p_encoded => fnd_api.g_false

5882: COMMIT WORK;
5883: END IF;
5884:
5885: gme_common_pvt.count_and_get (x_count => x_message_count
5886: ,p_encoded => fnd_api.g_false
5887: ,x_data => x_message_list);
5888:
5889: IF g_debug <= gme_debug.g_log_procedure THEN
5890: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '

Line 5898: ,p_encoded => fnd_api.g_false

5894: WHEN reroute_batch_failed THEN
5895: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5896: x_batch_header_rec := NULL;
5897: gme_common_pvt.count_and_get (x_count => x_message_count
5898: ,p_encoded => fnd_api.g_false
5899: ,x_data => x_message_list);
5900: WHEN fnd_api.g_exc_error THEN
5901: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5902: x_batch_header_rec := NULL;

Line 5900: WHEN fnd_api.g_exc_error THEN

5896: x_batch_header_rec := NULL;
5897: gme_common_pvt.count_and_get (x_count => x_message_count
5898: ,p_encoded => fnd_api.g_false
5899: ,x_data => x_message_list);
5900: WHEN fnd_api.g_exc_error THEN
5901: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5902: x_batch_header_rec := NULL;
5903: x_return_status := fnd_api.g_ret_sts_error;
5904: gme_common_pvt.count_and_get (x_count => x_message_count

Line 5903: x_return_status := fnd_api.g_ret_sts_error;

5899: ,x_data => x_message_list);
5900: WHEN fnd_api.g_exc_error THEN
5901: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5902: x_batch_header_rec := NULL;
5903: x_return_status := fnd_api.g_ret_sts_error;
5904: gme_common_pvt.count_and_get (x_count => x_message_count
5905: ,p_encoded => fnd_api.g_false
5906: ,x_data => x_message_list);
5907: WHEN fnd_api.g_exc_unexpected_error THEN

Line 5905: ,p_encoded => fnd_api.g_false

5901: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5902: x_batch_header_rec := NULL;
5903: x_return_status := fnd_api.g_ret_sts_error;
5904: gme_common_pvt.count_and_get (x_count => x_message_count
5905: ,p_encoded => fnd_api.g_false
5906: ,x_data => x_message_list);
5907: WHEN fnd_api.g_exc_unexpected_error THEN
5908: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5909: x_batch_header_rec := NULL;

Line 5907: WHEN fnd_api.g_exc_unexpected_error THEN

5903: x_return_status := fnd_api.g_ret_sts_error;
5904: gme_common_pvt.count_and_get (x_count => x_message_count
5905: ,p_encoded => fnd_api.g_false
5906: ,x_data => x_message_list);
5907: WHEN fnd_api.g_exc_unexpected_error THEN
5908: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5909: x_batch_header_rec := NULL;
5910: x_return_status := fnd_api.g_ret_sts_unexp_error;
5911:

Line 5910: x_return_status := fnd_api.g_ret_sts_unexp_error;

5906: ,x_data => x_message_list);
5907: WHEN fnd_api.g_exc_unexpected_error THEN
5908: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5909: x_batch_header_rec := NULL;
5910: x_return_status := fnd_api.g_ret_sts_unexp_error;
5911:
5912: IF (g_debug > 0) THEN gme_debug.put_line ( g_pkg_name || '.' ||
5913: l_api_name || ':' || 'UNEXPECTED:' || SQLERRM);
5914: END IF;

Line 5916: ,p_encoded => fnd_api.g_false

5912: IF (g_debug > 0) THEN gme_debug.put_line ( g_pkg_name || '.' ||
5913: l_api_name || ':' || 'UNEXPECTED:' || SQLERRM);
5914: END IF;
5915: gme_common_pvt.count_and_get (x_count => x_message_count
5916: ,p_encoded => fnd_api.g_false
5917: ,x_data => x_message_list);
5918: WHEN OTHERS THEN
5919: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5920: x_batch_header_rec := NULL;

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

5945: PROCEDURE cancel_batch (
5946: p_api_version IN NUMBER := 2.0
5947: ,p_validation_level IN NUMBER
5948: := gme_common_pvt.g_max_errors
5949: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5950: ,p_commit IN VARCHAR2 := fnd_api.g_false
5951: ,x_message_count OUT NOCOPY NUMBER
5952: ,x_message_list OUT NOCOPY VARCHAR2
5953: ,x_return_status OUT NOCOPY VARCHAR2

Line 5950: ,p_commit IN VARCHAR2 := fnd_api.g_false

5946: p_api_version IN NUMBER := 2.0
5947: ,p_validation_level IN NUMBER
5948: := gme_common_pvt.g_max_errors
5949: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5950: ,p_commit IN VARCHAR2 := fnd_api.g_false
5951: ,x_message_count OUT NOCOPY NUMBER
5952: ,x_message_list OUT NOCOPY VARCHAR2
5953: ,x_return_status OUT NOCOPY VARCHAR2
5954: ,p_org_code IN VARCHAR2

Line 5973: x_return_status := fnd_api.g_ret_sts_success;

5969: || 'Entering');
5970: END IF;
5971:
5972: /* Set the return status to success initially */
5973: x_return_status := fnd_api.g_ret_sts_success;
5974:
5975: /* Set savepoint here */
5976: SAVEPOINT cancel_batch_pub;
5977:

Line 5978: IF p_init_msg_list = fnd_api.g_true THEN

5974:
5975: /* Set savepoint here */
5976: SAVEPOINT cancel_batch_pub;
5977:
5978: IF p_init_msg_list = fnd_api.g_true THEN
5979: fnd_msg_pub.initialize;
5980: END IF;
5981:
5982: IF NOT fnd_api.compatible_api_call (2.0

Line 5982: IF NOT fnd_api.compatible_api_call (2.0

5978: IF p_init_msg_list = fnd_api.g_true THEN
5979: fnd_msg_pub.initialize;
5980: END IF;
5981:
5982: IF NOT fnd_api.compatible_api_call (2.0
5983: ,p_api_version
5984: ,'cancel_batch'
5985: ,g_pkg_name) THEN
5986: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 5987: RAISE fnd_api.g_exc_error;

5983: ,p_api_version
5984: ,'cancel_batch'
5985: ,g_pkg_name) THEN
5986: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5987: RAISE fnd_api.g_exc_error;
5988: END IF;
5989:
5990: --fetch the batch
5991: gme_common_pvt.validate_batch

Line 6000: IF x_return_status <> fnd_api.g_ret_sts_success THEN

5996: ,x_message_count => x_message_count
5997: ,x_message_list => x_message_list
5998: ,x_return_status => x_return_status );
5999:
6000: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6001: IF (g_debug = gme_debug.g_log_statement) THEN
6002: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
6003: || ': batch validate error ');
6004: END IF;

Line 6005: RAISE fnd_api.g_exc_error;

6001: IF (g_debug = gme_debug.g_log_statement) THEN
6002: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
6003: || ': batch validate error ');
6004: END IF;
6005: RAISE fnd_api.g_exc_error;
6006: END IF;
6007:
6008:
6009: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN

Line 6011: RAISE fnd_api.g_exc_error;

6007:
6008:
6009: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
6010: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6011: RAISE fnd_api.g_exc_error;
6012: END IF;
6013:
6014: gme_common_pvt.g_error_count := 0;
6015:

Line 6019: RAISE fnd_api.g_exc_error;

6015:
6016: /* Check for batch status */
6017: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN
6018: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_CANCEL');
6019: RAISE fnd_api.g_exc_error;
6020: END IF;
6021:
6022: IF g_debug <= gme_debug.g_log_statement THEN
6023: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':'

Line 6028: ,p_init_msg_list => fnd_api.g_false

6024: || 'calling main cancel');
6025: END IF;
6026:
6027: gme_api_main.cancel_batch (p_validation_level => p_validation_level
6028: ,p_init_msg_list => fnd_api.g_false
6029: ,x_message_count => x_message_count
6030: ,x_message_list => x_message_list
6031: ,x_return_status => x_return_status
6032: ,p_batch_header_rec => l_batch_header_rec

Line 6040: IF x_return_status = fnd_api.g_ret_sts_success THEN

6036: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':' ||
6037: 'return_status from main'|| x_return_status);
6038: END IF;
6039:
6040: IF x_return_status = fnd_api.g_ret_sts_success THEN
6041: IF p_commit = fnd_api.g_true THEN
6042: gme_api_pub.save_batch
6043: (p_header_id => NULL
6044: ,p_table => gme_common_pvt.g_interface_table

Line 6041: IF p_commit = fnd_api.g_true THEN

6037: 'return_status from main'|| x_return_status);
6038: END IF;
6039:
6040: IF x_return_status = fnd_api.g_ret_sts_success THEN
6041: IF p_commit = fnd_api.g_true THEN
6042: gme_api_pub.save_batch
6043: (p_header_id => NULL
6044: ,p_table => gme_common_pvt.g_interface_table
6045: ,p_commit => p_commit

Line 6048: IF x_return_status = fnd_api.g_ret_sts_success THEN

6044: ,p_table => gme_common_pvt.g_interface_table
6045: ,p_commit => p_commit
6046: ,x_return_status => x_return_status);
6047:
6048: IF x_return_status = fnd_api.g_ret_sts_success THEN
6049: COMMIT;
6050: ELSE
6051: RAISE fnd_api.g_exc_error;
6052: END IF;

Line 6051: RAISE fnd_api.g_exc_error;

6047:
6048: IF x_return_status = fnd_api.g_ret_sts_success THEN
6049: COMMIT;
6050: ELSE
6051: RAISE fnd_api.g_exc_error;
6052: END IF;
6053: END IF;
6054: ELSE
6055: RAISE batch_cancel_failure;

Line 6059: ,p_encoded => fnd_api.g_false

6055: RAISE batch_cancel_failure;
6056: END IF;
6057:
6058: gme_common_pvt.count_and_get (x_count => x_message_count
6059: ,p_encoded => fnd_api.g_false
6060: ,x_data => x_message_list);
6061:
6062: IF g_debug <= gme_debug.g_log_procedure THEN
6063: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '

Line 6071: ,p_encoded => fnd_api.g_false

6067: WHEN batch_cancel_failure THEN
6068: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6069: x_batch_header_rec := NULL;
6070: gme_common_pvt.count_and_get (x_count => x_message_count
6071: ,p_encoded => fnd_api.g_false
6072: ,x_data => x_message_list);
6073: WHEN fnd_api.g_exc_error THEN
6074: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6075: x_return_status := fnd_api.g_ret_sts_error;

Line 6073: WHEN fnd_api.g_exc_error THEN

6069: x_batch_header_rec := NULL;
6070: gme_common_pvt.count_and_get (x_count => x_message_count
6071: ,p_encoded => fnd_api.g_false
6072: ,x_data => x_message_list);
6073: WHEN fnd_api.g_exc_error THEN
6074: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6075: x_return_status := fnd_api.g_ret_sts_error;
6076: x_batch_header_rec := NULL;
6077: gme_common_pvt.count_and_get (x_count => x_message_count

Line 6075: x_return_status := fnd_api.g_ret_sts_error;

6071: ,p_encoded => fnd_api.g_false
6072: ,x_data => x_message_list);
6073: WHEN fnd_api.g_exc_error THEN
6074: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6075: x_return_status := fnd_api.g_ret_sts_error;
6076: x_batch_header_rec := NULL;
6077: gme_common_pvt.count_and_get (x_count => x_message_count
6078: ,p_encoded => fnd_api.g_false
6079: ,x_data => x_message_list);

Line 6078: ,p_encoded => fnd_api.g_false

6074: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6075: x_return_status := fnd_api.g_ret_sts_error;
6076: x_batch_header_rec := NULL;
6077: gme_common_pvt.count_and_get (x_count => x_message_count
6078: ,p_encoded => fnd_api.g_false
6079: ,x_data => x_message_list);
6080: WHEN OTHERS THEN
6081: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6082: x_batch_header_rec := NULL;

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

6109: PROCEDURE terminate_batch (
6110: p_api_version IN NUMBER := 2.0
6111: ,p_validation_level IN NUMBER
6112: := gme_common_pvt.g_max_errors
6113: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6114: ,p_commit IN VARCHAR2 := fnd_api.g_false
6115: ,x_message_count OUT NOCOPY NUMBER
6116: ,x_message_list OUT NOCOPY VARCHAR2
6117: ,x_return_status OUT NOCOPY VARCHAR2

Line 6114: ,p_commit IN VARCHAR2 := fnd_api.g_false

6110: p_api_version IN NUMBER := 2.0
6111: ,p_validation_level IN NUMBER
6112: := gme_common_pvt.g_max_errors
6113: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6114: ,p_commit IN VARCHAR2 := fnd_api.g_false
6115: ,x_message_count OUT NOCOPY NUMBER
6116: ,x_message_list OUT NOCOPY VARCHAR2
6117: ,x_return_status OUT NOCOPY VARCHAR2
6118: ,p_org_code IN VARCHAR2

Line 6154: x_return_status := fnd_api.g_ret_sts_success;

6150: || 'Entering');
6151: END IF;
6152:
6153: /* Set the return status to success initially */
6154: x_return_status := fnd_api.g_ret_sts_success;
6155:
6156: /* Set savepoint here */
6157: SAVEPOINT terminate_batch;
6158:

Line 6159: IF p_init_msg_list = fnd_api.g_true THEN

6155:
6156: /* Set savepoint here */
6157: SAVEPOINT terminate_batch;
6158:
6159: IF p_init_msg_list = fnd_api.g_true THEN
6160: fnd_msg_pub.initialize;
6161: END IF;
6162:
6163: IF NOT fnd_api.compatible_api_call (2.0

Line 6163: IF NOT fnd_api.compatible_api_call (2.0

6159: IF p_init_msg_list = fnd_api.g_true THEN
6160: fnd_msg_pub.initialize;
6161: END IF;
6162:
6163: IF NOT fnd_api.compatible_api_call (2.0
6164: ,p_api_version
6165: ,'terminate_batch'
6166: ,g_pkg_name) THEN
6167: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 6168: RAISE fnd_api.g_exc_error;

6164: ,p_api_version
6165: ,'terminate_batch'
6166: ,g_pkg_name) THEN
6167: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6168: RAISE fnd_api.g_exc_error;
6169: END IF;
6170: --Bug#5281136 Fetching the batch before checking for the reason_id or reason name.
6171: --fetch the batch
6172: gme_common_pvt.validate_batch

Line 6181: IF x_return_status <> fnd_api.g_ret_sts_success THEN

6177: ,x_message_count => x_message_count
6178: ,x_message_list => x_message_list
6179: ,x_return_status => x_return_status );
6180:
6181: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6182: IF (g_debug = gme_debug.g_log_statement) THEN
6183: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
6184: || ': batch validate error ');
6185: END IF;

Line 6186: RAISE fnd_api.g_exc_error;

6182: IF (g_debug = gme_debug.g_log_statement) THEN
6183: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
6184: || ': batch validate error ');
6185: END IF;
6186: RAISE fnd_api.g_exc_error;
6187: END IF;
6188:
6189: /* Check for reason id */
6190: IF p_batch_header_rec.terminate_reason_id IS NOT NULL THEN

Line 6204: RAISE FND_API.g_exc_error;

6200: p_batch_header_rec.terminate_reason_id;
6201: ELSE
6202: gme_common_pvt.log_message(p_product_code => 'INV'
6203: ,p_message_code => 'INV_LOTC_REASONID_INVALID');
6204: RAISE FND_API.g_exc_error;
6205: END IF;
6206: ELSIF p_reason_name IS NOT NULL THEN
6207: i := 0;
6208: FOR get_rec IN cur_val_reason_name (p_reason_name) LOOP

Line 6215: RAISE FND_API.g_exc_error;

6211: END LOOP;
6212:
6213: IF i > 1 THEN
6214: gme_common_pvt.log_message('GME_REASON_NAME_NOT_UNIQUE');
6215: RAISE FND_API.g_exc_error;
6216: ELSIF i = 0 THEN
6217: gme_common_pvt.log_message('GME_INVALID_REASON_NAME');
6218: RAISE FND_API.g_exc_error;
6219: END IF;

Line 6218: RAISE FND_API.g_exc_error;

6214: gme_common_pvt.log_message('GME_REASON_NAME_NOT_UNIQUE');
6215: RAISE FND_API.g_exc_error;
6216: ELSIF i = 0 THEN
6217: gme_common_pvt.log_message('GME_INVALID_REASON_NAME');
6218: RAISE FND_API.g_exc_error;
6219: END IF;
6220: END IF;
6221:
6222:

Line 6225: RAISE fnd_api.g_exc_error;

6221:
6222:
6223: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
6224: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6225: RAISE fnd_api.g_exc_error;
6226: END IF;
6227:
6228: gme_common_pvt.g_error_count := 0;
6229:

Line 6239: RAISE fnd_api.g_exc_error;

6235: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':'
6236: || 'INVALID_BATCH_STATUS');
6237: END IF;
6238:
6239: RAISE fnd_api.g_exc_error;
6240: END IF;
6241:
6242: /* check for dates*/
6243: /* Completion date cannot be greater than start date or in future */

Line 6250: x_return_status := fnd_api.g_ret_sts_error;

6246: ELSIF (p_batch_header_rec.actual_cmplt_date <
6247: l_batch_header_rec.actual_start_date) THEN
6248: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1'
6249: ,'Termination date' ,'DATE2','Start date');
6250: x_return_status := fnd_api.g_ret_sts_error;
6251: RAISE fnd_api.g_exc_error;
6252: ELSIF (p_batch_header_rec.actual_cmplt_date > SYSDATE) THEN
6253: gme_common_pvt.log_message(p_product_code => 'GMA'
6254: ,p_message_code => 'SY_NOFUTUREDATE');

Line 6251: RAISE fnd_api.g_exc_error;

6247: l_batch_header_rec.actual_start_date) THEN
6248: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1'
6249: ,'Termination date' ,'DATE2','Start date');
6250: x_return_status := fnd_api.g_ret_sts_error;
6251: RAISE fnd_api.g_exc_error;
6252: ELSIF (p_batch_header_rec.actual_cmplt_date > SYSDATE) THEN
6253: gme_common_pvt.log_message(p_product_code => 'GMA'
6254: ,p_message_code => 'SY_NOFUTUREDATE');
6255: x_return_status := fnd_api.g_ret_sts_error;

Line 6255: x_return_status := fnd_api.g_ret_sts_error;

6251: RAISE fnd_api.g_exc_error;
6252: ELSIF (p_batch_header_rec.actual_cmplt_date > SYSDATE) THEN
6253: gme_common_pvt.log_message(p_product_code => 'GMA'
6254: ,p_message_code => 'SY_NOFUTUREDATE');
6255: x_return_status := fnd_api.g_ret_sts_error;
6256: RAISE fnd_api.g_exc_error;
6257: ELSE
6258: l_batch_header_rec.actual_cmplt_date :=
6259: p_batch_header_rec.actual_cmplt_date;

Line 6256: RAISE fnd_api.g_exc_error;

6252: ELSIF (p_batch_header_rec.actual_cmplt_date > SYSDATE) THEN
6253: gme_common_pvt.log_message(p_product_code => 'GMA'
6254: ,p_message_code => 'SY_NOFUTUREDATE');
6255: x_return_status := fnd_api.g_ret_sts_error;
6256: RAISE fnd_api.g_exc_error;
6257: ELSE
6258: l_batch_header_rec.actual_cmplt_date :=
6259: p_batch_header_rec.actual_cmplt_date;
6260: END IF;

Line 6267: ,p_init_msg_list => fnd_api.g_false

6263: gme_debug.put_line ('calling main terminate');
6264: END IF;
6265:
6266: gme_api_main.terminate_batch (p_validation_level => p_validation_level
6267: ,p_init_msg_list => fnd_api.g_false
6268: ,x_message_count => x_message_count
6269: ,x_message_list => x_message_list
6270: ,x_return_status => x_return_status
6271: ,p_batch_header_rec => l_batch_header_rec

Line 6283: IF x_return_status = fnd_api.g_ret_sts_success THEN

6279: || 'return_status from main'
6280: || x_return_status);
6281: END IF;
6282:
6283: IF x_return_status = fnd_api.g_ret_sts_success THEN
6284: IF p_commit = fnd_api.g_true THEN
6285: gme_api_pub.save_batch
6286: (p_header_id => NULL
6287: ,p_table => gme_common_pvt.g_interface_table

Line 6284: IF p_commit = fnd_api.g_true THEN

6280: || x_return_status);
6281: END IF;
6282:
6283: IF x_return_status = fnd_api.g_ret_sts_success THEN
6284: IF p_commit = fnd_api.g_true THEN
6285: gme_api_pub.save_batch
6286: (p_header_id => NULL
6287: ,p_table => gme_common_pvt.g_interface_table
6288: ,p_commit => p_commit

Line 6291: IF x_return_status = fnd_api.g_ret_sts_success THEN

6287: ,p_table => gme_common_pvt.g_interface_table
6288: ,p_commit => p_commit
6289: ,x_return_status => x_return_status);
6290:
6291: IF x_return_status = fnd_api.g_ret_sts_success THEN
6292: COMMIT;
6293: ELSE
6294: RAISE fnd_api.g_exc_error;
6295: END IF;

Line 6294: RAISE fnd_api.g_exc_error;

6290:
6291: IF x_return_status = fnd_api.g_ret_sts_success THEN
6292: COMMIT;
6293: ELSE
6294: RAISE fnd_api.g_exc_error;
6295: END IF;
6296: END IF;
6297: ELSE
6298: RAISE batch_terminate_failure;

Line 6302: ,p_encoded => fnd_api.g_false

6298: RAISE batch_terminate_failure;
6299: END IF;
6300:
6301: gme_common_pvt.count_and_get (x_count => x_message_count
6302: ,p_encoded => fnd_api.g_false
6303: ,x_data => x_message_list);
6304:
6305: IF g_debug <= gme_debug.g_log_procedure THEN
6306: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '

Line 6314: ,p_encoded => fnd_api.g_false

6310: WHEN batch_terminate_failure THEN
6311: ROLLBACK TO SAVEPOINT terminate_batch;
6312: x_batch_header_rec := NULL;
6313: gme_common_pvt.count_and_get (x_count => x_message_count
6314: ,p_encoded => fnd_api.g_false
6315: ,x_data => x_message_list);
6316: WHEN fnd_api.g_exc_error THEN
6317: ROLLBACK TO SAVEPOINT terminate_batch;
6318: x_batch_header_rec := NULL;

Line 6316: WHEN fnd_api.g_exc_error THEN

6312: x_batch_header_rec := NULL;
6313: gme_common_pvt.count_and_get (x_count => x_message_count
6314: ,p_encoded => fnd_api.g_false
6315: ,x_data => x_message_list);
6316: WHEN fnd_api.g_exc_error THEN
6317: ROLLBACK TO SAVEPOINT terminate_batch;
6318: x_batch_header_rec := NULL;
6319: x_return_status := fnd_api.g_ret_sts_error;
6320: gme_common_pvt.count_and_get (x_count => x_message_count

Line 6319: x_return_status := fnd_api.g_ret_sts_error;

6315: ,x_data => x_message_list);
6316: WHEN fnd_api.g_exc_error THEN
6317: ROLLBACK TO SAVEPOINT terminate_batch;
6318: x_batch_header_rec := NULL;
6319: x_return_status := fnd_api.g_ret_sts_error;
6320: gme_common_pvt.count_and_get (x_count => x_message_count
6321: ,p_encoded => fnd_api.g_false
6322: ,x_data => x_message_list);
6323: WHEN OTHERS THEN

Line 6321: ,p_encoded => fnd_api.g_false

6317: ROLLBACK TO SAVEPOINT terminate_batch;
6318: x_batch_header_rec := NULL;
6319: x_return_status := fnd_api.g_ret_sts_error;
6320: gme_common_pvt.count_and_get (x_count => x_message_count
6321: ,p_encoded => fnd_api.g_false
6322: ,x_data => x_message_list);
6323: WHEN OTHERS THEN
6324: ROLLBACK TO SAVEPOINT terminate_batch;
6325: IF g_debug <= gme_debug.g_log_unexpected THEN

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

6341: PROCEDURE convert_dtl_reservation (
6342: p_api_version IN NUMBER := 2.0
6343: ,p_validation_level IN NUMBER
6344: := gme_common_pvt.g_max_errors
6345: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6346: ,p_commit IN VARCHAR2 := fnd_api.g_false
6347: ,x_message_count OUT NOCOPY NUMBER
6348: ,x_message_list OUT NOCOPY VARCHAR2
6349: ,x_return_status OUT NOCOPY VARCHAR2

Line 6346: ,p_commit IN VARCHAR2 := fnd_api.g_false

6342: p_api_version IN NUMBER := 2.0
6343: ,p_validation_level IN NUMBER
6344: := gme_common_pvt.g_max_errors
6345: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6346: ,p_commit IN VARCHAR2 := fnd_api.g_false
6347: ,x_message_count OUT NOCOPY NUMBER
6348: ,x_message_list OUT NOCOPY VARCHAR2
6349: ,x_return_status OUT NOCOPY VARCHAR2
6350: ,p_reservation_rec IN mtl_reservations%ROWTYPE

Line 6379: x_return_status := fnd_api.g_ret_sts_success;

6375: /* Set the savepoint */
6376: SAVEPOINT convert_dtl_reservation;
6377:
6378: /* Set the return status to success initially */
6379: x_return_status := fnd_api.g_ret_sts_success;
6380:
6381: IF p_init_msg_list = fnd_api.g_true THEN
6382: fnd_msg_pub.initialize;
6383: END IF;

Line 6381: IF p_init_msg_list = fnd_api.g_true THEN

6377:
6378: /* Set the return status to success initially */
6379: x_return_status := fnd_api.g_ret_sts_success;
6380:
6381: IF p_init_msg_list = fnd_api.g_true THEN
6382: fnd_msg_pub.initialize;
6383: END IF;
6384:
6385: IF NOT fnd_api.compatible_api_call (2.0

Line 6385: IF NOT fnd_api.compatible_api_call (2.0

6381: IF p_init_msg_list = fnd_api.g_true THEN
6382: fnd_msg_pub.initialize;
6383: END IF;
6384:
6385: IF NOT fnd_api.compatible_api_call (2.0
6386: ,p_api_version
6387: ,'convert_dtl_reservation'
6388: ,g_pkg_name) THEN
6389: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 6390: RAISE fnd_api.g_exc_error;

6386: ,p_api_version
6387: ,'convert_dtl_reservation'
6388: ,g_pkg_name) THEN
6389: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6390: RAISE fnd_api.g_exc_error;
6391: END IF;
6392:
6393: IF g_debug <= gme_debug.g_log_statement THEN
6394: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ' Input

Line 6416: RAISE fnd_api.g_exc_error;

6412: g_pkg_name || '.' || l_api_name || ' Retrieval failure against
6413: mtl_reservations using id of ' || p_reservation_rec.reservation_id);
6414: END IF;
6415:
6416: RAISE fnd_api.g_exc_error;
6417: END IF;
6418: CLOSE cur_fetch_reservation;
6419:
6420: /* Do setups appropriate to the organization */

Line 6426: RAISE fnd_api.g_exc_error;

6422: gme_common_pvt.setup (p_org_id => l_reservation_rec.organization_id
6423: ,p_org_code => NULL);
6424:
6425: IF NOT gme_common_pvt.g_setup_done THEN
6426: RAISE fnd_api.g_exc_error;
6427: END IF;
6428:
6429: gme_common_pvt.set_timestamp;
6430: /* Verify that we have a valid row in gme_material_details */

Line 6436: RAISE fnd_api.g_exc_error;

6432: l_reservation_rec.demand_source_line_id;
6433:
6434: IF NOT (gme_material_details_dbl.fetch_row (l_material_details_rec
6435: ,l_material_details_rec) ) THEN
6436: RAISE fnd_api.g_exc_error;
6437: END IF;
6438:
6439: /* Validate the demand source - it must be a valid ingredient line */
6440: IF g_debug <= gme_debug.g_log_statement THEN

Line 6460: p_supply_demand_line_detail => FND_API.G_MISS_NUM,

6456: p_supply_demand_code => 2, -- signals DEMAND
6457: p_supply_demand_type_id => INV_RESERVATION_GLOBAL.g_source_type_wip,
6458: p_supply_demand_header_id => l_material_details_rec.batch_id,
6459: p_supply_demand_line_id => l_material_details_rec.material_detail_id,
6460: p_supply_demand_line_detail => FND_API.G_MISS_NUM,
6461: p_demand_ship_date => NULL,
6462: p_expected_receipt_date => NULL,
6463: p_api_version_number => 1.0,
6464: p_init_msg_lst => FND_API.G_FALSE );

Line 6464: p_init_msg_lst => FND_API.G_FALSE );

6460: p_supply_demand_line_detail => FND_API.G_MISS_NUM,
6461: p_demand_ship_date => NULL,
6462: p_expected_receipt_date => NULL,
6463: p_api_version_number => 1.0,
6464: p_init_msg_lst => FND_API.G_FALSE );
6465:
6466: IF g_debug <= gme_debug.g_log_statement THEN
6467: gme_debug.put_line
6468: ( g_pkg_name

Line 6475: IF x_return_status <> FND_API.G_RET_STS_SUCCESS

6471: || ' Return status from gme_api_grp.validate_supply_demand is '
6472: || x_return_status);
6473: END IF;
6474:
6475: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
6476: OR l_valid_status <> 'Y' THEN
6477: RAISE fnd_api.g_exc_error;
6478: END IF;
6479:

Line 6477: RAISE fnd_api.g_exc_error;

6473: END IF;
6474:
6475: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
6476: OR l_valid_status <> 'Y' THEN
6477: RAISE fnd_api.g_exc_error;
6478: END IF;
6479:
6480: /* Invoke private layer to process transactions */
6481: gme_reservations_pvt.convert_dtl_reservation

Line 6498: IF x_return_status <> fnd_api.g_ret_sts_success THEN

6494: || ' Return status from gme_reservations_pvt.convert_dtl_reservation is '
6495: || x_return_status);
6496: END IF;
6497:
6498: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6499: RAISE detail_reservation_error;
6500: END IF;
6501: gme_api_pub.save_batch
6502: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 6516: IF x_return_status <> fnd_api.g_ret_sts_success THEN

6512: || ' return status from gme_api_pub.save_batch is '
6513: || x_return_status);
6514: END IF;
6515:
6516: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6517: RAISE fnd_api.g_exc_error;
6518: END IF;
6519:
6520: IF g_debug <= gme_debug.g_log_procedure THEN

Line 6517: RAISE fnd_api.g_exc_error;

6513: || x_return_status);
6514: END IF;
6515:
6516: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6517: RAISE fnd_api.g_exc_error;
6518: END IF;
6519:
6520: IF g_debug <= gme_debug.g_log_procedure THEN
6521: gme_debug.put_line ( ' Completed '

Line 6530: ,p_encoded => fnd_api.g_false

6526: EXCEPTION
6527: WHEN detail_reservation_error THEN
6528: ROLLBACK TO SAVEPOINT convert_dtl_reservation;
6529: gme_common_pvt.count_and_get (x_count => x_message_count
6530: ,p_encoded => fnd_api.g_false
6531: ,x_data => x_message_list);
6532: WHEN OTHERS THEN
6533: ROLLBACK TO SAVEPOINT convert_dtl_reservation;
6534: gme_when_others ( p_api_name => l_api_name

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

6541: PROCEDURE insert_batchstep_resource (
6542: p_api_version IN NUMBER
6543: ,p_validation_level IN NUMBER
6544: := gme_common_pvt.g_max_errors
6545: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6546: ,p_commit IN VARCHAR2 := fnd_api.g_false
6547: ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
6548: ,p_org_code IN VARCHAR2 := NULL
6549: ,p_batch_no IN VARCHAR2 := NULL

Line 6546: ,p_commit IN VARCHAR2 := fnd_api.g_false

6542: p_api_version IN NUMBER
6543: ,p_validation_level IN NUMBER
6544: := gme_common_pvt.g_max_errors
6545: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6546: ,p_commit IN VARCHAR2 := fnd_api.g_false
6547: ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
6548: ,p_org_code IN VARCHAR2 := NULL
6549: ,p_batch_no IN VARCHAR2 := NULL
6550: ,p_batchstep_no IN NUMBER := NULL

Line 6552: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_false

6548: ,p_org_code IN VARCHAR2 := NULL
6549: ,p_batch_no IN VARCHAR2 := NULL
6550: ,p_batchstep_no IN NUMBER := NULL
6551: ,p_activity IN VARCHAR2 := NULL
6552: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_false
6553: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
6554: ,x_batchstep_resource_rec OUT NOCOPY gme_batch_step_resources%ROWTYPE
6555: ,x_message_count OUT NOCOPY NUMBER
6556: ,x_message_list OUT NOCOPY VARCHAR2

Line 6553: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

6549: ,p_batch_no IN VARCHAR2 := NULL
6550: ,p_batchstep_no IN NUMBER := NULL
6551: ,p_activity IN VARCHAR2 := NULL
6552: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_false
6553: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
6554: ,x_batchstep_resource_rec OUT NOCOPY gme_batch_step_resources%ROWTYPE
6555: ,x_message_count OUT NOCOPY NUMBER
6556: ,x_message_list OUT NOCOPY VARCHAR2
6557: ,x_return_status OUT NOCOPY VARCHAR2)

Line 6631: x_return_status := fnd_api.g_ret_sts_success;

6627: /* Set the savepoint */
6628: SAVEPOINT insert_batchstep_rsrc;
6629:
6630: /* Set the return status to success initially */
6631: x_return_status := fnd_api.g_ret_sts_success;
6632:
6633: /* Make sure we are call compatible */
6634: IF NOT fnd_api.compatible_api_call (2.0
6635: ,p_api_version

Line 6634: IF NOT fnd_api.compatible_api_call (2.0

6630: /* Set the return status to success initially */
6631: x_return_status := fnd_api.g_ret_sts_success;
6632:
6633: /* Make sure we are call compatible */
6634: IF NOT fnd_api.compatible_api_call (2.0
6635: ,p_api_version
6636: ,'insert_batchstep_resource'
6637: ,g_pkg_name) THEN
6638: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 6639: RAISE fnd_api.g_exc_error;

6635: ,p_api_version
6636: ,'insert_batchstep_resource'
6637: ,g_pkg_name) THEN
6638: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6639: RAISE fnd_api.g_exc_error;
6640: END IF;
6641:
6642: /* Initialize message list and count if needed */
6643: IF p_init_msg_list = fnd_api.g_true THEN

Line 6643: IF p_init_msg_list = fnd_api.g_true THEN

6639: RAISE fnd_api.g_exc_error;
6640: END IF;
6641:
6642: /* Initialize message list and count if needed */
6643: IF p_init_msg_list = fnd_api.g_true THEN
6644: fnd_msg_pub.initialize;
6645: gme_common_pvt.g_error_count := 0;
6646: END IF;
6647:

Line 6663: RAISE fnd_api.g_exc_error;

6659: (p_org_id => p_batchstep_resource_rec.organization_id
6660: ,p_org_code => p_org_code);
6661:
6662: IF NOT gme_common_pvt.g_setup_done THEN
6663: RAISE fnd_api.g_exc_error;
6664: END IF;
6665:
6666: gme_common_pvt.set_timestamp;
6667: gme_common_pvt.g_check_primary_rsrc := 1;

Line 6676: RAISE fnd_api.g_exc_error;

6672: IF l_batchstep_resource_rec.resources IS NULL THEN
6673: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
6674: ,'FIELD_NAME'
6675: ,'RESOURCES');
6676: RAISE fnd_api.g_exc_error;
6677: END IF;
6678:
6679: IF l_batchstep_resource_rec.batchstep_activity_id IS NOT NULL THEN
6680: -- validate the key provided

Line 6703: RAISE fnd_api.g_exc_error;

6699: gme_common_pvt.log_message
6700: ('GME_ACTID_NOT_FOUND'
6701: ,'BATCHSTEP_ACT_ID'
6702: ,l_batchstep_resource_rec.batchstep_activity_id);
6703: RAISE fnd_api.g_exc_error;
6704: END IF;
6705:
6706: CLOSE cur_validate_activity;
6707:

Line 6726: RAISE fnd_api.g_exc_error;

6722: IF cur_validate_batch_type%FOUND THEN
6723: CLOSE cur_validate_batch_type;
6724:
6725: gme_common_pvt.log_message ('GME_FPO_RSRC_NO_EDIT');
6726: RAISE fnd_api.g_exc_error;
6727: END IF;
6728:
6729: CLOSE cur_validate_batch_type;
6730: ELSE

Line 6763: IF l_return_status <> fnd_api.g_ret_sts_success THEN

6759: || ' validate_param returns '
6760: || l_return_status);
6761: END IF;
6762:
6763: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6764: RAISE fnd_api.g_exc_error;
6765: END IF;
6766:
6767: IF g_debug <= gme_debug.g_log_statement THEN

Line 6764: RAISE fnd_api.g_exc_error;

6760: || l_return_status);
6761: END IF;
6762:
6763: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6764: RAISE fnd_api.g_exc_error;
6765: END IF;
6766:
6767: IF g_debug <= gme_debug.g_log_statement THEN
6768: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ' batch_id

Line 6814: RAISE fnd_api.g_exc_error;

6810: CLOSE cur_get_rsrc_hdr;
6811:
6812: fnd_message.set_name ('GMD', 'FM_BAD_RESOURCE');
6813: fnd_msg_pub.ADD;
6814: RAISE fnd_api.g_exc_error;
6815: END IF;
6816: CLOSE cur_get_rsrc_hdr;
6817: END IF;
6818:

Line 6841: RAISE fnd_api.g_exc_error;

6837:
6838: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
6839: ,'TABLE_NAME'
6840: ,'GME_BATCH_STEPS');
6841: RAISE fnd_api.g_exc_error;
6842: END IF;
6843:
6844: IF g_debug <= gme_debug.g_log_statement THEN
6845: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ' step_status

Line 6859: IF p_validate_flexfields = FND_API.G_TRUE THEN

6855: || ' Invoke validate_rsrc_param');
6856: END IF;
6857:
6858: --FPBug#4395561 Start setting global flex validate variable
6859: IF p_validate_flexfields = FND_API.G_TRUE THEN
6860: gme_common_pvt.g_flex_validate_prof := 1;
6861: ELSE
6862: gme_common_pvt.g_flex_validate_prof := 0;
6863: END IF;

Line 6887: IF l_return_status <> fnd_api.g_ret_sts_success THEN

6883:
6884: --FPBug#4395561 resetting globla flex field variable
6885: gme_common_pvt.g_flex_validate_prof := 0;
6886:
6887: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6888: RAISE fnd_api.g_exc_error;
6889: END IF;
6890:
6891: -- Set capacity data

Line 6888: RAISE fnd_api.g_exc_error;

6884: --FPBug#4395561 resetting globla flex field variable
6885: gme_common_pvt.g_flex_validate_prof := 0;
6886:
6887: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6888: RAISE fnd_api.g_exc_error;
6889: END IF;
6890:
6891: -- Set capacity data
6892: IF g_debug <= gme_debug.g_log_statement THEN

Line 6933: IF x_return_status = fnd_api.g_ret_sts_success THEN

6929: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || '
6930: insert_batchstep_rsrc returns '|| x_return_status);
6931: END IF;
6932:
6933: IF x_return_status = fnd_api.g_ret_sts_success THEN
6934: IF g_debug <= gme_debug.g_log_statement THEN
6935: gme_debug.put_line ( g_pkg_name
6936: || '.'
6937: || l_api_name

Line 6951: IF x_return_status <> fnd_api.g_ret_sts_success THEN

6947: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || '
6948: save_batch returns '|| x_return_status);
6949: END IF;
6950:
6951: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6952: RAISE fnd_api.g_exc_error;
6953: END IF;
6954: ELSE
6955: RAISE insert_rsrc_failed;

Line 6952: RAISE fnd_api.g_exc_error;

6948: save_batch returns '|| x_return_status);
6949: END IF;
6950:
6951: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6952: RAISE fnd_api.g_exc_error;
6953: END IF;
6954: ELSE
6955: RAISE insert_rsrc_failed;
6956: END IF;

Line 6965: ,p_encoded => fnd_api.g_false

6961: END IF;
6962:
6963: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
6964: gme_common_pvt.count_and_get(x_count => x_message_count
6965: ,p_encoded => fnd_api.g_false
6966: ,x_data => x_message_list);
6967: EXCEPTION
6968: WHEN insert_rsrc_failed THEN
6969: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;

Line 6971: ,p_encoded => fnd_api.g_false

6967: EXCEPTION
6968: WHEN insert_rsrc_failed THEN
6969: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
6970: gme_common_pvt.count_and_get(x_count => x_message_count
6971: ,p_encoded => fnd_api.g_false
6972: ,x_data => x_message_list);
6973: WHEN fnd_api.g_exc_error THEN
6974: x_return_status := fnd_api.g_ret_sts_error;
6975: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;

Line 6973: WHEN fnd_api.g_exc_error THEN

6969: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
6970: gme_common_pvt.count_and_get(x_count => x_message_count
6971: ,p_encoded => fnd_api.g_false
6972: ,x_data => x_message_list);
6973: WHEN fnd_api.g_exc_error THEN
6974: x_return_status := fnd_api.g_ret_sts_error;
6975: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
6976: gme_common_pvt.count_and_get(x_count => x_message_count
6977: ,p_encoded => fnd_api.g_false

Line 6974: x_return_status := fnd_api.g_ret_sts_error;

6970: gme_common_pvt.count_and_get(x_count => x_message_count
6971: ,p_encoded => fnd_api.g_false
6972: ,x_data => x_message_list);
6973: WHEN fnd_api.g_exc_error THEN
6974: x_return_status := fnd_api.g_ret_sts_error;
6975: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
6976: gme_common_pvt.count_and_get(x_count => x_message_count
6977: ,p_encoded => fnd_api.g_false
6978: ,x_data => x_message_list);

Line 6977: ,p_encoded => fnd_api.g_false

6973: WHEN fnd_api.g_exc_error THEN
6974: x_return_status := fnd_api.g_ret_sts_error;
6975: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
6976: gme_common_pvt.count_and_get(x_count => x_message_count
6977: ,p_encoded => fnd_api.g_false
6978: ,x_data => x_message_list);
6979: WHEN OTHERS THEN
6980: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
6981: gme_when_others ( p_api_name => l_api_name

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

6987: /*************************************************************************/
6988: PROCEDURE update_batchstep_resource (
6989: p_api_version IN NUMBER
6990: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
6991: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6992: ,p_commit IN VARCHAR2 := fnd_api.g_false
6993: ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
6994: ,p_org_code IN VARCHAR2 := NULL
6995: ,p_batch_no IN VARCHAR2 := NULL

Line 6992: ,p_commit IN VARCHAR2 := fnd_api.g_false

6988: PROCEDURE update_batchstep_resource (
6989: p_api_version IN NUMBER
6990: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
6991: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6992: ,p_commit IN VARCHAR2 := fnd_api.g_false
6993: ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
6994: ,p_org_code IN VARCHAR2 := NULL
6995: ,p_batch_no IN VARCHAR2 := NULL
6996: ,p_batchstep_no IN NUMBER := NULL

Line 6998: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_false

6994: ,p_org_code IN VARCHAR2 := NULL
6995: ,p_batch_no IN VARCHAR2 := NULL
6996: ,p_batchstep_no IN NUMBER := NULL
6997: ,p_activity IN VARCHAR2 := NULL
6998: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_false
6999: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
7000: ,x_batchstep_resource_rec OUT NOCOPY gme_batch_step_resources%ROWTYPE
7001: ,x_message_count OUT NOCOPY NUMBER
7002: ,x_message_list OUT NOCOPY VARCHAR2

Line 6999: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

6995: ,p_batch_no IN VARCHAR2 := NULL
6996: ,p_batchstep_no IN NUMBER := NULL
6997: ,p_activity IN VARCHAR2 := NULL
6998: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_false
6999: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
7000: ,x_batchstep_resource_rec OUT NOCOPY gme_batch_step_resources%ROWTYPE
7001: ,x_message_count OUT NOCOPY NUMBER
7002: ,x_message_list OUT NOCOPY VARCHAR2
7003: ,x_return_status OUT NOCOPY VARCHAR2)

Line 7037: x_return_status := fnd_api.g_ret_sts_success;

7033: || l_api_name);
7034: END IF;
7035:
7036: /* Set the return status to success initially */
7037: x_return_status := fnd_api.g_ret_sts_success;
7038:
7039: /* Make sure we are call compatible */
7040: IF NOT fnd_api.compatible_api_call (2.0
7041: ,p_api_version

Line 7040: IF NOT fnd_api.compatible_api_call (2.0

7036: /* Set the return status to success initially */
7037: x_return_status := fnd_api.g_ret_sts_success;
7038:
7039: /* Make sure we are call compatible */
7040: IF NOT fnd_api.compatible_api_call (2.0
7041: ,p_api_version
7042: ,'update_batchstep_resource'
7043: ,g_pkg_name) THEN
7044: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 7045: RAISE fnd_api.g_exc_error;

7041: ,p_api_version
7042: ,'update_batchstep_resource'
7043: ,g_pkg_name) THEN
7044: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7045: RAISE fnd_api.g_exc_error;
7046: END IF;
7047:
7048: gme_common_pvt.set_timestamp;
7049:

Line 7051: IF p_init_msg_list = fnd_api.g_true THEN

7047:
7048: gme_common_pvt.set_timestamp;
7049:
7050: /* Initialize message list and count if needed */
7051: IF p_init_msg_list = fnd_api.g_true THEN
7052: fnd_msg_pub.initialize;
7053: gme_common_pvt.g_error_count := 0;
7054: END IF;
7055:

Line 7082: RAISE fnd_api.g_exc_error;

7078: || l_api_name
7079: || ' get_batchstep_rsrc failed to retrieve row');
7080: END IF;
7081:
7082: RAISE fnd_api.g_exc_error;
7083: END IF;
7084:
7085: /* Make sure the essential keys are populated from the retrieved row */
7086: /* Don't overwrite any other input data which carries the updates */

Line 7133: RAISE fnd_api.g_exc_error;

7129: || l_api_name
7130: || ' setup failure ');
7131: END IF;
7132:
7133: RAISE fnd_api.g_exc_error;
7134: END IF;
7135:
7136: /* Establish the step_status of the batchstep */
7137: IF g_debug <= gme_debug.g_log_statement THEN

Line 7157: RAISE fnd_api.g_exc_error;

7153:
7154: gme_common_pvt.log_message ('GME_BATCH_STEP_NOT_FOUND'
7155: ,'STEP_ID'
7156: ,l_batchstep_resource_rec.batchstep_id);
7157: RAISE fnd_api.g_exc_error;
7158: END IF;
7159:
7160: IF g_debug <= gme_debug.g_log_statement THEN
7161: gme_debug.put_line ( g_pkg_name

Line 7171: IF p_validate_flexfields = FND_API.G_TRUE THEN

7167:
7168: CLOSE cur_get_batchstep_status;
7169:
7170: --FPBug#4395561 Start setting global flex validate variable
7171: IF p_validate_flexfields = FND_API.G_TRUE THEN
7172: gme_common_pvt.g_flex_validate_prof := 1;
7173: ELSE
7174: gme_common_pvt.g_flex_validate_prof := 0;
7175: END IF;

Line 7195: IF l_return_status <> fnd_api.g_ret_sts_success THEN

7191:
7192: --FPBug#4395561 resetting global flex field validate
7193: gme_common_pvt.g_flex_validate_prof := 0;
7194:
7195: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7196: RAISE fnd_api.g_exc_error;
7197: END IF;
7198:
7199: l_batchstep_resource_rec := l_batchstep_resource_rec_out;

Line 7196: RAISE fnd_api.g_exc_error;

7192: --FPBug#4395561 resetting global flex field validate
7193: gme_common_pvt.g_flex_validate_prof := 0;
7194:
7195: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7196: RAISE fnd_api.g_exc_error;
7197: END IF;
7198:
7199: l_batchstep_resource_rec := l_batchstep_resource_rec_out;
7200:

Line 7222: IF x_return_status = fnd_api.g_ret_sts_success THEN

7218: || ' update_batchstep_rsrc returns '
7219: || x_return_status);
7220: END IF;
7221:
7222: IF x_return_status = fnd_api.g_ret_sts_success THEN
7223: IF g_debug <= gme_debug.g_log_statement THEN
7224: gme_debug.put_line ( g_pkg_name
7225: || '.'
7226: || l_api_name

Line 7245: IF x_return_status <> fnd_api.g_ret_sts_success THEN

7241: || ' save_batch return_status is '
7242: || x_return_status);
7243: END IF;
7244:
7245: IF x_return_status <> fnd_api.g_ret_sts_success THEN
7246: RAISE fnd_api.g_exc_error;
7247: END IF;
7248: ELSE
7249: RAISE update_rsrc_failed;

Line 7246: RAISE fnd_api.g_exc_error;

7242: || x_return_status);
7243: END IF;
7244:
7245: IF x_return_status <> fnd_api.g_ret_sts_success THEN
7246: RAISE fnd_api.g_exc_error;
7247: END IF;
7248: ELSE
7249: RAISE update_rsrc_failed;
7250: END IF;

Line 7254: ,p_encoded => fnd_api.g_false

7250: END IF;
7251:
7252: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7253: gme_common_pvt.count_and_get(x_count => x_message_count
7254: ,p_encoded => fnd_api.g_false
7255: ,x_data => x_message_list);
7256:
7257: IF g_debug <= gme_debug.g_log_procedure THEN
7258: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '

Line 7265: ,p_encoded => fnd_api.g_false

7261: EXCEPTION
7262: WHEN update_rsrc_failed THEN
7263: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7264: gme_common_pvt.count_and_get(x_count => x_message_count
7265: ,p_encoded => fnd_api.g_false
7266: ,x_data => x_message_list);
7267: WHEN fnd_api.g_exc_error THEN
7268: x_return_status := fnd_api.g_ret_sts_error;
7269: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;

Line 7267: WHEN fnd_api.g_exc_error THEN

7263: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7264: gme_common_pvt.count_and_get(x_count => x_message_count
7265: ,p_encoded => fnd_api.g_false
7266: ,x_data => x_message_list);
7267: WHEN fnd_api.g_exc_error THEN
7268: x_return_status := fnd_api.g_ret_sts_error;
7269: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7270: gme_common_pvt.count_and_get(x_count => x_message_count
7271: ,p_encoded => fnd_api.g_false

Line 7268: x_return_status := fnd_api.g_ret_sts_error;

7264: gme_common_pvt.count_and_get(x_count => x_message_count
7265: ,p_encoded => fnd_api.g_false
7266: ,x_data => x_message_list);
7267: WHEN fnd_api.g_exc_error THEN
7268: x_return_status := fnd_api.g_ret_sts_error;
7269: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7270: gme_common_pvt.count_and_get(x_count => x_message_count
7271: ,p_encoded => fnd_api.g_false
7272: ,x_data => x_message_list);

Line 7271: ,p_encoded => fnd_api.g_false

7267: WHEN fnd_api.g_exc_error THEN
7268: x_return_status := fnd_api.g_ret_sts_error;
7269: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7270: gme_common_pvt.count_and_get(x_count => x_message_count
7271: ,p_encoded => fnd_api.g_false
7272: ,x_data => x_message_list);
7273: WHEN OTHERS THEN
7274: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7275: gme_when_others ( p_api_name => l_api_name

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

7282: PROCEDURE delete_batchstep_resource (
7283: p_api_version IN NUMBER := 2.0
7284: ,p_validation_level IN NUMBER
7285: := gme_common_pvt.g_max_errors
7286: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
7287: ,p_commit IN VARCHAR2 := fnd_api.g_false
7288: ,p_batchstep_resource_id IN NUMBER := NULL
7289: ,p_org_code IN VARCHAR2 := NULL
7290: ,p_batch_no IN VARCHAR2 := NULL

Line 7287: ,p_commit IN VARCHAR2 := fnd_api.g_false

7283: p_api_version IN NUMBER := 2.0
7284: ,p_validation_level IN NUMBER
7285: := gme_common_pvt.g_max_errors
7286: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
7287: ,p_commit IN VARCHAR2 := fnd_api.g_false
7288: ,p_batchstep_resource_id IN NUMBER := NULL
7289: ,p_org_code IN VARCHAR2 := NULL
7290: ,p_batch_no IN VARCHAR2 := NULL
7291: ,p_batchstep_no IN NUMBER := NULL

Line 7345: x_return_status := fnd_api.g_ret_sts_success;

7341: || l_api_name);
7342: END IF;
7343:
7344: /* Set the return status to success initially */
7345: x_return_status := fnd_api.g_ret_sts_success;
7346:
7347: /* Make sure we are call compatible */
7348: IF NOT fnd_api.compatible_api_call (2.0
7349: ,p_api_version

Line 7348: IF NOT fnd_api.compatible_api_call (2.0

7344: /* Set the return status to success initially */
7345: x_return_status := fnd_api.g_ret_sts_success;
7346:
7347: /* Make sure we are call compatible */
7348: IF NOT fnd_api.compatible_api_call (2.0
7349: ,p_api_version
7350: ,'delete_batchstep_resource'
7351: ,g_pkg_name) THEN
7352: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 7353: RAISE fnd_api.g_exc_error;

7349: ,p_api_version
7350: ,'delete_batchstep_resource'
7351: ,g_pkg_name) THEN
7352: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7353: RAISE fnd_api.g_exc_error;
7354: END IF;
7355:
7356: gme_common_pvt.set_timestamp;
7357:

Line 7359: IF p_init_msg_list = fnd_api.g_true THEN

7355:
7356: gme_common_pvt.set_timestamp;
7357:
7358: /* Initialize message list and count if needed */
7359: IF p_init_msg_list = fnd_api.g_true THEN
7360: fnd_msg_pub.initialize;
7361: gme_common_pvt.g_error_count := 0;
7362: END IF;
7363:

Line 7382: RAISE fnd_api.g_exc_error;

7378: IF (p_batchstep_resource_id IS NULL AND p_resource IS NULL) THEN
7379: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
7380: ,'FIELD_NAME'
7381: ,'RESOURCES');
7382: RAISE fnd_api.g_exc_error;
7383: END IF;
7384:
7385: /* validate key values where no internal ID provided */
7386: IF p_batchstep_resource_id IS NULL THEN

Line 7419: IF l_return_status <> fnd_api.g_ret_sts_success THEN

7415: || 'validate_param returns rsrc_id : '
7416: || l_rsrc_id );
7417: END IF;
7418:
7419: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7420: RAISE fnd_api.g_exc_error;
7421: END IF;
7422: ELSE
7423: IF g_debug <= gme_debug.g_log_statement THEN

Line 7420: RAISE fnd_api.g_exc_error;

7416: || l_rsrc_id );
7417: END IF;
7418:
7419: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7420: RAISE fnd_api.g_exc_error;
7421: END IF;
7422: ELSE
7423: IF g_debug <= gme_debug.g_log_statement THEN
7424: gme_debug.put_line ( g_pkg_name

Line 7452: RAISE fnd_api.g_exc_error;

7448: IF cur_get_step_dtl%NOTFOUND THEN
7449: CLOSE cur_get_step_dtl;
7450:
7451: gme_common_pvt.log_message ('GME_INVALID_RSRC_ID');
7452: RAISE fnd_api.g_exc_error;
7453: END IF;
7454:
7455: CLOSE cur_get_step_dtl;
7456:

Line 7474: RAISE fnd_api.g_exc_error;

7470: gme_common_pvt.setup (p_org_id => l_organization_id
7471: ,p_org_code => p_org_code);
7472:
7473: IF NOT gme_common_pvt.g_setup_done THEN
7474: RAISE fnd_api.g_exc_error;
7475: END IF;
7476:
7477: /* Validations prior to deletion */
7478: IF g_debug <= gme_debug.g_log_statement THEN

Line 7494: RAISE fnd_api.g_exc_error;

7490:
7491: IF cur_validate_batch_type%FOUND THEN
7492: CLOSE cur_validate_batch_type;
7493: gme_common_pvt.log_message ('GME_FPO_RSRC_NO_EDIT');
7494: RAISE fnd_api.g_exc_error;
7495: END IF;
7496:
7497: CLOSE cur_validate_batch_type;
7498:

Line 7514: RAISE fnd_api.g_exc_error;

7510: END IF;
7511:
7512: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN
7513: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7514: RAISE fnd_api.g_exc_error;
7515: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7516: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7517: RAISE fnd_api.g_exc_error;
7518: END IF;

Line 7517: RAISE fnd_api.g_exc_error;

7513: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7514: RAISE fnd_api.g_exc_error;
7515: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7516: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7517: RAISE fnd_api.g_exc_error;
7518: END IF;
7519:
7520: /* Ensure that the batchstep_resource_rec is sufficiently populated for deletion to proceed */
7521: l_batchstep_resource_rec.organization_id := l_organization_id;

Line 7551: IF x_return_status = fnd_api.g_ret_sts_success THEN

7547: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ' return
7548: status from delete is ' || x_return_status);
7549: END IF;
7550:
7551: IF x_return_status = fnd_api.g_ret_sts_success THEN
7552: IF g_debug <= gme_debug.g_log_statement THEN
7553: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ' invoke
7554: save_batch tith commit set ' || p_commit);
7555: END IF;

Line 7569: IF x_return_status <> fnd_api.g_ret_sts_success THEN

7565: status from save_batch is '
7566: || x_return_status);
7567: END IF;
7568:
7569: IF x_return_status <> fnd_api.g_ret_sts_success THEN
7570: RAISE fnd_api.g_exc_error;
7571: END IF;
7572: ELSE
7573: RAISE delete_rsrc_failed;

Line 7570: RAISE fnd_api.g_exc_error;

7566: || x_return_status);
7567: END IF;
7568:
7569: IF x_return_status <> fnd_api.g_ret_sts_success THEN
7570: RAISE fnd_api.g_exc_error;
7571: END IF;
7572: ELSE
7573: RAISE delete_rsrc_failed;
7574: END IF;

Line 7582: ,p_encoded => fnd_api.g_false

7578: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
7579: END IF;
7580: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7581: gme_common_pvt.count_and_get(x_count => x_message_count
7582: ,p_encoded => fnd_api.g_false
7583: ,x_data => x_message_list);
7584: EXCEPTION
7585: WHEN delete_rsrc_failed THEN
7586: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;

Line 7588: ,p_encoded => fnd_api.g_false

7584: EXCEPTION
7585: WHEN delete_rsrc_failed THEN
7586: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
7587: gme_common_pvt.count_and_get(x_count => x_message_count
7588: ,p_encoded => fnd_api.g_false
7589: ,x_data => x_message_list);
7590: WHEN fnd_api.g_exc_error THEN
7591: x_return_status := fnd_api.g_ret_sts_error;
7592: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;

Line 7590: WHEN fnd_api.g_exc_error THEN

7586: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
7587: gme_common_pvt.count_and_get(x_count => x_message_count
7588: ,p_encoded => fnd_api.g_false
7589: ,x_data => x_message_list);
7590: WHEN fnd_api.g_exc_error THEN
7591: x_return_status := fnd_api.g_ret_sts_error;
7592: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
7593: gme_common_pvt.count_and_get(x_count => x_message_count
7594: ,p_encoded => fnd_api.g_false

Line 7591: x_return_status := fnd_api.g_ret_sts_error;

7587: gme_common_pvt.count_and_get(x_count => x_message_count
7588: ,p_encoded => fnd_api.g_false
7589: ,x_data => x_message_list);
7590: WHEN fnd_api.g_exc_error THEN
7591: x_return_status := fnd_api.g_ret_sts_error;
7592: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
7593: gme_common_pvt.count_and_get(x_count => x_message_count
7594: ,p_encoded => fnd_api.g_false
7595: ,x_data => x_message_list);

Line 7594: ,p_encoded => fnd_api.g_false

7590: WHEN fnd_api.g_exc_error THEN
7591: x_return_status := fnd_api.g_ret_sts_error;
7592: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
7593: gme_common_pvt.count_and_get(x_count => x_message_count
7594: ,p_encoded => fnd_api.g_false
7595: ,x_data => x_message_list);
7596: WHEN OTHERS THEN
7597: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
7598: gme_when_others ( p_api_name => l_api_name

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

7605: PROCEDURE auto_detail_line (
7606: p_api_version IN NUMBER := 2.0
7607: ,p_validation_level IN NUMBER
7608: := gme_common_pvt.g_max_errors
7609: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
7610: ,p_commit IN VARCHAR2 := fnd_api.g_false
7611: ,x_message_count OUT NOCOPY NUMBER
7612: ,x_message_list OUT NOCOPY VARCHAR2
7613: ,x_return_status OUT NOCOPY VARCHAR2

Line 7610: ,p_commit IN VARCHAR2 := fnd_api.g_false

7606: p_api_version IN NUMBER := 2.0
7607: ,p_validation_level IN NUMBER
7608: := gme_common_pvt.g_max_errors
7609: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
7610: ,p_commit IN VARCHAR2 := fnd_api.g_false
7611: ,x_message_count OUT NOCOPY NUMBER
7612: ,x_message_list OUT NOCOPY VARCHAR2
7613: ,x_return_status OUT NOCOPY VARCHAR2
7614: ,p_material_detail_id IN NUMBER

Line 7646: x_return_status := fnd_api.g_ret_sts_success;

7642:
7643: /* Set the savepoint */
7644: SAVEPOINT auto_detail_line;
7645: /* Set the return status to success initially */
7646: x_return_status := fnd_api.g_ret_sts_success;
7647:
7648: IF p_init_msg_list = fnd_api.g_true THEN
7649: fnd_msg_pub.initialize;
7650: END IF;

Line 7648: IF p_init_msg_list = fnd_api.g_true THEN

7644: SAVEPOINT auto_detail_line;
7645: /* Set the return status to success initially */
7646: x_return_status := fnd_api.g_ret_sts_success;
7647:
7648: IF p_init_msg_list = fnd_api.g_true THEN
7649: fnd_msg_pub.initialize;
7650: END IF;
7651:
7652: IF NOT fnd_api.compatible_api_call (2.0

Line 7652: IF NOT fnd_api.compatible_api_call (2.0

7648: IF p_init_msg_list = fnd_api.g_true THEN
7649: fnd_msg_pub.initialize;
7650: END IF;
7651:
7652: IF NOT fnd_api.compatible_api_call (2.0
7653: ,p_api_version
7654: ,'auto_detail_line'
7655: ,g_pkg_name) THEN
7656: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 7657: RAISE fnd_api.g_exc_error;

7653: ,p_api_version
7654: ,'auto_detail_line'
7655: ,g_pkg_name) THEN
7656: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7657: RAISE fnd_api.g_exc_error;
7658: END IF;
7659:
7660: IF g_debug <= gme_debug.g_log_statement THEN
7661: gme_debug.put_line (

Line 7683: IF x_return_status <> fnd_api.g_ret_sts_success THEN

7679: ,x_material_detail_rec => l_material_details_rec_out
7680: ,x_message_count => x_message_count
7681: ,x_message_list => x_message_list
7682: ,x_return_status => x_return_status );
7683: IF x_return_status <> fnd_api.g_ret_sts_success THEN
7684: IF (g_debug = gme_debug.g_log_statement) THEN
7685: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
7686: || ': batch mateiral validate error ');
7687: END IF;

Line 7688: RAISE fnd_api.g_exc_error;

7684: IF (g_debug = gme_debug.g_log_statement) THEN
7685: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
7686: || ': batch mateiral validate error ');
7687: END IF;
7688: RAISE fnd_api.g_exc_error;
7689: ELSE
7690: l_material_details_rec := l_material_details_rec_out;
7691: END IF;
7692: gme_common_pvt.set_timestamp;

Line 7715: p_supply_demand_line_detail => FND_API.G_MISS_NUM,

7711: p_supply_demand_code => 2, -- signals DEMAND
7712: p_supply_demand_type_id => INV_RESERVATION_GLOBAL.g_source_type_wip,
7713: p_supply_demand_header_id => l_material_details_rec.batch_id,
7714: p_supply_demand_line_id => l_material_details_rec.material_detail_id,
7715: p_supply_demand_line_detail => FND_API.G_MISS_NUM,
7716: p_demand_ship_date => NULL,
7717: p_expected_receipt_date => NULL,
7718: p_api_version_number => 1.0,
7719: p_init_msg_lst => FND_API.G_FALSE );

Line 7719: p_init_msg_lst => FND_API.G_FALSE );

7715: p_supply_demand_line_detail => FND_API.G_MISS_NUM,
7716: p_demand_ship_date => NULL,
7717: p_expected_receipt_date => NULL,
7718: p_api_version_number => 1.0,
7719: p_init_msg_lst => FND_API.G_FALSE );
7720:
7721: IF g_debug <= gme_debug.g_log_statement THEN
7722: gme_debug.put_line
7723: ( g_pkg_name

Line 7735: IF x_return_status <> FND_API.G_RET_STS_SUCCESS

7731: || ' valid status is '
7732: || l_valid_status);
7733: END IF;
7734:
7735: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
7736: OR l_valid_status <> 'Y' THEN
7737: RAISE fnd_api.g_exc_error;
7738: END IF;
7739:

Line 7737: RAISE fnd_api.g_exc_error;

7733: END IF;
7734:
7735: IF x_return_status <> FND_API.G_RET_STS_SUCCESS
7736: OR l_valid_status <> 'Y' THEN
7737: RAISE fnd_api.g_exc_error;
7738: END IF;
7739:
7740: /* Invoke auto_detail_line to create detailed level reservations */
7741: gme_api_main.auto_detail_line

Line 7742: (p_init_msg_list => fnd_api.g_false

7738: END IF;
7739:
7740: /* Invoke auto_detail_line to create detailed level reservations */
7741: gme_api_main.auto_detail_line
7742: (p_init_msg_list => fnd_api.g_false
7743: ,p_material_detail_rec => l_material_details_rec
7744: ,x_message_count => x_message_count
7745: ,x_message_list => x_message_list
7746: ,x_return_status => x_return_status);

Line 7754: IF x_return_status <> fnd_api.g_ret_sts_success THEN

7750: ' Return status from GME_API_MAIN.Auto_Detail_Line is '
7751: || x_return_status);
7752: END IF;
7753:
7754: IF x_return_status <> fnd_api.g_ret_sts_success THEN
7755: RAISE auto_detail_error;
7756: END IF;
7757:
7758: /* COMMIT handling */

Line 7759: IF p_commit = fnd_api.g_true THEN

7755: RAISE auto_detail_error;
7756: END IF;
7757:
7758: /* COMMIT handling */
7759: IF p_commit = fnd_api.g_true THEN
7760: COMMIT;
7761: END IF;
7762:
7763: IF g_debug <= gme_debug.g_log_procedure THEN

Line 7775: ,p_encoded => fnd_api.g_false

7771: EXCEPTION
7772: WHEN auto_detail_error THEN
7773: ROLLBACK TO SAVEPOINT auto_detail_line;
7774: gme_common_pvt.count_and_get (x_count => x_message_count
7775: ,p_encoded => fnd_api.g_false
7776: ,x_data => x_message_list);
7777: WHEN fnd_api.g_exc_error THEN
7778: x_return_status := fnd_api.g_ret_sts_error;
7779: ROLLBACK TO SAVEPOINT auto_detail_line;

Line 7777: WHEN fnd_api.g_exc_error THEN

7773: ROLLBACK TO SAVEPOINT auto_detail_line;
7774: gme_common_pvt.count_and_get (x_count => x_message_count
7775: ,p_encoded => fnd_api.g_false
7776: ,x_data => x_message_list);
7777: WHEN fnd_api.g_exc_error THEN
7778: x_return_status := fnd_api.g_ret_sts_error;
7779: ROLLBACK TO SAVEPOINT auto_detail_line;
7780: gme_common_pvt.count_and_get (x_count => x_message_count
7781: ,p_encoded => fnd_api.g_false

Line 7778: x_return_status := fnd_api.g_ret_sts_error;

7774: gme_common_pvt.count_and_get (x_count => x_message_count
7775: ,p_encoded => fnd_api.g_false
7776: ,x_data => x_message_list);
7777: WHEN fnd_api.g_exc_error THEN
7778: x_return_status := fnd_api.g_ret_sts_error;
7779: ROLLBACK TO SAVEPOINT auto_detail_line;
7780: gme_common_pvt.count_and_get (x_count => x_message_count
7781: ,p_encoded => fnd_api.g_false
7782: ,x_data => x_message_list);

Line 7781: ,p_encoded => fnd_api.g_false

7777: WHEN fnd_api.g_exc_error THEN
7778: x_return_status := fnd_api.g_ret_sts_error;
7779: ROLLBACK TO SAVEPOINT auto_detail_line;
7780: gme_common_pvt.count_and_get (x_count => x_message_count
7781: ,p_encoded => fnd_api.g_false
7782: ,x_data => x_message_list);
7783: WHEN OTHERS THEN
7784: ROLLBACK TO SAVEPOINT auto_detail_line;
7785: gme_when_others ( p_api_name => l_api_name

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

7789: END auto_detail_line;
7790:
7791: /*************************************************************************/
7792: PROCEDURE auto_detail_batch (p_api_version IN NUMBER := 2.0
7793: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
7794: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
7795: ,x_message_count OUT NOCOPY NUMBER
7796: ,x_message_list OUT NOCOPY VARCHAR2
7797: ,x_return_status OUT NOCOPY VARCHAR2

Line 7794: ,p_commit IN VARCHAR2 := FND_API.G_FALSE

7790:
7791: /*************************************************************************/
7792: PROCEDURE auto_detail_batch (p_api_version IN NUMBER := 2.0
7793: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
7794: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
7795: ,x_message_count OUT NOCOPY NUMBER
7796: ,x_message_list OUT NOCOPY VARCHAR2
7797: ,x_return_status OUT NOCOPY VARCHAR2
7798: ,p_org_code IN VARCHAR2

Line 7819: x_return_status := FND_API.G_RET_STS_SUCCESS;

7815: /* Set the savepoint */
7816: SAVEPOINT auto_detail_batch;
7817:
7818: /* Set the return status to success initially */
7819: x_return_status := FND_API.G_RET_STS_SUCCESS;
7820:
7821: IF p_init_msg_list = FND_API.G_TRUE THEN
7822: fnd_msg_pub.initialize;
7823: END IF;

Line 7821: IF p_init_msg_list = FND_API.G_TRUE THEN

7817:
7818: /* Set the return status to success initially */
7819: x_return_status := FND_API.G_RET_STS_SUCCESS;
7820:
7821: IF p_init_msg_list = FND_API.G_TRUE THEN
7822: fnd_msg_pub.initialize;
7823: END IF;
7824:
7825: IF NOT FND_API.compatible_api_call(2.0

Line 7825: IF NOT FND_API.compatible_api_call(2.0

7821: IF p_init_msg_list = FND_API.G_TRUE THEN
7822: fnd_msg_pub.initialize;
7823: END IF;
7824:
7825: IF NOT FND_API.compatible_api_call(2.0
7826: ,p_api_version
7827: ,'auto_detail_batch'
7828: ,g_pkg_name ) THEN
7829: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 7830: RAISE fnd_api.g_exc_error;

7826: ,p_api_version
7827: ,'auto_detail_batch'
7828: ,g_pkg_name ) THEN
7829: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7830: RAISE fnd_api.g_exc_error;
7831: END IF;
7832:
7833: IF g_debug <= gme_debug.g_log_statement THEN
7834: gme_debug.put_line( g_pkg_name

Line 7856: RAISE fnd_api.g_exc_error;

7852: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
7853: p_org_code => p_org_code);
7854:
7855: IF NOT gme_common_pvt.g_setup_done THEN
7856: RAISE fnd_api.g_exc_error;
7857: ELSE
7858: l_batch_rec.organization_id := gme_common_pvt.g_organization_id;
7859: IF g_debug <= gme_debug.g_log_statement THEN
7860: gme_debug.put_line( g_pkg_name

Line 7875: RAISE fnd_api.g_exc_error;

7871: END IF;
7872:
7873: IF (NOT gme_batch_header_dbl.fetch_row (l_batch_rec,
7874: l_batch_header_rec) ) THEN
7875: RAISE fnd_api.g_exc_error;
7876: END IF;
7877:
7878: /* Validate for organization */
7879: IF (l_batch_header_rec.organization_id IS NULL AND p_org_code IS NULL) THEN

Line 7882: RAISE fnd_api.g_exc_error;

7878: /* Validate for organization */
7879: IF (l_batch_header_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
7880: fnd_message.set_name ('INV', 'INV_ORG_REQUIRED');
7881: fnd_msg_pub.ADD;
7882: RAISE fnd_api.g_exc_error;
7883: END IF;
7884:
7885: /* Check setup is done. For all profile/parameter values based on orgn_code/organization_id. */
7886: gme_common_pvt.g_setup_done :=

Line 7891: RAISE fnd_api.g_exc_error;

7887: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
7888: p_org_code => p_org_code);
7889:
7890: IF NOT gme_common_pvt.g_setup_done THEN
7891: RAISE fnd_api.g_exc_error;
7892: END IF;
7893:
7894: /* Verify that update_inventory is permitted for this batch */
7895: IF l_batch_header_rec.update_inventory_ind <> 'Y' THEN

Line 7897: RAISE fnd_api.g_exc_error;

7893:
7894: /* Verify that update_inventory is permitted for this batch */
7895: IF l_batch_header_rec.update_inventory_ind <> 'Y' THEN
7896: gme_common_pvt.log_message ('GME_INVENTORY_UPDATE_BLOCKED');
7897: RAISE fnd_api.g_exc_error;
7898: END IF;
7899:
7900: /* Verify Batch to be in pending or WIP status */
7901: IF l_batch_header_rec.batch_status NOT IN

Line 7904: RAISE fnd_api.g_exc_error;

7900: /* Verify Batch to be in pending or WIP status */
7901: IF l_batch_header_rec.batch_status NOT IN
7902: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
7903: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS','PROCESS','AUTO_DETAIL_BATCH');
7904: RAISE fnd_api.g_exc_error;
7905: END IF;
7906:
7907: /* Reservations not permitted for FPOs */
7908: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

Line 7910: RAISE fnd_api.g_exc_error;

7906:
7907: /* Reservations not permitted for FPOs */
7908: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
7909: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
7910: RAISE fnd_api.g_exc_error;
7911: END IF;
7912:
7913: gme_common_pvt.set_timestamp;
7914:

Line 7916: GME_API_MAIN.Auto_Detail_Batch(p_init_msg_list => FND_API.G_FALSE

7912:
7913: gme_common_pvt.set_timestamp;
7914:
7915: /* Invoke auto_detail_batch to create detailed level reservations */
7916: GME_API_MAIN.Auto_Detail_Batch(p_init_msg_list => FND_API.G_FALSE
7917: ,x_message_count => x_message_count
7918: ,x_message_list => x_message_list
7919: ,x_return_status => x_return_status
7920: ,p_batch_rec => l_batch_header_rec);

Line 7930: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

7926: ||' Return status from GME_API_MAIN.Auto_Detail_Batch is '
7927: ||x_return_status);
7928: END IF;
7929:
7930: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
7931: RAISE auto_detail_error;
7932: END IF;
7933:
7934: /* COMMIT handling */

Line 7935: IF p_commit = FND_API.G_TRUE THEN

7931: RAISE auto_detail_error;
7932: END IF;
7933:
7934: /* COMMIT handling */
7935: IF p_commit = FND_API.G_TRUE THEN
7936: COMMIT;
7937: END IF;
7938:
7939: IF g_debug <= gme_debug.g_log_procedure THEN

Line 7952: p_encoded => FND_API.g_false,

7948: EXCEPTION
7949: WHEN auto_detail_error THEN
7950: ROLLBACK TO SAVEPOINT auto_detail_batch;
7951: gme_common_pvt.count_and_get(x_count => x_message_count,
7952: p_encoded => FND_API.g_false,
7953: x_data => x_message_list);
7954: WHEN fnd_api.g_exc_error THEN
7955: x_return_status := FND_API.g_ret_sts_error;
7956: ROLLBACK TO SAVEPOINT auto_detail_batch;

Line 7954: WHEN fnd_api.g_exc_error THEN

7950: ROLLBACK TO SAVEPOINT auto_detail_batch;
7951: gme_common_pvt.count_and_get(x_count => x_message_count,
7952: p_encoded => FND_API.g_false,
7953: x_data => x_message_list);
7954: WHEN fnd_api.g_exc_error THEN
7955: x_return_status := FND_API.g_ret_sts_error;
7956: ROLLBACK TO SAVEPOINT auto_detail_batch;
7957: gme_common_pvt.count_and_get(x_count => x_message_count,
7958: p_encoded => FND_API.g_false,

Line 7955: x_return_status := FND_API.g_ret_sts_error;

7951: gme_common_pvt.count_and_get(x_count => x_message_count,
7952: p_encoded => FND_API.g_false,
7953: x_data => x_message_list);
7954: WHEN fnd_api.g_exc_error THEN
7955: x_return_status := FND_API.g_ret_sts_error;
7956: ROLLBACK TO SAVEPOINT auto_detail_batch;
7957: gme_common_pvt.count_and_get(x_count => x_message_count,
7958: p_encoded => FND_API.g_false,
7959: x_data => x_message_list);

Line 7958: p_encoded => FND_API.g_false,

7954: WHEN fnd_api.g_exc_error THEN
7955: x_return_status := FND_API.g_ret_sts_error;
7956: ROLLBACK TO SAVEPOINT auto_detail_batch;
7957: gme_common_pvt.count_and_get(x_count => x_message_count,
7958: p_encoded => FND_API.g_false,
7959: x_data => x_message_list);
7960: WHEN OTHERS THEN
7961: ROLLBACK TO SAVEPOINT auto_detail_batch;
7962: gme_when_others ( p_api_name => l_api_name

Line 7996: DEFAULT fnd_api.g_false,

7992: p_api_version IN NUMBER ,
7993: p_validation_level IN NUMBER
7994: := gme_common_pvt.g_max_errors,
7995: p_init_msg_list IN VARCHAR2
7996: DEFAULT fnd_api.g_false,
7997: p_commit IN VARCHAR2
7998: DEFAULT fnd_api.g_false,
7999: p_org_code IN VARCHAR2,
8000: p_batchstep_activity_rec IN gme_batch_step_activities%ROWTYPE,

Line 7998: DEFAULT fnd_api.g_false,

7994: := gme_common_pvt.g_max_errors,
7995: p_init_msg_list IN VARCHAR2
7996: DEFAULT fnd_api.g_false,
7997: p_commit IN VARCHAR2
7998: DEFAULT fnd_api.g_false,
7999: p_org_code IN VARCHAR2,
8000: p_batchstep_activity_rec IN gme_batch_step_activities%ROWTYPE,
8001: p_batchstep_resource_tbl IN gme_create_step_pvt.resources_tab,
8002: p_batch_no IN VARCHAR2 := NULL,

Line 8005: DEFAULT fnd_api.g_false,

8001: p_batchstep_resource_tbl IN gme_create_step_pvt.resources_tab,
8002: p_batch_no IN VARCHAR2 := NULL,
8003: p_batchstep_no IN NUMBER := NULL,
8004: p_ignore_qty_below_cap IN VARCHAR2
8005: DEFAULT fnd_api.g_false,
8006: p_validate_flexfield IN VARCHAR2
8007: DEFAULT fnd_api.g_false,
8008: x_batchstep_activity_rec OUT NOCOPY gme_batch_step_activities%ROWTYPE,
8009: x_message_count OUT NOCOPY NUMBER,

Line 8007: DEFAULT fnd_api.g_false,

8003: p_batchstep_no IN NUMBER := NULL,
8004: p_ignore_qty_below_cap IN VARCHAR2
8005: DEFAULT fnd_api.g_false,
8006: p_validate_flexfield IN VARCHAR2
8007: DEFAULT fnd_api.g_false,
8008: x_batchstep_activity_rec OUT NOCOPY gme_batch_step_activities%ROWTYPE,
8009: x_message_count OUT NOCOPY NUMBER,
8010: x_message_list OUT NOCOPY VARCHAR2,
8011: x_return_status OUT NOCOPY VARCHAR2

Line 8031: IF (fnd_api.to_boolean (p_init_msg_list))

8027: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
8028: || l_api_name);
8029: END IF;
8030:
8031: IF (fnd_api.to_boolean (p_init_msg_list))
8032: THEN
8033: fnd_msg_pub.initialize;
8034: gme_common_pvt.g_error_count := 0;
8035: END IF;

Line 8038: IF NOT fnd_api.compatible_api_call (2.0,

8034: gme_common_pvt.g_error_count := 0;
8035: END IF;
8036:
8037: -- Standard call to check for call compatibility.
8038: IF NOT fnd_api.compatible_api_call (2.0,
8039: p_api_version,
8040: l_api_name,
8041: g_pkg_name
8042: ) THEN

Line 8044: RAISE fnd_api.g_exc_error;

8040: l_api_name,
8041: g_pkg_name
8042: ) THEN
8043: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8044: RAISE fnd_api.g_exc_error;
8045: END IF;
8046:
8047: /* Set the return status to success initially */
8048: x_return_status := fnd_api.g_ret_sts_success;

Line 8048: x_return_status := fnd_api.g_ret_sts_success;

8044: RAISE fnd_api.g_exc_error;
8045: END IF;
8046:
8047: /* Set the return status to success initially */
8048: x_return_status := fnd_api.g_ret_sts_success;
8049:
8050: /* Setup the common constants used accross the apis */
8051: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8052: p_org_code => p_org_code)

Line 8054: RAISE fnd_api.g_exc_error;

8050: /* Setup the common constants used accross the apis */
8051: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8052: p_org_code => p_org_code)
8053: )THEN
8054: RAISE fnd_api.g_exc_error;
8055: END IF;
8056:
8057: --FPBug#4395561 Start setting global flex validate variable
8058: IF p_validate_flexfield = FND_API.G_TRUE THEN

Line 8058: IF p_validate_flexfield = FND_API.G_TRUE THEN

8054: RAISE fnd_api.g_exc_error;
8055: END IF;
8056:
8057: --FPBug#4395561 Start setting global flex validate variable
8058: IF p_validate_flexfield = FND_API.G_TRUE THEN
8059: gme_common_pvt.g_flex_validate_prof := 1;
8060: ELSE
8061: gme_common_pvt.g_flex_validate_prof := 0;
8062: END IF;

Line 8079: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

8075: );
8076: --FPBug#4395561 resetting global flex field validate
8077: gme_common_pvt.g_flex_validate_prof := 0;
8078:
8079: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
8080: RAISE insert_activity_failed;
8081: END IF;
8082:
8083: gme_api_pub.save_batch (x_return_status => x_return_status);

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

8081: END IF;
8082:
8083: gme_api_pub.save_batch (x_return_status => x_return_status);
8084:
8085: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
8086: COMMIT WORK;
8087: ELSE
8088: RAISE fnd_api.g_exc_error;
8089: END IF;

Line 8088: RAISE fnd_api.g_exc_error;

8084:
8085: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
8086: COMMIT WORK;
8087: ELSE
8088: RAISE fnd_api.g_exc_error;
8089: END IF;
8090:
8091: gme_common_pvt.count_and_get (x_count => x_message_count,
8092: p_encoded => fnd_api.g_false,

Line 8092: p_encoded => fnd_api.g_false,

8088: RAISE fnd_api.g_exc_error;
8089: END IF;
8090:
8091: gme_common_pvt.count_and_get (x_count => x_message_count,
8092: p_encoded => fnd_api.g_false,
8093: x_data => x_message_list
8094: );
8095:
8096: IF g_debug <= gme_debug.g_log_procedure THEN

Line 8104: p_encoded => fnd_api.g_false,

8100: EXCEPTION
8101: WHEN insert_activity_failed THEN
8102: ROLLBACK TO SAVEPOINT insert_activity_pub;
8103: gme_common_pvt.count_and_get (x_count => x_message_count,
8104: p_encoded => fnd_api.g_false,
8105: x_data => x_message_list
8106: );
8107: WHEN fnd_api.g_exc_error THEN
8108: ROLLBACK TO SAVEPOINT insert_activity_pub;

Line 8107: WHEN fnd_api.g_exc_error THEN

8103: gme_common_pvt.count_and_get (x_count => x_message_count,
8104: p_encoded => fnd_api.g_false,
8105: x_data => x_message_list
8106: );
8107: WHEN fnd_api.g_exc_error THEN
8108: ROLLBACK TO SAVEPOINT insert_activity_pub;
8109: x_return_status := fnd_api.g_ret_sts_error;
8110: gme_common_pvt.count_and_get (x_count => x_message_count,
8111: p_encoded => fnd_api.g_false,

Line 8109: x_return_status := fnd_api.g_ret_sts_error;

8105: x_data => x_message_list
8106: );
8107: WHEN fnd_api.g_exc_error THEN
8108: ROLLBACK TO SAVEPOINT insert_activity_pub;
8109: x_return_status := fnd_api.g_ret_sts_error;
8110: gme_common_pvt.count_and_get (x_count => x_message_count,
8111: p_encoded => fnd_api.g_false,
8112: x_data => x_message_list
8113: );

Line 8111: p_encoded => fnd_api.g_false,

8107: WHEN fnd_api.g_exc_error THEN
8108: ROLLBACK TO SAVEPOINT insert_activity_pub;
8109: x_return_status := fnd_api.g_ret_sts_error;
8110: gme_common_pvt.count_and_get (x_count => x_message_count,
8111: p_encoded => fnd_api.g_false,
8112: x_data => x_message_list
8113: );
8114: WHEN OTHERS THEN
8115: ROLLBACK TO SAVEPOINT insert_activity_pub;

Line 8148: DEFAULT fnd_api.g_false,

8144: p_api_version IN NUMBER ,
8145: p_validation_level IN NUMBER
8146: := gme_common_pvt.g_max_errors,
8147: p_init_msg_list IN VARCHAR2
8148: DEFAULT fnd_api.g_false,
8149: p_commit IN VARCHAR2
8150: DEFAULT fnd_api.g_false,
8151: p_org_code IN VARCHAR2,
8152: p_batchstep_activity_rec IN gme_batch_step_activities%ROWTYPE,

Line 8150: DEFAULT fnd_api.g_false,

8146: := gme_common_pvt.g_max_errors,
8147: p_init_msg_list IN VARCHAR2
8148: DEFAULT fnd_api.g_false,
8149: p_commit IN VARCHAR2
8150: DEFAULT fnd_api.g_false,
8151: p_org_code IN VARCHAR2,
8152: p_batchstep_activity_rec IN gme_batch_step_activities%ROWTYPE,
8153: p_batch_no IN VARCHAR2 := NULL,
8154: p_batchstep_no IN NUMBER := NULL,

Line 8156: DEFAULT fnd_api.g_false,

8152: p_batchstep_activity_rec IN gme_batch_step_activities%ROWTYPE,
8153: p_batch_no IN VARCHAR2 := NULL,
8154: p_batchstep_no IN NUMBER := NULL,
8155: p_validate_flexfield IN VARCHAR2
8156: DEFAULT fnd_api.g_false,
8157: x_batchstep_activity_rec OUT NOCOPY gme_batch_step_activities%ROWTYPE,
8158: x_message_count OUT NOCOPY NUMBER,
8159: x_message_list OUT NOCOPY VARCHAR2,
8160: x_return_status OUT NOCOPY VARCHAR2

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

8173: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
8174: || l_api_name);
8175: END IF;
8176:
8177: IF (fnd_api.to_boolean (p_init_msg_list)) THEN
8178: fnd_msg_pub.initialize;
8179: gme_common_pvt.g_error_count := 0;
8180: END IF;
8181:

Line 8183: IF NOT fnd_api.compatible_api_call (2.0,

8179: gme_common_pvt.g_error_count := 0;
8180: END IF;
8181:
8182: -- Standard call to check for call compatibility.
8183: IF NOT fnd_api.compatible_api_call (2.0,
8184: p_api_version,
8185: l_api_name,
8186: g_pkg_name
8187: ) THEN

Line 8189: RAISE fnd_api.g_exc_error;

8185: l_api_name,
8186: g_pkg_name
8187: ) THEN
8188: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8189: RAISE fnd_api.g_exc_error;
8190: END IF;
8191:
8192: /* Set the return status to success initially */
8193: x_return_status := fnd_api.g_ret_sts_success;

Line 8193: x_return_status := fnd_api.g_ret_sts_success;

8189: RAISE fnd_api.g_exc_error;
8190: END IF;
8191:
8192: /* Set the return status to success initially */
8193: x_return_status := fnd_api.g_ret_sts_success;
8194:
8195: /* Setup the common constants used accross the apis */
8196: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8197: p_org_code => p_org_code)) THEN

Line 8198: RAISE fnd_api.g_exc_error;

8194:
8195: /* Setup the common constants used accross the apis */
8196: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8197: p_org_code => p_org_code)) THEN
8198: RAISE fnd_api.g_exc_error;
8199: END IF;
8200:
8201: --FPBug#4395561 Start setting global flex validate variable
8202: IF p_validate_flexfield = FND_API.G_TRUE THEN

Line 8202: IF p_validate_flexfield = FND_API.G_TRUE THEN

8198: RAISE fnd_api.g_exc_error;
8199: END IF;
8200:
8201: --FPBug#4395561 Start setting global flex validate variable
8202: IF p_validate_flexfield = FND_API.G_TRUE THEN
8203: gme_common_pvt.g_flex_validate_prof := 1;
8204: ELSE
8205: gme_common_pvt.g_flex_validate_prof := 0;
8206: END IF;

Line 8221: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

8217: );
8218: --FPBug#4395561 resetting global flex-field validate variable
8219: gme_common_pvt.g_flex_validate_prof := 0;
8220:
8221: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
8222: RAISE update_activity_failed;
8223: END IF;
8224:
8225: gme_api_pub.save_batch (x_return_status => x_return_status);

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

8223: END IF;
8224:
8225: gme_api_pub.save_batch (x_return_status => x_return_status);
8226:
8227: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
8228: COMMIT WORK;
8229: ELSE
8230: RAISE fnd_api.g_exc_error;
8231: END IF;

Line 8230: RAISE fnd_api.g_exc_error;

8226:
8227: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
8228: COMMIT WORK;
8229: ELSE
8230: RAISE fnd_api.g_exc_error;
8231: END IF;
8232:
8233: gme_common_pvt.count_and_get (x_count => x_message_count,
8234: p_encoded => fnd_api.g_false,

Line 8234: p_encoded => fnd_api.g_false,

8230: RAISE fnd_api.g_exc_error;
8231: END IF;
8232:
8233: gme_common_pvt.count_and_get (x_count => x_message_count,
8234: p_encoded => fnd_api.g_false,
8235: x_data => x_message_list
8236: );
8237: IF g_debug <= gme_debug.g_log_procedure THEN
8238: gme_debug.put_line ( 'Completed ' || l_api_name || ' at '

Line 8245: p_encoded => fnd_api.g_false,

8241: EXCEPTION
8242: WHEN update_activity_failed THEN
8243: ROLLBACK TO SAVEPOINT update_activity_pub;
8244: gme_common_pvt.count_and_get (x_count => x_message_count,
8245: p_encoded => fnd_api.g_false,
8246: x_data => x_message_list
8247: );
8248: WHEN fnd_api.g_exc_error THEN
8249: ROLLBACK TO SAVEPOINT update_activity_pub;

Line 8248: WHEN fnd_api.g_exc_error THEN

8244: gme_common_pvt.count_and_get (x_count => x_message_count,
8245: p_encoded => fnd_api.g_false,
8246: x_data => x_message_list
8247: );
8248: WHEN fnd_api.g_exc_error THEN
8249: ROLLBACK TO SAVEPOINT update_activity_pub;
8250: x_return_status := fnd_api.g_ret_sts_error;
8251: gme_common_pvt.count_and_get (x_count => x_message_count,
8252: p_encoded => fnd_api.g_false,

Line 8250: x_return_status := fnd_api.g_ret_sts_error;

8246: x_data => x_message_list
8247: );
8248: WHEN fnd_api.g_exc_error THEN
8249: ROLLBACK TO SAVEPOINT update_activity_pub;
8250: x_return_status := fnd_api.g_ret_sts_error;
8251: gme_common_pvt.count_and_get (x_count => x_message_count,
8252: p_encoded => fnd_api.g_false,
8253: x_data => x_message_list
8254: );

Line 8252: p_encoded => fnd_api.g_false,

8248: WHEN fnd_api.g_exc_error THEN
8249: ROLLBACK TO SAVEPOINT update_activity_pub;
8250: x_return_status := fnd_api.g_ret_sts_error;
8251: gme_common_pvt.count_and_get (x_count => x_message_count,
8252: p_encoded => fnd_api.g_false,
8253: x_data => x_message_list
8254: );
8255: WHEN OTHERS THEN
8256: ROLLBACK TO SAVEPOINT update_activity_pub;

Line 8287: DEFAULT fnd_api.g_false,

8283: p_api_version IN NUMBER := 2.0,
8284: p_validation_level IN NUMBER
8285: := gme_common_pvt.g_max_errors,
8286: p_init_msg_list IN VARCHAR2
8287: DEFAULT fnd_api.g_false,
8288: p_commit IN VARCHAR2
8289: DEFAULT fnd_api.g_false,
8290: p_org_code IN VARCHAR2,
8291: p_batchstep_activity_id IN NUMBER := NULL,

Line 8289: DEFAULT fnd_api.g_false,

8285: := gme_common_pvt.g_max_errors,
8286: p_init_msg_list IN VARCHAR2
8287: DEFAULT fnd_api.g_false,
8288: p_commit IN VARCHAR2
8289: DEFAULT fnd_api.g_false,
8290: p_org_code IN VARCHAR2,
8291: p_batchstep_activity_id IN NUMBER := NULL,
8292: p_batch_no IN VARCHAR2 := NULL,
8293: p_batchstep_no IN NUMBER := NULL,

Line 8316: IF (fnd_api.to_boolean (p_init_msg_list))

8312: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
8313: || l_api_name);
8314: END IF;
8315:
8316: IF (fnd_api.to_boolean (p_init_msg_list))
8317: THEN
8318: fnd_msg_pub.initialize;
8319: gme_common_pvt.g_error_count := 0;
8320: END IF;

Line 8323: IF NOT fnd_api.compatible_api_call (2.0,

8319: gme_common_pvt.g_error_count := 0;
8320: END IF;
8321:
8322: -- Standard call to check for call compatibility.
8323: IF NOT fnd_api.compatible_api_call (2.0,
8324: p_api_version,
8325: l_api_name,
8326: g_pkg_name) THEN
8327: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 8328: RAISE fnd_api.g_exc_error;

8324: p_api_version,
8325: l_api_name,
8326: g_pkg_name) THEN
8327: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8328: RAISE fnd_api.g_exc_error;
8329: END IF;
8330:
8331: /* Set the return status to success initially */
8332: x_return_status := fnd_api.g_ret_sts_success;

Line 8332: x_return_status := fnd_api.g_ret_sts_success;

8328: RAISE fnd_api.g_exc_error;
8329: END IF;
8330:
8331: /* Set the return status to success initially */
8332: x_return_status := fnd_api.g_ret_sts_success;
8333:
8334: /* Setup the common constants used accross the apis */
8335: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8336: p_org_code => p_org_code)) THEN

Line 8337: RAISE fnd_api.g_exc_error;

8333:
8334: /* Setup the common constants used accross the apis */
8335: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8336: p_org_code => p_org_code)) THEN
8337: RAISE fnd_api.g_exc_error;
8338: END IF;
8339:
8340: gme_common_pvt.set_timestamp;
8341: gme_batchstep_act_pvt.delete_batchstep_activity (p_batchstep_activity_id => p_batchstep_activity_id,

Line 8348: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

8344: p_batchstep_no => p_batchstep_no,
8345: p_activity => p_activity,
8346: x_return_status => x_return_status
8347: );
8348: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
8349: RAISE delete_activity_failed;
8350: END IF;
8351:
8352: gme_api_pub.save_batch (x_return_status => x_return_status);

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

8350: END IF;
8351:
8352: gme_api_pub.save_batch (x_return_status => x_return_status);
8353:
8354: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
8355: COMMIT;
8356: ELSE
8357: RAISE fnd_api.g_exc_error;
8358: END IF;

Line 8357: RAISE fnd_api.g_exc_error;

8353:
8354: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
8355: COMMIT;
8356: ELSE
8357: RAISE fnd_api.g_exc_error;
8358: END IF;
8359:
8360: gme_common_pvt.count_and_get (x_count => x_message_count,
8361: p_encoded => fnd_api.g_false,

Line 8361: p_encoded => fnd_api.g_false,

8357: RAISE fnd_api.g_exc_error;
8358: END IF;
8359:
8360: gme_common_pvt.count_and_get (x_count => x_message_count,
8361: p_encoded => fnd_api.g_false,
8362: x_data => x_message_list
8363: );
8364:
8365: IF g_debug <= gme_debug.g_log_procedure THEN

Line 8373: p_encoded => fnd_api.g_false,

8369: EXCEPTION
8370: WHEN delete_activity_failed THEN
8371: ROLLBACK TO SAVEPOINT delete_activity_pub;
8372: gme_common_pvt.count_and_get (x_count => x_message_count,
8373: p_encoded => fnd_api.g_false,
8374: x_data => x_message_list
8375: );
8376: WHEN fnd_api.g_exc_error THEN
8377: ROLLBACK TO SAVEPOINT delete_activity_pub;

Line 8376: WHEN fnd_api.g_exc_error THEN

8372: gme_common_pvt.count_and_get (x_count => x_message_count,
8373: p_encoded => fnd_api.g_false,
8374: x_data => x_message_list
8375: );
8376: WHEN fnd_api.g_exc_error THEN
8377: ROLLBACK TO SAVEPOINT delete_activity_pub;
8378: x_return_status := fnd_api.g_ret_sts_error;
8379: gme_common_pvt.count_and_get (x_count => x_message_count,
8380: p_encoded => fnd_api.g_false,

Line 8378: x_return_status := fnd_api.g_ret_sts_error;

8374: x_data => x_message_list
8375: );
8376: WHEN fnd_api.g_exc_error THEN
8377: ROLLBACK TO SAVEPOINT delete_activity_pub;
8378: x_return_status := fnd_api.g_ret_sts_error;
8379: gme_common_pvt.count_and_get (x_count => x_message_count,
8380: p_encoded => fnd_api.g_false,
8381: x_data => x_message_list
8382: );

Line 8380: p_encoded => fnd_api.g_false,

8376: WHEN fnd_api.g_exc_error THEN
8377: ROLLBACK TO SAVEPOINT delete_activity_pub;
8378: x_return_status := fnd_api.g_ret_sts_error;
8379: gme_common_pvt.count_and_get (x_count => x_message_count,
8380: p_encoded => fnd_api.g_false,
8381: x_data => x_message_list
8382: );
8383: WHEN OTHERS THEN
8384: ROLLBACK TO SAVEPOINT delete_activity_pub;

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

8391: /*************************************************************************/
8392: PROCEDURE convert_fpo (
8393: p_api_version IN NUMBER := 2.0,
8394: p_validation_level IN NUMBER := gme_common_pvt.g_max_errors,
8395: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
8396: p_commit IN VARCHAR2 := fnd_api.g_false,
8397: x_message_count OUT NOCOPY NUMBER,
8398: x_message_list OUT NOCOPY VARCHAR2,
8399: p_enforce_vldt_check IN VARCHAR2 := fnd_api.g_true,

Line 8396: p_commit IN VARCHAR2 := fnd_api.g_false,

8392: PROCEDURE convert_fpo (
8393: p_api_version IN NUMBER := 2.0,
8394: p_validation_level IN NUMBER := gme_common_pvt.g_max_errors,
8395: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
8396: p_commit IN VARCHAR2 := fnd_api.g_false,
8397: x_message_count OUT NOCOPY NUMBER,
8398: x_message_list OUT NOCOPY VARCHAR2,
8399: p_enforce_vldt_check IN VARCHAR2 := fnd_api.g_true,
8400: x_return_status OUT NOCOPY VARCHAR2,

Line 8399: p_enforce_vldt_check IN VARCHAR2 := fnd_api.g_true,

8395: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
8396: p_commit IN VARCHAR2 := fnd_api.g_false,
8397: x_message_count OUT NOCOPY NUMBER,
8398: x_message_list OUT NOCOPY VARCHAR2,
8399: p_enforce_vldt_check IN VARCHAR2 := fnd_api.g_true,
8400: x_return_status OUT NOCOPY VARCHAR2,
8401: p_org_code IN VARCHAR2 := NULL,
8402: p_batch_header IN gme_batch_header%ROWTYPE,
8403: x_batch_header OUT NOCOPY gme_batch_header%ROWTYPE,

Line 8413: p_use_shop_cal IN VARCHAR2 := fnd_api.g_false,

8409: p_batch_offset IN NUMBER DEFAULT 0,
8410: p_offset_type IN NUMBER DEFAULT 0,
8411: p_plan_start_date IN gme_batch_header.plan_start_date%TYPE,
8412: p_plan_cmplt_date IN gme_batch_header.plan_cmplt_date%TYPE,
8413: p_use_shop_cal IN VARCHAR2 := fnd_api.g_false,
8414: p_contiguity_override IN VARCHAR2 := fnd_api.g_true,
8415: p_use_for_all IN VARCHAR2 := fnd_api.g_true
8416: ) IS
8417: l_api_name CONSTANT VARCHAR2 (30) := 'CONVERT_FPO';

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

8410: p_offset_type IN NUMBER DEFAULT 0,
8411: p_plan_start_date IN gme_batch_header.plan_start_date%TYPE,
8412: p_plan_cmplt_date IN gme_batch_header.plan_cmplt_date%TYPE,
8413: p_use_shop_cal IN VARCHAR2 := fnd_api.g_false,
8414: p_contiguity_override IN VARCHAR2 := fnd_api.g_true,
8415: p_use_for_all IN VARCHAR2 := fnd_api.g_true
8416: ) IS
8417: l_api_name CONSTANT VARCHAR2 (30) := 'CONVERT_FPO';
8418: l_batch_header gme_batch_header%ROWTYPE;

Line 8415: p_use_for_all IN VARCHAR2 := fnd_api.g_true

8411: p_plan_start_date IN gme_batch_header.plan_start_date%TYPE,
8412: p_plan_cmplt_date IN gme_batch_header.plan_cmplt_date%TYPE,
8413: p_use_shop_cal IN VARCHAR2 := fnd_api.g_false,
8414: p_contiguity_override IN VARCHAR2 := fnd_api.g_true,
8415: p_use_for_all IN VARCHAR2 := fnd_api.g_true
8416: ) IS
8417: l_api_name CONSTANT VARCHAR2 (30) := 'CONVERT_FPO';
8418: l_batch_header gme_batch_header%ROWTYPE;
8419:

Line 8435: x_return_status := fnd_api.g_ret_sts_success;

8431: || l_api_name);
8432: END IF;
8433:
8434: /* Set the return status to success initially */
8435: x_return_status := fnd_api.g_ret_sts_success;
8436:
8437: IF p_init_msg_list = fnd_api.g_true THEN
8438: fnd_msg_pub.initialize;
8439: END IF;

Line 8437: IF p_init_msg_list = fnd_api.g_true THEN

8433:
8434: /* Set the return status to success initially */
8435: x_return_status := fnd_api.g_ret_sts_success;
8436:
8437: IF p_init_msg_list = fnd_api.g_true THEN
8438: fnd_msg_pub.initialize;
8439: END IF;
8440:
8441: IF NOT fnd_api.compatible_api_call (2.0

Line 8441: IF NOT fnd_api.compatible_api_call (2.0

8437: IF p_init_msg_list = fnd_api.g_true THEN
8438: fnd_msg_pub.initialize;
8439: END IF;
8440:
8441: IF NOT fnd_api.compatible_api_call (2.0
8442: ,p_api_version
8443: ,'convertFPO'
8444: ,g_pkg_name) THEN
8445: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 8446: RAISE fnd_api.g_exc_error;

8442: ,p_api_version
8443: ,'convertFPO'
8444: ,g_pkg_name) THEN
8445: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8446: RAISE fnd_api.g_exc_error;
8447: END IF;
8448:
8449:
8450: IF (p_batch_header.organization_id IS NULL AND p_org_code IS NULL) THEN

Line 8453: RAISE fnd_api.g_exc_error;

8449:
8450: IF (p_batch_header.organization_id IS NULL AND p_org_code IS NULL) THEN
8451: fnd_message.set_name ('INV', 'INV_ORG_REQUIRED');
8452: fnd_msg_pub.ADD;
8453: RAISE fnd_api.g_exc_error;
8454: END IF;
8455:
8456: /* Use local variable, so that user does not have to pass batch_type value 10 */
8457: l_batch_header := p_batch_header;

Line 8466: RAISE fnd_api.g_exc_error;

8462: p_batch_header => l_batch_header,
8463: x_return_status => x_return_status
8464: ) THEN
8465: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
8466: RAISE fnd_api.g_exc_error;
8467: ELSIF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8468: RAISE fnd_api.g_exc_error;
8469: END IF;
8470:

Line 8467: ELSIF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

8463: x_return_status => x_return_status
8464: ) THEN
8465: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
8466: RAISE fnd_api.g_exc_error;
8467: ELSIF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8468: RAISE fnd_api.g_exc_error;
8469: END IF;
8470:
8471: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

Line 8468: RAISE fnd_api.g_exc_error;

8464: ) THEN
8465: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
8466: RAISE fnd_api.g_exc_error;
8467: ELSIF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8468: RAISE fnd_api.g_exc_error;
8469: END IF;
8470:
8471: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
8472: gme_debug.put_line (g_pkg_name ||

Line 8487: RAISE fnd_api.g_exc_error;

8483: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
8484: ,p_org_code => p_org_code);
8485:
8486: IF NOT gme_common_pvt.g_setup_done THEN
8487: RAISE fnd_api.g_exc_error;
8488: ELSE
8489: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
8490: END IF;
8491:

Line 8513: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

8509: x_batch_header => x_batch_header,
8510: p_use_for_all => p_use_for_all
8511: );
8512:
8513: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
8514: IF p_commit = fnd_api.g_true THEN
8515: gme_api_pub.save_batch (p_header_id => NULL
8516: ,p_table => NULL
8517: ,p_commit => p_commit

Line 8514: IF p_commit = fnd_api.g_true THEN

8510: p_use_for_all => p_use_for_all
8511: );
8512:
8513: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
8514: IF p_commit = fnd_api.g_true THEN
8515: gme_api_pub.save_batch (p_header_id => NULL
8516: ,p_table => NULL
8517: ,p_commit => p_commit
8518: ,x_return_status => x_return_status);

Line 8520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

8516: ,p_table => NULL
8517: ,p_commit => p_commit
8518: ,x_return_status => x_return_status);
8519:
8520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8521: RAISE fnd_api.g_exc_error;
8522: ELSE
8523: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
8524: END IF;

Line 8521: RAISE fnd_api.g_exc_error;

8517: ,p_commit => p_commit
8518: ,x_return_status => x_return_status);
8519:
8520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8521: RAISE fnd_api.g_exc_error;
8522: ELSE
8523: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
8524: END IF;
8525: END IF;

Line 8531: p_encoded => FND_API.g_false,

8527: RAISE convert_fpo_failed;
8528: END IF;
8529:
8530: gme_common_pvt.count_and_get (x_count => x_message_count,
8531: p_encoded => FND_API.g_false,
8532: x_data => x_message_list);
8533: IF g_debug <= gme_debug.g_log_procedure THEN
8534: gme_debug.put_line ( 'Completed ' || l_api_name || ' at ' || TO_CHAR
8535: (SYSDATE, 'MM/DD/YYYY HH24:MI:SS'));

Line 8542: p_encoded => FND_API.g_false,

8538: WHEN convert_fpo_failed THEN
8539: ROLLBACK TO SAVEPOINT convert_fpo;
8540: x_batch_header := NULL;
8541: gme_common_pvt.count_and_get (x_count => x_message_count,
8542: p_encoded => FND_API.g_false,
8543: x_data => x_message_list);
8544: WHEN fnd_api.g_exc_error THEN
8545: ROLLBACK TO SAVEPOINT convert_fpo;
8546: x_batch_header := NULL;

Line 8544: WHEN fnd_api.g_exc_error THEN

8540: x_batch_header := NULL;
8541: gme_common_pvt.count_and_get (x_count => x_message_count,
8542: p_encoded => FND_API.g_false,
8543: x_data => x_message_list);
8544: WHEN fnd_api.g_exc_error THEN
8545: ROLLBACK TO SAVEPOINT convert_fpo;
8546: x_batch_header := NULL;
8547: x_return_status := fnd_api.g_ret_sts_error;
8548: gme_common_pvt.count_and_get (x_count => x_message_count,

Line 8547: x_return_status := fnd_api.g_ret_sts_error;

8543: x_data => x_message_list);
8544: WHEN fnd_api.g_exc_error THEN
8545: ROLLBACK TO SAVEPOINT convert_fpo;
8546: x_batch_header := NULL;
8547: x_return_status := fnd_api.g_ret_sts_error;
8548: gme_common_pvt.count_and_get (x_count => x_message_count,
8549: p_encoded => FND_API.g_false,
8550: x_data => x_message_list);
8551: WHEN OTHERS THEN

Line 8549: p_encoded => FND_API.g_false,

8545: ROLLBACK TO SAVEPOINT convert_fpo;
8546: x_batch_header := NULL;
8547: x_return_status := fnd_api.g_ret_sts_error;
8548: gme_common_pvt.count_and_get (x_count => x_message_count,
8549: p_encoded => FND_API.g_false,
8550: x_data => x_message_list);
8551: WHEN OTHERS THEN
8552: ROLLBACK TO SAVEPOINT convert_fpo;
8553: x_batch_header := NULL;

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

8595: PROCEDURE create_pending_product_lot
8596: (p_api_version IN NUMBER
8597: ,p_validation_level IN NUMBER
8598: := gme_common_pvt.g_max_errors
8599: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
8600: ,p_commit IN VARCHAR2 := fnd_api.g_false
8601: ,x_message_count OUT NOCOPY NUMBER
8602: ,x_message_list OUT NOCOPY VARCHAR2
8603: ,x_return_status OUT NOCOPY VARCHAR2

Line 8600: ,p_commit IN VARCHAR2 := fnd_api.g_false

8596: (p_api_version IN NUMBER
8597: ,p_validation_level IN NUMBER
8598: := gme_common_pvt.g_max_errors
8599: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
8600: ,p_commit IN VARCHAR2 := fnd_api.g_false
8601: ,x_message_count OUT NOCOPY NUMBER
8602: ,x_message_list OUT NOCOPY VARCHAR2
8603: ,x_return_status OUT NOCOPY VARCHAR2
8604: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 8606: ,p_create_lot IN VARCHAR2 := fnd_api.g_false

8602: ,x_message_list OUT NOCOPY VARCHAR2
8603: ,x_return_status OUT NOCOPY VARCHAR2
8604: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
8605: ,p_org_code IN VARCHAR2
8606: ,p_create_lot IN VARCHAR2 := fnd_api.g_false
8607: ,p_generate_lot IN VARCHAR2 := fnd_api.g_false
8608: ,p_generate_parent_lot IN VARCHAR2 := fnd_api.g_false
8609: ,p_material_detail_rec IN gme_material_details%ROWTYPE
8610: /* nsinghi bug#4486074 Added the p_expiration_dt parameter. */

Line 8607: ,p_generate_lot IN VARCHAR2 := fnd_api.g_false

8603: ,x_return_status OUT NOCOPY VARCHAR2
8604: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
8605: ,p_org_code IN VARCHAR2
8606: ,p_create_lot IN VARCHAR2 := fnd_api.g_false
8607: ,p_generate_lot IN VARCHAR2 := fnd_api.g_false
8608: ,p_generate_parent_lot IN VARCHAR2 := fnd_api.g_false
8609: ,p_material_detail_rec IN gme_material_details%ROWTYPE
8610: /* nsinghi bug#4486074 Added the p_expiration_dt parameter. */
8611: ,p_expiration_date IN mtl_lot_numbers.expiration_date%TYPE := NULL

Line 8608: ,p_generate_parent_lot IN VARCHAR2 := fnd_api.g_false

8604: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
8605: ,p_org_code IN VARCHAR2
8606: ,p_create_lot IN VARCHAR2 := fnd_api.g_false
8607: ,p_generate_lot IN VARCHAR2 := fnd_api.g_false
8608: ,p_generate_parent_lot IN VARCHAR2 := fnd_api.g_false
8609: ,p_material_detail_rec IN gme_material_details%ROWTYPE
8610: /* nsinghi bug#4486074 Added the p_expiration_dt parameter. */
8611: ,p_expiration_date IN mtl_lot_numbers.expiration_date%TYPE := NULL
8612: ,p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

Line 8636: x_return_status := fnd_api.g_ret_sts_success;

8632: || l_api_name);
8633: END IF;
8634:
8635: /* Set the return status to success initially */
8636: x_return_status := fnd_api.g_ret_sts_success;
8637:
8638: /* Set savepoint here */
8639: SAVEPOINT create_pending_product_lot;
8640:

Line 8641: IF p_init_msg_list = fnd_api.g_true THEN

8637:
8638: /* Set savepoint here */
8639: SAVEPOINT create_pending_product_lot;
8640:
8641: IF p_init_msg_list = fnd_api.g_true THEN
8642: fnd_msg_pub.initialize;
8643: END IF;
8644:
8645: IF NOT fnd_api.compatible_api_call (2.0

Line 8645: IF NOT fnd_api.compatible_api_call (2.0

8641: IF p_init_msg_list = fnd_api.g_true THEN
8642: fnd_msg_pub.initialize;
8643: END IF;
8644:
8645: IF NOT fnd_api.compatible_api_call (2.0
8646: ,p_api_version
8647: ,'create_pending_prod_lot'
8648: ,g_pkg_name) THEN
8649: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 8650: RAISE fnd_api.g_exc_error;

8646: ,p_api_version
8647: ,'create_pending_prod_lot'
8648: ,g_pkg_name) THEN
8649: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8650: RAISE fnd_api.g_exc_error;
8651: END IF;
8652:
8653: l_batch_id := NVL(p_pending_product_lots_rec.batch_id,
8654: NVL(p_material_detail_rec.batch_id, p_batch_header_rec.batch_id));

Line 8672: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8668: ,x_material_detail_rec => l_material_detail_rec
8669: ,x_message_count => x_message_count
8670: ,x_message_list => x_message_list
8671: ,x_return_status => x_return_status );
8672: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8673: IF (g_debug = gme_debug.g_log_statement) THEN
8674: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
8675: || ': batch mateiral validate error ');
8676: END IF;

Line 8677: RAISE fnd_api.g_exc_error;

8673: IF (g_debug = gme_debug.g_log_statement) THEN
8674: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
8675: || ': batch mateiral validate error ');
8676: END IF;
8677: RAISE fnd_api.g_exc_error;
8678: END IF;
8679:
8680: -- Validations
8681: gme_pending_product_lots_pvt.validate_material_for_create

Line 8686: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8682: (p_batch_header_rec => l_batch_header_rec
8683: ,p_material_detail_rec => l_material_detail_rec
8684: ,x_return_status => x_return_status);
8685:
8686: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8687: RAISE fnd_api.g_exc_error;
8688: END IF;
8689:
8690: gme_pending_product_lots_pvt.validate_record_for_create

Line 8687: RAISE fnd_api.g_exc_error;

8683: ,p_material_detail_rec => l_material_detail_rec
8684: ,x_return_status => x_return_status);
8685:
8686: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8687: RAISE fnd_api.g_exc_error;
8688: END IF;
8689:
8690: gme_pending_product_lots_pvt.validate_record_for_create
8691: (p_material_detail_rec => l_material_detail_rec

Line 8701: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8697: ,x_return_status => x_return_status
8698: /* nsinghi bug#4486074 Added the following parameter. */
8699: ,p_expiration_date => p_expiration_date);
8700:
8701: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8702: RAISE fnd_api.g_exc_error;
8703: END IF;
8704:
8705: /* Invoke main */

Line 8702: RAISE fnd_api.g_exc_error;

8698: /* nsinghi bug#4486074 Added the following parameter. */
8699: ,p_expiration_date => p_expiration_date);
8700:
8701: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8702: RAISE fnd_api.g_exc_error;
8703: END IF;
8704:
8705: /* Invoke main */
8706: gme_api_main.create_pending_product_lot

Line 8708: ,p_init_msg_list => fnd_api.g_false

8704:
8705: /* Invoke main */
8706: gme_api_main.create_pending_product_lot
8707: (p_validation_level => p_validation_level
8708: ,p_init_msg_list => fnd_api.g_false
8709: ,x_message_count => x_message_count
8710: ,x_message_list => x_message_list
8711: ,x_return_status => x_return_status
8712: ,p_org_id => l_batch_header_rec.organization_id

Line 8726: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8722: || ' Return status from gme_api_main.create_pending_product_lot is '
8723: || x_return_status);
8724: END IF;
8725:
8726: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8727: RAISE error_create_pp_lot;
8728: END IF;
8729:
8730: gme_api_pub.save_batch

Line 8745: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8741: || ' Return status from gme_api_pub.save_batch is '
8742: || x_return_status);
8743: END IF;
8744:
8745: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8746: RAISE fnd_api.g_exc_error;
8747: END IF;
8748:
8749: IF g_debug <= gme_debug.g_log_procedure THEN

Line 8746: RAISE fnd_api.g_exc_error;

8742: || x_return_status);
8743: END IF;
8744:
8745: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8746: RAISE fnd_api.g_exc_error;
8747: END IF;
8748:
8749: IF g_debug <= gme_debug.g_log_procedure THEN
8750: gme_debug.put_line ( ' Completed '

Line 8760: ,p_encoded => fnd_api.g_false

8756: EXCEPTION
8757: WHEN error_create_pp_lot THEN
8758: ROLLBACK TO SAVEPOINT create_pending_product_lot;
8759: gme_common_pvt.count_and_get (x_count => x_message_count
8760: ,p_encoded => fnd_api.g_false
8761: ,x_data => x_message_list);
8762: WHEN fnd_api.g_exc_error THEN
8763: ROLLBACK TO SAVEPOINT create_pending_product_lot;
8764: x_return_status := fnd_api.g_ret_sts_error;

Line 8762: WHEN fnd_api.g_exc_error THEN

8758: ROLLBACK TO SAVEPOINT create_pending_product_lot;
8759: gme_common_pvt.count_and_get (x_count => x_message_count
8760: ,p_encoded => fnd_api.g_false
8761: ,x_data => x_message_list);
8762: WHEN fnd_api.g_exc_error THEN
8763: ROLLBACK TO SAVEPOINT create_pending_product_lot;
8764: x_return_status := fnd_api.g_ret_sts_error;
8765: gme_common_pvt.count_and_get (x_count => x_message_count
8766: ,p_encoded => fnd_api.g_false

Line 8764: x_return_status := fnd_api.g_ret_sts_error;

8760: ,p_encoded => fnd_api.g_false
8761: ,x_data => x_message_list);
8762: WHEN fnd_api.g_exc_error THEN
8763: ROLLBACK TO SAVEPOINT create_pending_product_lot;
8764: x_return_status := fnd_api.g_ret_sts_error;
8765: gme_common_pvt.count_and_get (x_count => x_message_count
8766: ,p_encoded => fnd_api.g_false
8767: ,x_data => x_message_list);
8768: WHEN OTHERS THEN

Line 8766: ,p_encoded => fnd_api.g_false

8762: WHEN fnd_api.g_exc_error THEN
8763: ROLLBACK TO SAVEPOINT create_pending_product_lot;
8764: x_return_status := fnd_api.g_ret_sts_error;
8765: gme_common_pvt.count_and_get (x_count => x_message_count
8766: ,p_encoded => fnd_api.g_false
8767: ,x_data => x_message_list);
8768: WHEN OTHERS THEN
8769: ROLLBACK TO SAVEPOINT create_pending_product_lot;
8770: gme_when_others ( p_api_name => l_api_name

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

8798: PROCEDURE update_pending_product_lot
8799: (p_api_version IN NUMBER
8800: ,p_validation_level IN NUMBER
8801: := gme_common_pvt.g_max_errors
8802: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
8803: ,p_commit IN VARCHAR2 := fnd_api.g_false
8804: ,x_message_count OUT NOCOPY NUMBER
8805: ,x_message_list OUT NOCOPY VARCHAR2
8806: ,x_return_status OUT NOCOPY VARCHAR2

Line 8803: ,p_commit IN VARCHAR2 := fnd_api.g_false

8799: (p_api_version IN NUMBER
8800: ,p_validation_level IN NUMBER
8801: := gme_common_pvt.g_max_errors
8802: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
8803: ,p_commit IN VARCHAR2 := fnd_api.g_false
8804: ,x_message_count OUT NOCOPY NUMBER
8805: ,x_message_list OUT NOCOPY VARCHAR2
8806: ,x_return_status OUT NOCOPY VARCHAR2
8807: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 8836: x_return_status := fnd_api.g_ret_sts_success;

8832: || l_api_name);
8833: END IF;
8834:
8835: /* Set the return status to success initially */
8836: x_return_status := fnd_api.g_ret_sts_success;
8837:
8838: /* Set savepoint here */
8839: SAVEPOINT update_pending_product_lot;
8840:

Line 8841: IF p_init_msg_list = fnd_api.g_true THEN

8837:
8838: /* Set savepoint here */
8839: SAVEPOINT update_pending_product_lot;
8840:
8841: IF p_init_msg_list = fnd_api.g_true THEN
8842: fnd_msg_pub.initialize;
8843: END IF;
8844:
8845: IF NOT fnd_api.compatible_api_call (2.0

Line 8845: IF NOT fnd_api.compatible_api_call (2.0

8841: IF p_init_msg_list = fnd_api.g_true THEN
8842: fnd_msg_pub.initialize;
8843: END IF;
8844:
8845: IF NOT fnd_api.compatible_api_call (2.0
8846: ,p_api_version
8847: ,'update_pending_prod_lot'
8848: ,g_pkg_name) THEN
8849: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 8850: RAISE fnd_api.g_exc_error;

8846: ,p_api_version
8847: ,'update_pending_prod_lot'
8848: ,g_pkg_name) THEN
8849: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8850: RAISE fnd_api.g_exc_error;
8851: END IF;
8852:
8853: IF p_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN
8854: IF NOT gme_pending_product_lots_dbl.fetch_row

Line 8857: x_return_status := fnd_api.g_ret_sts_error;

8853: IF p_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN
8854: IF NOT gme_pending_product_lots_dbl.fetch_row
8855: (p_pending_product_lots_rec => p_pending_product_lots_rec
8856: ,x_pending_product_lots_rec => l_db_pending_product_lots_rec) THEN
8857: x_return_status := fnd_api.g_ret_sts_error;
8858: RAISE fnd_api.g_exc_error;
8859: END IF;
8860:
8861: l_in_material_detail_rec.material_detail_id := l_db_pending_product_lots_rec.material_detail_id;

Line 8858: RAISE fnd_api.g_exc_error;

8854: IF NOT gme_pending_product_lots_dbl.fetch_row
8855: (p_pending_product_lots_rec => p_pending_product_lots_rec
8856: ,x_pending_product_lots_rec => l_db_pending_product_lots_rec) THEN
8857: x_return_status := fnd_api.g_ret_sts_error;
8858: RAISE fnd_api.g_exc_error;
8859: END IF;
8860:
8861: l_in_material_detail_rec.material_detail_id := l_db_pending_product_lots_rec.material_detail_id;
8862: l_in_material_detail_rec.batch_id := l_db_pending_product_lots_rec.batch_id;

Line 8873: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8869: ,x_material_detail_rec => l_material_detail_rec
8870: ,x_message_count => x_message_count
8871: ,x_message_list => x_message_list
8872: ,x_return_status => x_return_status );
8873: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8874: IF (g_debug = gme_debug.g_log_statement) THEN
8875: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
8876: || ': batch mateiral validate error ');
8877: END IF;

Line 8878: RAISE fnd_api.g_exc_error;

8874: IF (g_debug = gme_debug.g_log_statement) THEN
8875: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
8876: || ': batch mateiral validate error ');
8877: END IF;
8878: RAISE fnd_api.g_exc_error;
8879: END IF;
8880:
8881: ELSE
8882: l_batch_id := NVL(p_pending_product_lots_rec.batch_id,

Line 8901: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8897: ,x_material_detail_rec => l_material_detail_rec
8898: ,x_message_count => x_message_count
8899: ,x_message_list => x_message_list
8900: ,x_return_status => x_return_status );
8901: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8902: IF (g_debug = gme_debug.g_log_statement) THEN
8903: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
8904: || ': batch mateiral validate error ');
8905: END IF;

Line 8906: RAISE fnd_api.g_exc_error;

8902: IF (g_debug = gme_debug.g_log_statement) THEN
8903: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
8904: || ': batch mateiral validate error ');
8905: END IF;
8906: RAISE fnd_api.g_exc_error;
8907: END IF;
8908: END IF;
8909:
8910: -- Validations

Line 8916: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8912: (p_batch_header_rec => l_batch_header_rec
8913: ,p_material_detail_rec => l_material_detail_rec
8914: ,x_return_status => x_return_status);
8915:
8916: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8917: RAISE fnd_api.g_exc_error;
8918: END IF;
8919:
8920: gme_pending_product_lots_pvt.validate_record_for_update

Line 8917: RAISE fnd_api.g_exc_error;

8913: ,p_material_detail_rec => l_material_detail_rec
8914: ,x_return_status => x_return_status);
8915:
8916: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8917: RAISE fnd_api.g_exc_error;
8918: END IF;
8919:
8920: gme_pending_product_lots_pvt.validate_record_for_update
8921: (p_material_detail_rec => l_material_detail_rec

Line 8927: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8923: ,p_pending_product_lots_rec => p_pending_product_lots_rec
8924: ,x_pending_product_lots_rec => l_pending_product_lots_rec
8925: ,x_return_status => x_return_status);
8926:
8927: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8928: RAISE fnd_api.g_exc_error;
8929: END IF;
8930:
8931: /* Invoke main */

Line 8928: RAISE fnd_api.g_exc_error;

8924: ,x_pending_product_lots_rec => l_pending_product_lots_rec
8925: ,x_return_status => x_return_status);
8926:
8927: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8928: RAISE fnd_api.g_exc_error;
8929: END IF;
8930:
8931: /* Invoke main */
8932: gme_api_main.update_pending_product_lot

Line 8934: ,p_init_msg_list => fnd_api.g_false

8930:
8931: /* Invoke main */
8932: gme_api_main.update_pending_product_lot
8933: (p_validation_level => p_validation_level
8934: ,p_init_msg_list => fnd_api.g_false
8935: ,x_message_count => x_message_count
8936: ,x_message_list => x_message_list
8937: ,x_return_status => x_return_status
8938: ,p_org_id => l_batch_header_rec.organization_id

Line 8952: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8948: || ' Return status from gme_api_main.update_pending_product_lot is '
8949: || x_return_status);
8950: END IF;
8951:
8952: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8953: RAISE error_update_pp_lot;
8954: END IF;
8955:
8956: /* Invoke save_batch */

Line 8981: IF x_return_status <> fnd_api.g_ret_sts_success THEN

8977: || ' Return status from gme_api_pub.save_batch is '
8978: || x_return_status);
8979: END IF;
8980:
8981: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8982: RAISE fnd_api.g_exc_error;
8983: END IF;
8984:
8985: IF g_debug <= gme_debug.g_log_procedure THEN

Line 8982: RAISE fnd_api.g_exc_error;

8978: || x_return_status);
8979: END IF;
8980:
8981: IF x_return_status <> fnd_api.g_ret_sts_success THEN
8982: RAISE fnd_api.g_exc_error;
8983: END IF;
8984:
8985: IF g_debug <= gme_debug.g_log_procedure THEN
8986: gme_debug.put_line ( ' Completed '

Line 8996: ,p_encoded => fnd_api.g_false

8992: WHEN error_update_pp_lot THEN
8993: ROLLBACK TO SAVEPOINT update_pending_product_lot;
8994: x_pending_product_lots_rec := NULL;
8995: gme_common_pvt.count_and_get (x_count => x_message_count
8996: ,p_encoded => fnd_api.g_false
8997: ,x_data => x_message_list);
8998: WHEN fnd_api.g_exc_error THEN
8999: ROLLBACK TO SAVEPOINT update_pending_product_lot;
9000: x_pending_product_lots_rec := NULL;

Line 8998: WHEN fnd_api.g_exc_error THEN

8994: x_pending_product_lots_rec := NULL;
8995: gme_common_pvt.count_and_get (x_count => x_message_count
8996: ,p_encoded => fnd_api.g_false
8997: ,x_data => x_message_list);
8998: WHEN fnd_api.g_exc_error THEN
8999: ROLLBACK TO SAVEPOINT update_pending_product_lot;
9000: x_pending_product_lots_rec := NULL;
9001: x_return_status := fnd_api.g_ret_sts_error;
9002: gme_common_pvt.count_and_get (x_count => x_message_count

Line 9001: x_return_status := fnd_api.g_ret_sts_error;

8997: ,x_data => x_message_list);
8998: WHEN fnd_api.g_exc_error THEN
8999: ROLLBACK TO SAVEPOINT update_pending_product_lot;
9000: x_pending_product_lots_rec := NULL;
9001: x_return_status := fnd_api.g_ret_sts_error;
9002: gme_common_pvt.count_and_get (x_count => x_message_count
9003: ,p_encoded => fnd_api.g_false
9004: ,x_data => x_message_list);
9005: WHEN OTHERS THEN

Line 9003: ,p_encoded => fnd_api.g_false

8999: ROLLBACK TO SAVEPOINT update_pending_product_lot;
9000: x_pending_product_lots_rec := NULL;
9001: x_return_status := fnd_api.g_ret_sts_error;
9002: gme_common_pvt.count_and_get (x_count => x_message_count
9003: ,p_encoded => fnd_api.g_false
9004: ,x_data => x_message_list);
9005: WHEN OTHERS THEN
9006: ROLLBACK TO SAVEPOINT update_pending_product_lot;
9007: x_pending_product_lots_rec := NULL;

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

9036: PROCEDURE delete_pending_product_lot
9037: (p_api_version IN NUMBER
9038: ,p_validation_level IN NUMBER
9039: := gme_common_pvt.g_max_errors
9040: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9041: ,p_commit IN VARCHAR2 := fnd_api.g_false
9042: ,x_message_count OUT NOCOPY NUMBER
9043: ,x_message_list OUT NOCOPY VARCHAR2
9044: ,x_return_status OUT NOCOPY VARCHAR2

Line 9041: ,p_commit IN VARCHAR2 := fnd_api.g_false

9037: (p_api_version IN NUMBER
9038: ,p_validation_level IN NUMBER
9039: := gme_common_pvt.g_max_errors
9040: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9041: ,p_commit IN VARCHAR2 := fnd_api.g_false
9042: ,x_message_count OUT NOCOPY NUMBER
9043: ,x_message_list OUT NOCOPY VARCHAR2
9044: ,x_return_status OUT NOCOPY VARCHAR2
9045: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 9079: x_return_status := fnd_api.g_ret_sts_success;

9075: || l_api_name);
9076: END IF;
9077:
9078: /* Set the return status to success initially */
9079: x_return_status := fnd_api.g_ret_sts_success;
9080:
9081: /* Set savepoint here */
9082: SAVEPOINT delete_pending_product_lot;
9083:

Line 9084: IF p_init_msg_list = fnd_api.g_true THEN

9080:
9081: /* Set savepoint here */
9082: SAVEPOINT delete_pending_product_lot;
9083:
9084: IF p_init_msg_list = fnd_api.g_true THEN
9085: fnd_msg_pub.initialize;
9086: END IF;
9087:
9088: IF NOT fnd_api.compatible_api_call (2.0

Line 9088: IF NOT fnd_api.compatible_api_call (2.0

9084: IF p_init_msg_list = fnd_api.g_true THEN
9085: fnd_msg_pub.initialize;
9086: END IF;
9087:
9088: IF NOT fnd_api.compatible_api_call (2.0
9089: ,p_api_version
9090: ,'delete_pending_prod_lot'
9091: ,g_pkg_name) THEN
9092: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 9093: RAISE fnd_api.g_exc_error;

9089: ,p_api_version
9090: ,'delete_pending_prod_lot'
9091: ,g_pkg_name) THEN
9092: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9093: RAISE fnd_api.g_exc_error;
9094: END IF;
9095:
9096: IF p_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN
9097: IF NOT gme_pending_product_lots_dbl.fetch_row

Line 9100: x_return_status := fnd_api.g_ret_sts_error;

9096: IF p_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN
9097: IF NOT gme_pending_product_lots_dbl.fetch_row
9098: (p_pending_product_lots_rec => p_pending_product_lots_rec
9099: ,x_pending_product_lots_rec => l_db_pending_product_lots_rec) THEN
9100: x_return_status := fnd_api.g_ret_sts_error;
9101: RAISE fnd_api.g_exc_error;
9102: END IF;
9103:
9104: l_in_material_detail_rec.material_detail_id := l_db_pending_product_lots_rec.material_detail_id;

Line 9101: RAISE fnd_api.g_exc_error;

9097: IF NOT gme_pending_product_lots_dbl.fetch_row
9098: (p_pending_product_lots_rec => p_pending_product_lots_rec
9099: ,x_pending_product_lots_rec => l_db_pending_product_lots_rec) THEN
9100: x_return_status := fnd_api.g_ret_sts_error;
9101: RAISE fnd_api.g_exc_error;
9102: END IF;
9103:
9104: l_in_material_detail_rec.material_detail_id := l_db_pending_product_lots_rec.material_detail_id;
9105: l_in_material_detail_rec.batch_id := l_db_pending_product_lots_rec.batch_id;

Line 9116: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9112: ,x_material_detail_rec => l_material_detail_rec
9113: ,x_message_count => x_message_count
9114: ,x_message_list => x_message_list
9115: ,x_return_status => x_return_status );
9116: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9117: IF (g_debug = gme_debug.g_log_statement) THEN
9118: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9119: || ': batch mateiral validate error ');
9120: END IF;

Line 9121: RAISE fnd_api.g_exc_error;

9117: IF (g_debug = gme_debug.g_log_statement) THEN
9118: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9119: || ': batch mateiral validate error ');
9120: END IF;
9121: RAISE fnd_api.g_exc_error;
9122: END IF;
9123: ELSE
9124: l_batch_id := NVL(p_pending_product_lots_rec.batch_id,
9125: NVL(p_material_detail_rec.batch_id, p_batch_header_rec.batch_id));

Line 9143: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9139: ,x_material_detail_rec => l_material_detail_rec
9140: ,x_message_count => x_message_count
9141: ,x_message_list => x_message_list
9142: ,x_return_status => x_return_status );
9143: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9144: IF (g_debug = gme_debug.g_log_statement) THEN
9145: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9146: || ': batch mateiral validate error ');
9147: END IF;

Line 9148: RAISE fnd_api.g_exc_error;

9144: IF (g_debug = gme_debug.g_log_statement) THEN
9145: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9146: || ': batch mateiral validate error ');
9147: END IF;
9148: RAISE fnd_api.g_exc_error;
9149: END IF;
9150: END IF;
9151: -- Validations
9152: gme_pending_product_lots_pvt.validate_material_for_delete

Line 9157: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9153: (p_batch_header_rec => l_batch_header_rec
9154: ,p_material_detail_rec => l_material_detail_rec
9155: ,x_return_status => x_return_status);
9156:
9157: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9158: RAISE fnd_api.g_exc_error;
9159: END IF;
9160:
9161: gme_pending_product_lots_pvt.validate_record_for_delete

Line 9158: RAISE fnd_api.g_exc_error;

9154: ,p_material_detail_rec => l_material_detail_rec
9155: ,x_return_status => x_return_status);
9156:
9157: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9158: RAISE fnd_api.g_exc_error;
9159: END IF;
9160:
9161: gme_pending_product_lots_pvt.validate_record_for_delete
9162: (p_material_detail_rec => l_material_detail_rec

Line 9168: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9164: ,p_pending_product_lots_rec => p_pending_product_lots_rec
9165: ,x_pending_product_lots_rec => l_pending_product_lots_rec
9166: ,x_return_status => x_return_status);
9167:
9168: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9169: RAISE fnd_api.g_exc_error;
9170: END IF;
9171:
9172: /* Invoke main */

Line 9169: RAISE fnd_api.g_exc_error;

9165: ,x_pending_product_lots_rec => l_pending_product_lots_rec
9166: ,x_return_status => x_return_status);
9167:
9168: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9169: RAISE fnd_api.g_exc_error;
9170: END IF;
9171:
9172: /* Invoke main */
9173: gme_api_main.delete_pending_product_lot

Line 9175: ,p_init_msg_list => fnd_api.g_false

9171:
9172: /* Invoke main */
9173: gme_api_main.delete_pending_product_lot
9174: (p_validation_level => p_validation_level
9175: ,p_init_msg_list => fnd_api.g_false
9176: ,x_message_count => x_message_count
9177: ,x_message_list => x_message_list
9178: ,x_return_status => x_return_status
9179: ,p_org_id => l_batch_header_rec.organization_id

Line 9192: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9188: || ' Return status from gme_api_main.delete_pending_product_lot is '
9189: || x_return_status);
9190: END IF;
9191:
9192: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9193: RAISE error_delete_pp_lot;
9194: END IF;
9195:
9196: /* Invoke save_batch */

Line 9221: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9217: || ' Return status from gme_api_pub.save_batch is '
9218: || x_return_status);
9219: END IF;
9220:
9221: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9222: RAISE fnd_api.g_exc_error;
9223: END IF;
9224:
9225: IF g_debug <= gme_debug.g_log_procedure THEN

Line 9222: RAISE fnd_api.g_exc_error;

9218: || x_return_status);
9219: END IF;
9220:
9221: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9222: RAISE fnd_api.g_exc_error;
9223: END IF;
9224:
9225: IF g_debug <= gme_debug.g_log_procedure THEN
9226: gme_debug.put_line ( ' Completed '

Line 9236: ,p_encoded => fnd_api.g_false

9232: EXCEPTION
9233: WHEN error_delete_pp_lot THEN
9234: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9235: gme_common_pvt.count_and_get (x_count => x_message_count
9236: ,p_encoded => fnd_api.g_false
9237: ,x_data => x_message_list);
9238: WHEN fnd_api.g_exc_error THEN
9239: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9240: x_return_status := fnd_api.g_ret_sts_error;

Line 9238: WHEN fnd_api.g_exc_error THEN

9234: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9235: gme_common_pvt.count_and_get (x_count => x_message_count
9236: ,p_encoded => fnd_api.g_false
9237: ,x_data => x_message_list);
9238: WHEN fnd_api.g_exc_error THEN
9239: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9240: x_return_status := fnd_api.g_ret_sts_error;
9241: gme_common_pvt.count_and_get (x_count => x_message_count
9242: ,p_encoded => fnd_api.g_false

Line 9240: x_return_status := fnd_api.g_ret_sts_error;

9236: ,p_encoded => fnd_api.g_false
9237: ,x_data => x_message_list);
9238: WHEN fnd_api.g_exc_error THEN
9239: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9240: x_return_status := fnd_api.g_ret_sts_error;
9241: gme_common_pvt.count_and_get (x_count => x_message_count
9242: ,p_encoded => fnd_api.g_false
9243: ,x_data => x_message_list);
9244: WHEN OTHERS THEN

Line 9242: ,p_encoded => fnd_api.g_false

9238: WHEN fnd_api.g_exc_error THEN
9239: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9240: x_return_status := fnd_api.g_ret_sts_error;
9241: gme_common_pvt.count_and_get (x_count => x_message_count
9242: ,p_encoded => fnd_api.g_false
9243: ,x_data => x_message_list);
9244: WHEN OTHERS THEN
9245: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9246: gme_when_others ( p_api_name => l_api_name

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

9273: PROCEDURE unrelease_batch
9274: (p_api_version IN NUMBER
9275: ,p_validation_level IN NUMBER
9276: := gme_common_pvt.g_max_errors
9277: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9278: ,p_commit IN VARCHAR2 := fnd_api.g_false
9279: ,x_message_count OUT NOCOPY NUMBER
9280: ,x_message_list OUT NOCOPY VARCHAR2
9281: ,x_return_status OUT NOCOPY VARCHAR2

Line 9278: ,p_commit IN VARCHAR2 := fnd_api.g_false

9274: (p_api_version IN NUMBER
9275: ,p_validation_level IN NUMBER
9276: := gme_common_pvt.g_max_errors
9277: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9278: ,p_commit IN VARCHAR2 := fnd_api.g_false
9279: ,x_message_count OUT NOCOPY NUMBER
9280: ,x_message_list OUT NOCOPY VARCHAR2
9281: ,x_return_status OUT NOCOPY VARCHAR2
9282: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 9304: x_return_status := fnd_api.g_ret_sts_success;

9300: || l_api_name);
9301: END IF;
9302:
9303: /* Set the return status to success initially */
9304: x_return_status := fnd_api.g_ret_sts_success;
9305:
9306: /* Set savepoint here */
9307: SAVEPOINT unrelease_batch;
9308:

Line 9309: IF p_init_msg_list = fnd_api.g_true THEN

9305:
9306: /* Set savepoint here */
9307: SAVEPOINT unrelease_batch;
9308:
9309: IF p_init_msg_list = fnd_api.g_true THEN
9310: fnd_msg_pub.initialize;
9311: END IF;
9312:
9313: IF NOT fnd_api.compatible_api_call (2.0

Line 9313: IF NOT fnd_api.compatible_api_call (2.0

9309: IF p_init_msg_list = fnd_api.g_true THEN
9310: fnd_msg_pub.initialize;
9311: END IF;
9312:
9313: IF NOT fnd_api.compatible_api_call (2.0
9314: ,p_api_version
9315: ,'unrelease_batch'
9316: ,g_pkg_name) THEN
9317: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 9318: RAISE fnd_api.g_exc_error;

9314: ,p_api_version
9315: ,'unrelease_batch'
9316: ,g_pkg_name) THEN
9317: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9318: RAISE fnd_api.g_exc_error;
9319: END IF;
9320:
9321:
9322: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;

Line 9332: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9328: ,x_message_count => x_message_count
9329: ,x_message_list => x_message_list
9330: ,x_return_status => x_return_status );
9331:
9332: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9333: IF (g_debug = gme_debug.g_log_statement) THEN
9334: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9335: || ': batch validate error ');
9336: END IF;

Line 9337: RAISE fnd_api.g_exc_error;

9333: IF (g_debug = gme_debug.g_log_statement) THEN
9334: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9335: || ': batch validate error ');
9336: END IF;
9337: RAISE fnd_api.g_exc_error;
9338: END IF;
9339:
9340:
9341: -- Validations

Line 9346: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9342: gme_unrelease_batch_pvt.validate_batch_for_unrelease
9343: (p_batch_hdr_rec => l_batch_header_rec
9344: ,x_return_status => x_return_status);
9345:
9346: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9347: RAISE fnd_api.g_exc_error;
9348: END IF;
9349:
9350: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 9347: RAISE fnd_api.g_exc_error;

9343: (p_batch_hdr_rec => l_batch_header_rec
9344: ,x_return_status => x_return_status);
9345:
9346: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9347: RAISE fnd_api.g_exc_error;
9348: END IF;
9349:
9350: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9351:

Line 9350: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

9346: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9347: RAISE fnd_api.g_exc_error;
9348: END IF;
9349:
9350: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9351:
9352: /* Invoke main */
9353: gme_api_main.unrelease_batch
9354: (p_validation_level => p_validation_level

Line 9355: ,p_init_msg_list => fnd_api.g_false

9351:
9352: /* Invoke main */
9353: gme_api_main.unrelease_batch
9354: (p_validation_level => p_validation_level
9355: ,p_init_msg_list => fnd_api.g_false
9356: ,x_message_count => x_message_count
9357: ,x_message_list => x_message_list
9358: ,x_return_status => x_return_status
9359: ,p_batch_header_rec => l_batch_header_rec

Line 9368: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9364: gme_debug.put_line ( g_pkg_name || '.' || l_api_name ||
9365: ' Return status from main.unrelease_batch is '|| x_return_status);
9366: END IF;
9367:
9368: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9369: RAISE error_unrelease_batch;
9370: END IF;
9371:
9372: /* Invoke save_batch */

Line 9385: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9381: ' Return status from gme_api_pub.save_batch is '
9382: || x_return_status);
9383: END IF;
9384:
9385: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9386: RAISE fnd_api.g_exc_error;
9387: END IF;
9388:
9389: IF g_debug <= gme_debug.g_log_procedure THEN

Line 9386: RAISE fnd_api.g_exc_error;

9382: || x_return_status);
9383: END IF;
9384:
9385: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9386: RAISE fnd_api.g_exc_error;
9387: END IF;
9388:
9389: IF g_debug <= gme_debug.g_log_procedure THEN
9390: gme_debug.put_line ( ' Completed ' || l_api_name || ' at '

Line 9399: ,p_encoded => fnd_api.g_false

9395: WHEN error_unrelease_batch THEN
9396: ROLLBACK TO SAVEPOINT unrelease_batch;
9397: x_batch_header_rec := NULL;
9398: gme_common_pvt.count_and_get (x_count => x_message_count
9399: ,p_encoded => fnd_api.g_false
9400: ,x_data => x_message_list);
9401: WHEN fnd_api.g_exc_error THEN
9402: ROLLBACK TO SAVEPOINT unrelease_batch;
9403: x_batch_header_rec := NULL;

Line 9401: WHEN fnd_api.g_exc_error THEN

9397: x_batch_header_rec := NULL;
9398: gme_common_pvt.count_and_get (x_count => x_message_count
9399: ,p_encoded => fnd_api.g_false
9400: ,x_data => x_message_list);
9401: WHEN fnd_api.g_exc_error THEN
9402: ROLLBACK TO SAVEPOINT unrelease_batch;
9403: x_batch_header_rec := NULL;
9404: x_return_status := fnd_api.g_ret_sts_error;
9405: gme_common_pvt.count_and_get (x_count => x_message_count

Line 9404: x_return_status := fnd_api.g_ret_sts_error;

9400: ,x_data => x_message_list);
9401: WHEN fnd_api.g_exc_error THEN
9402: ROLLBACK TO SAVEPOINT unrelease_batch;
9403: x_batch_header_rec := NULL;
9404: x_return_status := fnd_api.g_ret_sts_error;
9405: gme_common_pvt.count_and_get (x_count => x_message_count
9406: ,p_encoded => fnd_api.g_false
9407: ,x_data => x_message_list);
9408: WHEN OTHERS THEN

Line 9406: ,p_encoded => fnd_api.g_false

9402: ROLLBACK TO SAVEPOINT unrelease_batch;
9403: x_batch_header_rec := NULL;
9404: x_return_status := fnd_api.g_ret_sts_error;
9405: gme_common_pvt.count_and_get (x_count => x_message_count
9406: ,p_encoded => fnd_api.g_false
9407: ,x_data => x_message_list);
9408: WHEN OTHERS THEN
9409: ROLLBACK TO SAVEPOINT unrelease_batch;
9410: x_batch_header_rec := NULL;

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

9441: PROCEDURE unrelease_step
9442: (p_api_version IN NUMBER
9443: ,p_validation_level IN NUMBER
9444: := gme_common_pvt.g_max_errors
9445: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9446: ,p_commit IN VARCHAR2 := fnd_api.g_false
9447: ,x_message_count OUT NOCOPY NUMBER
9448: ,x_message_list OUT NOCOPY VARCHAR2
9449: ,x_return_status OUT NOCOPY VARCHAR2

Line 9446: ,p_commit IN VARCHAR2 := fnd_api.g_false

9442: (p_api_version IN NUMBER
9443: ,p_validation_level IN NUMBER
9444: := gme_common_pvt.g_max_errors
9445: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9446: ,p_commit IN VARCHAR2 := fnd_api.g_false
9447: ,x_message_count OUT NOCOPY NUMBER
9448: ,x_message_list OUT NOCOPY VARCHAR2
9449: ,x_return_status OUT NOCOPY VARCHAR2
9450: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE

Line 9475: x_return_status := fnd_api.g_ret_sts_success;

9471: || l_api_name);
9472: END IF;
9473:
9474: /* Set the return status to success initially */
9475: x_return_status := fnd_api.g_ret_sts_success;
9476:
9477: /* Set savepoint here */
9478: SAVEPOINT unrelease_step;
9479:

Line 9480: IF p_init_msg_list = fnd_api.g_true THEN

9476:
9477: /* Set savepoint here */
9478: SAVEPOINT unrelease_step;
9479:
9480: IF p_init_msg_list = fnd_api.g_true THEN
9481: fnd_msg_pub.initialize;
9482: END IF;
9483:
9484: IF NOT fnd_api.compatible_api_call (2.0

Line 9484: IF NOT fnd_api.compatible_api_call (2.0

9480: IF p_init_msg_list = fnd_api.g_true THEN
9481: fnd_msg_pub.initialize;
9482: END IF;
9483:
9484: IF NOT fnd_api.compatible_api_call (2.0
9485: ,p_api_version
9486: ,'unrelease_step'
9487: ,g_pkg_name) THEN
9488: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 9489: RAISE fnd_api.g_exc_error;

9485: ,p_api_version
9486: ,'unrelease_step'
9487: ,g_pkg_name) THEN
9488: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9489: RAISE fnd_api.g_exc_error;
9490: END IF;
9491:
9492: /* Validate Input parameters */
9493: gme_common_pvt.Validate_batch_step (

Line 9503: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9499: ,x_message_count => x_message_count
9500: ,x_message_list => x_message_list
9501: ,x_return_status => x_return_status) ;
9502:
9503: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9504: IF (g_debug = gme_debug.g_log_statement) THEN
9505: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9506: || ': batch step validate error ');
9507: END IF;

Line 9508: RAISE fnd_api.g_exc_error;

9504: IF (g_debug = gme_debug.g_log_statement) THEN
9505: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9506: || ': batch step validate error ');
9507: END IF;
9508: RAISE fnd_api.g_exc_error;
9509: END IF;
9510:
9511: -- Validations
9512: gme_unrelease_step_pvt.validate_step_for_unrelease

Line 9517: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9513: (p_batch_hdr_rec => l_batch_header_rec
9514: ,p_batch_step_rec => l_batch_step_rec
9515: ,x_return_status => x_return_status);
9516:
9517: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9518: RAISE fnd_api.g_exc_error;
9519: END IF;
9520:
9521: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 9518: RAISE fnd_api.g_exc_error;

9514: ,p_batch_step_rec => l_batch_step_rec
9515: ,x_return_status => x_return_status);
9516:
9517: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9518: RAISE fnd_api.g_exc_error;
9519: END IF;
9520:
9521: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9522:

Line 9521: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

9517: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9518: RAISE fnd_api.g_exc_error;
9519: END IF;
9520:
9521: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9522:
9523: /* Invoke main */
9524: gme_api_main.unrelease_step
9525: (p_validation_level => p_validation_level

Line 9526: ,p_init_msg_list => fnd_api.g_false

9522:
9523: /* Invoke main */
9524: gme_api_main.unrelease_step
9525: (p_validation_level => p_validation_level
9526: ,p_init_msg_list => fnd_api.g_false
9527: ,x_message_count => x_message_count
9528: ,x_message_list => x_message_list
9529: ,x_return_status => x_return_status
9530: ,p_batch_step_rec => l_batch_step_rec

Line 9544: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9540: || ' Return status from gme_api_main.unrelease_step is '
9541: || x_return_status);
9542: END IF;
9543:
9544: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9545: RAISE error_unrelease_step;
9546: END IF;
9547:
9548: /* Invoke save_batch */

Line 9573: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9569: || ' Return status from gme_api_pub.save_batch is '
9570: || x_return_status);
9571: END IF;
9572:
9573: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9574: RAISE fnd_api.g_exc_error;
9575: END IF;
9576:
9577: IF g_debug <= gme_debug.g_log_procedure THEN

Line 9574: RAISE fnd_api.g_exc_error;

9570: || x_return_status);
9571: END IF;
9572:
9573: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9574: RAISE fnd_api.g_exc_error;
9575: END IF;
9576:
9577: IF g_debug <= gme_debug.g_log_procedure THEN
9578: gme_debug.put_line ( ' Completed '

Line 9589: ,p_encoded => fnd_api.g_false

9585: WHEN error_unrelease_step THEN
9586: ROLLBACK TO SAVEPOINT unrelease_step;
9587: x_batch_step_rec := NULL;
9588: gme_common_pvt.count_and_get (x_count => x_message_count
9589: ,p_encoded => fnd_api.g_false
9590: ,x_data => x_message_list);
9591: WHEN fnd_api.g_exc_error THEN
9592: ROLLBACK TO SAVEPOINT unrelease_step;
9593: x_batch_step_rec := NULL;

Line 9591: WHEN fnd_api.g_exc_error THEN

9587: x_batch_step_rec := NULL;
9588: gme_common_pvt.count_and_get (x_count => x_message_count
9589: ,p_encoded => fnd_api.g_false
9590: ,x_data => x_message_list);
9591: WHEN fnd_api.g_exc_error THEN
9592: ROLLBACK TO SAVEPOINT unrelease_step;
9593: x_batch_step_rec := NULL;
9594: x_return_status := fnd_api.g_ret_sts_error;
9595: gme_common_pvt.count_and_get (x_count => x_message_count

Line 9594: x_return_status := fnd_api.g_ret_sts_error;

9590: ,x_data => x_message_list);
9591: WHEN fnd_api.g_exc_error THEN
9592: ROLLBACK TO SAVEPOINT unrelease_step;
9593: x_batch_step_rec := NULL;
9594: x_return_status := fnd_api.g_ret_sts_error;
9595: gme_common_pvt.count_and_get (x_count => x_message_count
9596: ,p_encoded => fnd_api.g_false
9597: ,x_data => x_message_list);
9598: WHEN OTHERS THEN

Line 9596: ,p_encoded => fnd_api.g_false

9592: ROLLBACK TO SAVEPOINT unrelease_step;
9593: x_batch_step_rec := NULL;
9594: x_return_status := fnd_api.g_ret_sts_error;
9595: gme_common_pvt.count_and_get (x_count => x_message_count
9596: ,p_encoded => fnd_api.g_false
9597: ,x_data => x_message_list);
9598: WHEN OTHERS THEN
9599: ROLLBACK TO SAVEPOINT unrelease_step;
9600: x_batch_step_rec := NULL;

Line 9621: p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;

9617: p_batch_header_rec (O) batch header to identify the batch to complete;
9618: p_org_code (O) organization code to identify the batch is conjunction with batch_no in p_batch_header_rec
9619: p_ignore_exception (O) indicates whether to ignore exceptions; if exceptions are ignored,
9620: x_exception_material_tbl won't be populated even if exceptions were found
9621: p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;
9622: this is used for direct completion only because of release batch
9623: x_batch_header_rec Output batch header record after complete
9624: x_exception_material_tbl Batch exceptions found in complete batch
9625: x_return_status outcome of the API call

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

9631: PROCEDURE complete_batch
9632: (p_api_version IN NUMBER
9633: ,p_validation_level IN NUMBER
9634: := gme_common_pvt.g_max_errors
9635: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9636: ,p_commit IN VARCHAR2 := fnd_api.g_false
9637: ,x_message_count OUT NOCOPY NUMBER
9638: ,x_message_list OUT NOCOPY VARCHAR2
9639: ,x_return_status OUT NOCOPY VARCHAR2

Line 9636: ,p_commit IN VARCHAR2 := fnd_api.g_false

9632: (p_api_version IN NUMBER
9633: ,p_validation_level IN NUMBER
9634: := gme_common_pvt.g_max_errors
9635: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9636: ,p_commit IN VARCHAR2 := fnd_api.g_false
9637: ,x_message_count OUT NOCOPY NUMBER
9638: ,x_message_list OUT NOCOPY VARCHAR2
9639: ,x_return_status OUT NOCOPY VARCHAR2
9640: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 9642: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false

9638: ,x_message_list OUT NOCOPY VARCHAR2
9639: ,x_return_status OUT NOCOPY VARCHAR2
9640: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
9641: ,p_org_code IN VARCHAR2
9642: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
9643: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
9644: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
9645: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
9646: IS

Line 9643: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

9639: ,x_return_status OUT NOCOPY VARCHAR2
9640: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
9641: ,p_org_code IN VARCHAR2
9642: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
9643: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
9644: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
9645: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
9646: IS
9647: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_BATCH';

Line 9665: x_return_status := fnd_api.g_ret_sts_success;

9661: || l_api_name);
9662: END IF;
9663:
9664: /* Set the return status to success initially */
9665: x_return_status := fnd_api.g_ret_sts_success;
9666:
9667: /* Set savepoint here */
9668: SAVEPOINT complete_batch;
9669:

Line 9670: IF p_init_msg_list = fnd_api.g_true THEN

9666:
9667: /* Set savepoint here */
9668: SAVEPOINT complete_batch;
9669:
9670: IF p_init_msg_list = fnd_api.g_true THEN
9671: fnd_msg_pub.initialize;
9672: END IF;
9673:
9674: IF NOT fnd_api.compatible_api_call (2.0

Line 9674: IF NOT fnd_api.compatible_api_call (2.0

9670: IF p_init_msg_list = fnd_api.g_true THEN
9671: fnd_msg_pub.initialize;
9672: END IF;
9673:
9674: IF NOT fnd_api.compatible_api_call (2.0
9675: ,p_api_version
9676: ,'complete_batch'
9677: ,g_pkg_name) THEN
9678: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 9679: RAISE fnd_api.g_exc_error;

9675: ,p_api_version
9676: ,'complete_batch'
9677: ,g_pkg_name) THEN
9678: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9679: RAISE fnd_api.g_exc_error;
9680: END IF;
9681:
9682:
9683: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;

Line 9693: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9689: ,x_message_count => x_message_count
9690: ,x_message_list => x_message_list
9691: ,x_return_status => x_return_status );
9692:
9693: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9694: IF (g_debug = gme_debug.g_log_statement) THEN
9695: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9696: || ': batch validate error ');
9697: END IF;

Line 9698: RAISE fnd_api.g_exc_error;

9694: IF (g_debug = gme_debug.g_log_statement) THEN
9695: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9696: || ': batch validate error ');
9697: END IF;
9698: RAISE fnd_api.g_exc_error;
9699: END IF;
9700:
9701: -- Validations
9702: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN

Line 9703: IF p_validate_flexfields = fnd_api.g_true THEN

9699: END IF;
9700:
9701: -- Validations
9702: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
9703: IF p_validate_flexfields = fnd_api.g_true THEN
9704: gme_common_pvt.g_flex_validate_prof := 1;
9705: ELSE
9706: gme_common_pvt.g_flex_validate_prof := 0;
9707: END IF;

Line 9714: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9710: l_in_batch_header_rec.actual_start_date := p_batch_header_rec.actual_start_date;
9711: -- call release batch validation... output batch header will have actual start date filled in
9712: NULL;
9713:
9714: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9715: RAISE fnd_api.g_exc_error;
9716: END IF;
9717:
9718: -- reset flex global

Line 9715: RAISE fnd_api.g_exc_error;

9711: -- call release batch validation... output batch header will have actual start date filled in
9712: NULL;
9713:
9714: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9715: RAISE fnd_api.g_exc_error;
9716: END IF;
9717:
9718: -- reset flex global
9719: gme_common_pvt.g_flex_validate_prof := 0;

Line 9733: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9729: (p_batch_header_rec => l_in_batch_header_rec
9730: ,x_batch_header_rec => l_batch_header_rec
9731: ,x_return_status => x_return_status);
9732:
9733: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9734: RAISE fnd_api.g_exc_error;
9735: END IF;
9736:
9737: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 9734: RAISE fnd_api.g_exc_error;

9730: ,x_batch_header_rec => l_batch_header_rec
9731: ,x_return_status => x_return_status);
9732:
9733: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9734: RAISE fnd_api.g_exc_error;
9735: END IF;
9736:
9737: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9738:

Line 9737: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

9733: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9734: RAISE fnd_api.g_exc_error;
9735: END IF;
9736:
9737: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9738:
9739: /* Invoke main */
9740: gme_api_main.complete_batch
9741: (p_validation_level => p_validation_level

Line 9742: ,p_init_msg_list => fnd_api.g_false

9738:
9739: /* Invoke main */
9740: gme_api_main.complete_batch
9741: (p_validation_level => p_validation_level
9742: ,p_init_msg_list => fnd_api.g_false
9743: ,x_message_count => x_message_count
9744: ,x_message_list => x_message_list
9745: ,x_return_status => x_return_status
9746: ,p_batch_header_rec => l_batch_header_rec

Line 9760: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

9756: || ' Return status from gme_api_main.complete_batch is '
9757: || x_return_status);
9758: END IF;
9759:
9760: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
9761: x_return_status := fnd_api.g_ret_sts_success;
9762: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
9763: x_exception_material_tbl := l_exception_material_tbl;
9764: END IF;

Line 9761: x_return_status := fnd_api.g_ret_sts_success;

9757: || x_return_status);
9758: END IF;
9759:
9760: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
9761: x_return_status := fnd_api.g_ret_sts_success;
9762: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
9763: x_exception_material_tbl := l_exception_material_tbl;
9764: END IF;
9765:

Line 9766: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9762: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
9763: x_exception_material_tbl := l_exception_material_tbl;
9764: END IF;
9765:
9766: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9767: RAISE error_complete_batch;
9768: END IF;
9769:
9770: /* Invoke save_batch */

Line 9795: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9791: || ' Return status from gme_api_pub.save_batch is '
9792: || x_return_status);
9793: END IF;
9794:
9795: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9796: RAISE fnd_api.g_exc_error;
9797: END IF;
9798:
9799: IF g_debug <= gme_debug.g_log_procedure THEN

Line 9796: RAISE fnd_api.g_exc_error;

9792: || x_return_status);
9793: END IF;
9794:
9795: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9796: RAISE fnd_api.g_exc_error;
9797: END IF;
9798:
9799: IF g_debug <= gme_debug.g_log_procedure THEN
9800: gme_debug.put_line ( ' Completed '

Line 9811: ,p_encoded => fnd_api.g_false

9807: WHEN error_complete_batch THEN
9808: ROLLBACK TO SAVEPOINT complete_batch;
9809: x_batch_header_rec := NULL;
9810: gme_common_pvt.count_and_get (x_count => x_message_count
9811: ,p_encoded => fnd_api.g_false
9812: ,x_data => x_message_list);
9813: WHEN fnd_api.g_exc_error THEN
9814: ROLLBACK TO SAVEPOINT complete_batch;
9815: x_batch_header_rec := NULL;

Line 9813: WHEN fnd_api.g_exc_error THEN

9809: x_batch_header_rec := NULL;
9810: gme_common_pvt.count_and_get (x_count => x_message_count
9811: ,p_encoded => fnd_api.g_false
9812: ,x_data => x_message_list);
9813: WHEN fnd_api.g_exc_error THEN
9814: ROLLBACK TO SAVEPOINT complete_batch;
9815: x_batch_header_rec := NULL;
9816: x_return_status := fnd_api.g_ret_sts_error;
9817: gme_common_pvt.count_and_get (x_count => x_message_count

Line 9816: x_return_status := fnd_api.g_ret_sts_error;

9812: ,x_data => x_message_list);
9813: WHEN fnd_api.g_exc_error THEN
9814: ROLLBACK TO SAVEPOINT complete_batch;
9815: x_batch_header_rec := NULL;
9816: x_return_status := fnd_api.g_ret_sts_error;
9817: gme_common_pvt.count_and_get (x_count => x_message_count
9818: ,p_encoded => fnd_api.g_false
9819: ,x_data => x_message_list);
9820: WHEN OTHERS THEN

Line 9818: ,p_encoded => fnd_api.g_false

9814: ROLLBACK TO SAVEPOINT complete_batch;
9815: x_batch_header_rec := NULL;
9816: x_return_status := fnd_api.g_ret_sts_error;
9817: gme_common_pvt.count_and_get (x_count => x_message_count
9818: ,p_encoded => fnd_api.g_false
9819: ,x_data => x_message_list);
9820: WHEN OTHERS THEN
9821: ROLLBACK TO SAVEPOINT complete_batch;
9822: gme_when_others ( p_api_name => l_api_name

Line 9844: p_override_quality (O) Override quality indicator; defaults to fnd_api.g_false

9840: p_batch_no (O) batch_no to identify the step
9841: p_org_code (O) organization code to identify the step is conjunction with batch_no in p_batch_header_rec
9842: p_ignore_exception (O) indicates whether to ignore exceptions; if exceptions are ignored,
9843: x_exception_material_tbl won't be populated ever if exceptions were found
9844: p_override_quality (O) Override quality indicator; defaults to fnd_api.g_false
9845: p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;
9846: this is used for direct step completion (pending_batch) only, because of release batch
9847: x_batch_step_rec Output batch step record after complete
9848: x_exception_material_tbl Material exceptions found in complete step (only those associated to step)

Line 9845: p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;

9841: p_org_code (O) organization code to identify the step is conjunction with batch_no in p_batch_header_rec
9842: p_ignore_exception (O) indicates whether to ignore exceptions; if exceptions are ignored,
9843: x_exception_material_tbl won't be populated ever if exceptions were found
9844: p_override_quality (O) Override quality indicator; defaults to fnd_api.g_false
9845: p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;
9846: this is used for direct step completion (pending_batch) only, because of release batch
9847: x_batch_step_rec Output batch step record after complete
9848: x_exception_material_tbl Material exceptions found in complete step (only those associated to step)
9849: x_return_status outcome of the API call

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

9855: PROCEDURE complete_step
9856: (p_api_version IN NUMBER
9857: ,p_validation_level IN NUMBER
9858: := gme_common_pvt.g_max_errors
9859: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9860: ,p_commit IN VARCHAR2 := fnd_api.g_false
9861: ,x_message_count OUT NOCOPY NUMBER
9862: ,x_message_list OUT NOCOPY VARCHAR2
9863: ,x_return_status OUT NOCOPY VARCHAR2

Line 9860: ,p_commit IN VARCHAR2 := fnd_api.g_false

9856: (p_api_version IN NUMBER
9857: ,p_validation_level IN NUMBER
9858: := gme_common_pvt.g_max_errors
9859: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9860: ,p_commit IN VARCHAR2 := fnd_api.g_false
9861: ,x_message_count OUT NOCOPY NUMBER
9862: ,x_message_list OUT NOCOPY VARCHAR2
9863: ,x_return_status OUT NOCOPY VARCHAR2
9864: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE

Line 9867: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false

9863: ,x_return_status OUT NOCOPY VARCHAR2
9864: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
9865: ,p_batch_no IN VARCHAR2
9866: ,p_org_code IN VARCHAR2
9867: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
9868: ,p_override_quality IN VARCHAR2 := fnd_api.g_false
9869: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
9870: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
9871: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

Line 9868: ,p_override_quality IN VARCHAR2 := fnd_api.g_false

9864: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
9865: ,p_batch_no IN VARCHAR2
9866: ,p_org_code IN VARCHAR2
9867: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
9868: ,p_override_quality IN VARCHAR2 := fnd_api.g_false
9869: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
9870: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
9871: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
9872: IS

Line 9869: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

9865: ,p_batch_no IN VARCHAR2
9866: ,p_org_code IN VARCHAR2
9867: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
9868: ,p_override_quality IN VARCHAR2 := fnd_api.g_false
9869: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
9870: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
9871: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
9872: IS
9873: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_STEP';

Line 9895: x_return_status := fnd_api.g_ret_sts_success;

9891: || l_api_name);
9892: END IF;
9893:
9894: /* Set the return status to success initially */
9895: x_return_status := fnd_api.g_ret_sts_success;
9896:
9897: /* Set savepoint here */
9898: SAVEPOINT complete_step;
9899:

Line 9900: IF p_init_msg_list = fnd_api.g_true THEN

9896:
9897: /* Set savepoint here */
9898: SAVEPOINT complete_step;
9899:
9900: IF p_init_msg_list = fnd_api.g_true THEN
9901: fnd_msg_pub.initialize;
9902: END IF;
9903:
9904: IF NOT fnd_api.compatible_api_call (2.0

Line 9904: IF NOT fnd_api.compatible_api_call (2.0

9900: IF p_init_msg_list = fnd_api.g_true THEN
9901: fnd_msg_pub.initialize;
9902: END IF;
9903:
9904: IF NOT fnd_api.compatible_api_call (2.0
9905: ,p_api_version
9906: ,'complete_step'
9907: ,g_pkg_name) THEN
9908: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 9909: RAISE fnd_api.g_exc_error;

9905: ,p_api_version
9906: ,'complete_step'
9907: ,g_pkg_name) THEN
9908: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9909: RAISE fnd_api.g_exc_error;
9910: END IF;
9911:
9912: /* Validate Input parameters */
9913: gme_common_pvt.Validate_batch_step (

Line 9923: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9919: ,x_message_count => x_message_count
9920: ,x_message_list => x_message_list
9921: ,x_return_status => x_return_status) ;
9922:
9923: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9924: IF (g_debug = gme_debug.g_log_statement) THEN
9925: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9926: || ': batch step validate error ');
9927: END IF;

Line 9928: RAISE fnd_api.g_exc_error;

9924: IF (g_debug = gme_debug.g_log_statement) THEN
9925: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
9926: || ': batch step validate error ');
9927: END IF;
9928: RAISE fnd_api.g_exc_error;
9929: END IF;
9930: -- Validations
9931:
9932: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

Line 9934: RAISE fnd_api.g_exc_error;

9930: -- Validations
9931:
9932: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
9933: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
9934: RAISE fnd_api.g_exc_error;
9935: END IF;
9936:
9937: -- current Step Status must be Pending or WIP
9938: IF (l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_WIP)) THEN

Line 9940: RAISE fnd_api.g_exc_error;

9936:
9937: -- current Step Status must be Pending or WIP
9938: IF (l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_WIP)) THEN
9939: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_CERT');
9940: RAISE fnd_api.g_exc_error;
9941: END IF;
9942:
9943: IF l_batch_header_rec.batch_status NOT IN
9944: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN

Line 9946: RAISE fnd_api.g_exc_error;

9942:
9943: IF l_batch_header_rec.batch_status NOT IN
9944: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
9945: gme_common_pvt.log_message ('GME_API_INV_BATCH_CERT_STEP');
9946: RAISE fnd_api.g_exc_error;
9947: END IF;
9948:
9949: --Bug#5109119 checking for parameter value 1 instead of Y
9950: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND

Line 9954: RAISE fnd_api.g_exc_error;

9950: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
9951: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
9952: l_batch_header_rec.parentline_id IS NOT NULL) THEN
9953: gme_common_pvt.log_message ('GME_API_INV_BATCH_CMPL_STEP');
9954: RAISE fnd_api.g_exc_error;
9955: END IF;
9956:
9957: l_in_batch_step_rec := l_batch_step_rec;
9958: l_in_batch_step_rec.actual_cmplt_date := p_batch_step_rec.actual_cmplt_date;

Line 9967: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9963: ,p_override_quality => p_override_quality
9964: ,x_batch_step_rec => l_batch_step_rec
9965: ,x_return_status => x_return_status);
9966:
9967: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9968: RAISE fnd_api.g_exc_error;
9969: END IF;
9970:
9971: IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN

Line 9968: RAISE fnd_api.g_exc_error;

9964: ,x_batch_step_rec => l_batch_step_rec
9965: ,x_return_status => x_return_status);
9966:
9967: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9968: RAISE fnd_api.g_exc_error;
9969: END IF;
9970:
9971: IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN
9972: -- call release step validation; use step actual cmplt date

Line 9983: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

9979: ,p_batch_header_rec => l_batch_header_rec
9980: ,x_batch_start_date => l_calc_batch_start_date
9981: ,x_return_status => x_return_status);
9982:
9983: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9984: RAISE fnd_api.g_exc_error;
9985: END IF;
9986:
9987: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)

Line 9984: RAISE fnd_api.g_exc_error;

9980: ,x_batch_start_date => l_calc_batch_start_date
9981: ,x_return_status => x_return_status);
9982:
9983: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
9984: RAISE fnd_api.g_exc_error;
9985: END IF;
9986:
9987: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
9988: IF p_validate_flexfields = fnd_api.g_true THEN

Line 9988: IF p_validate_flexfields = fnd_api.g_true THEN

9984: RAISE fnd_api.g_exc_error;
9985: END IF;
9986:
9987: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
9988: IF p_validate_flexfields = fnd_api.g_true THEN
9989: gme_common_pvt.g_flex_validate_prof := 1;
9990: ELSE
9991: gme_common_pvt.g_flex_validate_prof := 0;
9992: END IF;

Line 10000: IF x_return_status <> fnd_api.g_ret_sts_success THEN

9996: l_in_batch_header_rec.actual_start_date := l_calc_batch_start_date;
9997: -- call release batch validation...
9998: NULL;
9999:
10000: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10001: RAISE fnd_api.g_exc_error;
10002: END IF;
10003: END IF;
10004:

Line 10001: RAISE fnd_api.g_exc_error;

9997: -- call release batch validation...
9998: NULL;
9999:
10000: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10001: RAISE fnd_api.g_exc_error;
10002: END IF;
10003: END IF;
10004:
10005: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 10005: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

10001: RAISE fnd_api.g_exc_error;
10002: END IF;
10003: END IF;
10004:
10005: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10006:
10007: /* Invoke main */
10008: gme_api_main.complete_step
10009: (p_validation_level => p_validation_level

Line 10010: ,p_init_msg_list => fnd_api.g_false

10006:
10007: /* Invoke main */
10008: gme_api_main.complete_step
10009: (p_validation_level => p_validation_level
10010: ,p_init_msg_list => fnd_api.g_false
10011: ,x_message_count => x_message_count
10012: ,x_message_list => x_message_list
10013: ,x_return_status => x_return_status
10014: ,p_batch_step_rec => l_batch_step_rec

Line 10029: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

10025: || ' Return status from gme_api_main.complete_step is '
10026: || x_return_status);
10027: END IF;
10028:
10029: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10030: x_return_status := fnd_api.g_ret_sts_success;
10031: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10032: x_exception_material_tbl := l_exception_material_tbl;
10033: END IF;

Line 10030: x_return_status := fnd_api.g_ret_sts_success;

10026: || x_return_status);
10027: END IF;
10028:
10029: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10030: x_return_status := fnd_api.g_ret_sts_success;
10031: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10032: x_exception_material_tbl := l_exception_material_tbl;
10033: END IF;
10034:

Line 10035: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10031: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10032: x_exception_material_tbl := l_exception_material_tbl;
10033: END IF;
10034:
10035: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10036: RAISE error_complete_step;
10037: END IF;
10038: -- reset flex global
10039: gme_common_pvt.g_flex_validate_prof := 0;

Line 10057: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10053: || ' Return status from gme_api_pub.save_batch is '
10054: || x_return_status);
10055: END IF;
10056:
10057: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10058: RAISE fnd_api.g_exc_error;
10059: END IF;
10060:
10061: IF g_debug <= gme_debug.g_log_procedure THEN

Line 10058: RAISE fnd_api.g_exc_error;

10054: || x_return_status);
10055: END IF;
10056:
10057: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10058: RAISE fnd_api.g_exc_error;
10059: END IF;
10060:
10061: IF g_debug <= gme_debug.g_log_procedure THEN
10062: gme_debug.put_line ( ' Completed '

Line 10072: ,p_encoded => fnd_api.g_false

10068: WHEN error_complete_step THEN
10069: ROLLBACK TO SAVEPOINT complete_step;
10070: x_batch_step_rec := NULL;
10071: gme_common_pvt.count_and_get (x_count => x_message_count
10072: ,p_encoded => fnd_api.g_false
10073: ,x_data => x_message_list);
10074: WHEN fnd_api.g_exc_error THEN
10075: ROLLBACK TO SAVEPOINT complete_step;
10076: x_batch_step_rec := NULL;

Line 10074: WHEN fnd_api.g_exc_error THEN

10070: x_batch_step_rec := NULL;
10071: gme_common_pvt.count_and_get (x_count => x_message_count
10072: ,p_encoded => fnd_api.g_false
10073: ,x_data => x_message_list);
10074: WHEN fnd_api.g_exc_error THEN
10075: ROLLBACK TO SAVEPOINT complete_step;
10076: x_batch_step_rec := NULL;
10077: x_return_status := fnd_api.g_ret_sts_error;
10078: gme_common_pvt.count_and_get (x_count => x_message_count

Line 10077: x_return_status := fnd_api.g_ret_sts_error;

10073: ,x_data => x_message_list);
10074: WHEN fnd_api.g_exc_error THEN
10075: ROLLBACK TO SAVEPOINT complete_step;
10076: x_batch_step_rec := NULL;
10077: x_return_status := fnd_api.g_ret_sts_error;
10078: gme_common_pvt.count_and_get (x_count => x_message_count
10079: ,p_encoded => fnd_api.g_false
10080: ,x_data => x_message_list);
10081: WHEN OTHERS THEN

Line 10079: ,p_encoded => fnd_api.g_false

10075: ROLLBACK TO SAVEPOINT complete_step;
10076: x_batch_step_rec := NULL;
10077: x_return_status := fnd_api.g_ret_sts_error;
10078: gme_common_pvt.count_and_get (x_count => x_message_count
10079: ,p_encoded => fnd_api.g_false
10080: ,x_data => x_message_list);
10081: WHEN OTHERS THEN
10082: ROLLBACK TO SAVEPOINT complete_step;
10083: x_batch_step_rec := NULL;

Line 10104: p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;

10100: p_batch_header_rec (O) batch header to identify the batch to release;
10101: p_org_code (O) organization code to identify the batch is conjunction with batch_no in p_batch_header_rec
10102: p_ignore_exception (O) indicates whether to ignore exceptions; if exceptions are ignored,
10103: x_exception_material_tbl won't be populated even if exceptions were found
10104: p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;
10105: x_batch_header_rec Output batch header record after release
10106: x_exception_material_tbl Batch exceptions found in release batch
10107: x_return_status outcome of the API call
10108: S - Success

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

10113: PROCEDURE release_batch
10114: (p_api_version IN NUMBER
10115: ,p_validation_level IN NUMBER
10116: := gme_common_pvt.g_max_errors
10117: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10118: ,p_commit IN VARCHAR2 := fnd_api.g_false
10119: ,x_message_count OUT NOCOPY NUMBER
10120: ,x_message_list OUT NOCOPY VARCHAR2
10121: ,x_return_status OUT NOCOPY VARCHAR2

Line 10118: ,p_commit IN VARCHAR2 := fnd_api.g_false

10114: (p_api_version IN NUMBER
10115: ,p_validation_level IN NUMBER
10116: := gme_common_pvt.g_max_errors
10117: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10118: ,p_commit IN VARCHAR2 := fnd_api.g_false
10119: ,x_message_count OUT NOCOPY NUMBER
10120: ,x_message_list OUT NOCOPY VARCHAR2
10121: ,x_return_status OUT NOCOPY VARCHAR2
10122: ,p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 10124: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false

10120: ,x_message_list OUT NOCOPY VARCHAR2
10121: ,x_return_status OUT NOCOPY VARCHAR2
10122: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
10123: ,p_org_code IN VARCHAR2
10124: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10125: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10126: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
10127: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10128: IS

Line 10125: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

10121: ,x_return_status OUT NOCOPY VARCHAR2
10122: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
10123: ,p_org_code IN VARCHAR2
10124: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10125: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10126: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
10127: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10128: IS
10129: l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_BATCH';

Line 10147: x_return_status := fnd_api.g_ret_sts_success;

10143: || l_api_name);
10144: END IF;
10145:
10146: /* Set the return status to success initially */
10147: x_return_status := fnd_api.g_ret_sts_success;
10148:
10149: /* Set savepoint here */
10150: SAVEPOINT release_batch;
10151:

Line 10152: IF p_init_msg_list = fnd_api.g_true THEN

10148:
10149: /* Set savepoint here */
10150: SAVEPOINT release_batch;
10151:
10152: IF p_init_msg_list = fnd_api.g_true THEN
10153: fnd_msg_pub.initialize;
10154: END IF;
10155:
10156: IF NOT fnd_api.compatible_api_call (2.0

Line 10156: IF NOT fnd_api.compatible_api_call (2.0

10152: IF p_init_msg_list = fnd_api.g_true THEN
10153: fnd_msg_pub.initialize;
10154: END IF;
10155:
10156: IF NOT fnd_api.compatible_api_call (2.0
10157: ,p_api_version
10158: ,'release_batch'
10159: ,g_pkg_name) THEN
10160: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 10161: RAISE fnd_api.g_exc_error;

10157: ,p_api_version
10158: ,'release_batch'
10159: ,g_pkg_name) THEN
10160: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10161: RAISE fnd_api.g_exc_error;
10162: END IF;
10163:
10164: gme_common_pvt.validate_batch
10165: (p_batch_header_rec => p_batch_header_rec

Line 10173: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10169: ,x_message_count => x_message_count
10170: ,x_message_list => x_message_list
10171: ,x_return_status => x_return_status );
10172:
10173: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10174: IF (g_debug = gme_debug.g_log_statement) THEN
10175: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
10176: || ': batch validate error ');
10177: END IF;

Line 10178: RAISE fnd_api.g_exc_error;

10174: IF (g_debug = gme_debug.g_log_statement) THEN
10175: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
10176: || ': batch validate error ');
10177: END IF;
10178: RAISE fnd_api.g_exc_error;
10179: END IF;
10180: -- Validations
10181: IF p_validate_flexfields = fnd_api.g_true THEN
10182: gme_common_pvt.g_flex_validate_prof := 1;

Line 10181: IF p_validate_flexfields = fnd_api.g_true THEN

10177: END IF;
10178: RAISE fnd_api.g_exc_error;
10179: END IF;
10180: -- Validations
10181: IF p_validate_flexfields = fnd_api.g_true THEN
10182: gme_common_pvt.g_flex_validate_prof := 1;
10183: ELSE
10184: gme_common_pvt.g_flex_validate_prof := 0;
10185: END IF;

Line 10196: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10192: p_batch_header_rec => l_in_batch_header_rec
10193: ,x_batch_header_rec => l_batch_header_rec
10194: ,x_return_status => x_return_status);
10195:
10196: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10197: RAISE fnd_api.g_exc_error;
10198: END IF;
10199:
10200: -- reset flex global

Line 10197: RAISE fnd_api.g_exc_error;

10193: ,x_batch_header_rec => l_batch_header_rec
10194: ,x_return_status => x_return_status);
10195:
10196: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10197: RAISE fnd_api.g_exc_error;
10198: END IF;
10199:
10200: -- reset flex global
10201: gme_common_pvt.g_flex_validate_prof := 0;

Line 10203: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

10199:
10200: -- reset flex global
10201: gme_common_pvt.g_flex_validate_prof := 0;
10202:
10203: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10204: IF g_debug <= gme_debug.g_log_statement THEN
10205: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
10206: || 'batch_id '||l_batch_header_rec.batch_id);
10207: END IF;

Line 10211: ,p_init_msg_list => fnd_api.g_false

10207: END IF;
10208: /* Invoke main */
10209: gme_api_main.release_batch
10210: (p_validation_level => p_validation_level
10211: ,p_init_msg_list => fnd_api.g_false
10212: ,x_message_count => x_message_count
10213: ,x_message_list => x_message_list
10214: ,x_return_status => x_return_status
10215: ,p_batch_header_rec => l_batch_header_rec

Line 10226: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

10222: ' Return status from gme_api_main.release_batch is '
10223: || x_return_status);
10224: END IF;
10225:
10226: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10227: x_return_status := fnd_api.g_ret_sts_success;
10228: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10229: x_exception_material_tbl := l_exception_material_tbl;
10230: END IF;

Line 10227: x_return_status := fnd_api.g_ret_sts_success;

10223: || x_return_status);
10224: END IF;
10225:
10226: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10227: x_return_status := fnd_api.g_ret_sts_success;
10228: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10229: x_exception_material_tbl := l_exception_material_tbl;
10230: END IF;
10231:

Line 10232: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10228: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10229: x_exception_material_tbl := l_exception_material_tbl;
10230: END IF;
10231:
10232: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10233: RAISE error_release_batch;
10234: END IF;
10235:
10236: /* Invoke save_batch */

Line 10253: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10249: gme_debug.put_line ( g_pkg_name || '.' || l_api_name ||
10250: ' Return status from gme_api_pub.save_batch is ' || x_return_status);
10251: END IF;
10252:
10253: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10254: RAISE fnd_api.g_exc_error;
10255: END IF;
10256:
10257: IF g_debug <= gme_debug.g_log_procedure THEN

Line 10254: RAISE fnd_api.g_exc_error;

10250: ' Return status from gme_api_pub.save_batch is ' || x_return_status);
10251: END IF;
10252:
10253: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10254: RAISE fnd_api.g_exc_error;
10255: END IF;
10256:
10257: IF g_debug <= gme_debug.g_log_procedure THEN
10258: gme_debug.put_line ( ' Completed ' || l_api_name || ' at '

Line 10266: ,p_encoded => fnd_api.g_false

10262: WHEN error_release_batch THEN
10263: ROLLBACK TO SAVEPOINT release_batch;
10264: x_batch_header_rec := NULL;
10265: gme_common_pvt.count_and_get (x_count => x_message_count
10266: ,p_encoded => fnd_api.g_false
10267: ,x_data => x_message_list);
10268: WHEN fnd_api.g_exc_error THEN
10269: ROLLBACK TO SAVEPOINT release_batch;
10270: x_batch_header_rec := NULL;

Line 10268: WHEN fnd_api.g_exc_error THEN

10264: x_batch_header_rec := NULL;
10265: gme_common_pvt.count_and_get (x_count => x_message_count
10266: ,p_encoded => fnd_api.g_false
10267: ,x_data => x_message_list);
10268: WHEN fnd_api.g_exc_error THEN
10269: ROLLBACK TO SAVEPOINT release_batch;
10270: x_batch_header_rec := NULL;
10271: x_return_status := fnd_api.g_ret_sts_error;
10272: gme_common_pvt.count_and_get (x_count => x_message_count

Line 10271: x_return_status := fnd_api.g_ret_sts_error;

10267: ,x_data => x_message_list);
10268: WHEN fnd_api.g_exc_error THEN
10269: ROLLBACK TO SAVEPOINT release_batch;
10270: x_batch_header_rec := NULL;
10271: x_return_status := fnd_api.g_ret_sts_error;
10272: gme_common_pvt.count_and_get (x_count => x_message_count
10273: ,p_encoded => fnd_api.g_false
10274: ,x_data => x_message_list);
10275: WHEN OTHERS THEN

Line 10273: ,p_encoded => fnd_api.g_false

10269: ROLLBACK TO SAVEPOINT release_batch;
10270: x_batch_header_rec := NULL;
10271: x_return_status := fnd_api.g_ret_sts_error;
10272: gme_common_pvt.count_and_get (x_count => x_message_count
10273: ,p_encoded => fnd_api.g_false
10274: ,x_data => x_message_list);
10275: WHEN OTHERS THEN
10276: ROLLBACK TO SAVEPOINT release_batch;
10277: x_batch_header_rec := NULL;

Line 10300: p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;

10296: p_batch_no (O) batch_no to identify the step
10297: p_org_code (O) organization code to identify the step is conjunction with batch_no in p_batch_header_rec
10298: p_ignore_exception (O) indicates whether to ignore exceptions; if exceptions are ignored,
10299: x_exception_material_tbl won't be populated ever if exceptions were found
10300: p_validate_flexfields (O) indicates whether to validate flexfields... Defaults to fnd_api.g_false;
10301: x_batch_step_rec Output batch step record after release
10302: x_exception_material_tbl Material exceptions found in release step (only those associated to step and processed dep steps)
10303: x_return_status outcome of the API call
10304: S - Success

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

10309: PROCEDURE release_step
10310: (p_api_version IN NUMBER
10311: ,p_validation_level IN NUMBER
10312: := gme_common_pvt.g_max_errors
10313: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10314: ,p_commit IN VARCHAR2 := fnd_api.g_false
10315: ,x_message_count OUT NOCOPY NUMBER
10316: ,x_message_list OUT NOCOPY VARCHAR2
10317: ,x_return_status OUT NOCOPY VARCHAR2

Line 10314: ,p_commit IN VARCHAR2 := fnd_api.g_false

10310: (p_api_version IN NUMBER
10311: ,p_validation_level IN NUMBER
10312: := gme_common_pvt.g_max_errors
10313: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10314: ,p_commit IN VARCHAR2 := fnd_api.g_false
10315: ,x_message_count OUT NOCOPY NUMBER
10316: ,x_message_list OUT NOCOPY VARCHAR2
10317: ,x_return_status OUT NOCOPY VARCHAR2
10318: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE

Line 10321: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false

10317: ,x_return_status OUT NOCOPY VARCHAR2
10318: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
10319: ,p_batch_no IN VARCHAR2
10320: ,p_org_code IN VARCHAR2
10321: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10322: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10323: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
10324: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10325: IS

Line 10322: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

10318: ,p_batch_step_rec IN gme_batch_steps%ROWTYPE
10319: ,p_batch_no IN VARCHAR2
10320: ,p_org_code IN VARCHAR2
10321: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10322: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10323: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
10324: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10325: IS
10326: l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_STEP';

Line 10347: x_return_status := fnd_api.g_ret_sts_success;

10343: || l_api_name);
10344: END IF;
10345:
10346: /* Set the return status to success initially */
10347: x_return_status := fnd_api.g_ret_sts_success;
10348:
10349: /* Set savepoint here */
10350: SAVEPOINT release_step;
10351:

Line 10352: IF p_init_msg_list = fnd_api.g_true THEN

10348:
10349: /* Set savepoint here */
10350: SAVEPOINT release_step;
10351:
10352: IF p_init_msg_list = fnd_api.g_true THEN
10353: fnd_msg_pub.initialize;
10354: END IF;
10355:
10356: IF NOT fnd_api.compatible_api_call (2.0

Line 10356: IF NOT fnd_api.compatible_api_call (2.0

10352: IF p_init_msg_list = fnd_api.g_true THEN
10353: fnd_msg_pub.initialize;
10354: END IF;
10355:
10356: IF NOT fnd_api.compatible_api_call (2.0
10357: ,p_api_version
10358: ,'release_step'
10359: ,g_pkg_name) THEN
10360: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 10361: RAISE fnd_api.g_exc_error;

10357: ,p_api_version
10358: ,'release_step'
10359: ,g_pkg_name) THEN
10360: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10361: RAISE fnd_api.g_exc_error;
10362: END IF;
10363: /* Validate Input parameters */
10364: gme_common_pvt.Validate_batch_step (
10365: p_batch_step_rec => p_batch_step_rec

Line 10374: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10370: ,x_message_count => x_message_count
10371: ,x_message_list => x_message_list
10372: ,x_return_status => x_return_status );
10373:
10374: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10375: IF (g_debug = gme_debug.g_log_statement) THEN
10376: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
10377: || ': batch step validate error ');
10378: END IF;

Line 10379: RAISE fnd_api.g_exc_error;

10375: IF (g_debug = gme_debug.g_log_statement) THEN
10376: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
10377: || ': batch step validate error ');
10378: END IF;
10379: RAISE fnd_api.g_exc_error;
10380: END IF;
10381: -- Validations
10382: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
10383: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');

Line 10384: RAISE fnd_api.g_exc_error;

10380: END IF;
10381: -- Validations
10382: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
10383: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
10384: RAISE fnd_api.g_exc_error;
10385: END IF;
10386: -- current Step Status must be Pending
10387: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN
10388: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_REL');

Line 10389: RAISE fnd_api.g_exc_error;

10385: END IF;
10386: -- current Step Status must be Pending
10387: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN
10388: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_REL');
10389: RAISE fnd_api.g_exc_error;
10390: END IF;
10391:
10392: IF l_batch_header_rec.batch_status NOT IN
10393: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN

Line 10395: RAISE fnd_api.g_exc_error;

10391:
10392: IF l_batch_header_rec.batch_status NOT IN
10393: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
10394: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
10395: RAISE fnd_api.g_exc_error;
10396: END IF;
10397:
10398: --Pawan kumar changed to number for g_step_controls_batch_sts
10399: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND

Line 10403: RAISE fnd_api.g_exc_error;

10399: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
10400: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
10401: l_batch_header_rec.parentline_id IS NOT NULL) THEN
10402: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
10403: RAISE fnd_api.g_exc_error;
10404: END IF;
10405:
10406: l_in_batch_step_rec := l_batch_step_rec;
10407: l_in_batch_step_rec.actual_start_date := p_batch_step_rec.actual_start_date;

Line 10415: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10411: ,p_batch_step_rec => l_in_batch_step_rec
10412: ,x_batch_step_rec => l_batch_step_rec
10413: ,x_return_status => x_return_status);
10414:
10415: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10416: RAISE fnd_api.g_exc_error;
10417: END IF;
10418:
10419: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)

Line 10416: RAISE fnd_api.g_exc_error;

10412: ,x_batch_step_rec => l_batch_step_rec
10413: ,x_return_status => x_return_status);
10414:
10415: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10416: RAISE fnd_api.g_exc_error;
10417: END IF;
10418:
10419: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
10420: IF p_validate_flexfields = fnd_api.g_true THEN

Line 10420: IF p_validate_flexfields = fnd_api.g_true THEN

10416: RAISE fnd_api.g_exc_error;
10417: END IF;
10418:
10419: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
10420: IF p_validate_flexfields = fnd_api.g_true THEN
10421: gme_common_pvt.g_flex_validate_prof := 1;
10422: ELSE
10423: gme_common_pvt.g_flex_validate_prof := 0;
10424: END IF;

Line 10436: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10432: (p_batch_header_rec => l_in_batch_header_rec
10433: ,x_batch_header_rec => l_batch_header_rec
10434: ,x_return_status => x_return_status);
10435:
10436: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10437: RAISE fnd_api.g_exc_error;
10438: END IF;
10439: END IF;
10440:

Line 10437: RAISE fnd_api.g_exc_error;

10433: ,x_batch_header_rec => l_batch_header_rec
10434: ,x_return_status => x_return_status);
10435:
10436: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10437: RAISE fnd_api.g_exc_error;
10438: END IF;
10439: END IF;
10440:
10441: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 10441: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

10437: RAISE fnd_api.g_exc_error;
10438: END IF;
10439: END IF;
10440:
10441: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10442:
10443: /* Invoke main */
10444: gme_api_main.release_step
10445: (p_validation_level => p_validation_level

Line 10446: ,p_init_msg_list => fnd_api.g_false

10442:
10443: /* Invoke main */
10444: gme_api_main.release_step
10445: (p_validation_level => p_validation_level
10446: ,p_init_msg_list => fnd_api.g_false
10447: ,x_message_count => x_message_count
10448: ,x_message_list => x_message_list
10449: ,x_return_status => x_return_status
10450: ,p_batch_step_rec => l_batch_step_rec

Line 10464: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

10460:
10461: -- reset flex global
10462: gme_common_pvt.g_flex_validate_prof := 0;
10463:
10464: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10465: x_return_status := fnd_api.g_ret_sts_success;
10466: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10467: x_exception_material_tbl := l_exception_material_tbl;
10468: END IF;

Line 10465: x_return_status := fnd_api.g_ret_sts_success;

10461: -- reset flex global
10462: gme_common_pvt.g_flex_validate_prof := 0;
10463:
10464: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10465: x_return_status := fnd_api.g_ret_sts_success;
10466: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10467: x_exception_material_tbl := l_exception_material_tbl;
10468: END IF;
10469:

Line 10470: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10466: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10467: x_exception_material_tbl := l_exception_material_tbl;
10468: END IF;
10469:
10470: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10471: RAISE error_release_step;
10472: END IF;
10473:
10474: /* Invoke save_batch */

Line 10491: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10487: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ' Return
10488: status from gme_api_pub.save_batch is ' || x_return_status);
10489: END IF;
10490:
10491: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10492: RAISE fnd_api.g_exc_error;
10493: END IF;
10494:
10495: IF g_debug <= gme_debug.g_log_procedure THEN

Line 10492: RAISE fnd_api.g_exc_error;

10488: status from gme_api_pub.save_batch is ' || x_return_status);
10489: END IF;
10490:
10491: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10492: RAISE fnd_api.g_exc_error;
10493: END IF;
10494:
10495: IF g_debug <= gme_debug.g_log_procedure THEN
10496: gme_debug.put_line ( ' Completed ' || l_api_name || ' at '

Line 10505: ,p_encoded => fnd_api.g_false

10501: WHEN error_release_step THEN
10502: ROLLBACK TO SAVEPOINT release_step;
10503: x_batch_step_rec := NULL;
10504: gme_common_pvt.count_and_get (x_count => x_message_count
10505: ,p_encoded => fnd_api.g_false
10506: ,x_data => x_message_list);
10507: WHEN fnd_api.g_exc_error THEN
10508: ROLLBACK TO SAVEPOINT release_step;
10509: x_batch_step_rec := NULL;

Line 10507: WHEN fnd_api.g_exc_error THEN

10503: x_batch_step_rec := NULL;
10504: gme_common_pvt.count_and_get (x_count => x_message_count
10505: ,p_encoded => fnd_api.g_false
10506: ,x_data => x_message_list);
10507: WHEN fnd_api.g_exc_error THEN
10508: ROLLBACK TO SAVEPOINT release_step;
10509: x_batch_step_rec := NULL;
10510: x_return_status := fnd_api.g_ret_sts_error;
10511: gme_common_pvt.count_and_get (x_count => x_message_count

Line 10510: x_return_status := fnd_api.g_ret_sts_error;

10506: ,x_data => x_message_list);
10507: WHEN fnd_api.g_exc_error THEN
10508: ROLLBACK TO SAVEPOINT release_step;
10509: x_batch_step_rec := NULL;
10510: x_return_status := fnd_api.g_ret_sts_error;
10511: gme_common_pvt.count_and_get (x_count => x_message_count
10512: ,p_encoded => fnd_api.g_false
10513: ,x_data => x_message_list);
10514: WHEN OTHERS THEN

Line 10512: ,p_encoded => fnd_api.g_false

10508: ROLLBACK TO SAVEPOINT release_step;
10509: x_batch_step_rec := NULL;
10510: x_return_status := fnd_api.g_ret_sts_error;
10511: gme_common_pvt.count_and_get (x_count => x_message_count
10512: ,p_encoded => fnd_api.g_false
10513: ,x_data => x_message_list);
10514: WHEN OTHERS THEN
10515: ROLLBACK TO SAVEPOINT release_step;
10516: x_batch_step_rec := NULL;

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

10545: PROCEDURE process_group
10546: (p_api_version IN NUMBER
10547: ,p_validation_level IN NUMBER
10548: := gme_common_pvt.g_max_errors
10549: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10550: ,p_commit IN VARCHAR2 := fnd_api.g_false
10551: ,p_group_name IN VARCHAR2
10552: ,p_org_code IN VARCHAR2
10553: ,p_action IN NUMBER

Line 10550: ,p_commit IN VARCHAR2 := fnd_api.g_false

10546: (p_api_version IN NUMBER
10547: ,p_validation_level IN NUMBER
10548: := gme_common_pvt.g_max_errors
10549: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10550: ,p_commit IN VARCHAR2 := fnd_api.g_false
10551: ,p_group_name IN VARCHAR2
10552: ,p_org_code IN VARCHAR2
10553: ,p_action IN NUMBER
10554: ,p_on_error_flag IN VARCHAR2

Line 10615: x_return_status := fnd_api.g_ret_sts_success;

10611: || l_api_name);
10612: END IF;
10613:
10614: /* Set the return status to success initially */
10615: x_return_status := fnd_api.g_ret_sts_success;
10616:
10617: /* Set savepoint here */
10618: /* SAVEPOINT process_group; */
10619:

Line 10620: IF p_init_msg_list = fnd_api.g_true THEN

10616:
10617: /* Set savepoint here */
10618: /* SAVEPOINT process_group; */
10619:
10620: IF p_init_msg_list = fnd_api.g_true THEN
10621: fnd_msg_pub.initialize;
10622: END IF;
10623:
10624: IF NOT fnd_api.compatible_api_call (2.0

Line 10624: IF NOT fnd_api.compatible_api_call (2.0

10620: IF p_init_msg_list = fnd_api.g_true THEN
10621: fnd_msg_pub.initialize;
10622: END IF;
10623:
10624: IF NOT fnd_api.compatible_api_call (2.0
10625: ,p_api_version
10626: ,'process_group'
10627: ,g_pkg_name) THEN
10628: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

Line 10629: RAISE fnd_api.g_exc_error;

10625: ,p_api_version
10626: ,'process_group'
10627: ,g_pkg_name) THEN
10628: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10629: RAISE fnd_api.g_exc_error;
10630: END IF;
10631:
10632: /* Validate Input parameters */
10633:

Line 10638: RAISE fnd_api.g_exc_error;

10634:
10635: IF (p_org_code IS NULL) THEN
10636: fnd_message.set_name ('INV', 'INV_ORG_REQUIRED');
10637: fnd_msg_pub.ADD;
10638: RAISE fnd_api.g_exc_error;
10639: END IF;
10640:
10641: IF (p_group_name IS NULL) THEN
10642: fnd_message.set_name ('GME', 'GME_GROUP_REQUIRED');

Line 10644: RAISE fnd_api.g_exc_error;

10640:
10641: IF (p_group_name IS NULL) THEN
10642: fnd_message.set_name ('GME', 'GME_GROUP_REQUIRED');
10643: fnd_msg_pub.ADD;
10644: RAISE fnd_api.g_exc_error;
10645: END IF;
10646:
10647: IF (p_action IS NULL) THEN
10648: fnd_message.set_name ('GME', 'GME_ACTION_REQUIRED');

Line 10650: RAISE fnd_api.g_exc_error;

10646:
10647: IF (p_action IS NULL) THEN
10648: fnd_message.set_name ('GME', 'GME_ACTION_REQUIRED');
10649: fnd_msg_pub.ADD;
10650: RAISE fnd_api.g_exc_error;
10651: END IF;
10652:
10653: IF (p_on_error_flag IS NULL) THEN
10654: fnd_message.set_name ('GME', 'GME_ERR_FLAG_REQUIRED');

Line 10656: RAISE fnd_api.g_exc_error;

10652:
10653: IF (p_on_error_flag IS NULL) THEN
10654: fnd_message.set_name ('GME', 'GME_ERR_FLAG_REQUIRED');
10655: fnd_msg_pub.ADD;
10656: RAISE fnd_api.g_exc_error;
10657: END IF;
10658:
10659: OPEN get_organization (p_org_code);
10660:

Line 10666: RAISE fnd_api.g_exc_error;

10662:
10663: IF get_organization%NOTFOUND THEN
10664: CLOSE get_organization;
10665: gme_common_pvt.log_message ('GME_INVALID_ORG');
10666: RAISE fnd_api.g_exc_error;
10667: END IF;
10668:
10669: CLOSE get_organization;
10670:

Line 10678: RAISE fnd_api.g_exc_error;

10674:
10675: IF get_group_id%NOTFOUND THEN
10676: CLOSE get_group_id;
10677: gme_common_pvt.log_message ('GME_INVALID_GROUP');
10678: RAISE fnd_api.g_exc_error;
10679: END IF;
10680:
10681: CLOSE get_group_id;
10682:

Line 10689: RAISE fnd_api.g_exc_error;

10685:
10686: IF validate_lookup_code%NOTFOUND THEN
10687: CLOSE validate_lookup_code;
10688: gme_common_pvt.log_message ('GME_INVALID_GROUP_ACTION');
10689: RAISE fnd_api.g_exc_error;
10690: END IF;
10691:
10692: CLOSE validate_lookup_code;
10693:

Line 10696: RAISE fnd_api.g_exc_error;

10692: CLOSE validate_lookup_code;
10693:
10694: IF (p_on_error_flag <> 'STOP' AND p_on_error_flag <> 'CONTINUE') THEN
10695: gme_common_pvt.log_message ('GME_INVALID_ERR_FLAG');
10696: RAISE fnd_api.g_exc_error;
10697: END IF;
10698:
10699: i := 0;
10700: FOR get_rec IN get_associated_batches(l_group_id) LOOP

Line 10833: IF x_return_status <> fnd_api.g_ret_sts_success THEN

10829: );
10830: END IF;
10831:
10832: -- DBMS_OUTPUT.put_line ('return status is = ' || x_return_status);
10833: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10834: failed_count := failed_count + 1;
10835: gme_common_pvt.count_and_get (x_count => x_message_count
10836: ,p_encoded => fnd_api.g_false
10837: ,x_data => x_message_list);

Line 10836: ,p_encoded => fnd_api.g_false

10832: -- DBMS_OUTPUT.put_line ('return status is = ' || x_return_status);
10833: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10834: failed_count := failed_count + 1;
10835: gme_common_pvt.count_and_get (x_count => x_message_count
10836: ,p_encoded => fnd_api.g_false
10837: ,x_data => x_message_list);
10838: -- DBMS_OUTPUT.put_line('Error ' || x_message_list);
10839: IF (p_on_error_flag = 'STOP') THEN
10840: RAISE error_process_group;

Line 10850: ,p_encoded => fnd_api.g_false

10846: EXCEPTION
10847: WHEN OTHERS THEN
10848: failed_count := failed_count + 1;
10849: gme_common_pvt.count_and_get (x_count => x_message_count
10850: ,p_encoded => fnd_api.g_false
10851: ,x_data => x_message_list);
10852: -- DBMS_OUTPUT.put_line('Error ' || x_message_list);
10853: IF (p_on_error_flag = 'STOP') THEN
10854: RAISE error_process_group;

Line 10861: RAISE fnd_api.g_exc_error;

10857: END LOOP;
10858:
10859: IF i=0 THEN
10860: gme_common_pvt.log_message ('GME_NO_GROUP_ASSOC');
10861: RAISE fnd_api.g_exc_error;
10862: ELSE
10863: -- DBMS_OUTPUT.put_line('Total ' || i);
10864: -- DBMS_OUTPUT.put_line('Success ' || success_count);
10865: -- DBMS_OUTPUT.put_line('Failed ' || failed_count);

Line 10891: ,p_encoded => fnd_api.g_false

10887: EXCEPTION
10888:
10889: WHEN error_process_group THEN
10890: gme_common_pvt.count_and_get (x_count => x_message_count
10891: ,p_encoded => fnd_api.g_false
10892: ,x_data => x_message_list);
10893: WHEN fnd_api.g_exc_error THEN
10894: x_return_status := fnd_api.g_ret_sts_error;
10895: gme_common_pvt.count_and_get (x_count => x_message_count

Line 10893: WHEN fnd_api.g_exc_error THEN

10889: WHEN error_process_group THEN
10890: gme_common_pvt.count_and_get (x_count => x_message_count
10891: ,p_encoded => fnd_api.g_false
10892: ,x_data => x_message_list);
10893: WHEN fnd_api.g_exc_error THEN
10894: x_return_status := fnd_api.g_ret_sts_error;
10895: gme_common_pvt.count_and_get (x_count => x_message_count
10896: ,p_encoded => fnd_api.g_false
10897: ,x_data => x_message_list);

Line 10894: x_return_status := fnd_api.g_ret_sts_error;

10890: gme_common_pvt.count_and_get (x_count => x_message_count
10891: ,p_encoded => fnd_api.g_false
10892: ,x_data => x_message_list);
10893: WHEN fnd_api.g_exc_error THEN
10894: x_return_status := fnd_api.g_ret_sts_error;
10895: gme_common_pvt.count_and_get (x_count => x_message_count
10896: ,p_encoded => fnd_api.g_false
10897: ,x_data => x_message_list);
10898: WHEN OTHERS THEN

Line 10896: ,p_encoded => fnd_api.g_false

10892: ,x_data => x_message_list);
10893: WHEN fnd_api.g_exc_error THEN
10894: x_return_status := fnd_api.g_ret_sts_error;
10895: gme_common_pvt.count_and_get (x_count => x_message_count
10896: ,p_encoded => fnd_api.g_false
10897: ,x_data => x_message_list);
10898: WHEN OTHERS THEN
10899: gme_when_others ( p_api_name => l_api_name
10900: ,x_message_count => x_message_count