DBA Data[Home] [Help]

APPS.PA_ORG_UTILS dependencies on PA_ALL_ORGANIZATIONS

Line 294: insert into pa_all_organizations

290: or
291: (nvl(x_old_proj_start_org_id,x_new_proj_start_org_id +1) <> x_new_proj_start_org_id )
292: ) then
293:
294: insert into pa_all_organizations
295: (organization_id,
296: org_id,
297: pa_org_use_type )
298: ( (select se.organization_id_child

Line 330: from pa_all_organizations

326: minus
327: (select organization_id,
328: org_id,
329: pa_org_use_type
330: from pa_all_organizations
331: where pa_org_use_type = 'PROJECTS'
332: and org_id = x_org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
333: )
334: );

Line 444: insert into pa_all_organizations

440: or
441: (nvl(x_old_exp_start_org_id,x_new_exp_start_org_id +1) <> x_new_exp_start_org_id )
442: ) then
443:
444: insert into pa_all_organizations
445: (organization_id,
446: org_id,
447: pa_org_use_type)
448: ( (select se.organization_id_child

Line 480: from pa_all_organizations

476: minus
477: (select organization_id,
478: org_id,
479: pa_org_use_type
480: from pa_all_organizations
481: where pa_org_use_type = 'EXPENDITURES'
482: and org_id = x_org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
483: )
484: );

Line 1011: insert into pa_all_organizations

1007:
1008: IF org_exists_flag = TRUE THEN
1009: /* Bug 2139709 End */
1010:
1011: insert into pa_all_organizations
1012: (organization_id,
1013: org_id,
1014: pa_org_use_type)
1015: (select

Line 1028: from pa_all_organizations

1024: and info.org_information_context||'' = 'CLASS'
1025: and info.org_information2 = 'Y')
1026: and not exists
1027: (select 'X'
1028: from pa_all_organizations
1029: where organization_id = x_organization_id_child
1030: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1031: and pa_org_use_type = 'PROJECTS')
1032: ) ;

Line 1036: Update pa_all_organizations

1032: ) ;
1033:
1034: /* Added for bug 1550990 */
1035: if(sql%rowcount=0) then
1036: Update pa_all_organizations
1037: set inactive_date = NULL
1038: where organization_id = x_organization_id_child
1039: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1040: and pa_org_use_type = 'PROJECTS'

Line 1157: insert into pa_all_organizations

1153:
1154: IF org_exists_flag = TRUE THEN
1155: /* Bug 2139709 End */
1156:
1157: insert into pa_all_organizations
1158: (organization_id,
1159: org_id,
1160: pa_org_use_type)
1161: (select

Line 1174: from pa_all_organizations

1170: and info.org_information_context||'' = 'CLASS'
1171: and info.org_information2 = 'Y')
1172: and not exists
1173: (select 'X'
1174: from pa_all_organizations
1175: where organization_id = x_organization_id_child
1176: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1177: and pa_org_use_type = 'EXPENDITURES')
1178: ) ;

Line 1182: Update pa_all_organizations

1178: ) ;
1179:
1180: /* Added for bug 1550990 */
1181: if(sql%rowcount=0) then
1182: Update pa_all_organizations
1183: set inactive_date=NULL
1184: where organization_id =x_organization_id_child
1185: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1186: and pa_org_use_type = 'EXPENDITURES'

Line 1366: update pa_all_organizations

1362: where proj_org_structure_version_id = x_org_version_id
1363: )
1364:
1365: loop
1366: update pa_all_organizations
1367: set inactive_date = trunc(sysdate)
1368: where organization_id = x_organization_id_child
1369: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1370: and pa_org_use_type = 'PROJECTS'

Line 1382: update pa_all_organizations

1378: from pa_implementations_all imp
1379: where exp_org_structure_version_id = x_org_version_id
1380: )
1381: loop
1382: update pa_all_organizations
1383: set inactive_date = trunc(sysdate)
1384: where organization_id = x_organization_id_child
1385: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1386: and pa_org_use_type = 'EXPENDITURES'

Line 1520: insert into pa_all_organizations

1516: IF(v_start_org_id <> x_organization_id) THEN --made changes as Suggested
1517: open check_org_exists;
1518: fetch check_org_exists into v_org_child_id;
1519: if check_org_exists%found then /* Added org is below the start project org */
1520: insert into pa_all_organizations
1521: (organization_id,
1522: org_id,
1523: pa_org_use_type)
1524: (select x_organization_id,

Line 1528: from pa_all_organizations

1524: (select x_organization_id,
1525: imp_rec.org_id, 'PROJECTS'
1526: from sys.dual
1527: where not exists ( select 'X'
1528: from pa_all_organizations
1529: where organization_id = x_organization_id
1530: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1531: and pa_org_use_type = 'PROJECTS' ));
1532:

Line 1536: update pa_all_organizations

1532:
1533: if sql%rowcount = 0 then --- Means Row was not inserted as it was there
1534: ---- Earlier, IN This case set inactive_date to
1535: --- NULL.
1536: update pa_all_organizations
1537: set inactive_date = null
1538: where organization_id = x_organization_id
1539: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1540: and pa_org_use_type = 'PROJECTS' ;

Line 1561: ---- Created in PA_ALL_ORGANIZATIONS.

1557: end if;
1558: close check_org_exists;
1559: ELSE
1560: ---- If Current Organization is Start Organizations then Record has to be
1561: ---- Created in PA_ALL_ORGANIZATIONS.
1562: insert into pa_all_organizations
1563: (organization_id,
1564: org_id,
1565: pa_org_use_type)

Line 1562: insert into pa_all_organizations

1558: close check_org_exists;
1559: ELSE
1560: ---- If Current Organization is Start Organizations then Record has to be
1561: ---- Created in PA_ALL_ORGANIZATIONS.
1562: insert into pa_all_organizations
1563: (organization_id,
1564: org_id,
1565: pa_org_use_type)
1566: (select x_organization_id,

Line 1570: from pa_all_organizations

1566: (select x_organization_id,
1567: imp_rec.org_id, 'PROJECTS'
1568: from sys.dual
1569: where not exists ( select 'X'
1570: from pa_all_organizations
1571: where organization_id = x_organization_id
1572: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1573: and pa_org_use_type = 'PROJECTS' ));
1574: if sql%rowcount = 0 then --- Means Row was not inserted as it was there

Line 1577: update pa_all_organizations

1573: and pa_org_use_type = 'PROJECTS' ));
1574: if sql%rowcount = 0 then --- Means Row was not inserted as it was there
1575: ---- Earlier, IN This case set inactive_date to
1576: --- NULL.
1577: update pa_all_organizations
1578: set inactive_date = null
1579: where organization_id = x_organization_id
1580: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1581: and pa_org_use_type = 'PROJECTS' ;

Line 1600: update pa_all_organizations

1596: org_id
1597: from pa_implementations_all )
1598: loop
1599:
1600: update pa_all_organizations
1601: set inactive_date = trunc(sysdate)
1602: where organization_id = x_organization_id
1603: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1604: and pa_org_use_type = 'PROJECTS'

Line 1641: insert into pa_all_organizations

1637: IF(v_start_org_id<>x_organization_id) THEN
1638: open check_org_exists;
1639: fetch check_org_exists into v_org_child_id;
1640: if check_org_exists%found then /* Added org is below the start project org */
1641: insert into pa_all_organizations
1642: (organization_id,
1643: org_id,
1644: pa_org_use_type)
1645: (select x_organization_id,

Line 1649: from pa_all_organizations

1645: (select x_organization_id,
1646: imp_rec.org_id, 'EXPENDITURES'
1647: from sys.dual
1648: where not exists ( select 'X'
1649: from pa_all_organizations
1650: where organization_id = x_organization_id
1651: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1652: and pa_org_use_type = 'EXPENDITURES' ));
1653:

Line 1657: update pa_all_organizations

1653:
1654: if sql%rowcount = 0 then --- Means Row was not inserted as it was there
1655: ---- Earlier, IN This case set inactive_date to
1656: --- NULL.
1657: update pa_all_organizations
1658: set inactive_date = null
1659: where organization_id = x_organization_id
1660: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1661: and pa_org_use_type = 'EXPENDITURES' ;

Line 1681: ---- Created in PA_ALL_ORGANIZATIONS.

1677: end if;
1678: close check_org_exists;
1679: ELSE
1680: ---- If Current Organization is Start Organizations then Record has to be
1681: ---- Created in PA_ALL_ORGANIZATIONS.
1682: insert into pa_all_organizations
1683: (organization_id,
1684: org_id,
1685: pa_org_use_type)

Line 1682: insert into pa_all_organizations

1678: close check_org_exists;
1679: ELSE
1680: ---- If Current Organization is Start Organizations then Record has to be
1681: ---- Created in PA_ALL_ORGANIZATIONS.
1682: insert into pa_all_organizations
1683: (organization_id,
1684: org_id,
1685: pa_org_use_type)
1686: (select x_organization_id,

Line 1690: from pa_all_organizations

1686: (select x_organization_id,
1687: imp_rec.org_id, 'EXPENDITURES'
1688: from sys.dual
1689: where not exists ( select 'X'
1690: from pa_all_organizations
1691: where organization_id = x_organization_id
1692: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1693: and pa_org_use_type = 'EXPENDITURES' ));
1694: if sql%rowcount = 0 then --- Means Row was not inserted as it was there

Line 1697: update pa_all_organizations

1693: and pa_org_use_type = 'EXPENDITURES' ));
1694: if sql%rowcount = 0 then --- Means Row was not inserted as it was there
1695: ---- Earlier, IN This case set inactive_date to
1696: --- NULL.
1697: update pa_all_organizations
1698: set inactive_date = null
1699: where organization_id = x_organization_id
1700: and org_id = imp_rec.org_id--MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1701: and pa_org_use_type = 'EXPENDITURES' ;

Line 1720: update pa_all_organizations

1716: org_id
1717: from pa_implementations_all )
1718: loop
1719:
1720: update pa_all_organizations
1721: set inactive_date = trunc(sysdate)
1722: where organization_id = x_organization_id
1723: and org_id = imp_rec.org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1724: and pa_org_use_type = 'EXPENDITURES'

Line 1838: UPDATE pa_all_organizations

1834: /* Update all Organizations (Projects or Expenditures)
1835: in the old hierarchy with inactive date as Sysdate.
1836: Union is to include the start organization id in the update */
1837:
1838: UPDATE pa_all_organizations
1839: SET Inactive_Date = TRUNC(SYSDATE)
1840: WHERE Pa_Org_Use_Type = x_org_use_type
1841: AND Org_id = x_Org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1842: AND Organization_id = rec_all_old_org.organization_id

Line 1846: Organization hierarchy in the Pa_all_Organizations, then,

1842: AND Organization_id = rec_all_old_org.organization_id
1843: and inactive_date is null ; -- Bug Ref # 6367868
1844:
1845: /* In case there are no corresponding records for the new
1846: Organization hierarchy in the Pa_all_Organizations, then,
1847: create these records in the Pa_All_Organizations
1848: with Inactive_Date as SYSDATE */
1849: --Bug#9923691 - Commented the following code for not inserting new records if organization is not having org_use_type
1850: /*IF SQL%NOTFOUND THEN

Line 1847: create these records in the Pa_All_Organizations

1843: and inactive_date is null ; -- Bug Ref # 6367868
1844:
1845: /* In case there are no corresponding records for the new
1846: Organization hierarchy in the Pa_all_Organizations, then,
1847: create these records in the Pa_All_Organizations
1848: with Inactive_Date as SYSDATE */
1849: --Bug#9923691 - Commented the following code for not inserting new records if organization is not having org_use_type
1850: /*IF SQL%NOTFOUND THEN
1851: INSERT INTO Pa_All_Organizations

Line 1851: INSERT INTO Pa_All_Organizations

1847: create these records in the Pa_All_Organizations
1848: with Inactive_Date as SYSDATE */
1849: --Bug#9923691 - Commented the following code for not inserting new records if organization is not having org_use_type
1850: /*IF SQL%NOTFOUND THEN
1851: INSERT INTO Pa_All_Organizations
1852: (organization_id,
1853: org_id,
1854: pa_org_use_type,
1855: inactive_date)

Line 1874: UPDATE pa_all_organizations

1870: /* Update all Organizations (Expenditures)
1871: in the new hierarchy with inactive date as NULL.
1872: Union is to include the start organization id in the update */
1873:
1874: UPDATE pa_all_organizations
1875: SET Inactive_Date = NULL
1876: WHERE Pa_Org_Use_Type = x_org_use_type
1877: AND Org_id = x_Org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1878: AND Organization_id = rec_exp_new_org.organization_id;

Line 1881: Organization hierarchy in the Pa_all_Organizations, then,

1877: AND Org_id = x_Org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1878: AND Organization_id = rec_exp_new_org.organization_id;
1879:
1880: /* In case there are no corresponding records for the new
1881: Organization hierarchy in the Pa_all_Organizations, then,
1882: create these records in the Pa_All_Organizations
1883: with Inactive_Date as NULL */
1884:
1885: IF SQL%NOTFOUND THEN

Line 1882: create these records in the Pa_All_Organizations

1878: AND Organization_id = rec_exp_new_org.organization_id;
1879:
1880: /* In case there are no corresponding records for the new
1881: Organization hierarchy in the Pa_all_Organizations, then,
1882: create these records in the Pa_All_Organizations
1883: with Inactive_Date as NULL */
1884:
1885: IF SQL%NOTFOUND THEN
1886: INSERT INTO Pa_All_Organizations

Line 1886: INSERT INTO Pa_All_Organizations

1882: create these records in the Pa_All_Organizations
1883: with Inactive_Date as NULL */
1884:
1885: IF SQL%NOTFOUND THEN
1886: INSERT INTO Pa_All_Organizations
1887: (organization_id,
1888: org_id,
1889: pa_org_use_type,
1890: inactive_date)

Line 1911: UPDATE pa_all_organizations

1907: /* Update all Organizations (Projects)
1908: in the new hierarchy with inactive date as NULL.
1909: Union is to include the start organization id in the update */
1910:
1911: UPDATE pa_all_organizations
1912: SET Inactive_Date = NULL
1913: WHERE Pa_Org_Use_Type = x_org_use_type
1914: AND Org_id = x_Org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1915: AND Organization_id = rec_proj_new_org.organization_id;

Line 1918: Organization hierarchy in the Pa_all_Organizations, then,

1914: AND Org_id = x_Org_id --MOAC Changes: Bug 4363092: Removed nvl usage with org_id
1915: AND Organization_id = rec_proj_new_org.organization_id;
1916:
1917: /* In case there are no corresponding records for the new
1918: Organization hierarchy in the Pa_all_Organizations, then,
1919: create these records in the Pa_All_Organizations
1920: with Inactive_Date as NULL */
1921:
1922: IF SQL%NOTFOUND THEN

Line 1919: create these records in the Pa_All_Organizations

1915: AND Organization_id = rec_proj_new_org.organization_id;
1916:
1917: /* In case there are no corresponding records for the new
1918: Organization hierarchy in the Pa_all_Organizations, then,
1919: create these records in the Pa_All_Organizations
1920: with Inactive_Date as NULL */
1921:
1922: IF SQL%NOTFOUND THEN
1923: INSERT INTO Pa_All_Organizations

Line 1923: INSERT INTO Pa_All_Organizations

1919: create these records in the Pa_All_Organizations
1920: with Inactive_Date as NULL */
1921:
1922: IF SQL%NOTFOUND THEN
1923: INSERT INTO Pa_All_Organizations
1924: (organization_id,
1925: org_id,
1926: pa_org_use_type,
1927: inactive_date)

Line 3844: data in pa_all_organizations table. */

3840: END maintain_projexp_org_update;
3841:
3842:
3843: /* Bug 5934849 - This procedure will be called for maintaining project and expenditure
3844: data in pa_all_organizations table. */
3845:
3846: Procedure maintain_pa_all_org(x_org_version_id in number,
3847: x_err_code in out NOCOPY number,
3848: x_err_stage in out NOCOPY varchar2,

Line 3915: UPDATE pa_all_organizations

3911: loop
3912: v_start_org_id := imp_rec.proj_start_org_id;
3913: v_org_id := imp_rec.org_id;
3914:
3915: UPDATE pa_all_organizations
3916: SET Inactive_Date = TRUNC(SYSDATE)
3917: WHERE Pa_Org_Use_Type = 'PROJECTS'
3918: AND Org_id = v_org_id and Inactive_Date is null ;
3919:

Line 3926: UPDATE pa_all_organizations

3922: /* Update all Organizations (Projects)
3923: in the hierarchy with inactive date as NULL.
3924: Union is to include the start organization id in the update */
3925:
3926: UPDATE pa_all_organizations
3927: SET Inactive_Date = NULL
3928: WHERE Pa_Org_Use_Type = 'PROJECTS'
3929: AND Org_id = v_org_id
3930: AND Organization_id = rec_proj_new_org.organization_id;

Line 3933: Organization hierarchy in the Pa_all_Organizations, then,

3929: AND Org_id = v_org_id
3930: AND Organization_id = rec_proj_new_org.organization_id;
3931:
3932: /* In case there are no corresponding records for the
3933: Organization hierarchy in the Pa_all_Organizations, then,
3934: create these records in the Pa_All_Organizations
3935: with Inactive_Date as NULL */
3936:
3937: IF SQL%NOTFOUND THEN

Line 3934: create these records in the Pa_All_Organizations

3930: AND Organization_id = rec_proj_new_org.organization_id;
3931:
3932: /* In case there are no corresponding records for the
3933: Organization hierarchy in the Pa_all_Organizations, then,
3934: create these records in the Pa_All_Organizations
3935: with Inactive_Date as NULL */
3936:
3937: IF SQL%NOTFOUND THEN
3938: INSERT INTO Pa_All_Organizations

Line 3938: INSERT INTO Pa_All_Organizations

3934: create these records in the Pa_All_Organizations
3935: with Inactive_Date as NULL */
3936:
3937: IF SQL%NOTFOUND THEN
3938: INSERT INTO Pa_All_Organizations
3939: (organization_id,
3940: org_id,
3941: pa_org_use_type,
3942: inactive_date)

Line 3962: UPDATE pa_all_organizations

3958: loop
3959: v_start_org_id := imp_rec.exp_start_org_id;
3960: v_org_id := imp_rec.org_id;
3961:
3962: UPDATE pa_all_organizations
3963: SET Inactive_Date = TRUNC(SYSDATE)
3964: WHERE Pa_Org_Use_Type = 'EXPENDITURES'
3965: AND Org_id = v_org_id and Inactive_Date is null ;
3966:

Line 3973: UPDATE pa_all_organizations

3969: /* Update all Organizations (Projects)
3970: in the hierarchy with inactive date as NULL.
3971: Union is to include the start organization id in the update */
3972:
3973: UPDATE pa_all_organizations
3974: SET Inactive_Date = NULL
3975: WHERE Pa_Org_Use_Type = 'EXPENDITURES'
3976: AND Org_id = v_org_id
3977: AND Organization_id = rec_exp_new_org.organization_id;

Line 3980: Organization hierarchy in the Pa_all_Organizations, then,

3976: AND Org_id = v_org_id
3977: AND Organization_id = rec_exp_new_org.organization_id;
3978:
3979: /* In case there are no corresponding records for the new
3980: Organization hierarchy in the Pa_all_Organizations, then,
3981: create these records in the Pa_All_Organizations
3982: with Inactive_Date as NULL */
3983:
3984: IF SQL%NOTFOUND THEN

Line 3981: create these records in the Pa_All_Organizations

3977: AND Organization_id = rec_exp_new_org.organization_id;
3978:
3979: /* In case there are no corresponding records for the new
3980: Organization hierarchy in the Pa_all_Organizations, then,
3981: create these records in the Pa_All_Organizations
3982: with Inactive_Date as NULL */
3983:
3984: IF SQL%NOTFOUND THEN
3985: INSERT INTO Pa_All_Organizations

Line 3985: INSERT INTO Pa_All_Organizations

3981: create these records in the Pa_All_Organizations
3982: with Inactive_Date as NULL */
3983:
3984: IF SQL%NOTFOUND THEN
3985: INSERT INTO Pa_All_Organizations
3986: (organization_id,
3987: org_id,
3988: pa_org_use_type,
3989: inactive_date)