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 99: IF l_return_status <> fnd_api.g_ret_sts_success THEN

95: gme_transactions_pvt.gme_post_process
96: (p_transaction_id => p_transaction_id
97: ,x_return_status => l_return_status);
98:
99: IF l_return_status <> fnd_api.g_ret_sts_success THEN
100: RAISE fnd_api.g_exc_error;
101: END IF;
102:
103: x_return_status := l_return_status;

Line 100: RAISE fnd_api.g_exc_error;

96: (p_transaction_id => p_transaction_id
97: ,x_return_status => l_return_status);
98:
99: IF l_return_status <> fnd_api.g_ret_sts_success THEN
100: RAISE fnd_api.g_exc_error;
101: END IF;
102:
103: x_return_status := l_return_status;
104: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 113: WHEN fnd_api.g_exc_error THEN

109: || 'Exiting with '
110: || l_return_status);
111: END IF;
112: EXCEPTION
113: WHEN fnd_api.g_exc_error THEN
114: x_return_status := l_return_status;
115: WHEN fnd_api.g_exc_unexpected_error THEN
116: x_return_status := fnd_api.g_ret_sts_unexp_error;
117: WHEN OTHERS THEN

Line 115: WHEN fnd_api.g_exc_unexpected_error THEN

111: END IF;
112: EXCEPTION
113: WHEN fnd_api.g_exc_error THEN
114: x_return_status := l_return_status;
115: WHEN fnd_api.g_exc_unexpected_error THEN
116: x_return_status := fnd_api.g_ret_sts_unexp_error;
117: WHEN OTHERS THEN
118: x_return_status := fnd_api.g_ret_sts_unexp_error;
119:

Line 116: x_return_status := fnd_api.g_ret_sts_unexp_error;

112: EXCEPTION
113: WHEN fnd_api.g_exc_error THEN
114: x_return_status := l_return_status;
115: WHEN fnd_api.g_exc_unexpected_error THEN
116: x_return_status := fnd_api.g_ret_sts_unexp_error;
117: WHEN OTHERS THEN
118: x_return_status := fnd_api.g_ret_sts_unexp_error;
119:
120: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN

Line 118: x_return_status := fnd_api.g_ret_sts_unexp_error;

114: x_return_status := l_return_status;
115: WHEN fnd_api.g_exc_unexpected_error THEN
116: x_return_status := fnd_api.g_ret_sts_unexp_error;
117: WHEN OTHERS THEN
118: x_return_status := fnd_api.g_ret_sts_unexp_error;
119:
120: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
121: gme_debug.put_line ( g_pkg_name
122: || '.'

Line 149: x_return_status := fnd_api.g_ret_sts_success;

145: this procedure may return R, B or M depends on whether reservations deleted
146: or MO allocations deleted or both
147: */
148: IF x_return_status in ('R','B','M') THEN
149: x_return_status := fnd_api.g_ret_sts_success;
150: END IF;
151: END update_material_date;
152:
153: PROCEDURE validate_supply_demand

Line 164: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM

160: , p_supply_demand_code IN NUMBER
161: , p_supply_demand_type_id IN NUMBER
162: , p_supply_demand_header_id IN NUMBER
163: , p_supply_demand_line_id IN NUMBER
164: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM
165: , p_demand_ship_date IN DATE
166: , p_expected_receipt_date IN DATE
167: , p_api_version_number IN NUMBER DEFAULT 1.0
168: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE

Line 168: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE

164: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM
165: , p_demand_ship_date IN DATE
166: , p_expected_receipt_date IN DATE
167: , p_api_version_number IN NUMBER DEFAULT 1.0
168: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE
169: ) IS
170: l_api_name CONSTANT VARCHAR2 (30) := 'VALIDATE_SUPPLY_DEMAND';
171:
172: l_material_details_rec GME_MATERIAL_DETAILS%ROWTYPE;

Line 191: x_return_status := FND_API.G_RET_STS_SUCCESS;

187: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
188: END IF;
189:
190: /* Set the return status to success initially */
191: x_return_status := FND_API.G_RET_STS_SUCCESS;
192:
193:
194: /* Set the valid status to YES initially */
195: x_valid_status := 'Y';

Line 197: IF p_init_msg_lst = FND_API.G_TRUE THEN

193:
194: /* Set the valid status to YES initially */
195: x_valid_status := 'Y';
196:
197: IF p_init_msg_lst = FND_API.G_TRUE THEN
198: fnd_msg_pub.initialize;
199: END IF;
200:
201: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN

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

197: IF p_init_msg_lst = FND_API.G_TRUE THEN
198: fnd_msg_pub.initialize;
199: END IF;
200:
201: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN
202: x_return_status := FND_API.G_RET_STS_ERROR;
203: RAISE invalid_version;
204: END IF;
205:

Line 202: x_return_status := FND_API.G_RET_STS_ERROR;

198: fnd_msg_pub.initialize;
199: END IF;
200:
201: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN
202: x_return_status := FND_API.G_RET_STS_ERROR;
203: RAISE invalid_version;
204: END IF;
205:
206: /* Ensure mandatory inputs supplied */

Line 361: x_return_status := FND_API.g_ret_sts_error;

357: EXCEPTION
358: /* Exception handling */
359: WHEN invalid_version OR input_param_missing OR validation_error
360: OR fetch_failure OR supply_demand_error THEN
361: x_return_status := FND_API.g_ret_sts_error;
362: x_valid_status := 'N';
363: gme_common_pvt.count_and_get(x_count => x_msg_count,
364: p_encoded => FND_API.g_false,
365: x_data => x_msg_data);

Line 364: p_encoded => FND_API.g_false,

360: OR fetch_failure OR supply_demand_error THEN
361: x_return_status := FND_API.g_ret_sts_error;
362: x_valid_status := 'N';
363: gme_common_pvt.count_and_get(x_count => x_msg_count,
364: p_encoded => FND_API.g_false,
365: x_data => x_msg_data);
366: WHEN OTHERS THEN
367: IF g_debug <= gme_debug.g_log_unexpected THEN
368: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);

Line 370: x_return_status := FND_API.g_ret_sts_unexp_error;

366: WHEN OTHERS THEN
367: IF g_debug <= gme_debug.g_log_unexpected THEN
368: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);
369: END IF;
370: x_return_status := FND_API.g_ret_sts_unexp_error;
371: x_valid_status := 'N';
372: gme_common_pvt.count_and_get(x_count => x_msg_count,
373: p_encoded => FND_API.g_false,
374: x_data => x_msg_data);

Line 373: p_encoded => FND_API.g_false,

369: END IF;
370: x_return_status := FND_API.g_ret_sts_unexp_error;
371: x_valid_status := 'N';
372: gme_common_pvt.count_and_get(x_count => x_msg_count,
373: p_encoded => FND_API.g_false,
374: x_data => x_msg_data);
375: END validate_supply_demand;
376:
377: PROCEDURE get_available_supply_demand

Line 394: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM

390: , p_supply_demand_code IN NUMBER
391: , p_supply_demand_type_id IN NUMBER
392: , p_supply_demand_header_id IN NUMBER
393: , p_supply_demand_line_id IN NUMBER
394: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM
395: , p_lpn_id IN NUMBER DEFAULT FND_API.G_MISS_NUM
396: , p_project_id IN NUMBER DEFAULT NULL
397: , p_task_id IN NUMBER DEFAULT NULL
398: , p_api_version_number IN NUMBER DEFAULT 1.0

Line 395: , p_lpn_id IN NUMBER DEFAULT FND_API.G_MISS_NUM

391: , p_supply_demand_type_id IN NUMBER
392: , p_supply_demand_header_id IN NUMBER
393: , p_supply_demand_line_id IN NUMBER
394: , p_supply_demand_line_detail IN NUMBER DEFAULT FND_API.G_MISS_NUM
395: , p_lpn_id IN NUMBER DEFAULT FND_API.G_MISS_NUM
396: , p_project_id IN NUMBER DEFAULT NULL
397: , p_task_id IN NUMBER DEFAULT NULL
398: , p_api_version_number IN NUMBER DEFAULT 1.0
399: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE

Line 399: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE

395: , p_lpn_id IN NUMBER DEFAULT FND_API.G_MISS_NUM
396: , p_project_id IN NUMBER DEFAULT NULL
397: , p_task_id IN NUMBER DEFAULT NULL
398: , p_api_version_number IN NUMBER DEFAULT 1.0
399: , p_init_msg_lst IN VARCHAR2 DEFAULT FND_API.G_FALSE
400: ) IS
401: l_api_name CONSTANT VARCHAR2 (30) := 'GET_AVAILABLE_SUPPLY_DEMAND';
402:
403: l_material_details_rec GME_MATERIAL_DETAILS%ROWTYPE;

Line 435: x_return_status := FND_API.G_RET_STS_SUCCESS;

431: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
432: END IF;
433:
434: /* Set the return status to success initially */
435: x_return_status := FND_API.G_RET_STS_SUCCESS;
436:
437: IF p_init_msg_lst = FND_API.G_TRUE THEN
438: fnd_msg_pub.initialize;
439: END IF;

Line 437: IF p_init_msg_lst = FND_API.G_TRUE THEN

433:
434: /* Set the return status to success initially */
435: x_return_status := FND_API.G_RET_STS_SUCCESS;
436:
437: IF p_init_msg_lst = FND_API.G_TRUE THEN
438: fnd_msg_pub.initialize;
439: END IF;
440:
441: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN

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

437: IF p_init_msg_lst = FND_API.G_TRUE THEN
438: fnd_msg_pub.initialize;
439: END IF;
440:
441: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN
442: x_return_status := FND_API.G_RET_STS_ERROR;
443: RAISE invalid_version;
444: END IF;
445:

Line 442: x_return_status := FND_API.G_RET_STS_ERROR;

438: fnd_msg_pub.initialize;
439: END IF;
440:
441: IF NOT FND_API.compatible_api_call(1.0, p_api_version_number, 'validate_supply_demand', g_pkg_name ) THEN
442: x_return_status := FND_API.G_RET_STS_ERROR;
443: RAISE invalid_version;
444: END IF;
445:
446: /* Ensure mandatory inputs supplied */

Line 561: x_return_status := FND_API.g_ret_sts_error;

557: RETURN;
558: EXCEPTION
559: /* Exception handling */
560: WHEN invalid_version OR input_param_missing OR validation_error OR fetch_failure THEN
561: x_return_status := FND_API.g_ret_sts_error;
562: gme_common_pvt.count_and_get(x_count => x_msg_count,
563: p_encoded => FND_API.g_false,
564: x_data => x_msg_data);
565: WHEN OTHERS THEN

Line 563: p_encoded => FND_API.g_false,

559: /* Exception handling */
560: WHEN invalid_version OR input_param_missing OR validation_error OR fetch_failure THEN
561: x_return_status := FND_API.g_ret_sts_error;
562: gme_common_pvt.count_and_get(x_count => x_msg_count,
563: p_encoded => FND_API.g_false,
564: x_data => x_msg_data);
565: WHEN OTHERS THEN
566: IF g_debug <= gme_debug.g_log_unexpected THEN
567: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);

Line 569: x_return_status := FND_API.g_ret_sts_unexp_error;

565: WHEN OTHERS THEN
566: IF g_debug <= gme_debug.g_log_unexpected THEN
567: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);
568: END IF;
569: x_return_status := FND_API.g_ret_sts_unexp_error;
570: gme_common_pvt.count_and_get(x_count => x_msg_count,
571: p_encoded => FND_API.g_false,
572: x_data => x_msg_data);
573: END get_available_supply_demand;

Line 571: p_encoded => FND_API.g_false,

567: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'When others exception:'|| SQLERRM);
568: END IF;
569: x_return_status := FND_API.g_ret_sts_unexp_error;
570: gme_common_pvt.count_and_get(x_count => x_msg_count,
571: p_encoded => FND_API.g_false,
572: x_data => x_msg_data);
573: END get_available_supply_demand;
574:
575: PROCEDURE update_step_quality_status (

Line 588: x_return_status := fnd_api.g_ret_sts_error;

584: IF NOT gme_common_pvt.g_setup_done THEN
585: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_id);
586:
587: IF NOT gme_common_pvt.g_setup_done THEN
588: x_return_status := fnd_api.g_ret_sts_error;
589: RAISE expected_err;
590: END IF;
591: END IF;
592:

Line 625: x_return_status := fnd_api.g_ret_sts_error;

621: RAISE expected_err;
622: END IF;
623: EXCEPTION
624: WHEN expected_err THEN
625: x_return_status := fnd_api.g_ret_sts_error;
626: WHEN OTHERS THEN
627: fnd_msg_pub.add_exc_msg ('GME_API_GRP'
628: ,'UPDATE_STEP_QUALITY_STATUS');
629: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 629: x_return_status := fnd_api.g_ret_sts_unexp_error;

625: x_return_status := fnd_api.g_ret_sts_error;
626: WHEN OTHERS THEN
627: fnd_msg_pub.add_exc_msg ('GME_API_GRP'
628: ,'UPDATE_STEP_QUALITY_STATUS');
629: x_return_status := fnd_api.g_ret_sts_unexp_error;
630: END update_step_quality_status;
631:
632:
633: PROCEDURE get_batch_shortages (

Line 635: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

631:
632:
633: PROCEDURE get_batch_shortages (
634: p_api_version_number IN NUMBER DEFAULT 1.0
635: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
636: ,x_msg_count OUT NOCOPY NUMBER
637: ,x_msg_data OUT NOCOPY VARCHAR2
638: ,p_organization_id IN NUMBER
639: ,p_batch_id IN NUMBER

Line 648: x_return_status := fnd_api.g_ret_sts_success;

644: IS
645: l_api_name CONSTANT VARCHAR2 (30) := 'get_batch_shortages';
646: BEGIN
647: -- Initially let us assign the return status to success
648: x_return_status := fnd_api.g_ret_sts_success;
649:
650: IF (g_debug <= gme_debug.g_log_statement) THEN
651: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
652: || 'Entering');

Line 670: IF x_return_status <> fnd_api.g_ret_sts_success THEN

666: ,p_tree_mode => p_tree_mode
667: ,x_return_status => x_return_status
668: ,x_exception_tbl => x_exception_tbl);
669:
670: IF x_return_status <> fnd_api.g_ret_sts_success THEN
671: RAISE fnd_api.g_exc_error;
672: END IF;
673: END IF;
674:

Line 671: RAISE fnd_api.g_exc_error;

667: ,x_return_status => x_return_status
668: ,x_exception_tbl => x_exception_tbl);
669:
670: IF x_return_status <> fnd_api.g_ret_sts_success THEN
671: RAISE fnd_api.g_exc_error;
672: END IF;
673: END IF;
674:
675: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 684: WHEN fnd_api.g_exc_error THEN

680: || 'Exiting with '
681: || x_return_status);
682: END IF;
683: EXCEPTION
684: WHEN fnd_api.g_exc_error THEN
685: gme_common_pvt.count_and_get (x_count => x_msg_count
686: ,p_encoded => fnd_api.g_false
687: ,x_data => x_msg_data);
688:

Line 686: ,p_encoded => fnd_api.g_false

682: END IF;
683: EXCEPTION
684: WHEN fnd_api.g_exc_error THEN
685: gme_common_pvt.count_and_get (x_count => x_msg_count
686: ,p_encoded => fnd_api.g_false
687: ,x_data => x_msg_data);
688:
689: WHEN OTHERS THEN
690: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 690: x_return_status := fnd_api.g_ret_sts_unexp_error;

686: ,p_encoded => fnd_api.g_false
687: ,x_data => x_msg_data);
688:
689: WHEN OTHERS THEN
690: x_return_status := fnd_api.g_ret_sts_unexp_error;
691:
692: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
693: gme_debug.put_line ( g_pkg_name
694: || '.'

Line 701: ,p_encoded => fnd_api.g_false

697: || 'WHEN OTHERS:'
698: || SQLERRM);
699: END IF;
700: gme_common_pvt.count_and_get (x_count => x_msg_count
701: ,p_encoded => fnd_api.g_false
702: ,x_data => x_msg_data);
703: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
704: END;
705: PROCEDURE get_material_reservations (

Line 707: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

703: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
704: END;
705: PROCEDURE get_material_reservations (
706: p_api_version_number IN NUMBER DEFAULT 1.0
707: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
708: ,x_msg_count OUT NOCOPY NUMBER
709: ,x_msg_data OUT NOCOPY VARCHAR2
710: ,p_organization_id IN NUMBER
711: ,p_batch_id IN NUMBER

Line 720: x_return_status := fnd_api.g_ret_sts_success;

716: IS
717: l_api_name CONSTANT VARCHAR2 (30) := 'get_material_reservations';
718: BEGIN
719: -- Initially let us assign the return status to success
720: x_return_status := fnd_api.g_ret_sts_success;
721:
722: IF (g_debug <= gme_debug.g_log_statement) THEN
723: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
724: || 'Entering');

Line 741: IF x_return_status <> fnd_api.g_ret_sts_success THEN

737: ,p_material_detail_id => p_material_detail_id
738: ,x_return_status => x_return_status
739: ,x_reservations_tbl => x_reservations_tbl);
740:
741: IF x_return_status <> fnd_api.g_ret_sts_success THEN
742: RAISE fnd_api.g_exc_error;
743: END IF;
744: END IF;
745:

Line 742: RAISE fnd_api.g_exc_error;

738: ,x_return_status => x_return_status
739: ,x_reservations_tbl => x_reservations_tbl);
740:
741: IF x_return_status <> fnd_api.g_ret_sts_success THEN
742: RAISE fnd_api.g_exc_error;
743: END IF;
744: END IF;
745:
746: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 755: WHEN fnd_api.g_exc_error THEN

751: || 'Exiting with '
752: || x_return_status);
753: END IF;
754: EXCEPTION
755: WHEN fnd_api.g_exc_error THEN
756: gme_common_pvt.count_and_get (x_count => x_msg_count
757: ,p_encoded => fnd_api.g_false
758: ,x_data => x_msg_data);
759:

Line 757: ,p_encoded => fnd_api.g_false

753: END IF;
754: EXCEPTION
755: WHEN fnd_api.g_exc_error THEN
756: gme_common_pvt.count_and_get (x_count => x_msg_count
757: ,p_encoded => fnd_api.g_false
758: ,x_data => x_msg_data);
759:
760: WHEN OTHERS THEN
761: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 761: x_return_status := fnd_api.g_ret_sts_unexp_error;

757: ,p_encoded => fnd_api.g_false
758: ,x_data => x_msg_data);
759:
760: WHEN OTHERS THEN
761: x_return_status := fnd_api.g_ret_sts_unexp_error;
762:
763: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
764: gme_debug.put_line ( g_pkg_name
765: || '.'

Line 772: ,p_encoded => fnd_api.g_false

768: || 'WHEN OTHERS:'
769: || SQLERRM);
770: END IF;
771: gme_common_pvt.count_and_get (x_count => x_msg_count
772: ,p_encoded => fnd_api.g_false
773: ,x_data => x_msg_data);
774: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
775: END get_material_reservations;
776:

Line 779: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

775: END get_material_reservations;
776:
777: PROCEDURE create_lcf_batch (
778: p_api_version IN NUMBER DEFAULT 1.0
779: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
780: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
781: ,x_message_count OUT NOCOPY NUMBER
782: ,x_message_list OUT NOCOPY VARCHAR2
783: ,x_return_status OUT NOCOPY VARCHAR2

Line 780: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

776:
777: PROCEDURE create_lcf_batch (
778: p_api_version IN NUMBER DEFAULT 1.0
779: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
780: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
781: ,x_message_count OUT NOCOPY NUMBER
782: ,x_message_list OUT NOCOPY VARCHAR2
783: ,x_return_status OUT NOCOPY VARCHAR2
784: ,p_batch_header_rec IN gme_batch_header%rowtype

Line 792: ,p_use_workday_cal IN VARCHAR2 DEFAULT FND_API.G_TRUE

788: ,p_routing_depd_tbl IN gmd_recipe_fetch_pub.routing_depd_tbl
789: ,p_oprn_act_tbl IN gmd_recipe_fetch_pub.oprn_act_tbl
790: ,p_oprn_resc_tbl IN gmd_recipe_fetch_pub.oprn_resc_tbl
791: ,p_proc_param_tbl IN gmd_recipe_fetch_pub.recp_resc_proc_param_tbl
792: ,p_use_workday_cal IN VARCHAR2 DEFAULT FND_API.G_TRUE
793: ,p_contiguity_override IN VARCHAR2 DEFAULT FND_API.G_TRUE
794: ,x_batch_header_rec OUT NOCOPY gme_batch_header%rowtype
795: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
796: ) IS

Line 793: ,p_contiguity_override IN VARCHAR2 DEFAULT FND_API.G_TRUE

789: ,p_oprn_act_tbl IN gmd_recipe_fetch_pub.oprn_act_tbl
790: ,p_oprn_resc_tbl IN gmd_recipe_fetch_pub.oprn_resc_tbl
791: ,p_proc_param_tbl IN gmd_recipe_fetch_pub.recp_resc_proc_param_tbl
792: ,p_use_workday_cal IN VARCHAR2 DEFAULT FND_API.G_TRUE
793: ,p_contiguity_override IN VARCHAR2 DEFAULT FND_API.G_TRUE
794: ,x_batch_header_rec OUT NOCOPY gme_batch_header%rowtype
795: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
796: ) IS
797:

Line 808: IF p_init_msg_list = fnd_api.g_true THEN

804: IF g_debug <= gme_debug.g_log_procedure THEN
805: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
806: || l_api_name);
807: END IF;
808: IF p_init_msg_list = fnd_api.g_true THEN
809: fnd_msg_pub.initialize;
810: gme_common_pvt.g_error_count := 0;
811: END IF;
812: /* Make sure we are call compatible */

Line 813: IF NOT fnd_api.compatible_api_call (1

809: fnd_msg_pub.initialize;
810: gme_common_pvt.g_error_count := 0;
811: END IF;
812: /* Make sure we are call compatible */
813: IF NOT fnd_api.compatible_api_call (1
814: ,p_api_version
815: ,'create_lcf_batch'
816: ,g_pkg_name) THEN
817: x_return_status := fnd_api.g_ret_sts_error;

Line 817: x_return_status := fnd_api.g_ret_sts_error;

813: IF NOT fnd_api.compatible_api_call (1
814: ,p_api_version
815: ,'create_lcf_batch'
816: ,g_pkg_name) THEN
817: x_return_status := fnd_api.g_ret_sts_error;
818: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
819: RAISE fnd_api.g_exc_error;
820: END IF;
821: /* Setup the common constants used accross the apis */

Line 819: RAISE fnd_api.g_exc_error;

815: ,'create_lcf_batch'
816: ,g_pkg_name) THEN
817: x_return_status := fnd_api.g_ret_sts_error;
818: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
819: RAISE fnd_api.g_exc_error;
820: END IF;
821: /* Setup the common constants used accross the apis */
822: IF g_debug <= gme_debug.g_log_procedure THEN
823: gme_debug.put_line ('Calling gme_common_pvt.setup.');

Line 835: x_return_status := fnd_api.g_ret_sts_error;

831: gme_debug.put_line ('After calling gme_common_pvt.setup.');
832: END IF;
833:
834: IF NOT gme_common_pvt.g_setup_done THEN
835: x_return_status := fnd_api.g_ret_sts_error;
836: RAISE fnd_api.g_exc_error;
837: END IF;
838: gme_common_pvt.set_timestamp;
839: gme_common_pvt.materials := p_formula_dtl_tbl;

Line 836: RAISE fnd_api.g_exc_error;

832: END IF;
833:
834: IF NOT gme_common_pvt.g_setup_done THEN
835: x_return_status := fnd_api.g_ret_sts_error;
836: RAISE fnd_api.g_exc_error;
837: END IF;
838: gme_common_pvt.set_timestamp;
839: gme_common_pvt.materials := p_formula_dtl_tbl;
840: gme_common_pvt.routings := p_recipe_rout_tbl;

Line 854: ,p_ignore_qty_below_cap => FND_API.G_TRUE

850: ,x_batch_header_rec => x_batch_header_rec
851: ,p_batch_size => p_formula_dtl_tbl(1).qty
852: ,p_batch_size_uom => p_formula_dtl_tbl(1).detail_uom
853: ,p_creation_mode => 'LCF'
854: ,p_ignore_qty_below_cap => FND_API.G_TRUE
855: ,p_use_workday_cal => p_use_workday_cal
856: ,p_contiguity_override => p_contiguity_override
857: ,p_is_phantom => 'N'
858: ,x_exception_material_tbl => x_exception_material_tbl

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

856: ,p_contiguity_override => p_contiguity_override
857: ,p_is_phantom => 'N'
858: ,x_exception_material_tbl => x_exception_material_tbl
859: );
860: IF x_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_inv_short_err,'C') THEN
861: IF g_debug <= gme_debug.g_log_procedure THEN
862: gme_debug.put_line ('Error in Create Batch: return status'||x_return_status);
863: END IF;
864: RAISE fnd_api.g_exc_error;

Line 864: RAISE fnd_api.g_exc_error;

860: IF x_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_inv_short_err,'C') THEN
861: IF g_debug <= gme_debug.g_log_procedure THEN
862: gme_debug.put_line ('Error in Create Batch: return status'||x_return_status);
863: END IF;
864: RAISE fnd_api.g_exc_error;
865: END IF;
866: IF g_debug <= gme_debug.g_log_procedure THEN
867: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
868: END IF;

Line 872: WHEN fnd_api.g_exc_error THEN

868: END IF;
869:
870:
871: EXCEPTION
872: WHEN fnd_api.g_exc_error THEN
873: x_return_status := fnd_api.g_ret_sts_error;
874: x_batch_header_rec := null;
875: gme_common_pvt.count_and_get (x_count => x_message_count
876: ,p_encoded => fnd_api.g_false

Line 873: x_return_status := fnd_api.g_ret_sts_error;

869:
870:
871: EXCEPTION
872: WHEN fnd_api.g_exc_error THEN
873: x_return_status := fnd_api.g_ret_sts_error;
874: x_batch_header_rec := null;
875: gme_common_pvt.count_and_get (x_count => x_message_count
876: ,p_encoded => fnd_api.g_false
877: ,x_data => x_message_list);

Line 876: ,p_encoded => fnd_api.g_false

872: WHEN fnd_api.g_exc_error THEN
873: x_return_status := fnd_api.g_ret_sts_error;
874: x_batch_header_rec := null;
875: gme_common_pvt.count_and_get (x_count => x_message_count
876: ,p_encoded => fnd_api.g_false
877: ,x_data => x_message_list);
878: WHEN fnd_api.g_exc_unexpected_error THEN
879: x_return_status := fnd_api.g_ret_sts_unexp_error;
880: x_batch_header_rec := null;

Line 878: WHEN fnd_api.g_exc_unexpected_error THEN

874: x_batch_header_rec := null;
875: gme_common_pvt.count_and_get (x_count => x_message_count
876: ,p_encoded => fnd_api.g_false
877: ,x_data => x_message_list);
878: WHEN fnd_api.g_exc_unexpected_error THEN
879: x_return_status := fnd_api.g_ret_sts_unexp_error;
880: x_batch_header_rec := null;
881: gme_common_pvt.count_and_get (x_count => x_message_count
882: ,p_encoded => fnd_api.g_false

Line 879: x_return_status := fnd_api.g_ret_sts_unexp_error;

875: gme_common_pvt.count_and_get (x_count => x_message_count
876: ,p_encoded => fnd_api.g_false
877: ,x_data => x_message_list);
878: WHEN fnd_api.g_exc_unexpected_error THEN
879: x_return_status := fnd_api.g_ret_sts_unexp_error;
880: x_batch_header_rec := null;
881: gme_common_pvt.count_and_get (x_count => x_message_count
882: ,p_encoded => fnd_api.g_false
883: ,x_data => x_message_list);

Line 882: ,p_encoded => fnd_api.g_false

878: WHEN fnd_api.g_exc_unexpected_error THEN
879: x_return_status := fnd_api.g_ret_sts_unexp_error;
880: x_batch_header_rec := null;
881: gme_common_pvt.count_and_get (x_count => x_message_count
882: ,p_encoded => fnd_api.g_false
883: ,x_data => x_message_list);
884: WHEN OTHERS THEN
885: x_return_status := fnd_api.g_ret_sts_unexp_error;
886: x_batch_header_rec := null;

Line 885: x_return_status := fnd_api.g_ret_sts_unexp_error;

881: gme_common_pvt.count_and_get (x_count => x_message_count
882: ,p_encoded => fnd_api.g_false
883: ,x_data => x_message_list);
884: WHEN OTHERS THEN
885: x_return_status := fnd_api.g_ret_sts_unexp_error;
886: x_batch_header_rec := null;
887: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
888: gme_debug.put_line ( g_pkg_name
889: || '.'

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

928: ,p_called_by => 'S'
929: ,x_open_qty => l_open_qty
930: ,x_return_status => l_return_status);
931:
932: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
933: RETURN 0;
934: ELSE
935: RETURN l_open_qty;
936: END IF;

Line 1065: ,p_encoded => fnd_api.g_false

1061: EXCEPTION
1062: WHEN error_unexpected OR fetch_error THEN
1063: RETURN 0;
1064: gme_common_pvt.count_and_get (x_count => l_msg_count
1065: ,p_encoded => fnd_api.g_false
1066: ,x_data => l_msg_list);
1067:
1068: WHEN OTHERS THEN
1069: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 1187: x_return_status := fnd_api.g_ret_sts_error;

1183: gme_common_pvt.g_setup_done :=
1184: gme_common_pvt.setup (p_org_id => p_org_id);
1185:
1186: IF NOT gme_common_pvt.g_setup_done THEN
1187: x_return_status := fnd_api.g_ret_sts_error;
1188: RAISE setup_failure;
1189: END IF;
1190: --set the timestamp
1191: gme_common_pvt.set_timestamp;

Line 1281: p_encoded => fnd_api.g_false,

1277:
1278: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec, l_batch_header_rec)) THEN
1279: l_oneitem_error := TRUE;
1280: gme_common_pvt.count_and_get (x_count => l_message_count,
1281: p_encoded => fnd_api.g_false,
1282: x_data => l_message_list
1283: );
1284: GOTO NEXT_RECORD; --GO to next record
1285: END IF;

Line 1295: p_encoded => fnd_api.g_false,

1291: x_material_detail => l_material_detail_rec
1292: ) THEN
1293: l_oneitem_error := TRUE;
1294: gme_common_pvt.count_and_get (x_count => l_message_count,
1295: p_encoded => fnd_api.g_false,
1296: x_data => l_message_list
1297: );
1298: --FPBug#4991508 replaced hard coded output messages
1299: fnd_message.set_name('GME','GME_NO_SUBSTITUTION');

Line 1322: p_encoded => fnd_api.g_false,

1318: ,p_token5_name => 'MSG'
1319: ,P_token5_value => l_message_list
1320: );
1321: gme_common_pvt.count_and_get (x_count => l_message_count,
1322: p_encoded => fnd_api.g_false,
1323: x_data => l_message_list
1324: );
1325: fnd_file.put(fnd_file.output,l_message_list);
1326: fnd_file.new_line (fnd_file.output, 1);

Line 1368: p_encoded => fnd_api.g_false,

1364: ,p_token5_name => 'NEWITEM'
1365: ,P_token5_value => l_new_item_rec.concatenated_segments
1366: );
1367: gme_common_pvt.count_and_get (x_count => l_message_count,
1368: p_encoded => fnd_api.g_false,
1369: x_data => l_message_list
1370: );
1371: fnd_file.put(fnd_file.output,l_message_list);
1372: fnd_file.new_line (fnd_file.output, 1);

Line 1404: p_encoded => fnd_api.g_false,

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

Line 1422: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1418: ,p_batch_id => rec.batch_id
1419: ,p_material_detail_id => rec.material_detail_id
1420: ,x_return_status => l_return_status);
1421:
1422: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1423: l_oneitem_error := TRUE;
1424: gme_common_pvt.count_and_get (x_count => l_message_count,
1425: p_encoded => fnd_api.g_false,
1426: x_data => l_message_list

Line 1425: p_encoded => fnd_api.g_false,

1421:
1422: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1423: l_oneitem_error := TRUE;
1424: gme_common_pvt.count_and_get (x_count => l_message_count,
1425: p_encoded => fnd_api.g_false,
1426: x_data => l_message_list
1427: );
1428: --FPBug#4991508 replaced hard coded output messages
1429: fnd_message.set_name('GME','GME_NO_SUBSTITUTION');

Line 1453: p_encoded => fnd_api.g_false,

1449: ,p_token5_name => 'MSG'
1450: ,P_token5_value => l_message_list
1451: );
1452: gme_common_pvt.count_and_get (x_count => l_message_count,
1453: p_encoded => fnd_api.g_false,
1454: x_data => l_message_list
1455: );
1456: fnd_file.put(fnd_file.output,l_message_list);
1457: fnd_file.new_line (fnd_file.output, 1);

Line 1470: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1466: ,p_material_detail_id => rec.material_detail_id
1467: ,p_invis_move_line_id => rec.move_order_line_id
1468: ,x_return_status => l_return_status);
1469:
1470: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1471: l_oneitem_error := TRUE;
1472: gme_common_pvt.count_and_get (x_count => l_message_count,
1473: p_encoded => fnd_api.g_false,
1474: x_data => l_message_list

Line 1473: p_encoded => fnd_api.g_false,

1469:
1470: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1471: l_oneitem_error := TRUE;
1472: gme_common_pvt.count_and_get (x_count => l_message_count,
1473: p_encoded => fnd_api.g_false,
1474: x_data => l_message_list
1475: );
1476: --FPBug#4991508 replaced hard coded output messages
1477: fnd_message.set_name('GME','GME_NO_SUBSTITUTION');

Line 1501: p_encoded => fnd_api.g_false,

1497: ,p_token5_name => 'MSG'
1498: ,P_token5_value => l_message_list
1499: );
1500: gme_common_pvt.count_and_get (x_count => l_message_count,
1501: p_encoded => fnd_api.g_false,
1502: x_data => l_message_list
1503: );
1504: fnd_file.put(fnd_file.output,l_message_list);
1505: fnd_file.new_line (fnd_file.output, 1);

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

1503: );
1504: fnd_file.put(fnd_file.output,l_message_list);
1505: fnd_file.new_line (fnd_file.output, 1);
1506: GOTO NEXT_RECORD; --GO to next record
1507: END IF; --IF l_return_status <> fnd_api.g_ret_sts_success THEN
1508: END IF; --IF l_new_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
1509: END IF; -- l_batch_header_rec.update_inventory_ind = 'Y'
1510:
1511: l_return_status := NULL;

Line 1546: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1542: ,x_material_details_tbl => l_material_details_tbl_out
1543: ,x_trolin_tbl => l_trolin_tbl
1544: ,x_return_status => l_return_status);
1545:
1546: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1547: l_oneitem_error := TRUE;
1548: gme_common_pvt.count_and_get (x_count => l_message_count,
1549: p_encoded => fnd_api.g_false,
1550: x_data => l_message_list

Line 1549: p_encoded => fnd_api.g_false,

1545:
1546: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1547: l_oneitem_error := TRUE;
1548: gme_common_pvt.count_and_get (x_count => l_message_count,
1549: p_encoded => fnd_api.g_false,
1550: x_data => l_message_list
1551: );
1552:
1553: --FPBug#4991508 replaced hard coded output messages

Line 1578: p_encoded => fnd_api.g_false,

1574: ,p_token5_name => 'MSG'
1575: ,P_token5_value => l_message_list
1576: );
1577: gme_common_pvt.count_and_get (x_count => l_message_count,
1578: p_encoded => fnd_api.g_false,
1579: x_data => l_message_list
1580: );
1581: fnd_file.put(fnd_file.output,l_message_list);
1582: fnd_file.new_line (fnd_file.output, 1);

Line 1597: p_encoded => fnd_api.g_false,

1593: l_return := gme_material_details_dbl.update_row (l_material_detail_rec);
1594:
1595: IF (l_return = FALSE) THEN
1596: gme_common_pvt.count_and_get (x_count => l_message_count,
1597: p_encoded => fnd_api.g_false,
1598: x_data => l_message_list
1599: );
1600: l_oneitem_error := TRUE;
1601: --FPBug#4991508 replaced hard coded output messages

Line 1626: p_encoded => fnd_api.g_false,

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

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

1658: gme_debug.put_line ('return status from auto detail line is: ' || l_return_status);
1659: END IF;
1660:
1661: -- Validate Return Status
1662: IF l_return_status IN (fnd_api.g_ret_sts_unexp_error, fnd_api.g_ret_sts_error) THEN
1663: gme_common_pvt.count_and_get (x_count => l_message_count,
1664: p_encoded => fnd_api.g_false,
1665: x_data => l_message_list
1666: );

Line 1664: p_encoded => fnd_api.g_false,

1660:
1661: -- Validate Return Status
1662: IF l_return_status IN (fnd_api.g_ret_sts_unexp_error, fnd_api.g_ret_sts_error) THEN
1663: gme_common_pvt.count_and_get (x_count => l_message_count,
1664: p_encoded => fnd_api.g_false,
1665: x_data => l_message_list
1666: );
1667: l_oneitem_error := TRUE;
1668:

Line 1694: p_encoded => fnd_api.g_false,

1690: ,p_token5_name => 'MSG'
1691: ,P_token5_value => l_message_list
1692: );
1693: gme_common_pvt.count_and_get (x_count => l_message_count,
1694: p_encoded => fnd_api.g_false,
1695: x_data => l_message_list
1696: );
1697: fnd_file.put(fnd_file.output,l_message_list);
1698: fnd_file.new_line (fnd_file.output, 1);

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

1697: fnd_file.put(fnd_file.output,l_message_list);
1698: fnd_file.new_line (fnd_file.output, 1);
1699: ROLLBACK TO create_trans;
1700: GOTO NEXT_RECORD; --GO to next record
1701: END IF; -- IF l_return_status IN (fnd_api.g_ret_sts_unexp_error, fnd_api.g_ret_sts_error) THEN
1702:
1703: END IF; -- update inventory ind
1704:
1705: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

Line 1723: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1719: x_rsc_row_count => l_rsc_trans_count,
1720: x_return_status => l_return_status
1721: );
1722:
1723: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1724: gme_common_pvt.count_and_get (x_count => l_message_count,
1725: p_encoded => fnd_api.g_false,
1726: x_data => l_message_list
1727: );

Line 1725: p_encoded => fnd_api.g_false,

1721: );
1722:
1723: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1724: gme_common_pvt.count_and_get (x_count => l_message_count,
1725: p_encoded => fnd_api.g_false,
1726: x_data => l_message_list
1727: );
1728: l_oneitem_error := TRUE;
1729: --FPBug#4991508 replaced hard coded output messages

Line 1754: p_encoded => fnd_api.g_false,

1750: ,p_token5_name => 'MSG'
1751: ,P_token5_value => l_message_list
1752: );
1753: gme_common_pvt.count_and_get (x_count => l_message_count,
1754: p_encoded => fnd_api.g_false,
1755: x_data => l_message_list
1756: );
1757: fnd_file.put(fnd_file.output,l_message_list);
1758: fnd_file.new_line (fnd_file.output, 1);

Line 1782: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1778: gme_debug.put_line ('After update step qty, return status is: ' || x_return_status);
1779: END IF;
1780: -- Swapna K Bug#4354690 12-MAY-2005
1781: /* l_return_status is replaced with x_return_status in the below if condition */
1782: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1783: gme_common_pvt.count_and_get (x_count => l_message_count,
1784: p_encoded => fnd_api.g_false,
1785: x_data => l_message_list
1786: );

Line 1784: p_encoded => fnd_api.g_false,

1780: -- Swapna K Bug#4354690 12-MAY-2005
1781: /* l_return_status is replaced with x_return_status in the below if condition */
1782: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1783: gme_common_pvt.count_and_get (x_count => l_message_count,
1784: p_encoded => fnd_api.g_false,
1785: x_data => l_message_list
1786: );
1787: l_oneitem_error := TRUE;
1788:

Line 1814: p_encoded => fnd_api.g_false,

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

Line 1839: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1835: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1836: gme_debug.put_line ('After consolidate resource transactions' || x_return_status);
1837: END IF;
1838:
1839: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1840: gme_common_pvt.count_and_get (x_count => l_message_count,
1841: p_encoded => fnd_api.g_false,
1842: x_data => l_message_list
1843: );

Line 1841: p_encoded => fnd_api.g_false,

1837: END IF;
1838:
1839: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1840: gme_common_pvt.count_and_get (x_count => l_message_count,
1841: p_encoded => fnd_api.g_false,
1842: x_data => l_message_list
1843: );
1844: l_oneitem_error := TRUE;
1845:

Line 1871: p_encoded => fnd_api.g_false,

1867: ,p_token5_name => 'MSG'
1868: ,P_token5_value => l_message_list
1869: );
1870: gme_common_pvt.count_and_get (x_count => l_message_count,
1871: p_encoded => fnd_api.g_false,
1872: x_data => l_message_list
1873: );
1874: fnd_file.put(fnd_file.output,l_message_list);
1875: fnd_file.new_line (fnd_file.output, 1);

Line 1912: p_encoded => fnd_api.g_false,

1908: ,p_token6_name => 'NEWQTY'
1909: ,P_token6_value => l_formula_tbl (1).qty||' '||l_formula_tbl (1).detail_uom
1910: );
1911: gme_common_pvt.count_and_get (x_count => l_message_count,
1912: p_encoded => fnd_api.g_false,
1913: x_data => l_message_list
1914: );
1915: fnd_file.put(fnd_file.output,l_message_list);
1916: fnd_file.new_line (fnd_file.output, 1);

Line 1927: p_encoded => fnd_api.g_false,

1923:
1924: IF l_oneitem_success = TRUE AND l_oneitem_error = TRUE THEN
1925: gme_common_pvt.log_message('GME_ATLEAST_ONE_NOT_SUBSTITUTE');
1926: gme_common_pvt.count_and_get (x_count => l_message_count,
1927: p_encoded => fnd_api.g_false,
1928: x_data => l_message_list
1929: );
1930: fnd_file.put(fnd_file.output,l_message_list);
1931:

Line 1945: p_encoded => fnd_api.g_false,

1941: fnd_file.put_line (fnd_file.output, fnd_message.get);
1942:
1943: gme_common_pvt.log_message('GME_NONE_SUBSTITUTED');
1944: gme_common_pvt.count_and_get (x_count => l_message_count,
1945: p_encoded => fnd_api.g_false,
1946: x_data => l_message_list
1947: );
1948: fnd_file.put(fnd_file.output,l_message_list);
1949: errbuf := l_message_list;

Line 1959: p_encoded => fnd_api.g_false,

1955:
1956: errbuf := 'Substitutions are successful';
1957: gme_common_pvt.log_message('GME_SUBSTITUTION_SUCCESSFUL');
1958: gme_common_pvt.count_and_get (x_count => l_message_count,
1959: p_encoded => fnd_api.g_false,
1960: x_data => l_message_list
1961: );
1962: fnd_file.put(fnd_file.output,l_message_list);
1963: errbuf := l_message_list;

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

1984: --
1985: -- HISTORY:
1986: -- siva FPBug# 4684029
1987: -- siva FPBug#4684029 rework
1988: -- In exception block 'E', 'S' are replaced by FND_API variables.
1989: -- SivakumarG Bug#5111078 Added x_total_wip_plan_qty parameter
1990: ======================================================================*/
1991: PROCEDURE get_total_qty(
1992: p_batch_id IN NUMBER,

Line 2142: x_return_status := fnd_api.g_ret_sts_success;

2138: gme_debug.put_line('Qtys being returned are:');
2139: gme_debug.put_line('Total plan qty '||l_total_plan_qty);
2140: gme_debug.put_line('Total actual qty '||l_total_actual_qty);
2141: END IF;
2142: x_return_status := fnd_api.g_ret_sts_success;
2143: EXCEPTION
2144: WHEN uom_conversion_failure THEN
2145: x_return_status := fnd_api.g_ret_sts_error;
2146: WHEN invalid_batch_id THEN

Line 2145: x_return_status := fnd_api.g_ret_sts_error;

2141: END IF;
2142: x_return_status := fnd_api.g_ret_sts_success;
2143: EXCEPTION
2144: WHEN uom_conversion_failure THEN
2145: x_return_status := fnd_api.g_ret_sts_error;
2146: WHEN invalid_batch_id THEN
2147: x_return_status := fnd_api.g_ret_sts_error;
2148: WHEN OTHERS THEN
2149: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2147: x_return_status := fnd_api.g_ret_sts_error;

2143: EXCEPTION
2144: WHEN uom_conversion_failure THEN
2145: x_return_status := fnd_api.g_ret_sts_error;
2146: WHEN invalid_batch_id THEN
2147: x_return_status := fnd_api.g_ret_sts_error;
2148: WHEN OTHERS THEN
2149: x_return_status := fnd_api.g_ret_sts_unexp_error;
2150: fnd_file.put (fnd_file.LOG, SQLERRM);
2151: fnd_file.new_line (fnd_file.LOG, 1);

Line 2149: x_return_status := fnd_api.g_ret_sts_unexp_error;

2145: x_return_status := fnd_api.g_ret_sts_error;
2146: WHEN invalid_batch_id THEN
2147: x_return_status := fnd_api.g_ret_sts_error;
2148: WHEN OTHERS THEN
2149: x_return_status := fnd_api.g_ret_sts_unexp_error;
2150: fnd_file.put (fnd_file.LOG, SQLERRM);
2151: fnd_file.new_line (fnd_file.LOG, 1);
2152: END get_total_qty;
2153:

Line 2188: x_return_status := fnd_api.g_ret_sts_success;

2184: gme_debug.g_log_procedure THEN
2185: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2186: END IF;
2187: -- Initially let us assign the return status to success
2188: x_return_status := fnd_api.g_ret_sts_success;
2189:
2190: /* Get transaction line and lots */
2191: gme_transactions_pvt.get_transactions
2192: ( p_transaction_id => p_transaction_id

Line 2197: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2193: ,x_mmt_rec => l_mmt_rec
2194: ,x_mmln_tbl => l_mmln_tbl
2195: ,x_return_status => x_return_status
2196: );
2197: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2198: RAISE fnd_api.g_exc_error;
2199: END IF;
2200:
2201: l_ret := gme_unrelease_batch_pvt.check_inv_negative

Line 2198: RAISE fnd_api.g_exc_error;

2194: ,x_mmln_tbl => l_mmln_tbl
2195: ,x_return_status => x_return_status
2196: );
2197: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2198: RAISE fnd_api.g_exc_error;
2199: END IF;
2200:
2201: l_ret := gme_unrelease_batch_pvt.check_inv_negative
2202: ( p_mmt_rec => l_mmt_rec

Line 2208: RAISE fnd_api.g_exc_error;

2204: ,p_org_neg_control => gme_common_pvt.g_allow_neg_inv
2205: ,p_item_no => p_item_no
2206: );
2207: IF l_ret THEN
2208: RAISE fnd_api.g_exc_error;
2209: END IF;
2210:
2211: gme_common_pvt.count_and_get
2212: ( x_count => x_msg_count

Line 2213: ,p_encoded => fnd_api.g_false

2209: END IF;
2210:
2211: gme_common_pvt.count_and_get
2212: ( x_count => x_msg_count
2213: ,p_encoded => fnd_api.g_false
2214: ,x_data => x_msg_data);
2215:
2216: IF (g_debug <= gme_debug.g_log_statement) THEN
2217: gme_debug.put_line ( g_pkg_name

Line 2227: WHEN fnd_api.g_exc_error THEN

2223: END IF;
2224:
2225: EXCEPTION
2226:
2227: WHEN fnd_api.g_exc_error THEN
2228: x_return_status := fnd_api.g_ret_sts_error;
2229: gme_common_pvt.count_and_get
2230: ( x_count => x_msg_count
2231: ,p_encoded => fnd_api.g_false

Line 2228: x_return_status := fnd_api.g_ret_sts_error;

2224:
2225: EXCEPTION
2226:
2227: WHEN fnd_api.g_exc_error THEN
2228: x_return_status := fnd_api.g_ret_sts_error;
2229: gme_common_pvt.count_and_get
2230: ( x_count => x_msg_count
2231: ,p_encoded => fnd_api.g_false
2232: ,x_data => x_msg_data);

Line 2231: ,p_encoded => fnd_api.g_false

2227: WHEN fnd_api.g_exc_error THEN
2228: x_return_status := fnd_api.g_ret_sts_error;
2229: gme_common_pvt.count_and_get
2230: ( x_count => x_msg_count
2231: ,p_encoded => fnd_api.g_false
2232: ,x_data => x_msg_data);
2233: WHEN fnd_api.g_exc_unexpected_error THEN
2234: x_return_status := fnd_api.g_ret_sts_unexp_error;
2235: gme_common_pvt.count_and_get

Line 2233: WHEN fnd_api.g_exc_unexpected_error THEN

2229: gme_common_pvt.count_and_get
2230: ( x_count => x_msg_count
2231: ,p_encoded => fnd_api.g_false
2232: ,x_data => x_msg_data);
2233: WHEN fnd_api.g_exc_unexpected_error THEN
2234: x_return_status := fnd_api.g_ret_sts_unexp_error;
2235: gme_common_pvt.count_and_get
2236: ( x_count => x_msg_count
2237: ,p_encoded => fnd_api.g_false

Line 2234: x_return_status := fnd_api.g_ret_sts_unexp_error;

2230: ( x_count => x_msg_count
2231: ,p_encoded => fnd_api.g_false
2232: ,x_data => x_msg_data);
2233: WHEN fnd_api.g_exc_unexpected_error THEN
2234: x_return_status := fnd_api.g_ret_sts_unexp_error;
2235: gme_common_pvt.count_and_get
2236: ( x_count => x_msg_count
2237: ,p_encoded => fnd_api.g_false
2238: ,x_data => x_msg_data);

Line 2237: ,p_encoded => fnd_api.g_false

2233: WHEN fnd_api.g_exc_unexpected_error THEN
2234: x_return_status := fnd_api.g_ret_sts_unexp_error;
2235: gme_common_pvt.count_and_get
2236: ( x_count => x_msg_count
2237: ,p_encoded => fnd_api.g_false
2238: ,x_data => x_msg_data);
2239: WHEN OTHERS THEN
2240: x_return_status := fnd_api.g_ret_sts_unexp_error;
2241: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2240: x_return_status := fnd_api.g_ret_sts_unexp_error;

2236: ( x_count => x_msg_count
2237: ,p_encoded => fnd_api.g_false
2238: ,x_data => x_msg_data);
2239: WHEN OTHERS THEN
2240: x_return_status := fnd_api.g_ret_sts_unexp_error;
2241: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2242: gme_common_pvt.count_and_get
2243: ( x_count => x_msg_count
2244: ,p_encoded => fnd_api.g_false

Line 2244: ,p_encoded => fnd_api.g_false

2240: x_return_status := fnd_api.g_ret_sts_unexp_error;
2241: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2242: gme_common_pvt.count_and_get
2243: ( x_count => x_msg_count
2244: ,p_encoded => fnd_api.g_false
2245: ,x_data => x_msg_data);
2246: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2247: gme_debug.put_line ( g_pkg_name
2248: || '.'

Line 2356: x_return_status := FND_API.G_RET_STS_SUCCESS;

2352: BEGIN
2353: IF g_debug <= gme_debug.g_log_procedure THEN
2354: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2355: END IF;
2356: x_return_status := FND_API.G_RET_STS_SUCCESS;
2357: OPEN x_resvns_cur FOR
2358: SELECT mr.*
2359: FROM mtl_reservations mr
2360: WHERE mr.organization_id = p_organization_id

Line 2371: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2367: AND organization_id = p_organization_id)
2368: ORDER BY mr.requirement_date, mr.reservation_id;
2369: EXCEPTION
2370: WHEN OTHERS THEN
2371: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2372: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2373: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2374: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2375: END IF;

Line 2386: x_return_status := FND_API.G_RET_STS_SUCCESS;

2382: BEGIN
2383: IF g_debug <= gme_debug.g_log_procedure THEN
2384: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2385: END IF;
2386: x_return_status := FND_API.G_RET_STS_SUCCESS;
2387: OPEN x_pplot_cur FOR
2388: SELECT *
2389: FROM gme_pending_product_lots
2390: WHERE material_detail_id = p_mat_det_id

Line 2394: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2390: WHERE material_detail_id = p_mat_det_id
2391: ORDER BY sequence asc, lot_number asc;
2392: EXCEPTION
2393: WHEN OTHERS THEN
2394: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2395: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2396: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2397: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2398: END IF;

Line 2411: x_return_status := FND_API.G_RET_STS_SUCCESS;

2407: BEGIN
2408: IF g_debug <= gme_debug.g_log_procedure THEN
2409: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2410: END IF;
2411: x_return_status := FND_API.G_RET_STS_SUCCESS;
2412: OPEN x_txns_cur FOR
2413: SELECT *
2414: FROM mtl_material_transactions mmt
2415: WHERE trx_source_line_id = p_mat_det_id

Line 2426: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2422: AND pair_type = gme_common_pvt.g_pairs_reversal_type)
2423: ORDER BY mmt.transaction_id;
2424: EXCEPTION
2425: WHEN OTHERS THEN
2426: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2427: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2428: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2429: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2430: END IF;

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_lot_txns_cur FOR
2443: SELECT *
2444: FROM mtl_transaction_lot_numbers
2445: WHERE transaction_id = p_transaction_id;

Line 2448: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2444: FROM mtl_transaction_lot_numbers
2445: WHERE transaction_id = p_transaction_id;
2446: EXCEPTION
2447: WHEN OTHERS THEN
2448: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2449: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2450: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2451: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2452: END IF;

Line 2467: x_return_status := FND_API.G_RET_STS_SUCCESS;

2463: BEGIN
2464: IF g_debug <= gme_debug.g_log_procedure THEN
2465: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2466: END IF;
2467: x_return_status := FND_API.G_RET_STS_SUCCESS;
2468: IF NOT(gme_common_pvt.g_setup_done) THEN
2469: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2470: IF NOT(gme_common_pvt.g_setup_done) THEN
2471: RAISE setup_failed;

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

2477: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => p_mmti_rec,
2478: p_mmli_tbl => p_mmli_tbl,
2479: p_mode => 'I',
2480: x_return_status => l_return_status);
2481: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2482: RAISE validate_txn_fail;
2483: END IF;
2484: gme_transactions_pvt.create_material_txn(p_mmti_rec => p_mmti_rec,
2485: p_mmli_tbl => p_mmli_tbl,

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

2483: END IF;
2484: gme_transactions_pvt.create_material_txn(p_mmti_rec => p_mmti_rec,
2485: p_mmli_tbl => p_mmli_tbl,
2486: x_return_status => l_return_status);
2487: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2488: RAISE create_txn_fail;
2489: END IF;
2490: IF g_debug <= gme_debug.g_log_procedure THEN
2491: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

Line 2495: x_return_status := FND_API.G_RET_STS_ERROR;

2491: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2492: END IF;
2493: EXCEPTION
2494: WHEN setup_failed THEN
2495: x_return_status := FND_API.G_RET_STS_ERROR;
2496: WHEN create_txn_fail OR validate_txn_fail THEN
2497: x_return_status := l_return_status;
2498: WHEN OTHERS THEN
2499: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2499: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2495: x_return_status := FND_API.G_RET_STS_ERROR;
2496: WHEN create_txn_fail OR validate_txn_fail THEN
2497: x_return_status := l_return_status;
2498: WHEN OTHERS THEN
2499: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2500: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2501: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2502: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2503: END IF;

Line 2528: x_return_status := FND_API.G_RET_STS_SUCCESS;

2524: BEGIN
2525: IF g_debug <= gme_debug.g_log_procedure THEN
2526: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2527: END IF;
2528: x_return_status := FND_API.G_RET_STS_SUCCESS;
2529: IF NOT(gme_common_pvt.g_setup_done) THEN
2530: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_mmti_rec.organization_id);
2531: IF NOT(gme_common_pvt.g_setup_done) THEN
2532: RAISE setup_failed;

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

2547: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => p_mmti_rec,
2548: p_mmli_tbl => p_mmli_tbl,
2549: p_mode => 'U',
2550: x_return_status => l_return_status);
2551: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2552: RAISE validate_txn_fail;
2553: END IF;
2554: gme_transactions_pvt.update_material_txn(p_transaction_id => p_transaction_id,
2555: p_mmti_rec => p_mmti_rec,

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

2554: gme_transactions_pvt.update_material_txn(p_transaction_id => p_transaction_id,
2555: p_mmti_rec => p_mmti_rec,
2556: p_mmli_tbl => p_mmli_tbl,
2557: x_return_status => l_return_status);
2558: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2559: RAISE update_txn_fail;
2560: END IF;
2561: IF g_debug <= gme_debug.g_log_procedure THEN
2562: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

Line 2566: x_return_status := FND_API.G_RET_STS_ERROR;

2562: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2563: END IF;
2564: EXCEPTION
2565: WHEN setup_failed THEN
2566: x_return_status := FND_API.G_RET_STS_ERROR;
2567: WHEN update_txn_mismatch THEN
2568: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
2569: x_return_status := FND_API.G_RET_STS_ERROR;
2570: WHEN update_txn_fail OR validate_txn_fail THEN

Line 2569: x_return_status := FND_API.G_RET_STS_ERROR;

2565: WHEN setup_failed THEN
2566: x_return_status := FND_API.G_RET_STS_ERROR;
2567: WHEN update_txn_mismatch THEN
2568: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
2569: x_return_status := FND_API.G_RET_STS_ERROR;
2570: WHEN update_txn_fail OR validate_txn_fail THEN
2571: x_return_status := l_return_status;
2572: WHEN OTHERS THEN
2573: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2573: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2569: x_return_status := FND_API.G_RET_STS_ERROR;
2570: WHEN update_txn_fail OR validate_txn_fail THEN
2571: x_return_status := l_return_status;
2572: WHEN OTHERS THEN
2573: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2574: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2575: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2576: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2577: END IF;

Line 2598: x_return_status := FND_API.G_RET_STS_SUCCESS;

2594: BEGIN
2595: IF g_debug <= gme_debug.g_log_procedure THEN
2596: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2597: END IF;
2598: x_return_status := FND_API.G_RET_STS_SUCCESS;
2599: IF NOT(gme_common_pvt.g_setup_done) THEN
2600: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_organization_id);
2601: IF NOT(gme_common_pvt.g_setup_done) THEN
2602: RAISE setup_failed;

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

2608: gme_transactions_pvt.get_mmt_transactions(p_transaction_id => p_transaction_id,
2609: x_mmt_rec => l_mmt_rec,
2610: x_mmln_tbl => l_mmln_tbl,
2611: x_return_status => l_return_status);
2612: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2613: RAISE get_txn_fail;
2614: END IF;
2615: gme_transactions_pvt.construct_mmti(p_mmt_rec => l_mmt_rec,
2616: p_mmln_tbl => l_mmln_tbl,

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

2616: p_mmln_tbl => l_mmln_tbl,
2617: x_mmti_rec => l_mmti_rec,
2618: x_mmli_tbl => l_mmli_tbl,
2619: x_return_status => l_return_status);
2620: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2621: RAISE const_txn_fail;
2622: END IF;
2623: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => l_mmti_rec,
2624: p_mmli_tbl => l_mmli_tbl,

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

2623: gme_transactions_pvt.gmo_pre_process_val(p_mmti_rec => l_mmti_rec,
2624: p_mmli_tbl => l_mmli_tbl,
2625: p_mode => 'D',
2626: x_return_status => l_return_status);
2627: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2628: RAISE validate_txn_fail;
2629: END IF;
2630: gme_transactions_pvt.delete_material_txn(p_transaction_id => p_transaction_id,
2631: x_return_status => l_return_status);

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

2628: RAISE validate_txn_fail;
2629: END IF;
2630: gme_transactions_pvt.delete_material_txn(p_transaction_id => p_transaction_id,
2631: x_return_status => l_return_status);
2632: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2633: RAISE delete_txn_fail;
2634: END IF;
2635: IF g_debug <= gme_debug.g_log_procedure THEN
2636: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

Line 2640: x_return_status := FND_API.G_RET_STS_ERROR;

2636: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2637: END IF;
2638: EXCEPTION
2639: WHEN setup_failed THEN
2640: x_return_status := FND_API.G_RET_STS_ERROR;
2641: WHEN delete_txn_fail OR get_txn_fail OR const_txn_fail OR validate_txn_fail THEN
2642: x_return_status := l_return_status;
2643: WHEN OTHERS THEN
2644: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2644: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2640: x_return_status := FND_API.G_RET_STS_ERROR;
2641: WHEN delete_txn_fail OR get_txn_fail OR const_txn_fail OR validate_txn_fail THEN
2642: x_return_status := l_return_status;
2643: WHEN OTHERS THEN
2644: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2645: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2646: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2647: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2648: END IF;

Line 2681: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

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

2703: ,x_instance_id => l_instance_id
2704: ,x_reason_id => l_reason_id
2705: ,x_return_status => l_return_status
2706: ,x_trans_date => l_trans_date);
2707: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2708: RAISE validate_txn_fail;
2709: END IF;
2710: l_usage_time := (p_rsrc_txn_gtmp_rec.end_date - p_rsrc_txn_gtmp_rec.start_date) * 24;
2711: l_hour_um := fnd_profile.value_specific(name => 'BOM:HOUR_UOM_CODE'

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

2733: l_rsrc_txn_gtmp_rec.resource_usage := l_txn_usage;
2734: gme_resource_engine_pvt.create_resource_trans(p_tran_rec => l_rsrc_txn_gtmp_rec
2735: ,x_tran_rec => x_rsrc_txn_gtmp_rec
2736: ,x_return_status => l_return_status);
2737: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2738: RAISE create_txn_fail;
2739: END IF;
2740: l_step_resources.batchstep_resource_id := l_rsrc_txn_gtmp_rec.line_id;
2741: IF NOT Gme_Batch_Step_Resources_Dbl.fetch_row(p_batch_step_resources => l_step_resources

Line 2767: x_return_status := FND_API.G_RET_STS_ERROR;

2763: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2764: END IF;
2765: EXCEPTION
2766: WHEN setup_failed OR uom_conversion_err OR missing_profile_option OR rsrc_fetch_err OR rsrc_update_err THEN
2767: x_return_status := FND_API.G_RET_STS_ERROR;
2768: WHEN create_txn_fail OR validate_txn_fail OR error_load_trans OR reduce_pend_usage_err THEN
2769: x_return_status := l_return_status;
2770: WHEN OTHERS THEN
2771: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2771: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2767: x_return_status := FND_API.G_RET_STS_ERROR;
2768: WHEN create_txn_fail OR validate_txn_fail OR error_load_trans OR reduce_pend_usage_err THEN
2769: x_return_status := l_return_status;
2770: WHEN OTHERS THEN
2771: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2772: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2773: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2774: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2775: END IF;

Line 2803: x_return_status := FND_API.G_RET_STS_SUCCESS;

2799: BEGIN
2800: IF g_debug <= gme_debug.g_log_procedure THEN
2801: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2802: END IF;
2803: x_return_status := FND_API.G_RET_STS_SUCCESS;
2804: IF NOT(gme_common_pvt.g_setup_done) THEN
2805: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2806: IF NOT(gme_common_pvt.g_setup_done) THEN
2807: RAISE setup_failed;

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

2825: ,x_instance_id => l_instance_id
2826: ,x_reason_id => l_reason_id
2827: ,x_return_status => l_return_status
2828: ,x_trans_date => l_trans_date);
2829: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2830: RAISE validate_txn_fail;
2831: END IF;
2832: gme_resource_engine_pvt.update_resource_trans(p_tran_rec => p_rsrc_txn_gtmp_rec
2833: ,x_return_status => l_return_status);

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

2830: RAISE validate_txn_fail;
2831: END IF;
2832: gme_resource_engine_pvt.update_resource_trans(p_tran_rec => p_rsrc_txn_gtmp_rec
2833: ,x_return_status => l_return_status);
2834: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2835: RAISE update_txn_fail;
2836: END IF;
2837: l_step_resources.batchstep_resource_id := p_rsrc_txn_gtmp_rec.line_id;
2838: IF NOT Gme_Batch_Step_Resources_Dbl.fetch_row(p_batch_step_resources => l_step_resources

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

2841: END IF;
2842: gme_resource_engine_pvt.get_resource_usage(p_step_resources_rec => l_step_resources
2843: ,x_step_resources_rec => l_new_step_resources
2844: ,x_return_status => l_return_status);
2845: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2846: RAISE get_usage_fail;
2847: END IF;
2848: IF (NVL(l_step_resources.actual_rsrc_usage, -1) <> NVL(l_new_step_resources.actual_rsrc_usage, -1)) THEN
2849: l_step_resources.actual_rsrc_usage := l_new_step_resources.actual_rsrc_usage;

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

2849: l_step_resources.actual_rsrc_usage := l_new_step_resources.actual_rsrc_usage;
2850: IF l_step_status = 2 THEN
2851: gme_update_step_qty_pvt.reduce_pending_usage(p_batch_step_resources_rec => l_step_resources,
2852: x_return_status => l_return_status);
2853: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2854: RAISE reduce_pend_usage_err;
2855: END IF;
2856: END IF;
2857: IF NOT gme_batch_step_resources_dbl.update_row(p_batch_step_resources => l_step_resources) THEN

Line 2866: x_return_status := FND_API.G_RET_STS_ERROR;

2862: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2863: END IF;
2864: EXCEPTION
2865: WHEN setup_failed OR error_load_trans OR rsrc_fetch_err OR get_usage_fail OR upd_rsrc_err THEN
2866: x_return_status := FND_API.G_RET_STS_ERROR;
2867: WHEN update_txn_fail OR validate_txn_fail OR reduce_pend_usage_err THEN
2868: x_return_status := l_return_status;
2869: WHEN OTHERS THEN
2870: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2870: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2866: x_return_status := FND_API.G_RET_STS_ERROR;
2867: WHEN update_txn_fail OR validate_txn_fail OR reduce_pend_usage_err THEN
2868: x_return_status := l_return_status;
2869: WHEN OTHERS THEN
2870: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2871: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2872: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2873: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2874: END IF;

Line 2905: x_return_status := FND_API.G_RET_STS_SUCCESS;

2901: BEGIN
2902: IF g_debug <= gme_debug.g_log_procedure THEN
2903: gme_debug.put_line ('Entering api ' || g_pkg_name || '.' || l_api_name);
2904: END IF;
2905: x_return_status := FND_API.G_RET_STS_SUCCESS;
2906: IF NOT(gme_common_pvt.g_setup_done) THEN
2907: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => p_rsrc_txn_gtmp_rec.organization_id);
2908: IF NOT(gme_common_pvt.g_setup_done) THEN
2909: RAISE setup_failed;

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

2925: RAISE validation_fail;
2926: END IF;
2927: gme_resource_engine_pvt.delete_resource_trans(p_tran_rec => l_rsrc_txn_gtmp_rec
2928: ,x_return_status => l_return_status);
2929: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2930: RAISE delete_txn_fail;
2931: END IF;
2932: l_step_resources.batchstep_resource_id := p_rsrc_txn_gtmp_rec.line_id;
2933: IF NOT Gme_Batch_Step_Resources_Dbl.fetch_row(p_batch_step_resources => l_step_resources

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

2936: END IF;
2937: gme_resource_engine_pvt.get_resource_usage(p_step_resources_rec => l_step_resources
2938: ,x_step_resources_rec => l_new_step_resources
2939: ,x_return_status => l_return_status);
2940: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2941: RAISE get_usage_fail;
2942: END IF;
2943: IF (NVL(l_step_resources.actual_rsrc_usage, -1) <> NVL(l_new_step_resources.actual_rsrc_usage, -1)) THEN
2944: l_step_resources.actual_rsrc_usage := l_new_step_resources.actual_rsrc_usage;

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

2944: l_step_resources.actual_rsrc_usage := l_new_step_resources.actual_rsrc_usage;
2945: IF l_step_status = 2 THEN
2946: gme_update_step_qty_pvt.reduce_pending_usage(p_batch_step_resources_rec => l_step_resources,
2947: x_return_status => l_return_status);
2948: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2949: RAISE reduce_pend_usage_err;
2950: END IF;
2951: END IF;
2952: IF NOT gme_batch_step_resources_dbl.update_row(p_batch_step_resources => l_step_resources) THEN

Line 2961: x_return_status := FND_API.G_RET_STS_ERROR;

2957: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2958: END IF;
2959: EXCEPTION
2960: WHEN setup_failed OR fetch_txn_failed OR validation_fail OR rsrc_fetch_err OR upd_rsrc_err THEN
2961: x_return_status := FND_API.G_RET_STS_ERROR;
2962: WHEN delete_txn_fail OR get_usage_fail OR reduce_pend_usage_err THEN
2963: x_return_status := l_return_status;
2964: WHEN OTHERS THEN
2965: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2965: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2961: x_return_status := FND_API.G_RET_STS_ERROR;
2962: WHEN delete_txn_fail OR get_usage_fail OR reduce_pend_usage_err THEN
2963: x_return_status := l_return_status;
2964: WHEN OTHERS THEN
2965: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2966: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2967: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2968: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
2969: END IF;