1 PACKAGE AMS_DelivKitItem_PVT AUTHID CURRENT_USER AS
2 /* $Header: amsvdkis.pls 115.12 2002/11/14 00:21:34 musman ship $ */
3
4 TYPE deliv_kit_item_rec_type IS RECORD
5 (
6 deliverable_kit_item_id NUMBER,
7 last_update_date DATE,
8 last_updated_by NUMBER,
9 creation_date DATE,
10 created_by NUMBER,
11 last_update_login NUMBER,
12 object_version_number NUMBER,
13 deliverable_kit_id NUMBER,
14 deliverable_kit_part_id NUMBER,
15 kit_part_included_from_kit_id NUMBER,
16 quantity NUMBER,
17 attribute_category VARCHAR2(30),
18 attribute1 VARCHAR2(150),
19 attribute2 VARCHAR2(150),
20 attribute3 VARCHAR2(150),
21 attribute4 VARCHAR2(150),
22 attribute5 VARCHAR2(150),
23 attribute6 VARCHAR2(150),
24 attribute7 VARCHAR2(150),
25 attribute8 VARCHAR2(150),
26 attribute9 VARCHAR2(150),
27 attribute10 VARCHAR2(150),
28 attribute11 VARCHAR2(150),
29 attribute12 VARCHAR2(150),
30 attribute13 VARCHAR2(150),
31 attribute14 VARCHAR2(150),
32 attribute15 VARCHAR2(150)
33 );
34
35 ---------------------------------------------------------------------
36 -- PROCEDURE
37 -- create_deliv_kit_item
38 --
39 -- PURPOSE
40 -- Create a new deliverable kit item.
41 --
42 -- PARAMETERS
43 -- p_deliv_kit_item_rec: the new record to be inserted
44 -- x_deliv_kit_item_id: return the deliverable_id of the new campaign
45 --
46 -- NOTES
47 -- 1. object_version_number will be set to 1.
48 -- 2. If deliverable_kit_item_id is passed in, the uniqueness will be checked.
49 -- Raise exception in case of duplicates.
50 -- 3. If deliverable_kit_item_id is not passed in, generate a unique one from
51 -- the sequence.
52 -- 4. If a flag column is passed in, check if it is 'Y' or 'N'.
53 -- Raise exception for invalid flag.
54 -- 5. If a flag column is not passed in, default it to 'Y' or 'N'.
55 -- 6. Please don't pass in any FND_API.g_mess_char/num/date.
56 -- 7. Create a row in AMS_DELIV_KIT_ITEMS table and an attachmenmt will be inserted
57 -- to AMS_ACT_ATTACHMENTS table if AMS_DELIV_KIT_ITEMS.kit_part_included_from_kit_id
58 -- is not null (Open issue 10/12/99 khung)
59 ---------------------------------------------------------------------
60
61 PROCEDURE create_deliv_kit_item
62 (
63 p_api_version IN NUMBER,
64 p_init_msg_list IN VARCHAR2 := FND_API.g_false,
65 p_commit IN VARCHAR2 := FND_API.g_false,
66 p_validation_level IN NUMBER := FND_API.g_valid_level_full,
67
68 x_return_status OUT NOCOPY VARCHAR2,
69 x_msg_count OUT NOCOPY NUMBER,
70 x_msg_data OUT NOCOPY VARCHAR2,
71
72 p_deliv_kit_item_rec IN deliv_kit_item_rec_type,
73 x_deliv_kit_item_id OUT NOCOPY NUMBER
74 );
75
76
77 --------------------------------------------------------------------
78 -- PROCEDURE
79 -- delete_deliv_kit_item
80 --
81 -- PURPOSE
82 -- Delete a deliverable kit item.
83 --
84 -- PARAMETERS
85 -- p_deliv_kit_item_id: the deliverable_kit_item_id
86 -- p_object_version: the object_version_number
87 --
88 -- NOTES
89 -- 1. Raise exception if the object_version_number doesn't match.
90 -- 2. Delete a row in AMS_DELIV_KIT_ITEMS table and delete an attachmenmt to
91 -- AMS_ACT_ATTACHMENTS table if AMS_DELIV_KIT_ITEMS.kit_part_included_from_kit_id
92 -- is not null (Open issue 10/12/99 khung)
93 --------------------------------------------------------------------
94
95 PROCEDURE delete_deliv_kit_item
96 (
97 p_api_version IN NUMBER,
98 p_init_msg_list IN VARCHAR2 := FND_API.g_false,
99 p_commit IN VARCHAR2 := FND_API.g_false,
100
101 x_return_status OUT NOCOPY VARCHAR2,
102 x_msg_count OUT NOCOPY NUMBER,
103 x_msg_data OUT NOCOPY VARCHAR2,
104
105 p_deliv_kit_item_id IN NUMBER,
106 p_object_version IN NUMBER
107 );
108
109 ---------------------------------------------------------------------
110 -- PROCEDURE
111 -- update_deliv_kit_item
112 --
113 -- PURPOSE
114 -- Update a deliverable kit item.
115 --
116 -- PARAMETERS
117 -- p_deliv_kit_item_rec: the record with new items
118 --
119 -- NOTES
120 -- 1. Raise exception if the object_version_number doesn't match.
121 -- 2. If an attribute is passed in as FND_API.g_miss_char/num/date,
122 -- that column won't be updated.
123 ----------------------------------------------------------------------
124
125 PROCEDURE update_deliv_kit_item
126 (
127 p_api_version IN NUMBER,
128 p_init_msg_list IN VARCHAR2 := FND_API.g_false,
129 p_commit IN VARCHAR2 := FND_API.g_false,
130 p_validation_level IN NUMBER := FND_API.g_valid_level_full,
131
132 x_return_status OUT NOCOPY VARCHAR2,
133 x_msg_count OUT NOCOPY NUMBER,
134 x_msg_data OUT NOCOPY VARCHAR2,
135
136 p_deliv_kit_item_rec IN deliv_kit_item_rec_type
137 );
138
139 -------------------------------------------------------------------
140 -- PROCEDURE
141 -- lock_deliv_kit_item
142 --
143 -- PURPOSE
144 -- Lock a deliverable kit item.
145 --
146 -- PARAMETERS
147 -- p_deliverable_kit_item_id: the deliverable_kit_item_id
148 -- p_object_version: the object_version_number
149 --
150 -- NOTES
151 -- 1. Raise exception if the object_version_number doesn't match.
152 --------------------------------------------------------------------
153
154 PROCEDURE lock_deliv_kit_item
155 (
156 p_api_version IN NUMBER,
157 p_init_msg_list IN VARCHAR2 := FND_API.g_false,
158
159 x_return_status OUT NOCOPY VARCHAR2,
160 x_msg_count OUT NOCOPY NUMBER,
161 x_msg_data OUT NOCOPY VARCHAR2,
162
163 p_deliv_kit_item_id IN NUMBER,
164 p_object_version IN NUMBER
165 );
166
167
168
169 ---------------------------------------------------------------------
170 -- PROCEDURE
171 -- validate_deliv_kit_item
172 --
173 -- PURPOSE
174 -- Validate a deliverable kit item record.
175 --
176 -- PARAMETERS
177 -- p_deliv_kit_item_rec: the deliverable kit item record to be validated
178 --
179 -- NOTES
180 -- 1. p_deliv_kit_item_rec should be the complete deliverable kit item
181 -- record. There should not be any FND_API.g_miss_char/num/date in it.
182 ----------------------------------------------------------------------
183
184 PROCEDURE validate_deliv_kit_item
185 (
186 p_api_version IN NUMBER,
187 p_init_msg_list IN VARCHAR2 := FND_API.g_false,
188 p_validation_level IN NUMBER := FND_API.g_valid_level_full,
189
190 x_return_status OUT NOCOPY VARCHAR2,
191 x_msg_count OUT NOCOPY NUMBER,
192 x_msg_data OUT NOCOPY VARCHAR2,
193
194 p_deliv_kit_item_rec IN deliv_kit_item_rec_type
195 );
196
197 ---------------------------------------------------------------------
198 -- PROCEDURE
199 -- check_deliv_kit_item_items
200 --
201 -- PURPOSE
202 -- Perform the item level checking including unique keys, required columns,
203 -- foreign keys, domain constraints.
204 --
205 -- PARAMETERS
206 -- p_deliv_kit_item_rec: the record to be validated
207 -- p_validation_mode: JTF_PLSQL_API.g_create/g_update
208 ---------------------------------------------------------------------
209 PROCEDURE check_deliv_kit_item_items
210 (
211 p_deliv_kit_item_rec IN deliv_kit_item_rec_type,
212 p_validation_mode IN VARCHAR2 := JTF_PLSQL_API.g_create,
213 x_return_status OUT NOCOPY VARCHAR2
214 );
215
216
217 ---------------------------------------------------------------------
218 -- PROCEDURE
219 -- check_deliv_kit_item_record
220 --
221 -- PURPOSE
222 -- Check the record level business rules.
223 --
224 -- PARAMETERS
225 -- p_deliv_kit_item_rec: the record to be validated; may contain
226 -- attributes as FND_API.g_miss_char/num/date
227 -- p_complete_rec: the complete record after all "g_miss" items
228 -- have been replaced by current database values
229 ---------------------------------------------------------------------
230
231 PROCEDURE check_deliv_kit_item_record
232 (
233 p_deliv_kit_item_rec IN deliv_kit_item_rec_type,
234 p_complete_rec IN deliv_kit_item_rec_type := NULL,
235 x_return_status OUT NOCOPY VARCHAR2
236 );
237
238 ---------------------------------------------------------------------
239 -- PROCEDURE
240 -- init_deliv_kit_item_rec
241 --
242 -- PURPOSE
243 -- Initialize all attributes to be FND_API.g_miss_char/num/date.
244 ---------------------------------------------------------------------
245
246 PROCEDURE init_deliv_kit_ite_rec
247 (
248 x_deliv_kit_item_rec OUT NOCOPY deliv_kit_item_rec_type
249 );
250
251
252 ---------------------------------------------------------------------
253 -- PROCEDURE
254 -- complete_deliv_kit_item_rec
255 --
256 -- PURPOSE
257 -- For update_deliv_kit_items, some attributes may be passed in as
258 -- FND_API.g_miss_char/num/date if the user doesn't want to
259 -- update those attributes. This procedure will replace the
260 -- "g_miss" attributes with current database values.
261 --
262 -- PARAMETERS
263 -- p_deliv_kit_item_rec: the record which may contain attributes
264 -- as FND_API.g_miss_char/num/date
265 -- x_complete_rec: the complete record after all "g_miss" items
266 -- have been replaced by current database values
267 ---------------------------------------------------------------------
268 PROCEDURE complete_deliv_kit_item_rec
269 (
270 p_deliv_kit_item_rec IN deliv_kit_item_rec_type,
271 x_complete_rec OUT NOCOPY deliv_kit_item_rec_type
272 );
273
274 END AMS_DelivKitItem_PVT;