DBA Data[Home] [Help]

PACKAGE: APPS.WMS_LMS_UTILS

Source


1 PACKAGE WMS_LMS_UTILS AS
2 /* $Header: WMSLUTLS.pls 120.7.12010000.1 2008/07/28 18:35:01 appldev ship $ */
3 
4 G_PKG_NAME  VARCHAR2(30) := 'WMS_LMS_UTILS';
5 
6 
7 /** This function check that a given org is labor management enabled or not.<br>
8 * @param p_org_id                     The organization Id
9 */
10 
11 FUNCTION ORG_LABOR_MGMT_ENABLED ( p_org_id NUMBER) RETURN BOOLEAN;
12 
13 /** This function check that a given zone in a given org is labor management enabled or not.<br>
14 * @param p_org_id                     The organization Id
15 * @param p_zone_id                     The zone Id
16 */
17 
18 FUNCTION ZONE_LABOR_MGMT_ENABLED ( p_org_id  IN NUMBER,
19                                    p_zone_id IN NUMBER
20                                   )
21 RETURN VARCHAR2;
22 
23 
24 /** This function check that a given user is a non-tracked user or not.<br>
25 * @param p_user_id                     The organization Id
26 */
27 FUNCTION IS_USER_NON_TRACKED ( p_user_id IN NUMBER,
28                                p_org_id  IN NUMBER )
29 RETURN BOOLEAN;
30 
31 
32 /** This procedure is launched from a concurrent request and it will purge all<br>
33 *   the setup rows in WMS_ELS_INDIVIDUAL_TASKS_B thable that are marked as history records <br>
34 *   This program will also delete the transactions in the WMS_ELS_TRX_SRC table
35 *   which had been costed against the purged history setup records
36 * @param p_org_id                     The organization Id
37 * @param errbuf                       This is the out message having the buffer of the return message
38 * @param retcode                      This variable is a out variable having the return code of the is program.
39                                       Whether this program is a success, warning or a failure
40 */
41 PROCEDURE PURGE_LMS_SETUP_HISTORY
42                                   (errbuf               OUT    NOCOPY VARCHAR2,
43                                    retcode              OUT    NOCOPY NUMBER,
44                                    p_org_id             IN     NUMBER,
45                                    p_purge_date         IN     VARCHAR2
46                                    );
47 
48 /** This procedure is launched from a concurrent request and it will purge all<br>
49 *   the transactions in the WMS_ELS_TRX_SRC table that have been done before the <br>
50 *   given purge date
51 * @param p_org_id                     The organization Id
52 * @param errbuf                       This is the out message having the buffer of the return message
53 * @param retcode                      This variable is a out variable having the return code of the is program.
54                                       Whether this program is a success, warning or a failure
55 * @param p_purge_date                 This is the in parameter which gives that date before which all
56                                       transaction records have to be purged
57 */
58 PROCEDURE PURGE_LMS_TRANSACTIONS
59                                   (errbuf               OUT    NOCOPY VARCHAR2,
60                                    retcode              OUT    NOCOPY NUMBER,
61                                    p_org_id             IN     NUMBER,
62                                    p_purge_date   IN     VARCHAR2
63                                    );
64 
65 /** This procedure is launched from a concurrent request and it will copy all<br>
66 *   the expected time components to actuals in the wms_els-individual_tasks table <br>
67 * @param p_org_id                     The organization Id
68 * @param errbuf                       This is the out message having the buffer of the return message
69 * @param retcode                      This variable is a out variable having the return code of the is program.
70                                       Whether this program is a success, warning or a failure
71 */
72 PROCEDURE COPY_ACTUAL_TIMINGS      (   errbuf               OUT    NOCOPY VARCHAR2
73                                       , retcode              OUT    NOCOPY NUMBER
74                       	              , p_org_id             IN            NUMBER
75                                     ) ;
76 
77 /** This procedure is launched from a concurrent request and it calculates the actuals<br>
78 *   based on the average of the time taken for the actula transactions. The number of trxns<br>
79 *   needs to be considered for this averaging is based on the setup done in the <br>
80 *   global setup for moving average value. <br>
81 * @param p_org_id                     The organization Id
82 * @param errbuf                       This is the out message having the buffer of the return message
83 * @param retcode                      This variable is a out variable having the return code of the is program.
84                                       Whether this program is a success, warning or a failure
85 */
86 PROCEDURE CALCULATE_ACTUAL_TIMINGS  (   errbuf               OUT    NOCOPY VARCHAR2
87                                       , retcode              OUT    NOCOPY NUMBER
88                       	              , p_org_id             IN            NUMBER
89                                     );
90 
91 /** This function is called from the concurrent program "Expected Resource Requirement Analysis"<br>
92 *   This fuction will return TRUE  if more rows are left non matched after a certain pass of the <br>
93 *   setup data. It will return FALSE when no more rows are left to process. This fucntion will be  <br>
94 *   used to exit the processing once all rows in wms_els_trx_src are exhaused even before <br>
95 *   all the rows in setup are exhausted.
96 * @param p_org_id                    The Organization_id
97 */
98 FUNCTION unprocessed_rows_remaining ( p_org_id NUMBER )
99 RETURN NUMBER;
100 
101 
102 /** This function is called from the concurrent program "Labor Productivity Analysis" <br>
103 *   This fuction will return TRUE  if more rows are left non matched after a certain pass of the <br>
104 *   setup data. It will return FALSE when no more rows are left to process. This fucntion will be  <br>
105 *   used to exit the processing once all rows in wms_els_trx_src are exhaused even before <br>
106 *   all the rows in setup are exhausted. This fuction is overloaded
107 * @param p_org_id                    The Organization_id
108 */
109 FUNCTION unprocessed_rows_remaining ( p_org_id NUMBER,
110                                       p_max_id NUMBER )
111 RETURN NUMBER;
112 
113 
114 /** This function is called from the reports main page in OA to get the <br>
115 *   argument values that have been used for the last run of the concurrent program
116 * @param p_org_id                    The organization Id for the concurrent program last run
117 * @param  p_concurrent_program_id    Concurrent Program ID
118 */
119 FUNCTION get_parameter_string(p_concurrent_program_id IN NUMBER,
120                               p_org_id IN NUMBER)
121 RETURN VARCHAR2;
122 
123 
124 /** This function is called from the reports main page in OA to get the <br>
125 *   next scheduled time for the of the concurrent programs
126 * @param  p_org_id                    The organization Id for the concurrent program last run
127 * @param  p_concurrent_program_id     Concurrent Program ID
128 * @param  p_application_id            application Id for the concurrent program
129 */
130 FUNCTION get_next_scheduled_time ( p_concurrent_program_id IN NUMBER,
131 	                               p_application_id        IN NUMBER,
132 								   p_org_id                IN NUMBER
133                                  )
134 RETURN VARCHAR2;
135 
136 /** This function is called from the reports main page in OA to get the <br>
137 *   last run time for the of the concurrent programs
138 * @param  p_org_id                    The organization Id for the concurrent program last run
139 * @param  p_concurrent_program_id     Concurrent Program ID
140 */
141 
142 FUNCTION last_run_time( p_concurrent_program_id IN NUMBER,
143                            p_org_id IN NUMBER
144 					     )
145 RETURN VARCHAR2;
146 
147 /** This function is called from the reports main page in OA to get the <br>
148 *   last run time for the of the concurrent programs which completed Normal
149 * @param  p_org_id                    The organization Id for the concurrent program last run
150 * @param  p_concurrent_program_id     Concurrent Program ID
151 */
152 FUNCTION last_run_time_success (  p_concurrent_program_id IN NUMBER,
153                                   p_org_id IN NUMBER
154 					           )
155 RETURN VARCHAR2;
156 
157 /** This function is called from the reports main page in OA to get the <br>
158 *   last run status for the of the concurrent programs
159 * @param  p_org_id                    The organization Id for the concurrent program last run
160 * @param  p_concurrent_program_id     Concurrent Program ID
161 */
162 FUNCTION last_run_status ( p_concurrent_program_id IN NUMBER,
163                            p_org_id IN NUMBER
164 					     )
165 RETURN VARCHAR2;
166 
167 /** This function is called from the Summary Main page in OA to get the <br>
168 *   Work Outstanding string for all the Activity, Activity Details combinations
169 * @param  l_ActivityId        Activity ID
170 * @param  l_ActivityDetailId  Activity Detail ID
171 * @param  l_OrgId             The organization Id selected by the user
172 */
173 
174 FUNCTION getWorkOutstanding ( l_ActivityId IN NUMBER,
175                               l_ActivityDetailId IN NUMBER,
176                               l_OrgId IN NUMBER
177 				            )
178 RETURN VARCHAR2;
179 
180 
181 /** This function is called from the Summary Main page in OA to get the <br>
182 *   Work Outstanding string for all the Activity, Activity Details combinations for graphs
183 * @param  l_ActivityId        Activity ID
184 * @param  l_ActivityDetailId  Activity Detail ID
185 * @param  l_OrgId             The organization Id selected by the user
186 */
187 FUNCTION getWorkOutstandingGraphData(l_ActivityId NUMBER,
188                                      l_ActivityDetailId NUMBER,
189                                      l_OrgId NUMBER
190                                      )
191    RETURN NUMBER;
192 
193 
194 /** This function is called from different LMS pages in OA to get the <br>
195 *   rating for the corresponding point sent.
196 * @param  p_points   Value sent.
197 */
198 FUNCTION getratingfrompoints (p_points NUMBER)
199 RETURN VARCHAR2;
200 
201 /** This function is called from the Non Standardized Lines page in OA to Standardize <br>
202 *   the selected Non-Standard Lines
203 * @param  P_COPY_ID        Comma Separated String of els_trx_src_id's for all the selected Non-Standard Lines
204 * @param  P_COPY_ANALYSIS  Comma Separated String of analysis id's selected for all the selected Non-Standard Lines
205 * @param  P_ORG_ID         The organization Id selected by the user
206 * @param  X_NUM_LINES_INSERTED_TASKS Number of lines that are inserted into the individual Tasks Table (Either for Individual or Grouped Tasks)
207 * @param  X_RETURN_STATUS  Status message whether the standardizing is successful or Failure.
208 * @param  X_MSG_NAME       Name of the Message that has to be shown in case of Failure.
209 */
210 
211 
212 PROCEDURE STANDARDIZE_LINES(
213 			                     X_NUM_LINES_INSERTED_TASKS         OUT NOCOPY NUMBER
214                             , X_NUM_LINES_INSERTED_GROUP         OUT NOCOPY NUMBER
215    			                , X_RETURN_STATUS                    OUT NOCOPY VARCHAR2
216                             , X_MSG_NAME                         OUT NOCOPY VARCHAR2
217 			                   , P_COPY_ID                          IN  VARCHAR2
218 			                   , P_COPY_ANALYSIS			           IN  VARCHAR2
219                             , P_ORG_ID                           IN  NUMBER
220 	                        );
221 
222 /** This procedure is launched from a concurrent request and it Standardizes all<br>
223 *   non-standardized lines based on the value of value of the parameters passed <br>
224 *   for activity, activity detail, operation, from date and to date.<br>
225 * @param errbuf                       This is the out message having the buffer of the return message
226 * @param retcode                      This variable is a out variable having the return code of the is program.
227                                       Whether this program is a success, warning or a failure
228 * @param p_org_id                     The organization Id
229 * @param p_activity_id                What is the activity ID (1-Inbound, 2- Manufacturing etc)
230 * @param p_activity_detail_Id          What is the activity detail Id(1-Receipt, 2-Putaway etc)
231 * @param p_operation_id               What is the operation (1-Load, 2-Drop etc..)
232 * @param p_from_date                  What is the date after which all transactions need to be picked for standardization
233 * @param p_to_date                   What is the date prior to which all transactions need to be picked for standardization
234 */
235 PROCEDURE STANDARDIZE_LINES_CP(
236 			                     ERRBUF                   OUT    NOCOPY VARCHAR2
237                             , RETCODE                  OUT    NOCOPY NUMBER
238 			                   , P_ORG_ID                 IN     NUMBER
239 			                   , P_ANALYSIS_TYPE			 IN     NUMBER
240                             , P_ACTIVITY_ID            IN     NUMBER
241                             , P_ACTIVITY_DETAIL_ID     IN     NUMBER
242                             , P_OPERATION_ID           IN     NUMBER
243                             , P_FROM_DATE              IN     VARCHAR2
244                             , P_TO_DATE                IN     VARCHAR2
245 	                          );
246 
247 /** This procedure is called from Mobile Transaction pages to capture the
248 *   Transaction data.
249 *   Calling Program: oracle.apps.inv.utilities.server.UtilFns.java
250 *   Author: Anupam Jain
251 *
252 * @P_ACTIVITY_ID              Activity Id (lookup code for WMS_ELS_ACTIVITIES)
253 * @P_ACTIVITY_DETAIL_ID       Activity Detail Id (lookup code for WMS_ELS_ACTIVITY_DETAILS)
254 * @P_OPERATION_ID		         Operaiton Id (lookup code for WMS_ELS_OPERATIONS)
255 * @P_ORGANIZATION_ID	         Current Organization
256 * @P_USER_ID		            Curent User
257 * @P_EQUIPMENT_ID		         Current Equipment instance
258 * @P_SOURCE_SUBINVENTORY	   Source Sub code
259 * @P_DESTINATION_SUBINVENTORY Destination Sub code
260 * @P_FROM_LOCATOR_ID	         From Locator Id
261 * @P_TO_LOCATOR_ID		      To Loactor Id
262 * @P_LABOR_TXN_SOURCE_ID	   lookup code for WMS_ELS_TXN_TYPES
263 * @P_TRANSACTION_UOM	         Transaction UOM
264 * @P_QUANTITY		            Quantity transacted
265 * @P_INVENTORY_ITEM_ID	      Item id
266 * @P_GROU@P_ID		            lookup code for WMS_ELS_TASK_EXECUTION_MODES
267 * @P_TASK_METHOD_ID           Lookup code for WMS_ELS_TASK_METHODS
268 * @P_TASK_TYPE_ID		         User task type id
269 * @P_GROUPED_TASK_IDENTIFIER	based on sequence WMS_ELS_GRP_TASK_IDENTIFIER_S
270                               All the tasks with same vaue for this column belongs
271                               to one group.
272 
273 * @P_GROU@P_SIZE		         Primarily used for Number of groups in Cluster Group.
274 * @P_TRANSACTION_TIME	      Time taken for Transaction
275 * @P_TRAVEL_AND_IDLE_TIME	   Time taken for Travel and Idle activities
276 * @P_CREATED_BY		         WHO cloumn
277 * @P_OPERATION_PLAN_ID        Operation Plan Id
281 
278 * @X_RETURN_STATUS            Return status of this procedure
279 
280 */
282 
283 PROCEDURE INSERT_ELS_TRX
284 (
285                            P_ACTIVITY_ID		         NUMBER,
286                            P_ACTIVITY_DETAIL_ID	      NUMBER,
287                            P_OPERATION_ID		         NUMBER,
288                            P_ORGANIZATION_ID	         NUMBER,
289                            P_USER_ID		            NUMBER,
290                            P_EQUIPMENT_ID		         NUMBER,
291                            P_SOURCE_SUBINVENTORY	   VARCHAR2,
292                            P_DESTINATION_SUBINVENTORY VARCHAR2,
293                            P_FROM_LOCATOR_ID	         NUMBER,
294                            P_TO_LOCATOR_ID		      NUMBER,
295                            P_LABOR_TXN_SOURCE_ID	   NUMBER,
296                            P_TRANSACTION_UOM	         VARCHAR2,
297                            P_QUANTITY		            NUMBER,
298                            P_INVENTORY_ITEM_ID	      NUMBER,
299                            P_GROUP_ID		            NUMBER,
300                            P_TASK_METHOD_ID           NUMBER,
301                            P_TASK_TYPE_ID		         NUMBER,
302                            P_GROUPED_TASK_IDENTIFIER	NUMBER,
303                            P_GROUP_SIZE		         NUMBER,
304                            P_TRANSACTION_TIME	      NUMBER,
305                            P_TRAVEL_AND_IDLE_TIME	   NUMBER,
306                            P_CREATED_BY		         NUMBER,
307                            P_OPERATION_PLAN_ID        NUMBER,
308                            X_RETURN_STATUS   OUT      NOCOPY VARCHAR2
309 );
310 
311 END WMS_LMS_UTILS;
312