DBA Data[Home] [Help]

APPS.PSB_BUDGET_REVISIONS_PVT dependencies on PSB_BUDGET_REVISION_ACCOUNTS

Line 728: (select b.gl_period_name from psb_budget_revision_lines a, psb_budget_revision_accounts b

724: from GL_PERIOD_STATUSES
725: where application_id = 101
726: and set_of_books_id = g_set_of_books_id
727: and period_name in
728: (select b.gl_period_name from psb_budget_revision_lines a, psb_budget_revision_accounts b
729: where a.budget_revision_id = p_budget_revision_id
730: and b.budget_revision_acct_line_id = a.budget_revision_acct_line_id);
731:
732: cursor c_position_dates_br is

Line 1048: 'from psb_budget_revision_accounts pbra, psb_budget_revision_lines pbrl ' ||

1044: -- Bug#3340060: Refixed bug#3022417 using bind variables. Earlier fix was
1045: -- causing duplicate record creation.
1046: sql_bra := '' ||
1047: 'select pbra.budget_revision_acct_line_id '||
1048: 'from psb_budget_revision_accounts pbra, psb_budget_revision_lines pbrl ' ||
1049: 'where pbra.code_combination_id = :code_combination_id ' ||
1050: 'and pbra.gl_period_name = :gl_period_name ' ||
1051: 'and NVL(pbra.currency_code, :gmc1) = NVL(:currency_code, :gmc2) ' ||
1052: 'and NVL(pbra.gl_budget_version_id,:gmn1)=NVL(:budget_version_id,:gmn2) '||

Line 1078: DELETE psb_budget_revision_accounts

1074: --
1075: DELETE psb_budget_revision_lines
1076: WHERE budget_revision_acct_line_id = l_budget_revision_acct_line_id;
1077: --
1078: DELETE psb_budget_revision_accounts
1079: WHERE budget_revision_acct_line_id = l_budget_revision_acct_line_id;
1080: --
1081: END IF;
1082:

Line 1090: 'from psb_budget_revision_accounts pbra, psb_budget_revision_lines pbrl ' ||

1086: -- Bug#3340060: End
1087:
1088: /* Commented as this code is replated by the above loop logic.
1089: sql_bra := 'select pbra.budget_revision_acct_line_id '||
1090: 'from psb_budget_revision_accounts pbra, psb_budget_revision_lines pbrl ' ||
1091: 'where pbra.code_combination_id = :code_combination_id ' ||
1092: 'and pbra.gl_period_name = :gl_period_name ' ||
1093: 'and nvl(pbra.currency_code, ''' || FND_API.G_MISS_CHAR ||
1094: ''') = nvl(:currency_code, ''' || FND_API.G_MISS_CHAR || ''') ' ||

Line 1114: Insert into PSB_BUDGET_REVISION_ACCOUNTS (BUDGET_REVISION_ACCT_LINE_ID, CODE_COMBINATION_ID,

1110: (X_code_combination_id => p_code_combination_id,
1111: X_account_type => l_account_type,
1112: X_template_id => l_template_id);
1113:
1114: Insert into PSB_BUDGET_REVISION_ACCOUNTS (BUDGET_REVISION_ACCT_LINE_ID, CODE_COMBINATION_ID,
1115: BUDGET_GROUP_ID, POSITION_ID, GL_PERIOD_NAME, GL_BUDGET_VERSION_ID, CURRENCY_CODE,
1116: BUDGET_BALANCE, ACCOUNT_TYPE, REVISION_TYPE, REVISION_VALUE_TYPE,
1117: REVISION_AMOUNT, functional_transaction,
1118: FUNDS_CONTROL_STATUS_CODE, FUNDS_CONTROL_RESULTS_CODE,

Line 1120: values (psb_budget_revision_accounts_s.nextval, p_code_combination_id,

1116: BUDGET_BALANCE, ACCOUNT_TYPE, REVISION_TYPE, REVISION_VALUE_TYPE,
1117: REVISION_AMOUNT, functional_transaction,
1118: FUNDS_CONTROL_STATUS_CODE, FUNDS_CONTROL_RESULTS_CODE,
1119: NOTE_ID, FUNDS_CONTROL_TIMESTAMP, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN, CREATED_BY, CREATION_DATE)
1120: values (psb_budget_revision_accounts_s.nextval, p_code_combination_id,
1121: p_budget_group_id, decode(p_position_id, FND_API.G_MISS_NUM, null, p_position_id), p_gl_period_name, l_budget_version_id, p_currency_code,
1122: p_budget_balance, l_account_type, p_revision_type, p_revision_value_type,
1123: decode(p_revision_value_type, 'A', Get_Rounded_Amount(p_currency_code, p_revision_amount), p_revision_amount), p_functional_transaction,
1124: decode(p_funds_status_code, FND_API.G_MISS_CHAR, null, p_funds_status_code),

Line 1152: Update PSB_BUDGET_REVISION_ACCOUNTS

1148: end;
1149: else
1150: begin
1151:
1152: Update PSB_BUDGET_REVISION_ACCOUNTS
1153: set code_combination_id = p_code_combination_id,
1154: budget_group_id = p_budget_group_id,
1155: gl_period_name = p_gl_period_name,
1156: budget_balance = p_budget_balance,

Line 1287: from psb_budget_revision_accounts a, psb_budget_revision_lines b

1283: and (effective_end_date > p_period_end_date))));
1284:
1285: cursor c_AcctExists is
1286: select 'Exists'
1287: from psb_budget_revision_accounts a, psb_budget_revision_lines b
1288: where a.code_combination_id = p_ccid
1289: and a.gl_period_name = p_period_name
1290: and b.budget_revision_id = p_budget_revision_id
1291: and b.budget_revision_acct_line_id = a.budget_revision_acct_line_id;

Line 1835: from psb_budget_revision_accounts pbra,

1831: /* end bug 3687997 */
1832:
1833: cursor c_original_budget is
1834: Select budget_balance
1835: from psb_budget_revision_accounts pbra,
1836: psb_budget_revision_lines pbrl,
1837: psb_budget_revisions pbr
1838: where pbra.code_combination_id = p_code_combination_id
1839: and pbra.gl_period_name = p_gl_period

Line 1852: from psb_budget_revision_accounts pbra,

1848: = NVL(pbr.currency_code,p_currency_code); -- Bug 3029168
1849:
1850: Cursor c_original_budget_sum is
1851: Select sum(budget_balance) sum_budget_balance
1852: from psb_budget_revision_accounts pbra,
1853: psb_budget_revision_lines pbrl,
1854: psb_budget_revisions pbr
1855: where pbra.code_combination_id = p_code_combination_id
1856: and pbra.gl_budget_version_id = p_gl_budget_version_id

Line 2173: from psb_budget_revision_accounts_v pbra,

2169: pbra.budget_balance,
2170: pbra.revision_type,
2171: pbra.revision_value_type,
2172: pbra.revision_amount
2173: from psb_budget_revision_accounts_v pbra,
2174: GL_PERIOD_STATUSES gps
2175: where budget_revision_id = p_budget_revision_id
2176: and gps.application_id = 101
2177: and gps.set_of_books_id = g_set_of_books_id

Line 2398: UPDATE PSB_BUDGET_REVISION_ACCOUNTS

2394: p_currency_code => c_Fund_Balances_Rec.currency_code,
2395: p_code_combination_id => c_Fund_Balances_Rec.code_combination_id
2396: );
2397:
2398: UPDATE PSB_BUDGET_REVISION_ACCOUNTS
2399: SET budget_balance = l_budget_balance,
2400: funds_control_timestamp = sysdate,
2401: funds_control_status_code = c_Fund_Balances_Rec.status_code,
2402: funds_control_results_code = c_Fund_Balances_Rec.result_code

Line 3006: FROM psb_budget_revision_lines pbrl, psb_budget_revision_accounts pbra

3002: SELECT pbra.code_combination_id, pbra.gl_budget_version_id,
3003: pbra.budget_group_id,
3004: sum(decode(pbra.revision_type, 'D', -1 * pbra.revision_amount,
3005: pbra.revision_amount)) sum_revision
3006: FROM psb_budget_revision_lines pbrl, psb_budget_revision_accounts pbra
3007: WHERE pbrl.budget_revision_id = p_budget_revision_id
3008: AND pbra.budget_revision_acct_line_id = pbrl.budget_revision_acct_line_id
3009: AND pbra.gl_period_name = p_gl_period_name
3010: AND pbra.position_id IS NOT NULL

Line 5379: from psb_budget_revision_accounts pbra, psb_budget_revision_lines pbrl

5375: pbra.revision_type,
5376: pbra.revision_value_type,
5377: pbra.revision_amount,
5378: pbrl.freeze_flag, pbrl.view_line_flag
5379: from psb_budget_revision_accounts pbra, psb_budget_revision_lines pbrl
5380: where pbrl.budget_revision_id = p_budget_revision_id
5381: and pbra.budget_revision_acct_line_id = pbrl.budget_revision_acct_line_id
5382: and position_id = p_position_id
5383: and gl_period_name = l_gl_period;

Line 5387: from psb_budget_revision_accounts pbra, psb_budget_revision_lines pbrl

5383: and gl_period_name = l_gl_period;
5384:
5385: cursor c_zero_accounts is
5386: select pbra.budget_revision_acct_line_id
5387: from psb_budget_revision_accounts pbra, psb_budget_revision_lines pbrl
5388: where pbrl.budget_revision_id = p_budget_revision_id
5389: and pbra.budget_revision_acct_line_id = pbrl.budget_revision_acct_line_id
5390: and pbra.revision_amount = 0;
5391:

Line 7048: FROM psb_budget_revision_accounts

7044: g_last_update_flag_tbl (p_position_id) = 1 THEN
7045:
7046: FOR l_acc_line_rec IN
7047: (SELECT COUNT(1) acct_line_cnt
7048: FROM psb_budget_revision_accounts
7049: WHERE budgeT_revision_acct_line_id
7050: IN (SELECT budget_revision_Acct_line_id
7051: FROM psb_budget_revision_lines
7052: WHERE budget_revision_id = p_budget_revision_id)

Line 7382: PSB_BUDGET_REVISION_ACCOUNTS a

7378:
7379: cursor c_SumAll is
7380: select Sum(decode(a.revision_type,'I',nvl(a.revision_amount, 0),'D',-nvl(a.revision_amount,0))) Sum_Acc
7381: from PSB_BUDGET_REVISION_LINES b,
7382: PSB_BUDGET_REVISION_ACCOUNTS a
7383: where b.budget_revision_id = p_budget_revision_id
7384: and a.budget_revision_acct_line_id = b.budget_revision_acct_line_id
7385: and a.currency_code = p_currency_code
7386: and a.position_id is null

Line 7399: from PSB_BUDGET_REVISION_ACCOUNTS a,

7395:
7396: -- Compute sum of BR Account Lines for a Constraint Formula of type 4
7397: cursor c_Sum (CCID NUMBER) is
7398: select Sum(decode(a.revision_type,'I',nvl(a.revision_amount, 0),'D',-nvl(a.revision_amount,0))) Sum_Acc
7399: from PSB_BUDGET_REVISION_ACCOUNTS a,
7400: PSB_BUDGET_REVISION_LINES b
7401: where a.code_combination_id = CCID
7402: and a.currency_code = p_currency_code
7403: and a.position_id is null

Line 7409: from psb_budget_revision_accounts pbra,

7405: and a.budget_revision_acct_line_id = b.budget_revision_acct_line_id;
7406:
7407: cursor c_Original_Balance (CCID NUMBER, Currency VARCHAR2) is
7408: select sum(budget_balance) original_balance
7409: from psb_budget_revision_accounts pbra,
7410: psb_budget_revision_lines pbrl,
7411: psb_budget_revisions pbr
7412: where pbra.code_combination_id = CCID
7413: and pbra.currency_code = Currency

Line 7429: from psb_budget_revision_accounts pbra,

7425: and end_date between g_from_date and g_to_date);
7426:
7427: cursor c_Original_Balance_Sum (Currency VARCHAR2) is
7428: select sum(budget_balance) original_balance
7429: from psb_budget_revision_accounts pbra,
7430: psb_budget_revision_lines pbrl,
7431: psb_budget_revisions pbr
7432: where pbra.code_combination_id in
7433: (select d.code_combination_id

Line 7457: FROM psb_budget_revision_accounts pbra,

7453:
7454: CURSOR c_Account (CCID NUMBER) IS
7455: SELECT pbra.gl_budget_version_id,
7456: pbra.gl_period_name -- Bug 5148786
7457: FROM psb_budget_revision_accounts pbra,
7458: psb_budget_revision_lines pbrl
7459: WHERE pbra.code_combination_id = CCID
7460: AND pbra.position_id is null
7461: AND pbrl.budget_revision_id = p_budget_revision_id

Line 7468: FROM psb_budget_revision_accounts pbra,

7464: CURSOR c_Account_Sum is
7465: SELECT pbra.code_combination_id,
7466: pbra.gl_budget_version_id,
7467: pbra.gl_period_name -- Bug 5148786
7468: FROM psb_budget_revision_accounts pbra,
7469: psb_budget_revision_lines pbrl
7470: WHERE pbra.code_combination_id in
7471: (select d.code_combination_id
7472: from psb_budget_accounts d,

Line 9586: Delete PSB_BUDGET_REVISION_ACCOUNTS

9582: l_global_revision := C_global_Revision_Rec.global_budget_revision;
9583: End Loop;
9584:
9585: IF l_global_revision = 'Y' THEN
9586: Delete PSB_BUDGET_REVISION_ACCOUNTS
9587: where budget_revision_acct_line_id = p_budget_revision_acct_line_id;
9588:
9589: Delete PSB_BUDGET_REVISION_LINES
9590: where budget_revision_acct_line_id = p_budget_revision_acct_line_id;

Line 10792: PSB_BUDGET_REVISION_ACCOUNTS bra

10788: SELECT 'exists' result FROM dual WHERE EXISTS
10789: (
10790: SELECT bra.code_combination_id
10791: FROM PSB_BUDGET_REVISION_LINES brl,
10792: PSB_BUDGET_REVISION_ACCOUNTS bra
10793: WHERE brl.budget_revision_id = p_budget_revision_id
10794: AND bra.budget_revision_acct_line_id = brl.budget_revision_acct_line_id
10795: /*For Bug No : 2161125 Start*/
10796: AND bra.position_id IS NULL

Line 11167: FROM PSB_BUDGET_REVISION_LINES brl, PSB_BUDGET_REVISION_ACCOUNTS bra

11163: AND sr.account_or_position_type = 'A'
11164: AND sr.rule_id = p_rule_id
11165: /* Bug No 2135165 Start */
11166: AND ba.code_combination_id in (SELECT bra.code_combination_id
11167: FROM PSB_BUDGET_REVISION_LINES brl, PSB_BUDGET_REVISION_ACCOUNTS bra
11168: WHERE brl.budget_revision_id = p_budget_revision_id
11169: AND bra.budget_revision_acct_line_id = brl.budget_revision_acct_line_id
11170: AND EXISTS (SELECT 1 FROM PSB_ENTITY_ASSIGNMENT ea, gl_sets_of_books sob, gl_periods_v gp
11171: WHERE ea.entity_set_id = g_brr_rule_set_id

Line 11259: ' PSB_BUDGET_REVISION_ACCOUNTS bra '||

11255: l_seg_sql := 'SELECT DISTINCT glcc.'||p_application_column_name||
11256: ' FROM gl_code_combinations glcc,'||
11257: ' (SELECT DISTINCT bra.code_combination_id '||
11258: ' FROM PSB_BUDGET_REVISION_LINES brl,'||
11259: ' PSB_BUDGET_REVISION_ACCOUNTS bra '||
11260: ' WHERE brl.budget_revision_id = '||to_char(p_budget_revision_id)||
11261: ' AND bra.budget_revision_acct_line_id = brl.budget_revision_acct_line_id'||
11262: ' ) rcc'||
11263: ' WHERE glcc.code_combination_id = rcc.code_combination_id';

Line 11273: ' PSB_BUDGET_REVISION_ACCOUNTS bra'||

11269: ' AND sr.account_or_position_type = '||''''||'A'||''''||
11270: ' AND sr.rule_id = :b_rule_id'||
11271: ' AND ba.code_combination_id in (SELECT bra.code_combination_id '||
11272: ' FROM PSB_BUDGET_REVISION_LINES brl,'||
11273: ' PSB_BUDGET_REVISION_ACCOUNTS bra'||
11274: ' WHERE brl.budget_revision_id = :b_budget_revision_id'||
11275: ' AND bra.budget_revision_acct_line_id = brl.budget_revision_acct_line_id'||
11276: ' AND EXISTS (SELECT 1 '||
11277: ' FROM PSB_ENTITY_ASSIGNMENT ea, gl_sets_of_books sob, gl_periods_v gp'||

Line 11295: ' PSB_BUDGET_REVISION_ACCOUNTS bra'||

11291: ' ))'||
11292:
11293: ' AND EXISTS (SELECT 1 '||
11294: ' FROM PSB_BUDGET_REVISION_LINES brl,'||
11295: ' PSB_BUDGET_REVISION_ACCOUNTS bra'||
11296: ' WHERE brl.budget_revision_id = :b_budget_revision_id'||
11297: ' AND bra.budget_revision_acct_line_id = brl.budget_revision_acct_line_id'||
11298: ' AND bra.code_combination_id = ba.code_combination_id)'||
11299: ' AND EXISTS (SELECT 1'||

Line 11412: from psb_budget_revision_accounts bra, psb_budget_revision_lines brl

11408: FOR c_CCID_Rec in c_CCID loop
11409: /*For Bug No : 2150471 Start*/
11410: --commented due to performance issues
11411: /*select count(bra.code_combination_id) into l_cnt
11412: from psb_budget_revision_accounts bra, psb_budget_revision_lines brl
11413: where bra.budget_revision_acct_line_id = brl.budget_revision_acct_line_id
11414: and brl.budget_revision_id = p_budget_revision_id
11415: and bra.code_combination_id = c_CCID_Rec.code_combination_id;*/
11416:

Line 11517: PSB_BUDGET_REVISION_ACCOUNTS a

11513: cursor c_SumAll is
11514: SELECT a.revision_type, a.revision_value_type, a.revision_amount,
11515: a.account_type, a.budget_balance
11516: FROM PSB_BUDGET_REVISION_LINES b,
11517: PSB_BUDGET_REVISION_ACCOUNTS a
11518: WHERE b.budget_revision_id = p_budget_revision_id
11519: AND a.budget_revision_acct_line_id = b.budget_revision_acct_line_id
11520: AND a.code_combination_id = p_ccid
11521: /*For Bug No : 2161125 Start*/

Line 11729: select note_id from PSB_BUDGET_REVISION_ACCOUNTS where budget_revision_acct_line_id = p_account_line_id;

11725: l_code_combination_id NUMBER;
11726: l_message_text VARCHAR2(4000);
11727:
11728: cursor c_acct_note_id is
11729: select note_id from PSB_BUDGET_REVISION_ACCOUNTS where budget_revision_acct_line_id = p_account_line_id;
11730:
11731: -- Bug#4571412
11732: -- Get the code_combination_id.
11733: CURSOR c_pos_note_id

Line 11737: FROM PSB_BUDGET_REVISION_POSITIONS pbrp, PSB_BUDGET_REVISION_ACCOUNTS pbra

11733: CURSOR c_pos_note_id
11734: IS
11735: SELECT pbrp.note_id,
11736: pbra.code_combination_id
11737: FROM PSB_BUDGET_REVISION_POSITIONS pbrp, PSB_BUDGET_REVISION_ACCOUNTS pbra
11738: WHERE pbrp.budget_revision_pos_line_id = p_position_line_id
11739: AND pbrp.position_id = pbra.position_id;
11740:
11741: BEGIN

Line 11771: update PSB_BUDGET_REVISION_ACCOUNTS

11767: values (psb_ws_account_line_notes_s.nextval, p_note, sysdate, FND_GLOBAL.USER_ID, FND_GLOBAL.LOGIN_ID, FND_GLOBAL.USER_ID, sysdate)
11768: returning note_id into l_note_id;
11769:
11770: if p_account_line_id is not null then
11771: update PSB_BUDGET_REVISION_ACCOUNTS
11772: set note_id = l_note_id
11773: where budget_revision_acct_line_id = p_account_line_id;
11774: elsif p_position_line_id is not null then
11775: update PSB_BUDGET_REVISION_POSITIONS