8: p_event_status IN VARCHAR2 DEFAULT NULL,
9: p_calling_fn IN VARCHAR2,
10: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean IS
11:
12: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
13: l_security_context XLA_EVENTS_PUB_PKG.t_security;
14:
15: l_event_type_code varchar2(30) ;
16: l_event_date date := px_trans_rec.transaction_date_entered;
9: p_calling_fn IN VARCHAR2,
10: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean IS
11:
12: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
13: l_security_context XLA_EVENTS_PUB_PKG.t_security;
14:
15: l_event_type_code varchar2(30) ;
16: l_event_date date := px_trans_rec.transaction_date_entered;
17: l_event_status varchar2(30) ;
91:
92: -- set the status correctly
93: -- only retirements / reinstatements should use incomplete
94: if (p_event_status is null or
95: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
96: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
97: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
98: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
99: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
92: -- set the status correctly
93: -- only retirements / reinstatements should use incomplete
94: if (p_event_status is null or
95: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
96: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
97: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
98: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
99: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
100: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
93: -- only retirements / reinstatements should use incomplete
94: if (p_event_status is null or
95: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
96: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
97: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
98: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
99: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
100: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
101: else
94: if (p_event_status is null or
95: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
96: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
97: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
98: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
99: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
100: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
101: else
102: -- invalid type
95: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
96: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
97: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
98: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
99: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
100: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
101: else
102: -- invalid type
103: raise invalid_event_status;
96: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
97: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
98: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
99: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
100: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
101: else
102: -- invalid type
103: raise invalid_event_status;
104: end if;
129: end if;
130:
131: -- Call XLA API
132: px_trans_rec.event_id :=
133: XLA_EVENTS_PUB_PKG.create_event
134: (p_event_source_info => l_trx_source_info,
135: p_event_type_code => l_event_type_code,
136: p_event_date => l_event_date,
137: p_event_status_code => l_event_status,
178: p_event_status IN VARCHAR2 DEFAULT NULL,
179: p_calling_fn IN VARCHAR2,
180: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean is
181:
182: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
183: l_security_context XLA_EVENTS_PUB_PKG.t_security;
184:
185: l_event_type_code varchar2(30) ;
186: l_event_date date := px_trans_rec_src.transaction_date_entered;
179: p_calling_fn IN VARCHAR2,
180: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean is
181:
182: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
183: l_security_context XLA_EVENTS_PUB_PKG.t_security;
184:
185: l_event_type_code varchar2(30) ;
186: l_event_date date := px_trans_rec_src.transaction_date_entered;
187: l_event_status varchar2(30) ;
226:
227: -- set the status correctly
228: -- only retirements / reinstatements should use incomplete
229: if (p_event_status is null or
230: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
231: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
232: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
233: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
234: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
227: -- set the status correctly
228: -- only retirements / reinstatements should use incomplete
229: if (p_event_status is null or
230: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
231: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
232: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
233: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
234: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
235: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
228: -- only retirements / reinstatements should use incomplete
229: if (p_event_status is null or
230: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
231: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
232: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
233: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
234: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
235: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
236: else
229: if (p_event_status is null or
230: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
231: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
232: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
233: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
234: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
235: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
236: else
237: -- invalid type
230: p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED) then
231: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
232: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
233: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
234: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
235: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
236: else
237: -- invalid type
238: raise invalid_event_status;
231: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
232: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE) then
233: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE;
234: elsif (p_event_status = XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION) then
235: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_NOACTION;
236: else
237: -- invalid type
238: raise invalid_event_status;
239: end if;
242: fa_cache_pkg.fazcdp_record.calendar_period_open_date);
243:
244: -- Call XLA API
245: px_trans_rec_src.event_id :=
246: XLA_EVENTS_PUB_PKG.create_event
247: (p_event_source_info => l_trx_source_info,
248: p_event_type_code => l_event_type_code,
249: p_event_date => l_event_date,
250: p_event_status_code => l_event_status,
291: x_event_id OUT NOCOPY number,
292: p_calling_fn IN VARCHAR2,
293: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) IS
294:
295: l_deprn_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
296: l_security_context XLA_EVENTS_PUB_PKG.t_security;
297:
298: l_event_type_code varchar2(30) ;
299: l_event_date date := p_period_close_date;
292: p_calling_fn IN VARCHAR2,
293: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) IS
294:
295: l_deprn_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
296: l_security_context XLA_EVENTS_PUB_PKG.t_security;
297:
298: l_event_type_code varchar2(30) ;
299: l_event_date date := p_period_close_date;
300: l_event_status varchar2(30) ;
315: -- based on calling interface and other factors
316:
317: l_deprn_source_info.entity_type_code := 'DEPRECIATION';
318:
319: l_event_status := XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED;
320:
321: -- ER 14644811 : This function will be called from
322: -- FA_DEPRN_EVENTS_PKG.process_single_deprn_event
323:
328: end if;
329:
330: -- Call XLA API
331: x_event_id :=
332: XLA_EVENTS_PUB_PKG.create_event
333: (p_event_source_info => l_deprn_source_info,
334: p_event_type_code => l_event_type_code,
335: p_event_date => l_event_date,
336: p_event_status_code => l_event_status,
369: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) IS
370:
371: l_legal_entity_id number;
372:
373: l_entity_event_info_tbl_in xla_events_pub_pkg.t_array_entity_event_info_s;
374: l_entity_event_info_tbl_out xla_events_pub_pkg.t_array_entity_event_info_s;
375:
376: l_calling_fn varchar2(80) := 'fa_xla_events_pvt.create_bulk_deprn_event';
377:
370:
371: l_legal_entity_id number;
372:
373: l_entity_event_info_tbl_in xla_events_pub_pkg.t_array_entity_event_info_s;
374: l_entity_event_info_tbl_out xla_events_pub_pkg.t_array_entity_event_info_s;
375:
376: l_calling_fn varchar2(80) := 'fa_xla_events_pvt.create_bulk_deprn_event';
377:
378: l_dummy_number number_tbl_type;
410: p_entity_type_code ,
411: 'DEPRECIATION' ,
412: p_period_close_date ,
413: l_dummy_number(i) ,
414: XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED,
415: l_dummy_number(i) ,
416: p_asset_id_tbl(i) ,
417: p_book_type_code ,
418: p_period_counter ,
419: p_deprn_run_id ,
420: p_book_type_code
421: );
422:
423: XLA_EVENTS_PUB_PKG.create_bulk_events
424: (p_source_application_id => 140,
425: p_application_id => 140,
426: p_legal_entity_id => l_legal_entity_id,
427: p_ledger_id => nvl(p_secondary_sob_id,fa_cache_pkg.fazcbc_record.set_of_books_id),
466:
467: l_dummy_number number_tbl_type;
468: l_legal_entity_id number;
469:
470: l_entity_event_info_tbl_in xla_events_pub_pkg.t_array_entity_event_info_s;
471: l_entity_event_info_tbl_out xla_events_pub_pkg.t_array_entity_event_info_s;
472:
473: --Secondary Changes
474: l_sob_id number;
467: l_dummy_number number_tbl_type;
468: l_legal_entity_id number;
469:
470: l_entity_event_info_tbl_in xla_events_pub_pkg.t_array_entity_event_info_s;
471: l_entity_event_info_tbl_out xla_events_pub_pkg.t_array_entity_event_info_s;
472:
473: --Secondary Changes
474: l_sob_id number;
475:
515: p_entity_type_code ,
516: 'DEFERRED_DEPRECIATION' ,
517: p_period_close_date ,
518: l_dummy_number(i) ,
519: XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED,
520: l_dummy_number(i) ,
521: p_asset_id_tbl(i) ,
522: p_corp_book ,
523: p_tax_book ,
524: p_corp_period_counter,
525: p_corp_book
526: );
527:
528: XLA_EVENTS_PUB_PKG.create_bulk_events
529: (p_source_application_id => 140,
530: p_application_id => 140,
531: p_legal_entity_id => l_legal_entity_id,
532: p_ledger_id => fa_cache_pkg.fazcbc_record.set_of_books_id,
554:
555: /*
556:
557: PROCEDURE update_event_status
558: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info
559: ,p_event_class_code IN VARCHAR2 DEFAULT NULL
560: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
561: ,p_event_date IN DATE DEFAULT NULL
562: ,p_event_status_code IN VARCHAR2
560: ,p_event_type_code IN VARCHAR2 DEFAULT NULL
561: ,p_event_date IN DATE DEFAULT NULL
562: ,p_event_status_code IN VARCHAR2
563: ,p_valuation_method IN VARCHAR2
564: ,p_security_context IN xla_events_pub_pkg.t_security
565:
566: ,p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null);
567:
568: */
578: p_secondary_sob_id IN number default null,
579: p_calling_fn IN VARCHAR2,
580: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean IS
581:
582: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
583: l_security_context XLA_EVENTS_PUB_PKG.t_security;
584: l_event_type varchar2(30);
585: l_event_id number;
586: l_event_date date;
579: p_calling_fn IN VARCHAR2,
580: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean IS
581:
582: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
583: l_security_context XLA_EVENTS_PUB_PKG.t_security;
584: l_event_type varchar2(30);
585: l_event_id number;
586: l_event_date date;
587:
617:
618: l_event_date := greatest(p_event_date,
619: fa_cache_pkg.fazcdp_record.calendar_period_open_date);
620:
621: XLA_EVENTS_PUB_PKG.update_event
622: (p_event_source_info => l_trx_source_info,
623: p_event_id => l_event_id,
624: p_event_type_code => p_event_type_code,
625: p_event_date => l_event_date,
648: p_calling_fn IN VARCHAR2,
649: p_log_level_rec in fa_api_types.log_level_rec_type default null
650: ) return boolean is
651:
652: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
653: l_security_context XLA_EVENTS_PUB_PKG.t_security;
654: l_event_type varchar2(30);
655: l_event_id number;
656:
649: p_log_level_rec in fa_api_types.log_level_rec_type default null
650: ) return boolean is
651:
652: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
653: l_security_context XLA_EVENTS_PUB_PKG.t_security;
654: l_event_type varchar2(30);
655: l_event_id number;
656:
657: l_destination_trx_header_id number;--Secondary Change
685: and source_id_int_1 = l_destination_trx_header_id; --need to check. Secondary Changes
686:
687: end if;
688:
689: XLA_EVENTS_PUB_PKG.update_event
690: (p_event_source_info => l_trx_source_info,
691: p_event_id => l_event_id,
692: p_event_type_code => p_event_type_code,
693: p_event_date => p_event_date,
718: p_calling_fn IN VARCHAR2,
719: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean IS
720:
721: l_event_id NUMBER;
722: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
723: l_security_context XLA_EVENTS_PUB_PKG.t_security;
724: l_result integer;
725:
726: --Secondary Changes
719: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean IS
720:
721: l_event_id NUMBER;
722: l_trx_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
723: l_security_context XLA_EVENTS_PUB_PKG.t_security;
724: l_result integer;
725:
726: --Secondary Changes
727: l_event_type_code varchar2(30) ;
799: end if;
800:
801: If (nvl(p_asset_type,'XX') <> 'EXPENSED') then
802:
803: XLA_EVENTS_PUB_PKG.delete_event
804: (p_event_source_info => l_trx_source_info,
805: p_event_id => l_event_id,
806: p_valuation_method => p_book_type_code,
807: p_security_context => l_security_context);
806: p_valuation_method => p_book_type_code,
807: p_security_context => l_security_context);
808:
809: BEGIN
810: l_result := XLA_EVENTS_PUB_PKG.delete_entity
811: (p_source_info => l_trx_source_info,
812: p_valuation_method => p_book_type_code,
813: p_security_context => l_security_context);
814:
841: p_calling_fn IN VARCHAR2,
842: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean IS
843:
844: l_event_id NUMBER;
845: l_deprn_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
846: l_security_context XLA_EVENTS_PUB_PKG.t_security;
847: l_result integer;
848:
849: l_calling_fn varchar2(80) := 'fa_xla_events_pvt.delete_deprn_event';
842: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) return boolean IS
843:
844: l_event_id NUMBER;
845: l_deprn_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
846: l_security_context XLA_EVENTS_PUB_PKG.t_security;
847: l_result integer;
848:
849: l_calling_fn varchar2(80) := 'fa_xla_events_pvt.delete_deprn_event';
850:
857: l_deprn_source_info.source_id_int_2 := p_period_counter;
858: l_deprn_source_info.source_id_int_3 := p_deprn_run_id;
859: l_deprn_source_info.entity_type_code := 'DEPRECIATION';
860:
861: XLA_EVENTS_PUB_PKG.delete_event
862: (p_event_source_info => l_deprn_source_info,
863: p_event_id => p_event_id,
864: p_valuation_method => p_book_type_code,
865: p_security_context => l_security_context);
865: p_security_context => l_security_context);
866:
867: --6702657
868: BEGIN
869: l_result := XLA_EVENTS_PUB_PKG.delete_entity
870: (p_source_info => l_deprn_source_info,
871: p_valuation_method => p_book_type_code,
872: p_security_context => l_security_context);
873:
924: ,x_event_status OUT NOCOPY varchar2
925: ,p_log_level_rec in fa_api_types.log_level_rec_type default null
926: ) return boolean IS
927:
928: l_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
929: l_security_context XLA_EVENTS_PUB_PKG.t_security;
930:
931: l_calling_fn varchar2(80) := 'fa_xla_events_pvt.get_trx_event_status';
932:
925: ,p_log_level_rec in fa_api_types.log_level_rec_type default null
926: ) return boolean IS
927:
928: l_source_info XLA_EVENTS_PUB_PKG.t_event_source_info;
929: l_security_context XLA_EVENTS_PUB_PKG.t_security;
930:
931: l_calling_fn varchar2(80) := 'fa_xla_events_pvt.get_trx_event_status';
932:
933: BEGIN
943: ,p_log_level_rec => p_log_level_rec);
944: end if;
945:
946: -- check the event status
947: x_event_status := XLA_EVENTS_PUB_PKG.get_event_status
948: (p_event_source_info => l_source_info,
949: p_event_id => p_event_id,
950: p_valuation_method => p_book_type_code,
951: p_security_context => l_security_context);