1: PACKAGE BODY xla_events_pub_pkg AS
2: -- $Header: xlaevevp.pkb 120.31 2008/01/14 07:24:34 pshukla ship $
3: /*===========================================================================+
4: | Copyright (c) 2001-2002 Oracle Corporation |
5: | Redwood Shores, CA, USA |
8: | FILENAME |
9: | xlaevevp.pkb |
10: | |
11: | PACKAGE NAME |
12: | xla_events_pub_pkg |
13: | |
14: | DESCRIPTION |
15: | This is a public package for product teams, which contains all the |
16: | APIs required for processing accounting events. |
73: C_LEVEL_UNEXPECTED CONSTANT NUMBER := FND_LOG.LEVEL_UNEXPECTED;
74:
75: C_LEVEL_LOG_DISABLED CONSTANT NUMBER := 99;
76:
77: C_DEFAULT_MODULE CONSTANT VARCHAR2(240) := 'xla.plsql.xla_events_pub_pkg';
78:
79: g_debug_flag VARCHAR2(1) := NVL(fnd_profile.value('XLA_DEBUG_TRACE'),'N');
80:
81: --l_log_module VARCHAR2(240);
143: --
144: --============================================================================
145:
146: FUNCTION create_event
147: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
148: ,p_event_type_code IN VARCHAR2
149: ,p_event_date IN DATE
150: ,p_event_status_code IN VARCHAR2
151: ,p_event_number IN INTEGER DEFAULT NULL
149: ,p_event_date IN DATE
150: ,p_event_status_code IN VARCHAR2
151: ,p_event_number IN INTEGER DEFAULT NULL
152: ,p_transaction_date IN DATE DEFAULT NULL
153: ,p_reference_info IN xla_events_pub_pkg.t_event_reference_info DEFAULT NULL
154: ,p_valuation_method IN VARCHAR2
155: ,p_security_context IN xla_events_pub_pkg.t_security)
156: RETURN INTEGER IS
157: BEGIN
151: ,p_event_number IN INTEGER DEFAULT NULL
152: ,p_transaction_date IN DATE DEFAULT NULL
153: ,p_reference_info IN xla_events_pub_pkg.t_event_reference_info DEFAULT NULL
154: ,p_valuation_method IN VARCHAR2
155: ,p_security_context IN xla_events_pub_pkg.t_security)
156: RETURN INTEGER IS
157: BEGIN
158: trace('@ xla_events_pub_pkg.create_event (fn)' , 20);
159:
154: ,p_valuation_method IN VARCHAR2
155: ,p_security_context IN xla_events_pub_pkg.t_security)
156: RETURN INTEGER IS
157: BEGIN
158: trace('@ xla_events_pub_pkg.create_event (fn)' , 20);
159:
160: xla_events_pub_pkg.g_security := p_security_context;
161: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
162:
156: RETURN INTEGER IS
157: BEGIN
158: trace('@ xla_events_pub_pkg.create_event (fn)' , 20);
159:
160: xla_events_pub_pkg.g_security := p_security_context;
161: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
162:
163: RETURN xla_events_pkg.create_event
164: (p_event_source_info => p_event_source_info
157: BEGIN
158: trace('@ xla_events_pub_pkg.create_event (fn)' , 20);
159:
160: xla_events_pub_pkg.g_security := p_security_context;
161: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
162:
163: RETURN xla_events_pkg.create_event
164: (p_event_source_info => p_event_source_info
165: ,p_valuation_method => p_valuation_method
174: WHEN xla_exceptions_pkg.application_exception THEN
175: RAISE;
176: WHEN OTHERS THEN
177: xla_exceptions_pkg.raise_message
178: (p_location => 'xla_events_pub_pkg.create_event (fn)');
179: END create_event;
180:
181: --============================================================================
182: --
186: -- - create a new event
187: --
188: --============================================================================
189: FUNCTION create_event
190: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
191: ,p_event_type_code IN VARCHAR2
192: ,p_event_date IN DATE
193: ,p_event_status_code IN VARCHAR2
194: ,p_event_number IN INTEGER DEFAULT NULL
192: ,p_event_date IN DATE
193: ,p_event_status_code IN VARCHAR2
194: ,p_event_number IN INTEGER DEFAULT NULL
195: ,p_transaction_date IN DATE DEFAULT NULL
196: ,p_reference_info IN xla_events_pub_pkg.t_event_reference_info DEFAULT NULL
197: ,p_valuation_method IN VARCHAR2
198: ,p_security_context IN xla_events_pub_pkg.t_security
199: ,p_budgetary_control_flag IN VARCHAR2)
200: RETURN INTEGER IS
194: ,p_event_number IN INTEGER DEFAULT NULL
195: ,p_transaction_date IN DATE DEFAULT NULL
196: ,p_reference_info IN xla_events_pub_pkg.t_event_reference_info DEFAULT NULL
197: ,p_valuation_method IN VARCHAR2
198: ,p_security_context IN xla_events_pub_pkg.t_security
199: ,p_budgetary_control_flag IN VARCHAR2)
200: RETURN INTEGER IS
201: BEGIN
202: trace('@ xla_events_pub_pkg.create_event (fn)' , 20);
198: ,p_security_context IN xla_events_pub_pkg.t_security
199: ,p_budgetary_control_flag IN VARCHAR2)
200: RETURN INTEGER IS
201: BEGIN
202: trace('@ xla_events_pub_pkg.create_event (fn)' , 20);
203:
204: xla_events_pub_pkg.g_security := p_security_context;
205:
206: RETURN xla_events_pkg.create_event
200: RETURN INTEGER IS
201: BEGIN
202: trace('@ xla_events_pub_pkg.create_event (fn)' , 20);
203:
204: xla_events_pub_pkg.g_security := p_security_context;
205:
206: RETURN xla_events_pkg.create_event
207: (p_event_source_info => p_event_source_info
208: ,p_valuation_method => p_valuation_method
217: WHEN xla_exceptions_pkg.application_exception THEN
218: RAISE;
219: WHEN OTHERS THEN
220: xla_exceptions_pkg.raise_message
221: (p_location => 'xla_events_pub_pkg.create_event (fn)');
222: END create_event;
223:
224:
225: -------------------------------------------------------------------------------
236: --
237: --============================================================================
238:
239: PROCEDURE update_event_status
240: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
241: ,p_event_class_code IN VARCHAR2 DEFAULT NULL
242: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
243: ,p_event_date IN DATE DEFAULT NULL
244: ,p_event_status_code IN VARCHAR2
242: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
243: ,p_event_date IN DATE DEFAULT NULL
244: ,p_event_status_code IN VARCHAR2
245: ,p_valuation_method IN VARCHAR2
246: ,p_security_context IN xla_events_pub_pkg.t_security) IS
247: BEGIN
248: trace('> xla_events_pub_pkg.update_event_status' , 20);
249:
250: xla_events_pub_pkg.g_security := p_security_context;
244: ,p_event_status_code IN VARCHAR2
245: ,p_valuation_method IN VARCHAR2
246: ,p_security_context IN xla_events_pub_pkg.t_security) IS
247: BEGIN
248: trace('> xla_events_pub_pkg.update_event_status' , 20);
249:
250: xla_events_pub_pkg.g_security := p_security_context;
251: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
252:
246: ,p_security_context IN xla_events_pub_pkg.t_security) IS
247: BEGIN
248: trace('> xla_events_pub_pkg.update_event_status' , 20);
249:
250: xla_events_pub_pkg.g_security := p_security_context;
251: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
252:
253: xla_events_pkg.update_event_status
254: (p_event_source_info => p_event_source_info
247: BEGIN
248: trace('> xla_events_pub_pkg.update_event_status' , 20);
249:
250: xla_events_pub_pkg.g_security := p_security_context;
251: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
252:
253: xla_events_pkg.update_event_status
254: (p_event_source_info => p_event_source_info
255: ,p_valuation_method => p_valuation_method
257: ,p_event_type_code => p_event_type_code
258: ,p_event_date => p_event_date
259: ,p_event_status_code => p_event_status_code);
260:
261: trace('< xla_events_pub_pkg.update_event_status' , 20);
262: EXCEPTION
263: WHEN xla_exceptions_pkg.application_exception THEN
264: RAISE;
265: WHEN OTHERS THEN
263: WHEN xla_exceptions_pkg.application_exception THEN
264: RAISE;
265: WHEN OTHERS THEN
266: xla_exceptions_pkg.raise_message
267: (p_location => 'xla_events_pub_pkg.update_event_status');
268: END update_event_status;
269:
270:
271: --============================================================================
279: --
280: --============================================================================
281:
282: PROCEDURE update_event
283: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
284: ,p_event_id IN INTEGER
285: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
286: ,p_event_date IN DATE DEFAULT NULL
287: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
285: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
286: ,p_event_date IN DATE DEFAULT NULL
287: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
288: ,p_valuation_method IN VARCHAR2
289: ,p_security_context IN xla_events_pub_pkg.t_security
290: ,p_transaction_date IN DATE DEFAULT NULL) IS
291: BEGIN
292: trace('> xla_events_pub_pkg.update_event' , 20);
293:
288: ,p_valuation_method IN VARCHAR2
289: ,p_security_context IN xla_events_pub_pkg.t_security
290: ,p_transaction_date IN DATE DEFAULT NULL) IS
291: BEGIN
292: trace('> xla_events_pub_pkg.update_event' , 20);
293:
294: xla_events_pub_pkg.g_security := p_security_context;
295: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
296:
290: ,p_transaction_date IN DATE DEFAULT NULL) IS
291: BEGIN
292: trace('> xla_events_pub_pkg.update_event' , 20);
293:
294: xla_events_pub_pkg.g_security := p_security_context;
295: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
296:
297: xla_events_pkg.update_event
298: (p_event_source_info => p_event_source_info
291: BEGIN
292: trace('> xla_events_pub_pkg.update_event' , 20);
293:
294: xla_events_pub_pkg.g_security := p_security_context;
295: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
296:
297: xla_events_pkg.update_event
298: (p_event_source_info => p_event_source_info
299: ,p_valuation_method => p_valuation_method
302: ,p_event_date => p_event_date
303: ,p_event_status_code => p_event_status_code
304: ,p_transaction_date => p_transaction_date);
305:
306: trace('< xla_events_pub_pkg.update_event' , 20);
307: EXCEPTION
308: WHEN xla_exceptions_pkg.application_exception THEN
309: RAISE;
310: WHEN OTHERS THEN
308: WHEN xla_exceptions_pkg.application_exception THEN
309: RAISE;
310: WHEN OTHERS THEN
311: xla_exceptions_pkg.raise_message
312: (p_location => 'xla_events_pub_pkg.update_event');
313: END update_event;
314:
315:
316: --============================================================================
324: --
325: --============================================================================
326:
327: PROCEDURE update_event
328: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
329: ,p_event_id IN INTEGER
330: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
331: ,p_event_date IN DATE DEFAULT NULL
332: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
331: ,p_event_date IN DATE DEFAULT NULL
332: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
333: ,p_event_number IN INTEGER
334: ,p_valuation_method IN VARCHAR2
335: ,p_security_context IN xla_events_pub_pkg.t_security
336: ,p_transaction_date IN DATE DEFAULT NULL) IS
337: BEGIN
338: trace('> xla_events_pub_pkg.update_event' , 20);
339:
334: ,p_valuation_method IN VARCHAR2
335: ,p_security_context IN xla_events_pub_pkg.t_security
336: ,p_transaction_date IN DATE DEFAULT NULL) IS
337: BEGIN
338: trace('> xla_events_pub_pkg.update_event' , 20);
339:
340: xla_events_pub_pkg.g_security := p_security_context;
341: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
342:
336: ,p_transaction_date IN DATE DEFAULT NULL) IS
337: BEGIN
338: trace('> xla_events_pub_pkg.update_event' , 20);
339:
340: xla_events_pub_pkg.g_security := p_security_context;
341: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
342:
343: xla_events_pkg.update_event
344: (p_event_source_info => p_event_source_info
337: BEGIN
338: trace('> xla_events_pub_pkg.update_event' , 20);
339:
340: xla_events_pub_pkg.g_security := p_security_context;
341: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
342:
343: xla_events_pkg.update_event
344: (p_event_source_info => p_event_source_info
345: ,p_valuation_method => p_valuation_method
350: ,p_transaction_date => p_transaction_date
351: ,p_event_number => p_event_number
352: ,p_overwrite_event_num => 'Y');
353:
354: trace('< xla_events_pub_pkg.update_event' , 20);
355: EXCEPTION
356: WHEN xla_exceptions_pkg.application_exception THEN
357: RAISE;
358: WHEN OTHERS THEN
356: WHEN xla_exceptions_pkg.application_exception THEN
357: RAISE;
358: WHEN OTHERS THEN
359: xla_exceptions_pkg.raise_message
360: (p_location => 'xla_events_pub_pkg.update_event');
361: END update_event;
362:
363:
364: --============================================================================
372: --
373: --============================================================================
374:
375: PROCEDURE update_event
376: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
377: ,p_event_id IN INTEGER
378: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
379: ,p_event_date IN DATE DEFAULT NULL
380: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
377: ,p_event_id IN INTEGER
378: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
379: ,p_event_date IN DATE DEFAULT NULL
380: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
381: ,p_reference_info IN xla_events_pub_pkg.t_event_reference_info
382: ,p_valuation_method IN VARCHAR2
383: ,p_security_context IN xla_events_pub_pkg.t_security
384: ,p_transaction_date IN DATE DEFAULT NULL) IS
385: BEGIN
379: ,p_event_date IN DATE DEFAULT NULL
380: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
381: ,p_reference_info IN xla_events_pub_pkg.t_event_reference_info
382: ,p_valuation_method IN VARCHAR2
383: ,p_security_context IN xla_events_pub_pkg.t_security
384: ,p_transaction_date IN DATE DEFAULT NULL) IS
385: BEGIN
386: trace('> xla_events_pub_pkg.update_event' , 20);
387:
382: ,p_valuation_method IN VARCHAR2
383: ,p_security_context IN xla_events_pub_pkg.t_security
384: ,p_transaction_date IN DATE DEFAULT NULL) IS
385: BEGIN
386: trace('> xla_events_pub_pkg.update_event' , 20);
387:
388: xla_events_pub_pkg.g_security := p_security_context;
389: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
390:
384: ,p_transaction_date IN DATE DEFAULT NULL) IS
385: BEGIN
386: trace('> xla_events_pub_pkg.update_event' , 20);
387:
388: xla_events_pub_pkg.g_security := p_security_context;
389: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
390:
391: xla_events_pkg.update_event
392: (p_event_source_info => p_event_source_info
385: BEGIN
386: trace('> xla_events_pub_pkg.update_event' , 20);
387:
388: xla_events_pub_pkg.g_security := p_security_context;
389: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
390:
391: xla_events_pkg.update_event
392: (p_event_source_info => p_event_source_info
393: ,p_valuation_method => p_valuation_method
398: ,p_transaction_date => p_transaction_date
399: ,p_reference_info => p_reference_info
400: ,p_overwrite_ref_info => 'Y' );
401:
402: trace('< xla_events_pub_pkg.update_event' , 20);
403: EXCEPTION
404: WHEN xla_exceptions_pkg.application_exception THEN
405: RAISE;
406: WHEN OTHERS THEN
404: WHEN xla_exceptions_pkg.application_exception THEN
405: RAISE;
406: WHEN OTHERS THEN
407: xla_exceptions_pkg.raise_message
408: (p_location => 'xla_events_pub_pkg.update_event');
409: END update_event;
410:
411:
412: --============================================================================
420: --
421: --============================================================================
422:
423: PROCEDURE update_event
424: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
425: ,p_event_id IN INTEGER
426: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
427: ,p_event_date IN DATE DEFAULT NULL
428: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
426: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
427: ,p_event_date IN DATE DEFAULT NULL
428: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
429: ,p_event_number IN INTEGER
430: ,p_reference_info IN xla_events_pub_pkg.t_event_reference_info
431: ,p_valuation_method IN VARCHAR2
432: ,p_security_context IN xla_events_pub_pkg.t_security
433: ,p_transaction_date IN DATE DEFAULT NULL) IS
434: BEGIN
428: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
429: ,p_event_number IN INTEGER
430: ,p_reference_info IN xla_events_pub_pkg.t_event_reference_info
431: ,p_valuation_method IN VARCHAR2
432: ,p_security_context IN xla_events_pub_pkg.t_security
433: ,p_transaction_date IN DATE DEFAULT NULL) IS
434: BEGIN
435: trace('> xla_events_pub_pkg.update_event' , 20);
436:
431: ,p_valuation_method IN VARCHAR2
432: ,p_security_context IN xla_events_pub_pkg.t_security
433: ,p_transaction_date IN DATE DEFAULT NULL) IS
434: BEGIN
435: trace('> xla_events_pub_pkg.update_event' , 20);
436:
437: xla_events_pub_pkg.g_security := p_security_context;
438: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
439:
433: ,p_transaction_date IN DATE DEFAULT NULL) IS
434: BEGIN
435: trace('> xla_events_pub_pkg.update_event' , 20);
436:
437: xla_events_pub_pkg.g_security := p_security_context;
438: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
439:
440: xla_events_pkg.update_event
441: (p_event_source_info => p_event_source_info
434: BEGIN
435: trace('> xla_events_pub_pkg.update_event' , 20);
436:
437: xla_events_pub_pkg.g_security := p_security_context;
438: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
439:
440: xla_events_pkg.update_event
441: (p_event_source_info => p_event_source_info
442: ,p_valuation_method => p_valuation_method
449: ,p_reference_info => p_reference_info
450: ,p_overwrite_event_num => 'Y'
451: ,p_overwrite_ref_info => 'Y');
452:
453: trace('< xla_events_pub_pkg.update_event' , 20);
454: EXCEPTION
455: WHEN xla_exceptions_pkg.application_exception THEN
456: RAISE;
457: WHEN OTHERS THEN
455: WHEN xla_exceptions_pkg.application_exception THEN
456: RAISE;
457: WHEN OTHERS THEN
458: xla_exceptions_pkg.raise_message
459: (p_location => 'xla_events_pub_pkg.update_event');
460: END update_event;
461:
462:
463: -------------------------------------------------------------------------------
474: --
475: --============================================================================
476:
477: PROCEDURE delete_event
478: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
479: ,p_event_id IN INTEGER
480: ,p_valuation_method IN VARCHAR2
481: ,p_security_context IN xla_events_pub_pkg.t_security) IS
482: BEGIN
477: PROCEDURE delete_event
478: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
479: ,p_event_id IN INTEGER
480: ,p_valuation_method IN VARCHAR2
481: ,p_security_context IN xla_events_pub_pkg.t_security) IS
482: BEGIN
483: trace('> xla_events_pub_pkg.delete_event' , 20);
484:
485: xla_events_pub_pkg.g_security := p_security_context;
479: ,p_event_id IN INTEGER
480: ,p_valuation_method IN VARCHAR2
481: ,p_security_context IN xla_events_pub_pkg.t_security) IS
482: BEGIN
483: trace('> xla_events_pub_pkg.delete_event' , 20);
484:
485: xla_events_pub_pkg.g_security := p_security_context;
486: --xla_events_pub_pkg.g_valuation_method := p_valuation_method;
487:
481: ,p_security_context IN xla_events_pub_pkg.t_security) IS
482: BEGIN
483: trace('> xla_events_pub_pkg.delete_event' , 20);
484:
485: xla_events_pub_pkg.g_security := p_security_context;
486: --xla_events_pub_pkg.g_valuation_method := p_valuation_method;
487:
488: xla_events_pkg.delete_event
489: (p_event_source_info => p_event_source_info
482: BEGIN
483: trace('> xla_events_pub_pkg.delete_event' , 20);
484:
485: xla_events_pub_pkg.g_security := p_security_context;
486: --xla_events_pub_pkg.g_valuation_method := p_valuation_method;
487:
488: xla_events_pkg.delete_event
489: (p_event_source_info => p_event_source_info
490: ,p_valuation_method => p_valuation_method
489: (p_event_source_info => p_event_source_info
490: ,p_valuation_method => p_valuation_method
491: ,p_event_id => p_event_id );
492:
493: trace('< xla_events_pub_pkg.delete_event' , 20);
494: EXCEPTION
495: WHEN xla_exceptions_pkg.application_exception THEN
496: RAISE;
497: WHEN OTHERS THEN
495: WHEN xla_exceptions_pkg.application_exception THEN
496: RAISE;
497: WHEN OTHERS THEN
498: xla_exceptions_pkg.raise_message
499: (p_location => 'xla_events_pub_pkg.delete_event');
500: END delete_event;
501:
502:
503: --============================================================================
511: --
512: --============================================================================
513:
514: FUNCTION delete_events
515: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
516: ,p_event_class_code IN VARCHAR2 DEFAULT NULL
517: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
518: ,p_event_date IN DATE DEFAULT NULL
519: ,p_valuation_method IN VARCHAR2
516: ,p_event_class_code IN VARCHAR2 DEFAULT NULL
517: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
518: ,p_event_date IN DATE DEFAULT NULL
519: ,p_valuation_method IN VARCHAR2
520: ,p_security_context IN xla_events_pub_pkg.t_security)
521: RETURN INTEGER IS
522: BEGIN
523: trace('@ xla_events_pub_pkg.delete_events (fn)' , 20);
524:
519: ,p_valuation_method IN VARCHAR2
520: ,p_security_context IN xla_events_pub_pkg.t_security)
521: RETURN INTEGER IS
522: BEGIN
523: trace('@ xla_events_pub_pkg.delete_events (fn)' , 20);
524:
525: xla_events_pub_pkg.g_security := p_security_context;
526: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
527:
521: RETURN INTEGER IS
522: BEGIN
523: trace('@ xla_events_pub_pkg.delete_events (fn)' , 20);
524:
525: xla_events_pub_pkg.g_security := p_security_context;
526: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
527:
528: RETURN xla_events_pkg.delete_events
529: (p_event_source_info => p_event_source_info
522: BEGIN
523: trace('@ xla_events_pub_pkg.delete_events (fn)' , 20);
524:
525: xla_events_pub_pkg.g_security := p_security_context;
526: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
527:
528: RETURN xla_events_pkg.delete_events
529: (p_event_source_info => p_event_source_info
530: ,p_event_class_code => p_event_class_code
535: WHEN xla_exceptions_pkg.application_exception THEN
536: RAISE;
537: WHEN OTHERS THEN
538: xla_exceptions_pkg.raise_message
539: (p_location => 'xla_events_pub_pkg.delete_events(fn)');
540: END delete_events;
541:
542:
543: --============================================================================
549: -- - else delete entity, return 0
550: --
551: --============================================================================
552: FUNCTION delete_entity
553: (p_source_info IN xla_events_pub_pkg.t_event_source_info
554: ,p_valuation_method IN VARCHAR2
555: ,p_security_context IN xla_events_pub_pkg.t_security)
556: RETURN INTEGER IS
557: l_result INTEGER;
551: --============================================================================
552: FUNCTION delete_entity
553: (p_source_info IN xla_events_pub_pkg.t_event_source_info
554: ,p_valuation_method IN VARCHAR2
555: ,p_security_context IN xla_events_pub_pkg.t_security)
556: RETURN INTEGER IS
557: l_result INTEGER;
558: BEGIN
559: trace('> xla_events_pub_pkg.delete_entty' , 20);
555: ,p_security_context IN xla_events_pub_pkg.t_security)
556: RETURN INTEGER IS
557: l_result INTEGER;
558: BEGIN
559: trace('> xla_events_pub_pkg.delete_entty' , 20);
560:
561: xla_events_pub_pkg.g_security := p_security_context;
562: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
563:
557: l_result INTEGER;
558: BEGIN
559: trace('> xla_events_pub_pkg.delete_entty' , 20);
560:
561: xla_events_pub_pkg.g_security := p_security_context;
562: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
563:
564: l_result := xla_events_pkg.delete_entity
565: (p_source_info => p_source_info
558: BEGIN
559: trace('> xla_events_pub_pkg.delete_entty' , 20);
560:
561: xla_events_pub_pkg.g_security := p_security_context;
562: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
563:
564: l_result := xla_events_pkg.delete_entity
565: (p_source_info => p_source_info
566: ,p_valuation_method => p_valuation_method);
564: l_result := xla_events_pkg.delete_entity
565: (p_source_info => p_source_info
566: ,p_valuation_method => p_valuation_method);
567:
568: trace('< xla_events_pub_pkg.delete_entity' , 20);
569: return l_result;
570: EXCEPTION
571: WHEN xla_exceptions_pkg.application_exception THEN
572: RAISE;
571: WHEN xla_exceptions_pkg.application_exception THEN
572: RAISE;
573: WHEN OTHERS THEN
574: xla_exceptions_pkg.raise_message
575: (p_location => 'xla_events_pub_pkg.delete_entity');
576: END delete_entity;
577:
578: -------------------------------------------------------------------------------
579: -- Event information routines
588: --
589: --============================================================================
590:
591: FUNCTION get_event_info
592: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
593: ,p_event_id IN INTEGER
594: ,p_valuation_method IN VARCHAR2
595: ,p_security_context IN xla_events_pub_pkg.t_security)
596: RETURN xla_events_pub_pkg.t_event_info IS
591: FUNCTION get_event_info
592: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
593: ,p_event_id IN INTEGER
594: ,p_valuation_method IN VARCHAR2
595: ,p_security_context IN xla_events_pub_pkg.t_security)
596: RETURN xla_events_pub_pkg.t_event_info IS
597: BEGIN
598: trace('@ xla_events_pub_pkg.get_event_info' , 20);
599:
592: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
593: ,p_event_id IN INTEGER
594: ,p_valuation_method IN VARCHAR2
595: ,p_security_context IN xla_events_pub_pkg.t_security)
596: RETURN xla_events_pub_pkg.t_event_info IS
597: BEGIN
598: trace('@ xla_events_pub_pkg.get_event_info' , 20);
599:
600: xla_events_pub_pkg.g_security := p_security_context;
594: ,p_valuation_method IN VARCHAR2
595: ,p_security_context IN xla_events_pub_pkg.t_security)
596: RETURN xla_events_pub_pkg.t_event_info IS
597: BEGIN
598: trace('@ xla_events_pub_pkg.get_event_info' , 20);
599:
600: xla_events_pub_pkg.g_security := p_security_context;
601: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
602:
596: RETURN xla_events_pub_pkg.t_event_info IS
597: BEGIN
598: trace('@ xla_events_pub_pkg.get_event_info' , 20);
599:
600: xla_events_pub_pkg.g_security := p_security_context;
601: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
602:
603: RETURN xla_events_pkg.get_event_info
604: (p_event_source_info => p_event_source_info
597: BEGIN
598: trace('@ xla_events_pub_pkg.get_event_info' , 20);
599:
600: xla_events_pub_pkg.g_security := p_security_context;
601: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
602:
603: RETURN xla_events_pkg.get_event_info
604: (p_event_source_info => p_event_source_info
605: ,p_valuation_method => p_valuation_method
608: WHEN xla_exceptions_pkg.application_exception THEN
609: RAISE;
610: WHEN OTHERS THEN
611: xla_exceptions_pkg.raise_message
612: (p_location => 'xla_events_pub_pkg.get_event_info');
613: END get_event_info;
614:
615:
616: --============================================================================
621: --
622: --============================================================================
623:
624: FUNCTION get_event_status
625: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
626: ,p_event_id IN INTEGER
627: ,p_valuation_method IN VARCHAR2
628: ,p_security_context IN xla_events_pub_pkg.t_security)
629: RETURN VARCHAR2 IS
624: FUNCTION get_event_status
625: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
626: ,p_event_id IN INTEGER
627: ,p_valuation_method IN VARCHAR2
628: ,p_security_context IN xla_events_pub_pkg.t_security)
629: RETURN VARCHAR2 IS
630: BEGIN
631: trace('@ xla_events_pub_pkg.get_event_status' , 20);
632:
627: ,p_valuation_method IN VARCHAR2
628: ,p_security_context IN xla_events_pub_pkg.t_security)
629: RETURN VARCHAR2 IS
630: BEGIN
631: trace('@ xla_events_pub_pkg.get_event_status' , 20);
632:
633: xla_events_pub_pkg.g_security := p_security_context;
634: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
635:
629: RETURN VARCHAR2 IS
630: BEGIN
631: trace('@ xla_events_pub_pkg.get_event_status' , 20);
632:
633: xla_events_pub_pkg.g_security := p_security_context;
634: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
635:
636: RETURN xla_events_pkg.get_event_status
637: (p_event_source_info => p_event_source_info
630: BEGIN
631: trace('@ xla_events_pub_pkg.get_event_status' , 20);
632:
633: xla_events_pub_pkg.g_security := p_security_context;
634: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
635:
636: RETURN xla_events_pkg.get_event_status
637: (p_event_source_info => p_event_source_info
638: ,p_valuation_method => p_valuation_method
641: WHEN xla_exceptions_pkg.application_exception THEN
642: RAISE;
643: WHEN OTHERS THEN
644: xla_exceptions_pkg.raise_message
645: (p_location => 'xla_events_pub_pkg.get_event_status');
646: END get_event_status;
647:
648:
649: --============================================================================
652: --
653: --============================================================================
654:
655: FUNCTION event_exists
656: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
657: ,p_event_class_code IN VARCHAR2 DEFAULT NULL
658: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
659: ,p_event_date IN DATE DEFAULT NULL
660: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
659: ,p_event_date IN DATE DEFAULT NULL
660: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
661: ,p_event_number IN INTEGER DEFAULT NULL
662: ,p_valuation_method IN VARCHAR2
663: ,p_security_context IN xla_events_pub_pkg.t_security)
664: RETURN BOOLEAN IS
665: BEGIN
666: trace('@ xla_events_pub_pkg.event_exists' , 20);
667:
662: ,p_valuation_method IN VARCHAR2
663: ,p_security_context IN xla_events_pub_pkg.t_security)
664: RETURN BOOLEAN IS
665: BEGIN
666: trace('@ xla_events_pub_pkg.event_exists' , 20);
667:
668: xla_events_pub_pkg.g_security := p_security_context;
669: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
670:
664: RETURN BOOLEAN IS
665: BEGIN
666: trace('@ xla_events_pub_pkg.event_exists' , 20);
667:
668: xla_events_pub_pkg.g_security := p_security_context;
669: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
670:
671: RETURN xla_events_pkg.event_exists
672: (p_event_source_info => p_event_source_info
665: BEGIN
666: trace('@ xla_events_pub_pkg.event_exists' , 20);
667:
668: xla_events_pub_pkg.g_security := p_security_context;
669: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
670:
671: RETURN xla_events_pkg.event_exists
672: (p_event_source_info => p_event_source_info
673: ,p_valuation_method => p_valuation_method
680: WHEN xla_exceptions_pkg.application_exception THEN
681: RAISE;
682: WHEN OTHERS THEN
683: xla_exceptions_pkg.raise_message
684: (p_location => 'xla_events_pub_pkg.event_exists');
685: END event_exists;
686:
687:
688: --============================================================================
695: --
696: --============================================================================
697:
698: FUNCTION get_array_event_info
699: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
700: ,p_event_class_code IN VARCHAR2 DEFAULT NULL
701: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
702: ,p_event_date IN DATE DEFAULT NULL
703: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
701: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
702: ,p_event_date IN DATE DEFAULT NULL
703: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
704: ,p_valuation_method IN VARCHAR2
705: ,p_security_context IN xla_events_pub_pkg.t_security)
706: RETURN xla_events_pub_pkg.t_array_event_info IS
707: BEGIN
708: trace('@ xla_events_pub_pkg.get_array_event_info' , 20);
709:
702: ,p_event_date IN DATE DEFAULT NULL
703: ,p_event_status_code IN VARCHAR2 DEFAULT NULL
704: ,p_valuation_method IN VARCHAR2
705: ,p_security_context IN xla_events_pub_pkg.t_security)
706: RETURN xla_events_pub_pkg.t_array_event_info IS
707: BEGIN
708: trace('@ xla_events_pub_pkg.get_array_event_info' , 20);
709:
710: xla_events_pub_pkg.g_security := p_security_context;
704: ,p_valuation_method IN VARCHAR2
705: ,p_security_context IN xla_events_pub_pkg.t_security)
706: RETURN xla_events_pub_pkg.t_array_event_info IS
707: BEGIN
708: trace('@ xla_events_pub_pkg.get_array_event_info' , 20);
709:
710: xla_events_pub_pkg.g_security := p_security_context;
711: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
712:
706: RETURN xla_events_pub_pkg.t_array_event_info IS
707: BEGIN
708: trace('@ xla_events_pub_pkg.get_array_event_info' , 20);
709:
710: xla_events_pub_pkg.g_security := p_security_context;
711: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
712:
713: RETURN xla_events_pkg.get_array_event_info
714: (p_event_source_info => p_event_source_info
707: BEGIN
708: trace('@ xla_events_pub_pkg.get_array_event_info' , 20);
709:
710: xla_events_pub_pkg.g_security := p_security_context;
711: -- xla_events_pub_pkg.g_valuation_method := p_valuation_method;
712:
713: RETURN xla_events_pkg.get_array_event_info
714: (p_event_source_info => p_event_source_info
715: ,p_valuation_method => p_valuation_method
721: WHEN xla_exceptions_pkg.application_exception THEN
722: RAISE;
723: WHEN OTHERS THEN
724: xla_exceptions_pkg.raise_message
725: (p_location => 'xla_events_pub_pkg.get_array_event_info');
726: END get_array_event_info;
727:
728: PROCEDURE create_bulk_events
729: (p_source_application_id IN INTEGER DEFAULT NULL
743: WHEN xla_exceptions_pkg.application_exception THEN
744: RAISE;
745: WHEN OTHERS THEN
746: xla_exceptions_pkg.raise_message
747: (p_location => 'xla_events_pub_pkg.create_bulk_events');
748: END create_bulk_events;
749:
750: PROCEDURE update_bulk_event_statuses(p_application_id INTEGER) IS
751: BEGIN
756: WHEN xla_exceptions_pkg.application_exception THEN
757: RAISE;
758: WHEN OTHERS THEN
759: xla_exceptions_pkg.raise_message
760: (p_location => 'xla_events_pub_pkg.update_bulk_event_statuses');
761: END update_bulk_event_statuses;
762:
763: PROCEDURE delete_bulk_events(p_application_id INTEGER) IS
764: BEGIN
769: WHEN xla_exceptions_pkg.application_exception THEN
770: RAISE;
771: WHEN OTHERS THEN
772: xla_exceptions_pkg.raise_message
773: (p_location => 'xla_events_pub_pkg.delete_bulk_events');
774: END delete_bulk_events;
775:
776: -- For subledger teams uptake of Period Close validation.
777: PROCEDURE period_close (p_api_version IN NUMBER
868: EXCEPTION
869:
870: WHEN xla_exceptions_pkg.application_exception THEN
871:
872: WF_CORE.CONTEXT( 'xla_events_pub_pkg', 'period_close',
873: p_event.getEventName( ), p_subscription_guid);
874: WF_EVENT.setErrorInfo(p_event, 'ERROR');
875: RETURN 'ERROR';
876:
888: --
889: --============================================================================
890:
891: PROCEDURE update_transaction_number
892: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
893: ,p_transaction_number IN VARCHAR2
894: ,p_valuation_method IN VARCHAR2
895: ,p_security_context IN xla_events_pub_pkg.t_security
896: ,p_event_id IN PLS_INTEGER DEFAULT NULL) IS
891: PROCEDURE update_transaction_number
892: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
893: ,p_transaction_number IN VARCHAR2
894: ,p_valuation_method IN VARCHAR2
895: ,p_security_context IN xla_events_pub_pkg.t_security
896: ,p_event_id IN PLS_INTEGER DEFAULT NULL) IS
897: BEGIN
898: trace('> xla_events_pub_pkg.update_transaction_number' , 20);
899:
894: ,p_valuation_method IN VARCHAR2
895: ,p_security_context IN xla_events_pub_pkg.t_security
896: ,p_event_id IN PLS_INTEGER DEFAULT NULL) IS
897: BEGIN
898: trace('> xla_events_pub_pkg.update_transaction_number' , 20);
899:
900: xla_events_pub_pkg.g_security := p_security_context;
901: xla_events_pub_pkg.g_valuation_method := p_valuation_method;
902:
896: ,p_event_id IN PLS_INTEGER DEFAULT NULL) IS
897: BEGIN
898: trace('> xla_events_pub_pkg.update_transaction_number' , 20);
899:
900: xla_events_pub_pkg.g_security := p_security_context;
901: xla_events_pub_pkg.g_valuation_method := p_valuation_method;
902:
903: xla_events_pkg.update_transaction_number
904: (p_event_source_info => p_event_source_info
897: BEGIN
898: trace('> xla_events_pub_pkg.update_transaction_number' , 20);
899:
900: xla_events_pub_pkg.g_security := p_security_context;
901: xla_events_pub_pkg.g_valuation_method := p_valuation_method;
902:
903: xla_events_pkg.update_transaction_number
904: (p_event_source_info => p_event_source_info
905: ,p_transaction_number => p_transaction_number
906: ,p_valuation_method => p_valuation_method
907: ,p_event_id => p_event_id
908: );
909:
910: trace('< xla_events_pub_pkg.update_transaction_number' , 20);
911: EXCEPTION
912: WHEN xla_exceptions_pkg.application_exception THEN
913: RAISE;
914: WHEN OTHERS THEN
912: WHEN xla_exceptions_pkg.application_exception THEN
913: RAISE;
914: WHEN OTHERS THEN
915: xla_exceptions_pkg.raise_message
916: (p_location => 'xla_events_pub_pkg.update_transaction_number');
917: END update_transaction_number;
918:
919:
920:
927: IF NOT g_log_enabled THEN
928: g_log_level := C_LEVEL_LOG_DISABLED;
929: END IF;
930:
931: END xla_events_pub_pkg;