DBA Data[Home] [Help]

APPS.PA_BUDGET_CORE dependencies on PA_BUDGET_VERSIONS

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

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

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

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

Line 389: pa_budget_versions v,

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

Line 593: update pa_budget_versions

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

Line 605: update pa_budget_versions

601: and current_original_flag = 'Y';
602:
603: end if;
604:
605: update pa_budget_versions
606: set current_flag = 'N',
607: last_update_date = SYSDATE,
608: last_updated_by = x_created_by,
609: last_update_login = x_last_update_login

Line 622: from pa_budget_versions

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

Line 628: select pa_budget_versions_s.nextval

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

Line 632: -- populate pa_budget_versions

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

Line 638: insert into pa_budget_versions(

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

Line 740: from pa_budget_versions v

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

Line 874: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',

870: BEGIN
871: -- Copy attachments for every draft budget copied
872: x_err_stage:= 'Calling fnd_attached_documents2_pkg.copy_attachments';
873: print_msg(x_err_stage);
874: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
875: x_draft_version_id,
876: null,null,null,null,
877: 'PA_BUDGET_VERSIONS',
878: x_dest_version_id,

Line 877: 'PA_BUDGET_VERSIONS',

873: print_msg(x_err_stage);
874: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
875: x_draft_version_id,
876: null,null,null,null,
877: 'PA_BUDGET_VERSIONS',
878: x_dest_version_id,
879: null,null,null,null,
880: FND_GLOBAL.USER_ID,
881: FND_GLOBAL.LOGIN_ID,

Line 982: pa_budget_versions v

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

Line 1003: from pa_budget_versions

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

Line 1044: --insert into pa_budget_versions

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

Line 1045: select pa_budget_versions_s.nextval

1041: rollback to before_copy1;
1042: return;
1043: else
1044: --insert into pa_budget_versions
1045: select pa_budget_versions_s.nextval
1046: into l_dest_version_id
1047: from sys.dual;
1048:
1049: insert into pa_budget_versions(

Line 1049: insert into pa_budget_versions(

1045: select pa_budget_versions_s.nextval
1046: into l_dest_version_id
1047: from sys.dual;
1048:
1049: insert into pa_budget_versions(
1050: budget_version_id,
1051: project_id,
1052: budget_type_code,
1053: version_number,

Line 1144: from pa_budget_versions v

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

Line 1159: , pa_budget_versions v

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

Line 1180: pa_budget_versions v

1176: into l_dest_time_phased_type_code,
1177: l_dest_entry_level_code,
1178: l_dest_resource_list_id
1179: from pa_budget_entry_methods m,
1180: pa_budget_versions v
1181: where v.budget_version_id = l_dest_version_id
1182: and v.budget_entry_method_code = m.budget_entry_method_code;
1183:
1184: if (l_src_resource_list_id <> l_dest_resource_list_id)

Line 1198: update pa_budget_versions

1194: end if;
1195:
1196: if l_draft_exists then
1197: x_err_stage := 'Updating the existing budget version';
1198: update pa_budget_versions
1199: set (version_number,
1200: budget_status_code,
1201: last_update_date,
1202: last_updated_by,

Line 1283: from pa_budget_versions v

1279: v.first_budget_period,
1280: NULL,
1281: decode(p_dest_budget_type_code,'AC','Y','N'),
1282: decode(p_dest_budget_type_code,'AR','Y','N')
1283: from pa_budget_versions v
1284: where v.budget_version_id = p_src_version_id
1285: )
1286: where budget_version_id = l_dest_version_id;
1287:

Line 1288: fnd_attached_documents2_pkg.delete_attachments('PA_BUDGET_VERSIONS',

1284: where v.budget_version_id = p_src_version_id
1285: )
1286: where budget_version_id = l_dest_version_id;
1287:
1288: fnd_attached_documents2_pkg.delete_attachments('PA_BUDGET_VERSIONS',
1289: l_dest_version_id,
1290: null, null, null, null,
1291: 'Y') ;
1292: end if;

Line 1502: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',

1498: END;
1499: */
1500: -- Copy attachments for every draft budget copied
1501:
1502: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
1503: p_src_version_id,
1504: null,null,null,null,
1505: 'PA_BUDGET_VERSIONS',
1506: l_dest_version_id,

Line 1505: 'PA_BUDGET_VERSIONS',

1501:
1502: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
1503: p_src_version_id,
1504: null,null,null,null,
1505: 'PA_BUDGET_VERSIONS',
1506: l_dest_version_id,
1507: null,null,null,null,
1508: FND_GLOBAL.USER_ID,
1509: FND_GLOBAL.LOGIN_ID,

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

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

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

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

Line 1605: from pa_budget_versions

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

Line 1631: from pa_budget_versions

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

Line 1729: pa_budget_versions v

1725: m.entry_level_code
1726: into x_time_phased_type_code,
1727: x_entry_level_code
1728: from pa_budget_entry_methods m,
1729: pa_budget_versions v
1730: where v.budget_version_id = x_src_version_id
1731: and v.budget_entry_method_code = m.budget_entry_method_code;
1732:
1733: -- Shifting the First Budget Period

Line 1793: select pa_budget_versions_s.nextval

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

Line 1796: insert into pa_budget_versions(

1792:
1793: select pa_budget_versions_s.nextval
1794: into x_dest_version_id
1795: from sys.dual;
1796: insert into pa_budget_versions(
1797: budget_version_id,
1798: project_id,
1799: budget_type_code,
1800: version_number,

Line 1891: from pa_budget_versions v

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

Line 1910: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',

1906: end if;
1907:
1908: -- Copy attachments for every draft budget copied
1909:
1910: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
1911: x_src_version_id,
1912: null,null,null,null,
1913: 'PA_BUDGET_VERSIONS',
1914: x_dest_version_id,

Line 1913: 'PA_BUDGET_VERSIONS',

1909:
1910: fnd_attached_documents2_pkg.copy_attachments('PA_BUDGET_VERSIONS',
1911: x_src_version_id,
1912: null,null,null,null,
1913: 'PA_BUDGET_VERSIONS',
1914: x_dest_version_id,
1915: null,null,null,null,
1916: FND_GLOBAL.USER_ID,
1917: FND_GLOBAL.LOGIN_ID,

Line 2077: from pa_budget_versions

2073:
2074: begin
2075: select 'Y'
2076: into l_version_is_baselined
2077: from pa_budget_versions
2078: where budget_status_code = 'B'
2079: and budget_version_id = x_dest_version_id;
2080: exception
2081: when no_data_found then

Line 2104: pa_budget_versions v

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

Line 2147: pa_budget_versions dv

2143: FROM
2144: pa_resource_assignments sa,
2145: pa_tasks st,
2146: pa_tasks dt,
2147: pa_budget_versions dv
2148: WHERE sa.budget_version_id = x_src_version_id
2149: AND sa.project_id = st.project_id
2150: AND sa.task_id = st.task_id
2151: AND st.task_number = dt.task_number

Line 2190: pa_budget_versions dv

2186: -1,
2187: sa.RESOURCE_ASSIGNMENT_TYPE
2188: FROM
2189: pa_resource_assignments sa,
2190: pa_budget_versions dv
2191: WHERE sa.budget_version_id = x_src_version_id
2192: AND sa.task_id = 0
2193: AND dv.budget_version_id = x_dest_version_id
2194: AND NVL(sa.RESOURCE_ASSIGNMENT_TYPE,'USER_ENTERED') = 'USER_ENTERED';

Line 2215: from pa_budget_versions

2211: -- to be shifted due to performance reason.
2212:
2213: select project_id
2214: into l_project_id
2215: from pa_budget_versions
2216: where budget_version_id = x_src_version_id;
2217:
2218: DELETE FROM pa_fp_cpy_periods_tmp;
2219: