DBA Data[Home] [Help]

PACKAGE: APPS.GMP_RSRC_AVL_PKG

Source


1 PACKAGE gmp_rsrc_avl_pkg AUTHID CURRENT_USER as
2 /* $Header: GMPAVLS.pls 120.1 2006/03/16 14:30:14 rpatangy noship $ */
3 /*#
4  * This is the API for Resource Availability calculations.
5  * Important inputs to the API are Calendar,Resource and the Dates
6  * It returns the available hours of that Resource during the specified period
7  * @rep:scope public
8  * @rep:product GMP
9  * @rep:displayname Resource Availability Calculations
10  * @rep:lifecycle active
11  * @rep:category BUSINESS_ENTITY GMP_RSRC_AVL_PKG
12 */
13 gmp_setup               BOOLEAN:=FALSE;
14 gmp_api_version         NUMBER;
15 gmp_user_id             NUMBER;
16 gmp_user_name           VARCHAR2(50);
17 gmp_login_id            NUMBER;
18 gmp_timestamp           DATE;
19 
20 
21 TYPE out_cal_shift_typ is RECORD
22 ( out_resource_count number,
23   out_cal_date date,
24   out_shift_num number,
25   out_cal_from_date date,
26   out_cal_to_date date
27 );
28 
29 out_calendar_record  out_cal_shift_typ;
30 TYPE cal_tab2 is table of out_cal_shift_typ index by BINARY_INTEGER;
31 out_cal_rec  cal_tab2;
32 out_rec  cal_tab2;
33 --
34 /*#
35  *  Returns the available hours of that Resource during the specified
36  *  period after netting out un-availability from calendar. Important inputs
37  *  include Calendar, Resource, and the Dates.
38  *  @param p_api_version Version Number of the API
39  *  @param p_init_msg_list Flag for initializing message list
40  *  @param p_cal_code This is the calendar code, that is associated with a
41  *         OPM Organization or Resource
42  *  @param p_resource_id This is the Id of the Resource, that is associated
43  *         with a OPM Plant
44  *  @param p_from_date This is the start date of the period for which
45  *  availability is to be computed
46  *  @param p_to_date This is the end date of the period
47  *  @param x_return_status Return status 'S'-Success, 'E'-Error,
48  *       'U'-Unexpected Error
49  *  @param x_msg_count Number of messages on message stack
50  *  @param x_msg_data Actual message data from message stack
51  *  @param x_return_code Error code returned from the API
52  *  @param p_rec This is the availability information stored in PL/SQL table
53  *           of records which contains resource count, Calendar Date,
54  *           Shift Number, available start date-time and end date-time
55  *  @param p_flag This is indicator flag denoting invalid input parameter
56  *  @rep:scope public
57  *  @rep:lifecycle active
58  *  @rep:displayname Resource Availability Calculations
59 */
60 
61 PROCEDURE rsrc_avl(
62                     p_api_version        IN NUMBER,
63                     p_init_msg_list      IN VARCHAR2 := FND_API.G_FALSE,
64                     p_cal_code           IN VARCHAR2,   -- B4999940
65                     p_resource_id        IN NUMBER,
66                     p_from_date          IN DATE,
67                     p_to_date            IN DATE,
68                     x_return_status      OUT NOCOPY VARCHAR2,
69                     x_msg_count          OUT NOCOPY NUMBER,
70                     x_msg_data           OUT NOCOPY VARCHAR2,
71                     x_return_code        OUT NOCOPY VARCHAR2,
72                     p_rec                IN OUT NOCOPY cal_tab2,
73                     p_flag               IN OUT NOCOPY VARCHAR2
74                     ) ;
75 
76 -- Overriden procedure, cal_id not mentioned
77 /*#
78  *  Returns the available hours of that Resource during the specified
79  *  period after netting out un-availability from calendar. Important inputs
80  *  include Calendar, Resource, and the Dates.
81  *  @param p_api_version Version Number of the API
82  *  @param p_init_msg_list Flag for initializing message list
83  *  @param p_resource_id This is the Id of the Resource, that is associated
84  *         with a OPM Plant
85  *  @param p_from_date This is the start date of the period for which
86  *  availability is to be computed
87  *  @param p_to_date This is the end date of the period
88  *  @param x_return_status Return status 'S'-Success, 'E'-Error,
89  *       'U'-Unexpected Error
90  *  @param x_msg_count Number of messages on message stack
91  *  @param x_msg_data Actual message data from message stack
92  *  @param x_return_code Error code returned from the API
93  *  @param p_rec This is the availability information stored in PL/SQL table
94  *           of records which contains resource count, Calendar Date,
95  *           Shift Number, available start date-time and end date-time
96  *  @param p_flag This is indicator flag denoting invalid input parameter
97  *  @rep:scope public
98  *  @rep:lifecycle active
99  *  @rep:displayname Resource Availability Calculations
100 */
101 PROCEDURE rsrc_avl(
102                     p_api_version        IN NUMBER,
103                     p_init_msg_list      IN VARCHAR2 := FND_API.G_FALSE,
104                     p_resource_id        IN NUMBER,
105                     p_from_date          IN DATE,
106                     p_to_date            IN DATE,
107                     x_return_status      OUT NOCOPY VARCHAR2,
108                     x_msg_count          OUT NOCOPY NUMBER,
109                     x_msg_data           OUT NOCOPY VARCHAR2,
110                     x_return_code        OUT NOCOPY VARCHAR2,
111                     p_rec                IN OUT NOCOPY cal_tab2,
112                     p_flag               IN OUT NOCOPY VARCHAR2
113                     );
114 
115 END gmp_rsrc_avl_pkg;