1 PACKAGE AHL_PRD_NONROUTINE_PVT AUTHID CURRENT_USER AS
2 /* $Header: AHLVPNRS.pls 120.8.12020000.2 2012/12/07 08:00:59 sareepar ship $ */
3 -----------------------------------------------------------
4 -- Record Types for record structures needed by the APIs --
5 -----------------------------------------------------------
6 -- Record for service record and vwp task
7
8 TYPE sr_task_rec_type IS RECORD (
9 Request_date DATE ,
10 Type_id NUMBER ,
11 Type_name VARCHAR2(30) ,
12 Status_id NUMBER ,
13 Status_name VARCHAR2(30) ,
14 Severity_id NUMBER ,
15 Severity_name VARCHAR2(30) ,
16 Urgency_id NUMBER ,
17 Urgency_name VARCHAR2(30) ,
18 Summary VARCHAR2(240) ,
19 Customer_type VARCHAR2(30) ,
20 Customer_id NUMBER ,
21 Customer_number VARCHAR2(30) ,
22 Customer_name VARCHAR2(360) ,
23 Contact_type VARCHAR2(30) ,
24 Contact_id NUMBER ,
25 Contact_number VARCHAR2(30) ,
26 Contact_name VARCHAR2(360) ,
27 Instance_id NUMBER ,
28 Instance_number VARCHAR2(30) ,
29 Problem_code VARCHAR2(50) ,
30 Problem_meaning VARCHAR2(80) ,
31 Resolution_code VARCHAR2(50) ,
32 Resolution_meaning VARCHAR2(240) ,
33 Incident_id NUMBER ,
34 Incident_number VARCHAR2(30) ,
35 Incident_object_version_number NUMBER ,
36 Visit_id NUMBER ,
37 Visit_number NUMBER ,
38 Duration NUMBER ,
39 Task_type_code VARCHAR2(30) ,
40 Visit_task_id NUMBER ,
41 Visit_task_number NUMBER ,
42 Visit_task_name VARCHAR2(80) ,
43 Operation_type VARCHAR2(15) ,
44 Workflow_process_id NUMBER ,
45 Interaction_id NUMBER ,
46 Originating_wo_id NUMBER ,
47 Nonroutine_wo_id NUMBER ,
48 source_program_code VARCHAR2(30) ,
49 --Modified by VSUNDARA For TRANSIT CHECK ENHANCEMENT
50 Object_id NUMBER ,
51 Object_type VARCHAR2(80) ,
52 link_id NUMBER ,
53 -- Modified for bug# 5261150 in R12.
54 -- FP for ER 5716489 -- start
55 WO_Create_flag VARCHAR2(1),
56 WO_Release_flag VARCHAR2(1),
57 -- FP for ER 5716489 -- end
58 instance_quantity NUMBER, --amsriniv . ER 6014567
59 move_qty_to_nr_workorder VARCHAR2(1), --amsriniv . ER 6014567
60 -- FP Bug # 7720088 (Mexicana Bug # 7697685) -- start
61 workorder_start_time DATE,
62 -- FP Bug # 7720088 (Mexicana Bug # 7697685) -- end
63 --apattark start for ER 9368251
64 firmWo_flag VARCHAR2(5),
65 --apattark end for ER 9368251
66
67 -- STHILAK : PIE Integration - begin
68 Service_Type VARCHAR2(80),
69 Service_Type_Code VARCHAR2(30),
70 -- STHILAK : PIE Integration - end
71
72 -- MANESING::Supplier Warranty, 04-Oct-2010, added warranty contract to record type
73 Warranty_contract_id NUMBER,
74 Warranty_contract_number NUMBER,
75
76 -- VLAKKU : Bug# 13787940 Start
77 Quality_inspection_type_code VARCHAR2(50),
78 Quality_inspection_type VARCHAR2(80),
79 -- VLAKKU : Bug# 13787940 End
80
81 -- MANESING::DFF Project, 16-Feb-2010, added attributes to record type
82 Attribute_Category VARCHAR2(30),
83 Attribute1 VARCHAR2(150),
84 Attribute2 VARCHAR2(150),
85 Attribute3 VARCHAR2(150),
86 Attribute4 VARCHAR2(150),
87 Attribute5 VARCHAR2(150),
88 Attribute6 VARCHAR2(150),
89 Attribute7 VARCHAR2(150),
90 Attribute8 VARCHAR2(150),
91 Attribute9 VARCHAR2(150),
92 Attribute10 VARCHAR2(150),
93 Attribute11 VARCHAR2(150),
94 Attribute12 VARCHAR2(150),
95 Attribute13 VARCHAR2(150),
96 Attribute14 VARCHAR2(150),
97 Attribute15 VARCHAR2(150)
98 );
99
100 G_MISS_Sr_Task_Rec Sr_task_rec_type;
101 ----------------------------------------------
102 -- Define Table Type for Records Structures --
103 ----------------------------------------------
104 --Declare Sr_Task table type for Sr_task_rec record
105
106 TYPE Sr_task_tbl_type IS TABLE OF Sr_task_rec_type INDEX BY BINARY_INTEGER;
107
108 -- MR NR ER -- Start
109 ---------------------------------------------------------------------
110 -- MR details rec. Used to capture detail of MRs added to a SR
111 ---------------------------------------------------------------------
112 TYPE MR_Association_Rec_Type IS RECORD (
113 MR_HEADER_ID NUMBER,
114 MR_TITLE VARCHAR2(80),
115 MR_VERSION NUMBER,
116 UE_RELATIONSHIP_ID NUMBER, -- OUT parameter for Create Operation
117 UNIT_EFFECTIVITY_ID NUMBER, -- OUT parameter for Create Operation
118 OBJECT_VERSION_NUMBER NUMBER, -- OVN of Unit Effectivity, Mandatory for Delete
119 RELATIONSHIP_CODE VARCHAR2(30), -- Always 'PARENT' or null
120 CSI_INSTANCE_ID NUMBER, -- Instance to which the MR is associated
121 CSI_INSTANCE_NUMBER VARCHAR2(30),
122 SR_TBL_INDEX NUMBER -- unique identifier linking MR to corresponding SR.
123 );
124
125 TYPE MR_Association_tbl_type IS TABLE OF MR_Association_Rec_Type INDEX BY BINARY_INTEGER;
126 -- MR NR ER -- End
127 -- MR NR ER -- Start
128 -------------------------------------------------------------------
129 -- Declare Procedures --
130 -------------------------------------------------------------------
131 -- Procedure name : Process_nonroutine_job
132 -- Type : Private
133 -- Function : To Create or Update Service request based on
134 -- operation_type and to create vwp task for
135 -- a nonroutine job.
136 -- Parameters :
137 --
138 -- Standard IN Parameters :
139 -- p_api_version IN NUMBER Required
140 -- p_init_msg_list IN VARCHAR2 Default FND_API.G_FALSE
141 -- p_commit IN VARCHAR2 Default FND_API.G_FALSE
142 -- p_validation_level IN NUMBER Default FND_API.G_VALID_LEVEL_FULL
143 -- p_default IN VARCHAR2 Default FND_API.G_TRUE
144 -- p_module_type IN VARCHAR2 Default NULL.
145 --
146 -- Standard OUT Parameters :
147 -- x_return_status OUT VARCHAR2 Required
148 -- x_msg_count OUT NUMBER Required
149 -- x_msg_data OUT VARCHAR2 Required
150 --
151 -- Process_nonroutine_job Parameters:
152 -- p_x_sr_task_tbl IN OUT Sr_task_tbl Required
153 -- The table of records for creation / updation of Service
154 -- request and creation of vwp task.
155 -- p_x_mr_asso_tbl IN OUT MR_Association_tbl_type Required
156 -- The table of records containing MRs to be associated to the SR.
157 --
158 -- Version :
159 -- Initial Version 1.0
160 -------------------------------------------------------------------
161 PROCEDURE process_nonroutine_job (
162 p_api_version IN NUMBER,
163 p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
164 p_commit IN VARCHAR2 := Fnd_Api.g_false,
165 p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
166 p_module_type IN VARCHAR2 := 'JSP',
167 x_return_status OUT NOCOPY VARCHAR2,
168 x_msg_count OUT NOCOPY NUMBER,
169 x_msg_data OUT NOCOPY VARCHAR2,
170 p_x_sr_task_tbl IN OUT NOCOPY ahl_prd_nonroutine_pvt.sr_task_tbl_type,
171 p_x_mr_asso_tbl IN OUT NOCOPY AHL_PRD_NONROUTINE_PVT.MR_Association_tbl_type
172 );
173 -- MR NR ER -- End
174 END;