DBA Data[Home] [Help]

PACKAGE: APPS.GHR_HISTORY_API

Source


1 package GHR_HISTORY_API AUTHID CURRENT_USER as
2 /* $Header: ghpahapi.pkh 120.1.12010000.1 2008/07/28 10:34:39 appldev ship $ */
3 	-- Constants
4 	g_peop_table		constant varchar2(30):='PER_PEOPLE_F';
5 	g_asgn_table		constant varchar2(30):='PER_ASSIGNMENTS_F';
6 	g_peopei_table		constant varchar2(30):='PER_PEOPLE_EXTRA_INFO';
7 	g_asgnei_table		constant varchar2(30):='PER_ASSIGNMENT_EXTRA_INFO';
8 	g_eleent_table		constant varchar2(30):='PAY_ELEMENT_ENTRIES_F';
9 	g_eleevl_table		constant varchar2(30):='PAY_ELEMENT_ENTRY_VALUES_F';
10 	g_posnei_table		constant varchar2(30):='PER_POSITION_EXTRA_INFO';
11 	g_addres_table		constant varchar2(30):='PER_ADDRESSES';
12 	g_perana_table		constant varchar2(30):='PER_PERSON_ANALYSES';
13 	g_posn_table		constant varchar2(30):='HR_ALL_POSITIONS_F';
14 	g_hist_date_format	constant varchar2(30):='yyyy/mm/dd hh24:mi:ss';
15 
16 	g_ins_operation		constant varchar2(1):='I';
17 	g_upd_operation		constant varchar2(1):='U';
18 	g_del_operation		constant varchar2(1):='D';
19 
20 	g_cancel			constant ghr_pa_requests.first_noa_cancel_or_Correct%type:='CANCEL';
21 	g_correct			constant ghr_pa_requests.first_noa_cancel_or_Correct%type:='CORRECT';
22 
23 	Type operation_info_type is record
24 	(table_name		ghr_pa_history.table_name%type,
25 	 table_pk_id	ghr_pa_history.information1%type,
26 	 operation		varchar2(10),
27 	 row_id		rowid
28 	);
29 
30 	Type table_operation_info_type is table of operation_info_type
31 	index by binary_integer;
32 
33 	Type History_header_type is record
34 	(pa_history_id                   number(15),
35 	 pa_request_id              	   number(15),
36 	 process_date                    date,
37 	 effective_date                  date,
38 	 table_name                      varchar2(30),
39 	 table_pk_id                     number(15),
40 	 nature_of_action_id             number(15),
41 	 person_id                       per_people_f.person_id%type,
42 	 assignment_id                   per_assignments_f.assignment_id%type,
43 	 dml_operation	               varchar2(1)
44 	);
45 
46 	Type pa_history_type is table of ghr_pa_history%rowtype
47 	index by binary_integer;
48 
49 	Type g_session_var_type is record
50 	(pa_request_id				number,
51 	 noa_id   			  		number,
52 	 person_id					number(9),
53        assignment_id				number(9),
54 	 position_id				number(15),
55 	 element_entry_id				number(15),
56 	 altered_pa_request_id			number,
57 	 noa_id_correct   			number,
58 	 pa_history_id				number,
59 	 date_effective				date,
60 	 program_name				varchar2(30),
61 	 fire_trigger				varchar2(1)
62 	);
63 
64 -- End local procedure declaration
65 
66 	Procedure get_g_session_var(
67 		p_pa_request_id 		 out nocopy number,
68 		p_noa_id 			 out nocopy number,
69 		p_altered_pa_request_id  out nocopy number,
70 		p_noa_id_correct 		 out nocopy number,
71 		p_person_id 		 out nocopy number,
72 		p_assignment_id 		 out nocopy number,
73 		p_date_effective		 out nocopy date);
74 
75 	Procedure set_g_session_var( p_session_var in  g_session_var_type);
76 	Procedure get_g_session_var( p_session_var out nocopy g_session_var_type);
77 
78 	Procedure set_g_session_var(
79 		p_pa_request_id 			in number	default null,
80 		p_noa_id 				in number	default null,
81 		p_altered_pa_request_id 	in number	default null,
82 		p_noa_id_correct 			in number	default null,
83 		p_person_id 			in number	default null,
84 		p_assignment_id 			in number	default null,
85 		p_date_effective			in date	default null);
86 
87 	Procedure reinit_g_session_var;
88 
89 	Procedure set_operation_info(
90 		p_program_name		in  varchar2				,
91             p_date_effective 		in  date					,
92 		p_table_name 		in  ghr_pa_history.table_name%type  ,
93 		p_table_pk_id		in  ghr_pa_history.information1%type ,
94 		p_operation			in  varchar2,
95 		p_old_record_data       in  ghr_pa_history%rowtype,
96 		p_row_id			in  rowid
97            );
98 
99 
100 	Function row_already_touched(p_row_id		in 	rowid) return boolean;
101 
102 	Function add_row_operation_info_rg (
103 		p_table_name 		in ghr_pa_history.table_name%type,
104 		p_table_pk_id		in ghr_pa_history.information1%type,
105 		p_operation			in varchar2,
106 		p_row_id			in rowid)
107 	return binary_integer;
108 
109       -- Following procedure will hold the :old values
110 	Procedure add_row_pre_update_record_rg (
111 		p_pre_update_rg 		in ghr_pa_history%rowtype,
112 		p_ind				in binary_integer);
113 
114 	Procedure post_update_process;
115 
116 Procedure display_g_session_var;
117 
118 Procedure fetch_history_info(
119 	p_table_name				in	varchar2	default null,
120 	p_table_pk_id				in	varchar2	default null,
121 	p_row_id					in	rowid		default null,
122 	p_person_id					in	number	default null,
123 	p_date_effective				in	date		default null,
124 	p_altered_pa_request_id			in	number	default null,
125 	p_noa_id_corrected			in	number	default null,
126 	p_pa_history_id				in	number	default null,
127 	p_hist_data 			  in out nocopy ghr_pa_history%rowtype,
128 	p_result_code			 out nocopy varchar2);
129 
130 Procedure Post_forms_commit_process( p_eff_date in date);
131 Procedure New_form_instance_process;
132 Procedure get_session_date ( p_sess_date out nocopy     date);
133 
134 End GHR_HISTORY_API;