DBA Data[Home] [Help]

PACKAGE: APPS.AMS_EVHRULES_PVT

Source


1 PACKAGE AMS_EvhRules_PVT AUTHID CURRENT_USER AS
2 /* $Header: amsvebrs.pls 115.34 2002/12/18 18:46:48 soagrawa ship $ */
3 
4 
5 -----------------------------------------------------------------------
6 -- PROCEDURE
7 --    handle_evh_status
8 --
9 -- PURPOSE
10 --    Validate the event header status.
11 --
12 -- NOTES
13 --    1. If the user status is not specified, default it;
14 --       otherwise validate it.
15 --    2. The system status code will be determined by the user status.
16 -----------------------------------------------------------------------
17 PROCEDURE handle_evh_status(
18    p_user_status_id  IN  NUMBER,
19    x_status_code     OUT NOCOPY VARCHAR2,
20    x_return_status   OUT NOCOPY VARCHAR2
21 );
22 
23 PROCEDURE Update_Event_Schedule_Status (
24 	p_event_offer_id             IN NUMBER,
25    p_new_status_id           IN NUMBER,
26    p_new_status_code         IN VARCHAR2
27  ) ;
28 
29 PROCEDURE Update_Event_Header_Status (
30 	p_event_header_id             IN NUMBER,
31    p_new_status_id           IN NUMBER,
32    p_new_status_code         IN VARCHAR2
33  ) ;
34 
35 PROCEDURE Update_Owner(
36    p_api_version       IN  NUMBER,
37    p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
38    p_commit            IN  VARCHAR2  := FND_API.g_false,
39    p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,
40    x_return_status     OUT NOCOPY VARCHAR2,
41    x_msg_count         OUT NOCOPY NUMBER,
42    x_msg_data          OUT NOCOPY VARCHAR2,
43    p_object_type       IN  VARCHAR2 := NULL ,
44    p_event_id          IN  NUMBER,
45    p_owner_id      IN  NUMBER   );
46 
47 -----------------------------------------------------------------------
48 -- PROCEDURE
49 --    Send_Out_Information
50 --
51 -- PURPOSE
52 --    Send Information to registrants if Venue/Date are changed or event
53 --    is cancelled.
54 --
55 -- NOTES
56 
57 -----------------------------------------------------------------------
58 
59 PROCEDURE Send_Out_Information(
60    p_object_type       IN  VARCHAR2,
61    p_object_id         IN  NUMBER ,
62    p_trigger_type      IN  VARCHAR2 ,
63 --   p_bind_values       IN  AMF_REQUEST.string_tbl_type ,  -- Modified by ptendulk on 13-Dec-2002 for 1:1
64    p_bind_values       IN  JTF_FM_REQUEST_GRP.G_VARCHAR_TBL_TYPE,
65    p_bind_names        IN  JTF_FM_REQUEST_GRP.G_VARCHAR_TBL_TYPE,
66    x_return_status     OUT NOCOPY VARCHAR2
67 );
68 
69 
70 
71 
72 -----------------------------------------------------------------------
73 -- PROCEDURE
74 --    check_evh_update
75 --
76 -- PURPOSE
77 --    Check if Event HEader record can be updated.
78 --
79 -- NOTES
80 
81 -----------------------------------------------------------------------
82 PROCEDURE check_evh_update(
83    p_evh_rec       IN  AMS_EventHeader_PVT.evh_rec_type,
84    x_return_status  OUT NOCOPY VARCHAR2
85 );
86 
87 
88 
89 -----------------------------------------------------------------------
90 -- PROCEDURE
91 --    check_evh_fund_source
92 --
93 -- PURPOSE
94 --    Check Event Header fund_source_type and fund_source_id.
95 --
96 -- NOTES
97 --    1. fund_source_type could be 'FUND', 'CAMPAIGN', 'MASTER_EVENT', 'EVENT_OFFER'.
98 --    2. fund_source_type can't be null if fund_source_id is provided.
99 -----------------------------------------------------------------------
100 PROCEDURE check_Evh_fund_source(
101    p_fund_source_type  IN  VARCHAR2,
102    p_fund_source_id    IN  NUMBER,
103    x_return_status     OUT NOCOPY VARCHAR2
104 );
105 
106 
107 ---------------------------------------------------------------------
108 -- PROCEDURE
109 --    check_evh_calendar
110 --
111 -- HISTORY
112 --    10/01/2000  sugupta  Created.
113 ---------------------------------------------------------------------
114 PROCEDURE check_evh_calendar(
115    p_evh_calendar   IN  VARCHAR2,
116    p_start_period_name   IN  VARCHAR2,
117    p_end_period_name     IN  VARCHAR2,
118    p_start_date          IN  DATE,
119    p_end_date            IN  DATE,
120    x_return_status       OUT NOCOPY VARCHAR2
121 );
122 
123 
124 ---------------------------------------------------------------------
125 -- PROCEDURE
126 --    push_source_code
127 --
128 -- PURPOSE
129 --    After creating event headers or event offers, push the source code
130 --    into ams_source_codes table.
131 ---------------------------------------------------------------------
132 /*
133 PROCEDURE push_source_code(
134    p_source_code    IN  VARCHAR2,
135    p_arc_object     IN  VARCHAR2,
136    p_object_id      IN  NUMBER
137 );
138 */
139 -----------------------------------------------------------------------
140 -- PROCEDURE
141 --    udpate_evh_source_code
142 --
143 -- HISTORY
144 --    09/31/00  sugupta  Created.
145 -----------------------------------------------------------------------
146 PROCEDURE update_evh_source_code(
147    p_evh_id      IN  NUMBER,
148    p_source_code      IN  VARCHAR2,
149    p_global_flag      IN  VARCHAR2,
150    x_source_code      OUT NOCOPY VARCHAR2,
151    x_return_status    OUT NOCOPY VARCHAR2
152 );
153 -----------------------------------------------------------------------
154 -- PROCEDURE
155 --    udpate_evo_source_code
156 --
157 -- HISTORY
158 --    09/31/00  sugupta  Created.
159 -----------------------------------------------------------------------
160 PROCEDURE update_evo_source_code(
161    p_evo_id      IN  NUMBER,
162    p_source_code      IN  VARCHAR2,
163    p_global_flag      IN  VARCHAR2,
164    x_source_code      OUT NOCOPY VARCHAR2,
165    x_return_status    OUT NOCOPY VARCHAR2
166 );
167 
168 -----------------------------------------------------------------------
169 -- PROCEDURE
170 --    udpate_eone_source_code
171 --
172 -- HISTORY
173 --    04/19/01  mukumar Created.
174 -----------------------------------------------------------------------
175 PROCEDURE update_eone_source_code(
176    p_evo_id      IN  NUMBER,
177    p_source_code      IN  VARCHAR2,
178    p_global_flag      IN  VARCHAR2,
179    x_source_code      OUT NOCOPY VARCHAR2,
180    x_return_status    OUT NOCOPY VARCHAR2
181 );
182 
183 
184 -----------------------------------------------------------------------
185 -- PROCEDURE
186 --    udpate_event_status
187 --
188 -- HISTORY
189 --    09/25/00  mukumar  Created.
190 --	  10/05/00  gdeodhar Added two more parameters.
191 -----------------------------------------------------------------------
192 PROCEDURE update_event_status(
193    p_event_id			  IN  NUMBER,
194    p_event_activity_type  IN  VARCHAR2,
195    p_user_status_id       IN  NUMBER,
196    p_fund_amount_tc		  IN  NUMBER,
197    p_currency_code_tc	  IN  VARCHAR2
198 );
199 
200 --=======================================================================
201 -- PROCEDURE
202 --    process_leads
203 --
204 -- NOTES
205 --    This procedure is created to create leads in OTS based on the event
206 --    registrations and attendance.
207 --    When the status of the event schedule is changed to CLOSED, this
208 --    procedure will be called.
209 --    This method should be pulled out from here and be created as a concurrent
210 --    program as this operation is more suited for batch operations.
211 --
212 -- HISTORY
213 --    08/02/2001    gdeodhar   Created.
214 --    22-oct-2002   soagrawa   Modified API signature to take obj type and obj srccd
215 --                             to be able to generate leads against non-event src cd.
216 --=======================================================================
217 
218 PROCEDURE process_leads(
219    p_event_id             IN  NUMBER
220  , p_obj_type             IN  VARCHAR2 := NULL
221  , p_obj_srccd            IN  VARCHAR2 := NULL
222 );
223 
224  --=======================================================================
225 -- PROCEDURE
226 --    insert_lead_rec
227 --
228 -- NOTES
229 --    This procedure actually inserts a record in the lead import interface
230 --    table.
231 --
232 -- HISTORY
233 --    08/13/2001    gdeodhar   Created.
234 --=======================================================================
235 
236 PROCEDURE insert_lead_rec(
237    p_party_id             IN  NUMBER
238    ,p_lit_batch_id        IN  NUMBER
239    ,p_event_id            IN  NUMBER
240    ,p_source_code         IN  VARCHAR2
241    ,p_contact_party_id    IN NUMBER := NULL
242 );
243 
244 
245 --=======================================================================
246 -- PROCEDURE
247 --    Convert_Evnt_Currency
248 -- NOTES
249 --    This procedure is created to convert the transaction currency into
250 --    functional currency.
251 -- HISTORY
252 --    10/30/2000    mukumar   Created.
253 --=======================================================================
254 PROCEDURE Convert_Evnt_Currency(
255    p_tc_curr     IN    VARCHAR2,
256    p_tc_amt      IN    NUMBER,
257    x_fc_curr     OUT NOCOPY   VARCHAR2,
258    x_fc_amt      OUT NOCOPY   NUMBER
259    );
260 
261 --=======================================================================
262 -- PROCEDURE
263 --    Add_Update_Access_record
264 -- NOTES
265 --    This procedure is to create or update Acess_record(owner record)
266 -- HISTORY
267 --    10/30/2000    mukumar   Created.
268 --=======================================================================
269 PROCEDURE Add_Update_Access_record(
270    p_object_type     IN    VARCHAR2,
271    p_object_id      IN    NUMBER,
272    p_Owner_user_id  IN    NUMBER,
273    x_return_status    OUT NOCOPY VARCHAR2,
274    x_msg_count        OUT NOCOPY VARCHAR2,
275    x_msg_data         OUT NOCOPY VARCHAR2
276    );
277 
278 ---------------------------------------------------------------------
279 -- PROCEDURE
280 --    push_source_code
281 --
282 -- PURPOSE
283 --    After creating campaigns or schedules, push the source code
284 --    into ams_source_codes table.
285 ---------------------------------------------------------------------
286 PROCEDURE push_source_code(
287    p_source_code    IN  VARCHAR2,
288    p_arc_object     IN  VARCHAR2,
289    p_object_id      IN  NUMBER,
290    p_related_source_code    IN    VARCHAR2 := NULL,
291    p_related_source_object  IN    VARCHAR2 := NULL,
292    p_related_source_id      IN    NUMBER   := NULL
293 );
294 --========================================================================
295 -- PROCEDURE
296 --    Create_list
297 --
298 -- PURPOSE
299 --
300 --
301 -- NOTE
302 --    The list of Type <> is created in list header and the association is
303 --    created in the ams_act_lists table.
304 --
305 -- HISTORY
306 --  06/01/01   mukumar    created
307 --
308 --========================================================================
309 PROCEDURE Create_list
310                (p_evo_id     IN     NUMBER,
311                 p_evo_name   IN     VARCHAR2,
312 				p_obj_type   In     VARCHAR2,
313                 p_owner_id        IN     NUMBER);
314 
315 --==========================================================================
316 -- PROCEDURE
317 --    Cancel_RollupEvent
318 --
319 -- PURPOSE
320 --    Cancels the Rolup event and their associated event schedules. If the status
321 --    order rules does not permit it, it will error out.
322 --
323 -- NOTES
324 -- HISTORY
325 --    17-Jul-2001  mukumar    Created.
326 --==========================================================================
327 
328 PROCEDURE Cancel_RollupEvent(p_evh_id   IN  NUMBER);
329 
330 --==========================================================================
331 -- PROCEDURE
332 --    Cancel_Exec_Event
333 --
334 -- PURPOSE
335 --    Cancels the Rolup event and their associated event schedules. If the status
336 --    order rules does not permit it, it will error out.
337 --
338 -- NOTES
339 -- HISTORY
340 --    17-Jul-2001  mukumar    Created.
341 --==========================================================================
342 
343 PROCEDURE Cancel_Exec_Event(p_evh_id   IN  NUMBER);
344 
345 --==========================================================================
346 -- PROCEDURE
347 --    Cancel_oneoff_Event
348 --
349 -- PURPOSE
350 --    Cancels the Rolup event and their associated event schedules. If the status
351 --    order rules does not permit it, it will error out.
352 --
353 -- NOTES
354 -- HISTORY
355 --    17-Jul-2001  mukumar    Created.
356 --==========================================================================
357 
358 PROCEDURE Cancel_oneoff_event(p_offer_id   IN  NUMBER);
359 
360 --==========================================================================
361 -- FUNCTION
362 --    Cancel_all_Event
363 --
364 -- PURPOSE
365 --    Cancels all Rolup event and their associated event schedules. If the status
366 --    order rules does not permit it, it will error out.
367 --
368 -- NOTES
369 -- HISTORY
370 --    17-Jul-2001  mukumar    Created.
371 --    15-Feb_2002  gmadana    Mofified.
372 --                 Changed it from procedure to function which returns TRUE if
373 --                 all the Schedules or Headers attached to a given program_id
374 --                 are CANCELLED otherwise FALSE
375 --==========================================================================
376 
377 FUNCTION Cancel_all_Event(p_prog_id   IN  NUMBER)RETURN VARCHAR2;
378 --==========================================================================
379 -- PROCEDURE
380 --    complete_RollupEvent
381 --
382 -- PURPOSE
383 --    completes the Rolup event and their associated event schedules. If the status
384 --    order rules does not permit it, it will error out.
385 --
386 -- NOTES
387 -- HISTORY
388 --    17-Jul-2001  mukumar    Created.
389 --==========================================================================
390 
391 PROCEDURE complete_RollupEvent(p_evh_id   IN  NUMBER);
392 
393 --==========================================================================
394 -- PROCEDURE
395 --    complete_Exec_Event
396 --
397 -- PURPOSE
398 --    completes the Rolup event and their associated event schedules. If the status
399 --    order rules does not permit it, it will error out.
400 --
401 -- NOTES
402 -- HISTORY
403 --    17-Jul-2001  mukumar    Created.
404 --==========================================================================
405 
406 PROCEDURE complete_Exec_Event(p_evh_id   IN  NUMBER);
407 
408 --==========================================================================
409 -- PROCEDURE
410 --    complete_oneoff_Event
411 --
412 -- PURPOSE
413 --    completes the Rolup event and their associated event schedules. If the status
414 --    order rules does not permit it, it will error out.
415 --
416 -- NOTES
417 -- HISTORY
418 --    17-Jul-2001  mukumar    Created.
419 --==========================================================================
420 
421 PROCEDURE complete_oneoff_event(p_offer_id   IN  NUMBER);
422 
423 --==========================================================================
424 -- PROCEDURE
425 --    complete_all_Event
426 --
427 -- PURPOSE
428 --    completes all Rolup event and their associated event schedules. If the status
429 --    order rules does not permit it, it will error out.
430 --
431 -- NOTES
432 -- HISTORY
433 --    17-Jul-2001  mukumar    Created.
434 --==========================================================================
435 
436 PROCEDURE complete_all_Event(p_prog_id   IN  NUMBER);
437 
438 --==========================================================================
439 -- PROCEDURE
440 --    Create_inventory_item
441 --
442 -- PURPOSE
443 --    completes all Rolup event and their associated event schedules. If the status
444 --    order rules does not permit it, it will error out.
445 --
446 -- NOTES
447 -- HISTORY
448 --    17-Jul-2001  mukumar    Created.
449 --==========================================================================
450 
451 PROCEDURE create_inventory_item(p_item_number    IN  VARCHAR2,
452                                 p_item_desc      IN  VARCHAR2,
453 				p_item_long_desc IN  VARCHAR2,
454 				p_user_id        IN  NUMBER,
455 				x_org_id         OUT NOCOPY NUMBER,
456 				x_inv_item_id    OUT NOCOPY NUMBER,
457 				x_return_status  OUT NOCOPY  VARCHAR2,
458 				x_msg_count      OUT NOCOPY  NUMBER,
459 				x_msg_data       OUT NOCOPY  VARCHAR2);
460 END AMS_EvhRules_PVT;
461