DBA Data[Home] [Help]

PACKAGE: APPS.PA_PLAN_RES_LIST_PUB

Source


1 PACKAGE Pa_Plan_Res_List_Pub AUTHID CURRENT_USER AS
2 /* $Header: PARESLPS.pls 120.4 2006/07/24 13:51:50 dthakker noship $*/
3 /*#
4  * This package contains the public APIs for project planning resource information.
5  * @rep:scope public
6  * @rep:product PA
7  * @rep:lifecycle active
8  * @rep:displayname Planning Resource List API
9  * @rep:compatibility S
10  * @rep:category BUSINESS_ENTITY PA_PROJ_PLANNING_RESOURCE
11  * @rep:doccd 120pjapi.pdf See the Oracle Projects API's, Client Extensions, and Open Interfaces Reference
12 */
13 /*
14 * *********************************************************************
15 * Package Name: Pa_Plan_Res_List_Pub
16 * Description:
17 *  This AMG package has 2 ways that it can be used depending on
18 *  customer needs and/or limitations of third party software:
19 *
20 *   1) Directly calling the Create_Resource_List() and Update_Resource_list() apis
21 *     passing it pl/sql records and tables and receiving back
22 *     the resource_list_id, resource_format_id, and resource_list_member_id's via
23 *     pl/sql table.
24 *
25 *   2) Calling the Following sequence of apis:
26 *      To add new Resource List:
27 *            i) Init_Create_Resource_List()  - required
28 *           ii) Load_Resource_List()         - required
29 *          iii) Load_Resource_Format()       - optional
30 *           iv) Load_Planning_Resource()     - optional
31 *            v  Exec_Create_Resource_List()  - required
32 *           vi) Fetch_Resource_List()        - optional
33 *          vii) Fetch_Plan_Format()          - optional
34 *        viii)  Fetch_Resource_List_Member() - optional
35 *       To Update the current Resource List:
36 *            i) Init_Update_Resource_List()  - required
37 *           ii) Load_Resource_List()         - optional
38 *          iii) Load_Resource_Format()       - optional
39 *           iv) Load_Planning_Resource()     - optional
40 *            v  Exec_Update_Resource_List()  - required
41 *           vi) Fetch_Resource_List()        - optional
42 *         vii)  Fetch_Plan_Format()          - optional
43 *         viii) Fetch_Resource_List_Member() - optional
44 *
45 *   Init procedure needs to be called explicitly before calling
46 *   any Load-Execute-Fetch procedures.
47 *
48 *   On any error or failed validation the processing will stop and
49 *   all insertion, updates, deletions will be undone and will not
50 *   be saved.
51 * ********************************************************************
52 */
53 
54    -- Standard who
55    g_last_updated_by              NUMBER(15)   := FND_GLOBAL.USER_ID;
56    g_last_update_date             DATE         := SYSDATE;
57    g_creation_date                DATE         := SYSDATE;
58    g_created_by                   NUMBER(15)   := FND_GLOBAL.USER_ID;
59    g_last_update_login            NUMBER(15)   := FND_GLOBAL.LOGIN_ID;
60    g_pkg_name            CONSTANT VARCHAR2(30) := 'PA_PLAN_RES_LIST_PUB';
61    g_api_version_number  CONSTANT NUMBER       := 1.0;
62 
63 /**********************************************************************************
64 * Plan_Res_List_IN_Rec
65 * Description :
66 *  This is the planning resource list record structure. You need to
67 *  pass the planning resource list record whenever you are creating
68 *  a new planning resource list, or when you are updating an existing
69 *  planning resource list. The attributes which are defaulted need to be
70 *  passed in only if there is need to modify them.
71 * Attributes:
72 *   p_resource_list_id      : Resource List Identifier.  To be passed
73 *                             only if you are updating the Resource List.
74 *                             Get the Value from view PA_RESOURCE_LISTS_V
75 *   p_resource_list_name    : Resource List Name.
76 *   p_description           : Descriptoin of the Resource List.
77 *   p_start_date            : Start Date of the Resource List. Must pass in
78 *                             during Resource List Creation.
79 *   p_end_date              : End Date of the Resource List.
80 *   p_job_group_id          : Job Group Id of the Job attached to the
81 *                             resource list.  Get the Value from view
82 *                             PA_JOBS_VIEW
83 *   p_job_group_name        : Job Group Name of the Job attached to
84 *                             the resource list. You can either pass
85 *                             the name or p_job_group_id.
86 *   p_use_for_wp_flag       : Flag to indicate if the Resource List
87 *                             will be used for workplan.
88 *                             'Y' : Resource List will be used for workplan
89 *                             'N' : Resource List will not be used in workplan
90 *   p_control_flag          : Flag to indicate whether the resource list is
91 *                             centrally controlled or Project specific
92 *                             'Y' : Resource List is centrally controlled.
93 *                             'N' : Resource List is project specific.
94 *   p_record_version_number : Record Version Number of the Resource List.
95 * *********************************************************************************/
96 TYPE Plan_Res_List_IN_Rec IS RECORD
97      (p_resource_list_id       Number         Default PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
98       p_resource_list_name     VARCHAR2(240)  Default PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
99       p_description            VARCHAR2(255)  Default PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
100       p_start_date             DATE           DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_DATE,
101       p_end_date               DATE           DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_DATE,
102       p_job_group_id           NUMBER         DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
103       p_job_group_name         VARCHAR2(30)   DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
104       p_use_for_wp_flag        VARCHAR2(1)    DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
105       p_control_flag           VARCHAR2(1)    DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
106       p_record_version_number  NUMBER         DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM);
107 
108 
109 
110 
111  /**********************************************************************************
112  * Record : Plan_Res_List_OUT_Rec
113  * Description :
114  *    This is the planning resource list record structure which stores the
115  *    resource list identifier of the newly created planning resource list as
116  *    an out parameter. This resource list identifier value will be passed while
117  *    creating resource formats and resource list members.
118  *  Attributes:
119  *    X_resource_list_id  : Resource List indentifier of newly created
120  *                            planning resource list.
121  **********************************************************************************/
122  TYPE Plan_Res_List_OUT_Rec IS RECORD(
123    X_resource_list_id      NUMBER);
124 
125 
126 
127 
128  /************************************************************************************
129  * Record : Plan_RL_Format_In_Rec
130  * Description :
131  *    This is the planning resource list format structure. You need to
132  *  pass the planning resource list format record whenever you are
133  *  creating a new resource format . Updating resource format allows
134  *  either addition or deletion of resource formats.
135  * Attributes:
136  *  P_Res_Format_Id     : Resource Format Identifier. To be passed
137  *                        if you are adding a new resource
138  *                        format to the resource list.
139  *                        You can get the value from PA_RES_FORMATS_AMG_V.
140  *************************************************************************************/
141 
142  TYPE Plan_RL_Format_In_Rec IS RECORD(
143     P_Res_Format_Id        NUMBER DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM);
144 
145 
146 
147 
148 
149  /************************************************************************************
150  * Record : Plan_RL_Format_Out_Rec
151  * Description :
152  *  This is the planning resource format record structure which stores the
153  *  resource list format identifier of the newly created resource list
154  *  format as an out parameter.
155  * Attributes:
156  *  X_Plan_RL_Format_Id      : Planning Resource format identifier of the newly created
157  *                             planning resource format.
158  *  X_Record_Version_Number  : Record Version Number of the resource format.
159  *  x_return_status          : Indicates whether the creation of planning resource
160  *                             list was successful or not. It can take any of
161  *                             these values.
162  *                             'S' : Success
163  *                             'U' : Unexpected Error
164  *                             'E' : Error
165  *************************************************************************************/
166  TYPE Plan_RL_Format_Out_Rec IS RECORD(
167    X_Plan_RL_Format_Id      NUMBER,
168    X_Record_Version_Number  NUMBER);
169 
170 
171 
172  /*************************************************************************************
173  * Table of records
174  * Table : Plan_RL_Format_In_Tbl
175  *************************************************************************************/
176 TYPE Plan_RL_Format_In_Tbl IS TABLE OF Plan_RL_Format_In_Rec
177  INDEX BY BINARY_INTEGER;
178 
179 
180 
181 
182  /**************************************************************************************
183  * Table of records
184  * Table : Plan_RL_Format_Out_Tbl
185  **************************************************************************************/
186 TYPE Plan_RL_Format_Out_Tbl IS TABLE OF Plan_RL_Format_Out_Rec
187  INDEX BY BINARY_INTEGER;
188 
189 
190 
191 
192  /******************************************************************************************************
193  * Record Structure Declaration
194  * Record : PLANNING_RESOURCE_IN_REC
195  * Description :
196  *  This is the planning resource list memeber record structure. You need to
197  *  pass the resource list member record whenever you are creating a new
198  *  planning resource list member, or when you are updating an existing
199  *  planning resource list member. The attributes which are defaulted to null need
200  *  not be passed in unless they are modified and need to be updated.
201  * Attributes :
202  *  p_resource_list_member_id     : Optional. Resource list member identifier. To be passed
203  *                                  only if you are updating the resource list
204  *                                  member of the resource list.
205  *  p_resource_alias              : Alias name of the resource.
206  *  p_person_id                   : This contains value if the resource is of type NAMED_PERSON.
207  *                                  It contains the identifier of the selected resource.
208  *  p_person_name                 : This contains value if the resource is of type NAMED_PERSON. It
209  *                                  contains the person name.
210  *  p_job_id                      : This contains value if the resource is of type JOB. It contains
211  *                                  the identifier of the job.
212  *  p_job_name                    : This contains value if the resource is of type JOB.
213  *                                  It holds the name of the selected resource.
214  *  p_organization_id             : This contins value if the resource is of type ORGANIZATION.
215  *                                  It holds the identifier of the selected resource.
216  *                                  This sets the value for organization_id of pa_resource_list_members
217  *                                  table.
218  *  p_organization_name           : This contains value if the resource is of type ORGANIZATION.
219  *                                  It holds the name of the selected resource.
220  *  p_vendor_id                   : This holds the vendor identifier.
221  *                                  This sets the value of VENDOR_ID of pa_resource_list_members
222  *                                  table.
223  *  p_vendor_name                 : This holds the name of the vendor.
224  *  p_fin_category_name           : This holds the name of finacial category.
225  *  p_non_labor_resource          : This contains value if the resource is of type NON_LABOR_RESOURCE.
226  *                                  This holds the name of non labor resource.
227  *  p_project_role_id             : This contains value if the resource is of type ROLE.
228  *                                  It holds the identifier of the selected resource.
229  *  p_project_role_name           : This contains value if the resource is of type ROLE.
230  *                                  It holds the name of the selected resource.
231  *  p_resource_class_id           : This contains the identifier of the resource class to
232  *                                  which the resource belongs to.
233  *                                  It can take the following vaues:
234  *                                  1,2,3 or 4.
235  *  p_resource_class_code         : This contains the code of the resource class to
236  *                                  which the resource belongs to.
237  *                                  It can take the following values:
238  *                                    EQUIPMENT
239  *                                    FINANCIAL ELEMENTS,
240  *                                    MATERIAL ITEMS or
241  *                                    PEOPLE.
242  *  p_res_format_id               : It should be passed in during creation of a planning
243  *                                  resource list member. This holds the planning resource format id to
244  *                                  which the resource belongs to.
245  *  p_spread_curve_id             : Optional.This is the planning attribute which defines the way cost or
246  *                                  revenue amounts are distributed across periods for financial planning.
247  *                                  This holds the identifier of the spread curves available.
248  *                                  p_spread_curve_id sets the value for spread_curve_id of
249  *                                  pa_resource_list_members table. If p_spread_curve_id is NULL then
250  *                                  spread_curve_id is set to its default value
251  *                                  decided by the resource class passed in.
252  *                                  If p_spread_curve_id is NOT NULL then spread_curve_id is set to
253  *                                  whatever is passed.
254  *  p_etc_method_code             : Optional.The Users can setup Esitmate to Complete(ETC) Methods by
255  *                                  resource.
256  *                                  This planning attribute holds the corresponding ETC code.
257  *                                  p_etc_method_code sets the value for etc_method_code of
258  *                                  pa_resource_list_members table. If p_etc_method_code is NULL then
259  *                                  etc_method_code is set to its default value
260  *                                  decided by the resource class passed in.
261  *                                  If p_etc_method_code is NOT NULL then etc_method_code is set to
262  *                                  whatever is passed.
263  *  p_mfc_cost_type_id            : Optional. It holds the identifier of manufacturing cost type.
264  *                                  Initially it sets the value for mfc_cost_type_id of
265  *                                  pa_resource_list_members
266  *                                  table with whatever passed in p_mfc_cost_type_id.
267  *                                  If p_mfc_cost_type_id is NULL and
268  *                                  the resource type is either BOM EQUIPMENT or BOM_LABOR or
269  *                                  INVENTORY_ITEM then mfc_cost_type_id is set to its default value
270  *                                  decided by the resource class.
271  *                                  else mfc_cost_type_id is set to null.
272  *  p_fc_res_type_code            : It will decide the value for wp_eligible_flag of
273  *                                  pa_resurce_list_members table. Based on this code wp_eligible_flag
274  *                                  is set to either 'Y' or 'N'.
275  *                                  If p_fc_res_type_code is either 'REVENUE_CATEGORY' or 'EVENT_TYPE'
276  *                                  then wp_eligible_flag will hold 'N' else it will hold 'Y'.
277  *  p_inventory_item_id           : This contains value if the resource is of type ITEM. It contains
278  *                                  the identifier of the the resource.
279  *  p_inventory_item_name         : This contains value if the resource is of type ITEM.
280  *                                  It holds the name of the selected resource.
281  *  p_item_category_id            : This contains value if the resource is of type ITEM CATEGORY.
282  *                                  It holds the identifier of the selected resource.
283  *  p_item_category_name          : This contains value if the resource is of type ITEM CATEGORY.
284  *                                  It holds the name of the selected resource.
285  *  p_attribute_category          : Holds the attribute category name.
286  *  p_attribute1 to p_attribute30 : These are descriptive flexfields which allow users to define
287  *                                  additional information for each planning resource.
288  *  p_person_type_code            : This contains value if the resource is of type PERSON_TYPE.
289  *                                  This will hold person type code or name.
290  *  p_bom_resource_id             : This contains value if the resource is of type BOM_LABOR or
291  *                                  BOM_EQUIPMENT.
292  *                                  It holds the identifier of the selected resource.
293  *  p_bom_resource_name           : This contains value if the resource is of type BOM_LABOR or
294  *                                  BOM_EQUIPMENT.
295  *                                  It holds the name of the selected resource.
296  *  p_team_role                   : This contains value if the resource is of type NAMED_ROLE.
297  *                                  It holds the name or code of the team role.
298  *  p_incur_by_res_code           : This contains value if the resource belongs to format having
299  *                                  Incurred By Resource as planning resource element.
300  *                                  It holds the code of the selected resource
301  *  p_incur_by_res_type           : This contains value if the resource belongs to format having
302  *                                  Incurred By Resource as planning resource element.
303  *                                  It holds the type of the selected resource.
304  *  p_record_version_number       : Required. It is the record version number of the resource list member.
305  *                                  It has significance
306  *                                  only during update of resource list member.
307  *  p_project_id                  : Required. It holds the project id for project specific resources.
308  *                                  It determines the value for object_type and object_id of
309  *                                  pa_resource_list_members table.
310  *                                  If project_id is not NULL object_type and object_id takes values
311  *                                  'PROJECT' and project_id.
312  *                                  If project_id is NULL then it takes 'RESOURCE_LIST' and
313  *                                  p_resource_list_id as object_type and object_id.
314  *  p_enabled_flag                : Optional. This flag indicates whether the resource member is enabled
315  *                                  or not. The value need not be passed unless you want to modify its
316  *                                  value during update.
317  *                                  Enabled_Flag will always be 'Y' during creation of a resource list
318  *                                  member.
319  *                                  'Y': The resource list member is enabled.
320  *                                  'N': The resource list member is disabled.
321  *******************************************************************************************************/
322 TYPE Planning_Resource_In_Rec IS RECORD
323 (
324          p_resource_list_member_id   NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
325          p_resource_alias            VARCHAR2(80)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
326          p_person_id                 NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
327          --Bug 3593613
328          p_person_name               VARCHAR2(240)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
329          p_job_id                    NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
330          --Bug 3593613
331          p_job_name                  VARCHAR2(240)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
332          p_organization_id           NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
333          p_organization_name         VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
334          p_vendor_id                 NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
335          --Bug 3593613
336          p_vendor_name               VARCHAR2(240)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
337          p_fin_category_name         VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
338          p_non_labor_resource        VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
339          p_project_role_id           NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
340          --Bug 3593613
341          p_project_role_name         VARCHAR2(80)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
342          p_resource_class_id         NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
343          p_resource_class_code       VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
344          p_res_format_id             NUMBER        ,
345          p_spread_curve_id           NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
346          p_etc_method_code           VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
347          p_mfc_cost_type_id          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
348          p_fc_res_type_code          VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
349          p_inventory_item_id         NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
350          --Bug 3593613
351          p_inventory_item_name       VARCHAR2(80)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
352          p_item_category_id          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
353          p_item_category_name        VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
354          p_attribute_category        VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
355          p_attribute1                VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
356          p_attribute2                VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
357          p_attribute3                VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
358          p_attribute4                VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
359          p_attribute5                VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
360          p_attribute6                VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
361          p_attribute7                VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
362          p_attribute8                VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
363          p_attribute9                VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
364          p_attribute10               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
365          p_attribute11               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
366          p_attribute12               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
367          p_attribute13               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
368          p_attribute14               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
369          p_attribute15               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
370          p_attribute16               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
371          p_attribute17               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
372          p_attribute18               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
373          p_attribute19               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
374          p_attribute20               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
375          p_attribute21               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
376          p_attribute22               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
377          p_attribute23               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
378          p_attribute24               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
379          p_attribute25               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
380          p_attribute26               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
381          p_attribute27               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
382          p_attribute28               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
383          p_attribute29               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
384          p_attribute30               VARCHAR2(150) DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
385          p_person_type_code          VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
386          p_bom_resource_id           NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
387          p_bom_resource_name         VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
388          p_team_role                 VARCHAR2(80)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
389          p_incur_by_res_code         VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
390          p_incur_by_res_type         VARCHAR2(30)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
391          p_record_version_number     NUMBER DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
392          p_project_id                NUMBER  ,
393          p_enabled_flag              Varchar2(1)  DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR
394 );
395 
396 
397  /*****************************************************************************
398  * Record Structure Declaration
399  * Record : PLANNING_RESOURCE_OUT_REC
400  * Description :
401  *  This is the planning resource list member record structure which
402  *  stores the resource list member identifier of the newly created
403  *  resource list member as an out parameter.
404  * Attributes:
405  *  x_resource_list_member_id  : Resource list member identifier of
406  *                               the newly created resource list member.
407  *  x_record_version_number    : Record version number of the resource
408  *                               list member.
409  *****************************************************************************/
410 TYPE Planning_Resource_Out_Rec IS RECORD
411 (  x_resource_list_member_id   NUMBER        DEFAULT NULL,
412    x_record_version_number     NUMBER        DEFAULT NULL);
413 
414 
415 
416 
417  /***************************************************************************
418  * Table of records
419  * Table : PLANNING_RESOURCE_IN_TBL
420  ***************************************************************************/
421 TYPE Planning_Resource_In_Tbl IS TABLE OF Planning_Resource_In_Rec
422  INDEX BY BINARY_INTEGER;
423 
424 
425 
426 
427  /*****************************************************************************
428  * Table of records
429  * Table : PLANNING_RESOURCE_OUT_TBL
430  ****************************************************************************/
431 TYPE Planning_Resource_Out_Tbl IS TABLE OF Planning_Resource_Out_Rec
432  INDEX BY BINARY_INTEGER;
433 
434 
435 
436 
437 --DECLARE Global Recs and Tables
438 
439 --If the event data is input in scalar form these will put into these
440 --global PL/SQL tables before resource list,formats and members can be
441 --created or updated.
442 G_Plan_Res_List_IN_Rec           Plan_Res_List_IN_Rec;
443 G_Plan_Res_List_Out_Rec          Plan_Res_List_Out_Rec;
444 --Declare a global rec struc similar to Plan_Res_List_IN_Rec
445 -- and Plan_Res_List_Out_Rec which will be empty and which
446 --Can be assigned to G_Plan_Res_List_IN_Rec, G_Plan_Res_List_Out_Rec
447 --while initializing.
448 G_Res_List_empty_rec             Plan_Res_List_IN_Rec;
449 G_Res_List_empty_out_rec         Plan_Res_List_Out_Rec;
450 --Declare global pl/sql tables for the formats.
451 G_Plan_RL_format_In_Tbl          Plan_RL_Format_In_Tbl;
452 G_Plan_RL_format_Out_Tbl         Plan_RL_Format_Out_Tbl;
453 --Declare global pl/sql tables for the Resources.
454 G_Planning_resource_in_tbl       Planning_Resource_In_Tbl;
455 G_Planning_resource_out_tbl      Planning_Resource_out_Tbl;
456 --Initialize global var to store table count.
457 G_Plan_RL_Format_tbl_count       NUMBER := 0;
458 G_Plan_Resource_tbl_count        NUMBER := 0;
459 
460  /************************************************************************************
461  * API Name          : Create_Resource_List
462  * Public/Private    : Public
463  * Procedure/Function: Procedure
464  * Description       : AMG API, used to create a resource list
465  *                     and its corresponding members and formats.
466  *                      - First it would create a Resource List.
467  *                        If Creation of the resource list is not
468  *                        successful then rollback all the changes and return.
469  *                      - If the resource list is created successfully then
470  *                        go ahead and create resource formats if they are passed in as
471  *                        parameters to the API. If any format cannot be added to the
472  *                        resource list, the API will error out.
473  *                      - If the formats are added successfully, it will then process
474  *                        the planning resources. If creation of any planning resource
475  *                        errors out, the API will error out.
476  * IN Parameters    :
477  *  p_commit                    - Optional. By default no commit will take place.
478  *  p_init_msg_list             - Optional. By default the error msg stack
479  *                                is not initialized.
480  *  p_api_version_number        - Required. The api version number.
481  *  P_plan_res_list_Rec         - Required. The record structure which holds the details
482  *                                of the resource list to be created. See the package
483  *                                specification for record structure details.
484  *                                Following parameters must be passed in the record structure:
485  *                                resource_list_name
486  *                                start_date
487  *                                Optionally pass the following parameters :
488  *                                description, end_date, job_group_id,
489  *                                job_group_name, use_for_wp_flag and control_flag
490  *  P_Plan_RL_Format_Tbl        - Required. This holds the values for resource formats.
491  *                                See the package specification record structure for details.
492  *  P_Planning_resource_out_tbl - Required. This holds the planning resource list members.
493  *                                See the package specification for
494  *                                record structure details.
495  * OUT Parameters   :
496  *  X_plan_res_list_Rec         - This will hold the resource list identifier values
497  *                                populated when new resource list are succesfully created.
498  *  X_Plan_RL_Format_Tbl        - This will hold the resource format identifier values
499  *                                populated when new resource formats are successfully created.
500  *  X_planning_resource_out_tbl - This will hold the resource list member idenfier
501  *                                populated when new resource list members are
502  *                                succesfully created.
503  *  X_Return_Status             - Will return a value of 'S' when the API is
504  *                                successful in creating the Resource list along with
505  *                                the corresponding resource formats and members.
506  *                                Will return a value of 'E' when the API fails
507  *                                due to a validation error or when any of the API's
508  *                                called from within fails.
509  *                                Will return a value of 'U' when the API hits
510  *                                and unexpected error(Some ORA or such error).
511  *  X_Msg_Count                 - Depending on the P_Init_Msg_List parameter value
512  *                                this paramenter may have a value of 1 or higher.
513  *  X_Msg_Data                  - The parameter will hold a message if there is an
514  *                                error in this API.
515  *
516  *************************************************************************************************/
517 /*#
518  * This API is used to create resource lists, corresponding resource formats and resource list members.
519  * @param p_commit API standard (default = F): indicates if the transaction will be committed
520  * @param p_init_msg_list API standard (default = F): indicates if message stack will be initialized
521  * @param p_api_version_number API standard: version number
522  * @rep:paraminfo {@rep:required}
523  * @param p_plan_res_list_rec Record structure that holds the details of the resource list to be created
524  * @rep:paraminfo {@rep:required}
525  * @param x_plan_res_list_rec Resource list identifier values
526  * @rep:paraminfo {@rep:required}
527  * @param p_plan_rl_format_tbl Record structure that holds resource formats
528  * @rep:paraminfo {@rep:required}
529  * @param x_plan_rl_format_tbl Resource format identifier values
530  * @rep:paraminfo {@rep:required}
531  * @param p_planning_resource_in_tbl Table of planning resources
532  * @rep:paraminfo {@rep:required}
533  * @param x_planning_resource_out_tbl Table of resource list member identifier
534  * @rep:paraminfo {@rep:required}
535  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
536  * @rep:paraminfo {@rep:precision 1} {@rep:required}
537  * @param x_msg_count API standard: number of error messages
538  * @rep:paraminfo {@rep:required}
539  * @param x_msg_data API standard: error message
540  * @rep:paraminfo {@rep:precision 2000} {@rep:required}
541  * @rep:scope public
542  * @rep:lifecycle active
543  * @rep:displayname Create Project Planning Resource List
544  * @rep:compatibility S
545 */
546 PROCEDURE Create_Resource_List
547      (p_commit                    IN           VARCHAR2 := FND_API.G_FALSE,
548       p_init_msg_list             IN           VARCHAR2 := FND_API.G_FALSE,
549       p_api_version_number        IN           NUMBER,
550       P_plan_res_list_Rec         IN           Plan_Res_List_IN_Rec,
551       X_plan_res_list_Rec         OUT NOCOPY   Plan_Res_List_OUT_Rec,
552       P_Plan_RL_Format_Tbl        IN           Plan_RL_Format_In_Tbl,
553       X_Plan_RL_Format_Tbl        OUT NOCOPY   Plan_RL_Format_Out_Tbl,
554       P_planning_resource_in_tbl  IN           Planning_Resource_In_Tbl,
555       X_planning_resource_out_tbl OUT NOCOPY   Planning_Resource_Out_Tbl,
556       X_Return_Status             OUT NOCOPY   VARCHAR2,
557       X_Msg_Count                 OUT NOCOPY   NUMBER,
558       X_Msg_Data                  OUT NOCOPY   VARCHAR2);
559 
560 
561 
562 
563 
564 
565  /*****************************************************************************************
566  * API Name          : Update_Resource_List
567  * Public/Private    : Public
568  * Procedure/Function: Procedure
569  * Description : AMG API, used to update a resource list
570  *               and its corr members and formats.
571  *               - It will first update the resource list by call
572  *                 to pa_create_Resource.Update_resource_List API.
573  *               - Then it would Create the resource format which is passed
574  *                 in as a table.Updation of a resource format is not possible.
575  *                 Deletions happens through a seperate API.
576  *               - Next the API will create/Update the resource members
577  *                 based on the table of resource members passed.
578  *               - If the resource list member already exists in the
579  *                 pa_resource_list_members table then the API will update the
580  *                 record with the newly passed in values.
581  *               - If the resource list member does not exist then t he API
582  *                 will create the records.
583  * IN Parameters    :
584  *  p_commit                    - Optional. By default no commit will take place.
585  *  p_init_msg_list             - Optional. By default the error msg stack
586  *                                is not initialized.
587  *  p_api_version_number        - Required. The api version number.
588  *  P_plan_res_list_Rec         - Required. See the package specification for
589  *                                record structure details.
590  *  P_Plan_RL_Format_Tbl        - Required. This holds the values for resource formats.
591  *                                See the package specification record structure for details.
592  *  P_Planning_resource_in_tbl  - Required. This holds the planning resource list members.
593  *                                See the package specification for
594  *                                record structure details.
595  * OUT Parameters   :
596  *  X_plan_res_list_Rec         - This will hold the resource list identifier values
597  *                                populated when a new resource list is succesfully created.
598  *                                No value will be populated in this record during updation
599  *                                of already
600  *                                existing resource list.
601  *  X_Plan_RL_Format_Tbl        - This will hold the resource format identifier values
602  *                                populated when a new resource format is successfully created.
603  *                                No value will be populated in this record during deleting
604  *                                of already existing resource format.
605  *  X_planning_resource_out_tbl - This will hold the resource list member idenfier
606  *                                populated when a new resource list member is
607  *                                succesfully created.
608  *                                No value will be populated in this record during updation
609  *                                of already
610  *                                existing resource list member.
611  *  X_Return_Status             - Will return a value of 'S' when the API is
612  *                                successful in updating the resource list.
613  *                                Will return a value of 'E' when the API fails
614  *                                due to a validation error.
615  *                                Will return a value of 'U' when the API hits
616  *                                and unexpected error(Some ORA or such error).
617  *  X_Msg_Count                 - Depending on the P_Init_Msg_List parameter value
618  *                                this paramenter may have a value of 1 or higher.
619  *  X_Msg_Data                  - The parameter will hold a message if there is an
620  *                                error in this API.
621  ***********************************************************************************************/
622 /*#
623  * This API is used to update a resource list, corresponding resource formats and planning resources.
624  * Updation of a resource format is not possible.
625  * @param p_commit API standard (default = F): indicates if the transaction will be committed
626  * @param p_init_msg_list API standard (default = F): indicates if message stack will be initialized
627  * @param p_api_version_number API standard: version number
628  * @rep:paraminfo {@rep:required}
629  * @param p_plan_res_list_rec Record structure for resource list containing attributes to be updated
630  * @rep:paraminfo {@rep:required}
631  * @param x_plan_res_list_rec Resource list identifier values
632  * @rep:paraminfo {@rep:required}
633  * @param p_plan_rl_format_tbl Table of resource formats to be added to the resource list
634  * @rep:paraminfo {@rep:required}
635  * @param x_plan_rl_format_tbl Resource format identifier values
636  * @rep:paraminfo {@rep:required}
637  * @param p_planning_resource_in_tbl Table of planning resources
638  * @rep:paraminfo {@rep:required}
639  * @param x_planning_resource_out_tbl Table of resource list member identifier
640  * @rep:paraminfo {@rep:required}
641  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
642  * @rep:paraminfo {@rep:precision 1} {@rep:required}
643  * @param x_msg_count API standard: number of error messages
644  * @rep:paraminfo {@rep:required}
645  * @param x_msg_data API standard: error message
646  * @rep:paraminfo {@rep:precision 2000} {@rep:required}
647  * @rep:scope public
648  * @rep:lifecycle active
649  * @rep:displayname Update Project Planning Resource List
650  * @rep:compatibility S
651 */
652 PROCEDURE Update_Resource_List
653      (p_commit                     IN              VARCHAR2 := FND_API.G_FALSE,
654       p_init_msg_list              IN              VARCHAR2 := FND_API.G_FALSE,
655       p_api_version_number         IN              NUMBER,
656       P_plan_res_list_Rec          IN              Plan_Res_List_IN_Rec,
657       X_plan_res_list_Rec          OUT    NOCOPY   Plan_Res_List_OUT_Rec,
658       P_Plan_RL_Format_Tbl         IN              Plan_RL_Format_In_Tbl,
659       X_Plan_RL_Format_Tbl         OUT    NOCOPY   Plan_RL_Format_Out_Tbl,
660       P_planning_resource_in_tbl   IN              Planning_Resource_In_Tbl,
661       X_planning_resource_out_tbl  OUT    NOCOPY   Planning_Resource_Out_Tbl,
662       X_Return_Status              OUT    NOCOPY   VARCHAR2,
663       X_Msg_Count                  OUT    NOCOPY   NUMBER,
664       X_Msg_Data                   OUT    NOCOPY   VARCHAR2);
665 
666 
667 
668 
669  /*********************************************************************************
670  * Procedure : Delete_Resource_List
671  * Public/Private    : Public
672  * Procedure/Function: Procedure
673  * Description : AMG API, used to Delete a planning resource list
674  *               and its corresponding resource formats and planning resources.
675  *
676  * IN Parameters    :
677  *  p_commit                    - Optional. By default no commit will take place.
678  *  p_init_msg_list             - Optional. By default the error msg stack
679  *                                is not initialized.
680  *  p_api_version_number        - Required. The api version number.
681  *  P_Res_List_Id               - Required. The resource list identifier. You
682  *                                can get the value from view
683  *                                PA_RESOURCE_LISTS_V.
684  *
685  * OUT Parameters   :
686  *  X_Return_Status             - Will return a value of 'S' when the API is
687  *                                successful in deleting the resource list.
688  *                                Will return a value of 'E' when the API fails
689  *                                due to a validation error.
690  *                                Will return a value of 'U' when the API hits
691  *                                and unexpected error(Some ORA or such error).
692  *  X_Msg_Count                 - Depending on the P_Init_Msg_List parameter value
693  *                                this paramenter may have a value of 1 or higher.
694  *  X_Msg_Data                  - The parameter will hold a message if there is an
695  *                                error in this API.
696  *********************************************************************************/
697 /*#
698  * This API is used to delete a planning resource list and its corresponding resource formats and planning resources.
699  * @param p_commit API standard (default = F): indicates if the transaction will be committed
700  * @param p_init_msg_list API standard (default = F): indicates if message stack will be initialized
701  * @param p_api_version_number API standard: version number
702  * @rep:paraminfo {@rep:required}
703  * @param p_res_list_id Resource list identifier
704  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
705  * @rep:paraminfo {@rep:precision 1} {@rep:required}
706  * @param x_msg_count API standard: number of error messages
707  * @rep:paraminfo {@rep:required}
708  * @param x_msg_data API standard: error message
709  * @rep:paraminfo {@rep:precision 2000} {@rep:required}
710  * @rep:scope public
711  * @rep:lifecycle active
712  * @rep:displayname Delete Project Planning Resource List
713  * @rep:compatibility S
714 */
715 PROCEDURE Delete_Resource_List(
716        p_commit                     IN           VARCHAR2 := FND_API.G_FALSE,
717        p_init_msg_list              IN           VARCHAR2 := FND_API.G_FALSE,
718        p_api_version_number         IN           NUMBER,
719        P_Res_List_Id                IN           NUMBER   ,
720        X_Return_Status              OUT NOCOPY   VARCHAR2,
721        X_Msg_Count                  OUT NOCOPY   NUMBER,
722        X_Msg_Data                   OUT NOCOPY   VARCHAR2);
723 
724 
725 
726  /*******************************************************************************************
727  * Procedure   : Delete_Plan_RL_Format
728  * Public/Private    : Public
729  * Procedure/Function: Procedure
730  * Description : Call this API to delete any planning resource format
731  *               from the resource list.
732  * IN Parameters    :
733  *  p_commit                    - Optional. By default no commit will take place.
734  *  p_init_msg_list             - Optional. By default the error msg stack
735  *                                is not initialized.
736  *  P_Res_List_Id               - Required. The resource list identifier.
737  *  P_Plan_RL_Format_Tbl        - Required. This holds the values for resource formats.
738  *                                See the package specification record structure for details.
739  *
740  * OUT Parameters   :
741  *  X_Return_Status             - Will return a value of 'S' when the API is
742  *                                successful in deleting the resource format.
743  *                                Will return a value of 'E' when the API fails
744  *                                due to a validation error.
745  *                                Will return a value of 'U' when the API hits
746  *                                and unexpected error(Some ORA or such error).
747  *  X_Msg_Count                 - Depending on the P_Init_Msg_List parameter value
748  *                                this paramenter may have a value of 1 or higher.
749  *  X_Msg_Data                  - The parameter will hold a message if there is an
750  *                                error in this API.
751  *********************************************************************************************/
752 /*#
753  * This API is used to delete one or more resource formats from a resource list.
754  * @param p_commit API standard (default = F): indicates if the transaction will be committed
755  * @param p_init_msg_list API standard (default = F): indicates if message stack will be initialized
756  * @param p_res_list_id Resource list identifier
757  * @rep:paraminfo {@rep:required}
758  * @param P_Plan_RL_Format_Tbl Table of resource format identifiers to delete from the resource list
759  * @rep:paraminfo {@rep:required}
760  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
761  * @rep:paraminfo {@rep:precision 1} {@rep:required}
762  * @param x_msg_count API standard: number of error messages
763  * @rep:paraminfo {@rep:required}
764  * @param x_msg_data API standard: error message
765  * @rep:paraminfo {@rep:precision 2000} {@rep:required}
766  * @rep:scope public
767  * @rep:lifecycle active
768  * @rep:displayname Delete Project Planning Resource List Formats
769  * @rep:compatibility S
770 */
771 Procedure Delete_Plan_RL_Format (
772         p_commit                 IN          VARCHAR2 DEFAULT FND_API.G_FALSE,
773         p_init_msg_list          IN          VARCHAR2 DEFAULT FND_API.G_FALSE,
774         P_Res_List_Id            IN          NUMBER   DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
775         P_Plan_RL_Format_Tbl     IN          Plan_RL_Format_In_Tbl,
776         X_Return_Status          OUT NOCOPY  VARCHAR2,
777         X_Msg_Count              OUT NOCOPY  NUMBER,
778         X_Msg_Data               OUT NOCOPY  VARCHAR2);
779 
780 
781 
782 
783 
784 
785  /*********************************************************************************
786  * Procedure   : Init_Create_Resource_List
787  * Description : This procedure initializes the global
788  *               temporary tables for the resource formats,
789  *               resoure list members.
790  *               Also initializes the record structure
791  *               for Resource list.
792  **********************************************************************************/
793 /*#
794  * This API procedure is used to initialize the global tables for project planning resource formats and
795  * resource list members prior to Load-Execute-Fetch cycle.
796  * @rep:scope public
797  * @rep:lifecycle active
798  * @rep:displayname Initialize Create Project Planning Resource List
799  * @rep:compatibility S
800 */
801 PROCEDURE Init_Create_Resource_List ;
802 
803 
804 
805 
806 
807  /***********************************************************************************
808  * Procedure   : Init_Update_Resource_List
809  * Description : This procedure initializes the global
810  *               temporary tables for the resource formats,
811  *               resoure list members.
812  *               Also initializes the record structure
813  *               for Resource list.
814  ***********************************************************************************/
815 /*#
816  * This API procedure is used to initialize the global tables for project planning resource formats and
817  * resource list members prior to Load-Execute-Fetch cycle.
818  * @rep:scope public
819  * @rep:lifecycle active
820  * @rep:displayname Initialize Update Project Planning Resource List
821  * @rep:compatibility S
822 */
823 PROCEDURE Init_Update_Resource_List ;
824 
825 
826 
827  /**********************************************************************************
828  * API Name           : Load_Resource_List
829  * Public/Private     : Public
830  * Procedure/Function : Procedure
831  * Description        : This procedure loads the resource
832  *                      list globals.
833  *                      If you want to call the Exectue API
834  *                      (Execute_Create_Planning_Resource_List or Execute_Create_Planning_Resource_List),
835  *                      you should load first load the resource list through
836  *                      this API.
837  *                      If creating a new resource list following parameters
838  *                      must be passed:
839  *
840  *                          p_resource_list_name
841  *                          p_start_date
842  *
843  *                      During creation, you can optionally pass the following
844  *                      parameters:
845  *
846  *                          p_description
847  *                          p_end_date
848  *                          p_job_group_id
849  *                          p_job_group_name
850  *                          p_use_for_wp_flag
851  *                          p_control_flag
852  *
853  *                      During Update, you can update any of the following
854  *                      parameters:
855  *
856  *                          p_resource_list_name
857  *                          p_start_date
858  *                          p_description
859  *                          p_end_date
860  *                          p_job_group_id
861  *                          p_job_group_name
862  *                          p_use_for_wp_flag
863  *                          p_control_flag
864  *
865  *                      To identify which resource list needs to be updated,
866  *                      you should  pass the following parameter:
867  *
868  *                      p_resource_list_id: You can get the this identifier
869  *                                          from view PA_RESOURCE_LISTS_V
870  *
871  * IN Paramters :
872  *  p_api_version_number      - The api version number.
873  *  P_Resource_List_Id        - The resource list identifier.
874  *  p_resource_list_name      - The name of the resource list.
875  *  p_description             - The description of the resource list.
876  *  p_start_date              - The start date of the resource list.
877  *                              If nothing is specified the resource list will
878  *                              be defaulted with sysdate as the start date.
879  *  p_end_date                - The end date of the resource list
880  *  p_job_group_id            - The Job group Id of the job attached
881  *                              to the resource list. Get the value from view
882  *                              PA_JOBS_VIEW.
883  *  p_job_group_name          - Job Group Name of the Job attached
884  *                              to the resource list. You can either pass
885  *                              the name or the job id.
886  *  p_use_for_wp_flag         - Flag which indicates whether the
887  *                              resource list will be used in workplan or not.
888  *                                'Y' : Resource list will be used in workplan.
889  *                                'N' : Resource list will not be used in workplan.
890  *  p_control_flag            - Flag which indicates whether the
891  *                              resource list is centrally controlled or project
892  *                              specific.
893  *                                'Y': Indicates resource list as centrally controlled.
894  *                                'N': Resource List is project specific.
895  *  p_record_version_number   - Record version number of the resource list.
896  *
897  * OUT Parameters   :
898  *  X_Return_Status           - Will return a value of 'S' when the API is
899  *                              successful in creating the loading the resource list.
900  *                              Will return a value of 'E' when the API fails
901  *                              due to a validation error.
902  *                              Will return a value of 'U' when the API hits
903  *                              and unexpected error(Some ORA or such error).
904  *
905  **************************************************************************************/
906 /*#
907  * This API is used to load resource list to a global PL/SQL table.
908  * @param p_api_version_number API standard: version number
909  * @rep:paraminfo {@rep:required}
910  * @param p_resource_list_id Resource list identifier
911  * @param p_resource_list_name Resource list name
912  * @rep:paraminfo {@rep:required}
913  * @param p_description Resource list description
914  * @rep:paraminfo {@rep:required}
915  * @param p_start_date Resource list start date
916  * @param p_end_date Resource list end date
917  * @param p_job_group_id Job group identifier to be used for the resource list
918  * @rep:paraminfo {@rep:required}
919  * @param p_job_group_name Job group name to be used for the resource list
920  * @param p_use_for_wp_flag Flag indicating whether if the resource list will be used for a workplan
921  * @param p_control_flag Flag indicating whether the resource list is centrally controlled or project specific
922  * @param p_record_version_number Record version number
923  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
924  * @rep:paraminfo {@rep:precision 1} {@rep:required}
925  * @rep:scope public
926  * @rep:lifecycle active
927  * @rep:displayname Load Project Planning Resource List
928  * @rep:compatibility S
929 */
930 PROCEDURE Load_Resource_List
931         (p_api_version_number    IN     NUMBER,
932          p_resource_list_id      IN     NUMBER       DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
933          p_resource_list_name    IN     VARCHAR2,
934          p_description           IN     VARCHAR2,
935          p_start_date            IN     DATE         DEFAULT SYSDATE,
936          p_end_date              IN     DATE         DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_DATE,
937          p_job_group_id          IN     NUMBER,
938          p_job_group_name        IN     VARCHAR2     DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
939          p_use_for_wp_flag       IN     VARCHAR2     DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
940          p_control_flag          IN     VARCHAR2     DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
941          p_record_version_number IN     NUMBER       DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
942          x_return_status         OUT NOCOPY   VARCHAR2);
943 
944 
945 
946  /*****************************************************************************
947  * API Name           : Load_Resource_Format
948  * Public/Private     : Public
949  * Procedure/Function : Procedure
950  * Description        : This procedure loads the resource format globals.
951  *                      The values loaded through this API will be used during
952  *                      Execute_Create_Planning_Resource_List or
953  *                      Execute_Create_Planning_Resource_List, whichever is
954  *                      called.
955  * IN Paramters :
956  *  p_api_version_number        - The api version number.
957  *  P_Res_Format_Id             - This is the identifier of the resource format
958  *                                you want to add to the Planning Resource List.
959  *                                You can get the value from PA_RES_FORMATS_AMG_V
960  *
961  * OUT Parameters   :
962  *  X_Return_Status             - Will return a value of 'S' when the API is
963  *                                successful in loading the resource format.
964  *                                Will return a value of 'E' when the API fails
965  *                                due to a validation error.
966  *                                Will return a value of 'U' when the API hits
967  *                                and unexpected error(Some ORA or such error).
968  *
969  *****************************************************************************/
970 /*#
971  * This API is used to load resource formats to a global PL/SQL table.
972  * @param p_api_version_number API standard: version number
973  * @rep:paraminfo {@rep:required}
974  * @param p_res_format_id Resource format identifier
975  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
976  * @rep:paraminfo {@rep:precision 1} {@rep:required}
977  * @rep:scope public
978  * @rep:lifecycle active
979  * @rep:displayname Load Project Planning Resource Format
980  * @rep:compatibility S
981 */
982 PROCEDURE Load_Resource_Format
983         (p_api_version_number    IN            NUMBER,
984          P_Res_Format_Id         IN            NUMBER DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
985          x_return_status         OUT NOCOPY    VARCHAR2);
986 
987 
988 
989 
990  /*****************************************************************************
991  * API Name           : Load_Planning_Resource
992  * Public/Private     : Public
993  * Procedure/Function : Procedure
994  * Description        : This procedure loads the resource
995  *                      list members.
996  *                      It is required to be executed when u want
997  *                      create a new resource list member.
998  *                      If used for creating a resource list member then
999  *                      the following prameters must be populated
1000  *                      when used: p_api_version_number,
1001  * IN Paramters :
1002  *  p_api_version_number          : Required. The api version number.
1003  *  p_resource_list_member_id     : Optional. Resource list member identifier. To be passed
1004  *                                  only if you are updating the resource list
1005  *                                  member of the resource list.
1006  *  p_resource_alias              : Alias name of the resource.
1007  *  p_person_id                   : This contains value if the resource is of type NAMED_PERSON.
1008  *                                  It contains the identifier of the selected resource.
1009  *  p_person_name                 : This contains value if the resource is of type NAMED_PERSON. It
1010  *                                  contains the person name.
1011  *  p_job_id                      : This contains value if the resource is of type JOB. It contains
1012  *                                  the identifier of the job.
1013  *  p_job_name                    : This contains value if the resource is of type JOB.
1014  *                                  It holds the name of the selected resource.
1015  *  p_organization_id             : This contains value if the resource is of type ORGANIZATION.
1016  *                                  It holds the identifier of the selected resource.
1017  *                                  This sets the value for organization_id of pa_resource_list_members
1018  *                                  table.
1019  *  p_organization_name           : This contains value if the resource is of type ORGANIZATION.
1020  *                                  It holds the name of the selected resource.
1021  *  p_vendor_id                   : This holds the vendor identifier.
1022  *                                  This sets the value of VENDOR_ID of pa_resource_list_members
1023  *                                  table.
1024  *  p_vendor_name                 : This holds the name of the vendor.
1025  *  p_fin_category_name           : This holds the name of finacial category.
1026  *  p_non_labor_resource          : This contains value if the resource is of type NON_LABOR_RESOURCE.
1027  *                                  This holds the name of non labor resource.
1028  *  p_project_role_id             : This contains value if the resource is of type ROLE.
1029  *                                  It holds the identifier of the selected resource.
1030  *  p_project_role_name           : This contains value if the resource is of type ROLE.
1031  *                                  It holds the name of the selected resource.
1032  *  p_resource_class_id           : This contains the identifier of the resource class to
1033  *                                  which the resource belongs to.
1034  *                                  It can take the following vaues:
1035  *                                  1,2,3 or 4.
1036  *  p_resource_class_code         : This contains the code of the resource class to
1037  *                                  which the resource belongs to.
1038  *                                  It can take the following values:
1039  *                                  EQUIPMENT
1040  *                                  FINANCIAL ELEMENTS,
1041  *                                  MATERIAL ITEMS or
1042  *                                  PEOPLE.
1043  *  p_res_format_id                : Optional. It should be passed in during creation of a planning
1044  *                                  resource list member. This holds the planning resource format id to
1045  *                                  which the resource belongs to.
1046  *  p_spread_curve_id              : Optional.This is the planning attribute which defines the way cost or
1047  *                                  revenue amounts are distributed across periods for financial planning.
1048  *                                  This holds the identifier of the spread curves available.
1049  *                                  p_spread_curve_id sets the value for spread_curve_id of
1050  *                                  pa_resource_list_members table. If p_spread_curve_id is NULL then
1051  *                                  spread_curve_id is set to its default value
1052  *                                  decided by the resource class passed in.
1053  *                                  If p_spread_curve_id is NOT NULL then spread_curve_id is set to
1054  *                                  whatever is passed.
1055  *  p_etc_method_code              : Optional.The Users can setup Esitmate to Complete(ETC) Methods by
1056  *                                  resource.
1057  *                                  This planning attribute holds the corresponding ETC code.
1058  *                                  p_etc_method_code sets the value for etc_method_code of
1059  *                                  pa_resource_list_members table. If p_etc_method_code is NULL then
1060  *                                  etc_method_code is set to its default value
1061  *                                  decided by the resource class passed in.
1062  *                                  If p_etc_method_code is NOT NULL then etc_method_code is set to
1063  *                                  whatever is passed.
1064  *  p_mfc_cost_type_id            : Optional. It holds the identifier of manufacturing cost type.
1065  *                                  Initially it sets the value for mfc_cost_type_id of
1066  *                                  pa_resource_list_members
1067  *                                  table with whatever passed in p_mfc_cost_type_id.
1068  *                                  If p_mfc_cost_type_id is NULL and
1069  *                                  the resource type is either BOM EQUIPMENT or BOM_LABOR or
1070  *                                  INVENTORY_ITEM then mfc_cost_type_id is set to its default value
1071  *                                  decided by the resource class.
1072  *                                  else mfc_cost_type_id is set to null.
1073  *  p_fc_res_type_code            : It will decide the value for wp_eligible_flag of
1074  *                                  pa_resurce_list_members table. Based on this code wp_eligible_flag
1075  *                                  is set to either 'Y' or 'N'.
1076  *                                  If p_fc_res_type_code is either 'REVENUE_CATEGORY' or 'EVENT_TYPE'
1077  *                                  then wp_eligible_flag will hold 'N' else it will hold 'Y'.
1078  *  p_inventory_item_id           : This contains value if the resource is of type ITEM. It contains
1079  *                                  the identifier of the the resource.
1080  *  p_inventory_item_name         : This contains value if the resource is of type ITEM.
1081  *                                  It holds the name of the selected resource.
1082  *  p_item_category_id            : This contains value if the resource is of type ITEM CATEGORY.
1083  *                                  It holds the identifier of the selected resource.
1084  *  p_item_category_name          : This contains value if the resource is of type ITEM CATEGORY.
1085  *                                  It holds the name of the selected resource.
1086  *  p_attribute_category          : Holds the attribute category name.
1087  *  p_attribute1 to p_attribute30 : These are descriptive flexfields which allow users to define
1088  *                                  additional information for each planning resource.
1089  *  p_person_type_code            : This contains value if the resource is of type PERSON_TYPE.
1090  *                                  This will hold person type code or name.
1091  *  p_bom_resource_id             : This contains value if the resource is of type BOM_LABOR or
1092  *                                  BOM_EQUIPMENT.
1093  *                                  It holds the identifier of the selected resource.
1094  *  p_bom_resource_name           : This contains value if the resource is of type BOM_LABOR or
1095  *                                  BOM_EQUIPMENT.
1096  *                                  It holds the name of the selected resource.
1097  *  p_team_role                   : This contains value if the resource is of type NAMED_ROLE.
1098  *                                  It holds the name or code of the team role.
1099  *  p_incur_by_res_code           : This contains value if the resource belongs to format having
1100  *                                  Incurred By Resource as planning resource element.
1101  *                                  It holds the code of the selected resource
1102  *  p_incur_by_res_type           : This contains value if the resource belongs to format having
1103  *                                  Incurred By Resource as planning resource element.
1104  *                                  It holds the type of the selected resource.
1105  *  p_record_version_number       : Required. It is the record version number of the resource list member.
1106  *                                  It has significance
1107  *                                  only during update of resource list member.
1108  *  p_project_id                  : Required. It holds the project id for project specific resources.
1109  *                                  It determines the value for object_type and object_id of
1110  *                                  pa_resource_list_members table.
1111  *                                  If project_id is not NULL object_type and object_id takes values
1112  *                                  'PROJECT' and project_id.
1113  *                                  If project_id is NULL then it takes 'RESOURCE_LIST' and
1114  *                                  p_resource_list_id as object_type and object_id.
1115  *  p_enabled_flag                 : Optional. This flag indicates whether the resource member is enabled
1116  *                                  or not. The value need not be passed unless you want to modify its
1117  *                                  value during update.
1118  *                                  Enabled_Flag will always be 'Y' during creation of a resource list
1119  *                                  member.
1120  *                                  'Y': The resource list member is enabled.
1121  *                                  'N': The resource list member is disabled.
1122  *
1123  * OUT Parameters   :
1124  *  X_Return_Status             - Will return a value of 'S' when the API is
1125  *                                successful in creating the Resource List Members.
1126  *                                Will return a value of 'E' when the API fails
1127  *                                due to a validation error.
1128  *                                Will return a value of 'U' when the API hits
1129  *                                and unexpected error(Some ORA or such error).
1130  *
1131  *****************************************************************************/
1132 /*#
1133  * This API is used to load project planning resource to a global PL/SQL table.
1134  * @param p_api_version_number API standard: version number
1135  * @rep:paraminfo {@rep:required}
1136  * @param p_resource_list_member_id Resource format identifier
1137  * @param p_resource_alias Planning resource alias
1138  * @param p_person_id Identifier of the selected resource if the planning resource is of type NAMED_PERSON
1139  * @param p_person_name Person name if the planning resource is of type NAMED_PERSON
1140  * @param p_job_id Job identifier if the planning resource is of type JOB
1141  * @param p_job_name Job name if the planning resource is of type JOB
1142  * @param p_organization_id Organization identifier if the planning resource contains an organization
1143  * @param p_organization_name Organization name if the planning resource contains an organization
1144  * @param p_vendor_id Supplier identifier if the planning resource contains a supplier
1145  * @param p_vendor_name Supplier name if the planning resource contains a supplier
1146  * @param p_fin_category_name Financial category name if the planning resource contains a financial category
1147  * @param p_non_labor_resource Nob-labor resource if the planning resource contains a non-labor resource
1148  * @param p_project_role_id Project role identifier if the planning resource contains a team role
1149  * @param p_project_role_name Project role name if the planning resource contains a team role
1150  * @param p_resource_class_id Resource class
1151  * @param p_resource_class_code Resource class code
1152  * @param p_res_format_id Resource format identifier
1153  * @rep:paraminfo {@rep:required}
1154  * @param p_spread_curve_id Spread curve identifier which defines the way cost or revenue amounts are distributed
1155  * across periods for financial planning
1156  * @param p_etc_method_code Estimate to complete method code
1157  * @param p_mfc_cost_type_id Manufacturing cost type identifier
1158  * @param p_fc_res_type_code Financial category resource type code
1159  * @param p_inventory_item_id Inventory item identifier if the planning resource contains an item
1160  * @param p_inventory_item_name Inventory item name if the planning resource contains an item
1161  * @param p_item_category_id Item category identifier if the planning resource contains an item category
1162  * @param p_item_category_name Item category name if the planning resource contains an item category
1163  * @param p_attribute_category Descriptive flexfield category
1164  * @param p_attribute1 Descriptive flexfield attribute
1165  * @param p_attribute2 Descriptive flexfield attribute
1166  * @param p_attribute3 Descriptive flexfield attribute
1167  * @param p_attribute4 Descriptive flexfield attribute
1168  * @param p_attribute5 Descriptive flexfield attribute
1169  * @param p_attribute6 Descriptive flexfield attribute
1170  * @param p_attribute7 Descriptive flexfield attribute
1171  * @param p_attribute8 Descriptive flexfield attribute
1172  * @param p_attribute9 Descriptive flexfield attribute
1173  * @param p_attribute10 Descriptive flexfield attribute
1174  * @param p_attribute11 Descriptive flexfield attribute
1175  * @param p_attribute12 Descriptive flexfield attribute
1176  * @param p_attribute13 Descriptive flexfield attribute
1177  * @param p_attribute14 Descriptive flexfield attribute
1178  * @param p_attribute15 Descriptive flexfield attribute
1179  * @param p_attribute16 Descriptive flexfield attribute
1180  * @param p_attribute17 Descriptive flexfield attribute
1181  * @param p_attribute18 Descriptive flexfield attribute
1182  * @param p_attribute19 Descriptive flexfield attribute
1183  * @param p_attribute20 Descriptive flexfield attribute
1184  * @param p_attribute21 Descriptive flexfield attribute
1185  * @param p_attribute22 Descriptive flexfield attribute
1186  * @param p_attribute23 Descriptive flexfield attribute
1187  * @param p_attribute24 Descriptive flexfield attribute
1188  * @param p_attribute25 Descriptive flexfield attribute
1189  * @param p_attribute26 Descriptive flexfield attribute
1190  * @param p_attribute27 Descriptive flexfield attribute
1191  * @param p_attribute28 Descriptive flexfield attribute
1192  * @param p_attribute29 Descriptive flexfield attribute
1193  * @param p_attribute30 Descriptive flexfield attribute
1194  * @param p_person_type_code Person type code if the planning resource contains a person type
1195  * @param p_bom_resource_id BOM resource identifier if the planning resource contains a BOM resource
1196  * @param p_bom_resource_name BOM resource name if the planning resource contains a BOM resource
1197  * @param p_team_role Team role name if the planning resource contains a team role
1198  * @param p_incur_by_res_code Incurred by resource type code if the planning resource contains a incurred by resource
1199  * @param p_incur_by_res_type Incurred by resource type if the planning resource contains a incurred by resource
1200  * @param p_record_version_number Record version number
1201  * @rep:paraminfo {@rep:required}
1202  * @param p_project_id Project identifier
1203  * @rep:paraminfo {@rep:required}
1204  * @param p_enabled_flag Flag indicating whether the planning resource is enabled
1205  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
1206  * @rep:paraminfo {@rep:precision 1} {@rep:required}
1207  * @rep:scope public
1208  * @rep:lifecycle active
1209  * @rep:displayname Load Project Planning Resource
1210  * @rep:compatibility S
1211 */
1212 PROCEDURE Load_Planning_Resource
1213      (p_api_version_number      IN          NUMBER,
1214       p_resource_list_member_id IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1215       p_resource_alias          IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1216       p_person_id               IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1217       p_person_name             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1218       p_job_id                  IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1219       p_job_name                IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1220       p_organization_id         IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1221       p_organization_name       IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1222       p_vendor_id               IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1223       p_vendor_name             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1224       p_fin_category_name       IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1225       p_non_labor_resource      IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1226       p_project_role_id         IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1227       p_project_role_name       IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1228       p_resource_class_id       IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1229       p_resource_class_code     IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1230       p_res_format_id           IN          NUMBER        ,
1231       p_spread_curve_id         IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1232       p_etc_method_code         IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1233       p_mfc_cost_type_id        IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1234       p_fc_res_type_code        IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1235       p_inventory_item_id       IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1236       p_inventory_item_name     IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1237       p_item_category_id        IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1238       p_item_category_name      IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1239       p_attribute_category      IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1240       p_attribute1              IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1241       p_attribute2              IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1242       p_attribute3              IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1243       p_attribute4              IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1244       p_attribute5              IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1245       p_attribute6              IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1246       p_attribute7              IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1247       p_attribute8              IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1248       p_attribute9              IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1249       p_attribute10             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1250       p_attribute11             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1251       p_attribute12             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1252       p_attribute13             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1253       p_attribute14             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1254       p_attribute15             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1255       p_attribute16             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1256       p_attribute17             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1257       p_attribute18             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1258       p_attribute19             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1259       p_attribute20             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1260       p_attribute21             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1261       p_attribute22             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1262       p_attribute23             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1263       p_attribute24             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1264       p_attribute25             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1265       p_attribute26             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1266       p_attribute27             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1267       p_attribute28             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1268       p_attribute29             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1269       p_attribute30             IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1270       p_person_type_code        IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1271       p_bom_resource_id         IN          NUMBER        DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1272       p_bom_resource_name       IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1273       p_team_role               IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1274       p_incur_by_res_code       IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1275       p_incur_by_res_type       IN          VARCHAR2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1276       p_record_version_number   IN          NUMBER,
1277       p_project_id              IN          NUMBER  ,
1278       p_enabled_flag            IN          Varchar2      DEFAULT PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR,
1279       x_return_status           OUT NOCOPY  Varchar2);
1280 
1281 
1282 
1283 
1284 
1285  /*******************************************************************************
1286  * Procedure   : Exec_Create_Resource_List
1287  * Description : This procedure calls the Create_Resource_List API.
1288  *               It picks up the values loaded by the following before calling
1289  *               the Create_Resource_List API:
1290  *                  Load_Resource_List
1291  *                  Load_Resource_Format
1292  *                  Load_Planning_Resource
1293  * IN Parameters    :
1294  *  p_commit                    - Optional. By default no commit will take place.
1295  *  p_init_msg_list             - Optional. By default the error msg stack
1296  *                                is not initialized.
1297  *  p_api_version_number        - Required. The api version number.
1298  *
1299  * OUT Parameters   :
1300  *  X_Return_Status             - Will return a value of 'S' when the API is
1301  *                                successful in creating the resource List.
1302  *                                Will return a value of 'E' when the API fails
1303  *                                due to a validation error.
1304  *                                Will return a value of 'U' when the API hits
1305  *                                and unexpected error(Some ORA or such error).
1306  *  X_Msg_Count                 - Depending on the P_Init_Msg_List parameter value
1307  *                                this paramenter may have a value of 1 or higher.
1308  *  X_Msg_Data                  - The parameter will hold a message if there is an
1309  *                                error in this API.
1310  *******************************************************************************/
1311 /*#
1312  * This API is used to create resource lists, corresponding resource formats and resource list members using
1313  * the data stored in the global tables.
1314  * @param p_commit API standard (default = F): indicates if the transaction will be committed
1315  * @param p_init_msg_list API standard (default = F): indicates if message stack will be initialized
1316  * @param p_api_version_number API standard: version number
1317  * @rep:paraminfo {@rep:required}
1318  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
1319  * @rep:paraminfo {@rep:precision 1} {@rep:required}
1320  * @param x_msg_count API standard: number of error messages
1321  * @rep:paraminfo {@rep:required}
1322  * @param x_msg_data API standard: error message
1323  * @rep:paraminfo {@rep:precision 2000} {@rep:required}
1324  * @rep:scope public
1325  * @rep:lifecycle active
1326  * @rep:displayname Execute Create Project Planning Resource List
1327  * @rep:compatibility S
1328 */
1329 PROCEDURE Exec_Create_Resource_List
1330     (p_commit               IN         VARCHAR2 := FND_API.G_FALSE,
1331     p_init_msg_list         IN         VARCHAR2 := FND_API.G_FALSE,
1332     p_api_version_number    IN         NUMBER,
1333     x_return_status         OUT NOCOPY VARCHAR2,
1334     x_msg_count             OUT NOCOPY NUMBER,
1335     x_msg_data              OUT NOCOPY VARCHAR2 );
1336 
1337 
1338 
1339 
1340  /*******************************************************************************
1341  * Procedure   : Exec_Update_Resource_List
1342  * Description : This procedure calls Update_Resource_List API.
1343  *               It picks up the values loaded by the following before calling
1344  *               the Update_Resource_List API:
1345  *                  Load_Resource_List
1346  *                  Load_Resource_Format
1347  *                  Load_Planning_Resource
1348  * IN Parameters    :
1349  *  p_commit                    - Optional. By default no commit will take place.
1350  *  p_init_msg_list             - Optional. By default the error msg stack
1351  *                                is not initialized.
1352  *  p_api_version_number        - Required. The api version number.
1353  *
1354  * OUT Parameters   :
1355  *  X_Return_Status             - Will return a value of 'S' when the API is
1356  *                                successful in updating the Resource List.
1357  *                                Will return a value of 'E' when the API fails
1358  *                                due to a validation error.
1359  *                                Will return a value of 'U' when the API hits
1360  *                                and unexpected error(Some ORA or such error).
1361  *  X_Msg_Count                 - Depending on the P_Init_Msg_List parameter value
1362  *                                this paramenter may have a value of 1 or higher.
1363  *  X_Msg_Data                  - The parameter will hold a message if there is an
1364  *                                error in this API.
1365  ********************************************************************************/
1366 /*#
1367  * This API is used to update a resource list, corresponding resource formats and planning resources using
1368  * the data stored in the global tables.
1369  * @param p_commit API standard (default = F): indicates if the transaction will be committed
1370  * @param p_init_msg_list API standard (default = F): indicates if message stack will be initialized
1371  * @param p_api_version_number API standard: version number
1372  * @rep:paraminfo {@rep:required}
1373  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
1374  * @rep:paraminfo {@rep:precision 1} {@rep:required}
1375  * @param x_msg_count API standard: number of error messages
1376  * @rep:paraminfo {@rep:required}
1377  * @param x_msg_data API standard: error message
1378  * @rep:paraminfo {@rep:precision 2000} {@rep:required}
1379  * @rep:scope public
1380  * @rep:lifecycle active
1381  * @rep:displayname Execute Update Project Planning Resource List
1382  * @rep:compatibility S
1383 */
1384 PROCEDURE Exec_Update_Resource_List
1385     (p_commit               IN         VARCHAR2 := FND_API.G_FALSE,
1386      p_init_msg_list        IN         VARCHAR2 := FND_API.G_FALSE,
1387      p_api_version_number   IN         NUMBER,
1388      x_return_status        OUT NOCOPY VARCHAR2,
1389      x_msg_count            OUT NOCOPY NUMBER,
1390      x_msg_data             OUT NOCOPY VARCHAR2
1391  );
1392 
1393 
1394 
1395 
1396  /*********************************************************************************
1397  * API Name          : Fetch_Resource_List
1398  * Public/Private    : Public
1399  * Procedure/Function: Procedure
1400  * Description : This procedure should be called after
1401  *               execute_Create_Planning_Resource_List or
1402  *               Execute_Create_Planning_Resource_List is called.
1403  *               It returns the resource_list_identifier, if any,
1404  *               from a load-execute-fetch cycle.
1405  *               If no records were locaded using Load_Resource_List()
1406  *               then there will be no records to fetch.
1407  * IN Parameters    :
1408  *  p_api_version_number        - Required. The api version number.
1409  *
1410  * OUT Parameters   :
1411  *  X_Return_Status             - Will return a value of 'S' when the API is
1412  *                                successful in creating the Resource List.
1413  *                                Will return a value of 'E' when the API fails
1414  *                                due to a validation error.
1415  *                                Will return a value of 'U' when the API hits
1416  *                                and unexpected error(Some ORA or such error).
1417  *  X_Resource_list_id          - stores the resource list identifier of the newly
1418  *                                created resource list.
1419  ***********************************************************************************/
1420 /*#
1421  * This API is used to fetch one resource list identifier at a time from the global output structure for
1422  * resource lists.
1423  * @param p_api_version_number API standard: version number
1424  * @rep:paraminfo {@rep:required}
1425  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
1426  * @rep:paraminfo {@rep:precision 1} {@rep:required}
1427  * @param x_resource_list_id Resource list identifier
1428  * @rep:paraminfo {@rep:required}
1429  * @rep:scope public
1430  * @rep:lifecycle active
1431  * @rep:displayname Fetch Project Planning Resource List
1432  * @rep:compatibility S
1433 */
1434 PROCEDURE Fetch_Resource_List
1435    (p_api_version_number      IN         NUMBER,
1436     x_return_status           OUT NOCOPY VARCHAR2,
1437     x_resource_list_id        OUT NOCOPY NUMBER);
1438 
1439 
1440 
1441 
1442  /***********************************************************************************
1443  * API Name          : Fetch_Plan_Format
1444  * Public/Private    : Public
1445  * Procedure/Function: Procedure
1446  * Description : This procedure returns the return status
1447  *               and the newly created Plan_Rl_Format_Id,
1448  *               if any, from a load-execute-fetch cycle.
1449  *               If no records were loaded using Load_Resource_Format()
1450  *               then there will be no records to fetch.
1451  * IN Parameters    :
1452  *  p_api_version_number      - Required. The api version number.
1453  *  p_format_index            - The p_format_index in parameter is the order
1454  *                                in which you called load_Resource_Format() API.
1455  *                                So you will need to track that when using
1456  *                                load_Resource_Format() API in
1457  *                                your calling routine.
1458  *
1459  * OUT Parameters   :
1460  *  X_Return_Status             - Will return a value of 'S' when the API is
1461  *                                successful in creating the Resource list format.
1462  *                                Will return a value of 'E' when the API fails
1463  *                                due to a validation error.
1464  *                                Will return a value of 'U' when the API hits
1465  *                                and unexpected error(Some ORA or such error).
1466  *  X_Plan_RL_Format_Id         - stores the resource list format identifier of the newly
1467  *                                created resource list format.
1468  ************************************************************************************/
1469 /*#
1470  * This API is used to fetch planning resource list format identifier from the global output.
1471  * @param p_api_version_number API standard: version number
1472  * @rep:paraminfo {@rep:required}
1473  * @param p_format_index Resource format index
1474  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
1475  * @rep:paraminfo {@rep:precision 1} {@rep:required}
1476  * @param x_plan_rl_format_id Planning resource format identifier
1477  * @rep:paraminfo {@rep:required}
1478  * @rep:scope public
1479  * @rep:lifecycle active
1480  * @rep:displayname Fetch Project Planning Resource List Format
1481  * @rep:compatibility S
1482 */
1483 PROCEDURE Fetch_Plan_Format
1484  ( p_api_version_number      IN         NUMBER,
1485    p_format_index            IN         NUMBER
1486                   := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1487    x_return_status           OUT NOCOPY VARCHAR2,
1488    X_Plan_RL_Format_Id       OUT NOCOPY NUMBER);
1489 
1490 
1491 
1492 
1493  /*************************************************************************************
1494  * API Name          : Fetch_Resource_List_Member
1495  * Public/Private    : Public
1496  * Procedure/Function: Procedure
1497  * Description : This procedure returns the return status
1498  *               and the newly created resource_list_member_id of
1499  *               the resource list member
1500  *               if any, from a load-execute-fetch cycle.
1501  *               If no records were loaded using Load_Planning_Resource()
1502  *               then there will be no records to fetch.
1503  * IN Parameters    :
1504  *  p_api_version_number        - Required. The api version number.
1505  *  p_member_index              - The p_member_index in parameter is the order
1506  *                                in which you called load_Planning_Resource() API. So you will
1507  *                                need to track that when using Load_Planning_Resource() API in
1508  *                                your calling routine.
1509  *
1510  * OUT Parameters   :
1511  *  X_Return_Status             - Will return a value of 'S' when the API is
1512  *                                successful in creating the Resource List members.
1513  *                                Will return a value of 'E' when the API fails
1514  *                                due to a validation error.
1515  *                                Will return a value of 'U' when the API hits
1516  *                                and unexpected error(Some ORA or such error).
1517  *  X_resource_list_member_id   - stores the resource list member identifier of the newly
1518  *                                created resource list member.
1519  ***************************************************************************************/
1520 /*#
1521  * This API is used to fetch planning resource list member identifier from the global output.
1522  * @param p_api_version_number API standard: version number
1523  * @rep:paraminfo {@rep:required}
1524  * @param p_member_index Resource list member index
1525  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
1526  * @rep:paraminfo {@rep:precision 1} {@rep:required}
1527  * @param x_resource_list_member_id Planning resource list member identifier
1528  * @rep:paraminfo {@rep:required}
1529  * @rep:scope public
1530  * @rep:lifecycle active
1531  * @rep:displayname Fetch Project Planning Resource List Member
1532  * @rep:compatibility S
1533 */
1534 PROCEDURE Fetch_Resource_List_Member
1535  ( p_api_version_number      IN         NUMBER,
1536    p_member_index            IN         NUMBER
1537                 := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1538    x_return_status           OUT NOCOPY VARCHAR2,
1539    x_resource_list_member_id OUT NOCOPY NUMBER);
1540 
1541 /*************************************************
1542  * Procedure : Delete_Planning_Resource
1543  * Description : The purpose of this procedure is to
1544  * delete a planning resource if it is not
1545  * being used, else disable it.
1546  * Further details in the Body.
1547  * ***************************************************/
1548 /*#
1549  * This API is used to delete a project planning resource that is not in use or disable a planning resource
1550  * that is in use.
1551  * @param p_resource_list_member_id Table of planning resource identifiers
1552  * @rep:paraminfo {@rep:required}
1553  * @param p_commit API standard (default = F): indicates if the transaction will be committed
1554  * @param p_init_msg_list API standard (default = F): indicates if message stack will be initialized
1555  * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
1556  * @rep:paraminfo {@rep:precision 1} {@rep:required}
1557  * @param x_msg_count API standard: number of error messages
1558  * @rep:paraminfo {@rep:required}
1559  * @param x_error_msg_data API standard: error message
1560  * @rep:paraminfo {@rep:precision 2000} {@rep:required}
1561  * @rep:scope public
1562  * @rep:lifecycle active
1563  * @rep:displayname Delete Project Planning Resource
1564  * @rep:compatibility S
1565 */
1566 PROCEDURE Delete_Planning_Resource(
1567          p_resource_list_member_id  IN          SYSTEM.PA_NUM_TBL_TYPE  ,
1568          p_commit                   IN          VARCHAR2,
1569          p_init_msg_list            IN          VARCHAR2,
1570          x_return_status            OUT NOCOPY  VARCHAR2,
1571          x_msg_count                OUT NOCOPY  NUMBER,
1572          x_error_msg_data           OUT NOCOPY  VARCHAR2);
1573 
1574 END Pa_Plan_Res_List_Pub;