DBA Data[Home] [Help]

APPS.PQH_GL_POSTING dependencies on PQH_BUDGET_DETAILS

Line 64: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

60: ) ;
61:
62: PROCEDURE populate_pqh_gms_interface
63: (
64: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
65: );
66:
67: PROCEDURE insert_pqh_gms_interface
68: (

Line 174: l_budget_details_rec pqh_budget_details%ROWTYPE;

170: --
171: -- local variables
172: --
173: l_proc varchar2(72) := g_package||'.post_budget';
174: l_budget_details_rec pqh_budget_details%ROWTYPE;
175: l_log_context pqh_process_log.log_context%TYPE;
176: l_budget_detail_result varchar2(1);
177: l_message_text fnd_new_messages.message_text%TYPE;
178: l_dummy varchar2(10);

Line 183: FROM pqh_budget_details

179:
180:
181: CURSOR csr_budget_detail_recs IS
182: SELECT *
183: FROM pqh_budget_details
184: WHERE budget_version_id = p_budget_version_id
185: AND NVL(gl_status,'X') <> 'POST';
186:
187:

Line 313: update gl_status of pqh_budget_versions and pqh_budget_details

309: end if;
310: END IF;
311:
312: /*
313: update gl_status of pqh_budget_versions and pqh_budget_details
314: update posting_date and status of pqh_gl_interface
315: update the global g_status with the program status
316: */
317:

Line 821: -- get the table route id for pqh_budget details

817: OPEN csr_table_route(p_table_alias => 'BVR');
818: FETCH csr_table_route INTO g_table_route_id_bvr;
819: CLOSE csr_table_route;
820:
821: -- get the table route id for pqh_budget details
822: OPEN csr_table_route(p_table_alias => 'BDT');
823: FETCH csr_table_route INTO g_table_route_id_bdt;
824: CLOSE csr_table_route;
825:

Line 826: -- get the table route id for pqh_budget details

822: OPEN csr_table_route(p_table_alias => 'BDT');
823: FETCH csr_table_route INTO g_table_route_id_bdt;
824: CLOSE csr_table_route;
825:
826: -- get the table route id for pqh_budget details
827: OPEN csr_table_route(p_table_alias => 'BPR');
828: FETCH csr_table_route INTO g_table_route_id_bpr;
829: CLOSE csr_table_route;
830:

Line 906: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

902:
903: -- ----------------------------------------------------------------------------
904: PROCEDURE populate_period_amt_tab
905: (
906: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
907: ) IS
908: /*
909: this procedure will populate the global table g_period_amt_tab
910: Cursor csr_dflt_period_amts calculates the Funding Source wise distribution

Line 1051: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

1047:
1048: -- ----------------------------------------------------------------------------
1049: PROCEDURE update_period_amt_tab
1050: (
1051: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
1052: )
1053: IS
1054: /*
1055: This procedure will read the above populated global table g_period_amt_tab and

Line 1227: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

1223: -- ----------------------------------------------------------------------------
1224:
1225: PROCEDURE populate_pqh_gl_interface
1226: (
1227: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
1228: )
1229: IS
1230: /*
1231: This procedure will update or insert into pqh_gl_interface if there was no error for

Line 1233: if g_detail_error = Y then update the pqh_budget_details record with gl_status = ERROR

1229: IS
1230: /*
1231: This procedure will update or insert into pqh_gl_interface if there was no error for
1232: the current budget detail record i.e g_detail_error = N
1233: if g_detail_error = Y then update the pqh_budget_details record with gl_status = ERROR
1234: */
1235: --
1236: -- local variables
1237: --

Line 1390: -- update pqh_budget_details reset status if previous run was ERROR

1386:
1387: END IF; -- Insert only GL records
1388: END LOOP; -- end of pl sql table
1389:
1390: -- update pqh_budget_details reset status if previous run was ERROR
1391: UPDATE pqh_budget_details
1392: SET gl_status = ''
1393: WHERE budget_detail_id = p_budget_detail_id;
1394:

Line 1391: UPDATE pqh_budget_details

1387: END IF; -- Insert only GL records
1388: END LOOP; -- end of pl sql table
1389:
1390: -- update pqh_budget_details reset status if previous run was ERROR
1391: UPDATE pqh_budget_details
1392: SET gl_status = ''
1393: WHERE budget_detail_id = p_budget_detail_id;
1394:
1395:

Line 1399: -- update pqh_budget_details

1395:
1396:
1397: ELSE -- g_detail_error = Y i.e errors in budget details children
1398:
1399: -- update pqh_budget_details
1400: UPDATE pqh_budget_details
1401: SET gl_status = 'ERROR'
1402: WHERE budget_detail_id = p_budget_detail_id;
1403:

Line 1400: UPDATE pqh_budget_details

1396:
1397: ELSE -- g_detail_error = Y i.e errors in budget details children
1398:
1399: -- update pqh_budget_details
1400: UPDATE pqh_budget_details
1401: SET gl_status = 'ERROR'
1402: WHERE budget_detail_id = p_budget_detail_id;
1403:
1404: END IF; -- g_detail_error = 'N'

Line 1962: This procedure will update the gl_status of pqh_budget_versions, pqh_budget_details

1958: -- ----------------------------------------------------------------------------
1959: PROCEDURE update_gl_status
1960: IS
1961: /*
1962: This procedure will update the gl_status of pqh_budget_versions, pqh_budget_details
1963: and update the pqh_gl_interface table
1964:
1965: We always update the TRANSFERED_TO_GL_FLAG = Y to indicate this is the latest budget_version that is posted to GL
1966: gl_status = POST or ERROR

Line 1973: l_budget_details_rec pqh_budget_details%ROWTYPE;

1969: --
1970: -- local variables
1971: --
1972: l_proc varchar2(72) := g_package||'.update_gl_status';
1973: l_budget_details_rec pqh_budget_details%ROWTYPE;
1974: l_count NUMBER;
1975:
1976: CURSOR csr_budget_details IS
1977: SELECT *

Line 1978: FROM pqh_budget_details

1974: l_count NUMBER;
1975:
1976: CURSOR csr_budget_details IS
1977: SELECT *
1978: FROM pqh_budget_details
1979: WHERE budget_version_id = g_budget_version_id
1980: AND NVL(gl_status,'X') <> 'ERROR'
1981: FOR UPDATE OF gl_status;
1982:

Line 1985: FROM pqh_budget_details

1981: FOR UPDATE OF gl_status;
1982:
1983: CURSOR csr_budget_details_cnt IS
1984: SELECT COUNT(*)
1985: FROM pqh_budget_details
1986: WHERE budget_version_id = g_budget_version_id
1987: AND NVL(gl_status,'ERROR') = 'ERROR';
1988:
1989: BEGIN

Line 1993: -- update pqh_budget_details

1989: BEGIN
1990:
1991: hr_utility.set_location('Entering: '||l_proc, 5);
1992:
1993: -- update pqh_budget_details
1994: OPEN csr_budget_details;
1995: LOOP
1996: FETCH csr_budget_details INTO l_budget_details_rec;
1997: EXIT WHEN csr_budget_details%NOTFOUND;

Line 1998: UPDATE pqh_budget_details

1994: OPEN csr_budget_details;
1995: LOOP
1996: FETCH csr_budget_details INTO l_budget_details_rec;
1997: EXIT WHEN csr_budget_details%NOTFOUND;
1998: UPDATE pqh_budget_details
1999: SET gl_status = 'POST'
2000: WHERE CURRENT OF csr_budget_details;
2001: END LOOP;
2002: CLOSE csr_budget_details;

Line 2069: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE,

2065: -- ----------------------------------------------------------------------------
2066:
2067: PROCEDURE get_gl_ccid
2068: (
2069: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE,
2070: p_budget_period_id IN pqh_budget_periods.budget_period_id%TYPE,
2071: p_cost_allocation_keyflex_id IN pay_cost_allocation_keyflex.cost_allocation_keyflex_id%TYPE,
2072: p_code_combination_id OUT NOCOPY gl_code_combinations.code_combination_id%TYPE
2073: ) IS

Line 2573: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE,

2569: -- ----------------------------------------------------------------------------
2570: -- ----------------------------------------------------------------------------
2571: PROCEDURE set_bdt_log_context
2572: (
2573: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE,
2574: p_log_context OUT NOCOPY pqh_process_log.log_context%TYPE
2575: ) IS
2576:
2577: /*

Line 2586: l_budget_details_rec pqh_budget_details%ROWTYPE;

2582:
2583: */
2584:
2585: l_proc varchar2(72) := g_package||'set_bdt_log_context';
2586: l_budget_details_rec pqh_budget_details%ROWTYPE;
2587: l_position_name hr_positions.name%TYPE;
2588: l_job_name per_jobs.name%TYPE;
2589: l_organization_name hr_organization_units.name%TYPE;
2590: l_grade_name per_grades.name%TYPE;

Line 2594: FROM pqh_budget_details

2590: l_grade_name per_grades.name%TYPE;
2591:
2592: CURSOR csr_bdt_detail_rec IS
2593: SELECT *
2594: FROM pqh_budget_details
2595: WHERE budget_detail_id = p_budget_detail_id ;
2596:
2597: BEGIN
2598:

Line 3107: -- update the pqh_budget_details table gl_status to ERROR

3103:
3104: END LOOP;
3105: CLOSE csr_adj;
3106:
3107: -- update the pqh_budget_details table gl_status to ERROR
3108:
3109: UPDATE pqh_budget_details
3110: SET gl_status = 'ERROR'
3111: WHERE budget_detail_id IN

Line 3109: UPDATE pqh_budget_details

3105: CLOSE csr_adj;
3106:
3107: -- update the pqh_budget_details table gl_status to ERROR
3108:
3109: UPDATE pqh_budget_details
3110: SET gl_status = 'ERROR'
3111: WHERE budget_detail_id IN
3112: (
3113: SELECT distinct budget_detail_id

Line 3148: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

3144: END reverse_budget_details;
3145: --------------------------------------------------------------------------------------------------------------
3146: PROCEDURE build_old_bdgt_dtls_tab
3147: (
3148: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
3149: ) IS
3150: /*
3151: This procedure will check if the current budget_detail_id was already posted (exists in pqh_gl_interface)
3152: If Yes, it would build a pl/sql table with all records which have this current budget_detail_id.

Line 3310: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

3306:
3307: --------------------------------------------------------------------------------------------------------------
3308: PROCEDURE reverse_old_bdgt_dtls_tab
3309: (
3310: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
3311: ) IS
3312: /*
3313: This procedure will loop thru the g_old_bdgt_dtls_tab and generate reverse transaction for all records
3314: where reverse_flag is Y and update the posted record amount to 0

Line 3598: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

3594: --------------------------------------------------------------------------------------------------------------
3595:
3596: PROCEDURE get_payroll_defaults
3597: (
3598: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
3599: ) IS
3600: /*
3601: This procedure will initialize the g_seg_val_tab table.
3602: For the about budget_detail_id ,it will check if the Position ID is not null.

Line 3625: FROM pqh_budget_details bdt,

3621: AND PAY.EFFECTIVE_START_DATE <= ss.effective_date
3622: AND PAY.EFFECTIVE_END_DATE >= ss.effective_date
3623: AND pay.payroll_id =
3624: (SELECT pos.pay_freq_payroll_id
3625: FROM pqh_budget_details bdt,
3626: hr_all_positions_f pos,
3627: FND_SESSIONS SS
3628: WHERE bdt.budget_detail_id = p_budget_detail_id
3629: AND bdt.position_id = pos.position_id

Line 3807: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE,

3803:
3804: --------------------------------------------------------------------------------------------------------------
3805: PROCEDURE get_element_link_defaults
3806: (
3807: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE,
3808: p_budget_period_id IN pqh_budget_periods.budget_period_id%TYPE
3809: ) IS
3810: /*
3811: This procedure wil check if there are any defaults for the position and element in

Line 3828: FROM pqh_budget_details bdt, pqh_budget_periods bpr,

3824: l_pay_cost_allocation_rec pay_cost_allocation_keyflex%ROWTYPE;
3825:
3826: CURSOR csr_cost_allocation_keyflex_id IS
3827: SELECT cost_allocation_keyflex_id
3828: FROM pqh_budget_details bdt, pqh_budget_periods bpr,
3829: pqh_budget_sets bst, pqh_budget_elements bel,
3830: pay_element_links pel
3831: WHERE bdt.budget_detail_id = bpr.budget_detail_id
3832: AND bpr.budget_period_id = bst.budget_period_id

Line 3919: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

3915:
3916: --------------------------------------------------------------------------------------------------------------
3917: PROCEDURE get_organization_defaults
3918: (
3919: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
3920: ) IS
3921: /*
3922: For the about budget_detail_id ,it will check if the Organization ID is not null.
3923: If the Organization is not null, we would get the defaults for this Organization ID

Line 3939: FROM pqh_budget_details bdt,

3935: l_pay_cost_allocation_rec pay_cost_allocation_keyflex%ROWTYPE;
3936:
3937: CURSOR csr_cost_allocation_keyflex_id IS
3938: SELECT cost_allocation_keyflex_id
3939: FROM pqh_budget_details bdt,
3940: hr_all_organization_units org
3941: WHERE bdt.budget_detail_id = p_budget_detail_id
3942: AND bdt.organization_id = org.organization_id;
3943:

Line 4155: UPDATE pqh_budget_details

4151: gl_status = 'UNPOST'
4152: WHERE budget_version_id = g_last_posted_ver;
4153:
4154: -- update the budget_detail records corresponding to this version , set gl_status to null
4155: UPDATE pqh_budget_details
4156: SET gl_status = ''
4157: WHERE budget_version_id = g_last_posted_ver;
4158:
4159: --

Line 4189: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE,

4185: --
4186: PROCEDURE get_ccid_for_commitment(
4187: p_budget_id IN pqh_budgets.budget_id%type,
4188: p_chart_of_accounts_id IN gl_interface.chart_of_accounts_id%TYPE,
4189: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE,
4190: p_budget_period_id IN pqh_budget_periods.budget_period_id%TYPE,
4191: p_cost_allocation_keyflex_id IN pay_cost_allocation_keyflex.cost_allocation_keyflex_id%TYPE,
4192: p_code_combination_id OUT NOCOPY gl_code_combinations.code_combination_id%TYPE) IS
4193: --

Line 4351: UPDATE pqh_budget_details

4347: WHERE budget_version_id = g_last_posted_ver;
4348: --
4349: -- update the budget_detail records corresponding to this version
4350: --
4351: UPDATE pqh_budget_details
4352: SET commitment_gl_status = 'UNPOST'
4353: WHERE budget_version_id = g_last_posted_ver;
4354: --
4355: END IF; -- if the current version is not the last posted version

Line 4367: FUNCTION chk_budget_details(p_budget_version_id IN pqh_budget_details.budget_version_id%TYPE )

4363: hr_utility.set_message_token('REASON', SQLERRM);
4364: hr_utility.raise_error;
4365: END reverse_commitment_post;
4366:
4367: FUNCTION chk_budget_details(p_budget_version_id IN pqh_budget_details.budget_version_id%TYPE )
4368: RETURN varchar2 IS
4369: /*
4370: This function will determine whether the budget has details or not
4371: If the budget has details return 'Y' else 'N'

Line 4379: FROM pqh_budget_details bdt, pqh_budget_periods bpr, pqh_budget_sets bst, pqh_budget_elements bel, pqh_budget_fund_srcs bfs

4375: l_result varchar2(30);
4376:
4377: CURSOR csr_budget_details (p_budget_version_id IN number )IS
4378: SELECT bfs.budget_fund_src_id
4379: FROM pqh_budget_details bdt, pqh_budget_periods bpr, pqh_budget_sets bst, pqh_budget_elements bel, pqh_budget_fund_srcs bfs
4380: WHERE bdt.budget_version_id = p_budget_version_id
4381: and bdt.budget_detail_id = bpr.budget_detail_id
4382: and bpr.budget_period_id = bst.budget_period_id
4383: and bst.budget_set_id = bel.budget_set_id

Line 4403: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

4399: -------------------------------------------------------------------------------------------------------------
4400: ------------------------------------------------------------------------------------------------------------
4401: PROCEDURE populate_period_enc_tab
4402: (
4403: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
4404: ) IS
4405:
4406: /*
4407: This procedure will read the above populated global table g_period_amt_tab and get the

Line 4474: pqh_budget_details

4470:
4471: Cursor budget_detail_position IS
4472: Select position_id
4473: From
4474: pqh_budget_details
4475: where budget_detail_id = p_budget_detail_id;
4476:
4477: Cursor budget_detail_org IS
4478: Select organization_id

Line 4480: pqh_budget_details

4476:
4477: Cursor budget_detail_org IS
4478: Select organization_id
4479: From
4480: pqh_budget_details
4481: where budget_detail_id = p_budget_detail_id;
4482:
4483: Cursor budget_detail_grd IS
4484: Select grade_id

Line 4486: pqh_budget_details

4482:
4483: Cursor budget_detail_grd IS
4484: Select grade_id
4485: From
4486: pqh_budget_details
4487: where budget_detail_id = p_budget_detail_id;
4488:
4489: Cursor budget_detail_job IS
4490: Select job_id

Line 4492: pqh_budget_details

4488:
4489: Cursor budget_detail_job IS
4490: Select job_id
4491: From
4492: pqh_budget_details
4493: where budget_detail_id = p_budget_detail_id;
4494: --
4495: -- Cursors to get Budget Detail Entity Assignments
4496:

Line 4786: ,pqh_budget_details bdt

4782: DELETE from pqh_gms_excess
4783: WHERE budget_period_id in (Select budget_period_id
4784: From
4785: pqh_budget_periods bpr
4786: ,pqh_budget_details bdt
4787: Where bpr.budget_detail_id = bdt.budget_detail_id AND
4788: bdt.budget_version_id=g_budget_version_id);
4789: END IF;
4790: CLOSE csr_last_posted_ver;

Line 5034: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE

5030: --------------------------------------------------------------------------------------------
5031:
5032: PROCEDURE populate_pqh_gms_interface
5033: (
5034: p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE
5035: )
5036: IS
5037: /*
5038: This procedure will update or insert GMS records into pqh_gl_interface if there was no error for

Line 5040: if g_detail_error = Y then update the pqh_budget_details record with gl_status = ERROR

5036: IS
5037: /*
5038: This procedure will update or insert GMS records into pqh_gl_interface if there was no error for
5039: the current budget detail record i.e g_detail_error = N
5040: if g_detail_error = Y then update the pqh_budget_details record with gl_status = ERROR
5041: */
5042: --
5043: -- local variables
5044: --

Line 5151: -- update pqh_budget_details reset status if previous run was ERROR

5147:
5148: END IF; -- Insert only GMS records
5149: END LOOP; -- end of pl sql table
5150:
5151: -- update pqh_budget_details reset status if previous run was ERROR
5152: UPDATE pqh_budget_details
5153: SET gl_status = ''
5154: WHERE budget_detail_id = p_budget_detail_id;
5155:

Line 5152: UPDATE pqh_budget_details

5148: END IF; -- Insert only GMS records
5149: END LOOP; -- end of pl sql table
5150:
5151: -- update pqh_budget_details reset status if previous run was ERROR
5152: UPDATE pqh_budget_details
5153: SET gl_status = ''
5154: WHERE budget_detail_id = p_budget_detail_id;
5155:
5156:

Line 5160: -- update pqh_budget_details

5156:
5157:
5158: ELSE -- g_detail_error = Y i.e errors in budget details children
5159:
5160: -- update pqh_budget_details
5161: UPDATE pqh_budget_details
5162: SET gl_status = 'ERROR'
5163: WHERE budget_detail_id = p_budget_detail_id;
5164:

Line 5161: UPDATE pqh_budget_details

5157:
5158: ELSE -- g_detail_error = Y i.e errors in budget details children
5159:
5160: -- update pqh_budget_details
5161: UPDATE pqh_budget_details
5162: SET gl_status = 'ERROR'
5163: WHERE budget_detail_id = p_budget_detail_id;
5164:
5165: END IF; -- g_detail_error = 'N'

Line 5549: UPDATE pqh_budget_details

5545: --For each record that failed in import update budget_detail status
5546: --
5547: hr_utility.set_location('Set Budget Detail status to Error', 25);
5548: begin
5549: UPDATE pqh_budget_details
5550: SET gl_status = 'ERROR'
5551: Where budget_detail_id in (select budget_detail_id from pqh_gl_interface where
5552: budget_version_id=g_budget_version_id
5553: And cost_allocation_keyflex_id is null