1 Package pay_jp_entries_pkg AUTHID CURRENT_USER as
2 /* $Header: pyjpetr.pkh 120.0.12010000.1 2008/07/27 22:58:43 appldev ship $ */
3 g_iv_max constant integer := 15;
4 type ev_rec is record(
5 input_value_id pay_input_values_f.input_value_id%TYPE,
6 entry_value pay_element_entry_values_f.screen_entry_value%TYPE,
7 -- #2240838. Changed data type from hr_lookups.meaning%type
8 -- to varchar2(240).
9 d_entry_value varchar2(240));
10 --
11 -- The following size_limit(=15) must be literal not variable.
12 --
13 --type ev_rec_tbl is varray(15) of ev_rec;
14 type ev_rec_tbl is table of ev_rec index by binary_integer;
15 --
16 -- For PAY_ELEMENT_ENTRIES_F descriptive_flexfield.
17 type t_attribute is table of varchar2(240) index by binary_integer;
18 type attribute_tbl is record(
19 attribute_category pay_element_entries_f.attribute_category%TYPE,
20 attribute t_attribute);
21 --
22 -- For Forms cache.
23 -- <How to use>
24 -- elm_tbl(element_type_id).element_code
25 -- iv_tbl(input_value_id).display_sequence
26 --
27 type elm_code_tbl is table of pay_element_types_f.element_name%TYPE index by binary_integer;
28 type elm_rec is record(
29 element_code pay_element_types_f.element_name%TYPE,
30 input_currency_code pay_element_types_f.input_currency_code%TYPE,
31 multiple_entries_allowed_flag pay_element_types_f.multiple_entries_allowed_flag%TYPE);
32 type elm_rec_tbl is table of elm_rec index by binary_integer;
33 type iv_rec is record(
34 element_type_id pay_input_values_f.element_type_id%TYPE,
35 display_sequence pay_input_values_f.display_sequence%TYPE,
36 uom pay_input_values_f.uom%TYPE,
37 mandatory_flag pay_input_values_f.mandatory_flag%TYPE,
38 max_length number,
39 format_mask varchar2(80));
40 type iv_rec_tbl is table of iv_rec index by binary_integer;
41 --
42 -- ----------------------------------------------------------------------------
43 -- |------------------------< derive_attributes >-----------------------------|
44 -- ----------------------------------------------------------------------------
45 -- Call this procedure in the following triggers.
46 -- 1) PRE-FORM
47 -- 2) INIT_DATE_DEPENDENT
48 -- On Forms, set properties using output variables.
49 Procedure derive_attributes(
50 p_elm_code_tbl in elm_code_tbl,
51 p_effective_date in date,
52 p_business_group_id in number,
53 p_elm_rec_tbl out nocopy elm_rec_tbl,
54 p_iv_rec_tbl out nocopy iv_rec_tbl);
55 --
56 -- ----------------------------------------------------------------------------
57 -- |------------------------< derive_format_mask >----------------------------|
58 -- ----------------------------------------------------------------------------
59 -- Call this procedure in the following triggers.
60 -- 1) PRE-FORM
61 -- On Forms, set properties using output variables.
62 Procedure derive_format_mask(
63 p_elm_rec_tbl in elm_rec_tbl,
64 p_iv_rec_tbl in out nocopy iv_rec_tbl);
65 --
66 -- ----------------------------------------------------------------------------
67 -- |-----------------------------< chk_entry >--------------------------------|
68 -- ----------------------------------------------------------------------------
69 -- This procedure must be called "once" on the following Forms trigger.
70 -- 1) WHEN-DATABASE-RECORD(when INSERTING)
71 -- Not necessary to call this procedure on WHEN-VALIDATE-ITEM trigger when
72 -- updating.
73 -- When deleting, this procedure is called in part of API.
74 -- Call derive_default_values procedure instead of this procedure chk_entry.
75 Procedure chk_entry(
76 p_element_entry_id in number,
77 p_assignment_id in number,
78 p_element_link_id in number,
79 p_entry_type in varchar2,
80 p_original_entry_id in number default null,
81 p_target_entry_id in number default null,
82 p_effective_date in date,
83 p_validation_start_date in date,
84 p_validation_end_date in date,
85 p_effective_start_date in out nocopy date,
86 p_effective_end_date in out nocopy date,
87 p_usage in varchar2,
88 p_dt_update_mode in varchar2,
89 p_dt_delete_mode in varchar2);
90 --
91 -- ----------------------------------------------------------------------------
92 -- |---------------------< derive_default_values >----------------------------|
93 -- ----------------------------------------------------------------------------
94 -- This procedure must be called in the following trigger.
95 -- 1) WHEN-DATABASE-RECORD(when INSERTING)
96 -- This procedure includes chk_entry procedure.
97 Procedure derive_default_values(
98 p_assignment_id in number,
99 p_element_code in varchar2,
100 p_business_group_id in varchar2,
101 p_entry_type in varchar2,
102 p_element_link_id out nocopy number,
103 p_ev_rec_tbl out nocopy ev_rec_tbl,
104 p_effective_date in date,
105 p_effective_start_date in out nocopy date,
106 p_effective_end_date in out nocopy date);
107 --
108 -- ----------------------------------------------------------------------------
109 -- |---------------------------< chk_entry_value >----------------------------|
110 -- ----------------------------------------------------------------------------
111 -- This procedure must be called every time before dtcsapi call.
112 Procedure chk_entry_value(
113 p_element_link_id in number,
114 p_input_value_id in number,
115 p_effective_date in date,
116 p_business_group_id in number,
117 p_assignment_id in number,
118 p_user_value in out nocopy varchar2,
119 p_canonical_value out nocopy varchar2,
120 p_hot_defaulted out nocopy boolean,
121 p_min_max_warning out nocopy boolean,
122 p_user_min_value out nocopy varchar2,
123 p_user_max_value out nocopy varchar2,
124 p_formula_warning out nocopy boolean,
125 p_formula_message out nocopy varchar2);
126 --
127 -- ----------------------------------------------------------------------------
128 -- |--------------------------< find_dt_upd_modes >---------------------------|
129 -- ----------------------------------------------------------------------------
130 Procedure find_dt_upd_modes
131 (p_effective_date in date,
132 p_base_key_value in number,
133 p_correction out nocopy boolean,
134 p_update out nocopy boolean,
135 p_update_override out nocopy boolean,
136 p_update_change_insert out nocopy boolean);
137 --
138 -- ----------------------------------------------------------------------------
139 -- |--------------------------< find_dt_del_modes >---------------------------|
140 -- ----------------------------------------------------------------------------
141 Procedure find_dt_del_modes
142 (p_effective_date in date,
143 p_base_key_value in number,
144 p_zap out nocopy boolean,
145 p_delete out nocopy boolean,
146 p_future_change out nocopy boolean,
147 p_delete_next_change out nocopy boolean);
148 --
149 -- ----------------------------------------------------------------------------
150 -- |-------------------------------< ins_lck >--------------------------------|
151 -- ----------------------------------------------------------------------------
152 Procedure ins_lck
153 (p_effective_date in date,
154 p_datetrack_mode in varchar2,
155 p_rec in pay_element_entries_f%ROWTYPE,
156 p_validation_start_date out nocopy date,
157 p_validation_end_date out nocopy date);
158 --
159 -- ----------------------------------------------------------------------------
160 -- |---------------------------------< lck >----------------------------------|
161 -- ----------------------------------------------------------------------------
162 Procedure lck
163 (p_effective_date in date,
164 p_datetrack_mode in varchar2,
165 p_element_entry_id in number,
166 p_object_version_number in number,
167 p_validation_start_date out nocopy date,
168 p_validation_end_date out nocopy date);
169 --
170 -- ----------------------------------------------------------------------------
171 -- |-------------------------------< ins >------------------------------------|
172 -- ----------------------------------------------------------------------------
173 Procedure ins(
174 p_validate in boolean,
175 p_effective_date in date,
176 p_assignment_id in number,
177 p_element_link_id in number,
178 p_ev_rec_tbl in ev_rec_tbl,
179 p_attribute_tbl in attribute_tbl,
180 p_business_group_id in number,
181 p_element_entry_id out nocopy number,
182 p_effective_start_date out nocopy date,
183 p_effective_end_date out nocopy date,
184 p_object_version_number out nocopy number);
185 --
186 -- ----------------------------------------------------------------------------
187 -- |-------------------------------< upd >------------------------------------|
188 -- ----------------------------------------------------------------------------
189 Procedure upd(
190 p_validate in boolean,
191 p_effective_date in date,
192 p_datetrack_update_mode in varchar2,
193 p_element_entry_id in number,
194 p_object_version_number in out nocopy number,
195 p_ev_rec_tbl in ev_rec_tbl,
196 p_attribute_tbl in attribute_tbl,
197 p_business_group_id in number,
198 p_effective_start_date out nocopy date,
199 p_effective_end_date out nocopy date);
200 --
201 -- ----------------------------------------------------------------------------
202 -- |-------------------------------< del >------------------------------------|
203 -- ----------------------------------------------------------------------------
204 Procedure del(
205 p_validate in boolean,
206 p_effective_date in date,
207 p_datetrack_delete_mode in varchar2,
208 p_element_entry_id in number,
209 p_object_version_number in out nocopy number,
210 p_effective_start_date out nocopy date,
211 p_effective_end_date out nocopy date);
212 --
213 End pay_jp_entries_pkg;