DBA Data[Home] [Help]

APPS.GME_API_GRP dependencies on FND_API

Line 14: x_return_status := fnd_api.g_ret_sts_success;

10: l_api_name CONSTANT VARCHAR2 (30) := 'GME_PRE_PROCESS_TXNS';
11: l_return_status VARCHAR2 (1);
12: BEGIN
13: -- Initially let us assign the return status to success
14: x_return_status := fnd_api.g_ret_sts_success;
15:
16: IF (g_debug <= gme_debug.g_log_statement) THEN
17: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
18: || 'Entering');

Line 32: IF l_return_status <> fnd_api.g_ret_sts_success THEN

28: gme_transactions_pvt.gme_pre_process
29: (p_transaction_hdr_id => p_header_id
30: ,x_return_status => l_return_status);
31:
32: IF l_return_status <> fnd_api.g_ret_sts_success THEN
33: RAISE fnd_api.g_exc_error;
34: END IF;
35: END IF;
36: x_return_status := l_return_status;

Line 33: RAISE fnd_api.g_exc_error;

29: (p_transaction_hdr_id => p_header_id
30: ,x_return_status => l_return_status);
31:
32: IF l_return_status <> fnd_api.g_ret_sts_success THEN
33: RAISE fnd_api.g_exc_error;
34: END IF;
35: END IF;
36: x_return_status := l_return_status;
37: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 47: WHEN fnd_api.g_exc_error THEN

43: || l_return_status);
44: END IF;
45:
46: EXCEPTION
47: WHEN fnd_api.g_exc_error THEN
48: x_return_status := l_return_status;
49: WHEN fnd_api.g_exc_unexpected_error THEN
50: x_return_status := fnd_api.g_ret_sts_unexp_error;
51: WHEN OTHERS THEN

Line 49: WHEN fnd_api.g_exc_unexpected_error THEN

45:
46: EXCEPTION
47: WHEN fnd_api.g_exc_error THEN
48: x_return_status := l_return_status;
49: WHEN fnd_api.g_exc_unexpected_error THEN
50: x_return_status := fnd_api.g_ret_sts_unexp_error;
51: WHEN OTHERS THEN
52: x_return_status := fnd_api.g_ret_sts_unexp_error;
53:

Line 50: x_return_status := fnd_api.g_ret_sts_unexp_error;

46: EXCEPTION
47: WHEN fnd_api.g_exc_error THEN
48: x_return_status := l_return_status;
49: WHEN fnd_api.g_exc_unexpected_error THEN
50: x_return_status := fnd_api.g_ret_sts_unexp_error;
51: WHEN OTHERS THEN
52: x_return_status := fnd_api.g_ret_sts_unexp_error;
53:
54: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN

Line 52: x_return_status := fnd_api.g_ret_sts_unexp_error;

48: x_return_status := l_return_status;
49: WHEN fnd_api.g_exc_unexpected_error THEN
50: x_return_status := fnd_api.g_ret_sts_unexp_error;
51: WHEN OTHERS THEN
52: x_return_status := fnd_api.g_ret_sts_unexp_error;
53:
54: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
55: gme_debug.put_line ( g_pkg_name
56: || '.'

Line 82: x_return_status := fnd_api.g_ret_sts_success;

78: WHERE transaction_set_id = v_header_id;
79:
80: l_txn_rec get_txns%ROWTYPE;
81: BEGIN
82: x_return_status := fnd_api.g_ret_sts_success;
83:
84: IF (g_debug <= gme_debug.g_log_statement) THEN
85: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
86: || 'Entering');

Line 105: IF l_return_status <> fnd_api.g_ret_sts_success THEN

101: gme_transactions_pvt.gme_post_process
102: (p_transaction_id => p_transaction_id
103: ,x_return_status => l_return_status);
104:
105: IF l_return_status <> fnd_api.g_ret_sts_success THEN
106: RAISE fnd_api.g_exc_error;
107: END IF;
108:
109: x_return_status := l_return_status;

Line 106: RAISE fnd_api.g_exc_error;

102: (p_transaction_id => p_transaction_id
103: ,x_return_status => l_return_status);
104:
105: IF l_return_status <> fnd_api.g_ret_sts_success THEN
106: RAISE fnd_api.g_exc_error;
107: END IF;
108:
109: x_return_status := l_return_status;
110: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 119: WHEN fnd_api.g_exc_error THEN

115: || 'Exiting with '
116: || l_return_status);
117: END IF;
118: EXCEPTION
119: WHEN fnd_api.g_exc_error THEN
120: x_return_status := l_return_status;
121: WHEN fnd_api.g_exc_unexpected_error THEN
122: x_return_status := fnd_api.g_ret_sts_unexp_error;
123: WHEN OTHERS THEN

Line 121: WHEN fnd_api.g_exc_unexpected_error THEN

117: END IF;
118: EXCEPTION
119: WHEN fnd_api.g_exc_error THEN
120: x_return_status := l_return_status;
121: WHEN fnd_api.g_exc_unexpected_error THEN
122: x_return_status := fnd_api.g_ret_sts_unexp_error;
123: WHEN OTHERS THEN
124: x_return_status := fnd_api.g_ret_sts_unexp_error;
125:

Line 122: x_return_status := fnd_api.g_ret_sts_unexp_error;

118: EXCEPTION
119: WHEN fnd_api.g_exc_error THEN
120: x_return_status := l_return_status;
121: WHEN fnd_api.g_exc_unexpected_error THEN
122: x_return_status := fnd_api.g_ret_sts_unexp_error;
123: WHEN OTHERS THEN
124: x_return_status := fnd_api.g_ret_sts_unexp_error;
125:
126: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN

Line 124: x_return_status := fnd_api.g_ret_sts_unexp_error;

120: x_return_status := l_return_status;
121: WHEN fnd_api.g_exc_unexpected_error THEN
122: x_return_status := fnd_api.g_ret_sts_unexp_error;
123: WHEN OTHERS THEN
124: x_return_status := fnd_api.g_ret_sts_unexp_error;
125:
126: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
127: gme_debug.put_line ( g_pkg_name
128: || '.'

Line 155: x_return_status := fnd_api.g_ret_sts_success;

151: this procedure may return R, B or M depends on whether reservations deleted
152: or MO allocations deleted or both
153: */
154: IF x_return_status in ('R','B','M') THEN
155: x_return_status := fnd_api.g_ret_sts_success;
156: END IF;
157: END update_material_date;
158: /*Bug#6778968 Added the new parameter, p_called_by */
159: PROCEDURE validate_supply_demand

Line 170: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM

166: , p_supply_demand_code IN NUMBER
167: , p_supply_demand_type_id IN NUMBER
168: , p_supply_demand_header_id IN NUMBER
169: , p_supply_demand_line_id IN NUMBER
170: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM
171: , p_demand_ship_date IN DATE
172: , p_expected_receipt_date IN DATE
173: , p_called_by IN VARCHAR2 DEFAULT 'VAL'
174: , p_api_version_number IN NUMBER DEFAULT 1.0

Line 175: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE

171: , p_demand_ship_date IN DATE
172: , p_expected_receipt_date IN DATE
173: , p_called_by IN VARCHAR2 DEFAULT 'VAL'
174: , p_api_version_number IN NUMBER DEFAULT 1.0
175: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE
176: ) IS
177: l_api_name CONSTANT VARCHAR2 (30) := 'VALIDATE_SUPPLY_DEMAND';
178:
179: l_material_details_rec GME_MATERIAL_DETAILS%ROWTYPE;

Line 198: x_return_status := FND_API.G_RET_STS_SUCCESS;

194: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
195: END IF;
196:
197: /* Set the return status to success initially */
198: x_return_status := FND_API.G_RET_STS_SUCCESS;
199:
200:
201: /* Set the valid status to YES initially */
202: x_valid_status := 'Y';

Line 204: IF p_init_msg_lst = FND_API.G_TRUE THEN

200:
201: /* Set the valid status to YES initially */
202: x_valid_status := 'Y';
203:
204: IF p_init_msg_lst = FND_API.G_TRUE THEN
205: fnd_msg_pub.initialize;
206: END IF;
207:
208: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN

Line 208: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN

204: IF p_init_msg_lst = FND_API.G_TRUE THEN
205: fnd_msg_pub.initialize;
206: END IF;
207:
208: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN
209: x_return_status := FND_API.G_RET_STS_ERROR;
210: RAISE invalid_version;
211: END IF;
212:

Line 209: x_return_status := FND_API.G_RET_STS_ERROR;

205: fnd_msg_pub.initialize;
206: END IF;
207:
208: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN
209: x_return_status := FND_API.G_RET_STS_ERROR;
210: RAISE invalid_version;
211: END IF;
212:
213: /* Ensure mandatory inputs supplied */

Line 382: x_return_status := FND_API.g_ret_sts_error;

378: EXCEPTION
379: /* Exception handling */
380: WHEN invalid_version OR input_param_missing OR validation_error
381: OR fetch_failure OR supply_demand_error THEN
382: x_return_status := FND_API.g_ret_sts_error;
383: x_valid_status := 'N';
384: gme_common_pvt.count_and_get(x_count => x_msg_count,
385: p_encoded => FND_API.g_false,
386: x_data => x_msg_data);

Line 385: p_encoded => FND_API.g_false,

381: OR fetch_failure OR supply_demand_error THEN
382: x_return_status := FND_API.g_ret_sts_error;
383: x_valid_status := 'N';
384: gme_common_pvt.count_and_get(x_count => x_msg_count,
385: p_encoded => FND_API.g_false,
386: x_data => x_msg_data);
387: WHEN OTHERS THEN
388: IF g_debug <= gme_debug.g_log_unexpected THEN
389: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);

Line 391: x_return_status := FND_API.g_ret_sts_unexp_error;

387: WHEN OTHERS THEN
388: IF g_debug <= gme_debug.g_log_unexpected THEN
389: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);
390: END IF;
391: x_return_status := FND_API.g_ret_sts_unexp_error;
392: x_valid_status := 'N';
393: gme_common_pvt.count_and_get(x_count => x_msg_count,
394: p_encoded => FND_API.g_false,
395: x_data => x_msg_data);

Line 394: p_encoded => FND_API.g_false,

390: END IF;
391: x_return_status := FND_API.g_ret_sts_unexp_error;
392: x_valid_status := 'N';
393: gme_common_pvt.count_and_get(x_count => x_msg_count,
394: p_encoded => FND_API.g_false,
395: x_data => x_msg_data);
396: END validate_supply_demand;
397:
398: PROCEDURE get_available_supply_demand

Line 415: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM

411: , p_supply_demand_code IN NUMBER
412: , p_supply_demand_type_id IN NUMBER
413: , p_supply_demand_header_id IN NUMBER
414: , p_supply_demand_line_id IN NUMBER
415: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM
416: , p_lpn_id IN NUMBER DEFAULT FND_API.G_MISS_NUM
417: , p_project_id IN NUMBER DEFAULT NULL
418: , p_task_id IN NUMBER DEFAULT NULL
419: , p_api_version_number IN NUMBER DEFAULT 1.0

Line 416: , p_lpn_id IN NUMBER DEFAULT FND_API.G_MISS_NUM

412: , p_supply_demand_type_id IN NUMBER
413: , p_supply_demand_header_id IN NUMBER
414: , p_supply_demand_line_id IN NUMBER
415: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM
416: , p_lpn_id IN NUMBER DEFAULT FND_API.G_MISS_NUM
417: , p_project_id IN NUMBER DEFAULT NULL
418: , p_task_id IN NUMBER DEFAULT NULL
419: , p_api_version_number IN NUMBER DEFAULT 1.0
420: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE

Line 420: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE

416: , p_lpn_id IN NUMBER DEFAULT FND_API.G_MISS_NUM
417: , p_project_id IN NUMBER DEFAULT NULL
418: , p_task_id IN NUMBER DEFAULT NULL
419: , p_api_version_number IN NUMBER DEFAULT 1.0
420: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE
421: ) IS
422: l_api_name CONSTANT VARCHAR2 (30) := 'GET_AVAILABLE_SUPPLY_DEMAND';
423:
424: l_material_details_rec GME_MATERIAL_DETAILS%ROWTYPE;

Line 456: x_return_status := FND_API.G_RET_STS_SUCCESS;

452: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
453: END IF;
454:
455: /* Set the return status to success initially */
456: x_return_status := FND_API.G_RET_STS_SUCCESS;
457:
458: IF p_init_msg_lst = FND_API.G_TRUE THEN
459: fnd_msg_pub.initialize;
460: END IF;

Line 458: IF p_init_msg_lst = FND_API.G_TRUE THEN

454:
455: /* Set the return status to success initially */
456: x_return_status := FND_API.G_RET_STS_SUCCESS;
457:
458: IF p_init_msg_lst = FND_API.G_TRUE THEN
459: fnd_msg_pub.initialize;
460: END IF;
461:
462: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN

Line 462: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN

458: IF p_init_msg_lst = FND_API.G_TRUE THEN
459: fnd_msg_pub.initialize;
460: END IF;
461:
462: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN
463: x_return_status := FND_API.G_RET_STS_ERROR;
464: RAISE invalid_version;
465: END IF;
466:

Line 463: x_return_status := FND_API.G_RET_STS_ERROR;

459: fnd_msg_pub.initialize;
460: END IF;
461:
462: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN
463: x_return_status := FND_API.G_RET_STS_ERROR;
464: RAISE invalid_version;
465: END IF;
466:
467: /* Ensure mandatory inputs supplied */

Line 585: x_return_status := FND_API.g_ret_sts_error;

581: RETURN;
582: EXCEPTION
583: /* Exception handling */
584: WHEN invalid_version OR input_param_missing OR validation_error OR fetch_failure THEN
585: x_return_status := FND_API.g_ret_sts_error;
586: gme_common_pvt.count_and_get(x_count => x_msg_count,
587: p_encoded => FND_API.g_false,
588: x_data => x_msg_data);
589: WHEN OTHERS THEN

Line 587: p_encoded => FND_API.g_false,

583: /* Exception handling */
584: WHEN invalid_version OR input_param_missing OR validation_error OR fetch_failure THEN
585: x_return_status := FND_API.g_ret_sts_error;
586: gme_common_pvt.count_and_get(x_count => x_msg_count,
587: p_encoded => FND_API.g_false,
588: x_data => x_msg_data);
589: WHEN OTHERS THEN
590: IF g_debug <= gme_debug.g_log_unexpected THEN
591: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);

Line 593: x_return_status := FND_API.g_ret_sts_unexp_error;

589: WHEN OTHERS THEN
590: IF g_debug <= gme_debug.g_log_unexpected THEN
591: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);
592: END IF;
593: x_return_status := FND_API.g_ret_sts_unexp_error;
594: gme_common_pvt.count_and_get(x_count => x_msg_count,
595: p_encoded => FND_API.g_false,
596: x_data => x_msg_data);
597: END get_available_supply_demand;

Line 595: p_encoded => FND_API.g_false,

591: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);
592: END IF;
593: x_return_status := FND_API.g_ret_sts_unexp_error;
594: gme_common_pvt.count_and_get(x_count => x_msg_count,
595: p_encoded => FND_API.g_false,
596: x_data => x_msg_data);
597: END get_available_supply_demand;
598:
599: PROCEDURE update_step_quality_status (

Line 612: x_return_status := fnd_api.g_ret_sts_error;

608: IF NOT gme_common_pvt.g_setup_done THEN
609: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_id);
610:
611: IF NOT gme_common_pvt.g_setup_done THEN
612: x_return_status := fnd_api.g_ret_sts_error;
613: RAISE expected_err;
614: END IF;
615: END IF;
616:

Line 649: x_return_status := fnd_api.g_ret_sts_error;

645: RAISE expected_err;
646: END IF;
647: EXCEPTION
648: WHEN expected_err THEN
649: x_return_status := fnd_api.g_ret_sts_error;
650: WHEN OTHERS THEN
651: fnd_msg_pub.add_exc_msg ('GME_API_GRP'
652: ,'UPDATE_STEP_QUALITY_STATUS');
653: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 653: x_return_status := fnd_api.g_ret_sts_unexp_error;

649: x_return_status := fnd_api.g_ret_sts_error;
650: WHEN OTHERS THEN
651: fnd_msg_pub.add_exc_msg ('GME_API_GRP'
652: ,'UPDATE_STEP_QUALITY_STATUS');
653: x_return_status := fnd_api.g_ret_sts_unexp_error;
654: END update_step_quality_status;
655:
656:
657: PROCEDURE get_batch_shortages (

Line 659: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

655:
656:
657: PROCEDURE get_batch_shortages (
658: p_api_version_number IN NUMBER DEFAULT 1.0
659: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
660: ,x_msg_count OUT NOCOPY NUMBER
661: ,x_msg_data OUT NOCOPY VARCHAR2
662: ,p_organization_id IN NUMBER
663: ,p_batch_id IN NUMBER

Line 672: x_return_status := fnd_api.g_ret_sts_success;

668: IS
669: l_api_name CONSTANT VARCHAR2 (30) := 'get_batch_shortages';
670: BEGIN
671: -- Initially let us assign the return status to success
672: x_return_status := fnd_api.g_ret_sts_success;
673:
674: IF (g_debug <= gme_debug.g_log_statement) THEN
675: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
676: || 'Entering');

Line 694: IF x_return_status <> fnd_api.g_ret_sts_success THEN

690: ,p_tree_mode => p_tree_mode
691: ,x_return_status => x_return_status
692: ,x_exception_tbl => x_exception_tbl);
693:
694: IF x_return_status <> fnd_api.g_ret_sts_success THEN
695: RAISE fnd_api.g_exc_error;
696: END IF;
697: END IF;
698:

Line 695: RAISE fnd_api.g_exc_error;

691: ,x_return_status => x_return_status
692: ,x_exception_tbl => x_exception_tbl);
693:
694: IF x_return_status <> fnd_api.g_ret_sts_success THEN
695: RAISE fnd_api.g_exc_error;
696: END IF;
697: END IF;
698:
699: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 708: WHEN fnd_api.g_exc_error THEN

704: || 'Exiting with '
705: || x_return_status);
706: END IF;
707: EXCEPTION
708: WHEN fnd_api.g_exc_error THEN
709: gme_common_pvt.count_and_get (x_count => x_msg_count
710: ,p_encoded => fnd_api.g_false
711: ,x_data => x_msg_data);
712:

Line 710: ,p_encoded => fnd_api.g_false

706: END IF;
707: EXCEPTION
708: WHEN fnd_api.g_exc_error THEN
709: gme_common_pvt.count_and_get (x_count => x_msg_count
710: ,p_encoded => fnd_api.g_false
711: ,x_data => x_msg_data);
712:
713: WHEN OTHERS THEN
714: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 714: x_return_status := fnd_api.g_ret_sts_unexp_error;

710: ,p_encoded => fnd_api.g_false
711: ,x_data => x_msg_data);
712:
713: WHEN OTHERS THEN
714: x_return_status := fnd_api.g_ret_sts_unexp_error;
715:
716: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
717: gme_debug.put_line ( g_pkg_name
718: || '.'

Line 725: ,p_encoded => fnd_api.g_false

721: || 'WHEN OTHERS:'
722: || SQLERRM);
723: END IF;
724: gme_common_pvt.count_and_get (x_count => x_msg_count
725: ,p_encoded => fnd_api.g_false
726: ,x_data => x_msg_data);
727: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
728: END;
729: PROCEDURE get_material_reservations (

Line 731: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

727: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
728: END;
729: PROCEDURE get_material_reservations (
730: p_api_version_number IN NUMBER DEFAULT 1.0
731: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
732: ,x_msg_count OUT NOCOPY NUMBER
733: ,x_msg_data OUT NOCOPY VARCHAR2
734: ,p_organization_id IN NUMBER
735: ,p_batch_id IN NUMBER

Line 744: x_return_status := fnd_api.g_ret_sts_success;

740: IS
741: l_api_name CONSTANT VARCHAR2 (30) := 'get_material_reservations';
742: BEGIN
743: -- Initially let us assign the return status to success
744: x_return_status := fnd_api.g_ret_sts_success;
745:
746: IF (g_debug <= gme_debug.g_log_statement) THEN
747: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
748: || 'Entering');

Line 765: IF x_return_status <> fnd_api.g_ret_sts_success THEN

761: ,p_material_detail_id => p_material_detail_id
762: ,x_return_status => x_return_status
763: ,x_reservations_tbl => x_reservations_tbl);
764:
765: IF x_return_status <> fnd_api.g_ret_sts_success THEN
766: RAISE fnd_api.g_exc_error;
767: END IF;
768: END IF;
769:

Line 766: RAISE fnd_api.g_exc_error;

762: ,x_return_status => x_return_status
763: ,x_reservations_tbl => x_reservations_tbl);
764:
765: IF x_return_status <> fnd_api.g_ret_sts_success THEN
766: RAISE fnd_api.g_exc_error;
767: END IF;
768: END IF;
769:
770: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 779: WHEN fnd_api.g_exc_error THEN

775: || 'Exiting with '
776: || x_return_status);
777: END IF;
778: EXCEPTION
779: WHEN fnd_api.g_exc_error THEN
780: gme_common_pvt.count_and_get (x_count => x_msg_count
781: ,p_encoded => fnd_api.g_false
782: ,x_data => x_msg_data);
783:

Line 781: ,p_encoded => fnd_api.g_false

777: END IF;
778: EXCEPTION
779: WHEN fnd_api.g_exc_error THEN
780: gme_common_pvt.count_and_get (x_count => x_msg_count
781: ,p_encoded => fnd_api.g_false
782: ,x_data => x_msg_data);
783:
784: WHEN OTHERS THEN
785: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 785: x_return_status := fnd_api.g_ret_sts_unexp_error;

781: ,p_encoded => fnd_api.g_false
782: ,x_data => x_msg_data);
783:
784: WHEN OTHERS THEN
785: x_return_status := fnd_api.g_ret_sts_unexp_error;
786:
787: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
788: gme_debug.put_line ( g_pkg_name
789: || '.'

Line 796: ,p_encoded => fnd_api.g_false

792: || 'WHEN OTHERS:'
793: || SQLERRM);
794: END IF;
795: gme_common_pvt.count_and_get (x_count => x_msg_count
796: ,p_encoded => fnd_api.g_false
797: ,x_data => x_msg_data);
798: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
799: END get_material_reservations;
800:

Line 803: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

799: END get_material_reservations;
800:
801: PROCEDURE create_lcf_batch (
802: p_api_version IN NUMBER DEFAULT 1.0
803: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
804: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
805: ,x_message_count OUT NOCOPY NUMBER
806: ,x_message_list OUT NOCOPY VARCHAR2
807: ,x_return_status OUT NOCOPY VARCHAR2

Line 804: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

800:
801: PROCEDURE create_lcf_batch (
802: p_api_version IN NUMBER DEFAULT 1.0
803: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
804: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
805: ,x_message_count OUT NOCOPY NUMBER
806: ,x_message_list OUT NOCOPY VARCHAR2
807: ,x_return_status OUT NOCOPY VARCHAR2
808: ,p_batch_header_rec IN gme_batch_header%rowtype

Line 816: ,p_use_workday_cal IN VARCHAR2 DEFAULT FND_API.G_TRUE

812: ,p_routing_depd_tbl IN gmd_recipe_fetch_pub.routing_depd_tbl
813: ,p_oprn_act_tbl IN gmd_recipe_fetch_pub.oprn_act_tbl
814: ,p_oprn_resc_tbl IN gmd_recipe_fetch_pub.oprn_resc_tbl
815: ,p_proc_param_tbl IN gmd_recipe_fetch_pub.recp_resc_proc_param_tbl
816: ,p_use_workday_cal IN VARCHAR2 DEFAULT FND_API.G_TRUE
817: ,p_contiguity_override IN VARCHAR2 DEFAULT FND_API.G_TRUE
818: ,x_batch_header_rec OUT NOCOPY gme_batch_header%rowtype
819: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
820: ) IS

Line 817: ,p_contiguity_override IN VARCHAR2 DEFAULT FND_API.G_TRUE

813: ,p_oprn_act_tbl IN gmd_recipe_fetch_pub.oprn_act_tbl
814: ,p_oprn_resc_tbl IN gmd_recipe_fetch_pub.oprn_resc_tbl
815: ,p_proc_param_tbl IN gmd_recipe_fetch_pub.recp_resc_proc_param_tbl
816: ,p_use_workday_cal IN VARCHAR2 DEFAULT FND_API.G_TRUE
817: ,p_contiguity_override IN VARCHAR2 DEFAULT FND_API.G_TRUE
818: ,x_batch_header_rec OUT NOCOPY gme_batch_header%rowtype
819: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
820: ) IS
821:

Line 832: IF p_init_msg_list = fnd_api.g_true THEN

828: IF g_debug <= gme_debug.g_log_procedure THEN
829: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
830: || l_api_name);
831: END IF;
832: IF p_init_msg_list = fnd_api.g_true THEN
833: fnd_msg_pub.initialize;
834: gme_common_pvt.g_error_count := 0;
835: END IF;
836: /* Make sure we are call compatible */

Line 837: IF NOT fnd_api.compatible_api_call (1

833: fnd_msg_pub.initialize;
834: gme_common_pvt.g_error_count := 0;
835: END IF;
836: /* Make sure we are call compatible */
837: IF NOT fnd_api.compatible_api_call (1
838: ,p_api_version
839: ,'create_lcf_batch'
840: ,g_pkg_name) THEN
841: x_return_status := fnd_api.g_ret_sts_error;

Line 841: x_return_status := fnd_api.g_ret_sts_error;

837: IF NOT fnd_api.compatible_api_call (1
838: ,p_api_version
839: ,'create_lcf_batch'
840: ,g_pkg_name) THEN
841: x_return_status := fnd_api.g_ret_sts_error;
842: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
843: RAISE fnd_api.g_exc_error;
844: END IF;
845: /* Setup the common constants used accross the apis */

Line 843: RAISE fnd_api.g_exc_error;

839: ,'create_lcf_batch'
840: ,g_pkg_name) THEN
841: x_return_status := fnd_api.g_ret_sts_error;
842: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
843: RAISE fnd_api.g_exc_error;
844: END IF;
845: /* Setup the common constants used accross the apis */
846: IF g_debug <= gme_debug.g_log_procedure THEN
847: gme_debug.put_line ('Calling gme_common_pvt.setup.');

Line 859: x_return_status := fnd_api.g_ret_sts_error;

855: gme_debug.put_line ('After calling gme_common_pvt.setup.');
856: END IF;
857:
858: IF NOT gme_common_pvt.g_setup_done THEN
859: x_return_status := fnd_api.g_ret_sts_error;
860: RAISE fnd_api.g_exc_error;
861: END IF;
862: gme_common_pvt.set_timestamp;
863: gme_common_pvt.materials := p_formula_dtl_tbl;

Line 860: RAISE fnd_api.g_exc_error;

856: END IF;
857:
858: IF NOT gme_common_pvt.g_setup_done THEN
859: x_return_status := fnd_api.g_ret_sts_error;
860: RAISE fnd_api.g_exc_error;
861: END IF;
862: gme_common_pvt.set_timestamp;
863: gme_common_pvt.materials := p_formula_dtl_tbl;
864: gme_common_pvt.routings := p_recipe_rout_tbl;

Line 878: ,p_ignore_qty_below_cap => FND_API.G_TRUE

874: ,x_batch_header_rec => x_batch_header_rec
875: ,p_batch_size => p_formula_dtl_tbl(1).qty
876: ,p_batch_size_uom => p_formula_dtl_tbl(1).detail_uom
877: ,p_creation_mode => 'LCF'
878: ,p_ignore_qty_below_cap => FND_API.G_TRUE
879: ,p_use_workday_cal => p_use_workday_cal
880: ,p_contiguity_override => p_contiguity_override
881: ,p_is_phantom => 'N'
882: ,x_exception_material_tbl => x_exception_material_tbl

Line 884: IF x_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_inv_short_err,'C') THEN

880: ,p_contiguity_override => p_contiguity_override
881: ,p_is_phantom => 'N'
882: ,x_exception_material_tbl => x_exception_material_tbl
883: );
884: IF x_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_inv_short_err,'C') THEN
885: IF g_debug <= gme_debug.g_log_procedure THEN
886: gme_debug.put_line ('Error in Create Batch: return status'||x_return_status);
887: END IF;
888: RAISE fnd_api.g_exc_error;

Line 888: RAISE fnd_api.g_exc_error;

884: IF x_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_inv_short_err,'C') THEN
885: IF g_debug <= gme_debug.g_log_procedure THEN
886: gme_debug.put_line ('Error in Create Batch: return status'||x_return_status);
887: END IF;
888: RAISE fnd_api.g_exc_error;
889: END IF;
890: IF g_debug <= gme_debug.g_log_procedure THEN
891: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
892: END IF;

Line 896: WHEN fnd_api.g_exc_error THEN

892: END IF;
893:
894:
895: EXCEPTION
896: WHEN fnd_api.g_exc_error THEN
897: x_return_status := fnd_api.g_ret_sts_error;
898: x_batch_header_rec := null;
899: gme_common_pvt.count_and_get (x_count => x_message_count
900: ,p_encoded => fnd_api.g_false

Line 897: x_return_status := fnd_api.g_ret_sts_error;

893:
894:
895: EXCEPTION
896: WHEN fnd_api.g_exc_error THEN
897: x_return_status := fnd_api.g_ret_sts_error;
898: x_batch_header_rec := null;
899: gme_common_pvt.count_and_get (x_count => x_message_count
900: ,p_encoded => fnd_api.g_false
901: ,x_data => x_message_list);

Line 900: ,p_encoded => fnd_api.g_false

896: WHEN fnd_api.g_exc_error THEN
897: x_return_status := fnd_api.g_ret_sts_error;
898: x_batch_header_rec := null;
899: gme_common_pvt.count_and_get (x_count => x_message_count
900: ,p_encoded => fnd_api.g_false
901: ,x_data => x_message_list);
902: WHEN fnd_api.g_exc_unexpected_error THEN
903: x_return_status := fnd_api.g_ret_sts_unexp_error;
904: x_batch_header_rec := null;

Line 902: WHEN fnd_api.g_exc_unexpected_error THEN

898: x_batch_header_rec := null;
899: gme_common_pvt.count_and_get (x_count => x_message_count
900: ,p_encoded => fnd_api.g_false
901: ,x_data => x_message_list);
902: WHEN fnd_api.g_exc_unexpected_error THEN
903: x_return_status := fnd_api.g_ret_sts_unexp_error;
904: x_batch_header_rec := null;
905: gme_common_pvt.count_and_get (x_count => x_message_count
906: ,p_encoded => fnd_api.g_false

Line 903: x_return_status := fnd_api.g_ret_sts_unexp_error;

899: gme_common_pvt.count_and_get (x_count => x_message_count
900: ,p_encoded => fnd_api.g_false
901: ,x_data => x_message_list);
902: WHEN fnd_api.g_exc_unexpected_error THEN
903: x_return_status := fnd_api.g_ret_sts_unexp_error;
904: x_batch_header_rec := null;
905: gme_common_pvt.count_and_get (x_count => x_message_count
906: ,p_encoded => fnd_api.g_false
907: ,x_data => x_message_list);

Line 906: ,p_encoded => fnd_api.g_false

902: WHEN fnd_api.g_exc_unexpected_error THEN
903: x_return_status := fnd_api.g_ret_sts_unexp_error;
904: x_batch_header_rec := null;
905: gme_common_pvt.count_and_get (x_count => x_message_count
906: ,p_encoded => fnd_api.g_false
907: ,x_data => x_message_list);
908: WHEN OTHERS THEN
909: x_return_status := fnd_api.g_ret_sts_unexp_error;
910: x_batch_header_rec := null;

Line 909: x_return_status := fnd_api.g_ret_sts_unexp_error;

905: gme_common_pvt.count_and_get (x_count => x_message_count
906: ,p_encoded => fnd_api.g_false
907: ,x_data => x_message_list);
908: WHEN OTHERS THEN
909: x_return_status := fnd_api.g_ret_sts_unexp_error;
910: x_batch_header_rec := null;
911: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
912: gme_debug.put_line ( g_pkg_name
913: || '.'

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

952: ,p_called_by => 'S'
953: ,x_open_qty => l_open_qty
954: ,x_return_status => l_return_status);
955:
956: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
957: RETURN 0;
958: ELSE
959: RETURN l_open_qty;
960: END IF;

Line 1089: ,p_encoded => fnd_api.g_false

1085: EXCEPTION
1086: WHEN error_unexpected OR fetch_error THEN
1087: RETURN 0;
1088: gme_common_pvt.count_and_get (x_count => l_msg_count
1089: ,p_encoded => fnd_api.g_false
1090: ,x_data => l_msg_list);
1091:
1092: WHEN OTHERS THEN
1093: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 1216: x_return_status := fnd_api.g_ret_sts_error;

1212: gme_common_pvt.g_setup_done :=
1213: gme_common_pvt.setup (p_org_id => p_org_id);
1214:
1215: IF NOT gme_common_pvt.g_setup_done THEN
1216: x_return_status := fnd_api.g_ret_sts_error;
1217: RAISE setup_failure;
1218: END IF;
1219: --set the timestamp
1220: gme_common_pvt.set_timestamp;

Line 1310: p_encoded => fnd_api.g_false,

1306:
1307: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec, l_batch_header_rec)) THEN
1308: l_oneitem_error := TRUE;
1309: gme_common_pvt.count_and_get (x_count => l_message_count,
1310: p_encoded => fnd_api.g_false,
1311: x_data => l_message_list
1312: );
1313: GOTO NEXT_RECORD; --GO to next record
1314: END IF;

Line 1324: p_encoded => fnd_api.g_false,

1320: x_material_detail => l_material_detail_rec
1321: ) THEN
1322: l_oneitem_error := TRUE;
1323: gme_common_pvt.count_and_get (x_count => l_message_count,
1324: p_encoded => fnd_api.g_false,
1325: x_data => l_message_list
1326: );
1327: --FPBug#4991508 replaced hard coded output messages
1328: /*

Line 1355: p_encoded => fnd_api.g_false,

1351: ,p_token5_name => 'MSG'
1352: ,P_token5_value => l_message_list
1353: );
1354: gme_common_pvt.count_and_get (x_count => l_message_count,
1355: p_encoded => fnd_api.g_false,
1356: x_data => l_message_list
1357: );
1358: fnd_file.put(fnd_file.output,l_message_list);
1359: fnd_file.new_line (fnd_file.output, 1);

Line 1405: p_encoded => fnd_api.g_false,

1401: ,p_token5_name => 'NEWITEM'
1402: ,P_token5_value => l_new_item_rec.concatenated_segments
1403: );
1404: gme_common_pvt.count_and_get (x_count => l_message_count,
1405: p_encoded => fnd_api.g_false,
1406: x_data => l_message_list
1407: );
1408: fnd_file.put(fnd_file.output,l_message_list);
1409: fnd_file.new_line (fnd_file.output, 1);

Line 1444: p_encoded => fnd_api.g_false,

1440: ,p_token5_name => 'NEWITEM'
1441: ,P_token5_value => l_new_item_rec.concatenated_segments
1442: );
1443: gme_common_pvt.count_and_get (x_count => l_message_count,
1444: p_encoded => fnd_api.g_false,
1445: x_data => l_message_list
1446: );
1447: fnd_file.put(fnd_file.output,l_message_list);
1448: fnd_file.new_line (fnd_file.output, 1);

Line 1462: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1458: ,p_batch_id => rec.batch_id
1459: ,p_material_detail_id => rec.material_detail_id
1460: ,x_return_status => l_return_status);
1461:
1462: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1463: l_oneitem_error := TRUE;
1464: gme_common_pvt.count_and_get (x_count => l_message_count,
1465: p_encoded => fnd_api.g_false,
1466: x_data => l_message_list

Line 1465: p_encoded => fnd_api.g_false,

1461:
1462: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1463: l_oneitem_error := TRUE;
1464: gme_common_pvt.count_and_get (x_count => l_message_count,
1465: p_encoded => fnd_api.g_false,
1466: x_data => l_message_list
1467: );
1468: --FPBug#4991508 replaced hard coded output messages
1469: /*

Line 1496: p_encoded => fnd_api.g_false,

1492: ,p_token5_name => 'MSG'
1493: ,P_token5_value => l_message_list
1494: );
1495: gme_common_pvt.count_and_get (x_count => l_message_count,
1496: p_encoded => fnd_api.g_false,
1497: x_data => l_message_list
1498: );
1499: fnd_file.put(fnd_file.output,l_message_list);
1500: fnd_file.new_line (fnd_file.output, 1);

Line 1513: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1509: ,p_material_detail_id => rec.material_detail_id
1510: ,p_invis_move_line_id => rec.move_order_line_id
1511: ,x_return_status => l_return_status);
1512:
1513: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1514: l_oneitem_error := TRUE;
1515: gme_common_pvt.count_and_get (x_count => l_message_count,
1516: p_encoded => fnd_api.g_false,
1517: x_data => l_message_list

Line 1516: p_encoded => fnd_api.g_false,

1512:
1513: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1514: l_oneitem_error := TRUE;
1515: gme_common_pvt.count_and_get (x_count => l_message_count,
1516: p_encoded => fnd_api.g_false,
1517: x_data => l_message_list
1518: );
1519: --FPBug#4991508 replaced hard coded output messages
1520: /*

Line 1547: p_encoded => fnd_api.g_false,

1543: ,p_token5_name => 'MSG'
1544: ,P_token5_value => l_message_list
1545: );
1546: gme_common_pvt.count_and_get (x_count => l_message_count,
1547: p_encoded => fnd_api.g_false,
1548: x_data => l_message_list
1549: );
1550: fnd_file.put(fnd_file.output,l_message_list);
1551: fnd_file.new_line (fnd_file.output, 1);

Line 1553: END IF; --IF l_return_status <> fnd_api.g_ret_sts_success THEN

1549: );
1550: fnd_file.put(fnd_file.output,l_message_list);
1551: fnd_file.new_line (fnd_file.output, 1);
1552: GOTO NEXT_RECORD; --GO to next record
1553: END IF; --IF l_return_status <> fnd_api.g_ret_sts_success THEN
1554: END IF; --IF l_new_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
1555: END IF; -- l_batch_header_rec.update_inventory_ind = 'Y'
1556:
1557: l_return_status := NULL;

Line 1592: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1588: ,x_material_details_tbl => l_material_details_tbl_out
1589: ,x_trolin_tbl => l_trolin_tbl
1590: ,x_return_status => l_return_status);
1591:
1592: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1593: l_oneitem_error := TRUE;
1594: gme_common_pvt.count_and_get (x_count => l_message_count,
1595: p_encoded => fnd_api.g_false,
1596: x_data => l_message_list

Line 1595: p_encoded => fnd_api.g_false,

1591:
1592: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1593: l_oneitem_error := TRUE;
1594: gme_common_pvt.count_and_get (x_count => l_message_count,
1595: p_encoded => fnd_api.g_false,
1596: x_data => l_message_list
1597: );
1598:
1599: --FPBug#4991508 replaced hard coded output messages

Line 1627: p_encoded => fnd_api.g_false,

1623: ,p_token5_name => 'MSG'
1624: ,P_token5_value => l_message_list
1625: );
1626: gme_common_pvt.count_and_get (x_count => l_message_count,
1627: p_encoded => fnd_api.g_false,
1628: x_data => l_message_list
1629: );
1630: fnd_file.put(fnd_file.output,l_message_list);
1631: fnd_file.new_line (fnd_file.output, 1);

Line 1646: p_encoded => fnd_api.g_false,

1642: l_return := gme_material_details_dbl.update_row (l_material_detail_rec);
1643:
1644: IF (l_return = FALSE) THEN
1645: gme_common_pvt.count_and_get (x_count => l_message_count,
1646: p_encoded => fnd_api.g_false,
1647: x_data => l_message_list
1648: );
1649: l_oneitem_error := TRUE;
1650: --FPBug#4991508 replaced hard coded output messages

Line 1678: p_encoded => fnd_api.g_false,

1674: ,p_token5_name => 'MSG'
1675: ,P_token5_value => l_message_list
1676: );
1677: gme_common_pvt.count_and_get (x_count => l_message_count,
1678: p_encoded => fnd_api.g_false,
1679: x_data => l_message_list
1680: );
1681: fnd_file.put(fnd_file.output,l_message_list);
1682: fnd_file.new_line (fnd_file.output, 1);

Line 1715: IF l_return_status IN (fnd_api.g_ret_sts_unexp_error, fnd_api.g_ret_sts_error) THEN

1711: gme_debug.put_line ('return status from auto detail line is: ' || l_return_status);
1712: END IF;
1713:
1714: -- Validate Return Status
1715: IF l_return_status IN (fnd_api.g_ret_sts_unexp_error, fnd_api.g_ret_sts_error) THEN
1716: gme_common_pvt.count_and_get (x_count => l_message_count,
1717: p_encoded => fnd_api.g_false,
1718: x_data => l_message_list
1719: );

Line 1717: p_encoded => fnd_api.g_false,

1713:
1714: -- Validate Return Status
1715: IF l_return_status IN (fnd_api.g_ret_sts_unexp_error, fnd_api.g_ret_sts_error) THEN
1716: gme_common_pvt.count_and_get (x_count => l_message_count,
1717: p_encoded => fnd_api.g_false,
1718: x_data => l_message_list
1719: );
1720: l_oneitem_error := TRUE;
1721:

Line 1747: p_encoded => fnd_api.g_false,

1743: ,p_token5_name => 'MSG'
1744: ,P_token5_value => l_message_list
1745: );
1746: gme_common_pvt.count_and_get (x_count => l_message_count,
1747: p_encoded => fnd_api.g_false,
1748: x_data => l_message_list
1749: );
1750: fnd_file.put(fnd_file.output,l_message_list);
1751: fnd_file.new_line (fnd_file.output, 1);

Line 1754: END IF; -- IF l_return_status IN (fnd_api.g_ret_sts_unexp_error, fnd_api.g_ret_sts_error) THEN

1750: fnd_file.put(fnd_file.output,l_message_list);
1751: fnd_file.new_line (fnd_file.output, 1);
1752: ROLLBACK TO create_trans;
1753: GOTO NEXT_RECORD; --GO to next record
1754: END IF; -- IF l_return_status IN (fnd_api.g_ret_sts_unexp_error, fnd_api.g_ret_sts_error) THEN
1755:
1756: END IF; -- update inventory ind
1757:
1758: End Bug 7352169 - do not call auto detail line. */

Line 1778: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1774: x_rsc_row_count => l_rsc_trans_count,
1775: x_return_status => l_return_status
1776: );
1777:
1778: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1779: gme_common_pvt.count_and_get (x_count => l_message_count,
1780: p_encoded => fnd_api.g_false,
1781: x_data => l_message_list
1782: );

Line 1780: p_encoded => fnd_api.g_false,

1776: );
1777:
1778: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1779: gme_common_pvt.count_and_get (x_count => l_message_count,
1780: p_encoded => fnd_api.g_false,
1781: x_data => l_message_list
1782: );
1783: l_oneitem_error := TRUE;
1784: --FPBug#4991508 replaced hard coded output messages

Line 1812: p_encoded => fnd_api.g_false,

1808: ,p_token5_name => 'MSG'
1809: ,P_token5_value => l_message_list
1810: );
1811: gme_common_pvt.count_and_get (x_count => l_message_count,
1812: p_encoded => fnd_api.g_false,
1813: x_data => l_message_list
1814: );
1815: fnd_file.put(fnd_file.output,l_message_list);
1816: fnd_file.new_line (fnd_file.output, 1);

Line 1840: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1836: gme_debug.put_line ('After update step qty, return status is: ' || x_return_status);
1837: END IF;
1838: -- Swapna K Bug#4354690 12-MAY-2005
1839: /* l_return_status is replaced with x_return_status in the below if condition */
1840: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1841: gme_common_pvt.count_and_get (x_count => l_message_count,
1842: p_encoded => fnd_api.g_false,
1843: x_data => l_message_list
1844: );

Line 1842: p_encoded => fnd_api.g_false,

1838: -- Swapna K Bug#4354690 12-MAY-2005
1839: /* l_return_status is replaced with x_return_status in the below if condition */
1840: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1841: gme_common_pvt.count_and_get (x_count => l_message_count,
1842: p_encoded => fnd_api.g_false,
1843: x_data => l_message_list
1844: );
1845: l_oneitem_error := TRUE;
1846:

Line 1875: p_encoded => fnd_api.g_false,

1871: ,p_token5_name => 'MSG'
1872: ,P_token5_value => l_message_list
1873: );
1874: gme_common_pvt.count_and_get (x_count => l_message_count,
1875: p_encoded => fnd_api.g_false,
1876: x_data => l_message_list
1877: );
1878: fnd_file.put(fnd_file.output,l_message_list);
1879: fnd_file.new_line (fnd_file.output, 1);

Line 1900: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1896: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1897: gme_debug.put_line ('After consolidate resource transactions' || x_return_status);
1898: END IF;
1899:
1900: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1901: gme_common_pvt.count_and_get (x_count => l_message_count,
1902: p_encoded => fnd_api.g_false,
1903: x_data => l_message_list
1904: );

Line 1902: p_encoded => fnd_api.g_false,

1898: END IF;
1899:
1900: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1901: gme_common_pvt.count_and_get (x_count => l_message_count,
1902: p_encoded => fnd_api.g_false,
1903: x_data => l_message_list
1904: );
1905: l_oneitem_error := TRUE;
1906:

Line 1935: p_encoded => fnd_api.g_false,

1931: ,p_token5_name => 'MSG'
1932: ,P_token5_value => l_message_list
1933: );
1934: gme_common_pvt.count_and_get (x_count => l_message_count,
1935: p_encoded => fnd_api.g_false,
1936: x_data => l_message_list
1937: );
1938: fnd_file.put(fnd_file.output,l_message_list);
1939: fnd_file.new_line (fnd_file.output, 1);

Line 1979: p_encoded => fnd_api.g_false,

1975: ,p_token6_name => 'NEWQTY'
1976: ,P_token6_value => l_formula_tbl (1).qty||' '||l_formula_tbl (1).detail_uom
1977: );
1978: gme_common_pvt.count_and_get (x_count => l_message_count,
1979: p_encoded => fnd_api.g_false,
1980: x_data => l_message_list
1981: );
1982: fnd_file.put(fnd_file.output,l_message_list);
1983: fnd_file.new_line (fnd_file.output, 1);

Line 1994: p_encoded => fnd_api.g_false,

1990:
1991: IF l_oneitem_success = TRUE AND l_oneitem_error = TRUE THEN
1992: gme_common_pvt.log_message('GME_ATLEAST_ONE_NOT_SUBSTITUTE');
1993: gme_common_pvt.count_and_get (x_count => l_message_count,
1994: p_encoded => fnd_api.g_false,
1995: x_data => l_message_list
1996: );
1997: fnd_file.put(fnd_file.output,l_message_list);
1998:

Line 2016: p_encoded => fnd_api.g_false,

2012: */
2013:
2014: gme_common_pvt.log_message('GME_NONE_SUBSTITUTED');
2015: gme_common_pvt.count_and_get (x_count => l_message_count,
2016: p_encoded => fnd_api.g_false,
2017: x_data => l_message_list
2018: );
2019: fnd_file.put(fnd_file.output,l_message_list);
2020: errbuf := l_message_list;

Line 2032: p_encoded => fnd_api.g_false,

2028:
2029: errbuf := 'Substitutions are successful';
2030: gme_common_pvt.log_message('GME_SUBSTITUTION_SUCCESSFUL');
2031: gme_common_pvt.count_and_get (x_count => l_message_count,
2032: p_encoded => fnd_api.g_false,
2033: x_data => l_message_list
2034: );
2035: fnd_file.put(fnd_file.output,l_message_list);
2036: errbuf := l_message_list;

Line 2061: -- In exception block 'E', 'S' are replaced by FND_API variables.

2057: --
2058: -- HISTORY:
2059: -- siva FPBug# 4684029
2060: -- siva FPBug#4684029 rework
2061: -- In exception block 'E', 'S' are replaced by FND_API variables.
2062: -- SivakumarG Bug#5111078 Added x_total_wip_plan_qty parameter
2063: ======================================================================*/
2064: PROCEDURE get_total_qty(
2065: p_batch_id IN NUMBER,

Line 2227: x_return_status := fnd_api.g_ret_sts_success;

2223: gme_debug.put_line('Qtys being returned are:');
2224: gme_debug.put_line('Total plan qty '||l_total_plan_qty);
2225: gme_debug.put_line('Total actual qty '||l_total_actual_qty);
2226: END IF;
2227: x_return_status := fnd_api.g_ret_sts_success;
2228: EXCEPTION
2229: WHEN uom_conversion_failure THEN
2230: x_return_status := fnd_api.g_ret_sts_error;
2231: WHEN invalid_batch_id THEN

Line 2230: x_return_status := fnd_api.g_ret_sts_error;

2226: END IF;
2227: x_return_status := fnd_api.g_ret_sts_success;
2228: EXCEPTION
2229: WHEN uom_conversion_failure THEN
2230: x_return_status := fnd_api.g_ret_sts_error;
2231: WHEN invalid_batch_id THEN
2232: x_return_status := fnd_api.g_ret_sts_error;
2233: WHEN OTHERS THEN
2234: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2232: x_return_status := fnd_api.g_ret_sts_error;

2228: EXCEPTION
2229: WHEN uom_conversion_failure THEN
2230: x_return_status := fnd_api.g_ret_sts_error;
2231: WHEN invalid_batch_id THEN
2232: x_return_status := fnd_api.g_ret_sts_error;
2233: WHEN OTHERS THEN
2234: x_return_status := fnd_api.g_ret_sts_unexp_error;
2235: fnd_file.put (fnd_file.LOG, SQLERRM);
2236: fnd_file.new_line (fnd_file.LOG, 1);

Line 2234: x_return_status := fnd_api.g_ret_sts_unexp_error;

2230: x_return_status := fnd_api.g_ret_sts_error;
2231: WHEN invalid_batch_id THEN
2232: x_return_status := fnd_api.g_ret_sts_error;
2233: WHEN OTHERS THEN
2234: x_return_status := fnd_api.g_ret_sts_unexp_error;
2235: fnd_file.put (fnd_file.LOG, SQLERRM);
2236: fnd_file.new_line (fnd_file.LOG, 1);
2237: END get_total_qty;
2238:

Line 2273: x_return_status := fnd_api.g_ret_sts_success;

2269: gme_debug.g_log_procedure THEN
2270: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2271: END IF;
2272: -- Initially let us assign the return status to success
2273: x_return_status := fnd_api.g_ret_sts_success;
2274:
2275: /* Get transaction line and lots */
2276: gme_transactions_pvt.get_transactions
2277: ( p_transaction_id => p_transaction_id

Line 2282: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2278: ,x_mmt_rec => l_mmt_rec
2279: ,x_mmln_tbl => l_mmln_tbl
2280: ,x_return_status => x_return_status
2281: );
2282: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2283: RAISE fnd_api.g_exc_error;
2284: END IF;
2285:
2286: l_ret := gme_unrelease_batch_pvt.check_inv_negative

Line 2283: RAISE fnd_api.g_exc_error;

2279: ,x_mmln_tbl => l_mmln_tbl
2280: ,x_return_status => x_return_status
2281: );
2282: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2283: RAISE fnd_api.g_exc_error;
2284: END IF;
2285:
2286: l_ret := gme_unrelease_batch_pvt.check_inv_negative
2287: ( p_mmt_rec => l_mmt_rec

Line 2293: RAISE fnd_api.g_exc_error;

2289: ,p_org_neg_control => gme_common_pvt.g_allow_neg_inv
2290: ,p_item_no => p_item_no
2291: );
2292: IF l_ret THEN
2293: RAISE fnd_api.g_exc_error;
2294: END IF;
2295:
2296: gme_common_pvt.count_and_get
2297: ( x_count => x_msg_count

Line 2298: ,p_encoded => fnd_api.g_false

2294: END IF;
2295:
2296: gme_common_pvt.count_and_get
2297: ( x_count => x_msg_count
2298: ,p_encoded => fnd_api.g_false
2299: ,x_data => x_msg_data);
2300:
2301: IF (g_debug <= gme_debug.g_log_statement) THEN
2302: gme_debug.put_line ( g_pkg_name

Line 2312: WHEN fnd_api.g_exc_error THEN

2308: END IF;
2309:
2310: EXCEPTION
2311:
2312: WHEN fnd_api.g_exc_error THEN
2313: x_return_status := fnd_api.g_ret_sts_error;
2314: gme_common_pvt.count_and_get
2315: ( x_count => x_msg_count
2316: ,p_encoded => fnd_api.g_false

Line 2313: x_return_status := fnd_api.g_ret_sts_error;

2309:
2310: EXCEPTION
2311:
2312: WHEN fnd_api.g_exc_error THEN
2313: x_return_status := fnd_api.g_ret_sts_error;
2314: gme_common_pvt.count_and_get
2315: ( x_count => x_msg_count
2316: ,p_encoded => fnd_api.g_false
2317: ,x_data => x_msg_data);

Line 2316: ,p_encoded => fnd_api.g_false

2312: WHEN fnd_api.g_exc_error THEN
2313: x_return_status := fnd_api.g_ret_sts_error;
2314: gme_common_pvt.count_and_get
2315: ( x_count => x_msg_count
2316: ,p_encoded => fnd_api.g_false
2317: ,x_data => x_msg_data);
2318: WHEN fnd_api.g_exc_unexpected_error THEN
2319: x_return_status := fnd_api.g_ret_sts_unexp_error;
2320: gme_common_pvt.count_and_get

Line 2318: WHEN fnd_api.g_exc_unexpected_error THEN

2314: gme_common_pvt.count_and_get
2315: ( x_count => x_msg_count
2316: ,p_encoded => fnd_api.g_false
2317: ,x_data => x_msg_data);
2318: WHEN fnd_api.g_exc_unexpected_error THEN
2319: x_return_status := fnd_api.g_ret_sts_unexp_error;
2320: gme_common_pvt.count_and_get
2321: ( x_count => x_msg_count
2322: ,p_encoded => fnd_api.g_false

Line 2319: x_return_status := fnd_api.g_ret_sts_unexp_error;

2315: ( x_count => x_msg_count
2316: ,p_encoded => fnd_api.g_false
2317: ,x_data => x_msg_data);
2318: WHEN fnd_api.g_exc_unexpected_error THEN
2319: x_return_status := fnd_api.g_ret_sts_unexp_error;
2320: gme_common_pvt.count_and_get
2321: ( x_count => x_msg_count
2322: ,p_encoded => fnd_api.g_false
2323: ,x_data => x_msg_data);

Line 2322: ,p_encoded => fnd_api.g_false

2318: WHEN fnd_api.g_exc_unexpected_error THEN
2319: x_return_status := fnd_api.g_ret_sts_unexp_error;
2320: gme_common_pvt.count_and_get
2321: ( x_count => x_msg_count
2322: ,p_encoded => fnd_api.g_false
2323: ,x_data => x_msg_data);
2324: WHEN OTHERS THEN
2325: x_return_status := fnd_api.g_ret_sts_unexp_error;
2326: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2325: x_return_status := fnd_api.g_ret_sts_unexp_error;

2321: ( x_count => x_msg_count
2322: ,p_encoded => fnd_api.g_false
2323: ,x_data => x_msg_data);
2324: WHEN OTHERS THEN
2325: x_return_status := fnd_api.g_ret_sts_unexp_error;
2326: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2327: gme_common_pvt.count_and_get
2328: ( x_count => x_msg_count
2329: ,p_encoded => fnd_api.g_false

Line 2329: ,p_encoded => fnd_api.g_false

2325: x_return_status := fnd_api.g_ret_sts_unexp_error;
2326: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2327: gme_common_pvt.count_and_get
2328: ( x_count => x_msg_count
2329: ,p_encoded => fnd_api.g_false
2330: ,x_data => x_msg_data);
2331: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2332: gme_debug.put_line ( g_pkg_name
2333: || '.'

Line 2441: x_return_status := FND_API.G_RET_STS_SUCCESS;

2437: BEGIN
2438: IF g_debug <= gme_debug.g_log_procedure THEN
2439: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2440: END IF;
2441: x_return_status := FND_API.G_RET_STS_SUCCESS;
2442: OPEN x_resvns_cur FOR
2443: SELECT mr.*
2444: FROM mtl_reservations mr
2445: WHERE mr.organization_id = p_organization_id

Line 2456: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2452: AND organization_id = p_organization_id)
2453: ORDER BY mr.requirement_date, mr.reservation_id;
2454: EXCEPTION
2455: WHEN OTHERS THEN
2456: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2457: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2458: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2459: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2460: END IF;

Line 2471: x_return_status := FND_API.G_RET_STS_SUCCESS;

2467: BEGIN
2468: IF g_debug <= gme_debug.g_log_procedure THEN
2469: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2470: END IF;
2471: x_return_status := FND_API.G_RET_STS_SUCCESS;
2472: OPEN x_pplot_cur FOR
2473: SELECT *
2474: FROM gme_pending_product_lots
2475: WHERE material_detail_id = p_mat_det_id

Line 2479: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2475: WHERE material_detail_id = p_mat_det_id
2476: ORDER BY sequence asc, lot_number asc;
2477: EXCEPTION
2478: WHEN OTHERS THEN
2479: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2480: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2481: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2482: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2483: END IF;

Line 2496: x_return_status := FND_API.G_RET_STS_SUCCESS;

2492: BEGIN
2493: IF g_debug <= gme_debug.g_log_procedure THEN
2494: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2495: END IF;
2496: x_return_status := FND_API.G_RET_STS_SUCCESS;
2497: OPEN x_txns_cur FOR
2498: SELECT *
2499: FROM mtl_material_transactions mmt
2500: WHERE trx_source_line_id = p_mat_det_id

Line 2511: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2507: AND pair_type = gme_common_pvt.g_pairs_reversal_type)
2508: ORDER BY mmt.transaction_id;
2509: EXCEPTION
2510: WHEN OTHERS THEN
2511: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2512: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2513: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2514: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2515: END IF;

Line 2526: x_return_status := FND_API.G_RET_STS_SUCCESS;

2522: BEGIN
2523: IF g_debug <= gme_debug.g_log_procedure THEN
2524: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2525: END IF;
2526: x_return_status := FND_API.G_RET_STS_SUCCESS;
2527: OPEN x_lot_txns_cur FOR
2528: SELECT *
2529: FROM mtl_transaction_lot_numbers
2530: WHERE transaction_id = p_transaction_id;

Line 2533: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2529: FROM mtl_transaction_lot_numbers
2530: WHERE transaction_id = p_transaction_id;
2531: EXCEPTION
2532: WHEN OTHERS THEN
2533: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2534: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2535: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2536: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2537: END IF;

Line 2552: x_return_status := FND_API.G_RET_STS_SUCCESS;

2548: BEGIN
2549: IF g_debug <= gme_debug.g_log_procedure THEN
2550: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2551: END IF;
2552: x_return_status := FND_API.G_RET_STS_SUCCESS;
2553: IF NOT(gme_common_pvt.g_setup_done) THEN
2554: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2555: IF NOT(gme_common_pvt.g_setup_done) THEN
2556: RAISE setup_failed;

Line 2566: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2562: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => p_mmti_rec,
2563: p_mmli_tbl => p_mmli_tbl,
2564: p_mode => 'I',
2565: x_return_status => l_return_status);
2566: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2567: RAISE validate_txn_fail;
2568: END IF;
2569: gme_transactions_pvt.create_material_txn(p_mmti_rec => p_mmti_rec,
2570: p_mmli_tbl => p_mmli_tbl,

Line 2572: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2568: END IF;
2569: gme_transactions_pvt.create_material_txn(p_mmti_rec => p_mmti_rec,
2570: p_mmli_tbl => p_mmli_tbl,
2571: x_return_status => l_return_status);
2572: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2573: RAISE create_txn_fail;
2574: END IF;
2575: IF g_debug <= gme_debug.g_log_procedure THEN
2576: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

Line 2580: x_return_status := FND_API.G_RET_STS_ERROR;

2576: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2577: END IF;
2578: EXCEPTION
2579: WHEN setup_failed THEN
2580: x_return_status := FND_API.G_RET_STS_ERROR;
2581: WHEN create_txn_fail OR validate_txn_fail THEN
2582: x_return_status := l_return_status;
2583: WHEN OTHERS THEN
2584: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2584: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2580: x_return_status := FND_API.G_RET_STS_ERROR;
2581: WHEN create_txn_fail OR validate_txn_fail THEN
2582: x_return_status := l_return_status;
2583: WHEN OTHERS THEN
2584: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2585: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2586: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2587: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2588: END IF;

Line 2613: x_return_status := FND_API.G_RET_STS_SUCCESS;

2609: BEGIN
2610: IF g_debug <= gme_debug.g_log_procedure THEN
2611: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2612: END IF;
2613: x_return_status := FND_API.G_RET_STS_SUCCESS;
2614: IF NOT(gme_common_pvt.g_setup_done) THEN
2615: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2616: IF NOT(gme_common_pvt.g_setup_done) THEN
2617: RAISE setup_failed;

Line 2636: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2632: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => p_mmti_rec,
2633: p_mmli_tbl => p_mmli_tbl,
2634: p_mode => 'U',
2635: x_return_status => l_return_status);
2636: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2637: RAISE validate_txn_fail;
2638: END IF;
2639: gme_transactions_pvt.update_material_txn(p_transaction_id => p_transaction_id,
2640: p_mmti_rec => p_mmti_rec,

Line 2643: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2639: gme_transactions_pvt.update_material_txn(p_transaction_id => p_transaction_id,
2640: p_mmti_rec => p_mmti_rec,
2641: p_mmli_tbl => p_mmli_tbl,
2642: x_return_status => l_return_status);
2643: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2644: RAISE update_txn_fail;
2645: END IF;
2646: IF g_debug <= gme_debug.g_log_procedure THEN
2647: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

Line 2651: x_return_status := FND_API.G_RET_STS_ERROR;

2647: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2648: END IF;
2649: EXCEPTION
2650: WHEN setup_failed THEN
2651: x_return_status := FND_API.G_RET_STS_ERROR;
2652: WHEN update_txn_mismatch THEN
2653: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
2654: x_return_status := FND_API.G_RET_STS_ERROR;
2655: WHEN update_txn_fail OR validate_txn_fail THEN

Line 2654: x_return_status := FND_API.G_RET_STS_ERROR;

2650: WHEN setup_failed THEN
2651: x_return_status := FND_API.G_RET_STS_ERROR;
2652: WHEN update_txn_mismatch THEN
2653: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
2654: x_return_status := FND_API.G_RET_STS_ERROR;
2655: WHEN update_txn_fail OR validate_txn_fail THEN
2656: x_return_status := l_return_status;
2657: WHEN OTHERS THEN
2658: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2658: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2654: x_return_status := FND_API.G_RET_STS_ERROR;
2655: WHEN update_txn_fail OR validate_txn_fail THEN
2656: x_return_status := l_return_status;
2657: WHEN OTHERS THEN
2658: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2659: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2660: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2661: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2662: END IF;

Line 2683: x_return_status := FND_API.G_RET_STS_SUCCESS;

2679: BEGIN
2680: IF g_debug <= gme_debug.g_log_procedure THEN
2681: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2682: END IF;
2683: x_return_status := FND_API.G_RET_STS_SUCCESS;
2684: IF NOT(gme_common_pvt.g_setup_done) THEN
2685: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_organization_id);
2686: IF NOT(gme_common_pvt.g_setup_done) THEN
2687: RAISE setup_failed;

Line 2697: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2693: gme_transactions_pvt.get_mmt_transactions(p_transaction_id => p_transaction_id,
2694: x_mmt_rec => l_mmt_rec,
2695: x_mmln_tbl => l_mmln_tbl,
2696: x_return_status => l_return_status);
2697: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2698: RAISE get_txn_fail;
2699: END IF;
2700: gme_transactions_pvt.construct_mmti(p_mmt_rec => l_mmt_rec,
2701: p_mmln_tbl => l_mmln_tbl,

Line 2705: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2701: p_mmln_tbl => l_mmln_tbl,
2702: x_mmti_rec => l_mmti_rec,
2703: x_mmli_tbl => l_mmli_tbl,
2704: x_return_status => l_return_status);
2705: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2706: RAISE const_txn_fail;
2707: END IF;
2708: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => l_mmti_rec,
2709: p_mmli_tbl => l_mmli_tbl,

Line 2712: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2708: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => l_mmti_rec,
2709: p_mmli_tbl => l_mmli_tbl,
2710: p_mode => 'D',
2711: x_return_status => l_return_status);
2712: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2713: RAISE validate_txn_fail;
2714: END IF;
2715: gme_transactions_pvt.delete_material_txn(p_transaction_id => p_transaction_id,
2716: x_return_status => l_return_status);

Line 2717: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2713: RAISE validate_txn_fail;
2714: END IF;
2715: gme_transactions_pvt.delete_material_txn(p_transaction_id => p_transaction_id,
2716: x_return_status => l_return_status);
2717: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2718: RAISE delete_txn_fail;
2719: END IF;
2720: IF g_debug <= gme_debug.g_log_procedure THEN
2721: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

Line 2725: x_return_status := FND_API.G_RET_STS_ERROR;

2721: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2722: END IF;
2723: EXCEPTION
2724: WHEN setup_failed THEN
2725: x_return_status := FND_API.G_RET_STS_ERROR;
2726: WHEN delete_txn_fail OR get_txn_fail OR const_txn_fail OR validate_txn_fail THEN
2727: x_return_status := l_return_status;
2728: WHEN OTHERS THEN
2729: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2729: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2725: x_return_status := FND_API.G_RET_STS_ERROR;
2726: WHEN delete_txn_fail OR get_txn_fail OR const_txn_fail OR validate_txn_fail THEN
2727: x_return_status := l_return_status;
2728: WHEN OTHERS THEN
2729: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2730: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2731: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2732: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2733: END IF;

Line 2766: x_return_status := FND_API.G_RET_STS_SUCCESS;

2762: BEGIN
2763: IF g_debug <= gme_debug.g_log_procedure THEN
2764: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2765: END IF;
2766: x_return_status := FND_API.G_RET_STS_SUCCESS;
2767: IF NOT(gme_common_pvt.g_setup_done) THEN
2768: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2769: IF NOT(gme_common_pvt.g_setup_done) THEN
2770: RAISE setup_failed;

Line 2792: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2788: ,x_instance_id => l_instance_id
2789: ,x_reason_id => l_reason_id
2790: ,x_return_status => l_return_status
2791: ,x_trans_date => l_trans_date);
2792: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2793: RAISE validate_txn_fail;
2794: END IF;
2795: l_usage_time := (p_rsrc_txn_gtmp_rec.end_date - p_rsrc_txn_gtmp_rec.start_date) * 24;
2796: l_hour_um := fnd_profile.value_specific(name => 'BOM:HOUR_UOM_CODE'

Line 2822: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2818: l_rsrc_txn_gtmp_rec.resource_usage := l_txn_usage;
2819: gme_resource_engine_pvt.create_resource_trans(p_tran_rec => l_rsrc_txn_gtmp_rec
2820: ,x_tran_rec => x_rsrc_txn_gtmp_rec
2821: ,x_return_status => l_return_status);
2822: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2823: RAISE create_txn_fail;
2824: END IF;
2825: l_step_resources.batchstep_resource_id := l_rsrc_txn_gtmp_rec.line_id;
2826: IF NOT Gme_Batch_Step_Resources_Dbl.fetch_row(p_batch_step_resources => l_step_resources

Line 2852: x_return_status := FND_API.G_RET_STS_ERROR;

2848: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2849: END IF;
2850: EXCEPTION
2851: WHEN setup_failed OR uom_conversion_err OR missing_profile_option OR rsrc_fetch_err OR rsrc_update_err THEN
2852: x_return_status := FND_API.G_RET_STS_ERROR;
2853: WHEN create_txn_fail OR validate_txn_fail OR error_load_trans OR reduce_pend_usage_err THEN
2854: x_return_status := l_return_status;
2855: WHEN OTHERS THEN
2856: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2856: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2852: x_return_status := FND_API.G_RET_STS_ERROR;
2853: WHEN create_txn_fail OR validate_txn_fail OR error_load_trans OR reduce_pend_usage_err THEN
2854: x_return_status := l_return_status;
2855: WHEN OTHERS THEN
2856: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2857: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2858: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2859: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2860: END IF;

Line 2888: x_return_status := FND_API.G_RET_STS_SUCCESS;

2884: BEGIN
2885: IF g_debug <= gme_debug.g_log_procedure THEN
2886: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2887: END IF;
2888: x_return_status := FND_API.G_RET_STS_SUCCESS;
2889: IF NOT(gme_common_pvt.g_setup_done) THEN
2890: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2891: IF NOT(gme_common_pvt.g_setup_done) THEN
2892: RAISE setup_failed;

Line 2914: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2910: ,x_instance_id => l_instance_id
2911: ,x_reason_id => l_reason_id
2912: ,x_return_status => l_return_status
2913: ,x_trans_date => l_trans_date);
2914: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2915: RAISE validate_txn_fail;
2916: END IF;
2917: gme_resource_engine_pvt.update_resource_trans(p_tran_rec => p_rsrc_txn_gtmp_rec
2918: ,x_return_status => l_return_status);

Line 2919: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2915: RAISE validate_txn_fail;
2916: END IF;
2917: gme_resource_engine_pvt.update_resource_trans(p_tran_rec => p_rsrc_txn_gtmp_rec
2918: ,x_return_status => l_return_status);
2919: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2920: RAISE update_txn_fail;
2921: END IF;
2922: l_step_resources.batchstep_resource_id := p_rsrc_txn_gtmp_rec.line_id;
2923: IF NOT Gme_Batch_Step_Resources_Dbl.fetch_row(p_batch_step_resources => l_step_resources

Line 2930: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2926: END IF;
2927: gme_resource_engine_pvt.get_resource_usage(p_step_resources_rec => l_step_resources
2928: ,x_step_resources_rec => l_new_step_resources
2929: ,x_return_status => l_return_status);
2930: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2931: RAISE get_usage_fail;
2932: END IF;
2933: IF (NVL(l_step_resources.actual_rsrc_usage, -1) <> NVL(l_new_step_resources.actual_rsrc_usage, -1)) THEN
2934: l_step_resources.actual_rsrc_usage := l_new_step_resources.actual_rsrc_usage;

Line 2938: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2934: l_step_resources.actual_rsrc_usage := l_new_step_resources.actual_rsrc_usage;
2935: IF l_step_status = 2 THEN
2936: gme_update_step_qty_pvt.reduce_pending_usage(p_batch_step_resources_rec => l_step_resources,
2937: x_return_status => l_return_status);
2938: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2939: RAISE reduce_pend_usage_err;
2940: END IF;
2941: END IF;
2942: IF NOT gme_batch_step_resources_dbl.update_row(p_batch_step_resources => l_step_resources) THEN

Line 2951: x_return_status := FND_API.G_RET_STS_ERROR;

2947: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2948: END IF;
2949: EXCEPTION
2950: WHEN setup_failed OR error_load_trans OR rsrc_fetch_err OR get_usage_fail OR upd_rsrc_err THEN
2951: x_return_status := FND_API.G_RET_STS_ERROR;
2952: WHEN update_txn_fail OR validate_txn_fail OR reduce_pend_usage_err THEN
2953: x_return_status := l_return_status;
2954: WHEN OTHERS THEN
2955: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2955: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2951: x_return_status := FND_API.G_RET_STS_ERROR;
2952: WHEN update_txn_fail OR validate_txn_fail OR reduce_pend_usage_err THEN
2953: x_return_status := l_return_status;
2954: WHEN OTHERS THEN
2955: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2956: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2957: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2958: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2959: END IF;

Line 2990: x_return_status := FND_API.G_RET_STS_SUCCESS;

2986: BEGIN
2987: IF g_debug <= gme_debug.g_log_procedure THEN
2988: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2989: END IF;
2990: x_return_status := FND_API.G_RET_STS_SUCCESS;
2991: IF NOT(gme_common_pvt.g_setup_done) THEN
2992: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2993: IF NOT(gme_common_pvt.g_setup_done) THEN
2994: RAISE setup_failed;

Line 3014: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3010: RAISE validation_fail;
3011: END IF;
3012: gme_resource_engine_pvt.delete_resource_trans(p_tran_rec => l_rsrc_txn_gtmp_rec
3013: ,x_return_status => l_return_status);
3014: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3015: RAISE delete_txn_fail;
3016: END IF;
3017: l_step_resources.batchstep_resource_id := p_rsrc_txn_gtmp_rec.line_id;
3018: IF NOT Gme_Batch_Step_Resources_Dbl.fetch_row(p_batch_step_resources => l_step_resources

Line 3025: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3021: END IF;
3022: gme_resource_engine_pvt.get_resource_usage(p_step_resources_rec => l_step_resources
3023: ,x_step_resources_rec => l_new_step_resources
3024: ,x_return_status => l_return_status);
3025: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3026: RAISE get_usage_fail;
3027: END IF;
3028: IF (NVL(l_step_resources.actual_rsrc_usage, -1) <> NVL(l_new_step_resources.actual_rsrc_usage, -1)) THEN
3029: l_step_resources.actual_rsrc_usage := l_new_step_resources.actual_rsrc_usage;

Line 3033: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3029: l_step_resources.actual_rsrc_usage := l_new_step_resources.actual_rsrc_usage;
3030: IF l_step_status = 2 THEN
3031: gme_update_step_qty_pvt.reduce_pending_usage(p_batch_step_resources_rec => l_step_resources,
3032: x_return_status => l_return_status);
3033: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3034: RAISE reduce_pend_usage_err;
3035: END IF;
3036: END IF;
3037: IF NOT gme_batch_step_resources_dbl.update_row(p_batch_step_resources => l_step_resources) THEN

Line 3046: x_return_status := FND_API.G_RET_STS_ERROR;

3042: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
3043: END IF;
3044: EXCEPTION
3045: WHEN setup_failed OR fetch_txn_failed OR validation_fail OR rsrc_fetch_err OR upd_rsrc_err THEN
3046: x_return_status := FND_API.G_RET_STS_ERROR;
3047: WHEN delete_txn_fail OR get_usage_fail OR reduce_pend_usage_err THEN
3048: x_return_status := l_return_status;
3049: WHEN OTHERS THEN
3050: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 3050: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3046: x_return_status := FND_API.G_RET_STS_ERROR;
3047: WHEN delete_txn_fail OR get_usage_fail OR reduce_pend_usage_err THEN
3048: x_return_status := l_return_status;
3049: WHEN OTHERS THEN
3050: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3051: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3052: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
3053: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
3054: END IF;