DBA Data[Home] [Help]

APPS.WIP_SO_RESERVATIONS dependencies on FND_API

Line 68: p_init_msg_lst => fnd_api.g_false,

64: l_reservation_rec.lpn_id:= null ; /* Fix for Bug#4575108 */
65:
66: inv_reservation_pub.query_reservation(
67: p_api_version_number => 1.0,
68: p_init_msg_lst => fnd_api.g_false,
69: x_return_status => l_return_status,
70: x_msg_count => l_msg_count,
71: x_msg_data => l_msg_data,
72: p_query_input => l_reservation_rec,

Line 73: p_lock_records => fnd_api.g_true,

69: x_return_status => l_return_status,
70: x_msg_count => l_msg_count,
71: x_msg_data => l_msg_data,
72: p_query_input => l_reservation_rec,
73: p_lock_records => fnd_api.g_true,
74: p_sort_by_req_date => inv_reservation_global.g_query_req_date_asc,
75: x_mtl_reservation_tbl => l_reservation_tbl,
76: x_mtl_reservation_tbl_count => l_rsv_tbl_count,
77: x_error_code => l_error_code);

Line 79: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

75: x_mtl_reservation_tbl => l_reservation_tbl,
76: x_mtl_reservation_tbl_count => l_rsv_tbl_count,
77: x_error_code => l_error_code);
78:
79: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
80: x_msg_count := l_msg_count;
81: x_msg_data := l_msg_data;
82: x_return_status := l_return_status;
83: RAISE g_need_to_rollback_exception;

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

105: x_return_status => l_return_status,
106: x_transaction_tbl => l_transaction_tbl);
107: END IF;
108:
109: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
110: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
111: RAISE fnd_api.g_exc_error;
112: ELSE
113: RAISE fnd_api.g_exc_unexpected_error;

Line 110: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

106: x_transaction_tbl => l_transaction_tbl);
107: END IF;
108:
109: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
110: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
111: RAISE fnd_api.g_exc_error;
112: ELSE
113: RAISE fnd_api.g_exc_unexpected_error;
114: END IF;

Line 111: RAISE fnd_api.g_exc_error;

107: END IF;
108:
109: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
110: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
111: RAISE fnd_api.g_exc_error;
112: ELSE
113: RAISE fnd_api.g_exc_unexpected_error;
114: END IF;
115: END IF;

Line 113: RAISE fnd_api.g_exc_unexpected_error;

109: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
110: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
111: RAISE fnd_api.g_exc_error;
112: ELSE
113: RAISE fnd_api.g_exc_unexpected_error;
114: END IF;
115: END IF;
116:
117: mmtt_count := l_transaction_tbl.COUNT;

Line 135: RAISE fnd_api.g_exc_error;

131: IF (l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT
132: AND l_transaction_tbl(i).lot_number IS NULL) THEN
133: fnd_message.set_name('WIP', 'WIP_NO_LOT_NUMBER');
134: fnd_msg_pub.add;
135: RAISE fnd_api.g_exc_error;
136: END IF;
137:
138: IF (l_transaction_tbl(i).primary_quantity IS NULL
139: OR l_transaction_tbl(i).transaction_quantity IS NULL) THEN

Line 142: RAISE fnd_api.g_exc_error;

138: IF (l_transaction_tbl(i).primary_quantity IS NULL
139: OR l_transaction_tbl(i).transaction_quantity IS NULL) THEN
140: fnd_message.set_name('WIP', 'WIP_ZERO_TRANSACTION_QUANTITY');
141: fnd_msg_pub.add;
142: RAISE fnd_api.g_exc_error;
143: END IF;
144:
145: -- Sales order specified in the form line
146: IF (l_transaction_tbl(i).demand_source_header_id IS NOT NULL) THEN

Line 157: IF (l_return_status = fnd_api.g_ret_sts_success) THEN

153: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
154: x_return_status => l_return_status,
155: x_query_reservation => l_query_reservation);
156:
157: IF (l_return_status = fnd_api.g_ret_sts_success) THEN
158: IF (l_reservation_found) THEN
159: IF (l_query_reservation = 'Y') THEN
160: inv_reservation_pub.query_reservation(
161: p_api_version_number => 1.0,

Line 162: p_init_msg_lst => fnd_api.g_false,

158: IF (l_reservation_found) THEN
159: IF (l_query_reservation = 'Y') THEN
160: inv_reservation_pub.query_reservation(
161: p_api_version_number => 1.0,
162: p_init_msg_lst => fnd_api.g_false,
163: x_return_status => l_return_status,
164: x_msg_count => l_msg_count,
165: x_msg_data => l_msg_data,
166: p_query_input => l_reservation_rec,

Line 167: p_lock_records => fnd_api.g_true,

163: x_return_status => l_return_status,
164: x_msg_count => l_msg_count,
165: x_msg_data => l_msg_data,
166: p_query_input => l_reservation_rec,
167: p_lock_records => fnd_api.g_true,
168: p_sort_by_req_date => inv_reservation_global.g_query_req_date_asc,
169: x_mtl_reservation_tbl => l_reservation_tbl,
170: x_mtl_reservation_tbl_count => l_rsv_tbl_count,
171: x_error_code => l_error_code);

Line 173: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

169: x_mtl_reservation_tbl => l_reservation_tbl,
170: x_mtl_reservation_tbl_count => l_rsv_tbl_count,
171: x_error_code => l_error_code);
172:
173: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
174: x_msg_count := l_msg_count;
175: x_msg_data := l_msg_data;
176: x_return_status := l_return_status;
177: RAISE g_need_to_rollback_exception;

Line 184: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN

180: END IF;
181: END IF;
182: EXIT;
183: END IF;
184: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
185: RAISE fnd_api.g_exc_error;
186: ELSE
187: RAISE fnd_api.g_exc_unexpected_error;
188: END IF;

Line 185: RAISE fnd_api.g_exc_error;

181: END IF;
182: EXIT;
183: END IF;
184: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
185: RAISE fnd_api.g_exc_error;
186: ELSE
187: RAISE fnd_api.g_exc_unexpected_error;
188: END IF;
189: END LOOP; -- l_rsv_tbl_count

Line 187: RAISE fnd_api.g_exc_unexpected_error;

183: END IF;
184: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
185: RAISE fnd_api.g_exc_error;
186: ELSE
187: RAISE fnd_api.g_exc_unexpected_error;
188: END IF;
189: END LOOP; -- l_rsv_tbl_count
190:
191: IF(l_reservation_found) THEN

Line 208: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

204: INV_LOT_API_PUB.InsertLot(
205: p_api_version => 1.0,
206: p_init_msg_list => 'F',
207: p_commit => 'F',
208: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
209: p_inventory_item_id => l_transaction_tbl(i).inventory_item_id,
210: p_organization_id => l_transaction_tbl(i).organization_id,
211: p_lot_number => l_transaction_tbl(i).lot_number,
212: p_expiration_date => l_transaction_tbl(i).lot_expiration_date,

Line 221: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN

217: x_return_status => l_return_status,
218: x_msg_count => l_msg_count,
219: x_msg_data => l_msg_data );
220:
221: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
222: x_msg_count := l_msg_count;
223: x_msg_data := l_msg_data;
224: x_return_status := l_return_status;
225: RAISE g_need_to_rollback_exception;

Line 236: IF (l_return_status = fnd_api.g_ret_sts_success) THEN

232: p_reservation_rec => l_reservation_tbl(l_reservation_index),
233: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
234: x_return_status => l_return_status);
235:
236: IF (l_return_status = fnd_api.g_ret_sts_success) THEN
237: -- we have already validated that txn line primary quantity
238: -- is less than or equal to reservation quantity
239: l_reservation_tbl(l_reservation_index).primary_reservation_quantity :=
240: l_reservation_tbl(l_reservation_index).primary_reservation_quantity -

Line 243: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN

239: l_reservation_tbl(l_reservation_index).primary_reservation_quantity :=
240: l_reservation_tbl(l_reservation_index).primary_reservation_quantity -
241: l_transaction_tbl(i).primary_quantity;
242: l_transaction_tbl(i).primary_quantity := 0;
243: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
244: RAISE fnd_api.g_exc_error;
245: ELSE
246: RAISE fnd_api.g_exc_unexpected_error;
247: END IF;

Line 244: RAISE fnd_api.g_exc_error;

240: l_reservation_tbl(l_reservation_index).primary_reservation_quantity -
241: l_transaction_tbl(i).primary_quantity;
242: l_transaction_tbl(i).primary_quantity := 0;
243: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
244: RAISE fnd_api.g_exc_error;
245: ELSE
246: RAISE fnd_api.g_exc_unexpected_error;
247: END IF;
248:

Line 246: RAISE fnd_api.g_exc_unexpected_error;

242: l_transaction_tbl(i).primary_quantity := 0;
243: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
244: RAISE fnd_api.g_exc_error;
245: ELSE
246: RAISE fnd_api.g_exc_unexpected_error;
247: END IF;
248:
249: -- form line has sales order specified, but not found in
250: -- mtl_reservations

Line 256: RAISE fnd_api.g_exc_error;

252: /* ER 4163405: Replacing message WIP_SALES_ORDER_INCONSISTENCY with
253: the new message WIP_NO_SUPPLY_RESERVATIONS */
254: fnd_message.set_name('WIP', 'WIP_NO_SUPPLY_RESERVATIONS');
255: fnd_msg_pub.add;
256: RAISE fnd_api.g_exc_error;
257: END IF; -- reservation found for this completion
258: ELSE -- demand source not specified
259: WHILE (l_transaction_tbl(i).primary_quantity > 0) LOOP
260: FOR j in 1 .. l_rsv_tbl_count LOOP

Line 270: IF(l_return_status = fnd_api.g_ret_sts_success) THEN

266: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
267: x_return_status => l_return_status,
268: x_query_reservation => l_query_reservation);
269:
270: IF(l_return_status = fnd_api.g_ret_sts_success) THEN
271: IF(l_reservation_found) THEN
272: EXIT;
273: END IF;
274: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN

Line 274: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN

270: IF(l_return_status = fnd_api.g_ret_sts_success) THEN
271: IF(l_reservation_found) THEN
272: EXIT;
273: END IF;
274: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
275: RAISE fnd_api.g_exc_error;
276: ELSE
277: RAISE fnd_api.g_exc_unexpected_error;
278: END IF;

Line 275: RAISE fnd_api.g_exc_error;

271: IF(l_reservation_found) THEN
272: EXIT;
273: END IF;
274: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
275: RAISE fnd_api.g_exc_error;
276: ELSE
277: RAISE fnd_api.g_exc_unexpected_error;
278: END IF;
279: END LOOP; -- for each line in reservation

Line 277: RAISE fnd_api.g_exc_unexpected_error;

273: END IF;
274: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
275: RAISE fnd_api.g_exc_error;
276: ELSE
277: RAISE fnd_api.g_exc_unexpected_error;
278: END IF;
279: END LOOP; -- for each line in reservation
280:
281: IF(l_reservation_found) THEN

Line 303: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

299: INV_LOT_API_PUB.InsertLot(
300: p_api_version => 1.0,
301: p_init_msg_list => 'F',
302: p_commit => 'F',
303: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
304: p_inventory_item_id => l_transaction_tbl(i).inventory_item_id,
305: p_organization_id => l_transaction_tbl(i).organization_id,
306: p_lot_number => l_transaction_tbl(i).lot_number,
307: p_expiration_date => l_transaction_tbl(i).lot_expiration_date,

Line 316: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN

312: x_return_status => l_return_status,
313: x_msg_count => l_msg_count,
314: x_msg_data => l_msg_data );
315:
316: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
317: x_msg_count := l_msg_count;
318: x_msg_data := l_msg_data;
319: x_return_status := l_return_status;
320: RAISE g_need_to_rollback_exception;

Line 332: IF(l_return_status = fnd_api.g_ret_sts_success) THEN

328: p_reservation_rec => l_reservation_tbl(l_reservation_index),
329: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
330: x_return_status => l_return_status);
331:
332: IF(l_return_status = fnd_api.g_ret_sts_success) THEN
333: IF(l_transaction_tbl(i).primary_quantity <
334: l_reservation_tbl(l_reservation_index).primary_reservation_quantity) THEN
335: l_reservation_tbl(l_reservation_index).primary_reservation_quantity :=
336: l_reservation_tbl(l_reservation_index).primary_reservation_quantity -

Line 345: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN

341: l_transaction_tbl(i).primary_quantity -
342: l_reservation_tbl(l_reservation_index).primary_reservation_quantity;
343: l_reservation_tbl(l_reservation_index).primary_reservation_quantity := 0;
344: END IF;
345: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
346: RAISE fnd_api.g_exc_error;
347: ELSE
348: RAISE fnd_api.g_exc_unexpected_error;
349: END IF;

Line 346: RAISE fnd_api.g_exc_error;

342: l_reservation_tbl(l_reservation_index).primary_reservation_quantity;
343: l_reservation_tbl(l_reservation_index).primary_reservation_quantity := 0;
344: END IF;
345: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
346: RAISE fnd_api.g_exc_error;
347: ELSE
348: RAISE fnd_api.g_exc_unexpected_error;
349: END IF;
350: ELSE -- no reservation found

Line 348: RAISE fnd_api.g_exc_unexpected_error;

344: END IF;
345: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
346: RAISE fnd_api.g_exc_error;
347: ELSE
348: RAISE fnd_api.g_exc_unexpected_error;
349: END IF;
350: ELSE -- no reservation found
351: EXIT; -- there is no reservation matching this form line.
352: -- proceed to the next line.

Line 357: x_return_status := fnd_api.g_ret_sts_success;

353: END IF; -- reservation found for this completion?
354: END LOOP; -- while this completion line still has quantity
355: END IF; -- demand source specified in completion form line?
356: END LOOP; -- loop through each completion form line
357: x_return_status := fnd_api.g_ret_sts_success;
358:
359: EXCEPTION
360: WHEN g_need_to_rollback_exception THEN
361: ROLLBACK TO SAVEPOINT allocate_completion_to_so_0;

Line 363: WHEN fnd_api.g_exc_error THEN

359: EXCEPTION
360: WHEN g_need_to_rollback_exception THEN
361: ROLLBACK TO SAVEPOINT allocate_completion_to_so_0;
362:
363: WHEN fnd_api.g_exc_error THEN
364: x_return_status := fnd_api.g_ret_sts_error;
365:
366: fnd_msg_pub.count_and_get(
367: p_encoded => fnd_api.g_false,

Line 364: x_return_status := fnd_api.g_ret_sts_error;

360: WHEN g_need_to_rollback_exception THEN
361: ROLLBACK TO SAVEPOINT allocate_completion_to_so_0;
362:
363: WHEN fnd_api.g_exc_error THEN
364: x_return_status := fnd_api.g_ret_sts_error;
365:
366: fnd_msg_pub.count_and_get(
367: p_encoded => fnd_api.g_false,
368: p_count => x_msg_count,

Line 367: p_encoded => fnd_api.g_false,

363: WHEN fnd_api.g_exc_error THEN
364: x_return_status := fnd_api.g_ret_sts_error;
365:
366: fnd_msg_pub.count_and_get(
367: p_encoded => fnd_api.g_false,
368: p_count => x_msg_count,
369: p_data => x_msg_data);
370:
371: ROLLBACK TO SAVEPOINT allocate_completion_to_so_0;

Line 373: WHEN fnd_api.g_exc_unexpected_error THEN

369: p_data => x_msg_data);
370:
371: ROLLBACK TO SAVEPOINT allocate_completion_to_so_0;
372:
373: WHEN fnd_api.g_exc_unexpected_error THEN
374: x_return_status := fnd_api.g_ret_sts_unexp_error;
375:
376: fnd_msg_pub.count_and_get(
377: p_encoded => fnd_api.g_false,

Line 374: x_return_status := fnd_api.g_ret_sts_unexp_error;

370:
371: ROLLBACK TO SAVEPOINT allocate_completion_to_so_0;
372:
373: WHEN fnd_api.g_exc_unexpected_error THEN
374: x_return_status := fnd_api.g_ret_sts_unexp_error;
375:
376: fnd_msg_pub.count_and_get(
377: p_encoded => fnd_api.g_false,
378: p_count => x_msg_count,

Line 377: p_encoded => fnd_api.g_false,

373: WHEN fnd_api.g_exc_unexpected_error THEN
374: x_return_status := fnd_api.g_ret_sts_unexp_error;
375:
376: fnd_msg_pub.count_and_get(
377: p_encoded => fnd_api.g_false,
378: p_count => x_msg_count,
379: p_data => x_msg_data);
380:
381: ROLLBACK TO SAVEPOINT allocate_completion_to_so_0;

Line 384: x_return_status := fnd_api.g_ret_sts_unexp_error;

380:
381: ROLLBACK TO SAVEPOINT allocate_completion_to_so_0;
382:
383: WHEN OTHERS THEN
384: x_return_status := fnd_api.g_ret_sts_unexp_error;
385: IF(fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)) THEN
386: fnd_msg_pub.add_exc_msg (
387: g_package_name,
388: l_routine_name);

Line 392: p_encoded => fnd_api.g_false,

388: l_routine_name);
389: END IF;
390:
391: fnd_msg_pub.count_and_get(
392: p_encoded => fnd_api.g_false,
393: p_count => x_msg_count,
394: p_data => x_msg_data);
395:
396: ROLLBACK TO SAVEPOINT allocate_completion_to_so_0;

Line 482: x_return_status := fnd_api.g_ret_sts_success;

478: from wip_entities we
479: where we.wip_entity_id = p_wip_entity_id ;
480:
481: if l_wip_entity_type = WIP_CONSTANTS.EAM then
482: x_return_status := fnd_api.g_ret_sts_success;
483: return ;
484: end if ;
485:
486: -------------------

Line 499: p_init_msg_lst => fnd_api.g_false,

495: -- tell API to lock rows in mtl_reservations.
496: -- records are returned based on requirement date ascending.
497: inv_reservation_pub.query_reservation(
498: p_api_version_number => 1.0,
499: p_init_msg_lst => fnd_api.g_false,
500: x_return_status => l_return_status,
501: x_msg_count => l_msg_count,
502: x_msg_data => l_msg_data,
503: p_query_input => l_reservation_rec,

Line 504: p_lock_records => fnd_api.g_true,

500: x_return_status => l_return_status,
501: x_msg_count => l_msg_count,
502: x_msg_data => l_msg_data,
503: p_query_input => l_reservation_rec,
504: p_lock_records => fnd_api.g_true,
505: p_sort_by_req_date => inv_reservation_global.g_query_req_date_asc,
506: x_mtl_reservation_tbl => l_reservation_tbl,
507: x_mtl_reservation_tbl_count => l_rsv_tbl_count,
508: x_error_code => l_error_code);

Line 510: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN

506: x_mtl_reservation_tbl => l_reservation_tbl,
507: x_mtl_reservation_tbl_count => l_rsv_tbl_count,
508: x_error_code => l_error_code);
509:
510: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
511: x_msg_count := l_msg_count;
512: x_msg_data := l_msg_data;
513: x_return_status := l_return_status;
514: RETURN;

Line 527: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN

523: p_txn_temp_id => p_txn_temp_id,
524: x_return_status => l_return_status,
525: x_transaction_tbl => l_transaction_tbl);
526:
527: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
528: IF(l_return_status = fnd_api.g_ret_sts_error) THEN
529: RAISE fnd_api.g_exc_error;
530: ELSE
531: RAISE fnd_api.g_exc_unexpected_error;

Line 528: IF(l_return_status = fnd_api.g_ret_sts_error) THEN

524: x_return_status => l_return_status,
525: x_transaction_tbl => l_transaction_tbl);
526:
527: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
528: IF(l_return_status = fnd_api.g_ret_sts_error) THEN
529: RAISE fnd_api.g_exc_error;
530: ELSE
531: RAISE fnd_api.g_exc_unexpected_error;
532: END IF;

Line 529: RAISE fnd_api.g_exc_error;

525: x_transaction_tbl => l_transaction_tbl);
526:
527: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
528: IF(l_return_status = fnd_api.g_ret_sts_error) THEN
529: RAISE fnd_api.g_exc_error;
530: ELSE
531: RAISE fnd_api.g_exc_unexpected_error;
532: END IF;
533: END IF;

Line 531: RAISE fnd_api.g_exc_unexpected_error;

527: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
528: IF(l_return_status = fnd_api.g_ret_sts_error) THEN
529: RAISE fnd_api.g_exc_error;
530: ELSE
531: RAISE fnd_api.g_exc_unexpected_error;
532: END IF;
533: END IF;
534:
535: -------------------------------------

Line 545: RAISE fnd_api.g_exc_error;

541: IF(l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT
542: AND l_transaction_tbl(i).lot_number IS NULL) THEN
543: fnd_message.set_name('WIP', 'WIP_NO_LOT_NUMBER');
544: fnd_msg_pub.add;
545: RAISE fnd_api.g_exc_error;
546: END IF;
547:
548: IF(l_transaction_tbl(i).demand_source_header_id IS NULL) THEN
549: l_valid_reservation := TRUE; /* ER 4163405 */

Line 565: IF(l_return_status = fnd_api.g_ret_sts_success) THEN

561: p_transaction_type => WIP_CONSTANTS.WASSY_RETURN,
562: x_return_status => l_return_status,
563: x_query_reservation => l_query_reservation);
564:
565: IF(l_return_status = fnd_api.g_ret_sts_success) THEN
566: IF(l_reservation_found) THEN
567: EXIT;
568: END IF;
569: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN

Line 569: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN

565: IF(l_return_status = fnd_api.g_ret_sts_success) THEN
566: IF(l_reservation_found) THEN
567: EXIT;
568: END IF;
569: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
570: RAISE fnd_api.g_exc_error;
571: ELSE
572: RAISE fnd_api.g_exc_unexpected_error;
573: END IF;

Line 570: RAISE fnd_api.g_exc_error;

566: IF(l_reservation_found) THEN
567: EXIT;
568: END IF;
569: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
570: RAISE fnd_api.g_exc_error;
571: ELSE
572: RAISE fnd_api.g_exc_unexpected_error;
573: END IF;
574: END LOOP;

Line 572: RAISE fnd_api.g_exc_unexpected_error;

568: END IF;
569: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
570: RAISE fnd_api.g_exc_error;
571: ELSE
572: RAISE fnd_api.g_exc_unexpected_error;
573: END IF;
574: END LOOP;
575:
576: IF(l_reservation_found)THEN

Line 593: IF(l_return_status = fnd_api.g_ret_sts_success) THEN

589: p_reservation_rec => l_reservation_tbl(l_reservation_index),
590: p_transaction_type => WIP_CONSTANTS.WASSY_RETURN,
591: x_return_status => l_return_status);
592:
593: IF(l_return_status = fnd_api.g_ret_sts_success) THEN
594: -- we have already validated that txn line primary quantity
595: -- is less than or equal to reservation quantity
596: l_reservation_tbl(l_reservation_index).primary_reservation_quantity :=
597: l_reservation_tbl(l_reservation_index).primary_reservation_quantity +

Line 600: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN

596: l_reservation_tbl(l_reservation_index).primary_reservation_quantity :=
597: l_reservation_tbl(l_reservation_index).primary_reservation_quantity +
598: l_transaction_tbl(i).primary_quantity;
599: l_transaction_tbl(i).primary_quantity := 0;
600: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
601: RAISE fnd_api.g_exc_error;
602: ELSE
603: RAISE fnd_api.g_exc_unexpected_error;
604: END IF;

Line 601: RAISE fnd_api.g_exc_error;

597: l_reservation_tbl(l_reservation_index).primary_reservation_quantity +
598: l_transaction_tbl(i).primary_quantity;
599: l_transaction_tbl(i).primary_quantity := 0;
600: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
601: RAISE fnd_api.g_exc_error;
602: ELSE
603: RAISE fnd_api.g_exc_unexpected_error;
604: END IF;
605: -- form line has sales order specified, but not found in

Line 603: RAISE fnd_api.g_exc_unexpected_error;

599: l_transaction_tbl(i).primary_quantity := 0;
600: ELSIF (l_return_status = fnd_api.g_ret_sts_error) THEN
601: RAISE fnd_api.g_exc_error;
602: ELSE
603: RAISE fnd_api.g_exc_unexpected_error;
604: END IF;
605: -- form line has sales order specified, but not found in
606: -- mtl_reservations
607: END IF; -- reservation found for this return

Line 620: x_return_status := fnd_api.g_ret_sts_success;

616: error message WIP_SALES_ORDER_INCONSISTENCY with the new message
617: WIP_NO_INVENTORY_RESERVATIONS for clarity. */
618:
619: if(l_valid_reservation) then
620: x_return_status := fnd_api.g_ret_sts_success;
621: else
622: fnd_message.set_name('WIP', 'WIP_NO_INVENTORY_RESERVATIONS');
623: fnd_msg_pub.add;
624: RAISE fnd_api.g_exc_error;

Line 624: RAISE fnd_api.g_exc_error;

620: x_return_status := fnd_api.g_ret_sts_success;
621: else
622: fnd_message.set_name('WIP', 'WIP_NO_INVENTORY_RESERVATIONS');
623: fnd_msg_pub.add;
624: RAISE fnd_api.g_exc_error;
625: end if;
626:
627: EXCEPTION
628: WHEN g_need_to_rollback_exception THEN

Line 631: WHEN fnd_api.g_exc_error THEN

627: EXCEPTION
628: WHEN g_need_to_rollback_exception THEN
629: ROLLBACK TO SAVEPOINT return_reservation_to_wip_0;
630:
631: WHEN fnd_api.g_exc_error THEN
632: x_return_status := fnd_api.g_ret_sts_error;
633:
634: fnd_msg_pub.count_and_get(
635: p_encoded => fnd_api.g_false,

Line 632: x_return_status := fnd_api.g_ret_sts_error;

628: WHEN g_need_to_rollback_exception THEN
629: ROLLBACK TO SAVEPOINT return_reservation_to_wip_0;
630:
631: WHEN fnd_api.g_exc_error THEN
632: x_return_status := fnd_api.g_ret_sts_error;
633:
634: fnd_msg_pub.count_and_get(
635: p_encoded => fnd_api.g_false,
636: p_count => x_msg_count,

Line 635: p_encoded => fnd_api.g_false,

631: WHEN fnd_api.g_exc_error THEN
632: x_return_status := fnd_api.g_ret_sts_error;
633:
634: fnd_msg_pub.count_and_get(
635: p_encoded => fnd_api.g_false,
636: p_count => x_msg_count,
637: p_data => x_msg_data);
638:
639: ROLLBACK TO SAVEPOINT return_reservation_to_wip_0;

Line 641: WHEN fnd_api.g_exc_unexpected_error THEN

637: p_data => x_msg_data);
638:
639: ROLLBACK TO SAVEPOINT return_reservation_to_wip_0;
640:
641: WHEN fnd_api.g_exc_unexpected_error THEN
642: x_return_status := fnd_api.g_ret_sts_unexp_error;
643:
644: fnd_msg_pub.count_and_get(
645: p_encoded => fnd_api.g_false,

Line 642: x_return_status := fnd_api.g_ret_sts_unexp_error;

638:
639: ROLLBACK TO SAVEPOINT return_reservation_to_wip_0;
640:
641: WHEN fnd_api.g_exc_unexpected_error THEN
642: x_return_status := fnd_api.g_ret_sts_unexp_error;
643:
644: fnd_msg_pub.count_and_get(
645: p_encoded => fnd_api.g_false,
646: p_count => x_msg_count,

Line 645: p_encoded => fnd_api.g_false,

641: WHEN fnd_api.g_exc_unexpected_error THEN
642: x_return_status := fnd_api.g_ret_sts_unexp_error;
643:
644: fnd_msg_pub.count_and_get(
645: p_encoded => fnd_api.g_false,
646: p_count => x_msg_count,
647: p_data => x_msg_data);
648:
649: ROLLBACK TO SAVEPOINT return_reservation_to_wip_0;

Line 652: x_return_status := fnd_api.g_ret_sts_unexp_error;

648:
649: ROLLBACK TO SAVEPOINT return_reservation_to_wip_0;
650:
651: WHEN OTHERS THEN
652: x_return_status := fnd_api.g_ret_sts_unexp_error;
653: IF(fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)) THEN
654: fnd_msg_pub.add_exc_msg (
655: g_package_name,
656: l_routine_name);

Line 660: p_encoded => fnd_api.g_false,

656: l_routine_name);
657: END IF;
658:
659: fnd_msg_pub.count_and_get(
660: p_encoded => fnd_api.g_false,
661: p_count => x_msg_count,
662: p_data => x_msg_data);
663:
664: ROLLBACK TO SAVEPOINT return_reservation_to_wip_0;

Line 700: x_return_status := fnd_api.g_ret_sts_success;

696: l_params wip_logger.param_tbl_t;
697: l_wip_cfg_rsv_level NUMBER;
698: l_skip_flag BOOLEAN; /* Bug 2976994 */
699: begin
700: x_return_status := fnd_api.g_ret_sts_success;
701: SAVEPOINT transfer_flow_lines_0;
702: if(l_logLevel <= wip_constants.trace_logging) then
703: l_params(1).paramName := 'not logging params';
704: l_params(1).paramValue := null;

Line 737: RAISE fnd_api.g_exc_error;

733: wip_logger.log('no lot', l_return_status);
734: end if;
735: fnd_message.set_name('WIP', 'WIP_NO_LOT_NUMBER');
736: fnd_msg_pub.add;
737: RAISE fnd_api.g_exc_error;
738: END IF;
739:
740: IF (p_transaction_tbl(i).primary_quantity IS NULL OR
741: p_transaction_tbl(i).transaction_quantity IS NULL OR

Line 749: RAISE fnd_api.g_exc_error;

745: wip_logger.log('no qty', l_return_status);
746: end if;
747: fnd_message.set_name('WIP', 'WIP_ZERO_TRANSACTION_QUANTITY');
748: fnd_msg_pub.add;
749: RAISE fnd_api.g_exc_error;
750: END IF;
751:
752: ----------------------------------
753: -- Get sales order open quantity

Line 799: RAISE fnd_api.g_exc_error; */

795: wip_logger.log('Bad SO info or no open demand. Skipping reservation.', l_return_status);
796: end if;
797: /* fnd_message.set_name('WIP', 'WIP_INVALID_SO_TXN_INFO');
798: fnd_msg_pub.add;
799: RAISE fnd_api.g_exc_error; */
800: END;
801:
802: if (l_skip_flag = FALSE) then
803: /* Bug 2976994: There is indeed open demand for the order line */

Line 823: RAISE fnd_api.g_exc_error;

819: fnd_message.set_token(
820: token => 'ORDER_QUANTITY',
821: value => l_primary_open_quantity);
822: fnd_msg_pub.add;
823: RAISE fnd_api.g_exc_error;
824: */
825: END IF;
826:
827:

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

832: -- first determine if the sales order is an internal order
833: inv_salesorder.get_oeheader_for_salesorder(p_transaction_tbl(i).demand_source_header_id,
834: l_oe_header_id,
835: x_return_status);
836: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
837: if(l_logLevel <= wip_constants.full_logging) then
838: wip_logger.log('inv_salesorder errorred', l_return_status);
839: end if;
840: RAISE fnd_api.g_exc_error;

Line 840: RAISE fnd_api.g_exc_error;

836: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
837: if(l_logLevel <= wip_constants.full_logging) then
838: wip_logger.log('inv_salesorder errorred', l_return_status);
839: end if;
840: RAISE fnd_api.g_exc_error;
841: END IF;
842:
843: SELECT source_document_type_id
844: INTO l_so_type

Line 943: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

939:
940: INV_LOT_API_PUB.InsertLot(p_api_version => 1.0,
941: p_init_msg_list => 'F',
942: p_commit => 'F',
943: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
944: p_inventory_item_id => l_reservation_rec.inventory_item_id,
945: p_organization_id => l_reservation_rec.organization_id,
946: p_lot_number => l_reservation_rec.lot_number,
947: p_expiration_date => l_expiration_date,

Line 956: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

952: x_return_status => l_return_status,
953: x_msg_count => l_msg_count,
954: x_msg_data => l_msg_data );
955:
956: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
957: x_msg_count := l_msg_count;
958: x_msg_data := l_msg_data;
959: x_return_status := l_return_status;
960: RAISE g_need_to_rollback_exception;

Line 977: p_init_msg_lst => fnd_api.g_false,

973: wip_logger.log('qty' || l_reservation_rec.primary_reservation_quantity, l_return_status);
974: wip_logger.log('lpn' || l_reservation_rec.lpn_id, l_return_status);
975: end if;
976: inv_reservation_pub.create_reservation(p_api_version_number => 1.0,
977: p_init_msg_lst => fnd_api.g_false,
978: x_return_status => l_return_status,
979: x_msg_count => l_msg_count,
980: x_msg_data => l_msg_data,
981: p_rsv_rec => l_reservation_rec,

Line 984: p_partial_reservation_flag => fnd_api.g_false,

980: x_msg_data => l_msg_data,
981: p_rsv_rec => l_reservation_rec,
982: p_serial_number => l_serial_number_tbl,
983: x_serial_number => l_to_serial_number_tbl,
984: p_partial_reservation_flag => fnd_api.g_false,
985: p_force_reservation_flag => fnd_api.g_false,
986: p_validation_flag => fnd_api.g_true,
987: p_partial_rsv_exists => TRUE, -- Bug 4166956
988: x_quantity_reserved => l_quantity_reserved,

Line 985: p_force_reservation_flag => fnd_api.g_false,

981: p_rsv_rec => l_reservation_rec,
982: p_serial_number => l_serial_number_tbl,
983: x_serial_number => l_to_serial_number_tbl,
984: p_partial_reservation_flag => fnd_api.g_false,
985: p_force_reservation_flag => fnd_api.g_false,
986: p_validation_flag => fnd_api.g_true,
987: p_partial_rsv_exists => TRUE, -- Bug 4166956
988: x_quantity_reserved => l_quantity_reserved,
989: x_reservation_id => l_reservation_id);

Line 986: p_validation_flag => fnd_api.g_true,

982: p_serial_number => l_serial_number_tbl,
983: x_serial_number => l_to_serial_number_tbl,
984: p_partial_reservation_flag => fnd_api.g_false,
985: p_force_reservation_flag => fnd_api.g_false,
986: p_validation_flag => fnd_api.g_true,
987: p_partial_rsv_exists => TRUE, -- Bug 4166956
988: x_quantity_reserved => l_quantity_reserved,
989: x_reservation_id => l_reservation_id);
990:

Line 992: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

988: x_quantity_reserved => l_quantity_reserved,
989: x_reservation_id => l_reservation_id);
990:
991:
992: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
993: if(l_logLevel <= wip_constants.full_logging) then
994: wip_logger.log('reservation creation failed:' || l_msg_data, l_return_status);
995: end if;
996: x_msg_count := l_msg_count;

Line 1006: x_return_status := fnd_api.g_ret_sts_success;

1002: end if; /* Bug 2976994: Continue from here if skip_flag = TRUE */
1003:
1004: END LOOP; -- loop through each completion form line
1005:
1006: x_return_status := fnd_api.g_ret_sts_success;
1007: if (l_logLevel <= wip_constants.trace_logging) then
1008: wip_logger.exitPoint(p_procName => 'wip_so_reservations.transfer_flow_lines',
1009: p_procReturnStatus => x_return_status,
1010: p_msg => 'succeeded',

Line 1015: x_return_status := fnd_api.g_ret_sts_error;

1011: x_returnStatus => l_return_status); --discard logging return status
1012: end if;
1013: exception
1014: WHEN g_need_to_rollback_exception THEN
1015: x_return_status := fnd_api.g_ret_sts_error;
1016: rollback to transfer_flow_lines_0;
1017: if (l_logLevel <= wip_constants.trace_logging) then
1018: wip_logger.exitPoint(p_procName => 'wip_so_reservations.transfer_flow_lines',
1019: p_procReturnStatus => x_return_status,

Line 1024: WHEN fnd_api.g_exc_error THEN

1020: p_msg => 'error1',
1021: x_returnStatus => l_return_status); --discard logging return status
1022: end if;
1023:
1024: WHEN fnd_api.g_exc_error THEN
1025: x_return_status := fnd_api.g_ret_sts_error;
1026: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1027: p_count => x_msg_count,
1028: p_data => x_msg_data);

Line 1025: x_return_status := fnd_api.g_ret_sts_error;

1021: x_returnStatus => l_return_status); --discard logging return status
1022: end if;
1023:
1024: WHEN fnd_api.g_exc_error THEN
1025: x_return_status := fnd_api.g_ret_sts_error;
1026: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1027: p_count => x_msg_count,
1028: p_data => x_msg_data);
1029: rollback to transfer_flow_lines_0;

Line 1026: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,

1022: end if;
1023:
1024: WHEN fnd_api.g_exc_error THEN
1025: x_return_status := fnd_api.g_ret_sts_error;
1026: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1027: p_count => x_msg_count,
1028: p_data => x_msg_data);
1029: rollback to transfer_flow_lines_0;
1030: if (l_logLevel <= wip_constants.trace_logging) then

Line 1037: WHEN fnd_api.g_exc_unexpected_error THEN

1033: p_msg => 'error2',
1034: x_returnStatus => l_return_status); --discard logging return status
1035: end if;
1036:
1037: WHEN fnd_api.g_exc_unexpected_error THEN
1038: x_return_status := fnd_api.g_ret_sts_unexp_error;
1039: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1040: p_count => x_msg_count,
1041: p_data => x_msg_data);

Line 1038: x_return_status := fnd_api.g_ret_sts_unexp_error;

1034: x_returnStatus => l_return_status); --discard logging return status
1035: end if;
1036:
1037: WHEN fnd_api.g_exc_unexpected_error THEN
1038: x_return_status := fnd_api.g_ret_sts_unexp_error;
1039: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1040: p_count => x_msg_count,
1041: p_data => x_msg_data);
1042: rollback to transfer_flow_lines_0;

Line 1039: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,

1035: end if;
1036:
1037: WHEN fnd_api.g_exc_unexpected_error THEN
1038: x_return_status := fnd_api.g_ret_sts_unexp_error;
1039: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1040: p_count => x_msg_count,
1041: p_data => x_msg_data);
1042: rollback to transfer_flow_lines_0;
1043: if (l_logLevel <= wip_constants.trace_logging) then

Line 1051: x_return_status := fnd_api.g_ret_sts_unexp_error;

1047: x_returnStatus => l_return_status); --discard logging return status
1048: end if;
1049:
1050: WHEN OTHERS THEN
1051: x_return_status := fnd_api.g_ret_sts_unexp_error;
1052: IF(fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)) THEN
1053: fnd_msg_pub.add_exc_msg (g_package_name,
1054: l_routine_name);
1055: END IF;

Line 1057: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,

1053: fnd_msg_pub.add_exc_msg (g_package_name,
1054: l_routine_name);
1055: END IF;
1056:
1057: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1058: p_count => x_msg_count,
1059: p_data => x_msg_data);
1060:
1061: rollback to transfer_flow_lines_0;

Line 1088: x_return_status := fnd_api.g_ret_sts_success;

1084: l_msg_data VARCHAR2(2000);
1085: l_params wip_logger.param_tbl_t;
1086: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1087: begin
1088: x_return_status := fnd_api.g_ret_sts_success;
1089: if(l_logLevel <= wip_constants.trace_logging) then
1090: l_params(1).paramName := 'p_header_id';
1091: l_params(1).paramValue := p_header_id;
1092: l_params(2).paramName := 'p_lpn_id';

Line 1113: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

1109: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
1110: p_transaction_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
1111: x_return_status => l_return_status,
1112: x_transaction_tbl => l_transaction_tbl);
1113: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1114: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1115: RAISE fnd_api.g_exc_error;
1116: ELSE
1117: RAISE fnd_api.g_exc_unexpected_error;

Line 1114: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

1110: p_transaction_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
1111: x_return_status => l_return_status,
1112: x_transaction_tbl => l_transaction_tbl);
1113: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1114: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1115: RAISE fnd_api.g_exc_error;
1116: ELSE
1117: RAISE fnd_api.g_exc_unexpected_error;
1118: END IF;

Line 1115: RAISE fnd_api.g_exc_error;

1111: x_return_status => l_return_status,
1112: x_transaction_tbl => l_transaction_tbl);
1113: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1114: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1115: RAISE fnd_api.g_exc_error;
1116: ELSE
1117: RAISE fnd_api.g_exc_unexpected_error;
1118: END IF;
1119: END IF;

Line 1117: RAISE fnd_api.g_exc_unexpected_error;

1113: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1114: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1115: RAISE fnd_api.g_exc_error;
1116: ELSE
1117: RAISE fnd_api.g_exc_unexpected_error;
1118: END IF;
1119: END IF;
1120:
1121: if(l_logLevel <= wip_constants.full_logging) then

Line 1132: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

1128: x_return_status => l_return_status,
1129: x_msg_data => l_msg_data,
1130: x_msg_count => l_msg_count);
1131:
1132: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1133: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1134: RAISE fnd_api.g_exc_error;
1135: ELSE
1136: RAISE fnd_api.g_exc_unexpected_error;

Line 1133: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

1129: x_msg_data => l_msg_data,
1130: x_msg_count => l_msg_count);
1131:
1132: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1133: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1134: RAISE fnd_api.g_exc_error;
1135: ELSE
1136: RAISE fnd_api.g_exc_unexpected_error;
1137: END IF;

Line 1134: RAISE fnd_api.g_exc_error;

1130: x_msg_count => l_msg_count);
1131:
1132: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1133: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1134: RAISE fnd_api.g_exc_error;
1135: ELSE
1136: RAISE fnd_api.g_exc_unexpected_error;
1137: END IF;
1138: END IF;

Line 1136: RAISE fnd_api.g_exc_unexpected_error;

1132: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1133: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1134: RAISE fnd_api.g_exc_error;
1135: ELSE
1136: RAISE fnd_api.g_exc_unexpected_error;
1137: END IF;
1138: END IF;
1139:
1140: if (l_logLevel <= wip_constants.trace_logging) then

Line 1155: WHEN fnd_api.g_exc_error THEN

1151: p_msg => 'error1',
1152: x_returnStatus => l_return_status); --discard logging return status
1153: end if;
1154: rollback to complete_flow_sched_to_so_1;
1155: WHEN fnd_api.g_exc_error THEN
1156: x_return_status := fnd_api.g_ret_sts_error;
1157: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1158: p_count => x_msg_count,
1159: p_data => x_msg_data);

Line 1156: x_return_status := fnd_api.g_ret_sts_error;

1152: x_returnStatus => l_return_status); --discard logging return status
1153: end if;
1154: rollback to complete_flow_sched_to_so_1;
1155: WHEN fnd_api.g_exc_error THEN
1156: x_return_status := fnd_api.g_ret_sts_error;
1157: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1158: p_count => x_msg_count,
1159: p_data => x_msg_data);
1160: if(x_msg_data is null and l_msg_data is not null) then

Line 1157: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,

1153: end if;
1154: rollback to complete_flow_sched_to_so_1;
1155: WHEN fnd_api.g_exc_error THEN
1156: x_return_status := fnd_api.g_ret_sts_error;
1157: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1158: p_count => x_msg_count,
1159: p_data => x_msg_data);
1160: if(x_msg_data is null and l_msg_data is not null) then
1161: x_msg_data := l_msg_data;

Line 1171: WHEN fnd_api.g_exc_unexpected_error THEN

1167: p_procReturnStatus => x_return_status,
1168: p_msg => 'error2',
1169: x_returnStatus => l_return_Status); --discard logging return status
1170: end if;
1171: WHEN fnd_api.g_exc_unexpected_error THEN
1172: x_return_status := fnd_api.g_ret_sts_unexp_error;
1173: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1174: p_count => x_msg_count,
1175: p_data => x_msg_data);

Line 1172: x_return_status := fnd_api.g_ret_sts_unexp_error;

1168: p_msg => 'error2',
1169: x_returnStatus => l_return_Status); --discard logging return status
1170: end if;
1171: WHEN fnd_api.g_exc_unexpected_error THEN
1172: x_return_status := fnd_api.g_ret_sts_unexp_error;
1173: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1174: p_count => x_msg_count,
1175: p_data => x_msg_data);
1176: rollback to complete_flow_sched_to_so_1;

Line 1173: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,

1169: x_returnStatus => l_return_Status); --discard logging return status
1170: end if;
1171: WHEN fnd_api.g_exc_unexpected_error THEN
1172: x_return_status := fnd_api.g_ret_sts_unexp_error;
1173: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1174: p_count => x_msg_count,
1175: p_data => x_msg_data);
1176: rollback to complete_flow_sched_to_so_1;
1177: if(l_logLevel <= wip_constants.trace_logging) then

Line 1184: x_return_status := fnd_api.g_ret_sts_unexp_error;

1180: p_msg => 'error3',
1181: x_returnStatus => l_return_Status); --discard logging return status
1182: end if;
1183: WHEN OTHERS THEN
1184: x_return_status := fnd_api.g_ret_sts_unexp_error;
1185: IF (fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)) THEN
1186: fnd_msg_pub.add_exc_msg (g_package_name,
1187: l_routine_name);
1188: END IF;

Line 1189: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,

1185: IF (fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)) THEN
1186: fnd_msg_pub.add_exc_msg (g_package_name,
1187: l_routine_name);
1188: END IF;
1189: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1190: p_count => x_msg_count,
1191: p_data => x_msg_data);
1192: rollback to complete_flow_sched_to_so_1;
1193: if(l_logLevel <= wip_constants.trace_logging) then

Line 1293: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

1289: x_return_status => l_return_status,
1290: x_transaction_tbl => l_transaction_tbl);
1291:
1292:
1293: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1294: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1295: RAISE fnd_api.g_exc_error;
1296: ELSE
1297: RAISE fnd_api.g_exc_unexpected_error;

Line 1294: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

1290: x_transaction_tbl => l_transaction_tbl);
1291:
1292:
1293: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1294: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1295: RAISE fnd_api.g_exc_error;
1296: ELSE
1297: RAISE fnd_api.g_exc_unexpected_error;
1298: END IF;

Line 1295: RAISE fnd_api.g_exc_error;

1291:
1292:
1293: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1294: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1295: RAISE fnd_api.g_exc_error;
1296: ELSE
1297: RAISE fnd_api.g_exc_unexpected_error;
1298: END IF;
1299: END IF;

Line 1297: RAISE fnd_api.g_exc_unexpected_error;

1293: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1294: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1295: RAISE fnd_api.g_exc_error;
1296: ELSE
1297: RAISE fnd_api.g_exc_unexpected_error;
1298: END IF;
1299: END IF;
1300:
1301: transfer_flow_lines(p_transaction_tbl => l_transaction_tbl,

Line 1314: p_encoded => fnd_api.g_false,

1310: WHEN g_need_to_rollback_exception THEN
1311: ROLLBACK TO SAVEPOINT complete_flow_sched_to_so_0;
1312: /* Fix for Bug3035884 . Added following procedure call */
1313: fnd_msg_pub.count_and_get(
1314: p_encoded => fnd_api.g_false,
1315: p_count => x_msg_count,
1316: p_data => x_msg_data);
1317:
1318: WHEN fnd_api.g_exc_error THEN

Line 1318: WHEN fnd_api.g_exc_error THEN

1314: p_encoded => fnd_api.g_false,
1315: p_count => x_msg_count,
1316: p_data => x_msg_data);
1317:
1318: WHEN fnd_api.g_exc_error THEN
1319:
1320: x_return_status := fnd_api.g_ret_sts_error;
1321:
1322: fnd_msg_pub.count_and_get(

Line 1320: x_return_status := fnd_api.g_ret_sts_error;

1316: p_data => x_msg_data);
1317:
1318: WHEN fnd_api.g_exc_error THEN
1319:
1320: x_return_status := fnd_api.g_ret_sts_error;
1321:
1322: fnd_msg_pub.count_and_get(
1323: p_encoded => fnd_api.g_false,
1324: p_count => x_msg_count,

Line 1323: p_encoded => fnd_api.g_false,

1319:
1320: x_return_status := fnd_api.g_ret_sts_error;
1321:
1322: fnd_msg_pub.count_and_get(
1323: p_encoded => fnd_api.g_false,
1324: p_count => x_msg_count,
1325: p_data => x_msg_data);
1326:
1327: ROLLBACK TO SAVEPOINT complete_flow_sched_to_so_0;

Line 1329: WHEN fnd_api.g_exc_unexpected_error THEN

1325: p_data => x_msg_data);
1326:
1327: ROLLBACK TO SAVEPOINT complete_flow_sched_to_so_0;
1328:
1329: WHEN fnd_api.g_exc_unexpected_error THEN
1330:
1331: x_return_status := fnd_api.g_ret_sts_unexp_error;
1332:
1333: fnd_msg_pub.count_and_get(

Line 1331: x_return_status := fnd_api.g_ret_sts_unexp_error;

1327: ROLLBACK TO SAVEPOINT complete_flow_sched_to_so_0;
1328:
1329: WHEN fnd_api.g_exc_unexpected_error THEN
1330:
1331: x_return_status := fnd_api.g_ret_sts_unexp_error;
1332:
1333: fnd_msg_pub.count_and_get(
1334: p_encoded => fnd_api.g_false,
1335: p_count => x_msg_count,

Line 1334: p_encoded => fnd_api.g_false,

1330:
1331: x_return_status := fnd_api.g_ret_sts_unexp_error;
1332:
1333: fnd_msg_pub.count_and_get(
1334: p_encoded => fnd_api.g_false,
1335: p_count => x_msg_count,
1336: p_data => x_msg_data);
1337:
1338: ROLLBACK TO SAVEPOINT complete_flow_sched_to_so_0;

Line 1342: x_return_status := fnd_api.g_ret_sts_unexp_error;

1338: ROLLBACK TO SAVEPOINT complete_flow_sched_to_so_0;
1339:
1340: WHEN OTHERS THEN
1341:
1342: x_return_status := fnd_api.g_ret_sts_unexp_error;
1343: IF (fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)) THEN
1344: fnd_msg_pub.add_exc_msg (
1345: g_package_name,
1346: l_routine_name);

Line 1350: p_encoded => fnd_api.g_false,

1346: l_routine_name);
1347: END IF;
1348:
1349: fnd_msg_pub.count_and_get(
1350: p_encoded => fnd_api.g_false,
1351: p_count => x_msg_count,
1352: p_data => x_msg_data);
1353:
1354: ROLLBACK TO SAVEPOINT complete_flow_sched_to_so_0;

Line 1380: x_return_status := fnd_api.g_ret_sts_success;

1376: UPDATE WIP_FLOW_SCHEDULES
1377: SET demand_source_line = to_char(p_new_demand_source_line_id)
1378: WHERE to_number(demand_source_line) = p_old_demand_source_line_id;
1379:
1380: x_return_status := fnd_api.g_ret_sts_success;
1381:
1382: EXCEPTION
1383: WHEN OTHERS THEN
1384: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1384: x_return_status := fnd_api.g_ret_sts_unexp_error;

1380: x_return_status := fnd_api.g_ret_sts_success;
1381:
1382: EXCEPTION
1383: WHEN OTHERS THEN
1384: x_return_status := fnd_api.g_ret_sts_unexp_error;
1385: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1386: fnd_msg_pub.add_exc_msg(g_package_name, l_routine_name);
1387: END IF;
1388: fnd_msg_pub.count_and_get(

Line 1487: x_return_status := fnd_api.g_ret_sts_unexp_error;

1483: l_transaction_rec transaction_temp_rec_type;
1484: l_transaction_action_id NUMBER := 0;
1485:
1486: BEGIN
1487: x_return_status := fnd_api.g_ret_sts_unexp_error;
1488:
1489: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION) THEN
1490: l_transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION; /* 31, completion */
1491: ELSE

Line 1503: x_return_status := fnd_api.g_ret_sts_success;

1499: l_counter := l_counter + 1;
1500: x_transaction_tbl(l_counter) := l_transaction_rec;
1501: END LOOP;
1502: CLOSE c_transaction_lines;
1503: x_return_status := fnd_api.g_ret_sts_success;
1504: EXCEPTION
1505: WHEN OTHERS THEN
1506: IF (c_transaction_lines%ISOPEN) THEN
1507: CLOSE c_transaction_lines;

Line 1593: x_return_status := fnd_api.g_ret_sts_unexp_error;

1589: l_transaction_rec transaction_temp_rec_type;
1590: l_transaction_action_id NUMBER := 0;
1591:
1592: BEGIN
1593: x_return_status := fnd_api.g_ret_sts_unexp_error;
1594:
1595: OPEN c_transaction_lines(p_header_id, p_transaction_action_id);
1596: LOOP
1597: FETCH c_transaction_lines INTO l_transaction_rec;

Line 1603: x_return_status := fnd_api.g_ret_sts_success;

1599: l_counter := l_counter + 1;
1600: x_transaction_tbl(l_counter) := l_transaction_rec;
1601: END LOOP;
1602: CLOSE c_transaction_lines;
1603: x_return_status := fnd_api.g_ret_sts_success;
1604: EXCEPTION
1605: WHEN OTHERS THEN
1606: IF (c_transaction_lines%ISOPEN) THEN
1607: CLOSE c_transaction_lines;

Line 1664: x_return_status := fnd_api.g_ret_sts_success;

1660:
1661:
1662:
1663: BEGIN
1664: x_return_status := fnd_api.g_ret_sts_success;
1665: x_query_reservation := 'N';
1666:
1667:
1668: IF (p_transaction_rec.demand_source_header_id IS NOT NULL) THEN

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

1705:
1706: inv_salesorder.get_oeheader_for_salesorder(p_transaction_rec.demand_source_header_id,
1707: l_oe_header_id,
1708: x_return_status);
1709: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
1710: RAISE fnd_api.g_exc_error;
1711: END IF;
1712:
1713: SELECT source_document_type_id

Line 1710: RAISE fnd_api.g_exc_error;

1706: inv_salesorder.get_oeheader_for_salesorder(p_transaction_rec.demand_source_header_id,
1707: l_oe_header_id,
1708: x_return_status);
1709: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
1710: RAISE fnd_api.g_exc_error;
1711: END IF;
1712:
1713: SELECT source_document_type_id
1714: INTO l_so_type

Line 1758: RAISE fnd_api.g_exc_error;

1754: -- to the user.
1755: WHEN NO_DATA_FOUND THEN
1756: fnd_message.set_name('WIP', 'WIP_INVALID_SO');
1757: fnd_msg_pub.add;
1758: RAISE fnd_api.g_exc_error;
1759:
1760: END;
1761:
1762: l_reservation_rec.requirement_date := l_requirement_date ;

Line 1829: , p_init_msg_lst => fnd_api.g_false

1825:
1826: INV_Reservation_PUB.Update_Reservation
1827: (
1828: p_api_version_number => 1.0
1829: , p_init_msg_lst => fnd_api.g_false
1830: , x_return_status => l_api_return_status
1831: , x_msg_count => l_msg_count
1832: , x_msg_data => l_msg_data
1833: , p_original_rsv_rec => p_reservation_rec

Line 1837: , p_validation_flag => fnd_api.g_true

1833: , p_original_rsv_rec => p_reservation_rec
1834: , p_to_rsv_rec => l_reservation_rec
1835: , p_original_serial_number => l_dummy_sn
1836: , p_to_serial_number => l_dummy_sn
1837: , p_validation_flag => fnd_api.g_true
1838: );
1839: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
1840: FND_MESSAGE.SET_NAME('INV','INV_UPD_RSV_FAILED');
1841: FND_MSG_PUB.Add;

Line 1839: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN

1835: , p_original_serial_number => l_dummy_sn
1836: , p_to_serial_number => l_dummy_sn
1837: , p_validation_flag => fnd_api.g_true
1838: );
1839: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
1840: FND_MESSAGE.SET_NAME('INV','INV_UPD_RSV_FAILED');
1841: FND_MSG_PUB.Add;
1842: RAISE fnd_api.g_exc_unexpected_error;
1843: END IF ;

Line 1842: RAISE fnd_api.g_exc_unexpected_error;

1838: );
1839: IF l_api_return_status <> fnd_api.g_ret_sts_success THEN
1840: FND_MESSAGE.SET_NAME('INV','INV_UPD_RSV_FAILED');
1841: FND_MSG_PUB.Add;
1842: RAISE fnd_api.g_exc_unexpected_error;
1843: END IF ;
1844: else
1845:
1846: inv_reservation_pub.create_reservation(

Line 1848: p_init_msg_lst => fnd_api.g_false,

1844: else
1845:
1846: inv_reservation_pub.create_reservation(
1847: p_api_version_number => 1.0,
1848: p_init_msg_lst => fnd_api.g_false,
1849: x_return_status => l_return_status,
1850: x_msg_count => l_msg_count,
1851: x_msg_data => l_msg_data,
1852: p_rsv_rec => l_reservation_rec,

Line 1855: p_partial_reservation_flag => fnd_api.g_false,

1851: x_msg_data => l_msg_data,
1852: p_rsv_rec => l_reservation_rec,
1853: p_serial_number => l_dummy_sn,
1854: x_serial_number => l_dummy_sn,
1855: p_partial_reservation_flag => fnd_api.g_false,
1856: p_force_reservation_flag => fnd_api.g_false,
1857: p_validation_flag => fnd_api.g_true,
1858: x_quantity_reserved => l_quantity_reserved,
1859: x_reservation_id => l_reservation_id);

Line 1856: p_force_reservation_flag => fnd_api.g_false,

1852: p_rsv_rec => l_reservation_rec,
1853: p_serial_number => l_dummy_sn,
1854: x_serial_number => l_dummy_sn,
1855: p_partial_reservation_flag => fnd_api.g_false,
1856: p_force_reservation_flag => fnd_api.g_false,
1857: p_validation_flag => fnd_api.g_true,
1858: x_quantity_reserved => l_quantity_reserved,
1859: x_reservation_id => l_reservation_id);
1860:

Line 1857: p_validation_flag => fnd_api.g_true,

1853: p_serial_number => l_dummy_sn,
1854: x_serial_number => l_dummy_sn,
1855: p_partial_reservation_flag => fnd_api.g_false,
1856: p_force_reservation_flag => fnd_api.g_false,
1857: p_validation_flag => fnd_api.g_true,
1858: x_quantity_reserved => l_quantity_reserved,
1859: x_reservation_id => l_reservation_id);
1860:
1861:

Line 1862: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

1858: x_quantity_reserved => l_quantity_reserved,
1859: x_reservation_id => l_reservation_id);
1860:
1861:
1862: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1863: x_msg_count := l_msg_count;
1864: x_msg_data := l_msg_data;
1865: x_return_status := l_return_status;
1866: RAISE g_need_to_rollback_exception;

Line 1872: RAISE fnd_api.g_exc_error; */

1868: END IF ;
1869:
1870: /* fnd_message.set_name('WIP', 'WIP_OVER_COMPLETE');
1871: fnd_msg_pub.add;
1872: RAISE fnd_api.g_exc_error; */
1873: x_query_reservation := 'Y';
1874:
1875: END IF; -- check transaction type
1876:

Line 1897: RAISE fnd_api.g_exc_error;

1893: fnd_message.set_name('WIP', 'WIP_INVALID_SUBINV');
1894: fnd_message.set_token('TXN_SUB', p_transaction_rec.subinventory_code);
1895: fnd_message.set_token('SO_SUB', p_reservation_rec.subinventory_code);
1896: fnd_msg_pub.add;
1897: RAISE fnd_api.g_exc_error;
1898: END IF;
1899:
1900:
1901: RETURN TRUE;

Line 1903: WHEN fnd_api.g_exc_error THEN

1899:
1900:
1901: RETURN TRUE;
1902: EXCEPTION
1903: WHEN fnd_api.g_exc_error THEN
1904: x_return_status := fnd_api.g_ret_sts_error;
1905: return FALSE;
1906:
1907: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1904: x_return_status := fnd_api.g_ret_sts_error;

1900:
1901: RETURN TRUE;
1902: EXCEPTION
1903: WHEN fnd_api.g_exc_error THEN
1904: x_return_status := fnd_api.g_ret_sts_error;
1905: return FALSE;
1906:
1907: WHEN fnd_api.g_exc_unexpected_error THEN
1908: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1907: WHEN fnd_api.g_exc_unexpected_error THEN

1903: WHEN fnd_api.g_exc_error THEN
1904: x_return_status := fnd_api.g_ret_sts_error;
1905: return FALSE;
1906:
1907: WHEN fnd_api.g_exc_unexpected_error THEN
1908: x_return_status := fnd_api.g_ret_sts_unexp_error;
1909: return FALSE;
1910:
1911: WHEN OTHERS THEN

Line 1908: x_return_status := fnd_api.g_ret_sts_unexp_error;

1904: x_return_status := fnd_api.g_ret_sts_error;
1905: return FALSE;
1906:
1907: WHEN fnd_api.g_exc_unexpected_error THEN
1908: x_return_status := fnd_api.g_ret_sts_unexp_error;
1909: return FALSE;
1910:
1911: WHEN OTHERS THEN
1912: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1912: x_return_status := fnd_api.g_ret_sts_unexp_error;

1908: x_return_status := fnd_api.g_ret_sts_unexp_error;
1909: return FALSE;
1910:
1911: WHEN OTHERS THEN
1912: x_return_status := fnd_api.g_ret_sts_unexp_error;
1913: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1914: fnd_msg_pub.add_exc_msg(g_package_name, l_routine_name);
1915: END IF;
1916: return FALSE;

Line 1996: p_init_msg_lst => fnd_api.g_false,

1992: END IF;
1993:
1994: inv_reservation_pub.transfer_reservation(
1995: p_api_version_number => 1.0,
1996: p_init_msg_lst => fnd_api.g_false,
1997: x_return_status => l_return_status,
1998: x_msg_count => l_msg_count,
1999: x_msg_data => l_msg_data,
2000: p_is_transfer_supply => fnd_api.g_true,

Line 2000: p_is_transfer_supply => fnd_api.g_true,

1996: p_init_msg_lst => fnd_api.g_false,
1997: x_return_status => l_return_status,
1998: x_msg_count => l_msg_count,
1999: x_msg_data => l_msg_data,
2000: p_is_transfer_supply => fnd_api.g_true,
2001: p_original_rsv_rec => p_reservation_rec,
2002: p_to_rsv_rec => l_to_reservation_rec,
2003: p_original_serial_number => l_original_serial_number,
2004: p_to_serial_number => l_to_serial_number,

Line 2005: p_validation_flag => fnd_api.g_true,

2001: p_original_rsv_rec => p_reservation_rec,
2002: p_to_rsv_rec => l_to_reservation_rec,
2003: p_original_serial_number => l_original_serial_number,
2004: p_to_serial_number => l_to_serial_number,
2005: p_validation_flag => fnd_api.g_true,
2006: x_to_reservation_id => l_to_reservation_id);
2007:
2008: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
2009: x_return_status := l_return_status;

Line 2008: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN

2004: p_to_serial_number => l_to_serial_number,
2005: p_validation_flag => fnd_api.g_true,
2006: x_to_reservation_id => l_to_reservation_id);
2007:
2008: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
2009: x_return_status := l_return_status;
2010: RETURN;
2011: END IF;
2012: x_return_status := fnd_api.g_ret_sts_success;

Line 2012: x_return_status := fnd_api.g_ret_sts_success;

2008: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
2009: x_return_status := l_return_status;
2010: RETURN;
2011: END IF;
2012: x_return_status := fnd_api.g_ret_sts_success;
2013:
2014: EXCEPTION
2015: WHEN OTHERS THEN
2016: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2016: x_return_status := fnd_api.g_ret_sts_unexp_error;

2012: x_return_status := fnd_api.g_ret_sts_success;
2013:
2014: EXCEPTION
2015: WHEN OTHERS THEN
2016: x_return_status := fnd_api.g_ret_sts_unexp_error;
2017:
2018: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2019: fnd_msg_pub.add_exc_msg(g_package_name, l_routine_name);
2020: END IF;

Line 2048: x_return_status := FND_API.G_RET_STS_SUCCESS;

2044: IS_ATO_ITEM VARCHAR(2);
2045: cnt NUMBER;
2046: BEGIN
2047:
2048: x_return_status := FND_API.G_RET_STS_SUCCESS;
2049:
2050: select msi.replenish_to_order_flag into IS_ATO_ITEM
2051: from mtl_system_items msi
2052: where msi.organization_id = p_organization_id

Line 2089: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2085: end if;
2086:
2087: EXCEPTION
2088: when others then
2089: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2090: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
2091: FND_MSG_PUB.Add_Exc_Msg(g_package_name, l_api_name);
2092: END IF;
2093: FND_MSG_PUB.Count_And_Get(

Line 2184: x_status := fnd_api.g_ret_sts_success;

2180: FROM wip_parameters
2181: WHERE organization_id = p_org_id;
2182:
2183: IF (l_response_code = WIP_CONSTANTS.NEVER) THEN
2184: x_status := fnd_api.g_ret_sts_success;
2185: RETURN; -- reponse type is never
2186:
2187: ELSIF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN
2188: OPEN l_always_cursor; -- response type is always

Line 2224: x_status := fnd_api.g_ret_sts_success;

2220: CLOSE l_always_cursor;
2221: ELSE
2222: CLOSE l_1to1_cursor;
2223: END IF;
2224: x_status := fnd_api.g_ret_sts_success;
2225:
2226: EXCEPTION
2227: WHEN others THEN
2228: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,

Line 2228: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,

2224: x_status := fnd_api.g_ret_sts_success;
2225:
2226: EXCEPTION
2227: WHEN others THEN
2228: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2229: p_count => x_msg_count,
2230: p_data => x_msg_data);
2231: x_status := fnd_api.g_ret_sts_error;
2232: IF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN

Line 2231: x_status := fnd_api.g_ret_sts_error;

2227: WHEN others THEN
2228: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2229: p_count => x_msg_count,
2230: p_data => x_msg_data);
2231: x_status := fnd_api.g_ret_sts_error;
2232: IF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN
2233: CLOSE l_always_cursor;
2234: ELSE
2235: CLOSE l_1to1_cursor;

Line 2288: x_return_status := fnd_api.g_ret_sts_unexp_error;

2284: l_counter NUMBER := 0;
2285: l_move_transaction_rec move_transaction_intf_rec_type;
2286:
2287: BEGIN
2288: x_return_status := fnd_api.g_ret_sts_unexp_error;
2289:
2290: /* dbms_output.put_line ('inside get_move_transaction_lines');
2291: dbms_output.put_line ('p_wip_entity_id: '|| p_wip_entity_id);
2292: dbms_output.put_line ('p_group_id : '|| p_group_id); */

Line 2303: x_return_status := fnd_api.g_ret_sts_success;

2299: l_counter := l_counter + 1;
2300: x_move_transaction_tbl(l_counter) := l_move_transaction_rec;
2301: END LOOP;
2302: CLOSE c_move_transaction_lines;
2303: x_return_status := fnd_api.g_ret_sts_success;
2304: EXCEPTION
2305: WHEN OTHERS THEN
2306: IF (c_move_transaction_lines%ISOPEN) THEN
2307: CLOSE c_move_transaction_lines;

Line 2406: If (l_return_status <> fnd_api.g_ret_sts_success) then

2402: p_wip_entity_id => l_wip_entity_id,
2403: x_return_status => l_return_status,
2404: x_move_transaction_tbl => l_move_transaction_tbl);
2405:
2406: If (l_return_status <> fnd_api.g_ret_sts_success) then
2407: If (l_return_status = fnd_api.g_ret_sts_error) then
2408: RAISE fnd_api.g_exc_error;
2409: Else
2410: RAISE fnd_api.g_exc_unexpected_error;

Line 2407: If (l_return_status = fnd_api.g_ret_sts_error) then

2403: x_return_status => l_return_status,
2404: x_move_transaction_tbl => l_move_transaction_tbl);
2405:
2406: If (l_return_status <> fnd_api.g_ret_sts_success) then
2407: If (l_return_status = fnd_api.g_ret_sts_error) then
2408: RAISE fnd_api.g_exc_error;
2409: Else
2410: RAISE fnd_api.g_exc_unexpected_error;
2411: End if;

Line 2408: RAISE fnd_api.g_exc_error;

2404: x_move_transaction_tbl => l_move_transaction_tbl);
2405:
2406: If (l_return_status <> fnd_api.g_ret_sts_success) then
2407: If (l_return_status = fnd_api.g_ret_sts_error) then
2408: RAISE fnd_api.g_exc_error;
2409: Else
2410: RAISE fnd_api.g_exc_unexpected_error;
2411: End if;
2412: End if;

Line 2410: RAISE fnd_api.g_exc_unexpected_error;

2406: If (l_return_status <> fnd_api.g_ret_sts_success) then
2407: If (l_return_status = fnd_api.g_ret_sts_error) then
2408: RAISE fnd_api.g_exc_error;
2409: Else
2410: RAISE fnd_api.g_exc_unexpected_error;
2411: End if;
2412: End if;
2413:
2414: move_txn_count := l_move_transaction_tbl.count;

Line 2444: If (l_return_status <> fnd_api.g_ret_sts_success) then

2440: p_primary_quantity => l_scrap_primary_txn_quantity,
2441: x_return_status => l_return_status,
2442: x_msg_count => l_msg_count,
2443: x_msg_data => l_msg_data );
2444: If (l_return_status <> fnd_api.g_ret_sts_success) then
2445: If (l_return_status = fnd_api.g_ret_sts_error) then
2446: RAISE fnd_api.g_exc_error;
2447: Else
2448: RAISE fnd_api.g_exc_unexpected_error;

Line 2445: If (l_return_status = fnd_api.g_ret_sts_error) then

2441: x_return_status => l_return_status,
2442: x_msg_count => l_msg_count,
2443: x_msg_data => l_msg_data );
2444: If (l_return_status <> fnd_api.g_ret_sts_success) then
2445: If (l_return_status = fnd_api.g_ret_sts_error) then
2446: RAISE fnd_api.g_exc_error;
2447: Else
2448: RAISE fnd_api.g_exc_unexpected_error;
2449: End if;

Line 2446: RAISE fnd_api.g_exc_error;

2442: x_msg_count => l_msg_count,
2443: x_msg_data => l_msg_data );
2444: If (l_return_status <> fnd_api.g_ret_sts_success) then
2445: If (l_return_status = fnd_api.g_ret_sts_error) then
2446: RAISE fnd_api.g_exc_error;
2447: Else
2448: RAISE fnd_api.g_exc_unexpected_error;
2449: End if;
2450: End if;

Line 2448: RAISE fnd_api.g_exc_unexpected_error;

2444: If (l_return_status <> fnd_api.g_ret_sts_success) then
2445: If (l_return_status = fnd_api.g_ret_sts_error) then
2446: RAISE fnd_api.g_exc_error;
2447: Else
2448: RAISE fnd_api.g_exc_unexpected_error;
2449: End if;
2450: End if;
2451: End if;
2452: End if;

Line 2460: WHEN fnd_api.g_exc_error THEN

2456: Exception
2457: WHEN g_need_to_rollback_exception THEN
2458: ROLLBACK TO SAVEPOINT Relieve_Rsv_scrap_txn_sp;
2459:
2460: WHEN fnd_api.g_exc_error THEN
2461:
2462: x_return_status := fnd_api.g_ret_sts_error;
2463:
2464: fnd_msg_pub.count_and_get(

Line 2462: x_return_status := fnd_api.g_ret_sts_error;

2458: ROLLBACK TO SAVEPOINT Relieve_Rsv_scrap_txn_sp;
2459:
2460: WHEN fnd_api.g_exc_error THEN
2461:
2462: x_return_status := fnd_api.g_ret_sts_error;
2463:
2464: fnd_msg_pub.count_and_get(
2465: p_encoded => fnd_api.g_false,
2466: p_count => x_msg_count,

Line 2465: p_encoded => fnd_api.g_false,

2461:
2462: x_return_status := fnd_api.g_ret_sts_error;
2463:
2464: fnd_msg_pub.count_and_get(
2465: p_encoded => fnd_api.g_false,
2466: p_count => x_msg_count,
2467: p_data => x_msg_data);
2468:
2469: ROLLBACK TO SAVEPOINT Relieve_Rsv_scrap_txn_sp;

Line 2471: WHEN fnd_api.g_exc_unexpected_error THEN

2467: p_data => x_msg_data);
2468:
2469: ROLLBACK TO SAVEPOINT Relieve_Rsv_scrap_txn_sp;
2470:
2471: WHEN fnd_api.g_exc_unexpected_error THEN
2472:
2473: x_return_status := fnd_api.g_ret_sts_unexp_error;
2474:
2475: fnd_msg_pub.count_and_get(

Line 2473: x_return_status := fnd_api.g_ret_sts_unexp_error;

2469: ROLLBACK TO SAVEPOINT Relieve_Rsv_scrap_txn_sp;
2470:
2471: WHEN fnd_api.g_exc_unexpected_error THEN
2472:
2473: x_return_status := fnd_api.g_ret_sts_unexp_error;
2474:
2475: fnd_msg_pub.count_and_get(
2476: p_encoded => fnd_api.g_false,
2477: p_count => x_msg_count,

Line 2476: p_encoded => fnd_api.g_false,

2472:
2473: x_return_status := fnd_api.g_ret_sts_unexp_error;
2474:
2475: fnd_msg_pub.count_and_get(
2476: p_encoded => fnd_api.g_false,
2477: p_count => x_msg_count,
2478: p_data => x_msg_data);
2479:
2480: ROLLBACK TO SAVEPOINT Relieve_Rsv_scrap_txn_sp;

Line 2484: x_return_status := fnd_api.g_ret_sts_unexp_error;

2480: ROLLBACK TO SAVEPOINT Relieve_Rsv_scrap_txn_sp;
2481:
2482: WHEN OTHERS THEN
2483:
2484: x_return_status := fnd_api.g_ret_sts_unexp_error;
2485: IF (fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)) THEN
2486: fnd_msg_pub.add_exc_msg (
2487: g_package_name,
2488: l_routine_name);

Line 2492: p_encoded => fnd_api.g_false,

2488: l_routine_name);
2489: END IF;
2490:
2491: fnd_msg_pub.count_and_get(
2492: p_encoded => fnd_api.g_false,
2493: p_count => x_msg_count,
2494: p_data => x_msg_data);
2495:
2496: ROLLBACK TO SAVEPOINT Relieve_Rsv_scrap_txn_sp;

Line 2550: p_init_msg_lst => fnd_api.g_false,

2546: -- tell API to lock rows in mtl_reservations.
2547: -- records are returned based on requirement date ascending.
2548: inv_reservation_pub.query_reservation(
2549: p_api_version_number => 1.0,
2550: p_init_msg_lst => fnd_api.g_false,
2551: x_return_status => l_return_status,
2552: x_msg_count => l_msg_count,
2553: x_msg_data => l_msg_data,
2554: p_query_input => l_reservation_rec,

Line 2555: p_lock_records => fnd_api.g_true,

2551: x_return_status => l_return_status,
2552: x_msg_count => l_msg_count,
2553: x_msg_data => l_msg_data,
2554: p_query_input => l_reservation_rec,
2555: p_lock_records => fnd_api.g_true,
2556: p_sort_by_req_date => inv_reservation_global.g_query_req_date_desc,
2557: x_mtl_reservation_tbl => l_reservation_tbl,
2558: x_mtl_reservation_tbl_count => l_rsv_tbl_count,
2559: x_error_code => l_error_code);

Line 2561: If (l_return_status <> fnd_api.g_ret_sts_success) then

2557: x_mtl_reservation_tbl => l_reservation_tbl,
2558: x_mtl_reservation_tbl_count => l_rsv_tbl_count,
2559: x_error_code => l_error_code);
2560:
2561: If (l_return_status <> fnd_api.g_ret_sts_success) then
2562: x_msg_count := l_msg_count;
2563: x_msg_data := l_msg_data;
2564: x_return_status := l_return_status;
2565: RAISE g_need_to_rollback_exception;

Line 2580: p_init_msg_lst => fnd_api.g_false,

2576: --delete the reservation
2577: -- dbms_output.put_line ('about to delete the reservation');
2578: inv_reservation_pub.delete_reservation(
2579: p_api_version_number => 1.0,
2580: p_init_msg_lst => fnd_api.g_false,
2581: x_return_status => l_return_status,
2582: x_msg_count => l_msg_count,
2583: x_msg_data => l_msg_data,
2584: p_rsv_rec => l_reservation_tbl(j),

Line 2587: If (l_return_status <> fnd_api.g_ret_sts_success) then

2583: x_msg_data => l_msg_data,
2584: p_rsv_rec => l_reservation_tbl(j),
2585: p_serial_number => l_dummy_sn);
2586:
2587: If (l_return_status <> fnd_api.g_ret_sts_success) then
2588: x_msg_count := l_msg_count;
2589: x_msg_data := l_msg_data;
2590: x_return_status := l_return_status;
2591: RAISE g_need_to_rollback_exception;

Line 2603: p_init_msg_lst => fnd_api.g_false,

2599: l_to_reservation_rec := l_reservation_tbl(j);
2600: l_to_reservation_rec.primary_reservation_quantity := l_new_line_rsv_quantity;
2601: inv_reservation_pub.update_reservation(
2602: p_api_version_number => 1.0,
2603: p_init_msg_lst => fnd_api.g_false,
2604: x_return_status => l_return_status,
2605: x_msg_count => l_msg_count,
2606: x_msg_data => l_msg_data,
2607: p_original_rsv_rec => l_reservation_tbl(j),

Line 2611: p_validation_flag => fnd_api.g_true);

2607: p_original_rsv_rec => l_reservation_tbl(j),
2608: p_to_rsv_rec => l_to_reservation_rec,
2609: p_original_serial_number => l_dummy_sn,
2610: p_to_serial_number => l_dummy_sn,
2611: p_validation_flag => fnd_api.g_true);
2612: If (l_return_status <> fnd_api.g_ret_sts_success) then
2613: x_msg_count := l_msg_count;
2614: x_msg_data := l_msg_data;
2615: x_return_status := l_return_status;

Line 2612: If (l_return_status <> fnd_api.g_ret_sts_success) then

2608: p_to_rsv_rec => l_to_reservation_rec,
2609: p_original_serial_number => l_dummy_sn,
2610: p_to_serial_number => l_dummy_sn,
2611: p_validation_flag => fnd_api.g_true);
2612: If (l_return_status <> fnd_api.g_ret_sts_success) then
2613: x_msg_count := l_msg_count;
2614: x_msg_data := l_msg_data;
2615: x_return_status := l_return_status;
2616: RAISE g_need_to_rollback_exception;

Line 2625: x_return_status := fnd_api.g_ret_sts_success;

2621: EXIT;
2622: End if;
2623: End loop;
2624:
2625: x_return_status := fnd_api.g_ret_sts_success;
2626:
2627: EXCEPTION
2628: WHEN OTHERS THEN
2629: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2629: x_return_status := fnd_api.g_ret_sts_unexp_error;

2625: x_return_status := fnd_api.g_ret_sts_success;
2626:
2627: EXCEPTION
2628: WHEN OTHERS THEN
2629: x_return_status := fnd_api.g_ret_sts_unexp_error;
2630: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2631: fnd_msg_pub.add_exc_msg(g_package_name, l_routine_name);
2632: END IF;
2633: END Relieve_wip_reservation;

Line 2657: p_init_msg_lst => fnd_api.g_true,

2653: BEGIN
2654: inv_reservation_form_pkg.query_reservation(
2655: p_api_version_number => 1.0,
2656: p_reservation_id => p_reservation_id,
2657: p_init_msg_lst => fnd_api.g_true,
2658: p_lock_records => fnd_api.g_true,
2659: p_sort_by_req_date => 1 /* no sort */,
2660: p_cancel_order_mode => 1,
2661: x_return_status => x_return_status,

Line 2658: p_lock_records => fnd_api.g_true,

2654: inv_reservation_form_pkg.query_reservation(
2655: p_api_version_number => 1.0,
2656: p_reservation_id => p_reservation_id,
2657: p_init_msg_lst => fnd_api.g_true,
2658: p_lock_records => fnd_api.g_true,
2659: p_sort_by_req_date => 1 /* no sort */,
2660: p_cancel_order_mode => 1,
2661: x_return_status => x_return_status,
2662: x_msg_count => l_msg_count,

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

2664: x_mtl_reservation_tbl => l_rsv_array,
2665: x_mtl_reservation_tbl_count => l_size,
2666: x_error_code => l_error_code);
2667:
2668: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2669: raise fnd_api.g_exc_unexpected_error;
2670: END IF;
2671:
2672: inv_reservation_form_pkg.update_reservation(

Line 2669: raise fnd_api.g_exc_unexpected_error;

2665: x_mtl_reservation_tbl_count => l_size,
2666: x_error_code => l_error_code);
2667:
2668: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2669: raise fnd_api.g_exc_unexpected_error;
2670: END IF;
2671:
2672: inv_reservation_form_pkg.update_reservation(
2673: p_api_version_number => 1.0,

Line 2674: p_init_msg_lst => fnd_api.g_true,

2670: END IF;
2671:
2672: inv_reservation_form_pkg.update_reservation(
2673: p_api_version_number => 1.0,
2674: p_init_msg_lst => fnd_api.g_true,
2675: p_from_reservation_id => p_reservation_id,
2676: p_from_requirement_date => NULL,
2677: p_from_organization_id => NULL,
2678: p_from_inventory_item_id => NULL,

Line 2749: p_validation_flag => fnd_api.g_true,

2745: p_to_attribute12 => l_rsv_array(1).attribute12,
2746: p_to_attribute13 => l_rsv_array(1).attribute13,
2747: p_to_attribute14 => l_rsv_array(1).attribute14,
2748: p_to_attribute15 => l_rsv_array(1).attribute15,
2749: p_validation_flag => fnd_api.g_true,
2750: /* Changes for Inventory */
2751: p_from_serial_number_tbl => l_dummy_sn,
2752: p_from_crossDock_flag => NULL,
2753: p_to_serial_number_tbl => l_dummy_sn,

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

2756: x_return_status => x_return_status,
2757: x_msg_count => l_msg_count,
2758: x_msg_data => l_msg_data);
2759:
2760: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2761: raise fnd_api.g_exc_unexpected_error;
2762: END IF;
2763:
2764: x_return_status := fnd_api.g_ret_sts_success;

Line 2761: raise fnd_api.g_exc_unexpected_error;

2757: x_msg_count => l_msg_count,
2758: x_msg_data => l_msg_data);
2759:
2760: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2761: raise fnd_api.g_exc_unexpected_error;
2762: END IF;
2763:
2764: x_return_status := fnd_api.g_ret_sts_success;
2765: EXCEPTION

Line 2764: x_return_status := fnd_api.g_ret_sts_success;

2760: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
2761: raise fnd_api.g_exc_unexpected_error;
2762: END IF;
2763:
2764: x_return_status := fnd_api.g_ret_sts_success;
2765: EXCEPTION
2766: WHEN others THEN
2767: x_return_status := fnd_api.g_ret_sts_unexp_error;
2768: END update_row;

Line 2767: x_return_status := fnd_api.g_ret_sts_unexp_error;

2763:
2764: x_return_status := fnd_api.g_ret_sts_success;
2765: EXCEPTION
2766: WHEN others THEN
2767: x_return_status := fnd_api.g_ret_sts_unexp_error;
2768: END update_row;
2769:
2770: PROCEDURE lock_row(p_reservation_id IN NUMBER,
2771: x_reservation_id OUT NOCOPY NUMBER,

Line 2788: p_init_msg_lst => fnd_api.g_true,

2784: BEGIN
2785: inv_reservation_form_pkg.query_reservation(
2786: p_api_version_number => 1.0,
2787: p_reservation_id => p_reservation_id,
2788: p_init_msg_lst => fnd_api.g_true,
2789: p_lock_records => fnd_api.g_true,
2790: p_sort_by_req_date => 1 /* no sort */,
2791: p_cancel_order_mode => 1,
2792: x_return_status => x_return_status,

Line 2789: p_lock_records => fnd_api.g_true,

2785: inv_reservation_form_pkg.query_reservation(
2786: p_api_version_number => 1.0,
2787: p_reservation_id => p_reservation_id,
2788: p_init_msg_lst => fnd_api.g_true,
2789: p_lock_records => fnd_api.g_true,
2790: p_sort_by_req_date => 1 /* no sort */,
2791: p_cancel_order_mode => 1,
2792: x_return_status => x_return_status,
2793: x_msg_count => l_msg_count,