DBA Data[Home] [Help]

APPS.GME_UPDATE_STEP_QTY_PVT dependencies on GME_BATCH_STEP_RESOURCES

Line 594: ,p_resources IN gme_batch_step_resources.resources%TYPE

590: Initialize charge to 1 if necessary. This usually happens when step qty is less than capacity.
591: =============================================================================================*/
592: PROCEDURE calc_charge (
593: p_step_id IN gme_batch_steps.batchstep_id%TYPE
594: ,p_resources IN gme_batch_step_resources.resources%TYPE
595: DEFAULT NULL
596: ,p_mass_qty IN gme_batch_steps.plan_mass_qty%TYPE
597: ,p_vol_qty IN gme_batch_steps.plan_volume_qty%TYPE
598: ,p_step_qty IN NUMBER DEFAULT NULL --Bug#5231180

Line 634: FROM gme_batch_steps gbs, gme_batch_step_resources gbsr

630:
631: CURSOR cur_get_tolerance
632: IS
633: SELECT NVL (MIN (gbsr.capacity_tolerance), 0)
634: FROM gme_batch_steps gbs, gme_batch_step_resources gbsr
635: WHERE gbs.batchstep_id = gbsr.batchstep_id
636: AND gbsr.calculate_charges = 1
637: AND gbsr.batchstep_id = p_step_id;
638:

Line 641: ,v_resources gme_batch_step_resources.resources%TYPE)

637: AND gbsr.batchstep_id = p_step_id;
638:
639: CURSOR cur_get_resource_dates (
640: v_batchstep_id NUMBER
641: ,v_resources gme_batch_step_resources.resources%TYPE)
642: IS
643: SELECT plan_start_date, plan_cmplt_date
644: FROM gme_batch_step_resources
645: WHERE batchstep_id = v_batchstep_id AND resources = v_resources;

Line 644: FROM gme_batch_step_resources

640: v_batchstep_id NUMBER
641: ,v_resources gme_batch_step_resources.resources%TYPE)
642: IS
643: SELECT plan_start_date, plan_cmplt_date
644: FROM gme_batch_step_resources
645: WHERE batchstep_id = v_batchstep_id AND resources = v_resources;
646:
647: CURSOR cur_get_batch_id (v_batchstep_id NUMBER)
648: IS

Line 654: v_resources gme_batch_step_resources.resources%TYPE)

650: FROM gme_batch_steps
651: WHERE batchstep_id = v_batchstep_id;
652:
653: CURSOR cur_get_scale_type (
654: v_resources gme_batch_step_resources.resources%TYPE)
655: IS
656: SELECT 1
657: FROM DUAL
658: WHERE EXISTS (

Line 660: FROM gme_batch_step_resources

656: SELECT 1
657: FROM DUAL
658: WHERE EXISTS (
659: SELECT 1
660: FROM gme_batch_step_resources
661: WHERE batchstep_id = p_step_id
662: AND resources = v_resources
663: AND scale_type = 2);
664:

Line 665: l_scale_type gme_batch_step_resources.scale_type%TYPE;

661: WHERE batchstep_id = p_step_id
662: AND resources = v_resources
663: AND scale_type = 2);
664:
665: l_scale_type gme_batch_step_resources.scale_type%TYPE;
666: l_remaining_quantity NUMBER;
667: l_batch_step_charges_in gme_batch_step_charges%ROWTYPE;
668: l_return_status VARCHAR2 (1);
669: l_charge gme_batch_steps.plan_charges%TYPE;

Line 1180: l_gme_batchstep_resources gme_batch_step_resources%ROWTYPE;

1176: IS
1177: l_api_name CONSTANT VARCHAR2 (30) := 'update_resources';
1178: /* Collections for details etc */
1179: l_batchstep_resource_ids gme_common_pvt.number_tab;
1180: l_gme_batchstep_resources gme_batch_step_resources%ROWTYPE;
1181: l_resource_txns gme_resource_txns_gtmp%ROWTYPE;
1182: l_resource_tab gme_common_pvt.resource_transactions_tab;
1183: /* Local variables */
1184: l_sum_comp_usage NUMBER;

Line 1205: FROM gme_batch_step_resources

1201:
1202: CURSOR cur_step_resource_ids (v_batchstep_activity_id NUMBER)
1203: IS
1204: SELECT batchstep_resource_id
1205: FROM gme_batch_step_resources
1206: WHERE batchstep_activity_id = v_batchstep_activity_id;
1207:
1208: CURSOR cur_sum_override_resource (
1209: v_batchstep_resource_id NUMBER

Line 1274: IF NOT (gme_batch_step_resources_dbl.fetch_row

1270: FOR i IN 1 .. l_batchstep_resource_ids.COUNT LOOP
1271: l_gme_batchstep_resources.batchstep_resource_id :=
1272: l_batchstep_resource_ids (i);
1273:
1274: IF NOT (gme_batch_step_resources_dbl.fetch_row
1275: (l_gme_batchstep_resources
1276: ,l_gme_batchstep_resources) ) THEN
1277: RAISE activity_resource_fetch_error;
1278: END IF;

Line 1821: IF NOT (gme_batch_step_resources_dbl.update_row

1817: l_gme_batchstep_resources.actual_rsrc_usage :=
1818: ROUND (l_gme_batchstep_resources.actual_rsrc_usage, 32);
1819:
1820: /* Save the updated batch step resources row to the database */
1821: IF NOT (gme_batch_step_resources_dbl.update_row
1822: (l_gme_batchstep_resources) ) THEN
1823: RAISE step_resource_upd_err;
1824: END IF;
1825: END LOOP; /* FOR i IN 1..l_batchstep_resource_ids.COUNT LOOP */

Line 1881: ,p_batchstep_resource IN gme_batch_step_resources%ROWTYPE

1877: Stamp resource transaction with the trans_date if new p_trans_date parameter passed in.
1878: =============================================================================================*/
1879: PROCEDURE build_insert_resource_txn (
1880: p_batch_hdr_rec IN gme_batch_header%ROWTYPE
1881: ,p_batchstep_resource IN gme_batch_step_resources%ROWTYPE
1882: ,p_usage IN NUMBER
1883: ,p_completed IN NUMBER DEFAULT 1
1884: ,p_trans_date IN DATE DEFAULT NULL
1885: ,x_return_status OUT NOCOPY VARCHAR2)

Line 1898: l_usage_hrs gme_batch_step_resources.plan_rsrc_usage%TYPE;

1894: FROM SYS.DUAL;
1895:
1896: /* Collections for details */
1897: l_ins_resource_row gme_resource_txns_gtmp%ROWTYPE;
1898: l_usage_hrs gme_batch_step_resources.plan_rsrc_usage%TYPE;
1899: l_return_status VARCHAR2 (1);
1900: /* Exceptions */
1901: resource_trans_ins_err EXCEPTION;
1902: -- p_tran_rec gmi_trans_engine_pub.ictran_rec;

Line 2050: p_batch_step_resources_rec IN gme_batch_step_resources%ROWTYPE

2046: E - Error
2047: U - Unexpected error
2048: =============================================================================================*/
2049: PROCEDURE adjust_pending_usage (
2050: p_batch_step_resources_rec IN gme_batch_step_resources%ROWTYPE
2051: ,x_return_status OUT NOCOPY VARCHAR2)
2052: IS
2053: CURSOR cur_sum_usage (v_batchstep_resource_id NUMBER)
2054: IS

Line 2197: p_batch_step_resources_rec IN gme_batch_step_resources%ROWTYPE

2193: not blindly removed. Reverse out only what is necessary. Also, Pass in a trans date
2194: for any new resource transaction generated by negative IB logic.
2195: =============================================================================================*/
2196: PROCEDURE adjust_actual_usage (
2197: p_batch_step_resources_rec IN gme_batch_step_resources%ROWTYPE
2198: ,x_return_status OUT NOCOPY VARCHAR2)
2199: IS
2200: l_api_name CONSTANT VARCHAR2 (30) := 'adjust_actual_usage';
2201:

Line 2458: p_batch_step_resources_rec IN gme_batch_step_resources%ROWTYPE

2454: IN the procedure reduce_pending_usage gave a call to this procudue to
2455: convert the usage in hours first before computing the transaction dates
2456: =============================================================================================*/
2457: PROCEDURE reduce_pending_usage (
2458: p_batch_step_resources_rec IN gme_batch_step_resources%ROWTYPE
2459: ,x_return_status OUT NOCOPY VARCHAR2)
2460: IS
2461: l_api_name CONSTANT VARCHAR2 (30) := 'reduce_pending_usage';
2462:

Line 2473: FROM gme_batch_step_resources

2469: --nsinghi bug#5609683 Modified the cursor to also query resource plan start date and changed cursor name
2470: CURSOR cur_get_rsrc_dtl (v_batchstep_resource_id NUMBER)
2471: IS
2472: SELECT actual_rsrc_usage, plan_start_date
2473: FROM gme_batch_step_resources
2474: WHERE batchstep_resource_id = v_batchstep_resource_id;
2475:
2476: CURSOR cur_pend_count (v_batchstep_resource_id NUMBER)
2477: IS

Line 2777: FROM gme_batch_step_resources

2773: WHERE batchstep_id = v_step_id;
2774:
2775: CURSOR c_get_step_resources(v_step_id NUMBER) IS
2776: SELECT resources
2777: FROM gme_batch_step_resources
2778: WHERE batchstep_id = v_step_id;
2779:
2780: l_step_rec c_get_step_qty%ROWTYPE;
2781: l_resource gme_batch_step_resources.resources%TYPE;

Line 2781: l_resource gme_batch_step_resources.resources%TYPE;

2777: FROM gme_batch_step_resources
2778: WHERE batchstep_id = v_step_id;
2779:
2780: l_step_rec c_get_step_qty%ROWTYPE;
2781: l_resource gme_batch_step_resources.resources%TYPE;
2782: l_batch_header_rec gme_batch_header%ROWTYPE;
2783: l_in_step_qty NUMBER;
2784: l_step_qty NUMBER;
2785: l_charge NUMBER;