DBA Data[Home] [Help]

PACKAGE: APPS.CN_ROLE_PAY_GROUPS_PVT

Source


1 PACKAGE CN_ROLE_PAY_GROUPS_PVT AUTHID CURRENT_USER AS
2 /* $Header: cnvrpgps.pls 120.3 2005/08/25 03:17:44 sjustina noship $ */
3 
4 --
5 -- User defined Record Type
6 --
7 -- Note: form bug 725654 for G_MISS
8 
9 TYPE role_pay_groups_rec_type IS RECORD
10   (
11    role_pay_group_id    cn_role_pay_groups.role_pay_group_id%TYPE  := cn_api.G_MISS_ID,
12    role_name            cn_roles.name%TYPE           ,
13    pay_groups_name      cn_pay_groups.name%TYPE      ,
14    start_date           cn_role_pay_groups.start_date%TYPE  ,
15    end_date             cn_role_pay_groups.end_date%TYPE    ,
16    attribute_category   cn_role_pay_groups.attribute_category%TYPE := NULL,
17    attribute1           cn_role_pay_groups.attribute1%TYPE  := NULL,
18    attribute2           cn_role_pay_groups.attribute2%TYPE  := NULL,
19    attribute3           cn_role_pay_groups.attribute3%TYPE  := NULL,
20    attribute4           cn_role_pay_groups.attribute4%TYPE  := NULL,
21    attribute5           cn_role_pay_groups.attribute5%TYPE  := NULL,
22    attribute6           cn_role_pay_groups.attribute6%TYPE  := NULL,
23    attribute7           cn_role_pay_groups.attribute7%TYPE  := NULL,
24    attribute8           cn_role_pay_groups.attribute8%TYPE  := NULL,
25    attribute9           cn_role_pay_groups.attribute9%TYPE  := NULL,
26    attribute10          cn_role_pay_groups.attribute10%TYPE := NULL,
27    attribute11          cn_role_pay_groups.attribute11%TYPE := NULL,
28    attribute12          cn_role_pay_groups.attribute12%TYPE := NULL,
29    attribute13          cn_role_pay_groups.attribute13%TYPE := NULL,
30    attribute14          cn_role_pay_groups.attribute14%TYPE := NULL,
31    attribute15          cn_role_pay_groups.attribute15%TYPE := NULL,
32    org_id                  cn_role_pay_groups.org_Id%TYPE := NULL,
33    object_version_number   cn_role_pay_groups.object_version_number%TYPE := NULL
34   );
35 
36 --
37 -- User defined Record Table Type
38 --
39 TYPE role_pay_groups_rec_tbl_type IS TABLE OF role_pay_groups_rec_type
40   INDEX BY BINARY_INTEGER;
41 
42 --
43 -- Global variable that represent missing values.
44 --
45 G_MISS_ROLE_PAY_GROUPS_REC  role_pay_groups_rec_type;
46 --G_MISS_ROLE_PAY_GROUPS_TBL  role_pay_group_recs_tbl_type;
47 G_ROLE_NAME CONSTANT VARCHAR2(80)
48   := cn_api.get_lkup_meaning('ROLE_NAME','ROLE_OBJECT_TYPE');
49 G_PG_NAME  CONSTANT VARCHAR2(80) --LOOK AT THIS
50   := cn_api.get_lkup_meaning('PG_NAME','PG_OBJECT_TYPE');
51 G_START_DATE  CONSTANT VARCHAR2(80)
52   := cn_api.get_lkup_meaning('START_DATE','CN_OBJECT_TYPE');
53 
54 
55 -- Start of Comments
56 -- API name 	: Create_Role_Pay_Groups
57 -- Type		: Public.
58 -- Pre-reqs	: None.
59 -- Usage	: Procedure to create a sales role and pay group assignment.
60 -- Parameters	:
61 -- IN		:  p_api_version            IN NUMBER      Require
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 -- 		:  p_role_pay_groups         IN             ROLE_PLAN_REC_TYPE
69 -- OUT		:  x_return_status          OUT	           VARCHAR2(1)
70 -- 		:  x_msg_count	            OUT	           NUMBER
71 -- 		:  x_msg_data	            OUT	           VARCHAR2(2000)
72 --		:  x_loading_status	    OUT            VARCHAR2
73 --
74 --
75 -- Version	: Current version	1.0
76 --		  Initial version 	1.0
77 --
78 -- Description	: This procedure is used to create a sales role and comp plan assignment.
79 -- Notes	: 1. Role name can not be missing or null.
80 --                2. Pay group name can not be missing or null.
81 --                3. Start_date can not be missing or null.
82 --                4. Start_date <= end_date, if end_date is not null.
83 --                5. Role name must exist in cn_roles already.
84 --                6. Pay_Group_name must exist in cn_pay_groups already.
85 --                7. Date range (start_date, en_date) of the assignment must be
86 --                   within the date range (start_date, end_date) of the comp plan.
87 --                8. No pay group overlap for the any same sales role.
88 --                   In other words, you can not have more than one pay group for
89 --                   the same role at the same time.
90 --                9. Gap between two comp plans for the same role is allowed.
91 -- End of comments
92 
93 
94 PROCEDURE Create_Role_Pay_Groups
95   (  	p_api_version              IN	NUMBER				      ,
96    	p_init_msg_list		   IN	VARCHAR2 := FND_API.G_FALSE   	      ,
97 	p_commit	    	   IN  	VARCHAR2 := FND_API.G_FALSE   	      ,
98 	p_validation_level	   IN  	NUMBER	 := FND_API.g_valid_level_full,
99 	x_return_status		   OUT NOCOPY VARCHAR2		      	      ,
100 	x_loading_status           OUT NOCOPY VARCHAR2                              ,
101 	x_msg_count		   OUT NOCOPY	NUMBER			      	      ,
102 	x_msg_data		   OUT NOCOPY	VARCHAR2                      	      ,
103 	p_role_pay_groups_rec   IN OUT NOCOPY  role_pay_groups_rec_type
104 	);
105 
106 
107 
108 -- Start of Comments
109 -- API name 	: Delete_Role_Pay_Groups
110 -- Type		: Public.
111 -- Pre-reqs	: None.
112 -- Usage	: Procedure to delete a sales role and pay groups assignment.
113 -- Parameters	:
114 -- IN		:  p_api_version            IN NUMBER      Require
115 -- 		:  p_init_msg_list          IN VARCHAR2    Optional
116 -- 		   	                    Default = FND_API.G_FALSE
117 -- 		:  p_commit	            IN VARCHAR2    Optional
118 -- 		       	                    Default = FND_API.G_FALSE
119 -- 		:  p_validation_level       IN NUMBER      Optional
120 -- 		       	                    Default = FND_API.G_VALID_LEVEL_FULL
121 -- 		   p_role_pay_groups_rec    IN             ROLE_PAY_GROUPS_REC
122 -- OUT		:  x_return_status          OUT	           VARCHAR2(1)
123 -- 		:  x_msg_count	            OUT	           NUMBER
124 -- 		:  x_msg_data	            OUT	           VARCHAR2(2000)
125 --		:  x_loading_status	    OUT            VARCHAR2
126 --
127 --
128 -- Version	: Current version	1.0
129 --		  Initial version 	1.0
130 --
131 -- Description	: This procedure is used to delete a sales role and pay group assignment.
132 -- Notes	: 1. the old p_role_plan_id must be found based on the
133 --                   parameters passed in.
134 -- End of comments
135 
136 
137 PROCEDURE Delete_Role_Pay_Groups
138 (  	p_api_version              IN	NUMBER				      ,
139    	p_init_msg_list		   IN	VARCHAR2 := FND_API.G_FALSE   	      ,
140 	p_commit	    	   IN  	VARCHAR2 := FND_API.G_FALSE   	      ,
141 	p_validation_level	   IN  	NUMBER	 := FND_API.G_VALID_LEVEL_FULL,
142 	x_return_status		   OUT NOCOPY	VARCHAR2		      	      ,
143 	x_loading_status           OUT NOCOPY  VARCHAR2            	              ,
144 	x_msg_count		   OUT NOCOPY	NUMBER			      	      ,
145 	x_msg_data		   OUT NOCOPY	VARCHAR2                      	      ,
146 	p_role_pay_groups_rec IN OUT NOCOPY role_pay_groups_rec_type
147 	);
148 
149 END CN_ROLE_PAY_GROUPS_PVT;