DBA Data[Home] [Help]

APPS.PA_ALLOC_RUN dependencies on PA_ALLOC_TXN_DETAILS

Line 2870: FROM pa_alloc_txn_details a,

2866: SELECT a.run_id run_id
2867: , a.project_id project_id
2868: , a.task_id task_id
2869: , nvl(a.Total_allocation,0) Total_allocation
2870: FROM pa_alloc_txn_details a,
2871: pa_alloc_runs ar
2872: WHERE a.run_id = ar.run_id
2873: AND a.rule_id = p_rule_id
2874: AND ar.fiscal_year = NVL(p_fscl_year, ar.fiscal_year)

Line 2886: FROM pa_alloc_txn_details c,

2882: AND b.task_id = a.task_id
2883: AND b.exclude_flag = 'N'
2884: AND b.run_id = p_run_id )
2885: AND a.run_id =( SELECT max(c.run_id)
2886: FROM pa_alloc_txn_details c,
2887: pa_alloc_runs c_ar -- added this table to exclude reversed runs.
2888: WHERE c.project_id = a.project_id
2889: AND c.task_id = a.task_id
2890: AND c.transaction_type = 'T'

Line 2998: FROM pa_alloc_txn_details a,

2994: CURSOR C_prev_amount( p_qrtr_num IN NUMBER
2995: , p_fscl_year IN NUMBER
2996: , p_prd_num IN NUMBER ) IS
2997: SELECT nvl(sum(nvl(a.current_allocation,0)),0)
2998: FROM pa_alloc_txn_details a,
2999: pa_alloc_runs b
3000: WHERE b.rule_id = p_rule_id
3001: AND b.run_id < p_run_id
3002: AND b.quarter = nvl(p_qrtr_num, b.quarter)

Line 3178: Select pa_alloc_txn_details_s.nextval

3174: END IF ;
3175: End if;
3176: END IF ; -- end of p_rule_id <> -1
3177: If x_alloc_txn_id is Null Then
3178: Select pa_alloc_txn_details_s.nextval
3179: Into x_alloc_txn_id
3180: From Dual;
3181: End If;
3182: INSERT INTO pa_alloc_txn_details (

Line 3182: INSERT INTO pa_alloc_txn_details (

3178: Select pa_alloc_txn_details_s.nextval
3179: Into x_alloc_txn_id
3180: From Dual;
3181: End If;
3182: INSERT INTO pa_alloc_txn_details (
3183: RUN_ID
3184: , RULE_ID
3185: , TRANSACTION_TYPE
3186: , FISCAL_YEAR

Line 3244: , x_alloc_txn_id --, pa_alloc_txn_details_s.nextval

3240: , p_expenditure_type
3241: , p_total_allocation
3242: , p_previous_allocation
3243: , p_current_allocation
3244: , x_alloc_txn_id --, pa_alloc_txn_details_s.nextval
3245: ,decode(p_rule_id,-1,p_attribute_category,v_attribute_category)
3246: ,decode(p_rule_id,-1,p_attribute1,v_attribute1)
3247: ,decode(p_rule_id,-1,p_attribute2,v_attribute2)
3248: ,decode(p_rule_id,-1,p_attribute3,v_attribute3)

Line 3636: from pa_alloc_txn_details pat

3632: -- on the tasks other than current task provided by client extension.
3633: CURSOR C_prev_offset_task_CE (v_project_id IN NUMBER
3634: , v_task_id IN NUMBER) is
3635: SELECT nvl(sum(nvl(current_allocation,0)),0)
3636: from pa_alloc_txn_details pat
3637: ,pa_alloc_runs par
3638: where pat.run_id = par.run_id
3639: and par.fiscal_year = nvl(p_fiscal_year, par.fiscal_year)
3640: and par.quarter = nvl(p_quarter_num,par.quarter)

Line 3655: FROM pa_alloc_txn_details a,

3651: SELECT a.run_id run_id
3652: , a.project_id project_id
3653: , a.task_id task_id
3654: , nvl(a.Total_allocation,0) Total_allocation
3655: FROM pa_alloc_txn_details a,
3656: pa_alloc_runs ar
3657: WHERE a.run_id = ar.run_id
3658: AND a.rule_id = p_rule_id
3659: AND ar.fiscal_year = NVL(p_fscl_year, ar.fiscal_year)

Line 3665: FROM pa_alloc_txn_details b

3661: AND ar.period_num = NVL(p_prd_num, ar.period_num )
3662: AND a.run_id < p_run_id
3663: AND a.transaction_type = 'O'
3664: AND NOT EXISTS ( SELECT 1
3665: FROM pa_alloc_txn_details b
3666: WHERE b.project_id = a.project_id
3667: AND b.task_id = a.task_id
3668: AND b.transaction_type = 'O'
3669: AND b.run_id = p_run_id )

Line 3671: FROM pa_alloc_txn_details c,

3667: AND b.task_id = a.task_id
3668: AND b.transaction_type = 'O'
3669: AND b.run_id = p_run_id )
3670: AND a.run_id =( SELECT max(c.run_id)
3671: FROM pa_alloc_txn_details c,
3672: pa_alloc_runs c_ar -- added this table to exclude reversed runs.
3673: WHERE c.project_id = a.project_id
3674: AND c.task_id = a.task_id
3675: AND c.transaction_type = 'O'

Line 4172: FROM pa_alloc_txn_details

4168: , x_remnant_amount OUT NOCOPY NUMBER ) IS
4169: CURSOR c_amnt_before_remnant IS
4170: SELECT nvl(SUM(current_allocation),0) sum_curr_alloc
4171: , MAX( ABS(current_allocation) ) max_curr_alloc
4172: FROM pa_alloc_txn_details
4173: WHERE run_id = p_run_id
4174: AND transaction_type = 'T';
4175: CURSOR c_remnant_proj_task( p_max_alloc IN NUMBER ) IS
4176: SELECT project_id, task_id

Line 4177: FROM pa_alloc_txn_details

4173: WHERE run_id = p_run_id
4174: AND transaction_type = 'T';
4175: CURSOR c_remnant_proj_task( p_max_alloc IN NUMBER ) IS
4176: SELECT project_id, task_id
4177: FROM pa_alloc_txn_details
4178: WHERE run_id = p_run_id
4179: AND transaction_type = 'T'
4180: AND ABS(current_allocation) = p_max_alloc;
4181: v_tot_pool_amount NUMBER;

Line 4202: UPDATE pa_alloc_txn_details

4198: OPEN c_remnant_proj_task( v_max_curr_alloc );
4199: FETCH c_remnant_proj_task INTO v_project_id, v_task_id;
4200: CLOSE c_remnant_proj_task;
4201: x_remnant_amount:= NVL(v_remnant,0);
4202: UPDATE pa_alloc_txn_details
4203: SET current_allocation = NVL(current_allocation,0) + NVL(v_remnant,0)
4204: , total_allocation = NVL(total_allocation, 0) + NVl(v_remnant, 0)
4205: WHERE run_id = p_run_id
4206: AND transaction_type='T'

Line 9312: l_rej_code PA_ALLOC_TXN_DETAILS.rejection_code%type; /* added for bug 6243121 */

9308: v_tgt_exp_group PA_EXPENDITURE_GROUPS.EXPENDITURE_GROUP%TYPE ;
9309: v_off_exp_group PA_EXPENDITURE_GROUPS.EXPENDITURE_GROUP%TYPE ;
9310: v_expnd_comment PA_TRANSACTION_INTERFACE_ALL.EXPENDITURE_COMMENT%TYPE;
9311:
9312: l_rej_code PA_ALLOC_TXN_DETAILS.rejection_code%type; /* added for bug 6243121 */
9313: l_cnt_ex number:=0; /* added for bug 6243121 */
9314:
9315: Cursor C_expenditure is
9316: Select expenditure_id

Line 9329: from pa_alloc_txn_details

9325:
9326: /* added cursor for bug 6243121 */
9327: cursor c_alloc_txn_err(runid IN NUMBER) is
9328: select distinct rejection_code
9329: from pa_alloc_txn_details
9330: where run_id=runid
9331: and status_code='R'
9332: and rejection_code is not null;
9333:

Line 9537: from pa_alloc_txn_details patd

9533: decode(patd.transaction_type,
9534: 'T',pa_utils4.GetOrgBusinessGrpId(run_rec.target_exp_org_id)
9535: ,pa_utils4.GetOrgBusinessGrpId(run_rec.offset_exp_org_id)))
9536: /* end of performance changes */
9537: from pa_alloc_txn_details patd
9538: , pa_projects_all pp
9539: , pa_tasks pt
9540: where patd.run_id = p_run_id
9541: and patd.project_id = pp.project_id

Line 9571: update pa_alloc_txn_details patd

9567: --- Update txn_details table with import info ---------
9568: IF P_DEBUG_MODE = 'Y' THEN
9569: pa_debug.write_file('Release_alloc_txns: ' || 'LOG', 'Updating the transactions with import results');
9570: END IF;
9571: update pa_alloc_txn_details patd
9572: set ( status_code
9573: , rejection_code
9574: , expenditure_id
9575: , expenditure_item_id) =

Line 9614: from pa_alloc_txn_details

9610: select 'Y'
9611: into v_import_failed
9612: from dual
9613: where EXISTS ( select 'exists'
9614: from pa_alloc_txn_details
9615: where run_id = p_run_id
9616: and status_code = 'R' ) ;
9617: EXCEPTION
9618: When NO_DATA_FOUND then

Line 9799: -- Delete Transactions from pa_alloc_txn_details

9795: pa_debug.write_file('Delete_alloc_txns: ' || 'LOG',pa_debug.G_err_stage);
9796: END IF;
9797: Init_who_cols ;
9798: lock_rule(p_rule_id, p_run_id) ;
9799: -- Delete Transactions from pa_alloc_txn_details
9800: While 1=1 Loop /* Bug 2176096 */
9801: Delete from pa_alloc_txn_details
9802: where run_id = p_run_id and rownum < 10001;
9803: /* Commented for Bug 2984871 Commit; */

Line 9801: Delete from pa_alloc_txn_details

9797: Init_who_cols ;
9798: lock_rule(p_rule_id, p_run_id) ;
9799: -- Delete Transactions from pa_alloc_txn_details
9800: While 1=1 Loop /* Bug 2176096 */
9801: Delete from pa_alloc_txn_details
9802: where run_id = p_run_id and rownum < 10001;
9803: /* Commented for Bug 2984871 Commit; */
9804: If Sql%Rowcount = 0 THen
9805: Exit;

Line 9949: -- Delete Transactions from pa_alloc_txn_details

9945: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
9946: END IF;
9947: END IF;
9948: -- lock_rule(p_rule_id, l_run_id) ;
9949: -- Delete Transactions from pa_alloc_txn_details
9950: While 1=1 Loop /* Bug 2176096 */
9951: Delete from pa_alloc_txn_details
9952: where run_id = l_run_id and rownum < 10001;
9953: /* Commented for Bug 2984871 Commit; */

Line 9951: Delete from pa_alloc_txn_details

9947: END IF;
9948: -- lock_rule(p_rule_id, l_run_id) ;
9949: -- Delete Transactions from pa_alloc_txn_details
9950: While 1=1 Loop /* Bug 2176096 */
9951: Delete from pa_alloc_txn_details
9952: where run_id = l_run_id and rownum < 10001;
9953: /* Commented for Bug 2984871 Commit; */
9954: If Sql%Rowcount = 0 THen
9955: Exit;

Line 10358: FROM pa_alloc_txn_details

10354: l_module_name VARCHAR2(100);
10355: CURSOR c_get_cint_txns
10356: IS
10357: SELECT alloc_txn_id
10358: FROM pa_alloc_txn_details
10359: WHERE run_id=p_run_id;
10360: BEGIN
10361: x_msg_count := 0;
10362: x_return_status := FND_API.G_RET_STS_SUCCESS;