DBA Data[Home] [Help]

APPS.GME_COMMON_PVT dependencies on FND_API

Line 150: gme_common_pvt.g_move_to_temp := fnd_api.g_true;

146: PROCEDURE set_move_to_temp_toggle(p_true IN NUMBER DEFAULT 0)
147: IS
148: BEGIN
149: IF p_true = 1 THEN
150: gme_common_pvt.g_move_to_temp := fnd_api.g_true;
151: ELSE
152: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
153: END IF;
154: END set_move_to_temp_toggle;

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

148: BEGIN
149: IF p_true = 1 THEN
150: gme_common_pvt.g_move_to_temp := fnd_api.g_true;
151: ELSE
152: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
153: END IF;
154: END set_move_to_temp_toggle;
155:
156: -- nsinghi bug#5176319. Added this proc.

Line 363: IF l_return_status = fnd_api.g_ret_sts_success THEN

359: ,x_out_rec => l_gmd_params_rec
360: ,x_return_status => l_return_status);
361:
362: /*Assign the gmd params values to package variables */
363: IF l_return_status = fnd_api.g_ret_sts_success THEN
364: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
365: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
366: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
367: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;

Line 567: x_return_status := fnd_api.g_ret_sts_success;

563: l_message_list VARCHAR2 (2000);
564: l_api_name CONSTANT VARCHAR2 (30) := 'GET_WHO';
565: BEGIN
566: /* Set the return status to success initially */
567: x_return_status := fnd_api.g_ret_sts_success;
568:
569: IF gme_common_pvt.g_user_ident IS NULL THEN
570: set_who;
571: END IF;

Line 578: x_return_status := fnd_api.g_ret_sts_unexp_error;

574: x_login_id := gme_common_pvt.g_login_id;
575: x_timestamp := gme_common_pvt.g_timestamp;
576: EXCEPTION
577: WHEN OTHERS THEN
578: x_return_status := fnd_api.g_ret_sts_unexp_error;
579: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
580: fnd_msg_pub.count_and_get (p_count => l_message_count
581: ,p_data => l_message_list);
582:

Line 632: x_return_status := fnd_api.g_ret_sts_success;

628: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
629: || l_api_name);
630: END IF;
631:
632: x_return_status := fnd_api.g_ret_sts_success;
633:
634: OPEN cur_supply_defaults (p_organization_id, p_inventory_item_id);
635:
636: FETCH cur_supply_defaults

Line 715: x_return_status := fnd_api.g_ret_sts_unexp_error;

711: || ' Error is '
712: || SQLERRM);
713: END IF;
714:
715: x_return_status := fnd_api.g_ret_sts_unexp_error;
716: END get_supply_defaults;
717:
718: PROCEDURE get_yield_defaults (
719: p_organization_id IN NUMBER

Line 759: x_return_status := fnd_api.g_ret_sts_success;

755: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
756: || l_api_name);
757: END IF;
758:
759: x_return_status := fnd_api.g_ret_sts_success;
760:
761: OPEN cur_yield_defaults (p_organization_id, p_inventory_item_id);
762:
763: FETCH cur_yield_defaults

Line 841: x_return_status := fnd_api.g_ret_sts_unexp_error;

837: || ' Error is '
838: || SQLERRM);
839: END IF;
840:
841: x_return_status := fnd_api.g_ret_sts_unexp_error;
842: END get_yield_defaults;
843:
844: PROCEDURE construct_material_detail (
845: p_formula_detail_rec IN fm_matl_dtl%ROWTYPE

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

906: ,x_locator_id => x_material_detail_rec.locator_id
907: ,x_return_status => l_return_status);
908: END IF;
909:
910: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
911: RAISE get_defaults_err;
912: END IF;
913:
914: x_return_status := fnd_api.g_ret_sts_success;

Line 914: x_return_status := fnd_api.g_ret_sts_success;

910: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
911: RAISE get_defaults_err;
912: END IF;
913:
914: x_return_status := fnd_api.g_ret_sts_success;
915:
916: IF g_debug <= gme_debug.g_log_procedure THEN
917: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
918: END IF;

Line 934: x_return_status := fnd_api.g_ret_sts_unexp_error;

930: || ' Error is '
931: || SQLERRM);
932: END IF;
933:
934: x_return_status := fnd_api.g_ret_sts_unexp_error;
935: END construct_material_detail;
936:
937: FUNCTION get_process_loss (
938: p_batch_id IN NUMBER DEFAULT NULL

Line 1520: x_return_status := fnd_api.g_ret_sts_success;

1516: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1517: || l_api_name);
1518: END IF;
1519:
1520: x_return_status := fnd_api.g_ret_sts_success;
1521:
1522: IF p_mtl_dtl_rec.release_type IN
1523: (gme_common_pvt.g_mtl_manual_release
1524: ,gme_common_pvt.g_mtl_incremental_release

Line 1593: x_return_status := fnd_api.g_ret_sts_unexp_error;

1589: || SQLERRM);
1590: END IF;
1591:
1592: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1593: x_return_status := fnd_api.g_ret_sts_unexp_error;
1594: END calc_mtl_req_date;
1595:
1596: FUNCTION is_qty_below_capacity (
1597: p_batch_step_resources_rec IN gme_batch_step_resources%ROWTYPE)

Line 2399: ,p_init_msg_list => fnd_api.g_false

2395: END IF;
2396:
2397: gmd_val_data_pub.get_val_data
2398: (p_api_version => 1
2399: ,p_init_msg_list => fnd_api.g_false
2400: ,p_object_type => p_object_type
2401: ,p_recipe_no => NULL
2402: ,p_recipe_version => NULL
2403: ,p_recipe_id => NULL

Line 2424: IF l_return_status <> fnd_api.g_ret_sts_success

2420: ,x_msg_data => l_msg_data
2421: ,x_return_code => l_return_code
2422: ,x_recipe_validity_out => l_recipe_validity_tbl);
2423:
2424: IF l_return_status <> fnd_api.g_ret_sts_success
2425: OR l_recipe_validity_tbl.COUNT <= 0 THEN
2426: RAISE validation_failure;
2427: END IF;
2428:

Line 2600: x_return_status := fnd_api.g_ret_sts_success;

2596: IF g_debug <= gme_debug.g_log_procedure THEN
2597: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
2598: gme_debug.put_line ('p_tree_mode '||p_tree_mode);
2599: END IF;
2600: x_return_status := fnd_api.g_ret_sts_success;
2601: IF NOT (gme_common_pvt.g_setup_done) THEN
2602: IF NOT (gme_common_pvt.setup (p_org_id => p_organization_id) ) THEN
2603: RAISE setup_failure;
2604: END IF;

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

2644: ,p_item_location_control => NVL(l_item_rec.location_control_code,1)
2645: ,p_item_restrict_locators => l_item_rec.restrict_locators_code
2646: ,x_open_qty => l_open_qty
2647: ,x_return_status => l_return_status);
2648: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
2649: RAISE get_open_qty_err;
2650: ELSE
2651: IF (l_mtl_dtl_rec.dtl_um = l_item_rec.primary_uom_code) THEN
2652: l_open_qty_prim := l_open_qty;

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

2722: ,x_sqr => l_sqr
2723: ,x_sqs => l_sqs
2724: ,x_satt => l_satt
2725: ,x_satr => l_satr);
2726: IF (l_return_status = fnd_api.g_ret_sts_success) THEN
2727: IF g_debug <= gme_debug.g_log_statement THEN
2728: gme_debug.put_line('Item level qtys');
2729: gme_debug.put_line('l_qoh = ' || l_qoh);
2730: gme_debug.put_line('l_att = ' || l_att);

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

2802: ,x_sqr => l_sqr
2803: ,x_sqs => l_sqs
2804: ,x_satt => l_satt
2805: ,x_satr => l_satr);
2806: IF (l_return_status = fnd_api.g_ret_sts_success) THEN
2807: IF g_debug <= gme_debug.g_log_statement THEN
2808: gme_debug.put_line('Item/Revision/Sub level qtys');
2809: gme_debug.put_line('l_qoh = ' || l_qoh);
2810: gme_debug.put_line('l_att = ' || l_att);

Line 2935: x_return_status := fnd_api.g_ret_sts_error;

2931: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2932: END IF;
2933: EXCEPTION
2934: WHEN setup_failure THEN
2935: x_return_status := fnd_api.g_ret_sts_error;
2936: WHEN get_open_qty_err OR unable_to_query_tree THEN
2937: x_return_status := l_return_status;
2938: IF (cur_get_materials%ISOPEN) THEN
2939: CLOSE cur_get_materials;

Line 2942: x_return_status := fnd_api.g_ret_sts_error;

2938: IF (cur_get_materials%ISOPEN) THEN
2939: CLOSE cur_get_materials;
2940: END IF;
2941: WHEN uom_conv_error THEN
2942: x_return_status := fnd_api.g_ret_sts_error;
2943: fnd_message.set_name ('GMI', 'IC_API_UOM_CONVERSION_ERROR');
2944: fnd_message.set_token ('ITEM_NO', l_item_rec.concatenated_segments);
2945: fnd_message.set_token ('FROM_UOM', l_mtl_dtl_rec.dtl_um);
2946: fnd_message.set_token ('TO_UOM', l_item_rec.primary_uom_code);

Line 2952: x_return_status := fnd_api.g_ret_sts_unexp_error;

2948: CLOSE cur_get_materials;
2949: END IF;
2950: fnd_msg_pub.add;
2951: WHEN exception_ins_err THEN
2952: x_return_status := fnd_api.g_ret_sts_unexp_error;
2953: IF (cur_get_materials%ISOPEN) THEN
2954: CLOSE cur_get_materials;
2955: END IF;
2956: WHEN OTHERS THEN

Line 2969: x_return_status := fnd_api.g_ret_sts_unexp_error;

2965: IF (cur_get_materials%ISOPEN) THEN
2966: CLOSE cur_get_materials;
2967: END IF;
2968: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2969: x_return_status := fnd_api.g_ret_sts_unexp_error;
2970: END get_batch_shortages;
2971:
2972: PROCEDURE get_open_qty (
2973: p_mtl_dtl_rec IN gme_material_details%ROWTYPE

Line 3007: x_return_status := fnd_api.g_ret_sts_success;

3003: || l_api_name);
3004: gme_debug.put_line ('Being called by ' || p_called_by);
3005: END IF;
3006:
3007: x_return_status := fnd_api.g_ret_sts_success;
3008:
3009: -- All qty should be in the detail line uom.
3010: -- all allocations excludes the invisible move orders
3011: IF p_called_by = 'S' THEN

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

3013: (p_mtl_dtl_rec => p_mtl_dtl_rec
3014: ,x_reserved_qty => l_reserved_qty
3015: ,x_return_status => l_return_status);
3016:
3017: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3018: RAISE get_reserved_qty_err;
3019: END IF;
3020:
3021: x_open_qty :=

Line 3036: ,p_supply_sub_only => fnd_api.g_true

3032: ELSIF p_called_by = 'P' THEN
3033: -- Bug 12613813 - pass in true for p_locator_only parameter so picking can consider locator also.
3034: gme_reservations_pvt.get_reserved_qty
3035: (p_mtl_dtl_rec => p_mtl_dtl_rec
3036: ,p_supply_sub_only => fnd_api.g_true
3037: ,p_locator_only => fnd_api.g_true
3038: ,x_reserved_qty => l_reserved_qty
3039: ,x_return_status => l_return_status);
3040:

Line 3037: ,p_locator_only => fnd_api.g_true

3033: -- Bug 12613813 - pass in true for p_locator_only parameter so picking can consider locator also.
3034: gme_reservations_pvt.get_reserved_qty
3035: (p_mtl_dtl_rec => p_mtl_dtl_rec
3036: ,p_supply_sub_only => fnd_api.g_true
3037: ,p_locator_only => fnd_api.g_true
3038: ,x_reserved_qty => l_reserved_qty
3039: ,x_return_status => l_return_status);
3040:
3041: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

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

3037: ,p_locator_only => fnd_api.g_true
3038: ,x_reserved_qty => l_reserved_qty
3039: ,x_return_status => l_return_status);
3040:
3041: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3042: RAISE get_reserved_qty_err;
3043: END IF;
3044:
3045: gme_move_orders_pvt.get_pending_move_order_qty

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

3046: (p_mtl_dtl_rec => p_mtl_dtl_rec
3047: ,x_pending_qty => l_mo_line_qty
3048: ,x_return_status => l_return_status);
3049:
3050: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3051: RAISE get_pending_qty_err;
3052: END IF;
3053:
3054: IF g_debug <= gme_debug.g_log_statement THEN

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

3107: ,p_material_detail_id => p_mtl_dtl_rec.material_detail_id
3108: ,x_return_status => l_return_status
3109: ,x_reservations_tbl => l_resv_tbl);
3110:
3111: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3112: RAISE get_reservations_err;
3113: END IF;
3114:
3115: FOR i IN 1 .. l_resv_tbl.COUNT LOOP

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

3142: ,p_uom_code => p_mtl_dtl_rec.dtl_um
3143: ,x_qty => l_temp_qty
3144: ,x_return_status => l_return_status);
3145:
3146: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3147: RAISE get_reserved_qty_err;
3148: END IF;
3149: IF g_debug <= gme_debug.g_log_statement THEN
3150: gme_debug.put_line ( g_pkg_name

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

3209: ,p_material_detail_id => p_mtl_dtl_rec.material_detail_id
3210: ,x_return_status => l_return_status
3211: ,x_reservations_tbl => l_resv_tbl);
3212:
3213: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3214: RAISE get_reservations_err;
3215: END IF;
3216:
3217: FOR i IN 1 .. l_resv_tbl.COUNT LOOP

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

3235: ,p_uom_code => p_mtl_dtl_rec.dtl_um
3236: ,x_qty => l_temp_qty
3237: ,x_return_status => l_return_status);
3238:
3239: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3240: RAISE get_reserved_qty_err;
3241: END IF;
3242: IF g_debug <= gme_debug.g_log_statement THEN
3243: gme_debug.put_line ( g_pkg_name

Line 3317: x_return_status := fnd_api.g_ret_sts_unexp_error;

3313: || SQLERRM);
3314: END IF;
3315:
3316: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3317: x_return_status := fnd_api.g_ret_sts_unexp_error;
3318: END get_open_qty;
3319:
3320: FUNCTION insert_exceptions (p_exception_rec IN gme_exceptions_gtmp%ROWTYPE)
3321: RETURN BOOLEAN

Line 3538: RAISE fnd_api.g_exc_error;

3534: IF p_org_code IS NULL AND p_batch_header_rec.organization_id IS NULL THEN
3535: gme_common_pvt.log_message ('GME_NO_KEYS'
3536: ,'TABLE_NAME'
3537: ,'GME_BATCH_HEADER');
3538: RAISE fnd_api.g_exc_error;
3539: ELSIF p_org_code IS NOT NULL THEN
3540: OPEN get_organization (p_org_code);
3541:
3542: FETCH get_organization

Line 3549: RAISE fnd_api.g_exc_error;

3545: IF get_organization%NOTFOUND THEN
3546: CLOSE get_organization;
3547: gme_common_pvt.log_message (p_message_code => 'IC_ORGNCODERR'
3548: ,p_product_code => 'GMI');
3549: RAISE fnd_api.g_exc_error;
3550: END IF;
3551: CLOSE get_organization;
3552: END IF;
3553:

Line 3556: RAISE fnd_api.g_exc_error;

3552: END IF;
3553:
3554: IF NVL (p_batch_header_rec.batch_type, p_batch_type) <> p_batch_type THEN
3555: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
3556: RAISE fnd_api.g_exc_error;
3557: ELSE
3558: l_batch_header_rec.batch_type :=
3559: NVL (p_batch_header_rec.batch_type, p_batch_type);
3560: END IF;

Line 3565: RAISE fnd_api.g_exc_error;

3561: END IF;
3562:
3563: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec
3564: ,x_batch_header_rec) ) THEN
3565: RAISE fnd_api.g_exc_error;
3566: END IF;
3567:
3568: IF x_batch_header_rec.batch_type <> p_batch_type THEN
3569: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');

Line 3570: RAISE fnd_api.g_exc_error;

3566: END IF;
3567:
3568: IF x_batch_header_rec.batch_type <> p_batch_type THEN
3569: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
3570: RAISE fnd_api.g_exc_error;
3571: END IF;
3572:
3573: RETURN TRUE;
3574: EXCEPTION

Line 3575: WHEN fnd_api.g_exc_error THEN

3571: END IF;
3572:
3573: RETURN TRUE;
3574: EXCEPTION
3575: WHEN fnd_api.g_exc_error THEN
3576: IF g_debug <= gme_debug.g_log_error THEN
3577: gme_debug.put_line ( 'Expected error '
3578: || g_pkg_name
3579: || '.'

Line 3635: RAISE fnd_api.g_exc_error;

3631: END IF;
3632:
3633: IF NOT (gme_batch_steps_dbl.fetch_row (l_batch_step_rec
3634: ,l_batch_step_rec) ) THEN
3635: RAISE fnd_api.g_exc_error;
3636: END IF;
3637:
3638: l_batch_header_rec.batch_id := l_batch_step_rec.batch_id;
3639: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec

Line 3641: RAISE fnd_api.g_exc_error;

3637:
3638: l_batch_header_rec.batch_id := l_batch_step_rec.batch_id;
3639: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec
3640: ,l_batch_header_rec) ) THEN
3641: RAISE fnd_api.g_exc_error;
3642: END IF;
3643:
3644: x_batch_header_rec := l_batch_header_rec;
3645: x_batch_step_rec := l_batch_step_rec;

Line 3648: WHEN fnd_api.g_exc_error THEN

3644: x_batch_header_rec := l_batch_header_rec;
3645: x_batch_step_rec := l_batch_step_rec;
3646: RETURN TRUE;
3647: EXCEPTION
3648: WHEN fnd_api.g_exc_error THEN
3649: IF g_debug <= gme_debug.g_log_error THEN
3650: gme_debug.put_line ( 'Expected error '
3651: || g_pkg_name
3652: || '.'

Line 4337: x_return_status := fnd_api.g_ret_sts_success;

4333: ,'MM/DD/YYYY HH24:MI:SS') );
4334: END IF;
4335:
4336: /* Initially set the return status to success */
4337: x_return_status := fnd_api.g_ret_sts_success;
4338: -- Fetch material details.
4339: l_material_detail_rec.material_detail_id := p_material_detail_id;
4340:
4341: IF NOT gme_material_details_dbl.fetch_row (l_material_detail_rec

Line 4343: RAISE fnd_api.g_exc_error;

4339: l_material_detail_rec.material_detail_id := p_material_detail_id;
4340:
4341: IF NOT gme_material_details_dbl.fetch_row (l_material_detail_rec
4342: ,l_material_detail_rec) THEN
4343: RAISE fnd_api.g_exc_error;
4344: END IF;
4345:
4346: l_batch_header_rec.batch_id := l_material_detail_rec.batch_id;
4347:

Line 4350: RAISE fnd_api.g_exc_error;

4346: l_batch_header_rec.batch_id := l_material_detail_rec.batch_id;
4347:
4348: IF NOT (gme_batch_header_dbl.fetch_row (l_batch_header_rec
4349: ,l_batch_header_rec) ) THEN
4350: RAISE fnd_api.g_exc_error;
4351: END IF;
4352:
4353: IF p_material_date IS NOT NULL THEN
4354: l_material_date := p_material_date;

Line 4377: RAISE fnd_api.g_exc_error;

4373: ,l_batchstep_rec.batchstep_id
4374: ,l_batchstep_rec.step_status) THEN
4375: IF NOT gme_batch_steps_dbl.fetch_row (l_batchstep_rec
4376: ,l_batchstep_rec) THEN
4377: RAISE fnd_api.g_exc_error;
4378: END IF;
4379: END IF;
4380:
4381: gme_common_pvt.calc_mtl_req_date

Line 4396: IF l_return_status <> fnd_api.g_ret_sts_success THEN

4392: || l_return_status);
4393: END IF;
4394:
4395: -- Error handling for deduce_material_date call.
4396: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4397: RAISE fnd_api.g_exc_error;
4398: END IF;
4399: END IF; /* p_material_date IS NOT NULL */
4400:

Line 4397: RAISE fnd_api.g_exc_error;

4393: END IF;
4394:
4395: -- Error handling for deduce_material_date call.
4396: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4397: RAISE fnd_api.g_exc_error;
4398: END IF;
4399: END IF; /* p_material_date IS NOT NULL */
4400:
4401: -- Update new material_required_date in gme_material_details.

Line 4406: RAISE fnd_api.g_exc_error;

4402: l_material_detail_rec.material_requirement_date := l_material_date;
4403:
4404: IF NOT gme_material_details_dbl.update_row
4405: (p_material_detail => l_material_detail_rec) THEN
4406: RAISE fnd_api.g_exc_error;
4407: END IF;
4408:
4409: IF (NVL (g_debug, 0) IN
4410: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN

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

4456: || ' number of reservations is '
4457: || l_rsv_count);
4458: END IF;
4459:
4460: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
4461: RAISE query_reservations_error;
4462: END IF;
4463: FOR k IN 1 .. l_rsv_count LOOP
4464: gme_debug.put_line ('source line id is => '|| l_rsv_tbl(k).demand_source_line_id);

Line 4489: (fnd_api.g_ret_sts_error, fnd_api.g_ret_sts_unexp_error) ) THEN

4485: || x_return_status );
4486: END IF;
4487:
4488: IF (x_return_status IN
4489: (fnd_api.g_ret_sts_error, fnd_api.g_ret_sts_unexp_error) ) THEN
4490: RAISE notify_CSR_err;
4491: END IF;
4492: END IF;
4493: END LOOP;

Line 4542: IF l_size > 0 AND l_return_status = fnd_api.g_ret_sts_success THEN

4538: ( 'Came back from Query Reservation with status '
4539: || l_return_status);
4540: END IF;
4541:
4542: IF l_size > 0 AND l_return_status = fnd_api.g_ret_sts_success THEN
4543: /* pending reservations found; check for expired lots*/
4544: FOR j IN 1 .. l_size LOOP
4545: -- Check for lot expiration.
4546: OPEN cur_get_lot_date (l_rsv_array (j).inventory_item_id

Line 4577: IF l_return_status <> fnd_api.g_ret_sts_success THEN

4573: || l_return_status);
4574: END IF;
4575:
4576: -- Error handling for delete_reservation call.
4577: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4578: RAISE reservation_api_failed;
4579: END IF;
4580: ELSE
4581: /* l_lot_expiration_date <= l_material_date */

Line 4619: IF l_return_status <> fnd_api.g_ret_sts_success THEN

4615: || l_return_status);
4616: END IF;
4617:
4618: -- Error handling for update reservation call.
4619: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4620: RAISE reservation_api_failed;
4621: END IF;
4622: END IF;
4623: /* l_lot_expiration_date <= l_material_date*/

Line 4626: ELSIF l_return_status <> fnd_api.g_ret_sts_success THEN /* If querying of reservations threw an error */

4622: END IF;
4623: /* l_lot_expiration_date <= l_material_date*/
4624: END LOOP;
4625: --FPBug#4585491 /* j in 1..l_size */
4626: ELSIF l_return_status <> fnd_api.g_ret_sts_success THEN /* If querying of reservations threw an error */
4627: RAISE reservation_api_failed;
4628: END IF; /* l_size > 0 and l_return_status = fnd_api.g_ret_sts_success */
4629:
4630: OPEN cur_get_mo_lines;

Line 4628: END IF; /* l_size > 0 and l_return_status = fnd_api.g_ret_sts_success */

4624: END LOOP;
4625: --FPBug#4585491 /* j in 1..l_size */
4626: ELSIF l_return_status <> fnd_api.g_ret_sts_success THEN /* If querying of reservations threw an error */
4627: RAISE reservation_api_failed;
4628: END IF; /* l_size > 0 and l_return_status = fnd_api.g_ret_sts_success */
4629:
4630: OPEN cur_get_mo_lines;
4631:
4632: FETCH cur_get_mo_lines

Line 4666: IF l_return_status <> fnd_api.g_ret_sts_success THEN

4662: || l_return_status);
4663: END IF;
4664:
4665: -- Error handling for process_move_order_line.
4666: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4667: RAISE process_move_order_failed;
4668: END IF;
4669:
4670: /* For each of the mo lines, get the corresponding allocations */

Line 4716: IF l_return_status <> fnd_api.g_ret_sts_success THEN

4712: || l_return_status);
4713: END IF;
4714:
4715: -- Error handling for process_move_order_line.
4716: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4717: RAISE delete_allocations_failed;
4718: END IF;
4719: END IF;
4720: END LOOP; /* j in 1..l_loop_count_mo_alloc */

Line 4742: WHEN fnd_api.g_exc_error THEN

4738: || 'Exiting with '
4739: || x_return_status);
4740: END IF;
4741: EXCEPTION
4742: WHEN fnd_api.g_exc_error THEN
4743: x_return_status := fnd_api.g_ret_sts_error;
4744: WHEN reserv_mo_err THEN
4745: /* GME_EXPIRED_RESERV_MO_DELETED: Due to requirement date change,
4746: some reserved lots and move orders allocations expired and are hence deleted.

Line 4743: x_return_status := fnd_api.g_ret_sts_error;

4739: || x_return_status);
4740: END IF;
4741: EXCEPTION
4742: WHEN fnd_api.g_exc_error THEN
4743: x_return_status := fnd_api.g_ret_sts_error;
4744: WHEN reserv_mo_err THEN
4745: /* GME_EXPIRED_RESERV_MO_DELETED: Due to requirement date change,
4746: some reserved lots and move orders allocations expired and are hence deleted.
4747: */

Line 4773: x_return_status := fnd_api.g_ret_sts_unexp_error;

4769: || 'Error is :'
4770: || l_msg_data);
4771: END IF; -- 4944024 END
4772: WHEN OTHERS THEN
4773: x_return_status := fnd_api.g_ret_sts_unexp_error;
4774: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4775:
4776: IF (NVL (g_debug, 0) > 0) THEN
4777: gme_debug.put_line ( g_pkg_name

Line 5019: x_return_status := fnd_api.g_ret_sts_success;

5015: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
5016: || l_api_name);
5017: END IF;
5018: /* Set the return status to success initially */
5019: x_return_status := fnd_api.g_ret_sts_success;
5020: l_batch_header_rec := p_batch_header_rec;
5021:
5022: /* IF (p_batch_header_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
5023: gme_common_pvt.log_message(p_product_code => 'INV'

Line 5025: RAISE fnd_api.g_exc_error;

5021:
5022: /* IF (p_batch_header_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
5023: gme_common_pvt.log_message(p_product_code => 'INV'
5024: ,p_message_code => 'INV_ORG_REQUIRED');
5025: RAISE fnd_api.g_exc_error;
5026: END IF; */
5027: IF p_batch_header_rec.batch_no IS NULL AND p_batch_header_rec.batch_id IS NULL THEN
5028: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
5029: RAISE fnd_api.g_exc_error;

Line 5029: RAISE fnd_api.g_exc_error;

5025: RAISE fnd_api.g_exc_error;
5026: END IF; */
5027: IF p_batch_header_rec.batch_no IS NULL AND p_batch_header_rec.batch_id IS NULL THEN
5028: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
5029: RAISE fnd_api.g_exc_error;
5030: END IF;
5031: IF NOT gme_common_pvt.get_batch_header
5032: (p_batch_header_rec => p_batch_header_rec
5033: ,p_org_code => p_org_code

Line 5047: RAISE fnd_api.g_exc_error;

5043: /* Check for phantom batch */
5044: -- Bug 7562848 - Bypass phantom check if calling routine makes that request.
5045: IF NVL (l_batch_header_rec.parentline_id, 0) > 0 AND p_check_phantom = 'Y' THEN
5046: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
5047: RAISE fnd_api.g_exc_error;
5048: END IF;
5049:
5050: /* Check for migrated batch */
5051: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN

Line 5053: RAISE fnd_api.g_exc_error;

5049:
5050: /* Check for migrated batch */
5051: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5052: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5053: RAISE fnd_api.g_exc_error;
5054: END IF;
5055: gme_common_pvt.g_error_count := 0;
5056: gme_common_pvt.g_setup_done :=
5057: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id

Line 5064: RAISE fnd_api.g_exc_error;

5060: IF NOT gme_common_pvt.g_setup_done THEN
5061: IF (g_debug = gme_debug.g_log_statement) THEN
5062: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
5063: END IF;
5064: RAISE fnd_api.g_exc_error;
5065: ELSE
5066: l_batch_header_rec.organization_id :=
5067: gme_common_pvt.g_organization_id;
5068: END IF;

Line 5078: WHEN fnd_api.g_exc_error THEN

5074: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':' ||
5075: 'exiting organization_id = ' || x_batch_header_rec.organization_id);
5076: END IF;
5077: EXCEPTION
5078: WHEN fnd_api.g_exc_error THEN
5079: x_return_status := fnd_api.g_ret_sts_error;
5080: WHEN batch_header_fetch_error THEN
5081: x_return_status := fnd_api.g_ret_sts_error;
5082: WHEN OTHERS THEN

Line 5079: x_return_status := fnd_api.g_ret_sts_error;

5075: 'exiting organization_id = ' || x_batch_header_rec.organization_id);
5076: END IF;
5077: EXCEPTION
5078: WHEN fnd_api.g_exc_error THEN
5079: x_return_status := fnd_api.g_ret_sts_error;
5080: WHEN batch_header_fetch_error THEN
5081: x_return_status := fnd_api.g_ret_sts_error;
5082: WHEN OTHERS THEN
5083: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 5081: x_return_status := fnd_api.g_ret_sts_error;

5077: EXCEPTION
5078: WHEN fnd_api.g_exc_error THEN
5079: x_return_status := fnd_api.g_ret_sts_error;
5080: WHEN batch_header_fetch_error THEN
5081: x_return_status := fnd_api.g_ret_sts_error;
5082: WHEN OTHERS THEN
5083: IF g_debug <= gme_debug.g_log_unexpected THEN
5084: gme_debug.put_line ( 'When others exception in '
5085: || g_pkg_name|| '.'||l_api_name||'Error is '

Line 5088: x_return_status := fnd_api.g_ret_sts_unexp_error;

5084: gme_debug.put_line ( 'When others exception in '
5085: || g_pkg_name|| '.'||l_api_name||'Error is '
5086: || SQLERRM);
5087: END IF;
5088: x_return_status := fnd_api.g_ret_sts_unexp_error;
5089: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5090:
5091: END Validate_batch;
5092: /*======================================================================

Line 5129: x_return_status := fnd_api.g_ret_sts_success;

5125: || l_api_name);
5126: END IF;
5127:
5128: /* Set the return status to success initially */
5129: x_return_status := fnd_api.g_ret_sts_success;
5130: l_material_detail_rec := p_material_detail_rec;
5131:
5132:
5133: /*IF (p_material_detail_rec.organization_id IS NULL AND p_org_code IS NULL) THEN

Line 5136: RAISE fnd_api.g_exc_error;

5132:
5133: /*IF (p_material_detail_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
5134: gme_common_pvt.log_message(p_product_code => 'INV'
5135: ,p_message_code => 'INV_ORG_REQUIRED');
5136: RAISE fnd_api.g_exc_error;
5137: END IF; */
5138: IF NOT gme_common_pvt.get_material_detail
5139: (p_material_detail_rec => p_material_detail_rec
5140: ,p_org_code => p_org_code

Line 5159: RAISE fnd_api.g_exc_error;

5155: * in this place */
5156: /* Check for phantom batch
5157: IF NVL (l_batch_header_rec.parentline_id, 0) > 0 THEN
5158: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
5159: RAISE fnd_api.g_exc_error;
5160: END IF; */
5161: /* Check for migrated batch */
5162: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5163: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');

Line 5164: RAISE fnd_api.g_exc_error;

5160: END IF; */
5161: /* Check for migrated batch */
5162: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5163: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5164: RAISE fnd_api.g_exc_error;
5165: END IF;
5166: gme_common_pvt.g_error_count := 0;
5167: gme_common_pvt.g_setup_done :=
5168: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id

Line 5175: RAISE fnd_api.g_exc_error;

5171: IF NOT gme_common_pvt.g_setup_done THEN
5172: IF (g_debug = gme_debug.g_log_statement) THEN
5173: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
5174: END IF;
5175: RAISE fnd_api.g_exc_error;
5176: ELSE
5177: l_batch_header_rec.organization_id :=
5178: gme_common_pvt.g_organization_id;
5179: END IF;

Line 5192: WHEN fnd_api.g_exc_error THEN

5188: 'exiting mat det_id = ' || x_material_detail_rec.material_detail_id);
5189: END IF;
5190:
5191: EXCEPTION
5192: WHEN fnd_api.g_exc_error THEN
5193: x_return_status := fnd_api.g_ret_sts_error;
5194: WHEN material_fetch_error THEN
5195: x_return_status := fnd_api.g_ret_sts_error;
5196: WHEN OTHERS THEN

Line 5193: x_return_status := fnd_api.g_ret_sts_error;

5189: END IF;
5190:
5191: EXCEPTION
5192: WHEN fnd_api.g_exc_error THEN
5193: x_return_status := fnd_api.g_ret_sts_error;
5194: WHEN material_fetch_error THEN
5195: x_return_status := fnd_api.g_ret_sts_error;
5196: WHEN OTHERS THEN
5197: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 5195: x_return_status := fnd_api.g_ret_sts_error;

5191: EXCEPTION
5192: WHEN fnd_api.g_exc_error THEN
5193: x_return_status := fnd_api.g_ret_sts_error;
5194: WHEN material_fetch_error THEN
5195: x_return_status := fnd_api.g_ret_sts_error;
5196: WHEN OTHERS THEN
5197: IF g_debug <= gme_debug.g_log_unexpected THEN
5198: gme_debug.put_line ( 'When others exception in '
5199: || g_pkg_name

Line 5205: x_return_status := fnd_api.g_ret_sts_unexp_error;

5201: || l_api_name
5202: || ' Error is '
5203: || SQLERRM);
5204: END IF;
5205: x_return_status := fnd_api.g_ret_sts_unexp_error;
5206: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5207: gme_common_pvt.count_and_get (x_count => x_message_count
5208: ,p_encoded => fnd_api.g_false
5209: ,x_data => x_message_list);

Line 5208: ,p_encoded => fnd_api.g_false

5204: END IF;
5205: x_return_status := fnd_api.g_ret_sts_unexp_error;
5206: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5207: gme_common_pvt.count_and_get (x_count => x_message_count
5208: ,p_encoded => fnd_api.g_false
5209: ,x_data => x_message_list);
5210: END Validate_material_detail;
5211: /*======================================================================
5212: -- PROCEDURE :

Line 5247: x_return_status := fnd_api.g_ret_sts_success;

5243: IF g_debug <= gme_debug.g_log_procedure THEN
5244: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
5245: || l_api_name);
5246: END IF;
5247: x_return_status := fnd_api.g_ret_sts_success;
5248:
5249:
5250: IF NOT gme_common_pvt.get_batch_step (
5251: p_batch_step_rec => p_batch_step_rec

Line 5263: -- RAISE fnd_api.g_exc_error;

5259: /* Bug 13356510 - Commented the below code as this validation is not correct. */
5260: /* Check for phantom batch */
5261: -- IF NVL (l_batch_header_rec.parentline_id, 0) > 0 THEN
5262: -- gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
5263: -- RAISE fnd_api.g_exc_error;
5264: -- END IF;
5265:
5266: /* Check for migrated batch */
5267: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN

Line 5269: RAISE fnd_api.g_exc_error;

5265:
5266: /* Check for migrated batch */
5267: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5268: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5269: RAISE fnd_api.g_exc_error;
5270: END IF;
5271:
5272: gme_common_pvt.g_error_count := 0;
5273: gme_common_pvt.g_setup_done :=

Line 5281: RAISE fnd_api.g_exc_error;

5277: IF NOT gme_common_pvt.g_setup_done THEN
5278: IF (g_debug = gme_debug.g_log_statement) THEN
5279: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
5280: END IF;
5281: RAISE fnd_api.g_exc_error;
5282: ELSE
5283: l_batch_header_rec.organization_id :=
5284: gme_common_pvt.g_organization_id;
5285: END IF;

Line 5303: WHEN fnd_api.g_exc_error THEN

5299: || ' BatchStep ID: '
5300: || x_batch_step_rec.batchstep_id);
5301: END IF;
5302: EXCEPTION
5303: WHEN fnd_api.g_exc_error THEN
5304: x_return_status := fnd_api.g_ret_sts_error;
5305: WHEN Step_header_fetch_error THEN
5306: x_return_status := fnd_api.g_ret_sts_error;
5307: WHEN OTHERS THEN

Line 5304: x_return_status := fnd_api.g_ret_sts_error;

5300: || x_batch_step_rec.batchstep_id);
5301: END IF;
5302: EXCEPTION
5303: WHEN fnd_api.g_exc_error THEN
5304: x_return_status := fnd_api.g_ret_sts_error;
5305: WHEN Step_header_fetch_error THEN
5306: x_return_status := fnd_api.g_ret_sts_error;
5307: WHEN OTHERS THEN
5308: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 5306: x_return_status := fnd_api.g_ret_sts_error;

5302: EXCEPTION
5303: WHEN fnd_api.g_exc_error THEN
5304: x_return_status := fnd_api.g_ret_sts_error;
5305: WHEN Step_header_fetch_error THEN
5306: x_return_status := fnd_api.g_ret_sts_error;
5307: WHEN OTHERS THEN
5308: IF g_debug <= gme_debug.g_log_unexpected THEN
5309: gme_debug.put_line ( 'When others exception in '
5310: || g_pkg_name

Line 5316: x_return_status := fnd_api.g_ret_sts_unexp_error;

5312: || l_api_name
5313: || ' Error is '
5314: || SQLERRM);
5315: END IF;
5316: x_return_status := fnd_api.g_ret_sts_unexp_error;
5317: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5318: gme_common_pvt.count_and_get (x_count => x_message_count
5319: ,p_encoded => fnd_api.g_false
5320: ,x_data => x_message_list);

Line 5319: ,p_encoded => fnd_api.g_false

5315: END IF;
5316: x_return_status := fnd_api.g_ret_sts_unexp_error;
5317: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5318: gme_common_pvt.count_and_get (x_count => x_message_count
5319: ,p_encoded => fnd_api.g_false
5320: ,x_data => x_message_list);
5321: END Validate_batch_step;
5322:
5323: /* Bug#5394232 Added the following procedure to default transaction date

Line 5369: x_return_status := fnd_api.g_ret_sts_success;

5365: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
5366: END IF;
5367:
5368: /* initializing the return status*/
5369: x_return_status := fnd_api.g_ret_sts_success;
5370:
5371: /* fetch the material detail record */
5372: l_material_detail_rec.material_detail_id := p_material_detail_id;
5373:

Line 5444: x_return_status := fnd_api.g_ret_sts_error;

5440: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
5441: END IF;
5442: EXCEPTION
5443: WHEN error_fetch_material OR error_fetch_batch_details THEN
5444: x_return_status := fnd_api.g_ret_sts_error;
5445: WHEN OTHERS THEN
5446: IF g_debug <= gme_debug.g_log_unexpected THEN
5447: gme_debug.put_line ( 'When others exception in '
5448: || g_pkg_name

Line 5456: x_return_status := fnd_api.g_ret_sts_unexp_error;

5452: || SQLERRM);
5453: END IF;
5454:
5455: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5456: x_return_status := fnd_api.g_ret_sts_unexp_error;
5457: END fetch_trans_date;
5458: /*======================================================================
5459: * -- PROCEDURE :
5460: * -- check_oprn_effectivity_dates