DBA Data[Home] [Help]

APPS.HR_GL_SYNC_ORGS dependencies on GL_CODE_COMBINATIONS

Line 731: FROM gl_code_combinations

727: -- Local cursor to fetch chart of accounts id based on code combination id.
728: CURSOR c_coa_id( cp_ccid IN NUMBER
729: ) IS
730: SELECT chart_of_accounts_id
731: FROM gl_code_combinations
732: WHERE code_combination_id = cp_ccid;
733:
734: BEGIN
735:

Line 2144: ' from gl_code_combinations'||

2140: ', '||l_co_seg||
2141: ', '||l_co_vs_id||
2142: ', '||l_cc_seg||
2143: ', '||l_cc_vs_id||
2144: ' from gl_code_combinations'||
2145: ' where summary_flag = ''N'''||
2146: ' and chart_of_accounts_id = :1'||
2147: ' and '||l_co_seg||' = nvl(:2,'||l_co_seg||')'
2148: using p_coa_id, p_co;

Line 2286: ' SELECT DISTINCT '||l_co_seg||','||l_cc_seg||' FROM gl_code_combinations'||

2282: -- which contain the company code value and cost center code value.
2283: --
2284: EXECUTE IMMEDIATE 'DELETE FROM '||g_temp_table_name||
2285: ' WHERE (co,cc) IN ('||
2286: ' SELECT DISTINCT '||l_co_seg||','||l_cc_seg||' FROM gl_code_combinations'||
2287: ' WHERE chart_of_accounts_id = :1 AND company_cost_center_org_id IS NOT NULL)'
2288: USING p_coa_id;
2289: --
2290: l_delrowcount := SQL%ROWCOUNT;

Line 2368: -- GL_CODE_COMBINATIONS into temp table.

2364: -- Loop for cost center codes within the cost center value set.
2365: -- Insert Company Cost Center combinations into temp table.
2366: -- Else source is GLCC
2367: -- Fetch distinct Company Cost Center combinations from table
2368: -- GL_CODE_COMBINATIONS into temp table.
2369: -- Create a performance index on the temp table.
2370: -- Delete from temp table where CoCC combinations have been synchronized
2371: -- in GL_CODE_COMBINATIONS.
2372: -- Update existing CoCC orgs depending upon control params.

Line 2371: -- in GL_CODE_COMBINATIONS.

2367: -- Fetch distinct Company Cost Center combinations from table
2368: -- GL_CODE_COMBINATIONS into temp table.
2369: -- Create a performance index on the temp table.
2370: -- Delete from temp table where CoCC combinations have been synchronized
2371: -- in GL_CODE_COMBINATIONS.
2372: -- Update existing CoCC orgs depending upon control params.
2373: -- Delete from temp table where CoCC Orgs already exist in the system.
2374: -- Close the transaction as this completes a unit of work.
2375: --

Line 2516: -- in GL_CODE_COMBINATIONS are already synchronized with HR Orgs

2512: writelog('Inserted '||l_rowcount||' Company-CostCenter records into temp','Y');
2513: END IF;
2514:
2515: -- Trigger subsequent delete of records from temp table where records
2516: -- in GL_CODE_COMBINATIONS are already synchronized with HR Orgs
2517: -- i.e. COMPANY_COST_CENTER_ORG_ID is not null.
2518: -- Phase 2a - Note that this code is moved below, after the update of existing orgs,
2519: -- as the corresponding orgs for these rows may still need to be updated.
2520: --

Line 2540: ' FROM gl_code_combinations'||

2536: ', '||l_co_seg||
2537: ', '||l_co_vs_id||
2538: ', '||l_cc_seg||
2539: ', '||l_cc_vs_id||
2540: ' FROM gl_code_combinations'||
2541: ' WHERE company_cost_center_org_id IS NULL'||
2542: ' AND summary_flag = ''N'''||
2543: ' AND chart_of_accounts_id = :1'||
2544: ' AND '||l_co_seg||' = NVL(:2,'||l_co_seg||')'

Line 2725: ' SELECT DISTINCT '||l_co_seg||','||l_cc_seg||' FROM gl_code_combinations'||

2721: -- Note that l_co_seg and l_cc_seg hold the names of the columns
2722: -- which contain the company code value and cost center code value.
2723: EXECUTE IMMEDIATE 'DELETE FROM '||g_temp_table_name||
2724: ' WHERE (co,cc) IN ('||
2725: ' SELECT DISTINCT '||l_co_seg||','||l_cc_seg||' FROM gl_code_combinations'||
2726: ' WHERE chart_of_accounts_id = :1 AND company_cost_center_org_id IS NOT NULL)'
2727: USING p_coa_id;
2728:
2729: l_delrowcount := SQL%ROWCOUNT;

Line 2799: -- Get GL_CODE_COMBINATIONS records that have not yet been synchronized

2795: --
2796: -- Populate Co-CC combinations to synchronize into temporary table
2797: --
2798: -- Derive company and cost center value sets for the chart of accounts.
2799: -- Get GL_CODE_COMBINATIONS records that have not yet been synchronized
2800: -- into temp table.
2801: -- Create an index on temp table.
2802: -- Delete those combinations for which a company org cannot be found.
2803: -- Close the transaction as this completes a unit of work.

Line 2845: -- Get records from GL_CODE_COMBINATIONS for the given COA_ID and the

2841: writelog('Company Value Set Id: '||l_co_vs_id,'Y');
2842: writelog('Cost Center Value Set Id: '||l_cc_vs_id,'Y');
2843: END IF; -- retcode is 0
2844:
2845: -- Get records from GL_CODE_COMBINATIONS for the given COA_ID and the
2846: -- account code combination is not for a summary account and the
2847: -- company cost center org id is null, i.e. the CCID has not already
2848: -- been synchronized to an ORG.
2849: IF l_retcode = 0 THEN

Line 2867: ' FROM gl_code_combinations'||

2863: ', '||l_cc_seg||
2864: ', '||l_cc_vs_id||
2865: ', code_combination_id'||
2866: ', NULL'||
2867: ' FROM gl_code_combinations'||
2868: ' WHERE company_cost_center_org_id IS NULL'||
2869: ' AND summary_flag = ''N'''||
2870: ' AND chart_of_accounts_id = :1'
2871: USING p_coa_id;

Line 3255: l_coa_id gl_code_combinations.chart_of_accounts_id%TYPE;

3251:
3252: -- Local variables
3253: l_proc VARCHAR2(50) := g_package||'.single_org_mode';
3254: l_retcode NUMBER := 0;
3255: l_coa_id gl_code_combinations.chart_of_accounts_id%TYPE;
3256: l_co_seg VARCHAR2(240); -- Col name of seg holding company value
3257: l_cc_seg VARCHAR2(240); -- Col name of seg holding cost center value
3258: l_co_vs_id NUMBER(15); -- Id of company value set
3259: l_cc_vs_id NUMBER(15); -- Id of cost center value set

Line 3314: ' FROM gl_code_combinations'||

3310: -- Get the actual company code and cost center code
3311: IF l_retcode = 0 THEN
3312: hr_utility.set_location(l_proc, 60);
3313: OPEN c_list FOR 'SELECT '||l_co_seg||', '||l_cc_seg||
3314: ' FROM gl_code_combinations'||
3315: ' WHERE code_combination_id = :1'
3316: USING p_ccid;
3317: FETCH c_list INTO l_co, l_cc;
3318: CLOSE c_list;

Line 3399: EXECUTE IMMEDIATE 'UPDATE gl_code_combinations'||

3395:
3396: -- Synchronize new organization (if created) to GL
3397: IF l_retcode = 0 AND l_org_id <> -1 THEN
3398: hr_utility.set_location(l_proc, 140);
3399: EXECUTE IMMEDIATE 'UPDATE gl_code_combinations'||
3400: ' SET company_cost_center_org_id = :1'||
3401: ', last_update_date = SYSDATE'||
3402: ', last_updated_by = :2'||
3403: ' WHERE code_combination_id = :3'

Line 3405: writelog('Updated GL Code Combinations with Org Id:'||l_org_id||

3401: ', last_update_date = SYSDATE'||
3402: ', last_updated_by = :2'||
3403: ' WHERE code_combination_id = :3'
3404: USING l_org_id, fnd_global.user_id, p_ccid;
3405: writelog('Updated GL Code Combinations with Org Id:'||l_org_id||
3406: ' for CCID:'||p_ccid, 'Y');
3407: hr_utility.set_location('Updated GL Code Combinations with Org Id:'||
3408: l_org_id||' for CCID:'||p_ccid, 150);
3409: END IF; -- retocde is 0

Line 3407: hr_utility.set_location('Updated GL Code Combinations with Org Id:'||

3403: ' WHERE code_combination_id = :3'
3404: USING l_org_id, fnd_global.user_id, p_ccid;
3405: writelog('Updated GL Code Combinations with Org Id:'||l_org_id||
3406: ' for CCID:'||p_ccid, 'Y');
3407: hr_utility.set_location('Updated GL Code Combinations with Org Id:'||
3408: l_org_id||' for CCID:'||p_ccid, 150);
3409: END IF; -- retocde is 0
3410:
3411: hr_utility.set_location('Leaving: '|| l_proc, 160);

Line 3503: -- Update GL_CODE_COMBINATIONS with matching Ids from temp table.

3499: -- Process Synchronize Mode
3500: --
3501: -- Fetch GL Co-CC combinations to process into temp table
3502: -- Update the temp table with Id of matching ORGs.
3503: -- Update GL_CODE_COMBINATIONS with matching Ids from temp table.
3504: -- Close transaction.
3505: --
3506: FUNCTION synchronize_mode( p_business_group_id IN NUMBER
3507: , p_coa_id IN NUMBER

Line 3574: -- Update GL Code Combinations with the matching ORG Id values

3570:
3571: writelog('Updated '||SQL%ROWCOUNT||' ORGs to temp table','Y');
3572: END IF; -- retcode is 0
3573:
3574: -- Update GL Code Combinations with the matching ORG Id values
3575: IF l_retcode = 0 THEN
3576: hr_utility.set_location(l_proc, 40);
3577:
3578: EXECUTE IMMEDIATE 'UPDATE gl_code_combinations GCC'||

Line 3578: EXECUTE IMMEDIATE 'UPDATE gl_code_combinations GCC'||

3574: -- Update GL Code Combinations with the matching ORG Id values
3575: IF l_retcode = 0 THEN
3576: hr_utility.set_location(l_proc, 40);
3577:
3578: EXECUTE IMMEDIATE 'UPDATE gl_code_combinations GCC'||
3579: ' SET ( GCC.company_cost_center_org_id'||
3580: ', GCC.last_update_date'||
3581: ', GCC.last_updated_by) ='||
3582: ' (SELECT SYNC.org_id'||

Line 3593: writelog('Updated '||SQL%ROWCOUNT||' ORGs to GL Code Combinations','Y');

3589: ' AND GCC.code_combination_id IN (SELECT ccid'||
3590: ' FROM '||g_temp_table_name||
3591: ' WHERE org_id IS NOT NULL)';
3592:
3593: writelog('Updated '||SQL%ROWCOUNT||' ORGs to GL Code Combinations','Y');
3594: END IF; -- retcode is 0
3595:
3596: -- Close transaction on successfull completion
3597: IF l_retcode = 0 THEN