1 PACKAGE CN_Srp_PayGroup_PUB as
2 -- $Header: cnpspgps.pls 120.2 2005/10/27 16:02:55 mblum noship $
3 /*#
4 * The procedures in this package can be used to assign salesreps to a pay group and to update that assignment. They can also be used for mass assignment and mass update of pay groups to salesreps.
5 * @rep:scope public
6 * @rep:product CN
7 * @rep:displayname Assign Pay Groups
8 * @rep:lifecycle active
9 * @rep:compatibility S
10 * @rep:category BUSINESS_ENTITY CN_COMP_PLANS
11 */
12 TYPE PayGroup_assign_rec IS RECORD
13 ( pay_group_name cn_pay_groups.name%TYPE := cn_api.g_miss_char,
14 employee_type VARCHAR2(30) := cn_api.g_miss_char,
15 employee_number cn_salesreps.employee_number%TYPE := cn_api.g_miss_char,
16 source_id cn_salesreps.source_id%TYPE := null,
17 assignment_start_date cn_srp_pay_groups.start_date%TYPE := cn_api.g_miss_date,
18 assignment_end_date cn_srp_pay_groups.end_date%TYPE := cn_api.g_miss_date,
19 lock_flag cn_srp_pay_groups.lock_flag%TYPE := cn_api.g_miss_char,
20 role_pay_group_id cn_srp_pay_groups.role_pay_group_id%TYPE := cn_api.g_miss_id,
21 org_id cn_srp_pay_groups.org_id%TYPE := NULL,
22 attribute_category cn_srp_pay_groups.attribute_category%TYPE
23 := cn_api.g_miss_char,
24 attribute1 cn_srp_pay_groups.attribute1%TYPE
25 := cn_api.g_miss_char,
26 attribute2 cn_srp_pay_groups.attribute2%TYPE
27 := cn_api.g_miss_char,
28 attribute3 cn_srp_pay_groups.attribute3%TYPE
29 := cn_api.g_miss_char,
30 attribute4 cn_srp_pay_groups.attribute4%TYPE
31 := cn_api.g_miss_char,
32 attribute5 cn_srp_pay_groups.attribute5%TYPE
33 := cn_api.g_miss_char,
34 attribute6 cn_srp_pay_groups.attribute6%TYPE
35 := cn_api.g_miss_char,
36 attribute7 cn_srp_pay_groups.attribute7%TYPE
37 := cn_api.g_miss_char,
38 attribute8 cn_srp_pay_groups.attribute8%TYPE
39 := cn_api.g_miss_char,
40 attribute9 cn_srp_pay_groups.attribute9%TYPE
41 := cn_api.g_miss_char,
42 attribute10 cn_srp_pay_groups.attribute10%TYPE
43 := cn_api.g_miss_char,
44 attribute11 cn_srp_pay_groups.attribute11%TYPE
45 := cn_api.g_miss_char,
46 attribute12 cn_srp_pay_groups.attribute12%TYPE
47 := cn_api.g_miss_char,
48 attribute13 cn_srp_pay_groups.attribute13%TYPE
49 := cn_api.g_miss_char,
50 attribute14 cn_srp_pay_groups.attribute14%TYPE
51 := cn_api.g_miss_char,
52 attribute15 cn_srp_pay_groups.attribute15%TYPE
53 := cn_api.g_miss_char);
54 -- Start of comments
55 -- API name : Assign_Salesreps
56 -- Type : Public.
57 -- Pre-reqs : None.
58 -- Usage : Used to create entry into cn_pay_groups
59 --
60 -- Desc : This procedure will validate the input for a pay group
61 -- and create one if all validations are passed.
62 --
63 -- Parameters :
64 -- IN : p_api_version IN NUMBER Required
65 -- p_init_msg_list IN VARCHAR2 Optional
66 -- Default = FND_API.G_FALSE
67 -- p_commit IN VARCHAR2 Optional
68 -- Default = FND_API.G_FALSE
69 -- p_validation_level IN NUMBER Optional
70 -- Default = FND_API.G_VALID_LEVEL_FULL
71 -- OUT : x_return_status OUT VARCHAR2(1)
72 -- x_msg_count OUT NUMBER
73 -- x_msg_data OUT VARCHAR2(2000)
74 -- IN : p_PayGroup_assign_rec IN PayGroup_assign_rec%TYPE
75 --
76 -- OUT : x_loading_status OUT VARCHAR2(50)
77 -- Detailed error code returned from procedure.
78 --
79 -- OUT : x_status OUT VARCHAR2(50)
80 -- Return Sql Statement Status ( VALID/INVALID)
81 -- Version : Current version 1.0
82 -- Initial version 1.0
83 -- Notes : The following validations are performed by this API
84 -- - Checks if the paygroup exist
85 -- - Checks if the salesrep exists
86 -- - Checks that the assignments do not overlap
87 --
88 -- End of comments
89 /*#
90 * This procedure is used to create entry into cn_srp_pay_groups. The procedure validates the input for a pay group and creates one if all validations are passed.
91 * @param p_api_version API Version
92 * @param p_init_msg_list Initialize Message List
93 * @param p_commit Commit after assignment created
94 * @param p_validation_level Validation Level
95 * @param x_return_status Status of the create operation
96 * @param x_msg_count Number of error messages returned
97 * @param x_msg_data Error messages
98 * @param x_status Status
99 * @param x_loading_status Status
100 * @param p_paygroup_assign_rec Record of type PayGroup_assign_rec that stores the data associated with pay group assignments
101 * @rep:scope public
102 * @rep:lifecycle active
103 * @rep:displayname Assign pay group to salesperson
104 */
105 PROCEDURE Assign_salesreps
106 ( p_api_version IN NUMBER,
107 p_init_msg_list IN VARCHAR2 := cn_api.g_false,
108 p_commit IN VARCHAR2 := cn_api.g_false,
109 p_validation_level IN NUMBER := cn_api.g_valid_level_full,
110 x_return_status OUT NOCOPY VARCHAR2,
111 x_msg_count OUT NOCOPY NUMBER,
112 x_msg_data OUT NOCOPY VARCHAR2,
113 p_paygroup_assign_rec IN PayGroup_assign_rec,
114 x_loading_status OUT NOCOPY VARCHAR2,
115 x_status OUT NOCOPY VARCHAR2
116 );
117
118
119 -- Start of comments
120 -- API name : Create_Mass_Asgn_Srp_Pay_Group
121 -- Type : Public.
122 -- Pre-reqs : None.
123 -- Usage : Used to create a new mass payment plan assignment to an salesrep
124 -- Desc : Procedure to create a new mass payment plan assignment to salesrep
125 -- Parameters :
126 -- IN : p_api_version IN NUMBER Require
127 -- p_init_msg_list IN VARCHAR2 Optional
128 -- Default = CN_API.G_FALSE
129 -- p_commit IN VARCHAR2 Optional
130 -- Default = CN_API.G_FALSE
131 -- p_validation_level IN NUMBER Optional
132 -- Default = CN_API.G_VALID_LEVEL_FULL
133 -- p_role_pay_pgroup_id IN NUMBER
134 -- p_srp_role_id IN NUMBER
135 --
136 -- OUT : x_return_status OUT VARCHAR2(1)
137 -- x_msg_count OUT NUMBER
138 -- x_msg_data OUT VARCHAR2(2000)
139 -- x_loading_status OUT VARCHAR2(30)
140 -- Version : Current version 1.0
141 -- Initial version 1.0
142
143 /*#
144 * This procedure is used to create a new mass pay group assignment to salesreps.
145 * @param p_api_version API Version
146 * @param p_init_msg_list Initialize Message List
147 * @param p_commit Commit after create
148 * @param p_validation_level Validation Level
149 * @param x_return_status Status of the create operation
150 * @param x_msg_count Number of error messages returned
151 * @param x_msg_data Error messages
152 * @param x_srp_pay_group_id Return the unique identifier of this assignment
153 * @param x_loading_status Status
154 * @param p_srp_role_id Unique identifier of role assigned to a given salesperson
155 * @param p_role_pay_group_id Unique identifier of role assigned to a given pay group
156 * @rep:scope public
157 * @rep:lifecycle active
158 * @rep:displayname Create pay group mass assignments
159 */
160 PROCEDURE Create_Mass_Asgn_Srp_Pay
161 (
162 p_api_version IN NUMBER,
163 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
164 p_commit IN VARCHAR2 := FND_API.G_FALSE,
165 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
166 x_return_status OUT NOCOPY VARCHAR2,
167 x_msg_count OUT NOCOPY NUMBER,
168 x_msg_data OUT NOCOPY VARCHAR2,
169 p_srp_role_id IN NUMBER,
170 p_role_pay_group_id IN NUMBER,
171 x_srp_pay_group_id OUT NOCOPY NUMBER,
172 x_loading_status OUT NOCOPY VARCHAR2
173 );
174
175
176
177
178 -- Start of comments
179 -- API name : Update_salesrep_assignment
180 -- Type : Public.
181 -- Pre-reqs : None.
182 -- Usage : Used to create entry into cn_pay_groups
183 --
184 -- Desc : This procedure will validate the input for a pay group
185 -- and create one if all validations are passed.
186 --
187 -- Parameters :
188 -- IN : p_api_version IN NUMBER Required
189 -- p_init_msg_list IN VARCHAR2 Optional
190 -- Default = FND_API.G_FALSE
191 -- p_commit IN VARCHAR2 Optional
192 -- Default = FND_API.G_FALSE
193 -- p_validation_level IN NUMBER Optional
194 -- Default = FND_API.G_VALID_LEVEL_FULL
195 -- OUT : x_return_status OUT VARCHAR2(1)
196 -- x_msg_count OUT NUMBER
197 -- x_msg_data OUT VARCHAR2(2000)
198 -- IN : p_old_paygroup_assign_rec IN PayGroup_assign_rec,
199 -- p_paygroup_assign_rec IN PayGroup_assign_rec,
200 --
201 -- OUT : x_loading_status OUT VARCHAR2(50)
202 -- Detailed error code returned from procedure.
203 --
204 -- OUT : x_status OUT VARCHAR2(50)
205 -- Return Sql Statement Status ( VALID/INVALID)
206 --
207 -- Version : Current version 1.0
208 -- Initial version 1.0
209 --
210 -- Notes : The following are the validations performed by this API
211 -- - Checks if the old and the new pay group parameters are valid
212 -- - Checks if the assignement dates are valid.
213 -- - Checks that the assignment do not overlap.
214 --
215 -- End of comments
216 /*#
217 * This procedure is used to update the pay group assignment of a salesrep.
218 * @param p_api_version API Version
219 * @param p_init_msg_list Initialize Message List
220 * @param p_commit Commit after update
221 * @param p_validation_level Validation Level
222 * @param x_return_status Status of the update operation
223 * @param x_msg_count Number of error messages returned
224 * @param x_msg_data Error messages
225 * @param x_loading_status Status
226 * @param x_status Status
227 * @param p_old_paygroup_assign_rec Record of type PayGroup_assign_rec that stores the old data associated with pay group assignments
228 * @param p_paygroup_assign_rec Record of type PayGroup_assign_rec that stores the data associated with pay group assignments
229 * @param p_ovn Object version number of the pay group assignments
230 * @rep:scope public
231 * @rep:lifecycle active
232 * @rep:displayname Update pay group assignments
233 */
234 PROCEDURE Update_srp_assignment
235 ( p_api_version IN NUMBER,
236 p_init_msg_list IN VARCHAR2 := cn_api.g_false,
237 p_commit IN VARCHAR2 := cn_api.g_false,
238 p_validation_level IN NUMBER := cn_api.g_valid_level_full,
239 x_return_status OUT NOCOPY VARCHAR2,
240 x_msg_count OUT NOCOPY NUMBER,
241 x_msg_data OUT NOCOPY VARCHAR2,
242 p_old_paygroup_assign_rec IN PayGroup_assign_rec,
243 p_paygroup_assign_rec IN PayGroup_assign_rec,
244 p_ovn IN NUMBER,
245 x_loading_status OUT NOCOPY VARCHAR2,
246 x_status OUT NOCOPY VARCHAR2
247 );
248 /*#
249 * This procedure is used to update mass pay group assignment of salesreps.
250 * @param p_api_version API Version
251 * @param p_init_msg_list Initialize Message List
252 * @param p_commit Commit after update
253 * @param p_validation_level Validation Level
254 * @param x_return_status Status of the update operation
255 * @param x_msg_count Number of error messages returned
256 * @param x_msg_data Error messages
257 * @param x_loading_status Status
258 * @param p_srp_role_id Unique identifier of role assigned to a given salesperson
259 * @param p_role_pay_group_id Unique identifier of role assigned to a given pay group
260 * @param x_srp_pay_group_id Return the unique identifier of this assignment
261 * @rep:scope public
262 * @rep:lifecycle active
263 * @rep:displayname Update pay group mass assignments
264 */
265
266 PROCEDURE Update_Mass_Asgn_Srp_Pay
267 (
268 p_api_version IN NUMBER,
269 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
270 p_commit IN VARCHAR2 := FND_API.G_FALSE,
271 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
272 x_return_status OUT NOCOPY VARCHAR2,
273 x_msg_count OUT NOCOPY NUMBER,
274 x_msg_data OUT NOCOPY VARCHAR2,
275 p_srp_role_id IN NUMBER,
276 p_role_pay_group_id IN NUMBER,
277 x_srp_pay_group_id OUT NOCOPY NUMBER,
278 x_loading_status OUT NOCOPY VARCHAR2
279 );
280
281 END CN_Srp_PayGroup_PUB ;