1 PACKAGE CN_COMP_PLAN_PUB AS
2 /* $Header: cnpcps.pls 120.2 2005/08/11 23:55:39 rarajara ship $ */
3 /*#
4 * This package is used to create compensation plans.
5 * @rep:scope public
6 * @rep:product CN
7 * @rep:displayname Create Compensation Plan
8 * @rep:lifecycle active
9 * @rep:compatibility S
10 * @rep:category BUSINESS_ENTITY CN_COMP_PLANS
11 */
12
13 -- Comp Plan Data type for single plan element
14 TYPE comp_plan_rec_type IS RECORD
15 (
16 name cn_comp_plans.name%TYPE := CN_API.G_MISS_CHAR,
17 description cn_comp_plans.description%TYPE := CN_API.G_MISS_CHAR ,
18 start_date cn_comp_plans.start_date%TYPE := CN_API.G_MISS_DATE,
19 end_date cn_comp_plans.end_date%TYPE := CN_API.G_MISS_DATE,
20 status cn_comp_plans.status_code%TYPE := CN_API.G_MISS_CHAR,
21 rc_overlap cn_comp_plans.ALLOW_REV_CLASS_OVERLAP%TYPE
22 := CN_API.G_MISS_CHAR,
23 plan_element_name cn_quotas.name%TYPE := CN_API.G_MISS_CHAR,
24 attribute_category cn_comp_plans.attribute_category%TYPE
25 := CN_API.G_MISS_CHAR,
26 attribute1 cn_comp_plans.attribute1%TYPE := CN_API.G_MISS_CHAR,
27 attribute2 cn_comp_plans.attribute2%TYPE := CN_API.G_MISS_CHAR,
28 attribute3 cn_comp_plans.attribute3%TYPE := CN_API.G_MISS_CHAR,
29 attribute4 cn_comp_plans.attribute4%TYPE := CN_API.G_MISS_CHAR,
30 attribute5 cn_comp_plans.attribute5%TYPE := CN_API.G_MISS_CHAR,
31 attribute6 cn_comp_plans.attribute6%TYPE := CN_API.G_MISS_CHAR,
32 attribute7 cn_comp_plans.attribute7%TYPE := CN_API.G_MISS_CHAR,
33 attribute8 cn_comp_plans.attribute8%TYPE := CN_API.G_MISS_CHAR,
34 attribute9 cn_comp_plans.attribute9%TYPE := CN_API.G_MISS_CHAR,
35 attribute10 cn_comp_plans.attribute10%TYPE := CN_API.G_MISS_CHAR,
36 attribute11 cn_comp_plans.attribute11%TYPE := CN_API.G_MISS_CHAR,
37 attribute12 cn_comp_plans.attribute12%TYPE := CN_API.G_MISS_CHAR,
38 attribute13 cn_comp_plans.attribute13%TYPE := CN_API.G_MISS_CHAR,
39 attribute14 cn_comp_plans.attribute14%TYPE := CN_API.G_MISS_CHAR,
40 attribute15 cn_comp_plans.attribute15%TYPE := CN_API.G_MISS_CHAR,
41 ORG_ID CN_COMP_PLANS.ORG_ID%TYPE := NULL /* ADDED OAFWK */
42 );
43
44 -- Global variable that represent missing values.
45 G_MISS_COMP_PLAN_REC comp_plan_rec_type;
46
47 -- Comments for datatype, global constant or variables
48 TYPE plan_element_tbl_type IS TABLE OF cn_quotas.name%TYPE
49 INDEX BY BINARY_INTEGER;
50
51 G_MISS_PE_LIST plan_element_tbl_type;
52
53 -- Comp Plan Data type for multiple plan element
54 TYPE comp_plan_list_rec_type IS RECORD
55 (
56 name cn_comp_plans.name%TYPE := CN_API.G_MISS_CHAR,
57 description cn_comp_plans.description%TYPE := CN_API.G_MISS_CHAR ,
58 start_date cn_comp_plans.start_date%TYPE := CN_API.G_MISS_DATE,
59 end_date cn_comp_plans.end_date%TYPE := CN_API.G_MISS_DATE,
60 status cn_comp_plans.status_code%TYPE := CN_API.G_MISS_CHAR,
61 rc_overlap cn_comp_plans.ALLOW_REV_CLASS_OVERLAP%TYPE
62 := CN_API.G_MISS_CHAR,
63 plan_element_list plan_element_tbl_type := G_MISS_PE_LIST,
64 attribute_category cn_comp_plans.attribute_category%TYPE := CN_API.G_MISS_CHAR,
65 attribute1 cn_comp_plans.attribute1%TYPE := CN_API.G_MISS_CHAR,
66 attribute2 cn_comp_plans.attribute2%TYPE := CN_API.G_MISS_CHAR,
67 attribute3 cn_comp_plans.attribute3%TYPE := CN_API.G_MISS_CHAR,
68 attribute4 cn_comp_plans.attribute4%TYPE := CN_API.G_MISS_CHAR,
69 attribute5 cn_comp_plans.attribute5%TYPE := CN_API.G_MISS_CHAR,
70 attribute6 cn_comp_plans.attribute6%TYPE := CN_API.G_MISS_CHAR,
71 attribute7 cn_comp_plans.attribute7%TYPE := CN_API.G_MISS_CHAR,
72 attribute8 cn_comp_plans.attribute8%TYPE := CN_API.G_MISS_CHAR,
73 attribute9 cn_comp_plans.attribute9%TYPE := CN_API.G_MISS_CHAR,
74 attribute10 cn_comp_plans.attribute10%TYPE := CN_API.G_MISS_CHAR,
75 attribute11 cn_comp_plans.attribute11%TYPE := CN_API.G_MISS_CHAR,
76 attribute12 cn_comp_plans.attribute12%TYPE := CN_API.G_MISS_CHAR,
77 attribute13 cn_comp_plans.attribute13%TYPE := CN_API.G_MISS_CHAR,
78 attribute14 cn_comp_plans.attribute14%TYPE := CN_API.G_MISS_CHAR,
79 attribute15 cn_comp_plans.attribute15%TYPE := CN_API.G_MISS_CHAR
80 );
81
82 -- Global variable that represent missing values.
83 G_MISS_COMP_PLAN_LIST_REC comp_plan_list_rec_type;
84
85 -- Start of Comments
86 -- API name : Create_Comp_Plan
87 -- Type : Public.
88 -- Pre-reqs : None.
89 -- Usage : Used to create a new compensation plan with passed in plan
90 -- element or add the passed in plan element into an existing
91 -- compensation plan
92 -- Desc : Procedure to create a new compensation plan or add a plan
93 -- element to an existing compensation plan
94 -- Parameters :
95 -- IN : p_api_version IN NUMBER Require
96 -- p_init_msg_list IN VARCHAR2 Optional
97 -- Default = FND_API.G_FALSE
98 -- p_commit IN VARCHAR2 Optional
99 -- Default = FND_API.G_FALSE
100 -- p_validation_level IN NUMBER Optional
101 -- Default = FND_API.G_VALID_LEVEL_FULL
102 -- OUT : x_return_status OUT VARCHAR2(1)
103 -- x_msg_count OUT NUMBER
104 -- x_msg_data OUT VARCHAR2(2000)
105 -- IN : p_comp_plan_rec IN comp_plan_rec_type
106 -- Version : Current version 1.0
107 -- Initial version 1.0
108 --
109 -- Notes : p_comp_plan_rec.plan_element_list is not using in this
110 -- procedure
111 --
112 -- Description :
113 -- Create Comp Plan is a Public Package which allows us to create
114 -- the comp plan or assign a plan element to a comp plan.
115 -- The create API will internally checks wheather to add the comp plan or assign
116 -- the plan element or do both.
117 ------------------+
118 -- p_comp_plan_rec Input parameter to carry both comp plan and plan Element.
119 -- name Comp Plan Name, Mandatory
120 -- description Description , Optional
121 -- start_date Start Date, Mandatory
122 -- end_date End Date, Optional
123 -- status Status, default 'INCOMPLETE'
124 -- rc_overlap rc_overlap ( Y/N ) which will allow you to overlap the rev
125 -- classes.
126 -- plan_element_name Plan Element Name. Optional
127 ------------------------+
128 -- End of comments
129
130 /*#
131 * This procedure creates a compensation plan with the given specifications.
132 * It also lets the user to create a plan element assignment.
133 * @param p_api_version API version
134 * @param p_init_msg_list Initialize message list (default F)
135 * @param p_commit Commit flag (default F).
136 * @param p_validation_level Validation level (default 100).
137 * @param x_return_status Return Status
138 * @param x_msg_count Number of messages returned
139 * @param x_msg_data Contents of message if x_msg_count = 1
140 * @param p_comp_plan_rec Contents of comp plan
141 * @param x_loading_status Loading Status
142 * @param x_comp_plan_id Identifier of newly created compensation plan.
143 * @rep:scope public
144 * @rep:lifecycle active
145 * @rep:displayname Create Compensation Plan
146 */
147
148 PROCEDURE Create_Comp_Plan
149 (
150 p_api_version IN NUMBER,
151 p_init_msg_list IN VARCHAR2 := CN_API.G_FALSE,
152 p_commit IN VARCHAR2 := CN_API.G_FALSE,
153 p_validation_level IN NUMBER := CN_API.G_VALID_LEVEL_FULL,
154 x_return_status OUT NOCOPY VARCHAR2,
155 x_msg_count OUT NOCOPY NUMBER,
156 x_msg_data OUT NOCOPY VARCHAR2,
157 p_comp_plan_rec IN comp_plan_rec_type := G_MISS_COMP_PLAN_REC,
158 x_loading_status OUT NOCOPY VARCHAR2,
159 x_comp_plan_id IN OUT NOCOPY NUMBER
160 );
161
162 END CN_COMP_PLAN_PUB ;