DBA Data[Home] [Help]

APPS.HR_GL_COST_CENTERS dependencies on GL_CODE_COMBINATIONS

Line 629: from gl_code_combinations

625: hr_utility.set_location(l_proc,40);
626: begin
627: select summary_flag
628: into l_summary_flag
629: from gl_code_combinations
630: where code_combination_id = p_ccid;
631:
632: if (upper(l_summary_flag) = 'Y') then
633: hr_utility.set_location(l_proc,50);

Line 1504: FROM gl_code_combinations gcc

1500:
1501: open c_list2 for 'SELECT /*+ORDERED USE_NL(gcc)*/
1502: distinct gcc.'||l_company_segment||' company,
1503: gcc.'||l_cc_segment ||' cost_center
1504: FROM gl_code_combinations gcc
1505: WHERE gcc.company_cost_center_org_id is null
1506: AND gcc.summary_flag = ''N''
1507: AND gcc.chart_of_accounts_id = '||l_coas.chart_of_accounts_id||
1508: 'AND gcc.'||l_company_segment||' is not null

Line 1774: ** from gl_code_combinations table for all chart of accounts which do not

1770: droptable(p_hr_sync_ccid, TRUE );
1771:
1772: /*
1773: ** This table is used to hold information about the company and cost center
1774: ** from gl_code_combinations table for all chart of accounts which do not
1775: ** have a value for company_cost_center_org_id.
1776: */
1777: execute immediate 'create table '||p_hr_sync_temp ||' (
1778: ccid number(15),

Line 1828: ** 'SEGMENT1' then the value from GL_CODE_COMBINATIONS.SEGMENT1 is

1824: ** In the following SQL - l_company and l_cost_center hold the
1825: ** name of the segment column holding the company and cost center info
1826: ** cause the data from the corresponding column in the code comb table
1827: ** to be inserted into the temp table. i.e. if l_company holds the string
1828: ** 'SEGMENT1' then the value from GL_CODE_COMBINATIONS.SEGMENT1 is
1829: ** inserted into the tmp table.
1830: */
1831: execute immediate 'insert into '||p_hr_sync_temp ||'
1832: (ccid,

Line 1842: from gl_code_combinations

1838: select code_combination_id,
1839: chart_of_accounts_id,'||
1840: l_company ||', '||l_company_vs||', '||
1841: l_cost_center||', '||l_cc_vs||'
1842: from gl_code_combinations
1843: where company_cost_center_org_id is null
1844: and summary_flag = ''N''
1845: and chart_of_accounts_id = :1'
1846: using l_coas.chart_of_accounts_id;

Line 1908: ** gl_code_combinations table for which an organization with matching

1904: raise g_no_cc_proc_exc;
1905: else
1906: /*
1907: ** This temp table cross-references CCID and org ID for each record in
1908: ** gl_code_combinations table for which an organization with matching
1909: ** company and cost center is already defined. i.e. regardless of org name
1910: ** if we find an organization which already has the Company Cost Center
1911: ** classification and the org information matches on company, cost center
1912: ** and valueset details then link the org to the GL code combinations

Line 1912: ** and valueset details then link the org to the GL code combinations

1908: ** gl_code_combinations table for which an organization with matching
1909: ** company and cost center is already defined. i.e. regardless of org name
1910: ** if we find an organization which already has the Company Cost Center
1911: ** classification and the org information matches on company, cost center
1912: ** and valueset details then link the org to the GL code combinations
1913: ** record.
1914: **
1915: ** This SQL needs rewriting to use org_information1 in the search and not
1916: ** the individual segments.

Line 1976: This operates only on org_ids that are null in the gl_code_combinations table

1972:
1973:
1974: /*---------------------------------------------------------------------
1975:
1976: This operates only on org_ids that are null in the gl_code_combinations table
1977: For those that are null, first check if there is an Org with Company Cost Center
1978: classification with the same company and cost center attributes.
1979: If so, do nothing.
1980: If this org does not exist then check for an organization with the same name

Line 2055: ** Update the GL code combinations table and set the org ID FK

2051: writelog('Created '||p_hr_sync_temp||' table ','D');
2052: writelog('Created '||p_hr_sync_ccid||' table ','D');
2053:
2054: /*
2055: ** Update the GL code combinations table and set the org ID FK
2056: ** to the corresponding company cost center org.
2057: */
2058: l_stmt := 'update /*+ORDERED USE_NL(gcc)*/ gl_code_combinations gcc
2059: set (company_cost_center_org_id,

Line 2058: l_stmt := 'update /*+ORDERED USE_NL(gcc)*/ gl_code_combinations gcc

2054: /*
2055: ** Update the GL code combinations table and set the org ID FK
2056: ** to the corresponding company cost center org.
2057: */
2058: l_stmt := 'update /*+ORDERED USE_NL(gcc)*/ gl_code_combinations gcc
2059: set (company_cost_center_org_id,
2060: last_update_date,
2061: last_updated_by ) =
2062: (select sync.org_id,

Line 2073: writelog('Updated '||sql%rowcount||' rows in GL_CODE_COMBINATIONS','D');

2069: (select ccid from '||p_hr_sync_ccid ||')';
2070:
2071: execute immediate l_stmt;
2072:
2073: writelog('Updated '||sql%rowcount||' rows in GL_CODE_COMBINATIONS','D');
2074: hr_utility.set_message(800,'HR_289179_COMB_ORG_ALRDY');
2075: fnd_message.set_token('ROWCOUNT',sql%rowcount);
2076: l_message := fnd_message.get();
2077: /*

Line 2103: ** Since we have just set the org ID on GL_CODE_COMBINATIONS for those

2099: return 1;
2100: end if;
2101:
2102: /*
2103: ** Since we have just set the org ID on GL_CODE_COMBINATIONS for those
2104: ** records which have a matching cost center Org already defined
2105: ** we can remove the records from our other temp table for CCID's which
2106: ** now have a value for the org ID.
2107: */

Line 2112: from gl_code_combinations

2108: hr_utility.set_location(l_proc,30);
2109: execute immediate 'delete from '||p_hr_sync_temp ||'
2110: where ccid in
2111: (select code_combination_id
2112: from gl_code_combinations
2113: where company_cost_center_org_id is not null
2114: and last_update_date >= :1)'
2115: using p_start_date;
2116:

Line 2180: ** now update GL_CODE_COMBINATIONS and set the org ID FK.

2176: end if;
2177: end loop;
2178:
2179: /*
2180: ** now update GL_CODE_COMBINATIONS and set the org ID FK.
2181: */
2182: l_stmt := 'update gl_code_combinations gcc
2183: set (company_cost_center_org_id,
2184: last_update_date,

Line 2182: l_stmt := 'update gl_code_combinations gcc

2178:
2179: /*
2180: ** now update GL_CODE_COMBINATIONS and set the org ID FK.
2181: */
2182: l_stmt := 'update gl_code_combinations gcc
2183: set (company_cost_center_org_id,
2184: last_update_date,
2185: last_updated_by) =
2186: (select org_id,

Line 2201: ' rows in GL Code combinations with newly created Org ids','D');

2197: and org_id <> -1)';
2198:
2199: execute immediate l_stmt;
2200: writelog('Updated '||sql%rowcount||
2201: ' rows in GL Code combinations with newly created Org ids','D');
2202: if sql%rowcount = 0 then
2203: writelog(fnd_message.get_String('PER','HR_289180_SYNC_SUMMARY_ZERO'),'I');
2204: else
2205: hr_utility.set_message(800,'HR_289184_SYNC_SUMMARY');

Line 2320: from gl_code_combinations

2316: writelog('Inside incrementalOrgs for p_ccid = '||p_ccid,'D');
2317:
2318: select chart_of_accounts_id
2319: into l_chart_of_accounts_id
2320: from gl_code_combinations
2321: where code_combination_id = p_ccid;
2322:
2323: l_retcode := getSegmentForQualifier(l_chart_of_accounts_id,
2324: 'GL_BALANCING',

Line 2355: from gl_code_combinations

2351: ** Get the actual company and cost center segment values.
2352: */
2353: open c_list for 'select '||l_company_segment||', '||
2354: l_cc_segment ||'
2355: from gl_code_combinations
2356: where code_combination_id =:1'
2357: using p_ccid;
2358: fetch c_list into l_company, l_cost_center ;
2359: close c_list;

Line 2421: execute immediate 'update gl_code_combinations

2417: end if;
2418:
2419: if l_org_id <> -1 then
2420: hr_utility.set_location(l_proc,50);
2421: execute immediate 'update gl_code_combinations
2422: set company_cost_center_org_id=:1,
2423: last_update_date = sysdate,
2424: last_updated_by = :2
2425: where code_combination_id =:3'

Line 2428: writelog('Updated GL_CODE_COMBINATIONS. Set Company_cost_center_org_id = '||

2424: last_updated_by = :2
2425: where code_combination_id =:3'
2426: using l_org_id, fnd_global.user_id, p_ccid;
2427:
2428: writelog('Updated GL_CODE_COMBINATIONS. Set Company_cost_center_org_id = '||
2429: l_org_id ||' where code_Combination_id = '||p_ccid,'D');
2430: end if;
2431:
2432: hr_utility.set_location('Leaving : '||l_proc,60);