DBA Data[Home] [Help]

APPS.PSB_BUDGET_REVISIONS_PVT dependencies on PSB_BUDGET_REVISIONS

Line 1: PACKAGE BODY PSB_BUDGET_REVISIONS_PVT AS

1: PACKAGE BODY PSB_BUDGET_REVISIONS_PVT AS
2: /* $Header: PSBVBRVB.pls 120.39 2006/06/02 13:49:05 matthoma ship $ */
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30):= 'PSB_BUDGET_REVISIONS_PVT';
5:

Line 4: G_PKG_NAME CONSTANT VARCHAR2(30):= 'PSB_BUDGET_REVISIONS_PVT';

1: PACKAGE BODY PSB_BUDGET_REVISIONS_PVT AS
2: /* $Header: PSBVBRVB.pls 120.39 2006/06/02 13:49:05 matthoma ship $ */
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30):= 'PSB_BUDGET_REVISIONS_PVT';
5:
6: g_default_fte CONSTANT NUMBER := 1;
7:
8: -- Bug#4675858

Line 47: from PSB_BUDGET_REVISIONS

43: g_no_ccids NUMBER;
44:
45: cursor c_Global_Rev (RevID NUMBER) is
46: select nvl(global_budget_revision_id, budget_revision_id) global_revision_id
47: from PSB_BUDGET_REVISIONS
48: where budget_revision_id = RevID;
49:
50: cursor c_Distribute_Rev (GlobalRevID NUMBER, BudgetGroupID NUMBER) is
51: select budget_revision_id

Line 52: from PSB_BUDGET_REVISIONS

48: where budget_revision_id = RevID;
49:
50: cursor c_Distribute_Rev (GlobalRevID NUMBER, BudgetGroupID NUMBER) is
51: select budget_revision_id
52: from PSB_BUDGET_REVISIONS
53: where nvl(global_budget_revision_id, budget_revision_id) = GlobalRevID
54: and budget_group_id in
55: (select budget_group_id
56: from PSB_BUDGET_GROUPS

Line 267: delete FROM PSB_BUDGET_REVISIONS

263: END IF;
264:
265: -- Perform the delete
266:
267: delete FROM PSB_BUDGET_REVISIONS
268: WHERE BUDGET_REVISION_ID = P_BUDGET_REVISION_ID;
269:
270: if (sql%notfound) THEN
271: raise no_data_found;

Line 395: select psb_budget_revisions_s.nextval budget_revision_id

391:
392: l_budget_revision_id NUMBER;
393:
394: cursor c_Seq is
395: select psb_budget_revisions_s.nextval budget_revision_id
396: from dual;
397:
398: BEGIN
399:

Line 422: update PSB_BUDGET_REVISIONS

418: END IF;
419:
420: if p_budget_revision_id is not null then
421:
422: update PSB_BUDGET_REVISIONS
423: set justification = decode(p_justification, FND_API.G_MISS_CHAR, justification, p_justification),
424: from_gl_period_name = decode(p_from_gl_period_name,FND_API.G_MISS_CHAR, from_gl_period_name, p_from_gl_period_name),
425: to_gl_period_name = decode(p_to_gl_period_name, FND_API.G_MISS_CHAR, to_gl_period_name, p_to_gl_period_name),
426: currency_code = decode(p_currency_code, FND_API.G_MISS_CHAR, currency_code, p_currency_code),

Line 492: INSERT INTO PSB_BUDGET_REVISIONS

488: for c_Seq_Rec in c_Seq loop
489: l_budget_revision_id := c_Seq_Rec.budget_revision_id;
490: end loop;
491:
492: INSERT INTO PSB_BUDGET_REVISIONS
493: (budget_revision_id,
494: justification,
495: budget_group_id,
496: gl_budget_set_id,

Line 696: from PSB_BUDGET_REVISIONS

692: approval_orig_system,
693: approval_override_by,
694: nvl(global_budget_revision_id, budget_revision_id) global_budget_revision_id,
695: hr_budget_id
696: from PSB_BUDGET_REVISIONS
697: where budget_revision_id = p_budget_revision_id;
698:
699: cursor c_BG is
700: select nvl(root_budget_group_id, budget_group_id) root_budget_group_id,

Line 1576: from psb_budget_revisions

1572: -- Bug 3029168 added the join with currency code
1573: -- in the c_budrev_exists cursor
1574: cursor c_budrev_exists is
1575: select budget_revision_id
1576: from psb_budget_revisions
1577: where budget_group_id = l_budget_group_id
1578: and base_line_revision = 'Y'
1579: AND ((currency_code = 'STAT' AND p_event_type = 'SW')
1580: OR ((currency_code <> 'STAT' OR currency_code IS NULL) AND p_event_type = 'BP'));

Line 1654: PSB_BUDGET_REVISIONS_PVT.Create_Budget_Revision

1650:
1651: IF not l_budget_revision_exists THEN
1652: begin
1653:
1654: PSB_BUDGET_REVISIONS_PVT.Create_Budget_Revision
1655: (p_api_version => 1.0,
1656: p_return_status => l_return_status,
1657: p_msg_count => l_msg_count,
1658: p_msg_data => l_msg_data,

Line 1730: PSB_BUDGET_REVISIONS_PVT.Create_Revision_Accounts

1726: (X_code_combination_id => c_lines_rec.code_combination_id,
1727: X_account_type => l_account_type,
1728: X_template_id => l_template_id);
1729:
1730: PSB_BUDGET_REVISIONS_PVT.Create_Revision_Accounts
1731: (p_api_version => 1.0,
1732: p_return_status => l_return_status,
1733: p_msg_count => l_msg_count,
1734: p_msg_data => l_msg_data,

Line 1837: psb_budget_revisions pbr

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
1840: and pbra.gl_budget_version_id = p_gl_budget_version_id
1841: and pbra.budget_revision_acct_line_id = pbrl.budget_revision_acct_line_id

Line 1854: psb_budget_revisions pbr

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
1857: and pbra.position_id is null
1858: and pbra.budget_revision_acct_line_id = pbrl.budget_revision_acct_line_id

Line 7411: psb_budget_revisions pbr

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
7414: and pbra.position_id is null
7415: and pbra.budget_revision_acct_line_id = pbrl.budget_revision_acct_line_id

Line 7431: psb_budget_revisions pbr

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
7434: from psb_budget_accounts d,
7435: psb_set_relations_v e

Line 9335: Update PSB_BUDGET_REVISIONS

9331: l_constraint_set_status := l_validation_status;
9332: end if;
9333:
9334: /* For Bug No.2810621 Start*/
9335: Update PSB_BUDGET_REVISIONS
9336: set constraint_set_id = g_constraint_set_id,
9337: last_update_date = sysdate,
9338: last_updated_by = FND_GLOBAL.USER_ID,
9339: last_update_login = FND_GLOBAL.LOGIN_ID

Line 9399: from psb_budget_revisions pbr

9395: l_return_status VARCHAR2(1);
9396:
9397: cursor c_global_revision is
9398: select pbr.global_budget_revision
9399: from psb_budget_revisions pbr
9400: where pbr.budget_revision_id = p_budget_revision_id;
9401:
9402: cursor c_Position_Revision is
9403: select position_id, effective_start_date, effective_end_date

Line 9539: from psb_budget_revisions pbr

9535: l_msg_data varchar2(2000);
9536:
9537: Cursor C_global_revision is
9538: Select pbr.global_budget_revision
9539: from psb_budget_revisions pbr
9540: where pbr.budget_revision_id = p_budget_revision_id;
9541:
9542: Cursor C_Account_line is
9543: Select pbrl.budget_revision_acct_line_id

Line 9637: -- psb_budget_revisions and matrix tables (psb_budget_revision_lines and

9633: | PROCEDURE Delete_Budget_Revision_Pvt ( Private ) |
9634: +===========================================================================*/
9635: --
9636: -- This API deletes an official budget_revision by performing deletes on
9637: -- psb_budget_revisions and matrix tables (psb_budget_revision_lines and
9638: -- psb_budget_revision_pos_lines).
9639: -- It also deletes budget_revision related data from other tables.
9640: --
9641: PROCEDURE Delete_Budget_Revision_Pvt

Line 9698: psb_budget_revisions br

9694: AND nvl(pp.new_position_flag, 'N') = 'Y'
9695: AND EXISTS (SELECT 1
9696: FROM psb_budget_revision_positions brp,
9697: psb_budget_revision_pos_lines brpl,
9698: psb_budget_revisions br
9699: WHERE br.budget_revision_id = p_budget_revision_id
9700: AND br.budget_revision_id = brpl.budget_revision_id
9701: AND brpl.budget_revision_pos_line_id = brp.budget_revision_pos_line_id
9702: AND brp.position_id = pp.position_id

Line 9714: l_data_extract_id := PSB_BUDGET_REVISIONS_PVT.FIND_SYSTEM_DATA_EXTRACT(p_budget_group_id);

9710: --
9711: -- Deleting account related information.
9712: --
9713: /*For Bug No : 1527423 Start*/
9714: l_data_extract_id := PSB_BUDGET_REVISIONS_PVT.FIND_SYSTEM_DATA_EXTRACT(p_budget_group_id);
9715: /*For Bug No : 1527423 End*/
9716:
9717: OPEN l_br_account_lines_csr;
9718:

Line 9729: PSB_BUDGET_REVISIONS_PVT.Delete_Revision_Accounts

9725: END IF;
9726:
9727: -- Deleting records from psb_budget_revision_lines.
9728:
9729: PSB_BUDGET_REVISIONS_PVT.Delete_Revision_Accounts
9730: ( p_api_version => 1.0 ,
9731: p_init_msg_list => FND_API.G_FALSE,
9732: p_commit => FND_API.G_FALSE,
9733: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

Line 9778: PSB_BUDGET_REVISIONS_PVT.Delete_Revision_Positions

9774: END IF;
9775:
9776: -- Deleting records from psb_budget_revision_lines.
9777:
9778: PSB_BUDGET_REVISIONS_PVT.Delete_Revision_Positions
9779: ( p_api_version => 1.0 ,
9780: p_init_msg_list => FND_API.G_FALSE,
9781: p_commit => FND_API.G_FALSE,
9782: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

Line 9822: --l_data_extract_id := PSB_BUDGET_REVISIONS_PVT.FIND_SYSTEM_DATA_EXTRACT(p_budget_group_id);

9818:
9819: --Find system data extract for the given budget revision
9820: /*For Bug No ; 1527423 Start*/
9821: --following code has been moved to up
9822: --l_data_extract_id := PSB_BUDGET_REVISIONS_PVT.FIND_SYSTEM_DATA_EXTRACT(p_budget_group_id);
9823: /*For Bug No ; 1527423 End*/
9824:
9825: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
9826: RAISE FND_API.G_EXC_ERROR ;

Line 9867: (X_entity_name => 'PSB_BUDGET_REVISIONS',

9863: WHERE worksheet_id = p_budget_revision_id ;
9864:
9865: /*For Bug No : 2613269 Start*/
9866: fnd_attached_documents2_pkg.delete_attachments
9867: (X_entity_name => 'PSB_BUDGET_REVISIONS',
9868: X_pk1_value => p_budget_revision_id,
9869: X_delete_document_flag => 'Y'
9870: );
9871: /*For Bug No : 2613269 End*/

Line 9873: -- Delete from psb_budget_revisions.

9869: X_delete_document_flag => 'Y'
9870: );
9871: /*For Bug No : 2613269 End*/
9872:
9873: -- Delete from psb_budget_revisions.
9874:
9875: PSB_BUDGET_REVISIONS_PVT.Delete_Row
9876: (p_api_version => 1.0 ,
9877: p_init_msg_list => FND_API.G_FALSE,

Line 9875: PSB_BUDGET_REVISIONS_PVT.Delete_Row

9871: /*For Bug No : 2613269 End*/
9872:
9873: -- Delete from psb_budget_revisions.
9874:
9875: PSB_BUDGET_REVISIONS_PVT.Delete_Row
9876: (p_api_version => 1.0 ,
9877: p_init_msg_list => FND_API.G_FALSE,
9878: p_commit => FND_API.G_FALSE,
9879: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

Line 9964: FROM psb_budget_revisions

9960: INTO
9961: l_global_budget_revision,
9962: l_revise_by_position,
9963: l_budget_group_id
9964: FROM psb_budget_revisions
9965: WHERE budget_revision_id = p_budget_revision_id ;
9966:
9967: --
9968: -- Take action bases on the type of the budget_revision.

Line 9980: FROM psb_budget_revisions

9976: -- Find all related budget_revisions.
9977: FOR l_budget_revision_rec IN
9978: (
9979: SELECT budget_revision_id
9980: FROM psb_budget_revisions
9981: WHERE global_budget_revision_id = p_budget_revision_id
9982: AND NVL( global_budget_revision, 'N' ) = 'N'
9983: )
9984: LOOP

Line 10012: FROM psb_budget_revisions

10008: -- Delete all the child official budget_revisions.
10009: FOR l_budget_revision_rec IN
10010: (
10011: SELECT budget_revision_id, revise_by_position, budget_group_id
10012: FROM psb_budget_revisions
10013: WHERE global_budget_revision_id = p_budget_revision_id
10014: AND NVL( global_budget_revision, 'N' ) = 'N'
10015: )
10016: LOOP

Line 10201: from psb_budget_revisions

10197: l_currency_code VARCHAR2(15);
10198:
10199: Cursor C_Budget_Group is
10200: Select budget_group_id,currency_code -- Bug 3029168 added currency_code
10201: from psb_budget_revisions
10202: where budget_revision_id = p_budget_revision_id;
10203:
10204: BEGIN
10205:

Line 10445: from psb_budget_revisions

10441: l_currency_code VARCHAR2(15);
10442:
10443: Cursor C_Budget_Group is
10444: Select budget_group_id,currency_code -- Bug 3029168 added currency code
10445: from psb_budget_revisions
10446: where budget_revision_id = p_budget_revision_id;
10447:
10448: BEGIN
10449:

Line 10492: IF NVL(PSB_BUDGET_REVISIONS_PVT.g_soft_error_flag, 'N') ='Y' THEN

10488:
10489: -- Bug#4571412
10490: -- Set the CP status to Warning if
10491: -- Note updation had errors.
10492: IF NVL(PSB_BUDGET_REVISIONS_PVT.g_soft_error_flag, 'N') ='Y' THEN
10493: l_set_CP_status
10494: := FND_CONCURRENT.SET_COMPLETION_STATUS
10495: (status => 'WARNING',
10496: message => NULL

Line 10590: FROM psb_budget_revisions

10586: l_string VARCHAR2(25) ;
10587:
10588: CURSOR l_budget_revisions_csr IS
10589: SELECT budget_revision_id
10590: FROM psb_budget_revisions
10591: WHERE budget_revision_id BETWEEN p_from_budget_revision_id
10592: AND p_to_budget_revision_id
10593: AND submission_status = p_submission_status;
10594:

Line 10597: FROM psb_budget_revisions

10593: AND submission_status = p_submission_status;
10594:
10595: CURSOR l_budget_rev_csr IS
10596: SELECT budget_revision_id
10597: FROM psb_budget_revisions
10598: WHERE budget_revision_id BETWEEN p_from_budget_revision_id
10599: AND p_to_budget_revision_id;
10600:
10601: BEGIN

Line 10868: FROM psb_budget_revisions_v

10864: --
10865:
10866: SELECT budget_group_id, transaction_type
10867: INTO l_budget_group_id, l_transaction_type
10868: FROM psb_budget_revisions_v
10869: WHERE budget_revision_id = p_budget_revision_id ;
10870: --
10871: SELECT chart_of_accounts_id,
10872: /* Bug No 2135165 Start */

Line 11684: FROM PSB_BUDGET_REVISIONS

11680: --
11681: --Compute Sum of BR Account Lines (all Account Sets assigned to the Rule)
11682: cursor c_type is
11683: SELECT DECODE(permanent_revision, 'Y', 'PERMANENT', 'TEMPORARY') permanent_revision
11684: FROM PSB_BUDGET_REVISIONS
11685: WHERE budget_revision_id = p_budget_revision_id;
11686: l_permanent_revision VARCHAR2(30);
11687: --
11688: BEGIN

Line 11796: PSB_BUDGET_REVISIONS_PVT.g_soft_error_flag := 'Y';

11792: EXCEPTION
11793: WHEN others THEN
11794: -- Set the global variable to Yes so that
11795: -- CP can be set to Warning status.
11796: PSB_BUDGET_REVISIONS_PVT.g_soft_error_flag := 'Y';
11797:
11798: l_concat_segments
11799: := FND_FLEX_EXT.Get_Segs
11800: ( application_short_name => 'SQLGL'

Line 11866: END PSB_BUDGET_REVISIONS_PVT;

11862:
11863:
11864: /* ----------------------------------------------------------------------- */
11865:
11866: END PSB_BUDGET_REVISIONS_PVT;