DBA Data[Home] [Help]

PACKAGE: APPS.AMS_DELIVERABLE_PVT

Source


1 PACKAGE AMS_Deliverable_PVT AS
2 /* $Header: amsvdels.pls 120.0 2005/05/31 14:11:58 appldev noship $ */
3 
4 TYPE deliv_rec_type IS RECORD
5 (
6   deliverable_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   language_code                 VARCHAR2(4),
14   version                       VARCHAR2(10),
15   application_id                NUMBER,
16   user_status_id                NUMBER,
17   status_code                   VARCHAR2(30),
18   status_date                   DATE,
19   active_flag                   VARCHAR2(1),
20   private_flag                  VARCHAR2(1),
21   owner_user_id                 NUMBER,
22   fund_source_id                NUMBER,
23   fund_source_type              VARCHAR2(30),
24   category_type_id              NUMBER,
25   category_sub_type_id          NUMBER,
26   kit_flag                      VARCHAR2(1),
27   inventory_flag                VARCHAR2(1),
28   inventory_item_id             NUMBER,
29   inventory_item_org_id         NUMBER,
30   pricelist_header_id           NUMBER,
31   pricelist_line_id             NUMBER,
32   actual_avail_from_date        DATE,
33   actual_avail_to_date          DATE,
34   forecasted_complete_date      DATE,
35   actual_complete_date          DATE,
36   transaction_currency_code     VARCHAR2(15),
37   functional_currency_code      VARCHAR2(15),
38   budget_amount_tc              NUMBER,
39   budget_amount_fc              NUMBER,
40   replaced_by_deliverable_id    NUMBER,
41   can_fulfill_electronic_flag   VARCHAR2(1),
42   can_fulfill_physical_flag     VARCHAR2(1),
43   jtf_amv_item_id               NUMBER,
44   non_inv_ctrl_code             VARCHAR2(30),
45   non_inv_quantity_on_hand      NUMBER,
46   non_inv_quantity_on_order     NUMBER,
47   non_inv_quantity_on_reserve   NUMBER,
48   chargeback_amount             NUMBER,
49   chargeback_uom                VARCHAR2(3),
50   chargeback_amount_curr_code   VARCHAR2(15),
51   deliverable_code              VARCHAR2(100),
52   deliverable_pick_flag         VARCHAR2(1),
53   currency_code                 VARCHAR2(15),
54   forecasted_cost               NUMBER,
55   actual_cost                   NUMBER,
56   forecasted_responses          NUMBER,
57   actual_responses              NUMBER,
58   country                       VARCHAR2(240),
59   default_approver_id           NUMBER,
60   attribute_category            VARCHAR2(30),
61   attribute1                    VARCHAR2(150),
62   attribute2                    VARCHAR2(150),
63   attribute3                    VARCHAR2(150),
64   attribute4                    VARCHAR2(150),
65   attribute5                    VARCHAR2(150),
66   attribute6                    VARCHAR2(150),
67   attribute7                    VARCHAR2(150),
68   attribute8                    VARCHAR2(150),
69   attribute9                    VARCHAR2(150),
70   attribute10                   VARCHAR2(150),
71   attribute11                   VARCHAR2(150),
72   attribute12                   VARCHAR2(150),
73   attribute13                   VARCHAR2(150),
74   attribute14                   VARCHAR2(150),
75   attribute15                   VARCHAR2(150),
76   deliverable_name              VARCHAR2(240),
77   description                   VARCHAR2(4000),
78   start_period_name             VARCHAR2(15),
79   end_period_name               VARCHAR2(15),
80   deliverable_calendar          VARCHAR2(15),
81   country_id                    NUMBER,
82   setup_id                      NUMBER,
83 
84 
85 
86 
87   item_Number                   VARCHAR2(2000),
88   associate_flag                VARCHAR2(1),
89   master_object_id              NUMBER,
90   master_object_type            VARCHAR2(150),
91   email_content_type            VARCHAR2(30)
92   );
93 
94 ---------------------------------------------------------------------
95 -- PROCEDURE
96 --    create_deliverable
97 --
98 -- PURPOSE
99 --    Create a new deliverable (creative).
100 --
101 -- PARAMETERS
102 --    p_deliv_rec: the new record to be inserted
103 --    x_deliv_id: return the deliverable_id of the new deliverable
104 --
105 -- NOTES
106 --    1. object_version_number will be set to 1.
107 --    2. If deliverable_id is passed in, the uniqueness will be checked.
108 --       Raise exception in case of duplicates.
109 --    3. If deliverable_id is not passed in, generate a unique one from
110 --       the sequence.
111 --    4. If a flag column is passed in, check if it is 'Y' or 'N'.
112 --       Raise exception for invalid flag.
113 --    5. If a flag column is not passed in, default it to 'Y' or 'N'.
114 --    6. Please don't pass in any FND_API.g_mess_char/num/date.
115 ---------------------------------------------------------------------
116 
117 PROCEDURE create_deliverable
118 (
119   p_api_version         IN  NUMBER,
120   p_init_msg_list       IN  VARCHAR2 := FND_API.g_false,
121   p_commit              IN  VARCHAR2 := FND_API.g_false,
122   p_validation_level    IN  NUMBER   := FND_API.g_valid_level_full,
123 
124   x_return_status       OUT NOCOPY VARCHAR2,
125   x_msg_count           OUT NOCOPY NUMBER,
126   x_msg_data            OUT NOCOPY VARCHAR2,
127 
128   p_deliv_rec           IN  deliv_rec_type,
129   x_deliv_id            OUT NOCOPY NUMBER
130 );
131 
132 
133 --------------------------------------------------------------------
134 -- PROCEDURE
135 --    delete_deliverable (creative)
136 --
137 -- PURPOSE
138 --    Delete a deliverable.
139 --
140 -- PARAMETERS
141 --    p_deliv_id: the deliverable_id
142 --    p_object_version: the object_version_number
143 --
144 -- NOTES
145 --    1. Raise exception if the object_version_number doesn't match.
146 --------------------------------------------------------------------
147 
148 PROCEDURE delete_deliverable
149 (
150   p_api_version     IN  NUMBER,
151   p_init_msg_list   IN  VARCHAR2 := FND_API.g_false,
152   p_commit          IN  VARCHAR2 := FND_API.g_false,
153 
154   x_return_status   OUT NOCOPY VARCHAR2,
155   x_msg_count       OUT NOCOPY NUMBER,
156   x_msg_data        OUT NOCOPY VARCHAR2,
157 
158   p_deliv_id        IN  NUMBER,
159   p_object_version  IN  NUMBER
160 );
161 
162 -------------------------------------------------------------------
163 -- PROCEDURE
164 --    lock_deliverable
165 --
166 -- PURPOSE
167 --    Lock a deliverable (creative).
168 --
169 -- PARAMETERS
170 --    p_deliverable_id: the deliverable_id
171 --    p_object_version: the object_version_number
172 --
173 -- NOTES
174 --    1. Raise exception if the object_version_number doesn't match.
175 --------------------------------------------------------------------
176 
177 PROCEDURE lock_deliverable
178 (
179    p_api_version    IN  NUMBER,
180    p_init_msg_list  IN  VARCHAR2 := FND_API.g_false,
181 
182    x_return_status  OUT NOCOPY VARCHAR2,
183    x_msg_count      OUT NOCOPY NUMBER,
184    x_msg_data       OUT NOCOPY VARCHAR2,
185 
186    p_deliv_id       IN  NUMBER,
187    p_object_version IN  NUMBER
188 );
189 
190 
191 ---------------------------------------------------------------------
192 -- PROCEDURE
193 --    update_deliverable (creative)
194 --
195 -- PURPOSE
196 --    Update a deliverable.
197 --
198 -- PARAMETERS
199 --    p_deliv_rec: the record with new items
200 --
201 -- NOTES
202 --    1. Raise exception if the object_version_number doesn't match.
203 --    2. If an attribute is passed in as FND_API.g_miss_char/num/date,
204 --       that column won't be updated.
205 ----------------------------------------------------------------------
206 
207 PROCEDURE update_deliverable
208 (
209   p_api_version         IN  NUMBER,
210   p_init_msg_list       IN  VARCHAR2 := FND_API.g_false,
211   p_commit              IN  VARCHAR2 := FND_API.g_false,
212   p_validation_level    IN  NUMBER   := FND_API.g_valid_level_full,
213 
214   x_return_status       OUT NOCOPY VARCHAR2,
215   x_msg_count           OUT NOCOPY NUMBER,
216   x_msg_data            OUT NOCOPY VARCHAR2,
217 
218   p_deliv_rec           IN  deliv_rec_type
219 );
220 
221 ---------------------------------------------------------------------
222 -- PROCEDURE
223 --    validate_deliverable
224 --
225 -- PURPOSE
226 --    Validate a deliverable record.
227 --
228 -- PARAMETERS
229 --    p_deliv_rec: the deliverable record to be validated
230 --
231 -- NOTES
232 --    1. p_deliv_rec should be the complete deliverable record. There
233 --       should not be any FND_API.g_miss_char/num/date in it.
234 ----------------------------------------------------------------------
235 
236 PROCEDURE validate_deliverable
237 (
238    p_api_version	IN  NUMBER,
239    p_init_msg_list	IN  VARCHAR2  := FND_API.g_false,
240    p_validation_level	IN  NUMBER    := FND_API.g_valid_level_full,
241    p_validation_mode    IN  VARCHAR2 ,
242    x_return_status OUT NOCOPY VARCHAR2,
243    x_msg_count	 OUT NOCOPY NUMBER,
244    x_msg_data	 OUT NOCOPY VARCHAR2,
245 
246    p_deliv_rec          IN  deliv_rec_type
247 );
248 
249 ---------------------------------------------------------------------
250 -- PROCEDURE
251 --    check_deliv_items
252 --
253 -- PURPOSE
254 --    Perform the item level checking including unique keys,
255 --    required columns, foreign keys, domain constraints.
256 --
257 -- PARAMETERS
258 --    p_deliv_rec: the record to be validated
259 --    p_validation_mode: JTF_PLSQL_API.g_create/g_update
260 ---------------------------------------------------------------------
261 PROCEDURE check_deliv_items
262 (
263    p_deliv_rec          IN  deliv_rec_type,
264    p_validation_mode    IN  VARCHAR2 := JTF_PLSQL_API.g_create,
265    x_return_status      OUT NOCOPY VARCHAR2
266 );
267 
268 
269 ---------------------------------------------------------------------
270 -- PROCEDURE
271 --    check_deliv_record
272 --
273 -- PURPOSE
274 --    Check the record level business rules.
275 --
276 -- PARAMETERS
277 --    p_deliv_rec: the record to be validated; may contain attributes
278 --       as FND_API.g_miss_char/num/date
279 --    p_complete_rec: the complete record after all "g_miss" items
280 --       have been replaced by current database values
281 ---------------------------------------------------------------------
282 
283 PROCEDURE check_deliv_record
284 (
285    p_deliv_rec      IN  deliv_rec_type,
286    p_complete_rec   IN  deliv_rec_type := NULL,
287    x_return_status  OUT NOCOPY VARCHAR2
288 );
289 
290 ---------------------------------------------------------------------
291 -- PROCEDURE
292 --    init_deliv_rec
293 --
294 -- PURPOSE
295 --    Initialize all attributes to be FND_API.g_miss_char/num/date.
296 ---------------------------------------------------------------------
297 
298 PROCEDURE init_deliv_rec
299 (
300    x_deliv_rec      OUT NOCOPY deliv_rec_type
301 );
302 
303 
304 ---------------------------------------------------------------------
305 -- PROCEDURE
306 --    complete_deliv_rec
307 --
308 -- PURPOSE
309 --    For update_deliverable, some attributes may be passed in as
310 --    FND_API.g_miss_char/num/date if the user doesn't want to
311 --    update those attributes. This procedure will replace the
312 --    "g_miss" attributes with current database values.
313 --
314 -- PARAMETERS
315 --    p_deliv_rec: the record which may contain attributes as
316 --       FND_API.g_miss_char/num/date
317 --    x_complete_rec: the complete record after all "g_miss" items
318 --       have been replaced by current database values
319 ---------------------------------------------------------------------
320 PROCEDURE complete_deliv_rec
321 (
322    p_deliv_rec      IN  deliv_rec_type,
323    x_complete_rec   OUT NOCOPY deliv_rec_type
324 );
325 
326 END AMS_Deliverable_PVT;