DBA Data[Home] [Help]

PACKAGE: APPS.CN_COMP_PLAN_PUB

Source


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