DBA Data[Home] [Help]

APPS.PQH_GL_POSTING dependencies on GL_INTERFACE

Line 11: g_set_of_books_id gl_interface.set_of_books_id%TYPE;

7: --
8: g_package varchar2(33) := ' pqh_gl_posting'; -- Global package name
9: --
10: g_application_id NUMBER(15) := 101;
11: g_set_of_books_id gl_interface.set_of_books_id%TYPE;
12: g_budgetary_control_flag gl_sets_of_books.enable_budgetary_control_flag%TYPE;
13: g_budget_name pqh_budgets.budget_name%TYPE;
14: g_budgeted_entity_cd pqh_budgets.budgeted_entity_cd%TYPE;
15: g_budget_id pqh_budgets.budget_id%TYPE;

Line 16: g_user_je_source_name gl_interface.user_je_source_name%TYPE;

12: g_budgetary_control_flag gl_sets_of_books.enable_budgetary_control_flag%TYPE;
13: g_budget_name pqh_budgets.budget_name%TYPE;
14: g_budgeted_entity_cd pqh_budgets.budgeted_entity_cd%TYPE;
15: g_budget_id pqh_budgets.budget_id%TYPE;
16: g_user_je_source_name gl_interface.user_je_source_name%TYPE;
17: g_user_je_category_name gl_interface.user_je_category_name%TYPE;
18: g_budget_version_id gl_interface.budget_version_id%TYPE;
19: g_gl_budget_version_id gl_interface.budget_version_id%TYPE;
20: g_version_number pqh_budget_versions.version_number%TYPE;

Line 17: g_user_je_category_name gl_interface.user_je_category_name%TYPE;

13: g_budget_name pqh_budgets.budget_name%TYPE;
14: g_budgeted_entity_cd pqh_budgets.budgeted_entity_cd%TYPE;
15: g_budget_id pqh_budgets.budget_id%TYPE;
16: g_user_je_source_name gl_interface.user_je_source_name%TYPE;
17: g_user_je_category_name gl_interface.user_je_category_name%TYPE;
18: g_budget_version_id gl_interface.budget_version_id%TYPE;
19: g_gl_budget_version_id gl_interface.budget_version_id%TYPE;
20: g_version_number pqh_budget_versions.version_number%TYPE;
21: g_chart_of_accounts_id gl_interface.chart_of_accounts_id%TYPE;

Line 18: g_budget_version_id gl_interface.budget_version_id%TYPE;

14: g_budgeted_entity_cd pqh_budgets.budgeted_entity_cd%TYPE;
15: g_budget_id pqh_budgets.budget_id%TYPE;
16: g_user_je_source_name gl_interface.user_je_source_name%TYPE;
17: g_user_je_category_name gl_interface.user_je_category_name%TYPE;
18: g_budget_version_id gl_interface.budget_version_id%TYPE;
19: g_gl_budget_version_id gl_interface.budget_version_id%TYPE;
20: g_version_number pqh_budget_versions.version_number%TYPE;
21: g_chart_of_accounts_id gl_interface.chart_of_accounts_id%TYPE;
22: g_currency_code gl_interface.currency_code%TYPE;

Line 19: g_gl_budget_version_id gl_interface.budget_version_id%TYPE;

15: g_budget_id pqh_budgets.budget_id%TYPE;
16: g_user_je_source_name gl_interface.user_je_source_name%TYPE;
17: g_user_je_category_name gl_interface.user_je_category_name%TYPE;
18: g_budget_version_id gl_interface.budget_version_id%TYPE;
19: g_gl_budget_version_id gl_interface.budget_version_id%TYPE;
20: g_version_number pqh_budget_versions.version_number%TYPE;
21: g_chart_of_accounts_id gl_interface.chart_of_accounts_id%TYPE;
22: g_currency_code gl_interface.currency_code%TYPE;
23: g_detail_error VARCHAR2(10);

Line 21: g_chart_of_accounts_id gl_interface.chart_of_accounts_id%TYPE;

17: g_user_je_category_name gl_interface.user_je_category_name%TYPE;
18: g_budget_version_id gl_interface.budget_version_id%TYPE;
19: g_gl_budget_version_id gl_interface.budget_version_id%TYPE;
20: g_version_number pqh_budget_versions.version_number%TYPE;
21: g_chart_of_accounts_id gl_interface.chart_of_accounts_id%TYPE;
22: g_currency_code gl_interface.currency_code%TYPE;
23: g_detail_error VARCHAR2(10);
24: g_currency_code1 gl_interface.currency_code%TYPE;
25: g_currency_code2 gl_interface.currency_code%TYPE;

Line 22: g_currency_code gl_interface.currency_code%TYPE;

18: g_budget_version_id gl_interface.budget_version_id%TYPE;
19: g_gl_budget_version_id gl_interface.budget_version_id%TYPE;
20: g_version_number pqh_budget_versions.version_number%TYPE;
21: g_chart_of_accounts_id gl_interface.chart_of_accounts_id%TYPE;
22: g_currency_code gl_interface.currency_code%TYPE;
23: g_detail_error VARCHAR2(10);
24: g_currency_code1 gl_interface.currency_code%TYPE;
25: g_currency_code2 gl_interface.currency_code%TYPE;
26: g_currency_code3 gl_interface.currency_code%TYPE;

Line 24: g_currency_code1 gl_interface.currency_code%TYPE;

20: g_version_number pqh_budget_versions.version_number%TYPE;
21: g_chart_of_accounts_id gl_interface.chart_of_accounts_id%TYPE;
22: g_currency_code gl_interface.currency_code%TYPE;
23: g_detail_error VARCHAR2(10);
24: g_currency_code1 gl_interface.currency_code%TYPE;
25: g_currency_code2 gl_interface.currency_code%TYPE;
26: g_currency_code3 gl_interface.currency_code%TYPE;
27: g_error_exception exception;
28: g_table_route_id_bvr number;

Line 25: g_currency_code2 gl_interface.currency_code%TYPE;

21: g_chart_of_accounts_id gl_interface.chart_of_accounts_id%TYPE;
22: g_currency_code gl_interface.currency_code%TYPE;
23: g_detail_error VARCHAR2(10);
24: g_currency_code1 gl_interface.currency_code%TYPE;
25: g_currency_code2 gl_interface.currency_code%TYPE;
26: g_currency_code3 gl_interface.currency_code%TYPE;
27: g_error_exception exception;
28: g_table_route_id_bvr number;
29: g_table_route_id_bdt number;

Line 26: g_currency_code3 gl_interface.currency_code%TYPE;

22: g_currency_code gl_interface.currency_code%TYPE;
23: g_detail_error VARCHAR2(10);
24: g_currency_code1 gl_interface.currency_code%TYPE;
25: g_currency_code2 gl_interface.currency_code%TYPE;
26: g_currency_code3 gl_interface.currency_code%TYPE;
27: g_error_exception exception;
28: g_table_route_id_bvr number;
29: g_table_route_id_bdt number;
30: g_table_route_id_bpr number;

Line 35: g_last_posted_ver gl_interface.budget_version_id%TYPE;

31: g_table_route_id_bfs number;
32: g_table_route_id_glf number;
33: g_status varchar2(10);
34: g_validate boolean;
35: g_last_posted_ver gl_interface.budget_version_id%TYPE;
36: g_psb_budget_flag pqh_budgets.psb_budget_flag%TYPE;
37: g_transfer_to_grants_flag pqh_budgets.transfer_to_grants_flag%TYPE;
38: g_bgt_currency_code pqh_budgets.currency_code%TYPE;
39:

Line 69: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,

65: );
66:
67: PROCEDURE insert_pqh_gms_interface
68: (
69: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
70: p_period_name IN varchar2,
71: p_project_id IN pqh_gl_interface.project_id%TYPE,
72: p_task_id IN pqh_gl_interface.task_id%TYPE,
73: p_award_id IN pqh_gl_interface.award_id%TYPE,

Line 71: p_project_id IN pqh_gl_interface.project_id%TYPE,

67: PROCEDURE insert_pqh_gms_interface
68: (
69: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
70: p_period_name IN varchar2,
71: p_project_id IN pqh_gl_interface.project_id%TYPE,
72: p_task_id IN pqh_gl_interface.task_id%TYPE,
73: p_award_id IN pqh_gl_interface.award_id%TYPE,
74: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
75: p_organization_id IN pqh_gl_interface.organization_id%TYPE,

Line 72: p_task_id IN pqh_gl_interface.task_id%TYPE,

68: (
69: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
70: p_period_name IN varchar2,
71: p_project_id IN pqh_gl_interface.project_id%TYPE,
72: p_task_id IN pqh_gl_interface.task_id%TYPE,
73: p_award_id IN pqh_gl_interface.award_id%TYPE,
74: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
75: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
76: p_amount IN pqh_gl_interface.amount_dr%TYPE

Line 73: p_award_id IN pqh_gl_interface.award_id%TYPE,

69: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
70: p_period_name IN varchar2,
71: p_project_id IN pqh_gl_interface.project_id%TYPE,
72: p_task_id IN pqh_gl_interface.task_id%TYPE,
73: p_award_id IN pqh_gl_interface.award_id%TYPE,
74: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
75: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
76: p_amount IN pqh_gl_interface.amount_dr%TYPE
77: );

Line 74: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,

70: p_period_name IN varchar2,
71: p_project_id IN pqh_gl_interface.project_id%TYPE,
72: p_task_id IN pqh_gl_interface.task_id%TYPE,
73: p_award_id IN pqh_gl_interface.award_id%TYPE,
74: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
75: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
76: p_amount IN pqh_gl_interface.amount_dr%TYPE
77: );
78:

Line 75: p_organization_id IN pqh_gl_interface.organization_id%TYPE,

71: p_project_id IN pqh_gl_interface.project_id%TYPE,
72: p_task_id IN pqh_gl_interface.task_id%TYPE,
73: p_award_id IN pqh_gl_interface.award_id%TYPE,
74: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
75: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
76: p_amount IN pqh_gl_interface.amount_dr%TYPE
77: );
78:
79: PROCEDURE update_pqh_gms_interface

Line 76: p_amount IN pqh_gl_interface.amount_dr%TYPE

72: p_task_id IN pqh_gl_interface.task_id%TYPE,
73: p_award_id IN pqh_gl_interface.award_id%TYPE,
74: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
75: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
76: p_amount IN pqh_gl_interface.amount_dr%TYPE
77: );
78:
79: PROCEDURE update_pqh_gms_interface
80: (

Line 81: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,

77: );
78:
79: PROCEDURE update_pqh_gms_interface
80: (
81: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
82: p_period_name IN varchar2,
83: p_project_id IN pqh_gl_interface.project_id%TYPE,
84: p_task_id IN pqh_gl_interface.task_id%TYPE,
85: p_award_id IN pqh_gl_interface.award_id%TYPE,

Line 83: p_project_id IN pqh_gl_interface.project_id%TYPE,

79: PROCEDURE update_pqh_gms_interface
80: (
81: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
82: p_period_name IN varchar2,
83: p_project_id IN pqh_gl_interface.project_id%TYPE,
84: p_task_id IN pqh_gl_interface.task_id%TYPE,
85: p_award_id IN pqh_gl_interface.award_id%TYPE,
86: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
87: p_organization_id IN pqh_gl_interface.organization_id%TYPE,

Line 84: p_task_id IN pqh_gl_interface.task_id%TYPE,

80: (
81: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
82: p_period_name IN varchar2,
83: p_project_id IN pqh_gl_interface.project_id%TYPE,
84: p_task_id IN pqh_gl_interface.task_id%TYPE,
85: p_award_id IN pqh_gl_interface.award_id%TYPE,
86: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
87: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
88: p_amount IN pqh_gl_interface.amount_dr%TYPE

Line 85: p_award_id IN pqh_gl_interface.award_id%TYPE,

81: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
82: p_period_name IN varchar2,
83: p_project_id IN pqh_gl_interface.project_id%TYPE,
84: p_task_id IN pqh_gl_interface.task_id%TYPE,
85: p_award_id IN pqh_gl_interface.award_id%TYPE,
86: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
87: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
88: p_amount IN pqh_gl_interface.amount_dr%TYPE
89: ) ;

Line 86: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,

82: p_period_name IN varchar2,
83: p_project_id IN pqh_gl_interface.project_id%TYPE,
84: p_task_id IN pqh_gl_interface.task_id%TYPE,
85: p_award_id IN pqh_gl_interface.award_id%TYPE,
86: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
87: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
88: p_amount IN pqh_gl_interface.amount_dr%TYPE
89: ) ;
90:

Line 87: p_organization_id IN pqh_gl_interface.organization_id%TYPE,

83: p_project_id IN pqh_gl_interface.project_id%TYPE,
84: p_task_id IN pqh_gl_interface.task_id%TYPE,
85: p_award_id IN pqh_gl_interface.award_id%TYPE,
86: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
87: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
88: p_amount IN pqh_gl_interface.amount_dr%TYPE
89: ) ;
90:
91: PROCEDURE populate_gms_tables;

Line 88: p_amount IN pqh_gl_interface.amount_dr%TYPE

84: p_task_id IN pqh_gl_interface.task_id%TYPE,
85: p_award_id IN pqh_gl_interface.award_id%TYPE,
86: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
87: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
88: p_amount IN pqh_gl_interface.amount_dr%TYPE
89: ) ;
90:
91: PROCEDURE populate_gms_tables;
92:

Line 95: ,p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE

91: PROCEDURE populate_gms_tables;
92:
93: PROCEDURE ins_gl_bc_run_fund_check
94: ( p_packet_id IN gl_bc_packets.packet_id%TYPE
95: ,p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE
96: ,p_period_name IN pqh_gl_interface.period_name%TYPE
97: ,p_period_year IN gl_period_statuses.period_year%TYPE
98: ,p_period_num IN gl_period_statuses.period_num%TYPE
99: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE

Line 96: ,p_period_name IN pqh_gl_interface.period_name%TYPE

92:
93: PROCEDURE ins_gl_bc_run_fund_check
94: ( p_packet_id IN gl_bc_packets.packet_id%TYPE
95: ,p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE
96: ,p_period_name IN pqh_gl_interface.period_name%TYPE
97: ,p_period_year IN gl_period_statuses.period_year%TYPE
98: ,p_period_num IN gl_period_statuses.period_num%TYPE
99: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
100: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE

Line 100: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE

96: ,p_period_name IN pqh_gl_interface.period_name%TYPE
97: ,p_period_year IN gl_period_statuses.period_year%TYPE
98: ,p_period_num IN gl_period_statuses.period_num%TYPE
99: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
100: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
101: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
102: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
103: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
104: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE

Line 101: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE

97: ,p_period_year IN gl_period_statuses.period_year%TYPE
98: ,p_period_num IN gl_period_statuses.period_num%TYPE
99: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
100: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
101: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
102: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
103: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
104: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
105: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE

Line 102: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE

98: ,p_period_num IN gl_period_statuses.period_num%TYPE
99: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
100: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
101: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
102: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
103: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
104: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
105: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE
106: ,p_fc_mode IN varchar2

Line 103: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE

99: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
100: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
101: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
102: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
103: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
104: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
105: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE
106: ,p_fc_mode IN varchar2
107: ,p_fc_success OUT NOCOPY boolean

Line 104: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE

100: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
101: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
102: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
103: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
104: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
105: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE
106: ,p_fc_mode IN varchar2
107: ,p_fc_success OUT NOCOPY boolean
108: ,p_fc_return OUT NOCOPY varchar2

Line 105: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE

101: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
102: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
103: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
104: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
105: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE
106: ,p_fc_mode IN varchar2
107: ,p_fc_success OUT NOCOPY boolean
108: ,p_fc_return OUT NOCOPY varchar2
109: );

Line 166: try to post them to gl interface tables and pa interface table

162: ) IS
163: /*
164: This is the MAIN procedure which would be called.
165: This would pick-up all the budget_detail_ids under the budget_version_id and
166: try to post them to gl interface tables and pa interface table
167: If the program is run in validate mode i.e p_validate is TRUE then we would just check for
168: errors in pqh budget tables i.e period and gl account errors ,LD Encumbrance and log the errors
169: */
170: --

Line 256: -- populate pqh_gl_interface table if there was no error and validate is false

252: (
253: p_budget_detail_id => l_budget_details_rec.budget_detail_id
254: );
255:
256: -- populate pqh_gl_interface table if there was no error and validate is false
257: IF NOT p_validate THEN
258: -- build the old_bdgt_dtls_tab
259: build_old_bdgt_dtls_tab
260: (

Line 264: -- build the new bdgt_dtls tab and populate_pqh_gl_interface

260: (
261: p_budget_detail_id => l_budget_details_rec.budget_detail_id
262: );
263:
264: -- build the new bdgt_dtls tab and populate_pqh_gl_interface
265: -- we use same table pqh_gl_interface for Gl as well as GMS transfer
266: populate_pqh_gl_interface
267: (
268: p_budget_detail_id => l_budget_details_rec.budget_detail_id

Line 265: -- we use same table pqh_gl_interface for Gl as well as GMS transfer

261: p_budget_detail_id => l_budget_details_rec.budget_detail_id
262: );
263:
264: -- build the new bdgt_dtls tab and populate_pqh_gl_interface
265: -- we use same table pqh_gl_interface for Gl as well as GMS transfer
266: populate_pqh_gl_interface
267: (
268: p_budget_detail_id => l_budget_details_rec.budget_detail_id
269: );

Line 266: populate_pqh_gl_interface

262: );
263:
264: -- build the new bdgt_dtls tab and populate_pqh_gl_interface
265: -- we use same table pqh_gl_interface for Gl as well as GMS transfer
266: populate_pqh_gl_interface
267: (
268: p_budget_detail_id => l_budget_details_rec.budget_detail_id
269: );
270:

Line 301: -- insert into gl_interface or gl_bc_packets table all Records that need to be transfered to GL

297: reverse_prev_posted_version;
298: END IF;
299:
300: -- if not in validate mode
301: -- insert into gl_interface or gl_bc_packets table all Records that need to be transfered to GL
302: -- For all Records that need to be transfered to Grants
303: -- insert into pa_interface_all table and call gms_pub api
304:
305: IF NOT p_validate THEN

Line 314: update posting_date and status of pqh_gl_interface

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:
318: IF NOT p_validate THEN

Line 1064: If g_detail_error is Y then we will not populate the pqh_gl_interface table for the current

1060:
1061: 2.Get LD Encumbrance/Liquidation amount for each Budget Period and make adjustments to
1062: all PTAEO's invlved in that Budget period.
1063:
1064: If g_detail_error is Y then we will not populate the pqh_gl_interface table for the current
1065: budget_detail_id
1066: */
1067:
1068: --

Line 1225: PROCEDURE populate_pqh_gl_interface

1221:
1222:
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

Line 1231: This procedure will update or insert into pqh_gl_interface if there was no error for

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
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: --

Line 1238: l_proc varchar2(72) := g_package||'.populate_pqh_gl_interface';

1234: */
1235: --
1236: -- local variables
1237: --
1238: l_proc varchar2(72) := g_package||'.populate_pqh_gl_interface';
1239: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1240: l_uom1_count number;
1241: l_uom2_count number;
1242: l_uom3_count number;

Line 1239: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

1235: --
1236: -- local variables
1237: --
1238: l_proc varchar2(72) := g_package||'.populate_pqh_gl_interface';
1239: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1240: l_uom1_count number;
1241: l_uom2_count number;
1242: l_uom3_count number;
1243:

Line 1248: FROM pqh_gl_interface

1244: CURSOR csr_pqh_interface (p_period_name IN varchar2,
1245: p_code_combination_id IN number,
1246: p_currency_code IN varchar2) IS
1247: SELECT COUNT(*)
1248: FROM pqh_gl_interface
1249: WHERE budget_version_id = g_budget_version_id
1250: AND budget_detail_id = p_budget_detail_id
1251: AND posting_type_cd = 'BUDGET'
1252: AND period_name = p_period_name

Line 1266: -- loop thru the array and get populate the pqh_gl_interface table

1262: hr_utility.set_location('Entering: '||l_proc, 5);
1263:
1264: IF g_detail_error = 'N' THEN
1265:
1266: -- loop thru the array and get populate the pqh_gl_interface table
1267:
1268: FOR i IN NVL(g_period_amt_tab.FIRST,0)..NVL(g_period_amt_tab.LAST,-1)
1269: LOOP
1270:

Line 1282: -- update pqh_gl_interface and create a adjustment txn

1278: FETCH csr_pqh_interface INTO l_uom1_count;
1279: CLOSE csr_pqh_interface;
1280:
1281: IF l_uom1_count <> 0 THEN
1282: -- update pqh_gl_interface and create a adjustment txn
1283: update_pqh_gl_interface
1284: (
1285: p_budget_detail_id => p_budget_detail_id,
1286: p_period_name => g_period_amt_tab(i).period_name,

Line 1283: update_pqh_gl_interface

1279: CLOSE csr_pqh_interface;
1280:
1281: IF l_uom1_count <> 0 THEN
1282: -- update pqh_gl_interface and create a adjustment txn
1283: update_pqh_gl_interface
1284: (
1285: p_budget_detail_id => p_budget_detail_id,
1286: p_period_name => g_period_amt_tab(i).period_name,
1287: p_accounting_date => g_period_amt_tab(i).accounting_date,

Line 1294: -- insert into pqh_gl_interface

1290: p_amount => g_period_amt_tab(i).amount1,
1291: p_currency_code => g_currency_code1
1292: );
1293: ELSE
1294: -- insert into pqh_gl_interface
1295: insert_pqh_gl_interface
1296: (
1297: p_budget_detail_id => p_budget_detail_id,
1298: p_period_name => g_period_amt_tab(i).period_name,

Line 1295: insert_pqh_gl_interface

1291: p_currency_code => g_currency_code1
1292: );
1293: ELSE
1294: -- insert into pqh_gl_interface
1295: insert_pqh_gl_interface
1296: (
1297: p_budget_detail_id => p_budget_detail_id,
1298: p_period_name => g_period_amt_tab(i).period_name,
1299: p_accounting_date => g_period_amt_tab(i).accounting_date,

Line 1318: -- update pqh_gl_interface and create a adjustment txn

1314: FETCH csr_pqh_interface INTO l_uom2_count;
1315: CLOSE csr_pqh_interface;
1316:
1317: IF l_uom2_count <> 0 THEN
1318: -- update pqh_gl_interface and create a adjustment txn
1319: update_pqh_gl_interface
1320: (
1321: p_budget_detail_id => p_budget_detail_id,
1322: p_period_name => g_period_amt_tab(i).period_name,

Line 1319: update_pqh_gl_interface

1315: CLOSE csr_pqh_interface;
1316:
1317: IF l_uom2_count <> 0 THEN
1318: -- update pqh_gl_interface and create a adjustment txn
1319: update_pqh_gl_interface
1320: (
1321: p_budget_detail_id => p_budget_detail_id,
1322: p_period_name => g_period_amt_tab(i).period_name,
1323: p_accounting_date => g_period_amt_tab(i).accounting_date,

Line 1330: -- insert into pqh_gl_interface

1326: p_amount => g_period_amt_tab(i).amount2,
1327: p_currency_code => g_currency_code2
1328: );
1329: ELSE
1330: -- insert into pqh_gl_interface
1331: insert_pqh_gl_interface
1332: (
1333: p_budget_detail_id => p_budget_detail_id,
1334: p_period_name => g_period_amt_tab(i).period_name,

Line 1331: insert_pqh_gl_interface

1327: p_currency_code => g_currency_code2
1328: );
1329: ELSE
1330: -- insert into pqh_gl_interface
1331: insert_pqh_gl_interface
1332: (
1333: p_budget_detail_id => p_budget_detail_id,
1334: p_period_name => g_period_amt_tab(i).period_name,
1335: p_accounting_date => g_period_amt_tab(i).accounting_date,

Line 1356: -- update pqh_gl_interface and create a adjustment txn

1352: FETCH csr_pqh_interface INTO l_uom3_count;
1353: CLOSE csr_pqh_interface;
1354:
1355: IF l_uom3_count <> 0 THEN
1356: -- update pqh_gl_interface and create a adjustment txn
1357: update_pqh_gl_interface
1358: (
1359: p_budget_detail_id => p_budget_detail_id,
1360: p_period_name => g_period_amt_tab(i).period_name,

Line 1357: update_pqh_gl_interface

1353: CLOSE csr_pqh_interface;
1354:
1355: IF l_uom3_count <> 0 THEN
1356: -- update pqh_gl_interface and create a adjustment txn
1357: update_pqh_gl_interface
1358: (
1359: p_budget_detail_id => p_budget_detail_id,
1360: p_period_name => g_period_amt_tab(i).period_name,
1361: p_accounting_date => g_period_amt_tab(i).accounting_date,

Line 1368: -- insert into pqh_gl_interface

1364: p_amount => g_period_amt_tab(i).amount3,
1365: p_currency_code => g_currency_code3
1366: );
1367: ELSE
1368: -- insert into pqh_gl_interface
1369: insert_pqh_gl_interface
1370: (
1371: p_budget_detail_id => p_budget_detail_id,
1372: p_period_name => g_period_amt_tab(i).period_name,

Line 1369: insert_pqh_gl_interface

1365: p_currency_code => g_currency_code3
1366: );
1367: ELSE
1368: -- insert into pqh_gl_interface
1369: insert_pqh_gl_interface
1370: (
1371: p_budget_detail_id => p_budget_detail_id,
1372: p_period_name => g_period_amt_tab(i).period_name,
1373: p_accounting_date => g_period_amt_tab(i).accounting_date,

Line 1414: END populate_pqh_gl_interface;

1410: hr_utility.set_message(8302, 'PQH_CATASTROPHIC_ERROR');
1411: hr_utility.set_message_token('ROUTINE', l_proc);
1412: hr_utility.set_message_token('REASON', SQLERRM);
1413: hr_utility.raise_error;
1414: END populate_pqh_gl_interface;
1415:
1416:
1417:
1418: -- ----------------------------------------------------------------------------

Line 1419: PROCEDURE insert_pqh_gl_interface

1415:
1416:
1417:
1418: -- ----------------------------------------------------------------------------
1419: PROCEDURE insert_pqh_gl_interface
1420: (
1421: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1422: p_period_name IN pqh_gl_interface.period_name%TYPE,
1423: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,

Line 1421: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,

1417:
1418: -- ----------------------------------------------------------------------------
1419: PROCEDURE insert_pqh_gl_interface
1420: (
1421: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1422: p_period_name IN pqh_gl_interface.period_name%TYPE,
1423: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1424: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1425: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,

Line 1422: p_period_name IN pqh_gl_interface.period_name%TYPE,

1418: -- ----------------------------------------------------------------------------
1419: PROCEDURE insert_pqh_gl_interface
1420: (
1421: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1422: p_period_name IN pqh_gl_interface.period_name%TYPE,
1423: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1424: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1425: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1426: p_amount IN pqh_gl_interface.amount_dr%TYPE,

Line 1423: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,

1419: PROCEDURE insert_pqh_gl_interface
1420: (
1421: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1422: p_period_name IN pqh_gl_interface.period_name%TYPE,
1423: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1424: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1425: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1426: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1427: p_currency_code IN pqh_gl_interface.currency_code%TYPE

Line 1424: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,

1420: (
1421: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1422: p_period_name IN pqh_gl_interface.period_name%TYPE,
1423: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1424: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1425: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1426: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1427: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1428: ) IS

Line 1425: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,

1421: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1422: p_period_name IN pqh_gl_interface.period_name%TYPE,
1423: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1424: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1425: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1426: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1427: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1428: ) IS
1429: /*

Line 1426: p_amount IN pqh_gl_interface.amount_dr%TYPE,

1422: p_period_name IN pqh_gl_interface.period_name%TYPE,
1423: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1424: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1425: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1426: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1427: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1428: ) IS
1429: /*
1430: This procedure will insert record into pqh_gl_interface

Line 1427: p_currency_code IN pqh_gl_interface.currency_code%TYPE

1423: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1424: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1425: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1426: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1427: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1428: ) IS
1429: /*
1430: This procedure will insert record into pqh_gl_interface
1431: If the same UOM is repeated more then once then we would update the unposted txn.

Line 1430: This procedure will insert record into pqh_gl_interface

1426: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1427: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1428: ) IS
1429: /*
1430: This procedure will insert record into pqh_gl_interface
1431: If the same UOM is repeated more then once then we would update the unposted txn.
1432: */
1433: --
1434: -- local variables

Line 1436: l_proc varchar2(72) := g_package||'.insert_pqh_gl_interface';

1432: */
1433: --
1434: -- local variables
1435: --
1436: l_proc varchar2(72) := g_package||'.insert_pqh_gl_interface';
1437: l_count number(9) := 0 ;
1438:
1439: CURSOR csr_pqh_gl_interface IS
1440: SELECT COUNT(*)

Line 1439: CURSOR csr_pqh_gl_interface IS

1435: --
1436: l_proc varchar2(72) := g_package||'.insert_pqh_gl_interface';
1437: l_count number(9) := 0 ;
1438:
1439: CURSOR csr_pqh_gl_interface IS
1440: SELECT COUNT(*)
1441: FROM pqh_gl_interface
1442: WHERE budget_version_id = g_budget_version_id
1443: AND budget_detail_id = p_budget_detail_id

Line 1441: FROM pqh_gl_interface

1437: l_count number(9) := 0 ;
1438:
1439: CURSOR csr_pqh_gl_interface IS
1440: SELECT COUNT(*)
1441: FROM pqh_gl_interface
1442: WHERE budget_version_id = g_budget_version_id
1443: AND budget_detail_id = p_budget_detail_id
1444: AND posting_type_cd = 'BUDGET'
1445: AND period_name = p_period_name

Line 1456: OPEN csr_pqh_gl_interface;

1452: BEGIN
1453:
1454: hr_utility.set_location('Entering: '||l_proc, 5);
1455: -- check if its a repeat of that same UOM
1456: OPEN csr_pqh_gl_interface;
1457: FETCH csr_pqh_gl_interface INTO l_count;
1458: CLOSE csr_pqh_gl_interface;
1459:
1460: hr_utility.set_location('l_count in Insert pqh_gl_interface : '||l_count,10);

Line 1457: FETCH csr_pqh_gl_interface INTO l_count;

1453:
1454: hr_utility.set_location('Entering: '||l_proc, 5);
1455: -- check if its a repeat of that same UOM
1456: OPEN csr_pqh_gl_interface;
1457: FETCH csr_pqh_gl_interface INTO l_count;
1458: CLOSE csr_pqh_gl_interface;
1459:
1460: hr_utility.set_location('l_count in Insert pqh_gl_interface : '||l_count,10);
1461:

Line 1458: CLOSE csr_pqh_gl_interface;

1454: hr_utility.set_location('Entering: '||l_proc, 5);
1455: -- check if its a repeat of that same UOM
1456: OPEN csr_pqh_gl_interface;
1457: FETCH csr_pqh_gl_interface INTO l_count;
1458: CLOSE csr_pqh_gl_interface;
1459:
1460: hr_utility.set_location('l_count in Insert pqh_gl_interface : '||l_count,10);
1461:
1462: IF l_count <> 0 THEN

Line 1460: hr_utility.set_location('l_count in Insert pqh_gl_interface : '||l_count,10);

1456: OPEN csr_pqh_gl_interface;
1457: FETCH csr_pqh_gl_interface INTO l_count;
1458: CLOSE csr_pqh_gl_interface;
1459:
1460: hr_utility.set_location('l_count in Insert pqh_gl_interface : '||l_count,10);
1461:
1462: IF l_count <> 0 THEN
1463:
1464: -- this is a repeat of UOM , so update the first one adding the new amount

Line 1465: UPDATE pqh_gl_interface

1461:
1462: IF l_count <> 0 THEN
1463:
1464: -- this is a repeat of UOM , so update the first one adding the new amount
1465: UPDATE pqh_gl_interface
1466: -- ns since the record is new, the current amount is actual amount
1467: -- no need to add to previous amount
1468: -- SET AMOUNT_DR = NVL(AMOUNT_DR,0) + NVL(p_amount,0)
1469: SET AMOUNT_DR = NVL(p_amount,0)

Line 1483: INSERT INTO pqh_gl_interface

1479:
1480: ELSE
1481:
1482: -- insert this record
1483: INSERT INTO pqh_gl_interface
1484: (
1485: gl_interface_id,
1486: budget_version_id,
1487: budget_detail_id,

Line 1485: gl_interface_id,

1481:
1482: -- insert this record
1483: INSERT INTO pqh_gl_interface
1484: (
1485: gl_interface_id,
1486: budget_version_id,
1487: budget_detail_id,
1488: period_name,
1489: accounting_date,

Line 1502: pqh_gl_interface_s.nextval,

1498: posting_type_cd
1499: )
1500: VALUES
1501: (
1502: pqh_gl_interface_s.nextval,
1503: g_budget_version_id,
1504: p_budget_detail_id,
1505: p_period_name,
1506: p_accounting_date,

Line 1529: END insert_pqh_gl_interface;

1525: hr_utility.set_message(8302, 'PQH_CATASTROPHIC_ERROR');
1526: hr_utility.set_message_token('ROUTINE', l_proc);
1527: hr_utility.set_message_token('REASON', SQLERRM);
1528: hr_utility.raise_error;
1529: END insert_pqh_gl_interface;
1530:
1531: -- ----------------------------------------------------------------------------
1532: PROCEDURE update_pqh_gl_interface
1533: (

Line 1532: PROCEDURE update_pqh_gl_interface

1528: hr_utility.raise_error;
1529: END insert_pqh_gl_interface;
1530:
1531: -- ----------------------------------------------------------------------------
1532: PROCEDURE update_pqh_gl_interface
1533: (
1534: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1535: p_period_name IN pqh_gl_interface.period_name%TYPE,
1536: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,

Line 1534: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,

1530:
1531: -- ----------------------------------------------------------------------------
1532: PROCEDURE update_pqh_gl_interface
1533: (
1534: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1535: p_period_name IN pqh_gl_interface.period_name%TYPE,
1536: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1537: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1538: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,

Line 1535: p_period_name IN pqh_gl_interface.period_name%TYPE,

1531: -- ----------------------------------------------------------------------------
1532: PROCEDURE update_pqh_gl_interface
1533: (
1534: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1535: p_period_name IN pqh_gl_interface.period_name%TYPE,
1536: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1537: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1538: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1539: p_amount IN pqh_gl_interface.amount_dr%TYPE,

Line 1536: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,

1532: PROCEDURE update_pqh_gl_interface
1533: (
1534: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1535: p_period_name IN pqh_gl_interface.period_name%TYPE,
1536: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1537: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1538: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1539: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1540: p_currency_code IN pqh_gl_interface.currency_code%TYPE

Line 1537: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,

1533: (
1534: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1535: p_period_name IN pqh_gl_interface.period_name%TYPE,
1536: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1537: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1538: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1539: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1540: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1541: ) IS

Line 1538: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,

1534: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
1535: p_period_name IN pqh_gl_interface.period_name%TYPE,
1536: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1537: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1538: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1539: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1540: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1541: ) IS
1542: /*

Line 1539: p_amount IN pqh_gl_interface.amount_dr%TYPE,

1535: p_period_name IN pqh_gl_interface.period_name%TYPE,
1536: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1537: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1538: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1539: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1540: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1541: ) IS
1542: /*
1543: This procedure will update pqh_gl_interface and create a adjustment record

Line 1540: p_currency_code IN pqh_gl_interface.currency_code%TYPE

1536: p_accounting_date IN pqh_gl_interface.accounting_date%TYPE,
1537: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE,
1538: p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
1539: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1540: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1541: ) IS
1542: /*
1543: This procedure will update pqh_gl_interface and create a adjustment record
1544: */

Line 1543: This procedure will update pqh_gl_interface and create a adjustment record

1539: p_amount IN pqh_gl_interface.amount_dr%TYPE,
1540: p_currency_code IN pqh_gl_interface.currency_code%TYPE
1541: ) IS
1542: /*
1543: This procedure will update pqh_gl_interface and create a adjustment record
1544: */
1545: --
1546: -- local variables
1547: --

Line 1548: l_proc varchar2(72) := g_package||'.update_pqh_gl_interface';

1544: */
1545: --
1546: -- local variables
1547: --
1548: l_proc varchar2(72) := g_package||'.update_pqh_gl_interface';
1549: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;
1550: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;
1551: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
1552: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

Line 1549: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;

1545: --
1546: -- local variables
1547: --
1548: l_proc varchar2(72) := g_package||'.update_pqh_gl_interface';
1549: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;
1550: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;
1551: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
1552: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1553:

Line 1550: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;

1546: -- local variables
1547: --
1548: l_proc varchar2(72) := g_package||'.update_pqh_gl_interface';
1549: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;
1550: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;
1551: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
1552: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1553:
1554:

Line 1551: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;

1547: --
1548: l_proc varchar2(72) := g_package||'.update_pqh_gl_interface';
1549: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;
1550: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;
1551: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
1552: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1553:
1554:
1555: CURSOR csr_pqh_gl_interface IS

Line 1552: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

1548: l_proc varchar2(72) := g_package||'.update_pqh_gl_interface';
1549: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;
1550: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;
1551: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
1552: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1553:
1554:
1555: CURSOR csr_pqh_gl_interface IS
1556: SELECT *

Line 1555: CURSOR csr_pqh_gl_interface IS

1551: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
1552: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1553:
1554:
1555: CURSOR csr_pqh_gl_interface IS
1556: SELECT *
1557: FROM pqh_gl_interface
1558: WHERE budget_version_id = g_budget_version_id
1559: AND budget_detail_id = p_budget_detail_id

Line 1557: FROM pqh_gl_interface

1553:
1554:
1555: CURSOR csr_pqh_gl_interface IS
1556: SELECT *
1557: FROM pqh_gl_interface
1558: WHERE budget_version_id = g_budget_version_id
1559: AND budget_detail_id = p_budget_detail_id
1560: AND posting_type_cd = 'BUDGET'
1561: AND period_name = p_period_name

Line 1573: OPEN csr_pqh_gl_interface;

1569: BEGIN
1570:
1571: hr_utility.set_location('Entering: '||l_proc, 5);
1572:
1573: OPEN csr_pqh_gl_interface;
1574: FETCH csr_pqh_gl_interface INTO l_pqh_gl_interface_rec;
1575:
1576: l_amount_diff := NVL(p_amount,0) - NVL(l_pqh_gl_interface_rec.amount_dr,0);
1577:

Line 1574: FETCH csr_pqh_gl_interface INTO l_pqh_gl_interface_rec;

1570:
1571: hr_utility.set_location('Entering: '||l_proc, 5);
1572:
1573: OPEN csr_pqh_gl_interface;
1574: FETCH csr_pqh_gl_interface INTO l_pqh_gl_interface_rec;
1575:
1576: l_amount_diff := NVL(p_amount,0) - NVL(l_pqh_gl_interface_rec.amount_dr,0);
1577:
1578: IF l_amount_diff > 0 THEN

Line 1576: l_amount_diff := NVL(p_amount,0) - NVL(l_pqh_gl_interface_rec.amount_dr,0);

1572:
1573: OPEN csr_pqh_gl_interface;
1574: FETCH csr_pqh_gl_interface INTO l_pqh_gl_interface_rec;
1575:
1576: l_amount_diff := NVL(p_amount,0) - NVL(l_pqh_gl_interface_rec.amount_dr,0);
1577:
1578: IF l_amount_diff > 0 THEN
1579: -- debit as new is more then old
1580: l_amount_dr := l_amount_diff;

Line 1587: -- update the pqh_gl_interface table

1583: l_amount_cr := (-1)*l_amount_diff;
1584: END IF;
1585:
1586:
1587: -- update the pqh_gl_interface table
1588: UPDATE pqh_gl_interface
1589: SET amount_dr = NVL(p_amount,0)
1590: WHERE CURRENT OF csr_pqh_gl_interface;
1591:

Line 1588: UPDATE pqh_gl_interface

1584: END IF;
1585:
1586:
1587: -- update the pqh_gl_interface table
1588: UPDATE pqh_gl_interface
1589: SET amount_dr = NVL(p_amount,0)
1590: WHERE CURRENT OF csr_pqh_gl_interface;
1591:
1592:

Line 1590: WHERE CURRENT OF csr_pqh_gl_interface;

1586:
1587: -- update the pqh_gl_interface table
1588: UPDATE pqh_gl_interface
1589: SET amount_dr = NVL(p_amount,0)
1590: WHERE CURRENT OF csr_pqh_gl_interface;
1591:
1592:
1593: CLOSE csr_pqh_gl_interface;
1594:

Line 1593: CLOSE csr_pqh_gl_interface;

1589: SET amount_dr = NVL(p_amount,0)
1590: WHERE CURRENT OF csr_pqh_gl_interface;
1591:
1592:
1593: CLOSE csr_pqh_gl_interface;
1594:
1595: -- create i.e insert a adjustment record ONLY if l_amount_diff <> 0
1596: IF NVL(l_amount_diff,0) <> 0 THEN
1597:

Line 1598: INSERT INTO pqh_gl_interface

1594:
1595: -- create i.e insert a adjustment record ONLY if l_amount_diff <> 0
1596: IF NVL(l_amount_diff,0) <> 0 THEN
1597:
1598: INSERT INTO pqh_gl_interface
1599: (
1600: gl_interface_id,
1601: budget_version_id,
1602: budget_detail_id,

Line 1600: gl_interface_id,

1596: IF NVL(l_amount_diff,0) <> 0 THEN
1597:
1598: INSERT INTO pqh_gl_interface
1599: (
1600: gl_interface_id,
1601: budget_version_id,
1602: budget_detail_id,
1603: period_name,
1604: accounting_date,

Line 1617: pqh_gl_interface_s.nextval,

1613: posting_type_cd
1614: )
1615: VALUES
1616: (
1617: pqh_gl_interface_s.nextval,
1618: g_budget_version_id,
1619: p_budget_detail_id,
1620: p_period_name,
1621: p_accounting_date,

Line 1644: END update_pqh_gl_interface;

1640: hr_utility.set_message(8302, 'PQH_CATASTROPHIC_ERROR');
1641: hr_utility.set_message_token('ROUTINE', l_proc);
1642: hr_utility.set_message_token('REASON', SQLERRM);
1643: hr_utility.raise_error;
1644: END update_pqh_gl_interface;
1645:
1646: -- ----------------------------------------------------------------------------
1647: PROCEDURE populate_gl_tables
1648: IS

Line 1650: This procedure will pick records from pqh_gl_interface table and insert them into

1646: -- ----------------------------------------------------------------------------
1647: PROCEDURE populate_gl_tables
1648: IS
1649: /*
1650: This procedure will pick records from pqh_gl_interface table and insert them into
1651: gl tables depending on the g_budgetary_control_flag
1652: If we insert into gl_bc_packets do funds checking for each packet
1653: */
1654: --

Line 1658: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

1654: --
1655: -- local variables
1656: --
1657: l_proc varchar2(72) := g_package||'.populate_gl_tables';
1658: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1659: l_period_name pqh_gl_interface.period_name%TYPE;
1660: l_accounting_date pqh_gl_interface.accounting_date%TYPE;
1661: l_code_combination_id pqh_gl_interface.code_combination_id%TYPE;
1662: l_cost_allocation_keyflex_id pqh_gl_interface.cost_allocation_keyflex_id%TYPE;

Line 1659: l_period_name pqh_gl_interface.period_name%TYPE;

1655: -- local variables
1656: --
1657: l_proc varchar2(72) := g_package||'.populate_gl_tables';
1658: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1659: l_period_name pqh_gl_interface.period_name%TYPE;
1660: l_accounting_date pqh_gl_interface.accounting_date%TYPE;
1661: l_code_combination_id pqh_gl_interface.code_combination_id%TYPE;
1662: l_cost_allocation_keyflex_id pqh_gl_interface.cost_allocation_keyflex_id%TYPE;
1663: l_currency_code pqh_gl_interface.currency_code%TYPE;

Line 1660: l_accounting_date pqh_gl_interface.accounting_date%TYPE;

1656: --
1657: l_proc varchar2(72) := g_package||'.populate_gl_tables';
1658: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1659: l_period_name pqh_gl_interface.period_name%TYPE;
1660: l_accounting_date pqh_gl_interface.accounting_date%TYPE;
1661: l_code_combination_id pqh_gl_interface.code_combination_id%TYPE;
1662: l_cost_allocation_keyflex_id pqh_gl_interface.cost_allocation_keyflex_id%TYPE;
1663: l_currency_code pqh_gl_interface.currency_code%TYPE;
1664: l_amount_dr pqh_gl_interface.amount_dr%TYPE;

Line 1661: l_code_combination_id pqh_gl_interface.code_combination_id%TYPE;

1657: l_proc varchar2(72) := g_package||'.populate_gl_tables';
1658: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1659: l_period_name pqh_gl_interface.period_name%TYPE;
1660: l_accounting_date pqh_gl_interface.accounting_date%TYPE;
1661: l_code_combination_id pqh_gl_interface.code_combination_id%TYPE;
1662: l_cost_allocation_keyflex_id pqh_gl_interface.cost_allocation_keyflex_id%TYPE;
1663: l_currency_code pqh_gl_interface.currency_code%TYPE;
1664: l_amount_dr pqh_gl_interface.amount_dr%TYPE;
1665: l_amount_cr pqh_gl_interface.amount_cr%TYPE;

Line 1662: l_cost_allocation_keyflex_id pqh_gl_interface.cost_allocation_keyflex_id%TYPE;

1658: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
1659: l_period_name pqh_gl_interface.period_name%TYPE;
1660: l_accounting_date pqh_gl_interface.accounting_date%TYPE;
1661: l_code_combination_id pqh_gl_interface.code_combination_id%TYPE;
1662: l_cost_allocation_keyflex_id pqh_gl_interface.cost_allocation_keyflex_id%TYPE;
1663: l_currency_code pqh_gl_interface.currency_code%TYPE;
1664: l_amount_dr pqh_gl_interface.amount_dr%TYPE;
1665: l_amount_cr pqh_gl_interface.amount_cr%TYPE;
1666: l_packet_id gl_bc_packets.packet_id%TYPE;

Line 1663: l_currency_code pqh_gl_interface.currency_code%TYPE;

1659: l_period_name pqh_gl_interface.period_name%TYPE;
1660: l_accounting_date pqh_gl_interface.accounting_date%TYPE;
1661: l_code_combination_id pqh_gl_interface.code_combination_id%TYPE;
1662: l_cost_allocation_keyflex_id pqh_gl_interface.cost_allocation_keyflex_id%TYPE;
1663: l_currency_code pqh_gl_interface.currency_code%TYPE;
1664: l_amount_dr pqh_gl_interface.amount_dr%TYPE;
1665: l_amount_cr pqh_gl_interface.amount_cr%TYPE;
1666: l_packet_id gl_bc_packets.packet_id%TYPE;
1667: l_gl_period_statuses_rec gl_period_statuses%ROWTYPE;

Line 1664: l_amount_dr pqh_gl_interface.amount_dr%TYPE;

1660: l_accounting_date pqh_gl_interface.accounting_date%TYPE;
1661: l_code_combination_id pqh_gl_interface.code_combination_id%TYPE;
1662: l_cost_allocation_keyflex_id pqh_gl_interface.cost_allocation_keyflex_id%TYPE;
1663: l_currency_code pqh_gl_interface.currency_code%TYPE;
1664: l_amount_dr pqh_gl_interface.amount_dr%TYPE;
1665: l_amount_cr pqh_gl_interface.amount_cr%TYPE;
1666: l_packet_id gl_bc_packets.packet_id%TYPE;
1667: l_gl_period_statuses_rec gl_period_statuses%ROWTYPE;
1668: l_fc_success boolean;

Line 1665: l_amount_cr pqh_gl_interface.amount_cr%TYPE;

1661: l_code_combination_id pqh_gl_interface.code_combination_id%TYPE;
1662: l_cost_allocation_keyflex_id pqh_gl_interface.cost_allocation_keyflex_id%TYPE;
1663: l_currency_code pqh_gl_interface.currency_code%TYPE;
1664: l_amount_dr pqh_gl_interface.amount_dr%TYPE;
1665: l_amount_cr pqh_gl_interface.amount_cr%TYPE;
1666: l_packet_id gl_bc_packets.packet_id%TYPE;
1667: l_gl_period_statuses_rec gl_period_statuses%ROWTYPE;
1668: l_fc_success boolean;
1669: l_fc_return varchar2(100);

Line 1676: CURSOR csr_pqh_gl_interface IS

1672: l_log_context varchar2(255);
1673: l_packet_result_code varchar2(255);
1674: l_packet_status_code varchar2(255);
1675:
1676: CURSOR csr_pqh_gl_interface IS
1677: SELECT period_name, accounting_date,
1678: code_combination_id, cost_allocation_keyflex_id, currency_code,
1679: SUM(NVL(amount_dr,0)) amount_dr,
1680: SUM(NVL(amount_cr,0)) amount_cr

Line 1681: FROM pqh_gl_interface

1677: SELECT period_name, accounting_date,
1678: code_combination_id, cost_allocation_keyflex_id, currency_code,
1679: SUM(NVL(amount_dr,0)) amount_dr,
1680: SUM(NVL(amount_cr,0)) amount_cr
1681: FROM pqh_gl_interface
1682: WHERE budget_version_id IN (g_budget_version_id, NVL(g_last_posted_ver,0) )
1683: AND status IS NULL
1684: AND posting_date IS NULL
1685: AND posting_type_cd = 'BUDGET'

Line 1729: OPEN csr_pqh_gl_interface;

1725: -- insert into gl_bc_packets and do funds checking for each packet
1726:
1727: hr_utility.set_location('Inserting into GL_BC_PACKETS',10);
1728:
1729: OPEN csr_pqh_gl_interface;
1730: LOOP
1731: FETCH csr_pqh_gl_interface INTO l_period_name, l_accounting_date,
1732: l_code_combination_id, l_cost_allocation_keyflex_id, l_currency_code,
1733: l_amount_dr, l_amount_cr;

Line 1731: FETCH csr_pqh_gl_interface INTO l_period_name, l_accounting_date,

1727: hr_utility.set_location('Inserting into GL_BC_PACKETS',10);
1728:
1729: OPEN csr_pqh_gl_interface;
1730: LOOP
1731: FETCH csr_pqh_gl_interface INTO l_period_name, l_accounting_date,
1732: l_code_combination_id, l_cost_allocation_keyflex_id, l_currency_code,
1733: l_amount_dr, l_amount_cr;
1734: EXIT WHEN csr_pqh_gl_interface%NOTFOUND;
1735:

Line 1734: EXIT WHEN csr_pqh_gl_interface%NOTFOUND;

1730: LOOP
1731: FETCH csr_pqh_gl_interface INTO l_period_name, l_accounting_date,
1732: l_code_combination_id, l_cost_allocation_keyflex_id, l_currency_code,
1733: l_amount_dr, l_amount_cr;
1734: EXIT WHEN csr_pqh_gl_interface%NOTFOUND;
1735:
1736: -- Get Packet ID
1737: OPEN csr_packet_id;
1738: FETCH csr_packet_id INTO l_packet_id;

Line 1810: 3. Reverse unposted adjustment txns in pqh_gl_interface

1806: 1. Put the error message in pqh_process_log ( context : Period Name + CCID + currency code )
1807:
1808: 2. update all the budget_detail records which have this Period Name + CCID + currency code to ERROR ( gl_status)
1809:
1810: 3. Reverse unposted adjustment txns in pqh_gl_interface
1811:
1812: 4. Delete all unposted non-adjustment txns from pqh_gl_interface
1813: -----------------------------------------------------------------------------------------------------
1814:

Line 1812: 4. Delete all unposted non-adjustment txns from pqh_gl_interface

1808: 2. update all the budget_detail records which have this Period Name + CCID + currency code to ERROR ( gl_status)
1809:
1810: 3. Reverse unposted adjustment txns in pqh_gl_interface
1811:
1812: 4. Delete all unposted non-adjustment txns from pqh_gl_interface
1813: -----------------------------------------------------------------------------------------------------
1814:
1815: */
1816:

Line 1890: CLOSE csr_pqh_gl_interface;

1886:
1887:
1888:
1889: END LOOP;
1890: CLOSE csr_pqh_gl_interface;
1891:
1892: ELSE
1893: -- insert into gl_interface
1894: hr_utility.set_location('Inserting into GL_INTERFACE',200);

Line 1893: -- insert into gl_interface

1889: END LOOP;
1890: CLOSE csr_pqh_gl_interface;
1891:
1892: ELSE
1893: -- insert into gl_interface
1894: hr_utility.set_location('Inserting into GL_INTERFACE',200);
1895:
1896: OPEN csr_pqh_gl_interface;
1897: LOOP

Line 1894: hr_utility.set_location('Inserting into GL_INTERFACE',200);

1890: CLOSE csr_pqh_gl_interface;
1891:
1892: ELSE
1893: -- insert into gl_interface
1894: hr_utility.set_location('Inserting into GL_INTERFACE',200);
1895:
1896: OPEN csr_pqh_gl_interface;
1897: LOOP
1898: FETCH csr_pqh_gl_interface INTO l_period_name, l_accounting_date,

Line 1896: OPEN csr_pqh_gl_interface;

1892: ELSE
1893: -- insert into gl_interface
1894: hr_utility.set_location('Inserting into GL_INTERFACE',200);
1895:
1896: OPEN csr_pqh_gl_interface;
1897: LOOP
1898: FETCH csr_pqh_gl_interface INTO l_period_name, l_accounting_date,
1899: l_code_combination_id, l_cost_allocation_keyflex_id, l_currency_code,
1900: l_amount_dr, l_amount_cr;

Line 1898: FETCH csr_pqh_gl_interface INTO l_period_name, l_accounting_date,

1894: hr_utility.set_location('Inserting into GL_INTERFACE',200);
1895:
1896: OPEN csr_pqh_gl_interface;
1897: LOOP
1898: FETCH csr_pqh_gl_interface INTO l_period_name, l_accounting_date,
1899: l_code_combination_id, l_cost_allocation_keyflex_id, l_currency_code,
1900: l_amount_dr, l_amount_cr;
1901: EXIT WHEN csr_pqh_gl_interface%NOTFOUND;
1902:

Line 1901: EXIT WHEN csr_pqh_gl_interface%NOTFOUND;

1897: LOOP
1898: FETCH csr_pqh_gl_interface INTO l_period_name, l_accounting_date,
1899: l_code_combination_id, l_cost_allocation_keyflex_id, l_currency_code,
1900: l_amount_dr, l_amount_cr;
1901: EXIT WHEN csr_pqh_gl_interface%NOTFOUND;
1902:
1903: INSERT INTO gl_interface
1904: (status,
1905: set_of_books_id,

Line 1903: INSERT INTO gl_interface

1899: l_code_combination_id, l_cost_allocation_keyflex_id, l_currency_code,
1900: l_amount_dr, l_amount_cr;
1901: EXIT WHEN csr_pqh_gl_interface%NOTFOUND;
1902:
1903: INSERT INTO gl_interface
1904: (status,
1905: set_of_books_id,
1906: user_je_source_name,
1907: user_je_category_name,

Line 1941: CLOSE csr_pqh_gl_interface;

1937: g_budget_version_id,
1938: l_cost_allocation_keyflex_id);
1939:
1940: END LOOP;
1941: CLOSE csr_pqh_gl_interface;
1942:
1943: END IF;
1944:
1945:

Line 1963: and update the pqh_gl_interface table

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
1967: */

Line 2036: -- update the pqh_gl_interface table

2032: hr_utility.set_location('Budget Details Error Count : '||l_count, 100);
2033:
2034: -- mvankada
2035: IF pqh_gl_posting.chk_budget_details(p_budget_version_id => g_budget_version_id ) = 'Y' THEN
2036: -- update the pqh_gl_interface table
2037: UPDATE pqh_gl_interface
2038: SET posting_date = sysdate,
2039: status = 'POST'
2040: WHERE budget_version_id = g_budget_version_id

Line 2037: UPDATE pqh_gl_interface

2033:
2034: -- mvankada
2035: IF pqh_gl_posting.chk_budget_details(p_budget_version_id => g_budget_version_id ) = 'Y' THEN
2036: -- update the pqh_gl_interface table
2037: UPDATE pqh_gl_interface
2038: SET posting_date = sysdate,
2039: status = 'POST'
2040: WHERE budget_version_id = g_budget_version_id
2041: AND posting_type_cd = 'BUDGET'

Line 2045: -- update the pqh_gl_interface table for last posted version

2041: AND posting_type_cd = 'BUDGET'
2042: AND posting_date IS NULL
2043: AND status IS NULL;
2044:
2045: -- update the pqh_gl_interface table for last posted version
2046: UPDATE pqh_gl_interface
2047: SET posting_date = sysdate,
2048: status = 'POST'
2049: WHERE budget_version_id = NVL(g_last_posted_ver,0)

Line 2046: UPDATE pqh_gl_interface

2042: AND posting_date IS NULL
2043: AND status IS NULL;
2044:
2045: -- update the pqh_gl_interface table for last posted version
2046: UPDATE pqh_gl_interface
2047: SET posting_date = sysdate,
2048: status = 'POST'
2049: WHERE budget_version_id = NVL(g_last_posted_ver,0)
2050: AND posting_type_cd = 'BUDGET'

Line 3042: p_period_name IN pqh_gl_interface.period_name%TYPE,

3038:
3039: --------------------------------------------------------------------------------------------------------------
3040: PROCEDURE reverse_budget_details
3041: (
3042: p_period_name IN pqh_gl_interface.period_name%TYPE,
3043: p_currency_code IN pqh_gl_interface.currency_code%TYPE,
3044: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE
3045: ) IS
3046: /*

Line 3043: p_currency_code IN pqh_gl_interface.currency_code%TYPE,

3039: --------------------------------------------------------------------------------------------------------------
3040: PROCEDURE reverse_budget_details
3041: (
3042: p_period_name IN pqh_gl_interface.period_name%TYPE,
3043: p_currency_code IN pqh_gl_interface.currency_code%TYPE,
3044: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE
3045: ) IS
3046: /*
3047: This procedure will be called if the GL fund checker failed. This procedure will do the following :

Line 3044: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE

3040: PROCEDURE reverse_budget_details
3041: (
3042: p_period_name IN pqh_gl_interface.period_name%TYPE,
3043: p_currency_code IN pqh_gl_interface.currency_code%TYPE,
3044: p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE
3045: ) IS
3046: /*
3047: This procedure will be called if the GL fund checker failed. This procedure will do the following :
3048:

Line 3051: 2. Reverse unposted adjustment txns in pqh_gl_interface

3047: This procedure will be called if the GL fund checker failed. This procedure will do the following :
3048:
3049: 1. update all the budget_detail records which have this Period Name + CCID + currency code to ERROR ( gl_status)
3050:
3051: 2. Reverse unposted adjustment txns in pqh_gl_interface
3052:
3053: 3. Delete all unposted non-adjustment txns from pqh_gl_interface
3054:
3055: Note : If a budget detail record has 4 periods and there was a error in 4th period , we have no control on the 1st three

Line 3053: 3. Delete all unposted non-adjustment txns from pqh_gl_interface

3049: 1. update all the budget_detail records which have this Period Name + CCID + currency code to ERROR ( gl_status)
3050:
3051: 2. Reverse unposted adjustment txns in pqh_gl_interface
3052:
3053: 3. Delete all unposted non-adjustment txns from pqh_gl_interface
3054:
3055: Note : If a budget detail record has 4 periods and there was a error in 4th period , we have no control on the 1st three
3056: as they have already been Approved by funs checker program and would have already been posted to GL.
3057:

Line 3064: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

3060: --
3061: -- local variables
3062: --
3063: l_proc varchar2(72) := g_package||'reverse_budget_details';
3064: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
3065:
3066:
3067: CURSOR csr_adj IS
3068: SELECT *

Line 3069: FROM pqh_gl_interface

3065:
3066:
3067: CURSOR csr_adj IS
3068: SELECT *
3069: FROM pqh_gl_interface
3070: WHERE budget_version_id = g_budget_version_id
3071: AND posting_type_cd = 'BUDGET'
3072: AND period_name = p_period_name
3073: AND currency_code = p_currency_code

Line 3087: FETCH csr_adj INTO l_pqh_gl_interface_rec;

3083:
3084: -- reverse the adjustment transactions
3085: OPEN csr_adj;
3086: LOOP
3087: FETCH csr_adj INTO l_pqh_gl_interface_rec;
3088: EXIT WHEN csr_adj%NOTFOUND;
3089:
3090: -- update the amount_dr for the original record
3091: UPDATE pqh_gl_interface

Line 3091: UPDATE pqh_gl_interface

3087: FETCH csr_adj INTO l_pqh_gl_interface_rec;
3088: EXIT WHEN csr_adj%NOTFOUND;
3089:
3090: -- update the amount_dr for the original record
3091: UPDATE pqh_gl_interface
3092: SET amount_dr = NVL(amount_dr,0) -
3093: NVL(l_pqh_gl_interface_rec.amount_dr,0) +
3094: NVL(l_pqh_gl_interface_rec.amount_cr,0)
3095: WHERE budget_version_id = l_pqh_gl_interface_rec.budget_version_id

Line 3093: NVL(l_pqh_gl_interface_rec.amount_dr,0) +

3089:
3090: -- update the amount_dr for the original record
3091: UPDATE pqh_gl_interface
3092: SET amount_dr = NVL(amount_dr,0) -
3093: NVL(l_pqh_gl_interface_rec.amount_dr,0) +
3094: NVL(l_pqh_gl_interface_rec.amount_cr,0)
3095: WHERE budget_version_id = l_pqh_gl_interface_rec.budget_version_id
3096: AND budget_detail_id = l_pqh_gl_interface_rec.budget_detail_id
3097: AND posting_type_cd = 'BUDGET'

Line 3094: NVL(l_pqh_gl_interface_rec.amount_cr,0)

3090: -- update the amount_dr for the original record
3091: UPDATE pqh_gl_interface
3092: SET amount_dr = NVL(amount_dr,0) -
3093: NVL(l_pqh_gl_interface_rec.amount_dr,0) +
3094: NVL(l_pqh_gl_interface_rec.amount_cr,0)
3095: WHERE budget_version_id = l_pqh_gl_interface_rec.budget_version_id
3096: AND budget_detail_id = l_pqh_gl_interface_rec.budget_detail_id
3097: AND posting_type_cd = 'BUDGET'
3098: AND period_name = l_pqh_gl_interface_rec.period_name

Line 3095: WHERE budget_version_id = l_pqh_gl_interface_rec.budget_version_id

3091: UPDATE pqh_gl_interface
3092: SET amount_dr = NVL(amount_dr,0) -
3093: NVL(l_pqh_gl_interface_rec.amount_dr,0) +
3094: NVL(l_pqh_gl_interface_rec.amount_cr,0)
3095: WHERE budget_version_id = l_pqh_gl_interface_rec.budget_version_id
3096: AND budget_detail_id = l_pqh_gl_interface_rec.budget_detail_id
3097: AND posting_type_cd = 'BUDGET'
3098: AND period_name = l_pqh_gl_interface_rec.period_name
3099: AND currency_code = l_pqh_gl_interface_rec.currency_code

Line 3096: AND budget_detail_id = l_pqh_gl_interface_rec.budget_detail_id

3092: SET amount_dr = NVL(amount_dr,0) -
3093: NVL(l_pqh_gl_interface_rec.amount_dr,0) +
3094: NVL(l_pqh_gl_interface_rec.amount_cr,0)
3095: WHERE budget_version_id = l_pqh_gl_interface_rec.budget_version_id
3096: AND budget_detail_id = l_pqh_gl_interface_rec.budget_detail_id
3097: AND posting_type_cd = 'BUDGET'
3098: AND period_name = l_pqh_gl_interface_rec.period_name
3099: AND currency_code = l_pqh_gl_interface_rec.currency_code
3100: AND code_combination_id = l_pqh_gl_interface_rec.code_combination_id

Line 3098: AND period_name = l_pqh_gl_interface_rec.period_name

3094: NVL(l_pqh_gl_interface_rec.amount_cr,0)
3095: WHERE budget_version_id = l_pqh_gl_interface_rec.budget_version_id
3096: AND budget_detail_id = l_pqh_gl_interface_rec.budget_detail_id
3097: AND posting_type_cd = 'BUDGET'
3098: AND period_name = l_pqh_gl_interface_rec.period_name
3099: AND currency_code = l_pqh_gl_interface_rec.currency_code
3100: AND code_combination_id = l_pqh_gl_interface_rec.code_combination_id
3101: AND NVL(adjustment_flag,'N') = 'N'
3102: AND status IS NOT NULL;

Line 3099: AND currency_code = l_pqh_gl_interface_rec.currency_code

3095: WHERE budget_version_id = l_pqh_gl_interface_rec.budget_version_id
3096: AND budget_detail_id = l_pqh_gl_interface_rec.budget_detail_id
3097: AND posting_type_cd = 'BUDGET'
3098: AND period_name = l_pqh_gl_interface_rec.period_name
3099: AND currency_code = l_pqh_gl_interface_rec.currency_code
3100: AND code_combination_id = l_pqh_gl_interface_rec.code_combination_id
3101: AND NVL(adjustment_flag,'N') = 'N'
3102: AND status IS NOT NULL;
3103:

Line 3100: AND code_combination_id = l_pqh_gl_interface_rec.code_combination_id

3096: AND budget_detail_id = l_pqh_gl_interface_rec.budget_detail_id
3097: AND posting_type_cd = 'BUDGET'
3098: AND period_name = l_pqh_gl_interface_rec.period_name
3099: AND currency_code = l_pqh_gl_interface_rec.currency_code
3100: AND code_combination_id = l_pqh_gl_interface_rec.code_combination_id
3101: AND NVL(adjustment_flag,'N') = 'N'
3102: AND status IS NOT NULL;
3103:
3104: END LOOP;

Line 3114: FROM pqh_gl_interface

3110: SET gl_status = 'ERROR'
3111: WHERE budget_detail_id IN
3112: (
3113: SELECT distinct budget_detail_id
3114: FROM pqh_gl_interface
3115: WHERE budget_version_id = g_budget_version_id
3116: AND posting_type_cd = 'BUDGET'
3117: AND period_name = p_period_name
3118: AND currency_code = p_currency_code

Line 3124: -- delete the unposted transactions from pqh_gl_interface

3120: AND status IS NULL
3121: AND posting_date IS NULL
3122: );
3123:
3124: -- delete the unposted transactions from pqh_gl_interface
3125:
3126: DELETE FROM pqh_gl_interface
3127: WHERE budget_version_id = g_budget_version_id
3128: AND period_name = p_period_name

Line 3126: DELETE FROM pqh_gl_interface

3122: );
3123:
3124: -- delete the unposted transactions from pqh_gl_interface
3125:
3126: DELETE FROM pqh_gl_interface
3127: WHERE budget_version_id = g_budget_version_id
3128: AND period_name = p_period_name
3129: AND currency_code = p_currency_code
3130: AND code_combination_id = p_code_combination_id

Line 3151: This procedure will check if the current budget_detail_id was already posted (exists in pqh_gl_interface)

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.
3153: This is done as the user might have changed the records with current budget_detail_id which were previously
3154: posted and not present in new records. For those records we need to unpost i.e reverse the transactions.
3155:

Line 3174: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

3170: --
3171: -- local variables
3172: --
3173: l_proc varchar2(72) := g_package||'build_old_bdgt_dtls_tab';
3174: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
3175: i BINARY_INTEGER :=1;
3176:
3177:
3178:

Line 3181: FROM pqh_gl_interface

3177:
3178:
3179: CURSOR csr_old_bdgt_dtls_rec IS
3180: SELECT *
3181: FROM pqh_gl_interface
3182: WHERE budget_version_id = g_budget_version_id
3183: AND budget_detail_id = p_budget_detail_id
3184: AND posting_type_cd = 'BUDGET'
3185: AND NVL(adjustment_flag,'N') = 'N'

Line 3197: FETCH csr_old_bdgt_dtls_rec INTO l_pqh_gl_interface_rec;

3193: hr_utility.set_location('Entering:'||l_proc, 5);
3194:
3195: OPEN csr_old_bdgt_dtls_rec;
3196: LOOP
3197: FETCH csr_old_bdgt_dtls_rec INTO l_pqh_gl_interface_rec;
3198: EXIT WHEN csr_old_bdgt_dtls_rec%NOTFOUND;
3199:
3200: g_old_bdgt_dtls_tab(i).budget_version_id := g_budget_version_id;
3201: g_old_bdgt_dtls_tab(i).budget_detail_id := p_budget_detail_id;

Line 3202: g_old_bdgt_dtls_tab(i).period_name := l_pqh_gl_interface_rec.period_name;

3198: EXIT WHEN csr_old_bdgt_dtls_rec%NOTFOUND;
3199:
3200: g_old_bdgt_dtls_tab(i).budget_version_id := g_budget_version_id;
3201: g_old_bdgt_dtls_tab(i).budget_detail_id := p_budget_detail_id;
3202: g_old_bdgt_dtls_tab(i).period_name := l_pqh_gl_interface_rec.period_name;
3203: g_old_bdgt_dtls_tab(i).accounting_date := l_pqh_gl_interface_rec.accounting_date;
3204: g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id := l_pqh_gl_interface_rec.cost_allocation_keyflex_id;
3205: g_old_bdgt_dtls_tab(i).code_combination_id := l_pqh_gl_interface_rec.code_combination_id;
3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;

Line 3203: g_old_bdgt_dtls_tab(i).accounting_date := l_pqh_gl_interface_rec.accounting_date;

3199:
3200: g_old_bdgt_dtls_tab(i).budget_version_id := g_budget_version_id;
3201: g_old_bdgt_dtls_tab(i).budget_detail_id := p_budget_detail_id;
3202: g_old_bdgt_dtls_tab(i).period_name := l_pqh_gl_interface_rec.period_name;
3203: g_old_bdgt_dtls_tab(i).accounting_date := l_pqh_gl_interface_rec.accounting_date;
3204: g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id := l_pqh_gl_interface_rec.cost_allocation_keyflex_id;
3205: g_old_bdgt_dtls_tab(i).code_combination_id := l_pqh_gl_interface_rec.code_combination_id;
3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;
3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;

Line 3204: g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id := l_pqh_gl_interface_rec.cost_allocation_keyflex_id;

3200: g_old_bdgt_dtls_tab(i).budget_version_id := g_budget_version_id;
3201: g_old_bdgt_dtls_tab(i).budget_detail_id := p_budget_detail_id;
3202: g_old_bdgt_dtls_tab(i).period_name := l_pqh_gl_interface_rec.period_name;
3203: g_old_bdgt_dtls_tab(i).accounting_date := l_pqh_gl_interface_rec.accounting_date;
3204: g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id := l_pqh_gl_interface_rec.cost_allocation_keyflex_id;
3205: g_old_bdgt_dtls_tab(i).code_combination_id := l_pqh_gl_interface_rec.code_combination_id;
3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;
3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;
3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;

Line 3205: g_old_bdgt_dtls_tab(i).code_combination_id := l_pqh_gl_interface_rec.code_combination_id;

3201: g_old_bdgt_dtls_tab(i).budget_detail_id := p_budget_detail_id;
3202: g_old_bdgt_dtls_tab(i).period_name := l_pqh_gl_interface_rec.period_name;
3203: g_old_bdgt_dtls_tab(i).accounting_date := l_pqh_gl_interface_rec.accounting_date;
3204: g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id := l_pqh_gl_interface_rec.cost_allocation_keyflex_id;
3205: g_old_bdgt_dtls_tab(i).code_combination_id := l_pqh_gl_interface_rec.code_combination_id;
3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;
3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;
3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;
3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;

Line 3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;

3202: g_old_bdgt_dtls_tab(i).period_name := l_pqh_gl_interface_rec.period_name;
3203: g_old_bdgt_dtls_tab(i).accounting_date := l_pqh_gl_interface_rec.accounting_date;
3204: g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id := l_pqh_gl_interface_rec.cost_allocation_keyflex_id;
3205: g_old_bdgt_dtls_tab(i).code_combination_id := l_pqh_gl_interface_rec.code_combination_id;
3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;
3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;
3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;
3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;
3210: g_old_bdgt_dtls_tab(i).organization_id := l_pqh_gl_interface_rec.organization_id;

Line 3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;

3203: g_old_bdgt_dtls_tab(i).accounting_date := l_pqh_gl_interface_rec.accounting_date;
3204: g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id := l_pqh_gl_interface_rec.cost_allocation_keyflex_id;
3205: g_old_bdgt_dtls_tab(i).code_combination_id := l_pqh_gl_interface_rec.code_combination_id;
3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;
3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;
3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;
3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;
3210: g_old_bdgt_dtls_tab(i).organization_id := l_pqh_gl_interface_rec.organization_id;
3211: g_old_bdgt_dtls_tab(i).currency_code := l_pqh_gl_interface_rec.currency_code;

Line 3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;

3204: g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id := l_pqh_gl_interface_rec.cost_allocation_keyflex_id;
3205: g_old_bdgt_dtls_tab(i).code_combination_id := l_pqh_gl_interface_rec.code_combination_id;
3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;
3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;
3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;
3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;
3210: g_old_bdgt_dtls_tab(i).organization_id := l_pqh_gl_interface_rec.organization_id;
3211: g_old_bdgt_dtls_tab(i).currency_code := l_pqh_gl_interface_rec.currency_code;
3212: g_old_bdgt_dtls_tab(i).amount_dr := l_pqh_gl_interface_rec.amount_dr;

Line 3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;

3205: g_old_bdgt_dtls_tab(i).code_combination_id := l_pqh_gl_interface_rec.code_combination_id;
3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;
3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;
3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;
3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;
3210: g_old_bdgt_dtls_tab(i).organization_id := l_pqh_gl_interface_rec.organization_id;
3211: g_old_bdgt_dtls_tab(i).currency_code := l_pqh_gl_interface_rec.currency_code;
3212: g_old_bdgt_dtls_tab(i).amount_dr := l_pqh_gl_interface_rec.amount_dr;
3213: g_old_bdgt_dtls_tab(i).amount_cr := l_pqh_gl_interface_rec.amount_cr;

Line 3210: g_old_bdgt_dtls_tab(i).organization_id := l_pqh_gl_interface_rec.organization_id;

3206: g_old_bdgt_dtls_tab(i).project_id := l_pqh_gl_interface_rec.project_id;
3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;
3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;
3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;
3210: g_old_bdgt_dtls_tab(i).organization_id := l_pqh_gl_interface_rec.organization_id;
3211: g_old_bdgt_dtls_tab(i).currency_code := l_pqh_gl_interface_rec.currency_code;
3212: g_old_bdgt_dtls_tab(i).amount_dr := l_pqh_gl_interface_rec.amount_dr;
3213: g_old_bdgt_dtls_tab(i).amount_cr := l_pqh_gl_interface_rec.amount_cr;
3214: g_old_bdgt_dtls_tab(i).reverse_flag := 'Y';

Line 3211: g_old_bdgt_dtls_tab(i).currency_code := l_pqh_gl_interface_rec.currency_code;

3207: g_old_bdgt_dtls_tab(i).task_id := l_pqh_gl_interface_rec.task_id;
3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;
3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;
3210: g_old_bdgt_dtls_tab(i).organization_id := l_pqh_gl_interface_rec.organization_id;
3211: g_old_bdgt_dtls_tab(i).currency_code := l_pqh_gl_interface_rec.currency_code;
3212: g_old_bdgt_dtls_tab(i).amount_dr := l_pqh_gl_interface_rec.amount_dr;
3213: g_old_bdgt_dtls_tab(i).amount_cr := l_pqh_gl_interface_rec.amount_cr;
3214: g_old_bdgt_dtls_tab(i).reverse_flag := 'Y';
3215:

Line 3212: g_old_bdgt_dtls_tab(i).amount_dr := l_pqh_gl_interface_rec.amount_dr;

3208: g_old_bdgt_dtls_tab(i).award_id := l_pqh_gl_interface_rec.award_id;
3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;
3210: g_old_bdgt_dtls_tab(i).organization_id := l_pqh_gl_interface_rec.organization_id;
3211: g_old_bdgt_dtls_tab(i).currency_code := l_pqh_gl_interface_rec.currency_code;
3212: g_old_bdgt_dtls_tab(i).amount_dr := l_pqh_gl_interface_rec.amount_dr;
3213: g_old_bdgt_dtls_tab(i).amount_cr := l_pqh_gl_interface_rec.amount_cr;
3214: g_old_bdgt_dtls_tab(i).reverse_flag := 'Y';
3215:
3216: i := i + 1;

Line 3213: g_old_bdgt_dtls_tab(i).amount_cr := l_pqh_gl_interface_rec.amount_cr;

3209: g_old_bdgt_dtls_tab(i).expenditure_type := l_pqh_gl_interface_rec.expenditure_type;
3210: g_old_bdgt_dtls_tab(i).organization_id := l_pqh_gl_interface_rec.organization_id;
3211: g_old_bdgt_dtls_tab(i).currency_code := l_pqh_gl_interface_rec.currency_code;
3212: g_old_bdgt_dtls_tab(i).amount_dr := l_pqh_gl_interface_rec.amount_dr;
3213: g_old_bdgt_dtls_tab(i).amount_cr := l_pqh_gl_interface_rec.amount_cr;
3214: g_old_bdgt_dtls_tab(i).reverse_flag := 'Y';
3215:
3216: i := i + 1;
3217:

Line 3320: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

3316: --
3317: -- local variables
3318: --
3319: l_proc varchar2(72) := g_package||'reverse_old_bdgt_dtls_tab';
3320: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
3321:
3322: CURSOR csr_pqh_gl_interface(p_period_name IN varchar2,
3323: p_code_combination_id IN number,
3324: p_currency_code IN varchar2) IS

Line 3322: CURSOR csr_pqh_gl_interface(p_period_name IN varchar2,

3318: --
3319: l_proc varchar2(72) := g_package||'reverse_old_bdgt_dtls_tab';
3320: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
3321:
3322: CURSOR csr_pqh_gl_interface(p_period_name IN varchar2,
3323: p_code_combination_id IN number,
3324: p_currency_code IN varchar2) IS
3325: SELECT *
3326: FROM pqh_gl_interface

Line 3326: FROM pqh_gl_interface

3322: CURSOR csr_pqh_gl_interface(p_period_name IN varchar2,
3323: p_code_combination_id IN number,
3324: p_currency_code IN varchar2) IS
3325: SELECT *
3326: FROM pqh_gl_interface
3327: WHERE budget_version_id = g_budget_version_id
3328: AND budget_detail_id = p_budget_detail_id
3329: AND period_name = p_period_name
3330: AND code_combination_id = p_code_combination_id

Line 3346: FROM pqh_gl_interface

3342: p_award_id IN NUMBER,
3343: p_expenditure_type IN varchar2,
3344: p_organization_id IN NUMBER) IS
3345: SELECT *
3346: FROM pqh_gl_interface
3347: WHERE budget_version_id = g_budget_version_id
3348: AND budget_detail_id = p_budget_detail_id
3349: AND period_name = p_period_name
3350: AND project_id = p_project_id

Line 3384: OPEN csr_pqh_gl_interface(p_period_name => g_old_bdgt_dtls_tab(i).period_name,

3380: hr_utility.set_location('code_combination_id '||g_old_bdgt_dtls_tab(i).code_combination_id,8);
3381:
3382: -- update the record and reverse the txn
3383: IF (g_old_bdgt_dtls_tab(i).code_combination_id is not null) THEN
3384: OPEN csr_pqh_gl_interface(p_period_name => g_old_bdgt_dtls_tab(i).period_name,
3385: p_code_combination_id => g_old_bdgt_dtls_tab(i).code_combination_id,
3386: p_currency_code => g_old_bdgt_dtls_tab(i).currency_code) ;
3387: FETCH csr_pqh_gl_interface INTO l_pqh_gl_interface_rec;
3388:

Line 3387: FETCH csr_pqh_gl_interface INTO l_pqh_gl_interface_rec;

3383: IF (g_old_bdgt_dtls_tab(i).code_combination_id is not null) THEN
3384: OPEN csr_pqh_gl_interface(p_period_name => g_old_bdgt_dtls_tab(i).period_name,
3385: p_code_combination_id => g_old_bdgt_dtls_tab(i).code_combination_id,
3386: p_currency_code => g_old_bdgt_dtls_tab(i).currency_code) ;
3387: FETCH csr_pqh_gl_interface INTO l_pqh_gl_interface_rec;
3388:
3389: hr_utility.set_location('Fetched record ',10);
3390:
3391: -- update the pqh_gl_interface table

Line 3391: -- update the pqh_gl_interface table

3387: FETCH csr_pqh_gl_interface INTO l_pqh_gl_interface_rec;
3388:
3389: hr_utility.set_location('Fetched record ',10);
3390:
3391: -- update the pqh_gl_interface table
3392: UPDATE pqh_gl_interface
3393: SET amount_dr = 0
3394: WHERE CURRENT OF csr_pqh_gl_interface;
3395:

Line 3392: UPDATE pqh_gl_interface

3388:
3389: hr_utility.set_location('Fetched record ',10);
3390:
3391: -- update the pqh_gl_interface table
3392: UPDATE pqh_gl_interface
3393: SET amount_dr = 0
3394: WHERE CURRENT OF csr_pqh_gl_interface;
3395:
3396: hr_utility.set_location('Updated pqh_gl_interface ',15);

Line 3394: WHERE CURRENT OF csr_pqh_gl_interface;

3390:
3391: -- update the pqh_gl_interface table
3392: UPDATE pqh_gl_interface
3393: SET amount_dr = 0
3394: WHERE CURRENT OF csr_pqh_gl_interface;
3395:
3396: hr_utility.set_location('Updated pqh_gl_interface ',15);
3397: hr_utility.set_location('Creating reverse txn in pqh_gl_interface ',16);
3398:

Line 3396: hr_utility.set_location('Updated pqh_gl_interface ',15);

3392: UPDATE pqh_gl_interface
3393: SET amount_dr = 0
3394: WHERE CURRENT OF csr_pqh_gl_interface;
3395:
3396: hr_utility.set_location('Updated pqh_gl_interface ',15);
3397: hr_utility.set_location('Creating reverse txn in pqh_gl_interface ',16);
3398:
3399: -- create a reverse transaction for this amount_dr
3400:

Line 3397: hr_utility.set_location('Creating reverse txn in pqh_gl_interface ',16);

3393: SET amount_dr = 0
3394: WHERE CURRENT OF csr_pqh_gl_interface;
3395:
3396: hr_utility.set_location('Updated pqh_gl_interface ',15);
3397: hr_utility.set_location('Creating reverse txn in pqh_gl_interface ',16);
3398:
3399: -- create a reverse transaction for this amount_dr
3400:
3401: INSERT INTO pqh_gl_interface

Line 3401: INSERT INTO pqh_gl_interface

3397: hr_utility.set_location('Creating reverse txn in pqh_gl_interface ',16);
3398:
3399: -- create a reverse transaction for this amount_dr
3400:
3401: INSERT INTO pqh_gl_interface
3402: (
3403: gl_interface_id,
3404: budget_version_id,
3405: budget_detail_id,

Line 3403: gl_interface_id,

3399: -- create a reverse transaction for this amount_dr
3400:
3401: INSERT INTO pqh_gl_interface
3402: (
3403: gl_interface_id,
3404: budget_version_id,
3405: budget_detail_id,
3406: period_name,
3407: accounting_date,

Line 3420: pqh_gl_interface_s.nextval,

3416: posting_type_cd
3417: )
3418: VALUES
3419: (
3420: pqh_gl_interface_s.nextval,
3421: g_budget_version_id,
3422: p_budget_detail_id,
3423: g_old_bdgt_dtls_tab(i).period_name,
3424: g_old_bdgt_dtls_tab(i).accounting_date,

Line 3428: NVL(l_pqh_gl_interface_rec.amount_dr,0),

3424: g_old_bdgt_dtls_tab(i).accounting_date,
3425: g_old_bdgt_dtls_tab(i).code_combination_id,
3426: g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id,
3427: 0,
3428: NVL(l_pqh_gl_interface_rec.amount_dr,0),
3429: g_old_bdgt_dtls_tab(i).currency_code,
3430: null,
3431: 'Y',
3432: null,

Line 3438: CLOSE csr_pqh_gl_interface;

3434: );
3435:
3436: hr_utility.set_location('Created a reverse txn ',20);
3437:
3438: CLOSE csr_pqh_gl_interface;
3439:
3440: Else
3441: OPEN csr_pqh_gms_interface ( p_period_name => g_old_bdgt_dtls_tab(i).period_name,
3442: p_project_id => g_old_bdgt_dtls_tab(i).project_id,

Line 3447: FETCH csr_pqh_gms_interface INTO l_pqh_gl_interface_rec;

3443: p_task_id => g_old_bdgt_dtls_tab(i).task_id,
3444: p_award_id => g_old_bdgt_dtls_tab(i).award_id,
3445: p_expenditure_type => g_old_bdgt_dtls_tab(i).expenditure_type,
3446: p_organization_id => g_old_bdgt_dtls_tab(i).organization_id);
3447: FETCH csr_pqh_gms_interface INTO l_pqh_gl_interface_rec;
3448:
3449: hr_utility.set_location('Fetched record ',10);
3450:
3451: -- update the pqh_gl_interface table

Line 3451: -- update the pqh_gl_interface table

3447: FETCH csr_pqh_gms_interface INTO l_pqh_gl_interface_rec;
3448:
3449: hr_utility.set_location('Fetched record ',10);
3450:
3451: -- update the pqh_gl_interface table
3452: UPDATE pqh_gl_interface
3453: SET amount_dr = 0
3454: WHERE CURRENT OF csr_pqh_gms_interface;
3455:

Line 3452: UPDATE pqh_gl_interface

3448:
3449: hr_utility.set_location('Fetched record ',10);
3450:
3451: -- update the pqh_gl_interface table
3452: UPDATE pqh_gl_interface
3453: SET amount_dr = 0
3454: WHERE CURRENT OF csr_pqh_gms_interface;
3455:
3456: hr_utility.set_location('Updated pqh_gl_interface ',15);

Line 3456: hr_utility.set_location('Updated pqh_gl_interface ',15);

3452: UPDATE pqh_gl_interface
3453: SET amount_dr = 0
3454: WHERE CURRENT OF csr_pqh_gms_interface;
3455:
3456: hr_utility.set_location('Updated pqh_gl_interface ',15);
3457: hr_utility.set_location('Creating reverse txn in pqh_gl_interface ',16);
3458:
3459: -- create a reverse transaction for this amount_dr
3460:

Line 3457: hr_utility.set_location('Creating reverse txn in pqh_gl_interface ',16);

3453: SET amount_dr = 0
3454: WHERE CURRENT OF csr_pqh_gms_interface;
3455:
3456: hr_utility.set_location('Updated pqh_gl_interface ',15);
3457: hr_utility.set_location('Creating reverse txn in pqh_gl_interface ',16);
3458:
3459: -- create a reverse transaction for this amount_dr
3460:
3461: INSERT INTO pqh_gl_interface

Line 3461: INSERT INTO pqh_gl_interface

3457: hr_utility.set_location('Creating reverse txn in pqh_gl_interface ',16);
3458:
3459: -- create a reverse transaction for this amount_dr
3460:
3461: INSERT INTO pqh_gl_interface
3462: (
3463: gl_interface_id,
3464: budget_version_id,
3465: budget_detail_id,

Line 3463: gl_interface_id,

3459: -- create a reverse transaction for this amount_dr
3460:
3461: INSERT INTO pqh_gl_interface
3462: (
3463: gl_interface_id,
3464: budget_version_id,
3465: budget_detail_id,
3466: period_name,
3467: project_id,

Line 3482: pqh_gl_interface_s.nextval,

3478: posting_type_cd
3479: )
3480: VALUES
3481: (
3482: pqh_gl_interface_s.nextval,
3483: g_budget_version_id,
3484: p_budget_detail_id,
3485: g_old_bdgt_dtls_tab(i).period_name,
3486: g_old_bdgt_dtls_tab(i).project_id,

Line 3492: NVL(l_pqh_gl_interface_rec.amount_dr,0),

3488: g_old_bdgt_dtls_tab(i).award_id,
3489: g_old_bdgt_dtls_tab(i).expenditure_type,
3490: g_old_bdgt_dtls_tab(i).organization_id,
3491: 0,
3492: NVL(l_pqh_gl_interface_rec.amount_dr,0),
3493: null,
3494: 'Y',
3495: null,
3496: g_old_bdgt_dtls_tab(i).currency_code,

Line 4030: budget_version_id and create reverse txns for this from the pqh_gl_interface table.

4026: We check if the current budget_version_id has TRANSFERED_TO_GL_FLAG = 'Y' ,
4027: If Yes => this is the last posted version and the user is doing adjustments on the version.
4028: We don't do anything in this case as our current code takes care of adjustments
4029: If No => the last posted version is different then the current version. So we get the last posted
4030: budget_version_id and create reverse txns for this from the pqh_gl_interface table.
4031: We will also update the following :
4032: Budget Version table :
4033: For last Posted Version :
4034: TRANSFERED_TO_GL_FLAG for the last posted version to 'N '

Line 4054: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

4050: -- local variables
4051: --
4052: l_proc varchar2(72) := g_package||' .reverse_prev_posted_version';
4053:
4054: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
4055:
4056: CURSOR csr_last_posted_ver IS
4057: SELECT budget_version_id
4058: FROM pqh_budget_versions

Line 4064: FROM pqh_gl_interface

4060: AND NVL(transfered_to_gl_flag,'N') = 'Y';
4061:
4062: CURSOR csr_unpost_version (p_budget_version_id IN number )IS
4063: SELECT *
4064: FROM pqh_gl_interface
4065: WHERE budget_version_id = p_budget_version_id
4066: AND NVL(adjustment_flag,'N') = 'N'
4067: AND posting_type_cd = 'BUDGET'
4068: AND status IS NOT NULL

Line 4089: FETCH csr_unpost_version INTO l_pqh_gl_interface_rec;

4085: IF NVL(g_last_posted_ver,0) <> g_budget_version_id THEN
4086:
4087: OPEN csr_unpost_version(p_budget_version_id => g_last_posted_ver);
4088: LOOP
4089: FETCH csr_unpost_version INTO l_pqh_gl_interface_rec;
4090: EXIT WHEN csr_unpost_version%NOTFOUND;
4091:
4092: -- update the current record
4093: UPDATE pqh_gl_interface

Line 4093: UPDATE pqh_gl_interface

4089: FETCH csr_unpost_version INTO l_pqh_gl_interface_rec;
4090: EXIT WHEN csr_unpost_version%NOTFOUND;
4091:
4092: -- update the current record
4093: UPDATE pqh_gl_interface
4094: SET amount_dr = 0
4095: WHERE CURRENT OF csr_unpost_version;
4096:
4097: -- create the reverse txn

Line 4098: INSERT INTO pqh_gl_interface

4094: SET amount_dr = 0
4095: WHERE CURRENT OF csr_unpost_version;
4096:
4097: -- create the reverse txn
4098: INSERT INTO pqh_gl_interface
4099: (
4100: gl_interface_id,
4101: budget_version_id,
4102: budget_detail_id,

Line 4100: gl_interface_id,

4096:
4097: -- create the reverse txn
4098: INSERT INTO pqh_gl_interface
4099: (
4100: gl_interface_id,
4101: budget_version_id,
4102: budget_detail_id,
4103: period_name,
4104: accounting_date,

Line 4122: pqh_gl_interface_s.nextval,

4118: posting_type_cd
4119: )
4120: VALUES
4121: (
4122: pqh_gl_interface_s.nextval,
4123: g_last_posted_ver,
4124: l_pqh_gl_interface_rec.budget_detail_id,
4125: l_pqh_gl_interface_rec.period_name,
4126: l_pqh_gl_interface_rec.accounting_date,

Line 4124: l_pqh_gl_interface_rec.budget_detail_id,

4120: VALUES
4121: (
4122: pqh_gl_interface_s.nextval,
4123: g_last_posted_ver,
4124: l_pqh_gl_interface_rec.budget_detail_id,
4125: l_pqh_gl_interface_rec.period_name,
4126: l_pqh_gl_interface_rec.accounting_date,
4127: l_pqh_gl_interface_rec.code_combination_id,
4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,

Line 4125: l_pqh_gl_interface_rec.period_name,

4121: (
4122: pqh_gl_interface_s.nextval,
4123: g_last_posted_ver,
4124: l_pqh_gl_interface_rec.budget_detail_id,
4125: l_pqh_gl_interface_rec.period_name,
4126: l_pqh_gl_interface_rec.accounting_date,
4127: l_pqh_gl_interface_rec.code_combination_id,
4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4129: l_pqh_gl_interface_rec.project_id,

Line 4126: l_pqh_gl_interface_rec.accounting_date,

4122: pqh_gl_interface_s.nextval,
4123: g_last_posted_ver,
4124: l_pqh_gl_interface_rec.budget_detail_id,
4125: l_pqh_gl_interface_rec.period_name,
4126: l_pqh_gl_interface_rec.accounting_date,
4127: l_pqh_gl_interface_rec.code_combination_id,
4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4129: l_pqh_gl_interface_rec.project_id,
4130: l_pqh_gl_interface_rec.task_id,

Line 4127: l_pqh_gl_interface_rec.code_combination_id,

4123: g_last_posted_ver,
4124: l_pqh_gl_interface_rec.budget_detail_id,
4125: l_pqh_gl_interface_rec.period_name,
4126: l_pqh_gl_interface_rec.accounting_date,
4127: l_pqh_gl_interface_rec.code_combination_id,
4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4129: l_pqh_gl_interface_rec.project_id,
4130: l_pqh_gl_interface_rec.task_id,
4131: l_pqh_gl_interface_rec.award_id,

Line 4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,

4124: l_pqh_gl_interface_rec.budget_detail_id,
4125: l_pqh_gl_interface_rec.period_name,
4126: l_pqh_gl_interface_rec.accounting_date,
4127: l_pqh_gl_interface_rec.code_combination_id,
4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4129: l_pqh_gl_interface_rec.project_id,
4130: l_pqh_gl_interface_rec.task_id,
4131: l_pqh_gl_interface_rec.award_id,
4132: l_pqh_gl_interface_rec.expenditure_type,

Line 4129: l_pqh_gl_interface_rec.project_id,

4125: l_pqh_gl_interface_rec.period_name,
4126: l_pqh_gl_interface_rec.accounting_date,
4127: l_pqh_gl_interface_rec.code_combination_id,
4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4129: l_pqh_gl_interface_rec.project_id,
4130: l_pqh_gl_interface_rec.task_id,
4131: l_pqh_gl_interface_rec.award_id,
4132: l_pqh_gl_interface_rec.expenditure_type,
4133: l_pqh_gl_interface_rec.organization_id,

Line 4130: l_pqh_gl_interface_rec.task_id,

4126: l_pqh_gl_interface_rec.accounting_date,
4127: l_pqh_gl_interface_rec.code_combination_id,
4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4129: l_pqh_gl_interface_rec.project_id,
4130: l_pqh_gl_interface_rec.task_id,
4131: l_pqh_gl_interface_rec.award_id,
4132: l_pqh_gl_interface_rec.expenditure_type,
4133: l_pqh_gl_interface_rec.organization_id,
4134: 0,

Line 4131: l_pqh_gl_interface_rec.award_id,

4127: l_pqh_gl_interface_rec.code_combination_id,
4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4129: l_pqh_gl_interface_rec.project_id,
4130: l_pqh_gl_interface_rec.task_id,
4131: l_pqh_gl_interface_rec.award_id,
4132: l_pqh_gl_interface_rec.expenditure_type,
4133: l_pqh_gl_interface_rec.organization_id,
4134: 0,
4135: NVL(l_pqh_gl_interface_rec.amount_dr,0),

Line 4132: l_pqh_gl_interface_rec.expenditure_type,

4128: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4129: l_pqh_gl_interface_rec.project_id,
4130: l_pqh_gl_interface_rec.task_id,
4131: l_pqh_gl_interface_rec.award_id,
4132: l_pqh_gl_interface_rec.expenditure_type,
4133: l_pqh_gl_interface_rec.organization_id,
4134: 0,
4135: NVL(l_pqh_gl_interface_rec.amount_dr,0),
4136: l_pqh_gl_interface_rec.currency_code,

Line 4133: l_pqh_gl_interface_rec.organization_id,

4129: l_pqh_gl_interface_rec.project_id,
4130: l_pqh_gl_interface_rec.task_id,
4131: l_pqh_gl_interface_rec.award_id,
4132: l_pqh_gl_interface_rec.expenditure_type,
4133: l_pqh_gl_interface_rec.organization_id,
4134: 0,
4135: NVL(l_pqh_gl_interface_rec.amount_dr,0),
4136: l_pqh_gl_interface_rec.currency_code,
4137: null,

Line 4135: NVL(l_pqh_gl_interface_rec.amount_dr,0),

4131: l_pqh_gl_interface_rec.award_id,
4132: l_pqh_gl_interface_rec.expenditure_type,
4133: l_pqh_gl_interface_rec.organization_id,
4134: 0,
4135: NVL(l_pqh_gl_interface_rec.amount_dr,0),
4136: l_pqh_gl_interface_rec.currency_code,
4137: null,
4138: 'Y',
4139: null,

Line 4136: l_pqh_gl_interface_rec.currency_code,

4132: l_pqh_gl_interface_rec.expenditure_type,
4133: l_pqh_gl_interface_rec.organization_id,
4134: 0,
4135: NVL(l_pqh_gl_interface_rec.amount_dr,0),
4136: l_pqh_gl_interface_rec.currency_code,
4137: null,
4138: 'Y',
4139: null,
4140: 'BUDGET'

Line 4188: p_chart_of_accounts_id IN gl_interface.chart_of_accounts_id%TYPE,

4184: -- can be re-used in commitment gl posting
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

Line 4260: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

4256:
4257: PROCEDURE reverse_commitment_post(p_last_posted_ver IN NUMBER,
4258: p_curr_bdgt_version IN NUMBER) IS
4259: --
4260: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
4261: l_proc varchar2(72) := g_package||'.reverse_commitment_post';
4262: --
4263: CURSOR csr_unpost_version (p_budget_version_id IN number )IS
4264: SELECT *

Line 4265: FROM pqh_gl_interface

4261: l_proc varchar2(72) := g_package||'.reverse_commitment_post';
4262: --
4263: CURSOR csr_unpost_version (p_budget_version_id IN number )IS
4264: SELECT *
4265: FROM pqh_gl_interface
4266: WHERE budget_version_id = p_budget_version_id
4267: AND NVL(adjustment_flag,'N') = 'N'
4268: AND posting_type_cd = 'COMMITMENT'
4269: AND status IS NOT NULL

Line 4285: FETCH csr_unpost_version INTO l_pqh_gl_interface_rec;

4281: --
4282: OPEN csr_unpost_version(p_budget_version_id => p_last_posted_ver);
4283: --
4284: LOOP
4285: FETCH csr_unpost_version INTO l_pqh_gl_interface_rec;
4286: EXIT WHEN csr_unpost_version%NOTFOUND;
4287:
4288: -- update the current record
4289: UPDATE pqh_gl_interface

Line 4289: UPDATE pqh_gl_interface

4285: FETCH csr_unpost_version INTO l_pqh_gl_interface_rec;
4286: EXIT WHEN csr_unpost_version%NOTFOUND;
4287:
4288: -- update the current record
4289: UPDATE pqh_gl_interface
4290: SET amount_dr = 0
4291: WHERE CURRENT OF csr_unpost_version;
4292:
4293: -- create the reverse txn

Line 4294: INSERT INTO pqh_gl_interface

4290: SET amount_dr = 0
4291: WHERE CURRENT OF csr_unpost_version;
4292:
4293: -- create the reverse txn
4294: INSERT INTO pqh_gl_interface
4295: (
4296: gl_interface_id,
4297: budget_version_id,
4298: budget_detail_id,

Line 4296: gl_interface_id,

4292:
4293: -- create the reverse txn
4294: INSERT INTO pqh_gl_interface
4295: (
4296: gl_interface_id,
4297: budget_version_id,
4298: budget_detail_id,
4299: period_name,
4300: accounting_date,

Line 4318: pqh_gl_interface_s.nextval,

4314: posting_type_cd
4315: )
4316: VALUES
4317: (
4318: pqh_gl_interface_s.nextval,
4319: g_last_posted_ver,
4320: l_pqh_gl_interface_rec.budget_detail_id,
4321: l_pqh_gl_interface_rec.period_name,
4322: l_pqh_gl_interface_rec.accounting_date,

Line 4320: l_pqh_gl_interface_rec.budget_detail_id,

4316: VALUES
4317: (
4318: pqh_gl_interface_s.nextval,
4319: g_last_posted_ver,
4320: l_pqh_gl_interface_rec.budget_detail_id,
4321: l_pqh_gl_interface_rec.period_name,
4322: l_pqh_gl_interface_rec.accounting_date,
4323: l_pqh_gl_interface_rec.code_combination_id,
4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,

Line 4321: l_pqh_gl_interface_rec.period_name,

4317: (
4318: pqh_gl_interface_s.nextval,
4319: g_last_posted_ver,
4320: l_pqh_gl_interface_rec.budget_detail_id,
4321: l_pqh_gl_interface_rec.period_name,
4322: l_pqh_gl_interface_rec.accounting_date,
4323: l_pqh_gl_interface_rec.code_combination_id,
4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4325: l_pqh_gl_interface_rec.project_id,

Line 4322: l_pqh_gl_interface_rec.accounting_date,

4318: pqh_gl_interface_s.nextval,
4319: g_last_posted_ver,
4320: l_pqh_gl_interface_rec.budget_detail_id,
4321: l_pqh_gl_interface_rec.period_name,
4322: l_pqh_gl_interface_rec.accounting_date,
4323: l_pqh_gl_interface_rec.code_combination_id,
4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4325: l_pqh_gl_interface_rec.project_id,
4326: l_pqh_gl_interface_rec.task_id,

Line 4323: l_pqh_gl_interface_rec.code_combination_id,

4319: g_last_posted_ver,
4320: l_pqh_gl_interface_rec.budget_detail_id,
4321: l_pqh_gl_interface_rec.period_name,
4322: l_pqh_gl_interface_rec.accounting_date,
4323: l_pqh_gl_interface_rec.code_combination_id,
4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4325: l_pqh_gl_interface_rec.project_id,
4326: l_pqh_gl_interface_rec.task_id,
4327: l_pqh_gl_interface_rec.award_id,

Line 4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,

4320: l_pqh_gl_interface_rec.budget_detail_id,
4321: l_pqh_gl_interface_rec.period_name,
4322: l_pqh_gl_interface_rec.accounting_date,
4323: l_pqh_gl_interface_rec.code_combination_id,
4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4325: l_pqh_gl_interface_rec.project_id,
4326: l_pqh_gl_interface_rec.task_id,
4327: l_pqh_gl_interface_rec.award_id,
4328: l_pqh_gl_interface_rec.expenditure_type,

Line 4325: l_pqh_gl_interface_rec.project_id,

4321: l_pqh_gl_interface_rec.period_name,
4322: l_pqh_gl_interface_rec.accounting_date,
4323: l_pqh_gl_interface_rec.code_combination_id,
4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4325: l_pqh_gl_interface_rec.project_id,
4326: l_pqh_gl_interface_rec.task_id,
4327: l_pqh_gl_interface_rec.award_id,
4328: l_pqh_gl_interface_rec.expenditure_type,
4329: l_pqh_gl_interface_rec.organization_id,

Line 4326: l_pqh_gl_interface_rec.task_id,

4322: l_pqh_gl_interface_rec.accounting_date,
4323: l_pqh_gl_interface_rec.code_combination_id,
4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4325: l_pqh_gl_interface_rec.project_id,
4326: l_pqh_gl_interface_rec.task_id,
4327: l_pqh_gl_interface_rec.award_id,
4328: l_pqh_gl_interface_rec.expenditure_type,
4329: l_pqh_gl_interface_rec.organization_id,
4330: 0,

Line 4327: l_pqh_gl_interface_rec.award_id,

4323: l_pqh_gl_interface_rec.code_combination_id,
4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4325: l_pqh_gl_interface_rec.project_id,
4326: l_pqh_gl_interface_rec.task_id,
4327: l_pqh_gl_interface_rec.award_id,
4328: l_pqh_gl_interface_rec.expenditure_type,
4329: l_pqh_gl_interface_rec.organization_id,
4330: 0,
4331: NVL(l_pqh_gl_interface_rec.amount_dr,0),

Line 4328: l_pqh_gl_interface_rec.expenditure_type,

4324: l_pqh_gl_interface_rec.cost_allocation_keyflex_id,
4325: l_pqh_gl_interface_rec.project_id,
4326: l_pqh_gl_interface_rec.task_id,
4327: l_pqh_gl_interface_rec.award_id,
4328: l_pqh_gl_interface_rec.expenditure_type,
4329: l_pqh_gl_interface_rec.organization_id,
4330: 0,
4331: NVL(l_pqh_gl_interface_rec.amount_dr,0),
4332: l_pqh_gl_interface_rec.currency_code,

Line 4329: l_pqh_gl_interface_rec.organization_id,

4325: l_pqh_gl_interface_rec.project_id,
4326: l_pqh_gl_interface_rec.task_id,
4327: l_pqh_gl_interface_rec.award_id,
4328: l_pqh_gl_interface_rec.expenditure_type,
4329: l_pqh_gl_interface_rec.organization_id,
4330: 0,
4331: NVL(l_pqh_gl_interface_rec.amount_dr,0),
4332: l_pqh_gl_interface_rec.currency_code,
4333: null,

Line 4331: NVL(l_pqh_gl_interface_rec.amount_dr,0),

4327: l_pqh_gl_interface_rec.award_id,
4328: l_pqh_gl_interface_rec.expenditure_type,
4329: l_pqh_gl_interface_rec.organization_id,
4330: 0,
4331: NVL(l_pqh_gl_interface_rec.amount_dr,0),
4332: l_pqh_gl_interface_rec.currency_code,
4333: null,
4334: 'Y',
4335: null,

Line 4332: l_pqh_gl_interface_rec.currency_code,

4328: l_pqh_gl_interface_rec.expenditure_type,
4329: l_pqh_gl_interface_rec.organization_id,
4330: 0,
4331: NVL(l_pqh_gl_interface_rec.amount_dr,0),
4332: l_pqh_gl_interface_rec.currency_code,
4333: null,
4334: 'Y',
4335: null,
4336: 'BUDGET'

Line 5038: This procedure will update or insert GMS records into pqh_gl_interface if there was no error for

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
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: --

Line 5046: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

5042: --
5043: -- local variables
5044: --
5045: l_proc varchar2(72) := g_package||'.populate_pqh_gms_interface';
5046: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
5047: l_uom_count number;
5048: l_amount number;
5049: l_uom1 varchar2(80);
5050: l_uom2 varchar2(80);

Line 5061: From pqh_gl_interface

5057: p_award_id IN NUMBER,
5058: p_expenditure_type IN varchar2,
5059: p_organization_id IN NUMBER) IS
5060: Select COUNT(*)
5061: From pqh_gl_interface
5062: Where budget_version_id = g_budget_version_id
5063: AND budget_detail_id = p_budget_detail_id
5064: AND period_name = p_period_name
5065: AND posting_type_cd = 'BUDGET'

Line 5095: -- loop thru the array and get populate the pqh_gl_interface table

5091: OPEN csr_budget_units;
5092: FETCH csr_budget_units into l_uom1, l_uom2,l_uom3;
5093: CLOSE csr_budget_units;
5094:
5095: -- loop thru the array and get populate the pqh_gl_interface table
5096:
5097: FOR i IN 1..g_period_amt_tab.COUNT
5098: LOOP
5099:

Line 5121: -- update pqh_gl_interface and create a adjustment txn

5117: CLOSE csr_pqh_gms_interface;
5118:
5119:
5120: IF l_uom_count <> 0 THEN
5121: -- update pqh_gl_interface and create a adjustment txn
5122: update_pqh_gms_interface
5123: (
5124: p_budget_detail_id => p_budget_detail_id,
5125: p_period_name => g_period_amt_tab(i).period_name,

Line 5134: -- insert into pqh_gl_interface

5130: p_organization_id => g_period_amt_tab(i).organization_id,
5131: p_amount => l_amount
5132: );
5133: ELSE
5134: -- insert into pqh_gl_interface
5135: insert_pqh_gms_interface
5136: (
5137: p_budget_detail_id => p_budget_detail_id,
5138: p_period_name => g_period_amt_tab(i).period_name,

Line 5181: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,

5177: ---------------------------------------------------------------------------------------------
5178: ---------------------------------------------------------------------------------------------
5179: PROCEDURE insert_pqh_gms_interface
5180: (
5181: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
5182: p_period_name IN varchar2,
5183: p_project_id IN pqh_gl_interface.project_id%TYPE,
5184: p_task_id IN pqh_gl_interface.task_id%TYPE,
5185: p_award_id IN pqh_gl_interface.award_id%TYPE,

Line 5183: p_project_id IN pqh_gl_interface.project_id%TYPE,

5179: PROCEDURE insert_pqh_gms_interface
5180: (
5181: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
5182: p_period_name IN varchar2,
5183: p_project_id IN pqh_gl_interface.project_id%TYPE,
5184: p_task_id IN pqh_gl_interface.task_id%TYPE,
5185: p_award_id IN pqh_gl_interface.award_id%TYPE,
5186: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5187: p_organization_id IN pqh_gl_interface.organization_id%TYPE,

Line 5184: p_task_id IN pqh_gl_interface.task_id%TYPE,

5180: (
5181: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
5182: p_period_name IN varchar2,
5183: p_project_id IN pqh_gl_interface.project_id%TYPE,
5184: p_task_id IN pqh_gl_interface.task_id%TYPE,
5185: p_award_id IN pqh_gl_interface.award_id%TYPE,
5186: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5187: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5188: p_amount IN pqh_gl_interface.amount_dr%TYPE

Line 5185: p_award_id IN pqh_gl_interface.award_id%TYPE,

5181: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
5182: p_period_name IN varchar2,
5183: p_project_id IN pqh_gl_interface.project_id%TYPE,
5184: p_task_id IN pqh_gl_interface.task_id%TYPE,
5185: p_award_id IN pqh_gl_interface.award_id%TYPE,
5186: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5187: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5188: p_amount IN pqh_gl_interface.amount_dr%TYPE
5189: ) IS

Line 5186: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,

5182: p_period_name IN varchar2,
5183: p_project_id IN pqh_gl_interface.project_id%TYPE,
5184: p_task_id IN pqh_gl_interface.task_id%TYPE,
5185: p_award_id IN pqh_gl_interface.award_id%TYPE,
5186: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5187: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5188: p_amount IN pqh_gl_interface.amount_dr%TYPE
5189: ) IS
5190: /*

Line 5187: p_organization_id IN pqh_gl_interface.organization_id%TYPE,

5183: p_project_id IN pqh_gl_interface.project_id%TYPE,
5184: p_task_id IN pqh_gl_interface.task_id%TYPE,
5185: p_award_id IN pqh_gl_interface.award_id%TYPE,
5186: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5187: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5188: p_amount IN pqh_gl_interface.amount_dr%TYPE
5189: ) IS
5190: /*
5191: This procedure will insert record into pqh_gl_interface

Line 5188: p_amount IN pqh_gl_interface.amount_dr%TYPE

5184: p_task_id IN pqh_gl_interface.task_id%TYPE,
5185: p_award_id IN pqh_gl_interface.award_id%TYPE,
5186: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5187: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5188: p_amount IN pqh_gl_interface.amount_dr%TYPE
5189: ) IS
5190: /*
5191: This procedure will insert record into pqh_gl_interface
5192: If the same UOM is repeated more then once then we would update the unposted txn.

Line 5191: This procedure will insert record into pqh_gl_interface

5187: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5188: p_amount IN pqh_gl_interface.amount_dr%TYPE
5189: ) IS
5190: /*
5191: This procedure will insert record into pqh_gl_interface
5192: If the same UOM is repeated more then once then we would update the unposted txn.
5193: */
5194: --
5195: -- local variables

Line 5202: From pqh_gl_interface

5198: l_count number(9) := 0 ;
5199:
5200: Cursor csr_pqh_gms_interface IS
5201: Select COUNT(*)
5202: From pqh_gl_interface
5203: Where budget_version_id = g_budget_version_id
5204: AND budget_detail_id = p_budget_detail_id
5205: AND p_period_name = p_period_name
5206: AND posting_type_cd = 'BUDGET'

Line 5225: hr_utility.set_location('l_count in Insert pqh_gl_interface : '||l_count,10);

5221: OPEN csr_pqh_gms_interface;
5222: FETCH csr_pqh_gms_interface INTO l_count;
5223: CLOSE csr_pqh_gms_interface;
5224:
5225: hr_utility.set_location('l_count in Insert pqh_gl_interface : '||l_count,10);
5226:
5227: IF l_count <> 0 THEN
5228:
5229: -- this is a repeat of UOM , so update the first one adding the new amount

Line 5230: UPDATE pqh_gl_interface

5226:
5227: IF l_count <> 0 THEN
5228:
5229: -- this is a repeat of UOM , so update the first one adding the new amount
5230: UPDATE pqh_gl_interface
5231: SET AMOUNT_DR = NVL(AMOUNT_DR,0) + NVL(p_amount,0)
5232: WHERE budget_version_id = g_budget_version_id
5233: AND budget_detail_id = p_budget_detail_id
5234: AND p_period_name = p_period_name

Line 5248: INSERT INTO pqh_gl_interface

5244:
5245: ELSE
5246:
5247: -- insert this record
5248: INSERT INTO pqh_gl_interface
5249: (
5250: gl_interface_id,
5251: budget_version_id,
5252: budget_detail_id,

Line 5250: gl_interface_id,

5246:
5247: -- insert this record
5248: INSERT INTO pqh_gl_interface
5249: (
5250: gl_interface_id,
5251: budget_version_id,
5252: budget_detail_id,
5253: period_name,
5254: project_id,

Line 5269: pqh_gl_interface_s.nextval,

5265: posting_type_cd
5266: )
5267: VALUES
5268: (
5269: pqh_gl_interface_s.nextval,
5270: g_budget_version_id,
5271: p_budget_detail_id,
5272: p_period_name,
5273: p_project_id,

Line 5303: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,

5299: ---------------------------------------------------------------------------------------------
5300: ---------------------------------------------------------------------------------------------
5301: PROCEDURE update_pqh_gms_interface
5302: (
5303: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
5304: p_period_name IN varchar2,
5305: p_project_id IN pqh_gl_interface.project_id%TYPE,
5306: p_task_id IN pqh_gl_interface.task_id%TYPE,
5307: p_award_id IN pqh_gl_interface.award_id%TYPE,

Line 5305: p_project_id IN pqh_gl_interface.project_id%TYPE,

5301: PROCEDURE update_pqh_gms_interface
5302: (
5303: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
5304: p_period_name IN varchar2,
5305: p_project_id IN pqh_gl_interface.project_id%TYPE,
5306: p_task_id IN pqh_gl_interface.task_id%TYPE,
5307: p_award_id IN pqh_gl_interface.award_id%TYPE,
5308: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5309: p_organization_id IN pqh_gl_interface.organization_id%TYPE,

Line 5306: p_task_id IN pqh_gl_interface.task_id%TYPE,

5302: (
5303: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
5304: p_period_name IN varchar2,
5305: p_project_id IN pqh_gl_interface.project_id%TYPE,
5306: p_task_id IN pqh_gl_interface.task_id%TYPE,
5307: p_award_id IN pqh_gl_interface.award_id%TYPE,
5308: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5309: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5310: p_amount IN pqh_gl_interface.amount_dr%TYPE

Line 5307: p_award_id IN pqh_gl_interface.award_id%TYPE,

5303: p_budget_detail_id IN pqh_gl_interface.budget_detail_id%TYPE,
5304: p_period_name IN varchar2,
5305: p_project_id IN pqh_gl_interface.project_id%TYPE,
5306: p_task_id IN pqh_gl_interface.task_id%TYPE,
5307: p_award_id IN pqh_gl_interface.award_id%TYPE,
5308: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5309: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5310: p_amount IN pqh_gl_interface.amount_dr%TYPE
5311: ) IS

Line 5308: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,

5304: p_period_name IN varchar2,
5305: p_project_id IN pqh_gl_interface.project_id%TYPE,
5306: p_task_id IN pqh_gl_interface.task_id%TYPE,
5307: p_award_id IN pqh_gl_interface.award_id%TYPE,
5308: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5309: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5310: p_amount IN pqh_gl_interface.amount_dr%TYPE
5311: ) IS
5312: /*

Line 5309: p_organization_id IN pqh_gl_interface.organization_id%TYPE,

5305: p_project_id IN pqh_gl_interface.project_id%TYPE,
5306: p_task_id IN pqh_gl_interface.task_id%TYPE,
5307: p_award_id IN pqh_gl_interface.award_id%TYPE,
5308: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5309: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5310: p_amount IN pqh_gl_interface.amount_dr%TYPE
5311: ) IS
5312: /*
5313: This procedure will update pqh_gl_interface and create a adjustment record

Line 5310: p_amount IN pqh_gl_interface.amount_dr%TYPE

5306: p_task_id IN pqh_gl_interface.task_id%TYPE,
5307: p_award_id IN pqh_gl_interface.award_id%TYPE,
5308: p_expenditure_type IN pqh_gl_interface.expenditure_type%TYPE,
5309: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5310: p_amount IN pqh_gl_interface.amount_dr%TYPE
5311: ) IS
5312: /*
5313: This procedure will update pqh_gl_interface and create a adjustment record
5314: */

Line 5313: This procedure will update pqh_gl_interface and create a adjustment record

5309: p_organization_id IN pqh_gl_interface.organization_id%TYPE,
5310: p_amount IN pqh_gl_interface.amount_dr%TYPE
5311: ) IS
5312: /*
5313: This procedure will update pqh_gl_interface and create a adjustment record
5314: */
5315: --
5316: -- local variables
5317: --

Line 5319: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;

5315: --
5316: -- local variables
5317: --
5318: l_proc varchar2(72) := g_package||'.update_pqh_gms_interface';
5319: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;
5320: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;
5321: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
5322: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
5323:

Line 5320: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;

5316: -- local variables
5317: --
5318: l_proc varchar2(72) := g_package||'.update_pqh_gms_interface';
5319: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;
5320: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;
5321: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
5322: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
5323:
5324:

Line 5321: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;

5317: --
5318: l_proc varchar2(72) := g_package||'.update_pqh_gms_interface';
5319: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;
5320: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;
5321: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
5322: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
5323:
5324:
5325: CURSOR csr_pqh_gms_interface IS

Line 5322: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;

5318: l_proc varchar2(72) := g_package||'.update_pqh_gms_interface';
5319: l_amount_diff pqh_gl_interface.amount_dr%TYPE :=0;
5320: l_amount_dr pqh_gl_interface.amount_dr%TYPE :=0;
5321: l_amount_cr pqh_gl_interface.amount_cr%TYPE :=0;
5322: l_pqh_gl_interface_rec pqh_gl_interface%ROWTYPE;
5323:
5324:
5325: CURSOR csr_pqh_gms_interface IS
5326: SELECT *

Line 5327: FROM pqh_gl_interface

5323:
5324:
5325: CURSOR csr_pqh_gms_interface IS
5326: SELECT *
5327: FROM pqh_gl_interface
5328: WHERE budget_version_id = g_budget_version_id
5329: AND budget_detail_id = p_budget_detail_id
5330: AND period_name = p_period_name
5331: AND posting_type_cd = 'BUDGET'

Line 5348: FETCH csr_pqh_gms_interface INTO l_pqh_gl_interface_rec;

5344:
5345: hr_utility.set_location('Entering: '||l_proc, 5);
5346:
5347: OPEN csr_pqh_gms_interface;
5348: FETCH csr_pqh_gms_interface INTO l_pqh_gl_interface_rec;
5349:
5350: l_amount_diff := NVL(p_amount,0) - NVL(l_pqh_gl_interface_rec.amount_dr,0);
5351:
5352: IF l_amount_diff > 0 THEN

Line 5350: l_amount_diff := NVL(p_amount,0) - NVL(l_pqh_gl_interface_rec.amount_dr,0);

5346:
5347: OPEN csr_pqh_gms_interface;
5348: FETCH csr_pqh_gms_interface INTO l_pqh_gl_interface_rec;
5349:
5350: l_amount_diff := NVL(p_amount,0) - NVL(l_pqh_gl_interface_rec.amount_dr,0);
5351:
5352: IF l_amount_diff > 0 THEN
5353: -- debit as new is more then old
5354: l_amount_dr := l_amount_diff;

Line 5359: -- update the pqh_gl_interface table

5355: ELSE
5356: -- credit as new is less then old
5357: l_amount_cr := (-1)*l_amount_diff;
5358: END IF;
5359: -- update the pqh_gl_interface table
5360: UPDATE pqh_gl_interface
5361: SET amount_dr = NVL(p_amount,0)
5362: WHERE CURRENT OF csr_pqh_gms_interface;
5363:

Line 5360: UPDATE pqh_gl_interface

5356: -- credit as new is less then old
5357: l_amount_cr := (-1)*l_amount_diff;
5358: END IF;
5359: -- update the pqh_gl_interface table
5360: UPDATE pqh_gl_interface
5361: SET amount_dr = NVL(p_amount,0)
5362: WHERE CURRENT OF csr_pqh_gms_interface;
5363:
5364: CLOSE csr_pqh_gms_interface;

Line 5369: INSERT INTO pqh_gl_interface

5365:
5366: -- create i.e insert a adjustment record ONLY if l_amount_diff <> 0
5367: IF NVL(l_amount_diff,0) <> 0 THEN
5368:
5369: INSERT INTO pqh_gl_interface
5370: (
5371: gl_interface_id,
5372: budget_version_id,
5373: budget_detail_id,

Line 5371: gl_interface_id,

5367: IF NVL(l_amount_diff,0) <> 0 THEN
5368:
5369: INSERT INTO pqh_gl_interface
5370: (
5371: gl_interface_id,
5372: budget_version_id,
5373: budget_detail_id,
5374: period_name,
5375: project_id,

Line 5390: pqh_gl_interface_s.nextval,

5386: posting_type_cd
5387: )
5388: VALUES
5389: (
5390: pqh_gl_interface_s.nextval,
5391: g_budget_version_id,
5392: p_budget_detail_id,
5393: p_period_name,
5394: p_project_id,

Line 5452: This procedure ties back all the transactions posted into Oracle Grants Mgmt with records in pqh_gl_interface

5448: p_gms_batch_name IN VARCHAR2
5449: )
5450: IS
5451: /*
5452: This procedure ties back all the transactions posted into Oracle Grants Mgmt with records in pqh_gl_interface
5453: In case of failure the status in pqh_gl_interface is updated to error
5454: */
5455: --
5456: -- Cursor to get records rejected by import process

Line 5453: In case of failure the status in pqh_gl_interface is updated to error

5449: )
5450: IS
5451: /*
5452: This procedure ties back all the transactions posted into Oracle Grants Mgmt with records in pqh_gl_interface
5453: In case of failure the status in pqh_gl_interface is updated to error
5454: */
5455: --
5456: -- Cursor to get records rejected by import process
5457: --

Line 5491: -- IF import for all records failed then update status in pqh_gl_interface to error

5487: And batch_name = p_gms_batch_name
5488: And transaction_status_code in ('P', 'I');
5489:
5490: --
5491: -- IF import for all records failed then update status in pqh_gl_interface to error
5492: --
5493: IF l_cnt > 0
5494: THEN
5495:

Line 5520: UPDATE pqh_gl_interface

5516: p_message_text => get_gms_rejection_msg(reject_rec.rejection_code));
5517:
5518: begin
5519:
5520: UPDATE pqh_gl_interface
5521: SET status='ERROR',posting_date=sysdate
5522: WHERE period_name =g_gms_import_tab(l_int_id).period_name And
5523: project_id =g_gms_import_tab(l_int_id).project_id And
5524: task_id =g_gms_import_tab(l_int_id).task_id And

Line 5551: Where budget_detail_id in (select budget_detail_id from pqh_gl_interface where

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
5554: And status='ERROR'
5555: );

Line 5777: This procedure transfers records from pqh_gl_interface to pa_transaction_interface_all,

5773: ----------------------------------------------------------------------------------------------------------
5774:
5775: PROCEDURE populate_gms_tables IS
5776: /*
5777: This procedure transfers records from pqh_gl_interface to pa_transaction_interface_all,
5778: kicks off the TRANSACTION IMPORT program in GMS
5779: */
5780:
5781: ---------------Local Variables---------------------------------------------

Line 5797: l_pqh_interface_rec pqh_gl_interface%ROWTYPE;

5793: l_gms_transaction_source varchar2(30);
5794: l_amount NUMBER;
5795: tran_setup_exception EXCEPTION;
5796: tran_source_exception EXCEPTION;
5797: l_pqh_interface_rec pqh_gl_interface%ROWTYPE;
5798: l_log_context pqh_process_log.log_context%TYPE;
5799: l_proc varchar2(72) := g_package||'.populate_gms_interface';
5800: l_log_message varchar2(8000);
5801: cnt BINARY_INTEGER := 1;

Line 5821: From pqh_gl_interface

5817: expenditure_type,organization_id,
5818: currency_code,
5819: SUM(NVL(amount_dr,0)) amount_dr,
5820: SUM(NVL(amount_cr,0)) amount_cr
5821: From pqh_gl_interface
5822: Where budget_version_id = g_budget_version_id
5823: AND posting_type_cd = 'BUDGET'
5824: AND status IS NULL
5825: AND posting_date IS NULL

Line 6038: ,p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE

6034: /**************************************************************/
6035:
6036: PROCEDURE ins_gl_bc_run_fund_check
6037: ( p_packet_id IN gl_bc_packets.packet_id%TYPE
6038: ,p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE
6039: ,p_period_name IN pqh_gl_interface.period_name%TYPE
6040: ,p_period_year IN gl_period_statuses.period_year%TYPE
6041: ,p_period_num IN gl_period_statuses.period_num%TYPE
6042: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE

Line 6039: ,p_period_name IN pqh_gl_interface.period_name%TYPE

6035:
6036: PROCEDURE ins_gl_bc_run_fund_check
6037: ( p_packet_id IN gl_bc_packets.packet_id%TYPE
6038: ,p_code_combination_id IN pqh_gl_interface.code_combination_id%TYPE
6039: ,p_period_name IN pqh_gl_interface.period_name%TYPE
6040: ,p_period_year IN gl_period_statuses.period_year%TYPE
6041: ,p_period_num IN gl_period_statuses.period_num%TYPE
6042: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
6043: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE

Line 6043: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE

6039: ,p_period_name IN pqh_gl_interface.period_name%TYPE
6040: ,p_period_year IN gl_period_statuses.period_year%TYPE
6041: ,p_period_num IN gl_period_statuses.period_num%TYPE
6042: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
6043: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
6044: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
6045: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
6046: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
6047: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE

Line 6044: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE

6040: ,p_period_year IN gl_period_statuses.period_year%TYPE
6041: ,p_period_num IN gl_period_statuses.period_num%TYPE
6042: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
6043: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
6044: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
6045: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
6046: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
6047: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
6048: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE

Line 6045: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE

6041: ,p_period_num IN gl_period_statuses.period_num%TYPE
6042: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
6043: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
6044: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
6045: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
6046: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
6047: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
6048: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE
6049: ,p_fc_mode IN varchar2

Line 6046: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE

6042: ,p_quarter_num IN gl_period_statuses.quarter_num%TYPE
6043: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
6044: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
6045: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
6046: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
6047: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
6048: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE
6049: ,p_fc_mode IN varchar2
6050: ,p_fc_success OUT NOCOPY boolean

Line 6047: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE

6043: ,p_currency_code IN pqh_gl_interface.currency_code%TYPE
6044: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
6045: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
6046: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
6047: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
6048: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE
6049: ,p_fc_mode IN varchar2
6050: ,p_fc_success OUT NOCOPY boolean
6051: ,p_fc_return OUT NOCOPY varchar2

Line 6048: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE

6044: ,p_entered_dr IN pqh_gl_interface.amount_dr%TYPE
6045: ,p_entered_cr IN pqh_gl_interface.amount_cr%TYPE
6046: ,p_accounted_dr IN pqh_gl_interface.amount_dr%TYPE
6047: ,p_accounted_cr IN pqh_gl_interface.amount_cr%TYPE
6048: ,p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE
6049: ,p_fc_mode IN varchar2
6050: ,p_fc_success OUT NOCOPY boolean
6051: ,p_fc_return OUT NOCOPY varchar2
6052: )