DBA Data[Home] [Help]

PACKAGE: APPS.CN_PAYGROUP_PVT

Source


1 PACKAGE CN_PAYGROUP_PVT AUTHID CURRENT_USER as
2 -- $Header: cnvpgrps.pls 120.5 2005/07/26 04:31:07 sjustina noship $ --+
3 /*#
4  * The procedures in this package can be used to get pay group information, validate the input, create pay groups, update pay groups, and delete pay groups.
5  * They are also used to create entry into cn_pay_groups and to update salesrep pay group assignment.
6  * @rep:scope public
7  * @rep:product CN
8  * @rep:displayname Pay Group
9  * @rep:lifecycle active
10  * @rep:compatibility S
11  * @rep:category BUSINESS_ENTITY CN_COMP_PLANS
12  */
13 
14 TYPE PayGroup_rec_type IS RECORD
15   (  pay_group_id          cn_pay_groups.pay_group_id%TYPE := CN_API.G_MISS_ID,
16      name        	       cn_pay_groups.name%TYPE,
17      period_set_name	   cn_pay_groups.period_set_name%TYPE,
18      period_type	       cn_pay_groups.period_type%TYPE,
19      start_date		       cn_pay_groups.start_date%TYPE,
20      end_date		       cn_pay_groups.end_date%TYPE,
21      pay_group_description cn_pay_groups.pay_group_description%TYPE := NULL,
22      attribute_category    cn_pay_groups.attribute_category%TYPE := NULL,
23      attribute1            cn_pay_groups.attribute1%TYPE         := NULL,
24      attribute2            cn_pay_groups.attribute2%TYPE         := NULL,
25      attribute3            cn_pay_groups.attribute3%TYPE         := NULL,
26      attribute4            cn_pay_groups.attribute4%TYPE         := NULL,
27      attribute5            cn_pay_groups.attribute5%TYPE         := NULL,
28      attribute6            cn_pay_groups.attribute6%TYPE         := NULL,
29      attribute7            cn_pay_groups.attribute7%TYPE         := NULL,
30      attribute8            cn_pay_groups.attribute8%TYPE         := NULL,
31      attribute9            cn_pay_groups.attribute9%TYPE         := NULL,
32      attribute10           cn_pay_groups.attribute10%TYPE        := NULL,
33      attribute11           cn_pay_groups.attribute11%TYPE        := NULL,
34      attribute12           cn_pay_groups.attribute12%TYPE        := NULL,
35      attribute13           cn_pay_groups.attribute13%TYPE        := NULL,
36      attribute14           cn_pay_groups.attribute14%TYPE        := NULL,
37      attribute15           cn_pay_groups.attribute15%TYPE        := NULL,
38      object_version_number cn_pay_groups.object_version_number%TYPE := NULL,
39      org_id                cn_pay_groups.org_id%TYPE := NULL
40   );
41 
42 
43 TYPE PayGroup_tbl_type IS
44    TABLE OF PayGroup_rec_type INDEX BY BINARY_INTEGER ;
45 
46 
47 G_MISS_PAYGROUP_REC  PayGroup_rec_type;
48 
49 G_MISS_PAYGROUP_REC_TB  PayGroup_tbl_type;
50 -------------------------------------------------------------------------------------+
51 -- Start of comments
52 -- API name 	: Create_PayGroup
53 -- Type		: Public.
54 -- Pre-reqs	: None.
55 -- Usage	: Used to create pay groups
56 
57 -- Desc 	: This procedure will validate the input for a pay group
58 --		  and create one if all validations are passed.
59 
60 -- Parameters	:
61 -- IN		:  p_api_version       IN NUMBER      Required
62 -- 		   p_init_msg_list     IN VARCHAR2    Optional
63 --					  	      Default = FND_API.G_FALSE
64 -- 		   p_commit	       IN VARCHAR2    Optional
65 -- 		       	                              Default = FND_API.G_FALSE
66 -- 		   p_validation_level  IN NUMBER      Optional
67 -- 		       	                   Default = FND_API.G_VALID_LEVEL_FULL
68 -- OUT		:  x_return_status     OUT	      VARCHAR2(1)
69 -- 		   x_msg_count	       OUT	      NUMBER
70 -- 		   x_msg_data	       OUT	      VARCHAR2(2000)
71 -- IN		:  p_PayGroup_rec      IN	      PayGroup_rec
72 
73 -- OUT		:  x_loading_status    OUT            VARCHAR2(50)
74 --                 Detailed error code returned from procedure.
75 
76 -- OUT		:  x_status           OUT	      VARCHAR2(50)
77 --		      Return Sql Statement Status ( VALID/INVALID)
78 
79 -- Version	: Current version	1.0
80 --		  Initial version 	1.0
81 
82 -- Notes	: The following validations are performed by this API
83 --                Name should not be null
84 --                Period set name should not be null
85 --                Period Type should not be null
86 --                Start date should not be null
87 --                End date should not be null
88 --                Start date should be less than end date
89 --                Name, start date and end date should be unique
90 --                Period set should be valid
91 --                Period type should be valid
92 
93 -- End of comments
94 -------------------------------------------------------------------------------------+
95 /*#
96  * This procedure validates the input for a pay group and creates one if all validations are passed.
97  * @param p_api_version API Version
98  * @param p_init_msg_list Initialize Message List
99  * @param p_commit Commit after create
100  * @param p_validation_level Validation Level
101  * @param x_return_status Status of the create operation
102  * @param x_msg_count Number of error messages returned
103  * @param x_msg_data Error messages
104  * @param x_status Status
105  * @param x_loading_status Status
106  * @param p_PayGroup_rec Record of type PayGroup_rec_type that stores the data associated with pay group
107  * @rep:scope public
108  * @rep:lifecycle active
109  * @rep:displayname Create pay group
110  */
111 PROCEDURE Create_PayGroup
112 ( 	p_api_version           	IN	NUMBER,
113   	p_init_msg_list		        IN	VARCHAR2,
114 	p_commit	    		IN  	VARCHAR2,
115 	p_validation_level		IN  	NUMBER,
116 	x_return_status		        OUT NOCOPY VARCHAR2,
117 	x_msg_count		 OUT NOCOPY NUMBER,
118 	x_msg_data		 OUT NOCOPY VARCHAR2,
119 	p_PayGroup_rec   IN OUT NOCOPY    PayGroup_rec_type,
120         x_loading_status	 OUT NOCOPY     VARCHAR2,
121 	x_status                        OUT NOCOPY     VARCHAR2
122 );
123 ------------------------------------------------------------------------------------+
124 -- Start of comments
125 -- API name 	: Update_PayGroup
126 -- Type		: Public.
127 -- Pre-reqs	: None.
128 -- Usage	: Used to update pay groups
129 -- Desc 	: Procedure to update pay groups
130 -- Parameters	:
131 -- IN		:  p_api_version       IN NUMBER      Require
132 -- 		   p_init_msg_list     IN VARCHAR2    Optional
133 -- 		   	Default = FND_API.G_FALSE
134 -- 		   p_commit	       IN VARCHAR2    Optional
135 -- 		       	Default = FND_API.G_FALSE
136 -- 		   p_validation_level  IN NUMBER      Optional
137 -- 		       	Default = FND_API.G_VALID_LEVEL_FULL
138 -- OUT		:  x_return_status     OUT	      VARCHAR2(1)
139 -- 		   x_msg_count	       OUT	      NUMBER
140 -- 		   x_msg_data	       OUT	      VARCHAR2(2000)
141 -- IN		:  p_PayGroup_rec       IN	      PayGroup_rec
142 
143 -- OUT		:  x_loading_status    OUT
144 --                Detailed Error Message
145 -- OUT		:  x_status 	       OUT
146 --                   RETURN SQL Status
147 -- Version	: Current version	1.0
148 --		  Initial version 	1.0
149 -- Notes        : The following are the validations performed by this api
150 --                Start date cannot be updated to null
151 --                End date cannot be updated to null
152 --                Start date should be less than end date
153 --                The pay group to be updated should exist
154 --                Pay group effectivity cannot be shrunk to be less than assignments
155 --                Pay group name, st date and end date cannot be null
156 --                If period_set is specified, then it should not be null
157 --                If period type is specified, then it should not be null
158 -- End of comments
159 -------------------------------------------------------------------------------------+
160 /*#
161  * This API is used to update pay groups.
162  * @param p_api_version API Version
163  * @param p_init_msg_list Initialize Message List
164  * @param p_commit Commit after update
165  * @param p_validation_level Validation Level
166  * @param x_return_status Status of the update operation
167  * @param x_msg_count Number of error messages returned
168  * @param x_msg_data Error messages
169  * @param x_status Status
170  * @param x_loading_status Status
171  * @param p_PayGroup_rec Record of type PayGroup_rec_type that stores the data associated with pay group
172  * @rep:scope public
173  * @rep:lifecycle active
174  * @rep:displayname Update pay group
175  */
176    PROCEDURE  Update_PayGroup
177    (    p_api_version			IN 	NUMBER,
178   	p_init_msg_list		        IN	VARCHAR2,
179 	p_commit	    		IN  	VARCHAR2,
180 	p_validation_level		IN  	NUMBER,
181         x_return_status       	 OUT NOCOPY 	VARCHAR2,
182     	x_msg_count	           OUT NOCOPY 	NUMBER,
183     	x_msg_data		   OUT NOCOPY 	VARCHAR2,
184     	p_PayGroup_rec                  IN OUT NOCOPY      PayGroup_rec_type,
185     	x_status            	 OUT NOCOPY 	VARCHAR2,
186     	x_loading_status    	 OUT NOCOPY 	VARCHAR2
187     ) ;
188 
189 --------------------------------------------------------------------------------------+
190 -- Start of comments
191 -- API name 	: Delete_PayGroup
192 -- Type		: Public.
193 -- Pre-reqs	: None.
194 -- Usage	: Delete
195 -- Desc 	: Procedure to Delete Pay Groups
196 -- Parameters	:
197 -- IN		:  p_api_version       IN NUMBER      Require
198 -- 		   p_init_msg_list     IN VARCHAR2    Optional
199 -- 		   	Default = FND_API.G_FALSE
200 -- 		   p_commit	       IN VARCHAR2    Optional
201 -- 		       	Default = FND_API.G_FALSE
202 -- 		   p_validation_level  IN NUMBER      Optional
203 -- 		       	Default = FND_API.G_VALID_LEVEL_FULL
204 -- OUT		:  x_return_status     OUT	      VARCHAR2(1)
205 -- 		   x_msg_count	       OUT	      NUMBER
206 -- 		   x_msg_data	       OUT	      VARCHAR2(2000)
207 -- IN		:  p_PayGroup_rec 	IN            PayGroup_rec_type
208 -- OUT		:  x_loading_status    OUT
209 --                 Detailed Error Message
210 -- Version	: Current version	1.0
211 --		  Initial version 	1.0
212 -- Notes        : The following validations are done by this API
213 --                Pay group to be deleted must exist
214 -- End of comments
215 --------------------------------------------------------------------------------------+
216 /*#
217  * This API is used to delete pay groups.
218  * @param p_api_version API Version
219  * @param p_init_msg_list Initialize Message List
220  * @param p_commit Commit after delete
221  * @param p_validation_level Validation Level
222  * @param x_return_status Status of the delete operation
223  * @param x_msg_count Number of error messages returned
224  * @param x_msg_data Error messages
225  * @param x_status Status
226  * @param x_loading_status Status
227  * @param p_PayGroup_rec Record of type PayGroup_rec_type that stores the data associated with pay group
228  * @rep:scope public
229  * @rep:lifecycle active
230  * @rep:displayname Delete pay group
231  */
232  PROCEDURE  Delete_PayGroup
233    (    p_api_version			IN 	NUMBER,
234   	p_init_msg_list		        IN	VARCHAR2,
235 	p_commit	    		IN  	VARCHAR2,
236 	p_validation_level		IN  	NUMBER,
237         x_return_status       	 OUT NOCOPY 	VARCHAR2,
238     	x_msg_count	           OUT NOCOPY 	NUMBER,
239     	x_msg_data		   OUT NOCOPY 	VARCHAR2,
240     	p_PayGroup_rec                  IN OUT NOCOPY     PayGroup_rec_type ,
241     	x_status            	 OUT NOCOPY 	VARCHAR2,
242     	x_loading_status    	 OUT NOCOPY 	VARCHAR2
243     ) ;
244 
245 
246 TYPE PayGroup_assign_rec IS RECORD
247   (  employee_type	   cn_salesreps.type%TYPE,
248      employee_number       cn_salesreps.employee_number%TYPE,
249      assignment_start_date cn_srp_pay_groups.start_date%TYPE,
250      assignment_end_date   cn_srp_pay_groups.end_date%TYPE,
251      attribute_category    cn_srp_pay_groups.attribute_category%TYPE := NULL,
252      attribute1            cn_srp_pay_groups.attribute1%TYPE         := NULL,
253      attribute2            cn_srp_pay_groups.attribute2%TYPE         := NULL,
254      attribute3            cn_srp_pay_groups.attribute3%TYPE         := NULL,
255      attribute4            cn_srp_pay_groups.attribute4%TYPE         := NULL,
256      attribute5            cn_srp_pay_groups.attribute5%TYPE         := NULL,
257      attribute6            cn_srp_pay_groups.attribute6%TYPE         := NULL,
258      attribute7            cn_srp_pay_groups.attribute7%TYPE         := NULL,
259      attribute8            cn_srp_pay_groups.attribute8%TYPE         := NULL,
260      attribute9            cn_srp_pay_groups.attribute9%TYPE         := NULL,
261      attribute10           cn_srp_pay_groups.attribute10%TYPE        := NULL,
262      attribute11           cn_srp_pay_groups.attribute11%TYPE        := NULL,
263      attribute12           cn_srp_pay_groups.attribute12%TYPE        := NULL,
264      attribute13           cn_srp_pay_groups.attribute13%TYPE        := NULL,
265      attribute14           cn_srp_pay_groups.attribute14%TYPE        := NULL,
266      attribute15           cn_srp_pay_groups.attribute15%TYPE        := NULL );
267 
268 END CN_PAYGROUP_PVT ;