DBA Data[Home] [Help]

APPS.PA_ALLOC_RUN dependencies on PA_ALLOC_TXN_DETAILS

Line 2881: FROM pa_alloc_txn_details a,

2877: SELECT a.run_id run_id
2878: , a.project_id project_id
2879: , a.task_id task_id
2880: , nvl(a.Total_allocation,0) Total_allocation
2881: FROM pa_alloc_txn_details a,
2882: pa_alloc_runs ar
2883: WHERE a.run_id = ar.run_id
2884: AND a.rule_id = p_rule_id
2885: AND ar.rule_id = p_rule_id /* Bug 10191044 */

Line 2898: FROM pa_alloc_txn_details c,

2894: AND b.task_id = a.task_id
2895: AND b.exclude_flag = 'N'
2896: AND b.run_id = p_run_id )
2897: AND a.run_id =( SELECT max(c.run_id)
2898: FROM pa_alloc_txn_details c,
2899: pa_alloc_runs c_ar -- added this table to exclude reversed runs.
2900: WHERE c.project_id = a.project_id
2901: AND c.task_id = a.task_id
2902: AND c.transaction_type = 'T'

Line 3010: FROM pa_alloc_txn_details a,

3006: CURSOR C_prev_amount( p_qrtr_num IN NUMBER
3007: , p_fscl_year IN NUMBER
3008: , p_prd_num IN NUMBER ) IS
3009: SELECT nvl(sum(nvl(a.current_allocation,0)),0)
3010: FROM pa_alloc_txn_details a,
3011: pa_alloc_runs b
3012: WHERE b.rule_id = p_rule_id
3013: AND b.run_id < p_run_id
3014: AND b.quarter = nvl(p_qrtr_num, b.quarter)

Line 3190: Select pa_alloc_txn_details_s.nextval

3186: END IF ;
3187: End if;
3188: END IF ; -- end of p_rule_id <> -1
3189: If x_alloc_txn_id is Null Then
3190: Select pa_alloc_txn_details_s.nextval
3191: Into x_alloc_txn_id
3192: From Dual;
3193: End If;
3194: INSERT INTO pa_alloc_txn_details (

Line 3194: INSERT INTO pa_alloc_txn_details (

3190: Select pa_alloc_txn_details_s.nextval
3191: Into x_alloc_txn_id
3192: From Dual;
3193: End If;
3194: INSERT INTO pa_alloc_txn_details (
3195: RUN_ID
3196: , RULE_ID
3197: , TRANSACTION_TYPE
3198: , FISCAL_YEAR

Line 3256: , x_alloc_txn_id --, pa_alloc_txn_details_s.nextval

3252: , p_expenditure_type
3253: , p_total_allocation
3254: , p_previous_allocation
3255: , p_current_allocation
3256: , x_alloc_txn_id --, pa_alloc_txn_details_s.nextval
3257: ,decode(p_rule_id,-1,p_attribute_category,v_attribute_category)
3258: ,decode(p_rule_id,-1,p_attribute1,v_attribute1)
3259: ,decode(p_rule_id,-1,p_attribute2,v_attribute2)
3260: ,decode(p_rule_id,-1,p_attribute3,v_attribute3)

Line 3659: from pa_alloc_txn_details pat

3655: -- on the tasks other than current task provided by client extension.
3656: CURSOR C_prev_offset_task_CE (v_project_id IN NUMBER
3657: , v_task_id IN NUMBER) is
3658: SELECT nvl(sum(nvl(current_allocation,0)),0)
3659: from pa_alloc_txn_details pat
3660: ,pa_alloc_runs par
3661: where pat.run_id = par.run_id
3662: and par.fiscal_year = nvl(p_fiscal_year, par.fiscal_year)
3663: and par.quarter = nvl(p_quarter_num,par.quarter)

Line 3678: FROM pa_alloc_txn_details a,

3674: SELECT a.run_id run_id
3675: , a.project_id project_id
3676: , a.task_id task_id
3677: , nvl(a.Total_allocation,0) Total_allocation
3678: FROM pa_alloc_txn_details a,
3679: pa_alloc_runs ar
3680: WHERE a.run_id = ar.run_id
3681: AND a.rule_id = p_rule_id
3682: AND ar.fiscal_year = NVL(p_fscl_year, ar.fiscal_year)

Line 3688: FROM pa_alloc_txn_details b

3684: AND ar.period_num = NVL(p_prd_num, ar.period_num )
3685: AND a.run_id < p_run_id
3686: AND a.transaction_type = 'O'
3687: AND NOT EXISTS ( SELECT 1
3688: FROM pa_alloc_txn_details b
3689: WHERE b.project_id = a.project_id
3690: AND b.task_id = a.task_id
3691: AND b.transaction_type = 'O'
3692: AND b.run_id = p_run_id )

Line 3694: FROM pa_alloc_txn_details c,

3690: AND b.task_id = a.task_id
3691: AND b.transaction_type = 'O'
3692: AND b.run_id = p_run_id )
3693: AND a.run_id =( SELECT max(c.run_id)
3694: FROM pa_alloc_txn_details c,
3695: pa_alloc_runs c_ar -- added this table to exclude reversed runs.
3696: WHERE c.project_id = a.project_id
3697: AND c.task_id = a.task_id
3698: AND c.transaction_type = 'O'

Line 4195: FROM pa_alloc_txn_details

4191: , x_remnant_amount OUT NOCOPY NUMBER ) IS
4192: CURSOR c_amnt_before_remnant IS
4193: SELECT nvl(SUM(current_allocation),0) sum_curr_alloc
4194: , MAX( ABS(current_allocation) ) max_curr_alloc
4195: FROM pa_alloc_txn_details
4196: WHERE run_id = p_run_id
4197: AND transaction_type = 'T';
4198: CURSOR c_remnant_proj_task( p_max_alloc IN NUMBER ) IS
4199: SELECT project_id, task_id

Line 4200: FROM pa_alloc_txn_details

4196: WHERE run_id = p_run_id
4197: AND transaction_type = 'T';
4198: CURSOR c_remnant_proj_task( p_max_alloc IN NUMBER ) IS
4199: SELECT project_id, task_id
4200: FROM pa_alloc_txn_details
4201: WHERE run_id = p_run_id
4202: AND transaction_type = 'T'
4203: AND ABS(current_allocation) = p_max_alloc;
4204: v_tot_pool_amount NUMBER;

Line 4225: UPDATE pa_alloc_txn_details

4221: OPEN c_remnant_proj_task( v_max_curr_alloc );
4222: FETCH c_remnant_proj_task INTO v_project_id, v_task_id;
4223: CLOSE c_remnant_proj_task;
4224: x_remnant_amount:= NVL(v_remnant,0);
4225: UPDATE pa_alloc_txn_details
4226: SET current_allocation = NVL(current_allocation,0) + NVL(v_remnant,0)
4227: , total_allocation = NVL(total_allocation, 0) + NVl(v_remnant, 0)
4228: WHERE run_id = p_run_id
4229: AND transaction_type='T'

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

9413: v_tgt_exp_group PA_EXPENDITURE_GROUPS.EXPENDITURE_GROUP%TYPE ;
9414: v_off_exp_group PA_EXPENDITURE_GROUPS.EXPENDITURE_GROUP%TYPE ;
9415: v_expnd_comment PA_TRANSACTION_INTERFACE_ALL.EXPENDITURE_COMMENT%TYPE;
9416:
9417: l_rej_code PA_ALLOC_TXN_DETAILS.rejection_code%type; /* added for bug 6243121 */
9418: l_cnt_ex number:=0; /* added for bug 6243121 */
9419:
9420: Cursor C_expenditure is
9421: Select expenditure_id

Line 9434: from pa_alloc_txn_details

9430:
9431: /* added cursor for bug 6243121 */
9432: cursor c_alloc_txn_err(runid IN NUMBER) is
9433: select distinct rejection_code
9434: from pa_alloc_txn_details
9435: where run_id=runid
9436: and status_code='R'
9437: and rejection_code is not null;
9438:

Line 9642: from pa_alloc_txn_details patd

9638: decode(patd.transaction_type,
9639: 'T',pa_utils4.GetOrgBusinessGrpId(run_rec.target_exp_org_id)
9640: ,pa_utils4.GetOrgBusinessGrpId(run_rec.offset_exp_org_id)))
9641: /* end of performance changes */
9642: from pa_alloc_txn_details patd
9643: , pa_projects_all pp
9644: , pa_tasks pt
9645: where patd.run_id = p_run_id
9646: and patd.project_id = pp.project_id

Line 9676: update pa_alloc_txn_details patd

9672: --- Update txn_details table with import info ---------
9673: IF P_DEBUG_MODE = 'Y' THEN
9674: pa_debug.write_file('Release_alloc_txns: ' || 'LOG', 'Updating the transactions with import results');
9675: END IF;
9676: update pa_alloc_txn_details patd
9677: set ( status_code
9678: , rejection_code
9679: , expenditure_id
9680: , expenditure_item_id) =

Line 9719: from pa_alloc_txn_details

9715: select 'Y'
9716: into v_import_failed
9717: from dual
9718: where EXISTS ( select 'exists'
9719: from pa_alloc_txn_details
9720: where run_id = p_run_id
9721: and status_code = 'R' ) ;
9722: EXCEPTION
9723: When NO_DATA_FOUND then

Line 9904: -- Delete Transactions from pa_alloc_txn_details

9900: pa_debug.write_file('Delete_alloc_txns: ' || 'LOG',pa_debug.G_err_stage);
9901: END IF;
9902: Init_who_cols ;
9903: lock_rule(p_rule_id, p_run_id) ;
9904: -- Delete Transactions from pa_alloc_txn_details
9905: While 1=1 Loop /* Bug 2176096 */
9906: Delete from pa_alloc_txn_details
9907: where run_id = p_run_id and rownum < 10001;
9908: /* Commented for Bug 2984871 Commit; */

Line 9906: Delete from pa_alloc_txn_details

9902: Init_who_cols ;
9903: lock_rule(p_rule_id, p_run_id) ;
9904: -- Delete Transactions from pa_alloc_txn_details
9905: While 1=1 Loop /* Bug 2176096 */
9906: Delete from pa_alloc_txn_details
9907: where run_id = p_run_id and rownum < 10001;
9908: /* Commented for Bug 2984871 Commit; */
9909: If Sql%Rowcount = 0 THen
9910: Exit;

Line 10054: -- Delete Transactions from pa_alloc_txn_details

10050: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10051: END IF;
10052: END IF;
10053: -- lock_rule(p_rule_id, l_run_id) ;
10054: -- Delete Transactions from pa_alloc_txn_details
10055: While 1=1 Loop /* Bug 2176096 */
10056: Delete from pa_alloc_txn_details
10057: where run_id = l_run_id and rownum < 10001;
10058: /* Commented for Bug 2984871 Commit; */

Line 10056: Delete from pa_alloc_txn_details

10052: END IF;
10053: -- lock_rule(p_rule_id, l_run_id) ;
10054: -- Delete Transactions from pa_alloc_txn_details
10055: While 1=1 Loop /* Bug 2176096 */
10056: Delete from pa_alloc_txn_details
10057: where run_id = l_run_id and rownum < 10001;
10058: /* Commented for Bug 2984871 Commit; */
10059: If Sql%Rowcount = 0 THen
10060: Exit;

Line 10463: FROM pa_alloc_txn_details

10459: l_module_name VARCHAR2(100);
10460: CURSOR c_get_cint_txns
10461: IS
10462: SELECT alloc_txn_id
10463: FROM pa_alloc_txn_details
10464: WHERE run_id=p_run_id;
10465: BEGIN
10466: x_msg_count := 0;
10467: x_return_status := FND_API.G_RET_STS_SUCCESS;