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