DBA Data[Home] [Help]

APPS.PA_BUDGET_CORE dependencies on PA_BUDGET_VERSIONS

Line 298: -- 1) Modified pa_budget_versions-INSERT to populate the

294: -- would fire successfully. Otherwise, this procedure
295: -- does NOT support the FP Model.
296: --
297: -- Modifications:
298: -- 1) Modified pa_budget_versions-INSERT to populate the
299: -- new FP approved_cost/rev_plan_type columns.
300: --
301: -- NOTE:
302: --

Line 364: -- to fnd_user while inserting record in pa_budget_versions

360: x_last_update_login := FND_GLOBAL.LOGIN_ID;
361:
362: -- This call is repeated in PA_BUDGET_UTILS.Verify_Budget_Rules
363: -- as the APIs call that procedure. Using v_emp_id eliminates join
364: -- to fnd_user while inserting record in pa_budget_versions
365:
366: v_emp_id := PA_UTILS.GetEmpIdFromUser(x_created_by );
367:
368: if v_emp_id IS NULL then

Line 391: pa_budget_versions v,

387: x_project_type_class_code,x_time_phased_type_code,
388: x_entry_level_code, x_pm_product_code
389: from pa_project_types_all t,
390: pa_projects_all p,
391: pa_budget_versions v,
392: pa_budget_entry_methods b
393: where v.budget_version_id = x_draft_version_id
394: and v.project_id = p.project_id
395: and b.budget_entry_method_code = v.budget_entry_method_code

Line 595: update pa_budget_versions

591:
592: if (x_mark_as_original = 'Y') then
593:
594: -- reset current budget version to non-current
595: update pa_budget_versions
596: set original_flag = 'Y',
597: current_original_flag = 'N',
598: last_update_date = SYSDATE,
599: last_updated_by = x_created_by,

Line 608: update pa_budget_versions

604: and budget_status_code = 'B'; -- added for bug 9950839
605:
606: end if;
607:
608: update pa_budget_versions
609: set current_flag = 'N',
610: last_update_date = SYSDATE,
611: last_updated_by = x_created_by,
612: last_update_login = x_last_update_login

Line 625: from pa_budget_versions

621: print_msg(x_err_stage);
622:
623: select nvl(max(version_number), 0)
624: into max_version
625: from pa_budget_versions
626: where project_id = x_project_id
627: and budget_type_code = x_budget_type_code
628: and budget_status_code = 'B';
629:

Line 631: select pa_budget_versions_s.nextval

627: and budget_type_code = x_budget_type_code
628: and budget_status_code = 'B';
629:
630: -- get the dest version id
631: select pa_budget_versions_s.nextval
632: into x_dest_version_id
633: from sys.dual;
634:
635: -- populate pa_budget_versions

Line 635: -- populate pa_budget_versions

631: select pa_budget_versions_s.nextval
632: into x_dest_version_id
633: from sys.dual;
634:
635: -- populate pa_budget_versions
636: x_err_stage := 'create baselined version <' || to_char(x_dest_version_id)
637: || '><' || to_char(max_version)
638: || '><' || to_char(x_created_by) || '>';
639: print_msg(x_err_stage);

Line 641: insert into pa_budget_versions(

637: || '><' || to_char(max_version)
638: || '><' || to_char(x_created_by) || '>';
639: print_msg(x_err_stage);
640:
641: insert into pa_budget_versions(
642: budget_version_id,
643: project_id,
644: budget_type_code,
645: version_number,

Line 743: from pa_budget_versions v

739: pm_budget_reference,
740: NULL,
741: decode(v.budget_type_code,'AC','Y','N'),
742: decode(v.budget_type_code,'AR','Y','N')
743: from pa_budget_versions v
744: where budget_version_id = x_draft_version_id;
745:
746: x_err_stage := 'create budget lines <' || to_char(x_draft_version_id)
747: || '><' || to_char(x_dest_version_id)

Line 878: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',

874: BEGIN
875: -- Copy attachments for every draft budget copied
876: x_err_stage:= 'Calling fnd_attached_documents2_pkg.copy_attachments';
877: print_msg(x_err_stage);
878: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
879: x_draft_version_id,
880: null,null,null,null,
881: 'PA_BUDGET_VERSIONS',
882: x_dest_version_id,

Line 881: 'PA_BUDGET_VERSIONS',

877: print_msg(x_err_stage);
878: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
879: x_draft_version_id,
880: null,null,null,null,
881: 'PA_BUDGET_VERSIONS',
882: x_dest_version_id,
883: null,null,null,null,
884: FND_GLOBAL.USER_ID,
885: FND_GLOBAL.LOGIN_ID,

Line 986: pa_budget_versions v

982: into l_src_time_phased_type_code,
983: l_src_entry_level_code,
984: l_src_resource_list_id
985: from pa_budget_entry_methods m,
986: pa_budget_versions v
987: where v.budget_version_id = p_src_version_id
988: and v.budget_entry_method_code = m.budget_entry_method_code;
989:
990: x_err_stage := 'getting baselined budget <' || to_char(p_dest_project_id)

Line 1007: from pa_budget_versions

1003: -- baseliend budget exists, verify if resource lists are the same
1004: -- resource list used in accumulation
1005: select resource_list_id
1006: into l_baselined_resource_list_id
1007: from pa_budget_versions
1008: where budget_version_id = l_baselined_version_id;
1009:
1010: if (l_src_resource_list_id <> l_baselined_resource_list_id) then
1011: x_err_code := 10;

Line 1048: --insert into pa_budget_versions

1044: x_err_stage := 'Unexpected error while trying to get draft budget version id';
1045: rollback to before_copy1;
1046: return;
1047: else
1048: --insert into pa_budget_versions
1049: select pa_budget_versions_s.nextval
1050: into l_dest_version_id
1051: from sys.dual;
1052:

Line 1049: select pa_budget_versions_s.nextval

1045: rollback to before_copy1;
1046: return;
1047: else
1048: --insert into pa_budget_versions
1049: select pa_budget_versions_s.nextval
1050: into l_dest_version_id
1051: from sys.dual;
1052:
1053: insert into pa_budget_versions(

Line 1053: insert into pa_budget_versions(

1049: select pa_budget_versions_s.nextval
1050: into l_dest_version_id
1051: from sys.dual;
1052:
1053: insert into pa_budget_versions(
1054: budget_version_id,
1055: project_id,
1056: budget_type_code,
1057: version_number,

Line 1148: from pa_budget_versions v

1144: v.first_budget_period,
1145: NULL,
1146: decode(p_dest_budget_type_code,'AC','Y','N'), /* Bug 5076424 */
1147: decode(p_dest_budget_type_code,'AR','Y','N') /* Bug 5076424 */
1148: from pa_budget_versions v
1149: where v.budget_version_id = p_src_version_id;
1150:
1151: l_draft_exists := FALSE;
1152: x_err_stage := 'Created new draft version '||to_char(p_src_version_id);

Line 1163: , pa_budget_versions v

1159: SELECT 'Y' into l_cls_prds_exists
1160: FROM pa_budget_lines l
1161: , gl_period_statuses s
1162: , pa_implementations i
1163: , pa_budget_versions v
1164: where s.application_id = pa_period_process_pkg.application_id
1165: and i.set_of_books_id = s.set_of_books_id
1166: and l.budget_version_id=v.budget_version_id
1167: and s.closing_status in ('C','P')

Line 1184: pa_budget_versions v

1180: into l_dest_time_phased_type_code,
1181: l_dest_entry_level_code,
1182: l_dest_resource_list_id
1183: from pa_budget_entry_methods m,
1184: pa_budget_versions v
1185: where v.budget_version_id = l_dest_version_id
1186: and v.budget_entry_method_code = m.budget_entry_method_code;
1187:
1188: if (l_src_resource_list_id <> l_dest_resource_list_id)

Line 1202: update pa_budget_versions

1198: end if;
1199:
1200: if l_draft_exists then
1201: x_err_stage := 'Updating the existing budget version';
1202: update pa_budget_versions
1203: set (version_number,
1204: budget_status_code,
1205: last_update_date,
1206: last_updated_by,

Line 1287: from pa_budget_versions v

1283: v.first_budget_period,
1284: NULL,
1285: decode(p_dest_budget_type_code,'AC','Y','N'),
1286: decode(p_dest_budget_type_code,'AR','Y','N')
1287: from pa_budget_versions v
1288: where v.budget_version_id = p_src_version_id
1289: )
1290: where budget_version_id = l_dest_version_id;
1291:

Line 1292: fnd_attached_documents2_pkg.delete_attachments('PA_BUDGET_VERSIONS',

1288: where v.budget_version_id = p_src_version_id
1289: )
1290: where budget_version_id = l_dest_version_id;
1291:
1292: fnd_attached_documents2_pkg.delete_attachments('PA_BUDGET_VERSIONS',
1293: l_dest_version_id,
1294: null, null, null, null,
1295: 'Y') ;
1296: end if;

Line 1506: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',

1502: END;
1503: */
1504: -- Copy attachments for every draft budget copied
1505:
1506: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
1507: p_src_version_id,
1508: null,null,null,null,
1509: 'PA_BUDGET_VERSIONS',
1510: l_dest_version_id,

Line 1509: 'PA_BUDGET_VERSIONS',

1505:
1506: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
1507: p_src_version_id,
1508: null,null,null,null,
1509: 'PA_BUDGET_VERSIONS',
1510: l_dest_version_id,
1511: null,null,null,null,
1512: FND_GLOBAL.USER_ID,
1513: FND_GLOBAL.LOGIN_ID,

Line 1546: -- 1) Modified pa_budget_versions-INSERT to populate the

1542: -- would fire successfully. Otherwise, this procedure
1543: -- does NOT support the FP Model.
1544: --
1545: -- Modifications:
1546: -- 1) Modified pa_budget_versions-INSERT to populate the
1547: -- new FP approved_cost/rev_plan_type columns.
1548: --
1549: -- NOTE:
1550: --

Line 1598: from pa_projects_all a,pa_budget_versions b /*Modified for 6320792 */

1594: || to_char(x_src_version_id) || '>';
1595:
1596: select start_date
1597: into g_project_start_date
1598: from pa_projects_all a,pa_budget_versions b /*Modified for 6320792 */
1599: where b.budget_version_id = x_src_version_id
1600: and a.project_id = b.project_id;
1601:
1602: savepoint before_copy;

Line 1609: from pa_budget_versions

1605: || to_char(x_src_version_id) || '>';
1606:
1607: select resource_list_id,first_budget_period
1608: into x_src_resource_list_id, x_first_budget_period
1609: from pa_budget_versions
1610: where budget_version_id = x_src_version_id;
1611:
1612: x_err_stage := 'get baselined budget <' || to_char(x_dest_project_id)
1613: || '><' || x_dest_budget_type_code || '>' ;

Line 1635: from pa_budget_versions

1631: -- resource list used in accumulation
1632:
1633: select resource_list_id
1634: into x_baselined_resource_list_id
1635: from pa_budget_versions
1636: where budget_version_id = x_baselined_version_id;
1637:
1638: if (x_src_resource_list_id <> x_baselined_resource_list_id) then
1639: x_err_code := 10;

Line 1733: pa_budget_versions v

1729: m.entry_level_code
1730: into x_time_phased_type_code,
1731: x_entry_level_code
1732: from pa_budget_entry_methods m,
1733: pa_budget_versions v
1734: where v.budget_version_id = x_src_version_id
1735: and v.budget_entry_method_code = m.budget_entry_method_code;
1736:
1737: -- Shifting the First Budget Period

Line 1797: select pa_budget_versions_s.nextval

1793:
1794: x_err_stage := 'create budget version <' || to_char(x_dest_project_id)
1795: || '><' || x_dest_budget_type_code || '>' ;
1796:
1797: select pa_budget_versions_s.nextval
1798: into x_dest_version_id
1799: from sys.dual;
1800: insert into pa_budget_versions(
1801: budget_version_id,

Line 1800: insert into pa_budget_versions(

1796:
1797: select pa_budget_versions_s.nextval
1798: into x_dest_version_id
1799: from sys.dual;
1800: insert into pa_budget_versions(
1801: budget_version_id,
1802: project_id,
1803: budget_type_code,
1804: version_number,

Line 1895: from pa_budget_versions v

1891: x_first_budget_period,
1892: NULL,
1893: decode(x_dest_budget_type_code, 'AC', 'Y', 'N'), --Bug 5081715.
1894: decode(x_dest_budget_type_code, 'AR', 'Y', 'N') --Bug 5081715.
1895: from pa_budget_versions v
1896: where v.budget_version_id = x_src_version_id;
1897:
1898: pa_budget_core.copy_lines(x_src_version_id,
1899: x_amount_change_pct,

Line 1914: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',

1910: end if;
1911:
1912: -- Copy attachments for every draft budget copied
1913:
1914: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
1915: x_src_version_id,
1916: null,null,null,null,
1917: 'PA_BUDGET_VERSIONS',
1918: x_dest_version_id,

Line 1917: 'PA_BUDGET_VERSIONS',

1913:
1914: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
1915: x_src_version_id,
1916: null,null,null,null,
1917: 'PA_BUDGET_VERSIONS',
1918: x_dest_version_id,
1919: null,null,null,null,
1920: FND_GLOBAL.USER_ID,
1921: FND_GLOBAL.LOGIN_ID,

Line 2081: from pa_budget_versions

2077:
2078: begin
2079: select 'Y'
2080: into l_version_is_baselined
2081: from pa_budget_versions
2082: where budget_status_code = 'B'
2083: and budget_version_id = x_dest_version_id;
2084: exception
2085: when no_data_found then

Line 2108: pa_budget_versions v

2104: m.entry_level_code
2105: INTO x_time_phased_type_code,
2106: x_entry_level_code
2107: FROM pa_budget_entry_methods m,
2108: pa_budget_versions v
2109: WHERE v.budget_version_id = x_src_version_id
2110: AND v.budget_entry_method_code = m.budget_entry_method_code;
2111:
2112: x_err_stage := 'copy resource assignment <' || to_char(x_src_version_id)

Line 2151: pa_budget_versions dv

2147: FROM
2148: pa_resource_assignments sa,
2149: pa_tasks st,
2150: pa_tasks dt,
2151: pa_budget_versions dv
2152: WHERE sa.budget_version_id = x_src_version_id
2153: AND sa.project_id = st.project_id
2154: AND sa.task_id = st.task_id
2155: AND st.task_number = dt.task_number

Line 2194: pa_budget_versions dv

2190: -1,
2191: sa.RESOURCE_ASSIGNMENT_TYPE
2192: FROM
2193: pa_resource_assignments sa,
2194: pa_budget_versions dv
2195: WHERE sa.budget_version_id = x_src_version_id
2196: AND sa.task_id = 0
2197: AND dv.budget_version_id = x_dest_version_id
2198: AND NVL(sa.RESOURCE_ASSIGNMENT_TYPE,'USER_ENTERED') = 'USER_ENTERED';

Line 2219: from pa_budget_versions

2215: -- to be shifted due to performance reason.
2216:
2217: select project_id
2218: into l_project_id
2219: from pa_budget_versions
2220: where budget_version_id = x_src_version_id;
2221:
2222: DELETE FROM pa_fp_cpy_periods_tmp;
2223: