DBA Data[Home] [Help]

PACKAGE: APPS.CS_SERVICEREQUEST_UTIL

Source


1 PACKAGE CS_ServiceRequest_UTIL AUTHID CURRENT_USER AS
2 /* $Header: csusrs.pls 120.18.12020000.2 2013/02/04 09:41:17 siahmed ship $ */
3 
4 -- --------------------------------------------------------------------------------
5 -- Start of comments
6 --  UTIL Name   : Convert_Request_Number_To_ID
7 --  Type        : Private
8 --  Description : Convert Incident_Number to Incident_ID.
9 --  Parameters  :
10 --  IN:	p_api_name	    IN   VARCHAR2  Required
11 --	  Name of the calling procedure
12 --	p_parameter_name    IN   VARCHAR2  Required
13 --	  Name of the value based parameter in the calling procedure
14 --	p_request_number    IN   VARCHAR2  Required Length = 64
15 --	  Value of the parameter to be converted
16 --      p_org_id 	    IN   NUMBER    Optional
17 --  OUT:p_request_id	    OUT  NUMBER    Required Length = 15
18 --	    x_return_status OUT  VARCHAR2  Required Length = 1
19 -- End of comments
20 -- --------------------------------------------------------------------------------
21   PROCEDURE Convert_Request_Number_To_ID (
22 	p_api_name		IN  VARCHAR2,
23 	p_parameter_name	IN  VARCHAR2,
24 	p_request_number	IN  VARCHAR2,
25 	p_org_id		IN  NUMBER := NULL,
26  	p_request_id	        OUT NOCOPY NUMBER ,
27 	x_return_status		OUT NOCOPY VARCHAR2
28   ) ;
29 
30 -- --------------------------------------------------------------------------------
31 -- Start of comments
32 --  UTIL Name   : Convert_Type_To_ID
33 --  Type        : Private
34 --  Description : Convert Name to Incident_Type_ID.
35 --  Parameters  :
36 --  IN:	p_api_name	 IN  VARCHAR2   Required
37 --	 Name of the calling procedure
38 --	p_parameter_name IN  VARCHAR2   Required
39 --	  Name of the value based parameter in the calling procedure
40 --	p_type_name	 IN  VARCHAR2 	Required Length = 30
41 --	  Value of the parameter to be converted
42 --	p_subtype	 IN  VARCHAR2	Required Length = 30
43 --	p_parent_type_id IN  NUMBER	Optional Length = 15
44 --  OUT:p_type_id	 OUT NUMBER 	Required Length = 15
45 --	x_return_status	 OUT VARCHAR2   Required Length = 1
46 -- End of comments
47 -- --------------------------------------------------------------------------------
48   PROCEDURE Convert_Type_To_ID (
49 	p_api_name		IN  VARCHAR2,
50 	p_parameter_name	IN  VARCHAR2,
51 	p_type_name		IN  VARCHAR2,
52 	p_subtype		IN  VARCHAR2,
53 	p_parent_type_id	IN  NUMBER	:= FND_API.G_MISS_NUM,
54  	p_type_id	        OUT NOCOPY NUMBER,
55 	x_return_status		OUT NOCOPY VARCHAR2
56   ) ;
57 
58 -- --------------------------------------------------------------------------------
59 -- Start of comments
60 --  UTIL Name   : Convert_Status_To_ID
61 --  Type        : Private
62 --  Description : Convert Name to Incident_Status_ID.
63 --  Parameters  :
64 --  IN:	p_api_name	 IN  VARCHAR2   Required
65 --	  Name of the calling procedure
66 --	p_parameter_name IN  VARCHAR2   Required
67 --	  Name of the value based parameter in the calling procedure
68 --	p_status_name	 IN  VARCHAR2 	Required Length = 30
69 --	  Value of the parameter to be converted
70 --	p_subtype	 IN  VARCHAR2	Required Length = 30
71 -- OUT:	p_status_id	 OUT NUMBER 	Required Length = 15
72 --	x_return_status	 OUT VARCHAR2   Required Length = 1
73 -- End of comments
74 -- --------------------------------------------------------------------------------
75   PROCEDURE Convert_Status_To_ID (
76 	p_api_name	 IN  VARCHAR2,
77 	p_parameter_name IN  VARCHAR2,
78 	p_status_name	 IN  VARCHAR2,
79 	p_subtype	 IN  VARCHAR2,
80  	p_status_id	 OUT NOCOPY NUMBER,
81 	x_return_status	 OUT NOCOPY VARCHAR2
82   ) ;
83 
84 -- --------------------------------------------------------------------------------
85 -- Start of comments
86 --  UTIL Name   : Convert_Severity_To_ID
87 --  Type        : Private
88 --  Description : Convert Name to Incident_Severity_ID.
89 --  Parameters  :
90 --  IN:	p_api_name	 IN  VARCHAR2  Required
91 --	  Name of the calling procedure
92 --	p_parameter_name IN  VARCHAR2  Required
93 --	  Name of the value based parameter in the calling procedure
94 --	p_severity_name	 IN  VARCHAR2  Required Length = 30
95 --	  Value of the parameter to be converted
96 --	p_subtype	 IN  VARCHAR2  Required Length = 30
97 --  OUT:p_severity_id	 OUT NUMBER    Required Length = 15
98 --	x_return_status	 OUT VARCHAR2  Required Length = 1
99 -- End of comments
100 -- --------------------------------------------------------------------------------
101   PROCEDURE Convert_Severity_To_ID (
102 	p_api_name		IN  VARCHAR2,
103 	p_parameter_name	IN  VARCHAR2,
104 	p_severity_name		IN  VARCHAR2,
105 	p_subtype		IN  VARCHAR2,
106 	p_severity_id		OUT NOCOPY NUMBER,
107 	x_return_status		OUT NOCOPY VARCHAR2
108   ) ;
109 
110 -- -----------------------------------------------------------------------
111 -- Start of Comments
112 --  Procedure   : Convert_Urgency_To_ID
113 --  Function    : Converts a service request urgency into the corresponding
114 --                internal ID.
115 --  Parameters  :
116 --  IN  : p_api_name             IN   VARCHAR2        Required
117 --          Name of the calling procedure.
118 --        p_parameter_name       IN   VARCHAR2        Required
119 --          Name of the value-based parameter in the calling procedure
120 --          (e.g. 'p_urgency_name').
121 --        p_urgency_name         IN   VARCHAR2(30)    Required
122 --          Value of the urgency name to be converted.
123 --  OUT : p_urgency_id           OUT  NUMBER
124 --        x_return_status        OUT  VARCHAR2(1)
125 -- End of Comments
126 -- -----------------------------------------------------------------------
127 
128 PROCEDURE Convert_Urgency_To_ID
129 ( p_api_name             IN   VARCHAR2,
130   p_parameter_name       IN   VARCHAR2,
131   p_urgency_name         IN   VARCHAR2,
132   p_urgency_id           OUT  NOCOPY NUMBER,
133   x_return_status        OUT  NOCOPY VARCHAR2
134 );
135 
136 -- -----------------------------------------------------------------------
137 -- Start of Comments
138 --  Procedure   : Convert_Customer_To_ID
139 --  Function    : Converts a customer name or a customer number into the
140 --                corresponding internal ID.
141 --  Parameters  :
142 --    IN  : p_api_name             IN   VARCHAR2        Required
143 --            Name of the calling procedure.
144 --          p_parameter_name_nb    IN   VARCHAR2        Required
145 --            Name of the first value-based parameter in the calling
146 --            procedure (e.g. 'p_customer_number').
147 --          p_parameter_name_n     IN   VARCHAR2        Required
148 --            Name of the second value-based parameter in the calling
149 --            procedure (e.g. 'p_customer_name').
150 --          p_customer_number      IN   VARCHAR2(30)    Optional
151 --            Default = FND_API.G_MISS_CHAR
152 --            Value of the customer number to be converted.
153 --          p_customer_name        IN   VARCHAR2(50)    Optional
154 --            Default = FND_API.G_MISS_CHAR
155 --            Value of the customer name to be converted.
156 --    OUT : p_customer_id          OUT  NUMBER
157 --          x_return_status        OUT  VARCHAR2(1)
158 --
159 --  Notes       : Either p_customer_name or p_customer_number must be passed.
160 --                If both are passed, p_customer_name will be ignored.
161 -- End of Comments
162 -- -----------------------------------------------------------------------
163 PROCEDURE Convert_Customer_To_ID
164 ( p_api_name             IN   VARCHAR2,
165   p_parameter_name_nb    IN   VARCHAR2,
166   p_parameter_name_n     IN   VARCHAR2,
167   p_customer_number      IN   VARCHAR2  := FND_API.G_MISS_CHAR,
168   p_customer_name        IN   VARCHAR2  := FND_API.G_MISS_CHAR,
169   p_customer_id          OUT  NOCOPY NUMBER,
170   x_return_status        OUT  NOCOPY VARCHAR2
171 );
172 
173 -- -----------------------------------------------------------------------
174 -- Start of Comments
175 --  Procedure   : Convert_Employee_To_ID
176 --  Function    : Converts an employee name or an employee number into the
177 --                corresponding internal ID.
178 --  Parameters  :
179 --    IN  : p_api_name             IN   VARCHAR2        Required
180 --            Name of the calling procedure.
181 --          p_parameter_name_nb    IN   VARCHAR2        Required
182 --            Name of the first value-based parameter in the calling
183 --            procedure (e.g. 'p_employee_number').
184 --          p_parameter_name_n     IN   VARCHAR2        Required
185 --            Name of the second value-based parameter in the calling
186 --            procedure (e.g. 'p_employee_name').
187 --          p_employee_number      IN   VARCHAR2(30)    Optional
188 --            Default = FND_API.G_MISS_CHAR
189 --            Value of the employee number to be converted.
190 --          p_employee_name        IN   VARCHAR2(50)    Optional
191 --            Default = FND_API.G_MISS_CHAR
192 --            Value of the employee name to be converted.
193 --    OUT : p_employee_id          OUT  NUMBER
194 --          x_return_status        OUT  VARCHAR2(1)
195 --
196 --  Notes       : Either p_employee_name or p_employee_number must be passed.
197 --                If both are passed, p_employee_name will be ignored.
198 -- End of Comments
199 -- -----------------------------------------------------------------------
200 
201 PROCEDURE Convert_Employee_To_ID
202 ( p_api_name             IN   VARCHAR2,
203   p_parameter_name_nb    IN   VARCHAR2,
204   p_employee_number      IN   VARCHAR2  := FND_API.G_MISS_CHAR,
205   p_employee_id          OUT  NOCOPY NUMBER,
206   x_return_status        OUT  NOCOPY VARCHAR2
207 );
208 
209 -- -----------------------------------------------------------------------
210 -- Start of Comments
211 --  Procedure   : Convert_CP_Ref_Number_To_ID
212 --  Function    : Converts a customer product reference number to its
213 --                corresponding customer product ID.
214 --  Parameters  :
215 --    IN  : p_api_name             IN   VARCHAR2 Required
216 --            Name of the calling procedure.
217 --          p_parameter_name       IN   VARCHAR2 Required
218 --            Name of the value-based parameter in the calling procedure
219 --            (e.g. 'p_cp_ref_number').
220 --          p_cp_ref_number        IN   NUMBER     Required
221 --            Value of the reference number to be converted.
222 --          p_org_id               IN   NUMBER   Optional Default = NULL
223 --            Value of the organization ID.
224 --    OUT : p_customer_product_id  OUT  NUMBER
225 --          x_return_status        OUT  VARCHAR2(1)
226 -- End of Comments
227 -- -----------------------------------------------------------------------
228 
229 PROCEDURE Convert_CP_Ref_Number_To_ID
230 ( p_api_name             IN   VARCHAR2,
231   p_parameter_name       IN   VARCHAR2,
232   p_cp_ref_number        IN   NUMBER,  -- 3784008
233   p_org_id               IN   NUMBER := NULL,
234   p_customer_product_id  OUT  NOCOPY NUMBER,
235   x_return_status        OUT  NOCOPY VARCHAR2
236 );
237 
238 
239 -- -----------------------------------------------------------------------
240 -- Start of Comments
241 --  Procedure   : Convert_RMA_Number_To_ID
242 --  Function    : Converts a RMA number into the corresponding sales order
243 --                header ID.
244 --  Parameters  :
245 --    IN  : p_api_name             IN   VARCHAR2        Required
246 --            Name of the calling procedure.
247 --          p_parameter_name       IN   VARCHAR2        Required
248 --            Name of the value-based parameter in the calling procedure
249 --            (e.g. 'p_rma_number').
250 --          p_rma_number           IN   NUMBER          Required
251 --            Value of the RMA number to be converted.
252 --          p_order_type_id        IN   NUMBER          Optional
253 --            ID of the order type of the RMA.
254 --          p_org_id               IN   NUMBER          Optional
255 --            Value of the organization ID.
256 --    OUT : p_rma_header_id        OUT  NUMBER
257 --          x_return_status        OUT  VARCHAR2(1)
258 --  Notes       : This procedure assumes that the number passed in is a valid
259 --                RMA number (order category is 'RMA').
260 -- End of Comments
261 -- -----------------------------------------------------------------------
262 /* siahmed removing its obsolete now
263 PROCEDURE Convert_RMA_Number_To_ID
264 ( p_api_name             IN   VARCHAR2,
265   p_parameter_name       IN   VARCHAR2,
266   p_rma_number           IN   NUMBER,
267   p_order_type_id        IN   NUMBER := NULL,
268   p_org_id               IN   NUMBER := NULL,
269   p_rma_header_id        OUT  NOCOPY NUMBER,
270   x_return_status        OUT  NOCOPY VARCHAR2
271 );
272 */
273 -- --------------------------------------------------------------------------------
274 -- Start of comments
275 --  UTIL Name   : Validate_Who_info
276 --  Type        : Private
277 --  Description : Verify that the user_id and login_id are valid and active.
278 --  Parameters  :
279 --  IN:	    p_api_name		IN  VARCHAR2   Required
280 --	      Name of the calling procedure
281 --	    p_parameter_name	IN  VARCHAR2   Required
282 --	      Name of the value based parameter in the calling procedure
283 --	    p_user_id		IN  NUMBER	Required Length = 15
284 --	    p_login_id		IN  NUMBER	Required Length = 15
285 --  OUT:    x_return_status	OUT VARCHAR2    Required Length = 1
286 --	    FND_API.G_RET_STS_SUCCESS	  => validation success
287 --	    FND_API.G_RET_STS_ERROR	  => validation failure
288 --	    FND_API.G_RET_STS_UNEXP_ERROR => unexpected error occurred
289 -- End of comments
290 -- --------------------------------------------------------------------------------
291   PROCEDURE Validate_Who_Info (
292 	p_api_name		 IN  VARCHAR2,
293 	p_parameter_name_usr	 IN  VARCHAR2,
294 	p_parameter_name_login	 IN  VARCHAR2,
295 	p_user_id		 IN  NUMBER,
296 	p_login_id		 IN  NUMBER,
297 	x_return_status		 OUT NOCOPY VARCHAR2
298   ) ;
299 
300 -- -----------------------------------------------------------------------
301 -- Start of Comments
302 --  Procedure   : Validate_Type
303 --  Function    : Verify that the service request type is a valid and active
304 --                type.
305 --  Parameters  :
306 --    IN  : p_api_name          IN   VARCHAR2        Required
307 --            Name of the calling procedure.
308 --          p_parameter_name    IN   VARCHAR2        Required
309 --            Name of the parameter in the calling procedure
310 --            (e.g. 'p_type_id').
311 --          p_type_id  		IN   NUMBER          Required
312 --            Unique identifier of the service request type to be validated.
313 --          p_subtype    	IN   VARCHAR2(30)    Required
314 --            Service request subtype (e.g. 'INC').
315 --          p_status_id    	IN   NUMBER          Required
316 --            Identifier of the service request status.
317 --    OUT : x_return_status     OUT  VARCHAR2(1)
318 --            FND_API.G_RET_STS_SUCCESS         => type is valid
319 --            FND_API.G_RET_STS_ERROR           => type is invalid
320 --
321 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
322 --                handled by the calling procedure.
323 -- End of Comments
324 -- -----------------------------------------------------------------------
325 /* PROCEDURE Validate_Type
326 ( p_api_name         IN   VARCHAR2,
327   p_parameter_name   IN   VARCHAR2,
328   p_type_id 	     IN   NUMBER,
329   p_subtype   	     IN   VARCHAR2,
330   p_status_id	     IN   NUMBER,
331   p_resp_id          IN   NUMBER:= NULL,
332   p_operation        IN   VARCHAR2:=NULL,
333   x_return_status    OUT  NOCOPY VARCHAR2
334 );
335 */
336 -- KP API Cleanup
337 
338 PROCEDURE Validate_Type (
339    p_parameter_name       IN   VARCHAR2,
340    p_type_id   		      IN   NUMBER,
341    p_subtype  		      IN   VARCHAR2,
342    p_status_id            IN   NUMBER:= NULL,   -- not used in proc.
343    p_resp_id              IN   NUMBER:= NULL,
344    p_resp_appl_id         IN   NUMBER,   -- new for 11.5.10 default NULL
345    p_business_usage       IN   VARCHAR2, -- new for 11.5.10 default NULL
346    p_ss_srtype_restrict   IN   VARCHAR2, -- new for 11.5.10 default 'N'
347    p_operation            IN   VARCHAR2, -- not used in proc.
348    x_return_status        OUT  NOCOPY VARCHAR2,
349    x_cmro_flag            OUT  NOCOPY VARCHAR2, -- new for 11.5.10
350    x_maintenance_flag     OUT  NOCOPY VARCHAR2 ); -- new for 11.5.10
351 
352 -- -----------------------------------------------------------------------
353 -- Start of Comments
354 --  Procedure   : Validate_Status
355 --  Function    : Verify that the service request status is a valid and active
356 --                for the type.
357 --  Parameters  :
358 --    IN  : p_api_name          IN   VARCHAR2        Required
359 --            Name of the calling procedure.
360 --          p_parameter_name    IN   VARCHAR2        Required
361 --            Name of the parameter in the calling procedure
362 --            (e.g. 'p_status_id').
363 --          p_status_id    	IN   NUMBER          Required
364 --            Unique identifier of the service request status to be validated.
365 --          p_subtype 	        IN   VARCHAR2(30)    Required
366 --            Service request subtype (e.g. 'INC').
367 --          p_type_id   	IN   NUMBER          Required
368 --            Identifier of the service request type related to the status.
369 --    OUT : p_close_flag        OUT  VARCHAR2(1)
370 --          x_return_status     OUT  VARCHAR2(1)
371 --            FND_API.G_RET_STS_SUCCESS         => status is valid
372 --            FND_API.G_RET_STS_ERROR           => status is invalid
373 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
374 --                handled by the calling procedure.
375 -- End of Comments
376 -- -----------------------------------------------------------------------
377 PROCEDURE Validate_Status
378 ( p_api_name         IN   VARCHAR2,
379   p_parameter_name   IN   VARCHAR2,
380   p_status_id	     IN   NUMBER,
381   p_subtype          IN   VARCHAR2,
382   p_type_id          IN   NUMBER,
383   p_resp_id          IN   NUMBER,
384   p_close_flag       OUT  NOCOPY VARCHAR2,
385   p_operation         IN         VARCHAR2 :='CREATE',
386   x_return_status    OUT  NOCOPY VARCHAR2
387 );
388 
389 PROCEDURE Validate_Updated_Status
390 ( p_api_name                 IN   VARCHAR2,
391   p_parameter_name           IN   VARCHAR2,
392   p_resp_id                  IN   NUMBER,
393   p_new_status_id            IN   NUMBER,
394   p_old_status_id            IN   NUMBER,
395   p_subtype      	         IN   VARCHAR2,
396   p_type_id      	         IN   NUMBER,
397   p_old_type_id              IN   NUMBER := NULL,
398   p_close_flag              OUT  NOCOPY VARCHAR2,
399   p_disallow_request_update OUT NOCOPY VARCHAR2,
400   p_disallow_owner_update   OUT NOCOPY VARCHAR2,
401   p_disallow_product_update OUT NOCOPY VARCHAR2,
402   x_return_status           OUT NOCOPY VARCHAR2
403 )  ;
404 
405 -- --------------------------------------------------------------------------------
406 -- Start of comments
407 --  UTIL Name   : Validate_Severity
408 --  Type        : Private
409 --  Description : Verify that the service request severity is a valid, active severity
410 --  Parameters  :
411 --  IN:	p_api_name		 IN  VARCHAR2   Required
412 --	  Name of the calling procedure
413 --	p_parameter_name	 IN  VARCHAR2   Required
414 --	  Name of the value based parameter in the calling procedure
415 --	p_severity_id		 IN  NUMBER	Required Length = 15
416 --	  ID of the severity
417 --      p_subtype		 IN  VARCHAR2	Required Length = 30
418 --  OUT:x_return_status		 OUT VARCHAR2   Required Length = 1
419 -- End of comments
420 -- --------------------------------------------------------------------------------
421   PROCEDURE Validate_Severity (
422 	p_api_name		IN  VARCHAR2,
423 	p_parameter_name	IN  VARCHAR2,
424 	p_severity_id		IN  NUMBER,
425 	p_subtype		IN  VARCHAR2,
426 	x_return_status		OUT NOCOPY VARCHAR2
427   ) ;
428 
429 -- --------------------------------------------------------------------------------
430 -- Start of comments
431 --  UTIL Name   : Validate_Urgency
432 --  Type        : Private
433 --  Description : Verify that the service request urgency is a valid, active urgency
434 --  Parameters  :
435 --  IN:	p_api_name		IN  VARCHAR2   Required
439 --	p_urgency_id		IN  NUMBER	   Required Length = 15
436 --	  Name of the calling procedure
437 --	p_parameter_name	IN  VARCHAR2   Required
438 --	  Name of the value based parameter in the calling procedure
440 --  OUT:x_return_status		OUT  VARCHAR2  Required Length = 1
441 --	  FND_API.G_RET_STS_SUCCESS	=> validation success
442 --	  FND_API.G_RET_STS_ERROR	=> validation failure
443 --	  FND_API.G_RET_STS_UNEXP_ERROR => unexpected error occurred
444 -- End of comments
445 -- --------------------------------------------------------------------------------
446   PROCEDURE Validate_Urgency (
447 	p_api_name		IN  VARCHAR2,
448 	p_parameter_name	IN  VARCHAR2,
449 	p_urgency_id		IN  NUMBER,
450 	x_return_status		OUT NOCOPY VARCHAR2
451   ) ;
452 
453 -- -----------------------------------------------------------------------
454 -- Start of Comments
455 --  Procedure   : Validate_Closed_Date
456 --  Function    : Verify that the closed date is later than service request date.
457 --  Parameters  :
458 --    IN  : p_api_name             IN   VARCHAR2        Required
459 --            Name of the calling procedure.
460 --          p_parameter_name       IN   VARCHAR2        Required
461 --            Name of the parameter in the calling procedure
462 --            (e.g. 'p_closed_date').
463 --          p_closed_date          IN   DATE            Required
464 --            Closed date.
465 --          p_request_date         IN   DATE            Required
466 --            Service request date.
467 --    OUT : x_return_status        OUT  VARCHAR2(1)
468 --            FND_API.G_RET_STS_SUCCESS         => date is valid
469 --            FND_API.G_RET_STS_ERROR           => date is invalid
470 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
471 --                handled by the calling procedure.
472 -- End of Comments
473 -- -----------------------------------------------------------------------
474   PROCEDURE Validate_Closed_Date
475   ( p_api_name             IN   VARCHAR2,
476     p_parameter_name       IN   VARCHAR2,
477     p_closed_date          IN   DATE,
478     p_request_date         IN   DATE,
479     x_return_status        OUT  NOCOPY VARCHAR2
480   );
481 
482   ---- Added for Enh# 1830701
483   PROCEDURE Validate_Inc_Reported_Date
484   ( p_api_name             IN   VARCHAR2,
485     p_parameter_name       IN   VARCHAR2,
486     p_request_date         IN   DATE,
487     p_inc_occurred_date    IN   DATE,
488     x_return_status        OUT  NOCOPY VARCHAR2
489   );
490 
491   PROCEDURE Validate_Inc_Occurred_Date
492   ( p_api_name             IN   VARCHAR2,
493     p_parameter_name       IN   VARCHAR2,
494     p_inc_occurred_date    IN   DATE,
495     p_request_date         IN   DATE,
496     x_return_status        OUT  NOCOPY VARCHAR2
497   );
498 
499   PROCEDURE Validate_Inc_Resolved_Date
500   ( p_api_name             IN   VARCHAR2,
501     p_parameter_name       IN   VARCHAR2,
502     p_inc_resolved_date    IN   DATE,
503     p_request_date         IN   DATE,
504     x_return_status        OUT  NOCOPY VARCHAR2
505   );
506 
507   PROCEDURE Validate_Inc_Responded_Date
508   ( p_api_name               IN   VARCHAR2,
509     p_parameter_name         IN   VARCHAR2,
510     p_inc_responded_by_date  IN   DATE,
511     p_request_date           IN   DATE,
512     x_return_status          OUT  NOCOPY VARCHAR2
513   );
514 
515   ---- Added for Enh# 222054
516   PROCEDURE Validate_Inc_Location_Id
517   ( p_api_name             	IN   VARCHAR2,
518     p_parameter_name       	IN   VARCHAR2,
519     -- New parameter added for validation based on location type --anmukher -- 08/18/03
520     p_incident_location_type	IN   VARCHAR2,
521     p_incident_location_id 	IN   NUMBER,
522     x_incident_country          OUT  NOCOPY VARCHAR2,
523     x_return_status        	OUT  NOCOPY VARCHAR2
524   );
525 
526   PROCEDURE Validate_Incident_Country
527   ( p_api_name             IN   VARCHAR2,
528     p_parameter_name       IN   VARCHAR2,
529     p_incident_country     IN   VARCHAR2,
530     x_return_status        OUT  NOCOPY VARCHAR2
531   );
532 
533 -- -----------------------------------------------------------------------
534 -- Start of Comments
535 --  Procedure   : Validate_Employee
536 --  Function    : Verify that the employee is valid and active.
537 --  Parameters  :
538 --    IN  : p_api_name		IN	VARCHAR2	Required
539 --            Name of the calling procedure.
540 --          p_parameter_name	IN	VARCHAR2	Required
541 --            Name of the parameter in the calling procedure
542 --            (e.g. 'p_customer_contact').
543 --          p_employee_id	IN	NUMBER		Required
544 --            Employee ID.
545 --          p_org_id		IN	NUMBER		Optional
546 --            Organization ID.
547 --    OUT : p_employee_name	OUT	VARCHAR2(240)
548 --          x_return_status	OUT	VARCHAR2(1)
549 --            FND_API.G_RET_STS_SUCCESS         => contact is valid
550 --            FND_API.G_RET_STS_ERROR           => contact is invalid
551 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
552 --                handled by the calling procedure.
553 -- End of Comments
554 -- -----------------------------------------------------------------------
555 PROCEDURE Validate_Employee
556 ( p_api_name		IN	VARCHAR2,
557   p_parameter_name	IN	VARCHAR2,
558   p_employee_id		IN	NUMBER,
559   p_org_id		IN	NUMBER   := NULL,
560   p_employee_name	OUT	NOCOPY VARCHAR2,
561   x_return_status	OUT	NOCOPY VARCHAR2
562 );
563 
564 -- --------------------------------------------------------------------------------
565 -- Start of comments
566 --  UTIL Name   : Validate_Customer
567 --  Type        : Private
568 --  Description : Verify that the service request customer is a valid customer
569 --                Check the passed Caller Type is same as that of the party. (Bug 3666089)
570 --  Parameters  :
571 --  IN:	p_api_name	 IN  VARCHAR2   Required
572 --	  Name of the calling procedure
573 --	p_parameter_name IN  VARCHAR2   Required
574 --	  Name of the value based parameter in the calling procedure
575 --	p_customer_id	 IN  NUMBER	Required Length = 15
576 --                  Addition for Bug 3666089
577 --      p_caller_type    IN VARCHAR2
578 --          Party_type information passed by the SR invocation program.
579 --                  Addition for Bug 3666089 Ends.
580 --  OUT:x_return_status	 OUT VARCHAR2   Required Length = 1
581 --	  FND_API.G_RET_STS_SUCCESS	=> validation success
582 --	  FND_API.G_RET_STS_ERROR	=> validation failure
583 --	  FND_API.G_RET_STS_UNEXP_ERROR => unexpected error occurred
584 -- End of comments
585 -- --------------------------------------------------------------------------------
586   PROCEDURE Validate_Customer (
587 	p_api_name		 IN  VARCHAR2,
588 	p_parameter_name	 IN  VARCHAR2,
589 	p_customer_id		 IN  NUMBER,
590 	p_caller_type            IN VARCHAR2,       --Bug 3666089
591 	x_return_status		 OUT NOCOPY VARCHAR2
592   ) ;
593 
594 -- -----------------------------------------------------------------------
595 -- Start of Comments
596 --  Procedure   : Validate_Customer_Contact
597 --  Function    : Verify that the customer contact is valid and active.
598 --  Parameters  :
599 --    IN  : p_api_name             IN   VARCHAR2        Required
600 --            Name of the calling procedure.
601 --          p_parameter_name       IN   VARCHAR2        Required
602 --            Name of the parameter in the calling procedure
603 --            (e.g. 'p_customer_contact').
604 --          p_customer_contact_id  IN   NUMBER          Required
605 --            ID of the customer contact.
606 --          p_customer_id  	   IN   NUMBER          Required
607 --            ID of the service request customer.
608 --          p_org_id               IN   NUMBER          Optional
609 --            Value of the organization ID.
610 --    OUT : x_return_status        OUT  VARCHAR2(1)
611 --            FND_API.G_RET_STS_SUCCESS         => contact is valid
612 --            FND_API.G_RET_STS_ERROR           => contact is invalid
613 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
614 --                handled by the calling procedure.
615 --  Added one more in parameter as p_customer_type, to get the header
616 --  customer_type by shijain.
617 -- End of Comments
618 -- -----------------------------------------------------------------------
619 PROCEDURE Validate_Customer_Contact
620 ( p_api_name             IN   VARCHAR2,
621   p_parameter_name       IN   VARCHAR2,
622   p_customer_contact_id  IN   NUMBER,
623   p_customer_id  	 IN   NUMBER,
624   p_org_id               IN   NUMBER     := NULL,
625   p_customer_type        IN   VARCHAR2,
626   x_return_status        OUT  NOCOPY VARCHAR2
627 );
628 
629 PROCEDURE Validate_Org_Relationship
633   p_customer_id  	 IN   NUMBER,
630 ( p_api_name             IN   VARCHAR2,
631   p_parameter_name       IN   VARCHAR2,
632   p_customer_contact_id  IN   NUMBER,
634   p_org_id               IN   NUMBER     := NULL,
635   x_return_status        OUT  NOCOPY VARCHAR2)  ;
636 
637 PROCEDURE Validate_Person_Relationship
638 ( p_api_name             IN   VARCHAR2,
639   p_parameter_name       IN   VARCHAR2,
640   p_customer_contact_id  IN   NUMBER,
641   p_customer_id  	 IN   NUMBER,
642   p_org_id               IN   NUMBER     := NULL,
643   x_return_status        OUT  NOCOPY VARCHAR2)  ;
644 
645 -- -----------------------------------------------------------------------
646 -- Start of Comments
647 --  Procedure   : Validate_Customer_Product
648 --  Function    : Verify that the customer product is an active CP in the
649 --                installed base of the given operating unit.
650 --  Parameters  :
651 --    IN  : p_api_name			IN	VARCHAR2	Required
652 --            Name of the calling procedure.
653 --          p_parameter_name		IN	VARCHAR2	Required
654 --            Name of the parameter in the calling procedure
655 --            (e.g. 'p_customer_product_id').
656 --          p_customer_product_id	IN	NUMBER		Required
657 --            ID of the service request customer product.
658 --          p_org_id			IN	NUMBER		Optional
659 --            Value of the organization ID.
660 --    OUT : p_customer_id		OUT	NUMBER
661 --          p_inventory_item_id		OUT	NUMBER
662 --          x_return_status		OUT	VARCHAR2(1)
663 --            FND_API.G_RET_STS_SUCCESS         => CP is valid
664 --            FND_API.G_RET_STS_ERROR           => CP is invalid
665 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
666 --                handled by the calling procedure.
667 -- End of Comments
668 -- -----------------------------------------------------------------------
669 PROCEDURE Validate_Customer_Product
670 ( p_api_name		IN  VARCHAR2,
671   p_parameter_name	IN  VARCHAR2,
672   p_customer_product_id	IN  NUMBER,
673   p_org_id		IN  NUMBER	:= NULL,
674   p_customer_id		IN  NUMBER,
675   p_inventory_item_id	OUT NOCOPY NUMBER,
676   p_inventory_org_id    IN  NUMBER,
677   x_return_status       OUT NOCOPY VARCHAR2
678 );
679 
680 -- --------------------------------------------------------------------------------
681 -- Start of comments
682 --  UTIL Name   : Validate_Product
683 --  Type        : Private
684 --  Description : Verify that the product exists in the given operating unit and
685 --		  the inventory org specified by the service system parameters
686 --  Parameters  :
687 --  IN:	p_api_name			 IN  VARCHAR2   Required
688 --	  Name of the calling procedure
689 --	p_parameter_name		 IN  VARCHAR2   Required
690 --	  Name of the value based parameter in the calling procedure
691 --	p_inventory_item_id		 IN  NUMBER	Required Length = 15
692 --	p_inventory_org_id		 IN  NUMBER	Required Length = 15
693 --      p_maint_organization_id          IN  NUMBER     Required Length = 15
694 --  OUT:x_return_status			OUT  VARCHAR2   Required Length = 1
695 --	  FND_API.G_RET_STS_SUCCESS	=> validation success
696 --	  FND_API.G_RET_STS_ERROR   	=> validation failure
697 --	  FND_API.G_RET_STS_UNEXP_ERROR => unexpected error occurred
698 -- Modification History
699 -- Date     Name     Description
700 -- -------- -------- -----------------------------------------------------------
701 -- 06/07/05 smisra   Added p_maint_organization_id parameter
702 -- -----------------------------------------------------------------------------
703 -- End of comments
704 -- --------------------------------------------------------------------------------
705   PROCEDURE Validate_Product (
706 	p_api_name	 	 IN  VARCHAR2,
707 	p_parameter_name	 IN  VARCHAR2,
708 	p_inventory_item_id	 IN  NUMBER,
709 	p_inventory_org_id	 IN  NUMBER,
710 	x_return_status		 OUT NOCOPY VARCHAR2,
711 	--------------anmukher--------------08/04/03
712 	-- Added the flag for CMRO-EAM project of 11.5.10
713 	p_maintenance_flag	 IN  VARCHAR2,
714         p_maint_organization_id  IN  NUMBER   ,
715         p_inv_org_master_org_flag IN        VARCHAR2
716   ) ;
717 
718 -- --------------------------------------------------------------------------------
719 -- Start of comments
720 --  UTIL Name   : Validate_Cust_Pref_Lang
721 --  Type        : Private
722 --  Description : Verify that the cust_pref_lang_id is a valid id
723 --                from fnd_languages
724 --  Parameters  :
725 --  IN:	p_api_name		 IN  VARCHAR2   Required
726 --	  Name of the calling procedure
727 --	p_parameter_name	 IN  VARCHAR2   Required
728 --	  Name of the value based parameter in the calling procedure
729 --	p_cust_pref_lang_id	 IN  NUMBER      Required
730 --  OUT:x_return_status		 OUT VARCHAR2   Required Length = 1
731 --	  FND_API.G_RET_STS_SUCCESS	=> validation success
732 --	  FND_API.G_RET_STS_ERROR	=> validation failure
733 --	  FND_API.G_RET_STS_UNEXP_ERROR => unexpected error occurred
734 -- End of comments
735 
736   PROCEDURE Validate_Cust_Pref_Lang_Code (
737 	p_api_name		  IN  VARCHAR2,
738 	p_parameter_name	  IN  VARCHAR2,
739 	p_cust_pref_lang_code     IN  VARCHAR2,
740 	x_return_status		  OUT NOCOPY VARCHAR2
741   ) ;
742 
743   PROCEDURE Validate_Comm_Pref_Code (
744 	p_api_name		 IN  VARCHAR2,
745 	p_parameter_name	 IN  VARCHAR2,
746 	p_comm_pref_code	 IN  VARCHAR2,
747 	x_return_status		 OUT NOCOPY VARCHAR2
748   ) ;
749 /*
750 Modification History
751 Date     Name       Desc
752 -------- ---------  --------------------------------------------------------
753 02/28/05 smisra     Bug 4083288
754                     added an addition parameter p_category_set_id
755 */
756   PROCEDURE Validate_Category_Id (
757 	p_api_name		 IN  VARCHAR2,
758 	p_parameter_name	 IN  VARCHAR2,
759 	p_category_id   	 IN  NUMBER,
760         p_category_set_id        IN  NUMBER,
761 	x_return_status		 OUT NOCOPY VARCHAR2
762   ) ;
763 
764   PROCEDURE Validate_Category_Set_Id (
765        p_api_name           IN  VARCHAR2,
766        p_parameter_name     IN  VARCHAR2,
767        p_category_id        IN  NUMBER,
768        p_category_set_id    IN  NUMBER,
769        p_inventory_item_id  IN  NUMBER,
770        p_inventory_org_id   IN  NUMBER,
771        x_return_status      OUT NOCOPY VARCHAR2
772   );
773 
774   PROCEDURE Validate_External_Reference (
775        p_api_name              IN  VARCHAR2,
776        p_parameter_name        IN  VARCHAR2,
777        p_external_reference    IN  VARCHAR2,
778        p_customer_product_id   IN  NUMBER,
779        p_inventory_item_id     IN  NUMBER     := NULL,
780        p_inventory_org_id      IN  NUMBER     := NULL,
781        p_customer_id           IN  NUMBER     := NULL,
782        x_return_status         OUT NOCOPY VARCHAR2
783   );
784 
785   PROCEDURE Validate_System_Id (
786        p_api_name           IN  VARCHAR2,
787        p_parameter_name     IN  VARCHAR2,
788        p_system_id          IN  NUMBER,
789        x_return_status      OUT NOCOPY VARCHAR2
790   );
791 
792 -- ------------------------------
793 -- Start of Comments
794 --  Procedure   : Validate_Exp_Resolution_Date
795 --  Function    : Verify that the expected resolution date is later than the
796 --                service request date.
797 --  Parameters  :
798 --    IN  : p_api_name             IN   VARCHAR2        Required
799 --            Name of the calling procedure.
800 --          p_parameter_name       IN   VARCHAR2        Required
801 --            Name of the parameter in the calling procedure
802 --            (e.g. 'p_exp_resolution_date').
803 --          p_exp_resolution_date  IN   DATE            Required
804 --            Expected resolution date.
805 --          p_request_date         IN   DATE            Required
806 --            Service request date.
807 --    OUT : x_return_status        OUT  VARCHAR2(1)
808 --            FND_API.G_RET_STS_SUCCESS         => date is valid
809 --            FND_API.G_RET_STS_ERROR           => date is invalid
810 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
811 --                handled by the calling procedure.
812 -- End of Comments
813 -- -----------------------------------------------------------------------
814 
815   PROCEDURE Validate_Problem_Code (
816 	p_api_name		 IN  VARCHAR2,
817 	p_parameter_name	 IN  VARCHAR2,
818 	p_problem_code		 IN  VARCHAR2,
819         p_incident_type_id       IN  NUMBER,
820         p_inventory_item_id      IN  NUMBER,
821 	p_inventory_org_id       IN  NUMBER, -- added for API cleanup
822 	p_category_id            IN  NUMBER, -- added for API cleanup
823 	x_return_status		 OUT NOCOPY VARCHAR2
824   ) ;
825 
826 -- -----------------------------------------------------------------------
827 -- Start of Comments
828 --  Procedure   : Validate_Exp_Resolution_Date
829 --  Function    : Verify that the expected resolution date is later than the
830 --                service request date.
831 --  Parameters  :
832 --    IN  : p_api_name             IN   VARCHAR2        Required
833 --            Name of the calling procedure.
834 --          p_parameter_name       IN   VARCHAR2        Required
835 --            Name of the parameter in the calling procedure
836 --            (e.g. 'p_exp_resolution_date').
837 --          p_exp_resolution_date  IN   DATE            Required
838 --            Expected resolution date.
839 --          p_request_date         IN   DATE            Required
840 --            Service request date.
841 --    OUT : x_return_status        OUT  VARCHAR2(1)
842 --            FND_API.G_RET_STS_SUCCESS         => date is valid
843 --            FND_API.G_RET_STS_ERROR           => date is invalid
844 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
845 --                handled by the calling procedure.
846 -- End of Comments
847 -- -----------------------------------------------------------------------
848 PROCEDURE Validate_Exp_Resolution_Date
849 ( p_api_name             IN   VARCHAR2,
850   p_parameter_name       IN   VARCHAR2,
851   p_exp_resolution_date  IN   DATE,
852   p_request_date         IN   DATE,
853   x_return_status        OUT  NOCOPY VARCHAR2
854 );
855 
856 -- -----------------------------------------------------------------------
857 -- Start of Comments
858 --  Procedure   : Validate_Install_Site
859 --  Function    : Verify that the given customer site is a valid INSTALL_AT site
860 --                within the given operating unit.
861 --  Parameters  :
862 --    IN  : p_parameter_name       IN VARCHAR2        Required
863 --            Name of the parameter in the calling procedure
864 --            (e.g. 'p_install_site_use_id').
865 --          p_install_site_id      IN NUMBER          Required
866 --            Party site id .
867 --          p_customer_id          IN NUMBER          Required
868 --            ID of the service request customer.
869 --    OUT : p_install_customer_id  OUT NUMBER
870 --          x_return_status        OUT VARCHAR2(1)
871 --            FND_API.G_RET_STS_SUCCESS         => site is valid
872 --            FND_API.G_RET_STS_ERROR           => site is invalid
873 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
874 --                handled by the calling procedure.
875 -- End of Comments
876 -- -----------------------------------------------------------------------
877 PROCEDURE Validate_Install_Site
878 ( p_parameter_name       IN   VARCHAR2,
879   p_install_site_id      IN   NUMBER,
880   p_customer_id          IN   NUMBER,
881   x_return_status        OUT  NOCOPY VARCHAR2
882 );
883 
884 -----------------------------------------------------------------------------
885 -- Start of Comments
886 --  Procedure   : Validate_Resolution_Code
887 --  Function    : Verify that the resolution code is an active resolution
888 --                code.
889 --  Parameters  :
890 --    IN  : p_api_name             IN   VARCHAR2        Required
891 --            Name of the calling procedure.
892 --          p_parameter_name       IN   VARCHAR2        Required
893 --            Name of the parameter in the calling procedure
894 --            (e.g. 'p_resolution_code').
895 --          p_resolution_code      IN   VARCHAR2(30)    Required
896 --            Resolution code.
897 --    OUT : x_return_status        OUT  VARCHAR2(1)
898 --            FND_API.G_RET_STS_SUCCESS         => code is valid
899 --            FND_API.G_RET_STS_ERROR           => code is invalid
900 --  Notes       : Unknown exceptions (i.e. unexpected errors) should be
901 --                handled by the calling procedure.
902 -- End of Comments
903 -- -----------------------------------------------------------------------
904 PROCEDURE Validate_Resolution_Code
905 ( p_api_name             IN   VARCHAR2,
906   p_parameter_name       IN   VARCHAR2,
907   p_resolution_code      IN   VARCHAR2,
908   x_return_status        OUT  NOCOPY VARCHAR2
909 );
910 
911 -- --------------------------------------------------------------------------------
912 -- Start of comments
913 --  UTIL Name   : Validate_Act_Resolution_Date
914 --  Type        : Private
915 --  Description : Verify that the actual resolution date is later than the service
916 --		          request date
917 --  Parameters  :
918 --  IN:	p_api_name			 IN  VARCHAR2   Required
919 --		Name of the calling procedure
920 --	p_parameter_name		 IN  VARCHAR2   Required
921 --		Name of the value based parameter in the calling procedure
922 --	p_act_resolution_date	 IN  DATE	Required
923 --	p_request_date			 IN  DATE	Required
924 --  OUT:x_return_status		 OUT  VARCHAR2   Required Length = 1
925 --	  FND_API.G_RET_STS_SUCCESS	=> validation success
926 --	  FND_API.G_RET_STS_ERROR	=> validation failure
927 --	  FND_API.G_RET_STS_UNEXP_ERROR => unexpected error occurred
928 -- End of comments
929 -- --------------------------------------------------------------------------------
930   PROCEDURE Validate_Act_Resolution_Date (
931 	p_api_name		 IN  VARCHAR2,
932 	p_parameter_name	 IN  VARCHAR2,
933 	p_act_resolution_date    IN  DATE,
934 	p_request_date		 IN  DATE,
935 	x_return_status		 OUT NOCOPY VARCHAR2
936   ) ;
937 -- contracts : made contract_id IN OUT parameter
938 PROCEDURE Validate_Contract_Service_Id
939 ( p_api_name             IN   VARCHAR2,
940   p_parameter_name       IN   VARCHAR2,
941   p_contract_service_id  IN   NUMBER,
942   x_contract_id          IN OUT  NOCOPY NUMBER,
943   x_contract_number      OUT  NOCOPY VARCHAR2,
944   x_return_status        OUT  NOCOPY VARCHAR2
945 );
946 
947 PROCEDURE Validate_Contract_Id
948 ( p_api_name             IN   VARCHAR2,
949   p_parameter_name       IN   VARCHAR2,
950   p_contract_id          IN   NUMBER,
951   x_contract_number      OUT  NOCOPY VARCHAR2,
952   x_return_status        OUT  NOCOPY VARCHAR2
953 );
954 
955 PROCEDURE Validate_Account_Id
956 (p_api_name        IN   VARCHAR2,
957  p_parameter_name  IN   VARCHAR2,
958  p_account_id      IN   NUMBER,
959  p_customer_id     IN   NUMBER,
960  x_return_status   OUT  NOCOPY VARCHAR2
961 );
962 
963 -- Validate Platform Id
964 PROCEDURE Validate_Platform_Id
965 ( p_api_name                IN   VARCHAR2,
966   p_parameter_name          IN   VARCHAR2,
967   p_platform_id             IN   NUMBER,
968   p_organization_id         IN   NUMBER,
969   x_serial_controlled_flag  OUT NOCOPY VARCHAR2,
970   x_return_status           OUT  NOCOPY VARCHAR2
971 );
972 
973 -- Validate Component Id
974 PROCEDURE Validate_CP_Comp_Id
975 ( p_api_name             IN   VARCHAR2,
976   p_parameter_name       IN   VARCHAR2,
977   p_cp_component_id      IN   NUMBER,
978   p_customer_product_id  IN   NUMBER,
979   p_org_id               IN   NUMBER,
980   x_return_status        OUT  NOCOPY VARCHAR2
981 );
982 
983 -- Validate Product Revision
984 PROCEDURE Validate_Product_Revision
985 ( p_api_name             IN   VARCHAR2,
986   p_parameter_name       IN   VARCHAR2,
987   p_product_revision     IN   VARCHAR2,
988   p_customer_product_id  IN   NUMBER,
989   p_inventory_org_id     IN   NUMBER,
990   p_inventory_item_id    IN   NUMBER,
991   x_return_status        OUT  NOCOPY VARCHAR2
992 );
993 
994 -- Validate Component Version
995 -- For bug 3337848 - pass inv_org_id to check for revision control
996 PROCEDURE Validate_Component_Version
997 ( p_api_name             IN   VARCHAR2,
998   p_parameter_name       IN   VARCHAR2,
999   p_component_version    IN   VARCHAR2,
1000   p_cp_component_id      IN   NUMBER,
1001   p_customer_product_id  IN   NUMBER,
1002   p_inventory_org_id     IN   NUMBER,
1003   x_return_status        OUT  NOCOPY VARCHAR2
1004 );
1005 
1006 -- Validate SubComponent Version
1007 -- For bug 3337848 - pass inv_org_id to check for revision control
1008 PROCEDURE Validate_Subcomponent_Version
1009 ( p_api_name             IN   VARCHAR2,
1010   p_parameter_name       IN   VARCHAR2,
1011   p_subcomponent_version IN   VARCHAR2,
1012   p_cp_component_id      IN   NUMBER,
1013   p_cp_subcomponent_id   IN   NUMBER,
1014   p_customer_product_id  IN   NUMBER,
1015   p_inventory_org_id     IN   NUMBER,
1016   x_return_status        OUT  NOCOPY VARCHAR2
1017 );
1018 
1019 -- Validate Sub Component Id
1020 PROCEDURE Validate_CP_SubComp_Id
1021 ( p_api_name             IN   VARCHAR2,
1022   p_parameter_name       IN   VARCHAR2,
1023   p_cp_subcomponent_id   IN   NUMBER,
1024   p_cp_component_id      IN   NUMBER,
1025   p_customer_product_id  IN   NUMBER,
1026   p_org_id               IN   NUMBER,
1027   x_return_status        OUT  NOCOPY VARCHAR2
1028 );
1029 
1030 PROCEDURE Validate_Inv_Item_Rev
1031 ( p_api_name             IN   VARCHAR2,
1032   p_parameter_name       IN   VARCHAR2,
1033   p_inv_item_revision    IN   VARCHAR2,
1034   p_inventory_item_id    IN   NUMBER,
1035   p_inventory_org_id     IN   NUMBER,
1036   x_return_status        OUT  NOCOPY VARCHAR2
1037 );
1038 
1039 -------------------------------
1040 PROCEDURE Validate_Inv_Comp_Id
1041 ( p_api_name             IN   VARCHAR2,
1042   p_parameter_name       IN   VARCHAR2,
1043   p_inventory_org_id     IN   NUMBER,
1044   p_inv_component_id     IN   NUMBER,
1045   p_inventory_item_id    IN   NUMBER,
1046   x_return_status        OUT  NOCOPY VARCHAR2
1047 );
1048 
1049 -------------------------------
1050 PROCEDURE Validate_Inv_Comp_Ver
1051 ( p_api_name                   IN   VARCHAR2,
1052   p_parameter_name             IN   VARCHAR2,
1053   p_inventory_org_id           IN   NUMBER,
1054   p_inv_component_id           IN   NUMBER,
1055   p_inv_component_version      IN   VARCHAR2,
1056   x_return_status              OUT  NOCOPY VARCHAR2
1057 );
1058 
1059 PROCEDURE Validate_Inv_SubComp_Id
1060 ( p_api_name                   IN   VARCHAR2,
1061   p_parameter_name             IN   VARCHAR2,
1062   p_inventory_org_id           IN   NUMBER,
1063   p_inv_subcomponent_id        IN   NUMBER,
1064   p_inv_component_id           IN   NUMBER,
1065   x_return_status              OUT  NOCOPY VARCHAR2
1066 );
1067 
1068 PROCEDURE Validate_Inv_SubComp_Ver
1069 ( p_api_name                   IN   VARCHAR2,
1070   p_parameter_name             IN   VARCHAR2,
1071   p_inventory_org_id           IN   NUMBER,
1072   p_inv_subcomponent_id        IN   NUMBER,
1073   p_inv_subcomponent_version   IN   VARCHAR2,
1074   x_return_status              OUT  NOCOPY VARCHAR2
1075 );
1076 
1077 PROCEDURE Validate_Support_Site_Id
1078 ( p_api_name             IN VARCHAR2,
1079   p_parameter_name       IN VARCHAR2,
1080   p_support_site_id      IN NUMBER,
1081   p_owner_id             IN NUMBER,
1082   p_resource_type        IN VARCHAR2,
1083   p_org_id               IN NUMBER,
1084   x_return_status        OUT NOCOPY VARCHAR2
1085 );
1086 
1087 PROCEDURE Validate_Group_Type
1088 ( p_api_name             IN   VARCHAR2,
1089   p_parameter_name       IN   VARCHAR2,
1090   p_group_type           IN   VARCHAR2,
1091   --p_resource_type      IN   VARCHAR2,
1092   x_return_status        OUT  NOCOPY VARCHAR2
1093 );
1094 
1095 PROCEDURE Validate_Group_Id
1096 ( p_api_name             IN   VARCHAR2,
1097   p_parameter_name       IN   VARCHAR2,
1098   p_group_type           IN   VARCHAR2,
1099   p_owner_group_id       IN   NUMBER,
1100   x_group_name           OUT  NOCOPY VARCHAR2,
1101   x_return_status        OUT  NOCOPY VARCHAR2
1102 );
1103 
1104 PROCEDURE Validate_Owner
1105 ( p_api_name             IN  VARCHAR2,
1106   p_parameter_name       IN  VARCHAR2,
1107   p_owner_id             IN  NUMBER,
1108   p_group_type           IN  VARCHAR2,
1109   p_owner_group_id       IN  NUMBER,
1110   p_org_id               IN  NUMBER,
1111   p_incident_type_id     IN  NUMBER, -- new for 11.5.10 for Security rule
1112   p_mode                 IN  VARCHAR2 DEFAULT NULL,
1113   x_owner_name           OUT NOCOPY VARCHAR2,
1114   x_owner_id             OUT NOCOPY NUMBER,
1115   x_resource_type        OUT NOCOPY VARCHAR2,
1116   x_support_site_id      OUT NOCOPY NUMBER,
1117   x_return_status        OUT NOCOPY VARCHAR2
1118 );
1119 
1120 PROCEDURE Validate_Resource_Type
1121 ( p_api_name             IN   VARCHAR2,
1122   p_parameter_name       IN   VARCHAR2,
1123   p_resource_type        IN   VARCHAR2,
1124   x_return_status        OUT  NOCOPY VARCHAR2
1125 );
1126 
1127 PROCEDURE Validate_SR_Channel
1128 ( p_api_name                   IN  VARCHAR2,
1129   p_parameter_name             IN  VARCHAR2,
1130   p_sr_creation_channel        IN  VARCHAR2,
1131   x_return_status              OUT NOCOPY VARCHAR2
1132 );
1133 
1134 -- Validate Language Id
1135 PROCEDURE Validate_CP_Language_Id
1136 ( p_api_name                   IN  VARCHAR2,
1137   p_parameter_name             IN  VARCHAR2,
1138   p_language_id                IN  NUMBER,
1139   p_customer_product_id        IN  NUMBER,
1140   x_return_status              OUT NOCOPY VARCHAR2
1141 );
1142 
1143 ------------------------------------------------------------
1144 -- Validate Territory Id
1145 PROCEDURE Validate_Territory_Id
1146 ( p_api_name                   IN   VARCHAR2,
1147   p_parameter_name             IN   VARCHAR2,
1148   p_territory_id               IN   NUMBER,
1149   p_owner_id                   IN   NUMBER,
1150   x_return_status              OUT  NOCOPY VARCHAR2
1151 );
1152 
1153 PROCEDURE Validate_Per_Contact_Point_Id
1154 ( p_api_name                   IN   VARCHAR2,
1155   p_parameter_name             IN   VARCHAR2,
1156   p_contact_point_type         IN   VARCHAR2,
1157   p_contact_point_id           IN   NUMBER,
1158   p_party_id                   IN   NUMBER,
1159   x_return_status              OUT  NOCOPY VARCHAR2
1160 );
1161 
1162 PROCEDURE Validate_Emp_Contact_Point_Id
1163 ( p_api_name                   IN   VARCHAR2,
1164   p_parameter_name             IN   VARCHAR2,
1165   p_employee_id                IN   NUMBER,
1166   p_contact_point_id           IN   NUMBER,
1167   x_return_status              OUT  NOCOPY VARCHAR2
1168 );
1169 
1170 PROCEDURE Validate_Contact_Point_Type
1171 ( p_api_name                   IN   VARCHAR2,
1172   p_parameter_name             IN   VARCHAR2,
1173   p_contact_point_type         IN   VARCHAR2,
1174   x_return_status              OUT  NOCOPY VARCHAR2
1175 );
1176 
1177 PROCEDURE Validate_Contact_Type
1178 ( p_api_name                   IN   VARCHAR2,
1179   p_parameter_name             IN   VARCHAR2,
1180   p_contact_type               IN   VARCHAR2,
1181   x_return_status              OUT  NOCOPY VARCHAR2
1182 );
1183 
1184 --------*******************************************************
1185 -- Start of comments
1186 --  UTIL Name   : Is_MultiOrg_Enabled
1187 --  Type        : Private
1188 --  Description : Checks if the multiorg is enabled
1189 --  Parameters  : None
1190 --  Return Value:
1191 --      p_multiorg_enabled	BOOLEAN
1192 --		returns TRUE if multiorg is enabled
1193 -- End of comments
1194 -- --------------------------------------------------------------------------------
1195    FUNCTION Is_MultiOrg_Enabled  RETURN BOOLEAN;
1196 
1197 -------------------------------------------------------------------------------
1198 -- Start of comments
1199 --  UTIL Name   : Is_Context_Enabled
1200 --  Type        : Private
1201 --  Description : Check if the ConText Option is enabled
1202 --  Parameters  : None
1203 --  Return Value:
1204 --    Returns TRUE if the ConText Option is enabled.
1205 -- End of comments
1206 -------------------------------------------------------------------------------
1207   FUNCTION Is_Context_Enabled RETURN BOOLEAN;
1208 
1209 --------------------------------------------------------------------------
1210 -- Start of comments
1211 --  Procedure	: Add_Desc_Flex_Msg
1212 --  Description	: Add the CS_API_SR_DESC_FLEX_ERROR message to the message
1213 --		  list.
1214 --  Parameters	:
1215 --  IN		:
1216 --	p_token_an		IN	VARCHAR2		Required
1217 --		Value of the API_NAME token.
1218 --	p_token_dfm		IN	VARCHAR2		Required
1219 --		Value of the DESC_FLEX_MSG token.
1220 -- End of comments
1221 --------------------------------------------------------------------------
1222 PROCEDURE Add_Desc_Flex_Msg
1223 ( p_token_an		IN	VARCHAR2,
1224   p_token_dfm		IN	VARCHAR2
1225 );
1226 
1230 --  Description	: Add the CS_API_ALL_INVALID_ARGUMENT message to the message
1227 --------------------------------------------------------------------------
1228 -- Start of comments
1229 --  Procedure	: Add_Invalid_Argument_Msg
1231 --		  list.
1232 --  Parameters	:
1233 --  IN		:
1234 --	p_token_an		IN	VARCHAR2		Required
1235 --		Value of the API_NAME token.
1236 --	p_token_v		IN	VARCHAR2		Required
1237 --		Value of the VALUE token.
1238 --	p_token_p		IN	VARCHAR2		Required
1239 --		Value of the PARAMETER token.
1240 -- End of comments
1241 --------------------------------------------------------------------------
1242 PROCEDURE Add_Invalid_Argument_Msg
1243 ( p_token_an	VARCHAR2,
1244   p_token_v	    VARCHAR2,
1245   p_token_p	    VARCHAR2
1246 );
1247 
1248 --------------------------------------------------------------------------
1249 -- Start of comments
1250 --  Procedure	: Add_Key_Flex_Msg
1251 --  Description	: Add the CS_API_SR_KEY_FLEX_ERROR message to the message
1252 --		  list.
1253 --  Parameters	:
1254 --  IN		:
1255 --	p_token_an		IN	VARCHAR2		Required
1256 --		Value of the API_NAME token.
1257 --	p_token_kfm		IN	VARCHAR2		Required
1258 --		Value of the KEY_FLEX_MSG token.
1259 -- End of comments
1260 --------------------------------------------------------------------------
1261 PROCEDURE Add_Key_Flex_Msg
1262 ( p_token_an		IN	VARCHAR2,
1263   p_token_kfm		IN	VARCHAR2
1264 );
1265 
1266 --------------------------------------------------------------------------
1267 -- Start of comments
1268 --  Procedure	: Add_Missing_Param_Msg
1269 --  Description	: Add the CS_API_ALL_MISSING_PARAM message to the message list.
1270 --  Parameters	:
1271 --  IN		:
1272 --	p_token_an		IN	VARCHAR2		Required
1273 --		Value of the API_NAME token.
1274 --	p_token_mp		IN	VARCHAR2		Required
1275 --		Value of the MISSING_PARAM token.
1276 -- End of comments
1277 --------------------------------------------------------------------------
1278 PROCEDURE Add_Missing_Param_Msg
1279 ( p_token_an		IN	VARCHAR2,
1280   p_token_mp		IN	VARCHAR2
1281 );
1282 
1283 --------------------------------------------------------------------------
1284 -- Start of comments
1285 --  Procedure	: Add_Null_Parameter_Msg
1286 --  Description	: Add the CS_API_ALL_NULL_PARAMETER message to the message list.
1287 --  Parameters	:
1288 --  IN		:
1289 --	p_token_an		IN	VARCHAR2		Required
1290 --		Value of the API_NAME token.
1291 --	p_token_np		IN	VARCHAR2		Required
1292 --		Value of the NULL_PARAM token.
1293 -- End of comments
1294 --------------------------------------------------------------------------
1295 PROCEDURE Add_Null_Parameter_Msg
1296 ( p_token_an		IN	VARCHAR2,
1297   p_token_np		IN	VARCHAR2
1298 );
1299 
1300 --------------------------------------------------------------------------
1301 -- Start of comments
1302 --  Procedure	: Add_Param_Ignored_Msg
1303 --  Description	: Add the CS_API_ALL_PARAM_IGNORED message to the message list.
1304 --  Parameters	:
1305 --  IN		:
1306 --	p_token_an		IN	VARCHAR2		Required
1307 --		Value of the API_NAME token.
1308 --	p_token_ip		IN	VARCHAR2		Required
1309 --		Value of the IGNORED_PARAM token.
1310 -- End of comments
1311 --------------------------------------------------------------------------
1312 PROCEDURE Add_Param_Ignored_Msg
1313 ( p_token_an		IN	VARCHAR2,
1314   p_token_ip		IN	VARCHAR2 );
1315 
1316 PROCEDURE Add_Cp_Flag_Ignored_Msg
1317 ( p_token_an            IN      VARCHAR2,
1318   p_token_ip            IN      VARCHAR2,
1319   p_token_pv	        IN      VARCHAR2);
1320 
1321 PROCEDURE Add_Duplicate_Value_Msg
1322 ( p_token_an   IN   VARCHAR2,
1323   p_token_p    IN   VARCHAR2 );
1324 
1325 PROCEDURE Add_Same_Val_Update_Msg
1326 ( p_token_an	IN   VARCHAR2,
1327   p_token_p	    IN   VARCHAR2 );
1328 
1329 PROCEDURE call_internal_hook( p_package_name    IN VARCHAR2 ,
1330 	                          p_api_name        IN VARCHAR2 ,
1331 	                          p_processing_type IN VARCHAR2,
1332 		                      x_return_status   OUT NOCOPY VARCHAR2 );
1333 
1334 PROCEDURE  Validate_Current_Serial(
1335     p_api_name              IN  VARCHAR2,
1336     p_parameter_name        IN  VARCHAR2,
1337     p_inventory_item_id     IN  NUMBER     := NULL,
1338     p_inventory_org_id      IN  NUMBER,
1339     p_customer_product_id   IN  NUMBER    := NULL,
1340     p_customer_id           IN  NUMBER    := NULL,
1341     p_current_serial_number IN  VARCHAR2,
1342     x_return_status         OUT NOCOPY VARCHAR2  ) ;
1343 
1344 -- -----------------------------------------------------------------------
1345 -- Start of Comments
1346 --  Procedure   : Validate_source_program_code
1347 --  Function    : Verify that the source program code is valid lookup code
1348 --                from the lookup CS_SR_SOURCE_PROGRAMS.
1349 --  Parameters  :
1350 --    IN  : p_api_name             IN   VARCHAR2        Required
1351 --              Name of the calling procedure.
1352 --          p_parameter_name       IN   VARCHAR2        Required
1353 --              Name of the parameter in the calling procedure
1354 --              (e.g. 'p_source_program_code').
1355 --          p_source_program_code  IN   VARCHAR2(30)    Required
1356 --              Service request source program code
1357 --    OUT : x_return_status        OUT  VARCHAR2(1)
1358 --          	FND_API.G_RET_STS_SUCCESS => source_program_code is valid
1359 --          	FND_API.G_RET_STS_ERROR   => source_program_code is invalid
1360 --  Notes : Unknown exceptions (i.e. unexpected errors) should be
1361 --          handled by the calling procedure.
1362 -- End of Comments
1363 -- -----------------------------------------------------------------------
1364 PROCEDURE Validate_source_program_Code
1365     ( p_api_name                      IN   VARCHAR2,
1366       p_parameter_name                IN   VARCHAR2,
1367       p_source_program_code           IN   VARCHAR2,
1368       x_return_status                 OUT  NOCOPY VARCHAR2
1369     ) ;
1370 
1371 -- -----------------------------------------------------------------------
1372 /*
1373 ** Validate_Bill_To_Ship_To_Ct - validate_bill_to_ship_to_contact
1374 ** 1. Same PROCEDURE will be used TO VALIDATE Bill_To AND Ship_To Contacts
1375 ** 2. Contat can be
1376 **    a. IF Bill_to_customer IS person , contact can be same person (Self)
1377 **    b. IF bill_to_customer IS person OR Org, Contact can be a Relationship
1378 **       BETWEEN the Bill_To Customer AND a Person
1379 */
1380 
1381 PROCEDURE Validate_Bill_To_Ship_To_Ct
1382 ( p_api_name             IN   VARCHAR2,
1383   p_parameter_name       IN   VARCHAR2,
1384   p_bill_to_contact_id   IN   NUMBER,
1385   p_bill_to_party_id     IN   NUMBER,
1386   p_customer_type	     IN   VARCHAR2,
1387   x_return_status        OUT  NOCOPY VARCHAR2
1388 );
1389 
1390 -- --------------------------------------------------------------------------------
1391 -- Validate_Bill_To_Ship_To_Party
1392 -- Same procedure is used to validate Bill_to and Ship_To Parties
1393 -- 1. Party must be Active of type Person or Organization
1394 -- 2. Must have a valid relationship with the SR Customer.
1395 -- 3. Added one more in out parameter as x_customer_type, to get the bill_to
1396 --    customer_type and to give the header customer type.
1397 -- --------------------------------------------------------------------------------
1398 
1399   PROCEDURE Validate_Bill_To_Ship_To_Party (
1400 	p_api_name			     IN  VARCHAR2,
1401 	p_parameter_name		 IN  VARCHAR2,
1402 	p_bill_to_party_id		 IN  NUMBER,
1403 	p_customer_id			 IN  NUMBER,
1404     x_customer_type          IN  OUT NOCOPY VARCHAR2,
1405 	x_return_status			 OUT NOCOPY VARCHAR2
1406   ) ;
1407 
1408 -- --------------------------------------------------------------------------------
1409 -- Validate_Bill_To_Ship_To_Site (New Procedure for 11.5.9)
1410 -- Same procedure is used to validate Bill_to and Ship_To Sites
1411 -- 1. Site must be an active site attached to party
1412 -- 2. Site USe must be Valid and Must be BILL_TO or SHIP_TO as required
1413 -- 3. p_site_use_type will be BILL_TO or SHIP_TO
1414 -- --------------------------------------------------------------------------------
1415 
1416   PROCEDURE Validate_Bill_To_Ship_To_Site (
1417 	p_api_name			     IN  VARCHAR2,
1418 	p_parameter_name		 IN  VARCHAR2,
1419 	p_bill_to_site_id		 IN  NUMBER,
1420 	p_bill_to_party_id		 IN  NUMBER,
1421 	p_site_use_type			 IN  VARCHAR2,
1422         x_site_use_id                    OUT NOCOPY NUMBER,
1423 	x_return_status			 OUT NOCOPY VARCHAR2
1424   ) ;
1425 
1426 -- -----------------------------------------------------------------------
1427 --  Procedure   : Validate_Bill_To_Ship_To_Acct
1428 --  Function    : Verify that the Bill To Account is valid for given customer site OR customer.
1429 --  Parameters  :
1430 --  IN  :p_api_name             IN   VARCHAR2      Required Name of the calling procedure.
1431 --       p_parameter_name       IN   VARCHAR2      Required Name of parameter in the calling procedure (e.g. 'p_bill_to_account').
1432 --       p_bill_to_account_id   IN   NUMBER        Required Unique bill to account identifier
1433 --       p_bill_to_customer_id  IN   NUMBER        Unique Bill to customer ientifier
1434 --  OUT :x_return_status        OUT  VARCHAR2(1)
1435 --       FND_API.G_RET_STS_SUCCESS         => Bill_to_Account is valid
1436 --       FND_API.G_RET_STS_ERROR           => Bill_to_Account is invalid
1437 -- -----------------------------------------------------------------------
1438 
1439 PROCEDURE Validate_Bill_To_Ship_To_Acct
1440 ( p_api_name         IN   VARCHAR2,
1441   p_parameter_name   IN   VARCHAR2,
1442   p_account_id   	 IN   NUMBER,
1443   p_party_id   		 IN   NUMBER,
1444   x_return_status    OUT  NOCOPY VARCHAR2
1445 ) ;
1446 
1450 --  Function    : Verify that the INC_DIST_QUAL_UOM is valid lookup
1447 -- -----------------------------------------------------------------------
1448 -- Start of Comments
1449 --  Procedure   : Validate_INC_DIST_QUAL_UOM
1451 --                code from the lookup CS_SR_DISTANCE_UOM
1452 --  Parameters  :
1453 --    IN  : p_api_name             IN   VARCHAR2        Required
1454 --             Name of the calling procedure.
1455 --          p_parameter_name       IN   VARCHAR2        Required
1456 --             Name of the parameter in the calling procedure
1457 --             (e.g. 'P_INC_DIST_QUAL_UOM').
1458 --          P_INC_DIST_QUAL_UOM    IN   VARCHAR2(30)
1459 --             Service request incident distance qualifier UOM
1460 --    OUT : x_return_status        OUT  VARCHAR2(1)
1461 --          FND_API.G_RET_STS_SUCCESS   => INC_DIST_QUAL_UOM is valid
1462 --          FND_API.G_RET_STS_ERROR     => INC_DIST_QUAL_UOM is invalid
1463 --  Notes : Unknown exceptions (i.e. unexpected errors) should be
1464 --          handled by the calling procedure.
1465 -- End of Comments
1466 -- -----------------------------------------------------------------------
1467 PROCEDURE Validate_INC_DIST_QUAL_UOM
1468     ( p_api_name                      IN   VARCHAR2,
1469       p_parameter_name                IN   VARCHAR2,
1470       p_INC_DIST_QUAL_UOM             IN   VARCHAR2,
1471       x_return_status                 OUT  NOCOPY VARCHAR2
1472     ) ;
1473 
1474 -- -----------------------------------------------------------------------
1475 -- Start of Comments
1476 --  Procedure   : Validate_INC_DIRECTION_QUAL
1477 --  Function    : Verify that the INC_DIRECTION_QUAL is valid lookup
1478 --                code from the lookup CS_SR_DIRECTIONS.
1479 --  Parameters  :
1480 --    IN  : p_api_name             IN   VARCHAR2        Required
1481 --            Name of the calling procedure.
1482 --          p_parameter_name       IN   VARCHAR2        Required
1483 --            Name of the parameter in the calling procedure
1484 --            (e.g. 'p_INC_DIRECTION_QUAL').
1485 --          p_INC_DIRECTION_QUAL  IN   VARCHAR2(30)
1486 --             Service request incident direction qualifier
1487 --    OUT : x_return_status        OUT  VARCHAR2(1)
1488 --          FND_API.G_RET_STS_SUCCESS => INC_DIRECTION_QUAL is valid
1489 --          FND_API.G_RET_STS_ERROR   => INC_DIRECTION_QUAL is invalid
1490 --  Notes : Unknown exceptions (i.e. unexpected errors) should be
1491 --          handled by the calling procedure.
1492 -- End of Comments
1493 -- -----------------------------------------------------------------------
1494 
1495 PROCEDURE Validate_INC_DIRECTION_QUAL
1496     ( p_api_name                      IN   VARCHAR2,
1497       p_parameter_name                IN   VARCHAR2,
1498       p_INC_DIRECTION_QUAL            IN   VARCHAR2,
1499       x_return_status                 OUT  NOCOPY VARCHAR2
1500     ) ;
1501 
1502 --------------------------------------------------------------------------
1503 -- Start of comments
1504 --  Procedure   : Add_Desc_Flex_Msg
1505 --  Description : Overloaded Procedure to Add the CS_API_SR_DESC_FLEX_ERROR message to the message
1506 --                list.
1507 --  Parameters  :
1508 --  IN          :
1509 --      p_token_an              IN      VARCHAR2                Required
1510 --              Value of the API_NAME token.
1511 --      p_token_kfm             IN      VARCHAR2                Required
1512 --              Value of the KEY_FLEX_MSG token.
1513 --      p_column_name           IN      VARCHAR2                Default Null
1514 --              Name of the database column/control parameter being validated
1515 --      p_table_name            IN      VARCHAR2                Default Null
1516 --              Name of the database table/control parameter being validated
1517 -- End of comments
1518 --------------------------------------------------------------------------
1519 PROCEDURE Add_Desc_Flex_Msg
1520 ( p_token_an       VARCHAR2,
1521   p_token_dfm      VARCHAR2,
1522   p_table_name  IN VARCHAR2,
1523   p_column_name IN VARCHAR2
1524 ) ;
1525 
1526 --------------------------------------------------------------------------
1527 -- Start of comments
1528 --  Procedure	: Add_Invalid_Argument_Msg
1529 --  Description	: Overloaded procedure to Add the CS_API_ALL_INVALID_ARGUMENT
1530 --                message to the message list.
1531 --  Parameters	:
1532 --  IN		:
1533 --	    p_token_an		IN	VARCHAR2	Required
1534 --		  Value of the API_NAME token.
1535 --	    p_token_v		IN	VARCHAR2	Required
1536 --		  Value of the VALUE token.
1537 --	    p_token_p		IN	VARCHAR2	Required
1538 --		  Value of the PARAMETER token.
1539 --      p_column_name   IN  VARCHAR2    Default Null
1540 --        Name of the database column/control parameter being validated
1541 --      p_table_name    IN  VARCHAR2    Default Null
1542 --        Name of the database table/control parameter being validated
1543 -- End of comments
1544 --------------------------------------------------------------------------
1545 PROCEDURE Add_Invalid_Argument_Msg ( p_token_an	   IN VARCHAR2,
1546                                      p_token_v	   IN VARCHAR2,
1547                                      p_token_p	   IN VARCHAR2,
1548                                      p_table_name  IN VARCHAR2,
1549                                      p_column_name IN VARCHAR2 );
1550 
1551 --------------------------------------------------------------------------
1552 -- Start of comments
1553 --  Procedure	: Add_Key_Flex_Msg
1554 --  Description	: Overloaded Procedure to Add the CS_API_SR_KEY_FLEX_ERROR message to the message
1555 --		  list.
1556 --  Parameters	:
1557 --  IN		:
1558 --	    p_token_an		IN	 VARCHAR2	  Required
1559 --		  Value of the API_NAME token.
1560 --	    p_token_kfm		IN	 VARCHAR2	  Required
1561 --		  Value of the KEY_FLEX_MSG token.
1562 --      p_column_name   IN   VARCHAR2     Default Null
1563 --        Name of the database column/control parameter being validated
1564 --      p_table_name    IN   VARCHAR2     Default Null
1565 --         Name of the database table/control parameter being validated
1566 -- End of comments
1567 --------------------------------------------------------------------------
1568 PROCEDURE Add_Key_Flex_Msg ( p_token_an    IN VARCHAR2,
1569                              p_token_kfm   IN VARCHAR2,
1570                              p_table_name  IN VARCHAR2,
1571                              p_column_name IN VARCHAR2 );
1572 
1573 --------------------------------------------------------------------------
1574 -- Start of comments
1575 --  Procedure	: Add_Missing_Param_Msg
1576 --  Description	: Overloaded Procedure to Add the CS_API_ALL_MISSING_PARAM message to the message
1577 --		  list.
1578 --  Parameters	:
1579 --  IN		:
1580 --	p_token_an		IN	VARCHAR2		Required
1581 --		Value of the API_NAME token.
1582 --	p_token_mp		IN	VARCHAR2		Required
1583 --		Value of the MISSING_PARAM token.
1584 --      p_column_name           IN      VARCHAR2                Default Null
1585 --              Name of the database column/control parameter being validated
1586 --      p_table_name            IN      VARCHAR2                Default Null
1587 --              Name of the database table/control parameter being validated
1588 -- End of comments
1589 --------------------------------------------------------------------------
1590 
1591 PROCEDURE Add_Missing_Param_Msg ( p_token_an    IN  VARCHAR2,
1592                                   p_token_mp    IN  VARCHAR2,
1593                                   p_table_name  IN  VARCHAR2,
1594                                   p_column_name IN  VARCHAR2);
1595 
1596 --------------------------------------------------------------------------
1597 -- Start of comments
1598 --  Procedure	: Add_Null_Parameter_Msg
1599 --  Description	: Overloaded Procedure to Add the CS_API_ALL_NULL_PARAMETER message to the message
1600 --		  list.
1601 --  Parameters	:
1602 --  IN		:
1603 --	p_token_an		IN	VARCHAR2		Required
1604 --		Value of the API_NAME token.
1605 --	p_token_np		IN	VARCHAR2		Required
1606 --		Value of the NULL_PARAM token.
1607 --      p_column_name           IN      VARCHAR2                Default Null
1608 --              Name of the database column/control parameter being validated
1609 --      p_table_name            IN      VARCHAR2                Default Null
1610 --              Name of the database table/control parameter being validated
1611 -- End of comments
1612 --------------------------------------------------------------------------
1613 
1614 PROCEDURE Add_Null_Parameter_Msg ( p_token_an    IN  VARCHAR2,
1615                                    p_token_np	 IN  VARCHAR2,
1616                                    p_table_name  IN  VARCHAR2,
1617                                    p_column_name IN  VARCHAR2 );
1618 
1619 --------------------------------------------------------------------------
1620 -- Start of comments
1621 --  Procedure	: Add_Param_Ignored_Msg
1622 --  Description	: Overloaded Procedure to Add the CS_API_ALL_PARAM_IGNORED message to the message
1623 --		  list.
1624 --  Parameters	:
1625 --  IN		:
1626 --	p_token_an		IN	VARCHAR2		Required
1627 --		Value of the API_NAME token.
1628 --	p_token_ip		IN	VARCHAR2		Required
1629 --		Value of the IGNORED_PARAM token.
1630 --      p_column_name           IN      VARCHAR2                Default Null
1631 --              Name of the database column/control parameter being validated
1632 --      p_table_name            IN      VARCHAR2                Default Null
1633 --              Name of the database table/control parameter being validated
1634 -- End of comments
1635 --------------------------------------------------------------------------
1636 
1637 PROCEDURE Add_Param_Ignored_Msg ( p_token_an	 IN  VARCHAR2,
1638                                   p_token_ip     IN  VARCHAR2,
1639                                   p_table_name   IN  VARCHAR2,
1640                                   p_column_name  IN  VARCHAR2);
1641 
1642 
1643 
1644 --------------------------------------------------------------------------
1645 -- Start of comments
1646 --  Procedure	: Add_Duplicate_Value_Msg
1647 --  Description	: Overloaded Procedure to Add the CS_API_ALL_PARAM_IGNORED message to the message
1648 --		  list.
1649 --  Parameters	:
1650 --  IN		:
1651 --	p_token_an		IN	VARCHAR2		Required
1652 --		Value of the API_NAME token.
1653 --	p_token_ip		IN	VARCHAR2		Required
1654 --		Value of the IGNORED_PARAM token.
1655 --      p_column_name           IN      VARCHAR2                Default Null
1656 --              Name of the database column/control parameter being validated
1657 --      p_table_name            IN      VARCHAR2                Default Null
1658 --              Name of the database table/control parameter being validated
1659 -- End of comments
1660 --------------------------------------------------------------------------
1661 
1662 PROCEDURE Add_Duplicate_Value_Msg( p_token_an	 IN  VARCHAR2,
1663 				   p_token_p     IN  VARCHAR2,
1664                                    p_table_name  IN  VARCHAR2,
1665                                    p_column_name IN  VARCHAR2 );
1666 
1667 --------------------------------------------------------------------------
1668 -- Start of comments
1669 --  Procedure	: Add_Same_Val_Update_Msg
1670 --  Description	: Overloaded Procedure to Add the CS_API_ALL_PARAM_IGNORED message to the message
1671 --		  list.
1672 --  Parameters	:
1673 --  IN		:
1674 --	p_token_an		IN	VARCHAR2		Required
1675 --		Value of the API_NAME token.
1676 --	p_token_ip		IN	VARCHAR2		Required
1677 --		Value of the IGNORED_PARAM token.
1678 --      p_column_name           IN      VARCHAR2                Default Null
1679 --              Name of the database column/control parameter being validated
1680 --      p_table_name            IN      VARCHAR2                Default Null
1681 --              Name of the database table/control parameter being validated
1682 -- End of comments
1683 --------------------------------------------------------------------------
1684 PROCEDURE Add_Same_Val_Update_Msg( p_token_an	 IN  VARCHAR2,
1685 				   p_token_p	 IN  VARCHAR2,
1686                                    p_table_name  IN  VARCHAR2,
1687                                    p_column_name IN  VARCHAR2 );
1688 
1689 -- -----------------------------------------------------------------------------
1690 ---
1691 -- Validate_Site_Site_Use
1692 -- Same procedure is used to validate Bill_to and Ship_To Site and Sites Use.
1693 -- 1. Site must be an active site attached to party
1694 -- 2. Site USe must be Valid and Must be BILL_TO or SHIP_TO as required
1695 -- 3. p_site_use_type will be BILL_TO or SHIP_TO
1696 -- -----------------------------------------------------------------------------
1697 ---
1698 
1699   PROCEDURE Validate_Site_Site_Use (
1700         p_api_name                       IN  VARCHAR2,
1701         p_parameter_name                 IN  VARCHAR2,
1702         p_site_id                        IN  NUMBER,
1703         p_site_use_id                    IN  NUMBER,
1704         p_party_id                       IN  NUMBER,
1705         p_site_use_type                  IN  VARCHAR2,
1706         x_return_status                  OUT NOCOPY VARCHAR2
1707   );
1708 
1709 -- -----------------------------------------------------------------------------
1710 ---
1711 -- Validate_Bill_Ship_Site_Use
1712 -- 1. Site use must be an active site attached to party
1713 -- 2. Site USe must be Valid and Must be BILL_TO or SHIP_TO as required
1714 -- 3. p_site_use_type will be BILL_TO or SHIP_TO
1715 -- -----------------------------------------------------------------------------
1716 ---
1717  PROCEDURE Validate_Bill_Ship_Site_Use (
1718         p_api_name                       IN  VARCHAR2,
1719         p_parameter_name                 IN  VARCHAR2,
1720         p_site_use_id                    IN  NUMBER,
1721         p_party_id                       IN  NUMBER,
1722         p_site_use_type                  IN  VARCHAR2,
1723         x_site_id                        OUT  NOCOPY NUMBER,
1724         x_return_status                  OUT  NOCOPY VARCHAR2
1725   );
1726 
1727   -------------anmukher-------------08/04/03
1728   -- Added new procedure for CMRO-EAM project of 11.5.10
1729   -- Checks that the inventory org id is a valid inventory org
1730 -- -----------------------------------------------------------------------------
1731 -- Modification History
1732 -- Date     Name     Description
1733 -- -------- -------- -----------------------------------------------------------
1734 -- 06/07/05 smisra   Removed parameter p_maintenance_flag
1735 -- -----------------------------------------------------------------------------
1736   PROCEDURE Validate_Inventory_Org
1737   (
1738   	p_api_name			    IN  VARCHAR2,
1739   	p_parameter_name		IN  VARCHAR2,
1740   	p_inv_org_id			IN  NUMBER,
1741         x_inv_org_master_org_flag OUT NOCOPY VARCHAR2,
1742   	x_return_status			OUT NOCOPY VARCHAR2
1743   );
1744 
1745   ------------anmukher--------------08/04/03
1746   -- Added new procedure for CMRO-EAM project of 11.5.10
1747   -- Checks that the owning dept id is a valid department
1748   PROCEDURE Validate_Owning_Department
1749   (
1750   	p_api_name			    IN  VARCHAR2,
1751   	p_parameter_name		IN  VARCHAR2,
1752   	p_inv_org_id			IN  NUMBER,
1753   	p_owning_dept_id		IN  NUMBER,
1754   	p_maintenance_flag		IN  VARCHAR2,
1755   	x_return_status			OUT NOCOPY VARCHAR2
1756   );
1757 
1758  -- security
1759  -- Added new procedure to set the grants depending on the
1760  -- value of the agent security.
1761  -- C for Custom
1762  -- S for Standard
1763  -- N for None
1764  PROCEDURE Setup_SR_Agent_Security
1765  (
1766  	p_sr_agent_security IN VARCHAR2,
1767    	x_return_status     OUT NOCOPY VARCHAR2
1768  );
1769 
1770 -- Added new function if the responsibility has access to
1771 -- the passed SR type
1772 FUNCTION Validate_Incident_Access (
1773 	p_api_name	IN VARCHAR2,
1774 	p_resp_business_usage IN VARCHAR2,
1775 	p_incident_id	IN NUMBER)
1776 RETURN BOOLEAN;
1777 
1778 
1779 -- Introduced in 11.5.10
1780 -- Procedure to disallow SR Type change for the following cases:
1781 -- From EAM to Non Eam
1782 -- From Non Eam to EAM
1783 
1784 PROCEDURE VALIDATE_TYPE_CHANGE (
1785    p_old_eam_type_flag        IN          VARCHAR2,
1786    p_new_eam_type_flag        IN          VARCHAR2,
1787    x_return_status            OUT NOCOPY  VARCHAR2 );
1788 
1789 --- KP API Cleanup
1790 -- Procedure to be called when SR Type changes. If there are any open
1791 -- Tasks, add a WARNING message to the Message stack, but return back
1792 -- a success status. It is upto the calling program to pull of the
1793 -- error msg. from the stack to be displayed or processed as needed.
1794 
1795  PROCEDURE TASK_OWNER_CROSS_VAL (
1796    p_incident_id          IN   NUMBER,
1797    x_return_status        OUT  NOCOPY  VARCHAR2 );
1798 
1799 
1800 -- Procedure to be called when Incident Location Id changes. If
1801 -- Customer Product Id is passed , the incident Location Id should
1802 -- be the same as Install Base location.
1803 
1804  PROCEDURE CP_INCIDENT_SITE_CROSS_VAL(
1805         p_parameter_name                 IN  VARCHAR2,
1806         p_incident_location_id           IN   NUMBER,
1807         p_customer_product_id            IN   NUMBER,
1808         x_return_status                  OUT NOCOPY varchar2  );
1809 
1810 -- KP API Cleanup; added new proc
1811 -- Procedure to be called when install site Id or CP changes. If
1812 -- Customer Product Id is passed , the install site Id should
1813 -- be the same as Install Base location.
1814 
1815  PROCEDURE CP_INSTALL_SITE_CROSS_VAL (
1816         p_parameter_name                 IN  VARCHAR2,
1817         p_install_site_id           IN   NUMBER,
1818         p_customer_product_id            IN   NUMBER,
1819         x_return_status                       OUT NOCOPY varchar2  );
1820 
1821 -- New Procedure created
1822  PROCEDURE Resolution_Code_Cross_Val (
1823         p_parameter_name                 IN  VARCHAR2,
1824         p_resolution_code                IN  VARCHAR2,
1825         p_problem_code                   IN  VARCHAR2,
1826         p_incident_type_id               IN  NUMBER,
1827         p_category_id                    IN  NUMBER,
1828         p_inventory_item_id              IN  NUMBER,
1829 	p_inventory_org_id               IN  NUMBER,
1830         x_return_status                  OUT NOCOPY VARCHAR2  );
1831 
1832 
1833 -- Procedure to be called when SR Status changes. Check if the SR
1834 -- is changed to closed status. If yes then,
1835 -- If there are any open Tasks, with the  restrict_flag set to 'Y''
1836 -- raise error.
1837 
1838  PROCEDURE Task_Restrict_Close_Cross_Val(
1839    p_incident_id          IN   NUMBER,
1840    p_status_id            IN   NUMBER,
1841    x_return_status        OUT  NOCOPY  VARCHAR2 );
1842 
1843 
1844 -- Procedure to be called when contract, inv item, install site
1845 -- customer product or account changes.
1846 
1847  Procedure contracts_cross_val (
1848         p_parameter_name                 IN  VARCHAR2,
1849         p_contract_service_id            IN  NUMBER,
1850         p_busiproc_id                    IN  NUMBER,
1851         p_request_date                   IN  DATE,
1852 	    p_inventory_item_id		         IN  NUMBER,
1853 	    p_inv_org_id         		     IN  NUMBER,
1854 	    p_install_site_id		         IN  NUMBER,
1855 	    p_customer_product_id		     IN  NUMBER,
1856 	    p_account_id			         IN  NUMBER,
1857 	    p_customer_id			         IN  NUMBER,
1858 	    p_system_id                  IN   NUMBER,
1859         x_return_status                  OUT NOCOPY varchar2  )	;
1860 
1861 
1862 -- Procedure to be called when cp_component_id changes. Check if it has
1863 -- has a valid relation with the inv_component_id
1864 
1865  PROCEDURE Inv_Component_Cross_Val(
1866    p_parameter_name                 IN   VARCHAR2,
1867    p_inv_component_id               IN   NUMBER,
1868    p_cp_component_id                IN   NUMBER,
1869    x_return_status                  OUT  NOCOPY VARCHAR2 );
1870 
1871 
1872 -- Procedure to be called when cp_subcomponent_id changes. Check if it has
1873 -- has a valid relation with the inv_subcomponent_id
1874 
1875  PROCEDURE Inv_Subcomponent_Cross_Val(
1876    p_parameter_name                 IN  VARCHAR2,
1877    p_inv_subcomponent_id            IN  NUMBER,
1878    p_cp_subcomponent_id             IN  NUMBER,
1879    x_return_status                  OUT NOCOPY VARCHAR2 );
1880 
1881 -- Record Type for the out parameters of  SERVICEREQUEST_CROSS_VAL procedure.
1882 TYPE sr_cross_val_out_rec_type IS RECORD
1883 (
1884   inventory_item_id                   NUMBER,
1885   bill_to_site_use_id                 NUMBER,
1886   ship_to_site_use_id                 NUMBER,
1887   bill_to_site_id                     NUMBER,
1888   ship_to_site_id                     NUMBER,
1889   contract_id                         NUMBER,
1890   contract_number                     VARCHAR2(120),
1891   product_revision                    VARCHAR2(240),
1892   component_version                   VARCHAR2(3),
1893   subcomponent_version                VARCHAR2(3),
1894   contract_service_id_valid           VARCHAR2(1)
1895   );
1896 
1897 -- Procedure SR Cross val enforces all the data relationship between the SR attributes
1898 -- to be satisfied.
1899 -- This procedure invokes all the other cross validation procedures; this was introduced
1900 -- as part of the SR API Cleanup project for 11.5.10
1901 PROCEDURE SERVICEREQUEST_CROSS_VAL (
1902    p_new_sr_rec          IN   cs_servicerequest_pvt.service_request_rec_type,
1903    p_old_sr_rec          IN   cs_servicerequest_pvt.sr_oldvalues_rec_type,
1904    x_cross_val_out_rec   OUT  NOCOPY sr_cross_val_out_rec_type,
1905    x_return_status       OUT  NOCOPY VARCHAR2 );
1906 
1907 
1908 -- -----------------------------------------------------------------------------
1909 ---
1910 -- Prepare_Audit_Record
1911 -- Takes request_id as input and creates a audit_record type rec with the
1912 -- old and new values set to the vlaues in the DB for the given request_id.
1913 -- -----------------------------------------------------------------------------
1914 ---
1915  PROCEDURE Prepare_Audit_Record (
1916         p_api_version            IN  VARCHAR2,
1917         p_request_id             IN  NUMBER,
1918         x_return_status         OUT  NOCOPY VARCHAR2,
1919         x_msg_count             OUT  NOCOPY NUMBER,
1920         x_msg_data              OUT  NOCOPY VARCHAR2,
1921         x_audit_vals_rec        OUT  NOCOPY  CS_ServiceRequest_PVT.SR_AUDIT_REC_TYPE
1922   );
1923 -- --------------------------------------------------------------------------------
1924 -- This procedure validates internal descriptive flexfield
1925 -- --------------------------------------------------------------------------------
1926 PROCEDURE Validate_Desc_Flex
1927 ( p_api_name                    IN      VARCHAR2,
1928   p_application_short_name      IN      VARCHAR2,
1929   p_desc_flex_name              IN      VARCHAR2,
1930   p_desc_segment1               IN      VARCHAR2,
1931   p_desc_segment2               IN      VARCHAR2,
1932   p_desc_segment3               IN      VARCHAR2,
1933   p_desc_segment4               IN      VARCHAR2,
1934   p_desc_segment5               IN      VARCHAR2,
1935   p_desc_segment6               IN      VARCHAR2,
1936   p_desc_segment7               IN      VARCHAR2,
1937   p_desc_segment8               IN      VARCHAR2,
1938   p_desc_segment9               IN      VARCHAR2,
1939   p_desc_segment10              IN      VARCHAR2,
1940   p_desc_segment11              IN      VARCHAR2,
1941   p_desc_segment12              IN      VARCHAR2,
1942   p_desc_segment13              IN      VARCHAR2,
1943   p_desc_segment14              IN      VARCHAR2,
1944   p_desc_segment15              IN      VARCHAR2,
1945   p_desc_context                IN      VARCHAR2,
1946   p_resp_appl_id                IN      NUMBER          := NULL,
1947   p_resp_id                     IN      NUMBER          := NULL,
1948   p_return_status               OUT     NOCOPY VARCHAR2
1949 );
1950 -- --------------------------------------------------------------------------------
1951 -- This procedure validates component and subcomponent version.
1952 -- this could be use to validate product_revision too.
1953 -- --------------------------------------------------------------------------------
1954 PROCEDURE Validate_product_Version
1955 ( p_parameter_name       IN     VARCHAR2,
1956   p_instance_id          IN     NUMBER,
1957   p_inventory_org_id     IN     NUMBER,
1958   p_product_version      IN OUT NOCOPY VARCHAR2,
1959   x_return_status        OUT    NOCOPY VARCHAR2);
1960 
1961 /*
1962 Function Name:s get_unassigned_indicator
1963 Parameters   :
1964 IN           : p_incident_owner_id NUMBER
1965              : p_owner_group_id    NUMBER
1966 
1967 Description  : This function determines unassigned indicator value based on
1968                incident owner and group owner ids.
1969 Modification History
1970 Date     Name       Desc
1971 -------- ---------  --------------------------------------------------------
1972 03/25/05 smisra     Bug 4028675.
1973                     Created
1974 */
1975 FUNCTION get_unassigned_indicator
1976 ( p_incident_owner_id IN NUMBER
1977 , p_owner_group_id    IN NUMBER
1978 ) RETURN NUMBER;
1979 --
1980 PROCEDURE validate_party_role_code
1981 ( p_party_role_code IN         VARCHAR2
1982 , x_return_status   OUT NOCOPY VARCHAR2
1983 );
1984 PROCEDURE validate_org_id
1985 ( p_org_id NUMBER
1986 , x_return_status OUT NOCOPY VARCHAR2
1987 );
1988 PROCEDURE validate_maint_organization_id
1989 ( p_maint_organization_id IN         NUMBER
1990 , p_inventory_org_id      IN         NUMBER
1991 , p_inv_org_master_org_flag IN        VARCHAR2
1992 , x_return_status         OUT NOCOPY VARCHAR2
1993 );
1994 PROCEDURE validate_customer_product_id
1995 ( p_customer_product_id   IN         NUMBER
1996 , p_customer_id           IN         NUMBER
1997 , p_inventory_org_id      IN         NUMBER
1998 , p_maint_organization_id IN         NUMBER
1999 , p_inv_org_master_org_flag IN        VARCHAR2
2000 , p_inventory_item_id  IN OUT NOCOPY NUMBER
2001 , x_return_status         OUT NOCOPY VARCHAR2
2002 );
2003 PROCEDURE get_status_details
2004 ( p_status_id                  IN         NUMBER
2005 , x_close_flag                 OUT NOCOPY VARCHAR2
2006 , x_disallow_request_update    OUT NOCOPY VARCHAR2
2007 , x_disallow_agent_dispatch    OUT NOCOPY VARCHAR2
2008 , x_disallow_product_update    OUT NOCOPY VARCHAR2
2009 , x_pending_approval_flag      OUT NOCOPY VARCHAR2
2010 , x_intermediate_status_id     OUT NOCOPY VARCHAR2
2011 , x_approval_action_status_id  OUT NOCOPY VARCHAR2
2012 , x_rejection_action_status_id OUT NOCOPY VARCHAR2
2013 , x_return_status              OUT NOCOPY VARCHAR2
2014 );
2015 PROCEDURE get_reacted_resolved_dates
2016 ( p_incident_status_id         IN            NUMBER
2017 , p_old_incident_status_id     IN            NUMBER
2018 , p_old_inc_responded_by_date  IN            DATE
2019 , p_old_incident_resolved_date IN            DATE
2020 , x_inc_responded_by_date      IN OUT NOCOPY DATE
2021 , x_incident_resolved_date     IN OUT NOCOPY DATE
2022 , x_return_status                 OUT NOCOPY VARCHAR2
2023 );
2024 PROCEDURE get_party_details
2025 ( p_party_id      IN            NUMBER
2026 , x_party_type       OUT NOCOPY VARCHAR2
2027 , x_status           OUT NOCOPY VARCHAR2
2028 , x_return_status    OUT NOCOPY VARCHAR2
2029 );
2030 --
2031 PROCEDURE update_task_address
2032 ( p_incident_id   IN         NUMBER
2033 , p_location_type IN         VARCHAR2
2034 , p_location_id   IN         NUMBER
2035 , p_old_location_id   IN     NUMBER    -- Bug 8947959
2036 , x_return_status OUT NOCOPY VARCHAR2
2037 );
2038 
2039 -- Verify_LocationUpdate_For_FSTasks
2040 -- Following procedure validates if the update to the service request location is allowed.
2041 -- If there FS tasks associated with the SR and if the work on these FS tasks is in progress
2042 -- OR if the FS tasks are scheduled then the update to the SR location is not allowed.
2043 
2044 PROCEDURE Verify_LocUpdate_For_FSTasks
2045          (p_incident_id   IN NUMBER,
2046           x_return_status OUT NOCOPY VARCHAR2);
2047 
2048 --------------------------------------------------------------------------
2049 -- Procedure Validate_External_Desc_Flex
2050 -- Description:
2051 --   Validate External descriptive flexfield segment IDs and context.
2052 -- Notes:
2053 --   This procedure currently does not accept a concatenated string of
2054 --   segment IDs as input, since the descriptive flexfield API does not
2055 --   allow access to the segment column names in the same order that the
2056 --   segment IDs are returned. In other words, there is no way to breakup
2057 --   the concatenated segments into 15 attribute column values.
2058 --------------------------------------------------------------------------
2059 
2060 PROCEDURE Validate_External_Desc_Flex
2061 ( p_api_name                    IN      VARCHAR2,
2062   p_application_short_name      IN      VARCHAR2,
2063   p_ext_desc_flex_name          IN      VARCHAR2,
2064   p_ext_desc_segment1           IN      VARCHAR2,
2065   p_ext_desc_segment2           IN      VARCHAR2,
2066   p_ext_desc_segment3           IN      VARCHAR2,
2067   p_ext_desc_segment4           IN      VARCHAR2,
2068   p_ext_desc_segment5           IN      VARCHAR2,
2069   p_ext_desc_segment6           IN      VARCHAR2,
2070   p_ext_desc_segment7           IN      VARCHAR2,
2071   p_ext_desc_segment8           IN      VARCHAR2,
2072   p_ext_desc_segment9           IN      VARCHAR2,
2073   p_ext_desc_segment10          IN      VARCHAR2,
2074   p_ext_desc_segment11          IN      VARCHAR2,
2075   p_ext_desc_segment12          IN      VARCHAR2,
2076   p_ext_desc_segment13          IN      VARCHAR2,
2077   p_ext_desc_segment14          IN      VARCHAR2,
2078   p_ext_desc_segment15          IN      VARCHAR2,
2079   p_ext_desc_context            IN      VARCHAR2,
2080   p_resp_appl_id                IN      NUMBER          := NULL,
2081   p_resp_id                     IN      NUMBER          := NULL,
2082   p_return_status               OUT     NOCOPY VARCHAR2
2083 );
2084 
2085 -- Procedure to validate the platform version id
2086 -- Reinstated to resolve bug # 5350764
2087 
2088 PROCEDURE Validate_Platform_Version_Id
2089 ( p_api_name             IN   VARCHAR2,
2090   p_parameter_name       IN   VARCHAR2,
2091   p_platform_id          IN   NUMBER,
2092   p_organization_id      IN   NUMBER,
2093   p_platform_Version_id  IN   NUMBER,
2094   x_return_status        OUT  NOCOPY VARCHAR2) ;
2095 
2096 FUNCTION BOOLEAN_TO_NUMBER
2097 ( p_function_name       IN   VARCHAR2
2098 ) RETURN NUMBER;
2099 
2100 /* Credit Card 9358401 */
2101 
2102 PROCEDURE VALIDATE_CREDIT_CARD
2103              (p_api_name                   IN VARCHAR2,
2104               p_parameter_name             IN VARCHAR2,
2105               p_instrument_payment_use_id  IN NUMBER,
2106               p_bill_to_acct_id            IN NUMBER,
2107 		    p_called_from                IN VARCHAR2,
2108               x_return_status        OUT  NOCOPY VARCHAR2);
2109 
2110 --added by siahmed 12.2+ projects to integrate Oracle PRojects with SR.
2111 --if a project_id is passed it must be a valid project_id; if a task_id
2112 --is passed then a valid project id must exisit with it.
2113 PROCEDURE VALIDATE_PROJECT_INFO
2114       (p_api_name            IN  VARCHAR2,
2115        p_project_id          IN  NUMBER,
2116        p_project_task_id     IN  NUMBER,
2117        p_exp_org_id          IN  NUMBER,
2118        x_return_status       OUT NOCOPY VARCHAR2,
2119        x_error_msg           OUT NOCOPY VARCHAR2);
2120 
2121 --15995804. Validating price_list_header_id
2122 PROCEDURE VALIDATE_PRICE_LIST_HEADER
2123              (p_api_name                   IN VARCHAR2,
2124               p_parameter_name             IN VARCHAR2,
2125               p_price_list_header_id       IN NUMBER,
2126               p_org_id                     IN NUMBER,
2127               x_return_status        OUT  NOCOPY VARCHAR2);
2128 
2129 
2130 END CS_ServiceRequest_UTIL;
2131