[Home] [Help]
1: PACKAGE BODY xla_events_pkg AS
2: -- $Header: xlaevevt.pkb 120.112.12020000.2 2012/07/23 13:27:15 vgopiset ship $
3: /*===========================================================================+
4: | Copyright (c) 2001-2002 Oracle Corporation |
5: | Redwood Shores, CA, USA |
8: | FILENAME |
9: | xlaevevt.pkb |
10: | |
11: | PACKAGE NAME |
12: | xla_events_pkg |
13: | |
14: | DESCRIPTION |
15: | This is a XLA private package, which contains all the APIs |
16: | required for processing accounting events. |
279: C_LEVEL_UNEXPECTED CONSTANT NUMBER := FND_LOG.LEVEL_UNEXPECTED;
280:
281: C_LEVEL_LOG_DISABLED CONSTANT NUMBER := 99;
282:
283: C_DEFAULT_MODULE CONSTANT VARCHAR2(240) := 'xla.plsql.xla_events_pkg';
284:
285: g_debug_flag VARCHAR2(1):= NVL(fnd_profile.value('XLA_DEBUG_TRACE'),'N');
286:
287: --l_log_module VARCHAR2(240);
433: WHEN xla_exceptions_pkg.application_exception THEN
434: RAISE;
435: WHEN OTHERS THEN
436: xla_exceptions_pkg.raise_message
437: (p_location => 'xla_events_pkg.trace');
438: END trace;
439:
440: --=============================================================================
441: -- *********** public procedures and functions **********
662: ,p_msg_name => 'XLA_COMMON_ERROR'
663: ,p_token_1 => 'ERROR'
664: ,p_value_1 => 'For MANUAL events this API cannot be called'
665: ,p_token_2 => 'LOCATION'
666: ,p_value_2 => 'xla_events_pkg.get_array_event_info (fn)');
667: ELSE
668: g_context := C_REGULAR_EVENT_CONTEXT;
669: END IF;
670:
675: ,p_token_1 => 'ERROR'
676: ,p_value_1 =>
677: 'Event Type Code has an invalid value. It cannot have a NULL value.'
678: ,p_token_2 => 'LOCATION'
679: ,p_value_2 => 'xla_events_pkg.create_event');
680: END IF;
681: IF p_event_date IS NULL THEN
682: xla_exceptions_pkg.raise_message
683: (p_appli_s_name => 'XLA'
685: ,p_token_1 => 'ERROR'
686: ,p_value_1 =>
687: 'Event Date has an invalid value. It cannot have a NULL value.'
688: ,p_token_2 => 'LOCATION'
689: ,p_value_2 => 'xla_events_pkg.create_event');
690: END IF;
691: IF p_event_status_code IS NULL THEN
692: xla_exceptions_pkg.raise_message
693: (p_appli_s_name => 'XLA'
695: ,p_token_1 => 'ERROR'
696: ,p_value_1 =>
697: 'Event Status Code has an invalid value. It cannot have a NULL value.'
698: ,p_token_2 => 'LOCATION'
699: ,p_value_2 => 'xla_events_pkg.create_event');
700: END IF;
701:
702: ----------------------------------------------------------------------------
703: -- truncate date
744: ,p_token_1 => 'ERROR'
745: ,p_value_1 =>
746: 'The developer has to give the event number greater than 0 when create new event for gapless processing.'
747: ,p_token_2 => 'LOCATION'
748: ,p_value_2 => 'xla_events_pkg.create_event');
749: END IF;
750: ----------------------------------------------------------------------------
751: -- If the PK is NULL, create an entity as well as the event. Otherwise,
752: -- add a new event to the entity.
814: RAISE;
815: WHEN OTHERS THEN
816: ROLLBACK to SAVEPOINT before_event_creation;
817: xla_exceptions_pkg.raise_message
818: (p_location => 'xla_events_pkg.create_event (fn)');
819: END create_event;
820:
821:
822: --=============================================================================
993: ,p_msg_name => 'XLA_COMMON_ERROR'
994: ,p_token_1 => 'ERROR'
995: ,p_value_1 => 'For REGULAR events this API cannot be called'
996: ,p_token_2 => 'LOCATION'
997: ,p_value_2 => 'xla_events_pkg.get_array_event_info (fn)');
998: END IF;
999:
1000: ----------------------------------------------------------------------------
1001: -- perform specific validations for 'creating events'
1007: ,p_token_1 => 'ERROR'
1008: ,p_value_1 =>
1009: 'Event Type Code has an invalid value. It cannot have a NULL value.'
1010: ,p_token_2 => 'LOCATION'
1011: ,p_value_2 => 'xla_events_pkg.create_manual_event');
1012: END IF;
1013: IF p_event_date IS NULL THEN
1014: xla_exceptions_pkg.raise_message
1015: (p_appli_s_name => 'XLA'
1016: ,p_msg_name => 'XLA_COMMON_ERROR'
1017: ,p_token_1 => 'ERROR'
1018: ,p_value_1 => 'Event Date cannot have a NULL value.'
1019: ,p_token_2 => 'LOCATION'
1020: ,p_value_2 => 'xla_events_pkg.create_manual_event');
1021: END IF;
1022: IF p_event_status_code IS NULL THEN
1023: xla_exceptions_pkg.raise_message
1024: (p_appli_s_name => 'XLA'
1025: ,p_msg_name => 'XLA_COMMON_ERROR'
1026: ,p_token_1 => 'ERROR'
1027: ,p_value_1 => 'Event Status Code cannot have a NULL value.'
1028: ,p_token_2 => 'LOCATION'
1029: ,p_value_2 => 'xla_events_pkg.create_manual_event');
1030: END IF;
1031: IF p_process_status_code IS NULL THEN
1032: xla_exceptions_pkg.raise_message
1033: (p_appli_s_name => 'XLA'
1034: ,p_msg_name => 'XLA_COMMON_ERROR'
1035: ,p_token_1 => 'ERROR'
1036: ,p_value_1 => 'Process Status Code cannot have a NULL value.'
1037: ,p_token_2 => 'LOCATION'
1038: ,p_value_2 => 'xla_events_pkg.create_manual_event');
1039: END IF;
1040:
1041: ----------------------------------------------------------------------------
1042: -- truncate date
1133: RAISE;
1134: WHEN OTHERS THEN
1135: ROLLBACK to SAVEPOINT before_event_creation;
1136: xla_exceptions_pkg.raise_message
1137: (p_location => 'xla_events_pkg.create_manual_event (fn)');
1138: END create_manual_event;
1139:
1140:
1141:
1307: ,p_msg_name => 'XLA_COMMON_ERROR'
1308: ,p_token_1 => 'ERROR'
1309: ,p_value_1 => 'For MANUAL events this API cannot be called'
1310: ,p_token_2 => 'LOCATION'
1311: ,p_value_2 => 'xla_events_pkg.get_array_event_info (fn)');
1312: ELSE
1313: g_context := C_REGULAR_EVENT_CONTEXT;
1314: END IF;
1315:
1322: ,p_msg_name => 'XLA_COMMON_ERROR'
1323: ,p_token_1 => 'ERROR'
1324: ,p_value_1 => 'Event Status Code cannot have a NULL value.'
1325: ,p_token_2 => 'LOCATION'
1326: ,p_value_2 => 'xla_events_pkg.update_event_status');
1327: END IF;
1328:
1329: ----------------------------------------------------------------------------
1330: -- truncate date
1370: ,p_token_1 => 'ERROR'
1371: ,p_value_1 => 'No event exists for the document represented '||
1372: 'by the given source information.'
1373: ,p_token_2 => 'LOCATION'
1374: ,p_value_2 => 'xla_events_pkg.update_event_status');
1375: END IF;
1376:
1377: ----------------------------------------------------------------------------
1378: -- Fetching event ids for the events that are going to be updated
1549: RAISE;
1550: WHEN OTHERS THEN
1551: ROLLBACK to SAVEPOINT before_event_update;
1552: xla_exceptions_pkg.raise_message
1553: (p_location => 'xla_events_pkg.update_event_status');
1554: END update_event_status;
1555:
1556:
1557: --=============================================================================
1741: ,p_msg_name => 'XLA_COMMON_ERROR'
1742: ,p_token_1 => 'ERROR'
1743: ,p_value_1 => 'For MANUAL events this API cannot be called'
1744: ,p_token_2 => 'LOCATION'
1745: ,p_value_2 => 'xla_events_pkg.update_event');
1746: ELSE
1747: g_context := C_REGULAR_EVENT_CONTEXT;
1748: END IF;
1749:
1756: ,p_msg_name => 'XLA_COMMON_ERROR'
1757: ,p_token_1 => 'ERROR'
1758: ,p_value_1 => 'Event ID cannot have a NULL value.'
1759: ,p_token_2 => 'LOCATION'
1760: ,p_value_2 => 'xla_events_pkg.update_event');
1761: END IF;
1762:
1763:
1764: IF p_event_status_code IS NOT NULL THEN
1816: ,p_token_1 => 'ERROR'
1817: ,p_value_1 => 'No event exists for the document represented '||
1818: 'by the given source information.'
1819: ,p_token_2 => 'LOCATION'
1820: ,p_value_2 => 'xla_events_pkg.update_event');
1821: END IF;
1822:
1823: if(g_gapless_flag='Y' and
1824: (p_overwrite_event_num=C_YES and
1829: ,p_token_1 => 'ERROR'
1830: ,p_value_1 =>
1831: 'The developer has to give the event number when change event number for gapless processing.'
1832: ,p_token_2 => 'LOCATION'
1833: ,p_value_2 => 'xla_events_pkg.update_event');
1834:
1835: end if;
1836: ----------------------------------------------------------------------------
1837: -- Following statement make sure that when event type and/or event date
1888: ,p_value_1 =>
1889: 'Unable to perform UPDATE on the event. The event ('||p_event_id ||
1890: ') is either invalid or has been final accounted.'
1891: ,p_token_2 => 'LOCATION'
1892: ,p_value_2 => 'xla_events_pkg.update_event');
1893: END;
1894: END IF;
1895: ----------------------------------------------------------------------------
1896: -- Actual update
1948: ,p_value_1 =>
1949: 'Unable to perform UPDATE on the event. The event ('||p_event_id ||
1950: ') is either invalid or has been final accounted.'
1951: ,p_token_2 => 'LOCATION'
1952: ,p_value_2 => 'xla_events_pkg.update_event');
1953: END IF;
1954:
1955: if(g_gapless_flag='Y' and
1956: ((p_overwrite_event_num=C_YES
2103: RAISE;
2104: WHEN OTHERS THEN
2105: ROLLBACK to SAVEPOINT before_event_update;
2106: xla_exceptions_pkg.raise_message
2107: (p_location => 'xla_events_pkg.update_event');
2108: END update_event;
2109:
2110:
2111: --=============================================================================
2290: ,p_msg_name => 'XLA_COMMON_ERROR'
2291: ,p_token_1 => 'ERROR'
2292: ,p_value_1 => 'For REGULAR events this API cannot be called'
2293: ,p_token_2 => 'LOCATION'
2294: ,p_value_2 => 'xla_events_pkg.update_manual_event');
2295: END IF;
2296:
2297: ----------------------------------------------------------------------------
2298: -- perfrom validations specific to 'updating event'
2303: ,p_msg_name => 'XLA_COMMON_ERROR'
2304: ,p_token_1 => 'ERROR'
2305: ,p_value_1 => 'Event ID cannot have a NULL value.'
2306: ,p_token_2 => 'LOCATION'
2307: ,p_value_2 => 'xla_events_pkg.update_manual_event');
2308: END IF;
2309:
2310: ----------------------------------------------------------------------------
2311: -- validate to make sure that both p_event_status_code and
2321: ,p_value_1 => 'Inconsistent values for event statuses: '||
2322: 'p_event_status_code = '||p_event_status_code||
2323: 'p_process_status_code = '||p_process_status_code
2324: ,p_token_2 => 'LOCATION'
2325: ,p_value_2 => 'xla_events_pkg.update_manual_event');
2326: END IF;
2327:
2328: ----------------------------------------------------------------------------
2329: -- truncate date
2364: ,p_token_1 => 'ERROR'
2365: ,p_value_1 => 'No event exists for the document represented '||
2366: 'by the given source information.'
2367: ,p_token_2 => 'LOCATION'
2368: ,p_value_2 => 'xla_events_pkg.update_manual_event');
2369: END IF;
2370:
2371: ----------------------------------------------------------------------------
2372: -- Actual status update
2432: ,p_value_1 =>
2433: 'Unable to perform UPDATE on the event. The event ('||p_event_id ||
2434: ') is invalid'
2435: ,p_token_2 => 'LOCATION'
2436: ,p_value_2 => 'xla_events_pkg.update_manual_event');
2437: END IF;
2438:
2439: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
2440: trace
2449: RAISE;
2450: WHEN OTHERS THEN
2451: ROLLBACK to SAVEPOINT before_event_update;
2452: xla_exceptions_pkg.raise_message
2453: (p_location => 'xla_events_pkg.update_manual_event');
2454: END update_manual_event;
2455:
2456:
2457: --=============================================================================
2615: ,p_msg_name => 'XLA_COMMON_ERROR'
2616: ,p_token_1 => 'ERROR'
2617: ,p_value_1 => 'Event ID cannot have a NULL value.'
2618: ,p_token_2 => 'LOCATION'
2619: ,p_value_2 => 'xla_events_pkg.delete_event');
2620: END IF;
2621:
2622: ----------------------------------------------------------------------------
2623: -- Validate parameters
2650: ,p_token_1 => 'ERROR'
2651: ,p_value_1 => 'No event exists for the document represented '||
2652: 'by the given source information.'
2653: ,p_token_2 => 'LOCATION'
2654: ,p_value_2 => 'xla_events_pkg.delete_event');
2655: END IF;
2656:
2657: ----------------------------------------------------------------------------
2658: -- Call routine to delete errors/JEs related to the event bug # 2701681
2679: ,p_value_1 =>
2680: 'Unable to perform DELETE on the event. The event ('|| p_event_id ||
2681: ') is either invalid or has been final accounted.'
2682: ,p_token_2 => 'LOCATION'
2683: ,p_value_2 => 'xla_events_pkg.delete_event');
2684: end;
2685: end if;
2686:
2687: ----------------------------------------------------------------------------
2711: ,p_value_1 =>
2712: 'Unable to perform DELETE on the event. The event ('|| p_event_id ||
2713: ') is either invalid or has been final accounted.'
2714: ,p_token_2 => 'LOCATION'
2715: ,p_value_2 => 'xla_events_pkg.delete_event');
2716:
2717: ELSIF g_context = C_MANUAL_EVENT_CONTEXT THEN
2718: --------------------------------------------------------------------------
2719: -- this if condition is added to make sure that the entity row is
2763: RAISE;
2764: WHEN OTHERS THEN
2765: ROLLBACK to SAVEPOINT before_event_delete;
2766: xla_exceptions_pkg.raise_message
2767: (p_location => 'xla_events_pkg.delete_event');
2768: END delete_event;
2769:
2770:
2771: --=============================================================================
2892: ,p_level => C_LEVEL_PROCEDURE
2893: ,p_module =>l_log_module);
2894: END IF;
2895:
2896: trace('> xla_events_pkg.delete_processed_event' , 20);
2897:
2898: SAVEPOINT before_event_delete;
2899: g_action := C_EVENT_DELETE;
2900:
2915: ,p_msg_name => 'XLA_COMMON_ERROR'
2916: ,p_token_1 => 'ERROR'
2917: ,p_value_1 => 'For REGULAR events this API cannot be called'
2918: ,p_token_2 => 'LOCATION'
2919: ,p_value_2 => 'xla_events_pkg.delete_processed_event');
2920: END IF;
2921:
2922: ----------------------------------------------------------------------------
2923: -- perform validations specific to 'deleting event'
2928: ,p_msg_name => 'XLA_COMMON_ERROR'
2929: ,p_token_1 => 'ERROR'
2930: ,p_value_1 => 'Event ID cannot have a NULL value.'
2931: ,p_token_2 => 'LOCATION'
2932: ,p_value_2 => 'xla_events_pkg.delete_processed_event');
2933: END IF;
2934:
2935: ----------------------------------------------------------------------------
2936: -- Validate parameters
2963: ,p_token_1 => 'ERROR'
2964: ,p_value_1 => 'No event exists for the document represented '||
2965: 'by the given source information.'
2966: ,p_token_2 => 'LOCATION'
2967: ,p_value_2 => 'xla_events_pkg.delete_processed_event');
2968: END IF;
2969:
2970: ----------------------------------------------------------------------------
2971: -- Call routine to delete errors/JEs related to the event bug # 2701681
3001: ,p_value_1 =>
3002: 'Unable to perform DELETE on the event. The event ('|| p_event_id ||
3003: ') is either invalid or has not been final accounted.'
3004: ,p_token_2 => 'LOCATION'
3005: ,p_value_2 => 'xla_events_pkg.delete_processed_event');
3006: ELSE
3007: -------------------------------------------------------------------------
3008: -- following will delete the row from entities if there is no
3009: -- event exists for the entity
3040: RAISE;
3041: WHEN OTHERS THEN
3042: ROLLBACK to SAVEPOINT before_event_delete;
3043: xla_exceptions_pkg.raise_message
3044: (p_location => 'xla_events_pkg.delete_processed_event');
3045: END delete_processed_event;
3046:
3047:
3048: --=============================================================================
3206: ,p_msg_name => 'XLA_COMMON_ERROR'
3207: ,p_token_1 => 'ERROR'
3208: ,p_value_1 => 'For MANUAL events this API cannot be called'
3209: ,p_token_2 => 'LOCATION'
3210: ,p_value_2 => 'xla_events_pkg.delete_events');
3211: ELSE
3212: g_context := C_REGULAR_EVENT_CONTEXT;
3213: END IF;
3214:
3250: ,p_token_1 => 'ERROR'
3251: ,p_value_1 => 'No event exists for the document represented '||
3252: 'by the given source information.'
3253: ,p_token_2 => 'LOCATION'
3254: ,p_value_2 => 'xla_events_pkg.delete_events (fn)');
3255: END IF;
3256:
3257: ----------------------------------------------------------------------------
3258: -- Fetching event ids for the events that are going to be deleted
3356: RAISE;
3357: WHEN OTHERS THEN
3358: ROLLBACK to SAVEPOINT before_event_delete;
3359: xla_exceptions_pkg.raise_message
3360: (p_location => 'xla_events_pkg.delete_events (fn)');
3361: END delete_events;
3362:
3363:
3364: --============================================================================
3544: ,p_token_1 => 'ERROR'
3545: ,p_value_1 =>
3546: 'Unable to perform DELETE on the entity. The entity does not exist'
3547: ,p_token_2 => 'LOCATION'
3548: ,p_value_2 => 'xla_events_pkg.delete_entity');
3549: END;
3550:
3551: OPEN c_existing_events;
3552: FETCH c_existing_events into l_temp;
3595: RAISE;
3596: WHEN OTHERS THEN
3597: ROLLBACK to SAVEPOINT before_entity_delete;
3598: xla_exceptions_pkg.raise_message
3599: (p_location => 'xla_events_pkg.delete_entity');
3600: END delete_entity;
3601:
3602: --=============================================================================
3603: --
3608:
3609: PROCEDURE purge_entity
3610: (p_event_source_info IN xla_events_pub_pkg.t_event_source_info) IS
3611: BEGIN
3612: trace('> xla_events_pkg.delete_entity' , 20);
3613:
3614: SAVEPOINT before_entity_delete;
3615: g_action := C_EVENT_DELETE;
3616:
3644: ,p_token_1 => 'ERROR'
3645: ,p_value_1 =>
3646: 'No event exists for the document represented by the given source information.'
3647: ,p_token_2 => 'LOCATION'
3648: ,p_value_2 => 'xla_events_pkg.delete_entity');
3649: END IF;
3650:
3651: trace('< xla_events_pkg.delete_entity' , 20);
3652: EXCEPTION
3647: ,p_token_2 => 'LOCATION'
3648: ,p_value_2 => 'xla_events_pkg.delete_entity');
3649: END IF;
3650:
3651: trace('< xla_events_pkg.delete_entity' , 20);
3652: EXCEPTION
3653: WHEN xla_exceptions_pkg.application_exception THEN
3654: ROLLBACK to SAVEPOINT before_entity_delete;
3655: RAISE;
3655: RAISE;
3656: WHEN OTHERS THEN
3657: ROLLBACK to SAVEPOINT before_entity_delete;
3658: xla_exceptions_pkg.raise_message
3659: (p_location => 'xla_events_pkg.delete_entity');
3660: END purge_entity;
3661:
3662:
3663: --=============================================================================
3821: ,p_token_1 => 'ERROR'
3822: ,p_value_1 =>
3823: 'Event ID has an invalid value. It cannot have a NULL value.'
3824: ,p_token_2 => 'LOCATION'
3825: ,p_value_2 => 'xla_events_pkg.get_event_info');
3826: END IF;
3827:
3828: ----------------------------------------------------------------------------
3829: -- Validate parameters
3856: ,p_token_1 => 'ERROR'
3857: ,p_value_1 => 'No event exists for the document represented '||
3858: 'by the given source information.'
3859: ,p_token_2 => 'LOCATION'
3860: ,p_value_2 => 'xla_events_pkg.get_event_info');
3861: END IF;
3862:
3863: SELECT event_id
3864: ,event_number
3917: ,p_msg_name => 'XLA_COMMON_ERROR'
3918: ,p_token_1 => 'ERROR'
3919: ,p_value_1 => 'The event id '||p_event_id||' does not exist'
3920: ,p_token_2 => 'LOCATION'
3921: ,p_value_2 => 'xla_events_pkg.get_event_info');
3922: WHEN xla_exceptions_pkg.application_exception THEN
3923: RAISE;
3924: WHEN OTHERS THEN
3925: xla_exceptions_pkg.raise_message
3922: WHEN xla_exceptions_pkg.application_exception THEN
3923: RAISE;
3924: WHEN OTHERS THEN
3925: xla_exceptions_pkg.raise_message
3926: (p_location => 'xla_events_pkg.get_event_info (fn)');
3927: END get_event_info;
3928:
3929:
3930: --=============================================================================
4079: WHEN xla_exceptions_pkg.application_exception THEN
4080: RAISE;
4081: WHEN OTHERS THEN
4082: xla_exceptions_pkg.raise_message
4083: (p_location => 'xla_events_pkg.get_event_status (fn)');
4084: END get_event_status ;
4085:
4086:
4087: --=============================================================================
4291: ,p_msg_name => 'XLA_COMMON_ERROR'
4292: ,p_token_1 => 'ERROR'
4293: ,p_value_1 => 'For MANUAL events event_id cannot be NULL'
4294: ,p_token_2 => 'LOCATION'
4295: ,p_value_2 => 'xla_events_pkg.event_exists');
4296: END IF;
4297: g_context := C_MANUAL_EVENT_CONTEXT;
4298: ELSE
4299: g_context := C_REGULAR_EVENT_CONTEXT;
4353: ,p_token_1 => 'ERROR'
4354: ,p_value_1 => 'No event exists for the document represented '||
4355: 'by the given source information.'
4356: ,p_token_2 => 'LOCATION'
4357: ,p_value_2 => 'xla_events_pkg.event_exists (fn)');
4358: */
4359: END IF;
4360:
4361:
4569: IF event_status_cur%ISOPEN THEN
4570: CLOSE event_status_cur; -- bug 13698935
4571: END IF;
4572: xla_exceptions_pkg.raise_message
4573: (p_location => 'xla_events_pkg.event_exists (fn)');
4574: END event_exists;
4575:
4576:
4577: --=============================================================================
4725: ,p_msg_name => 'XLA_COMMON_ERROR'
4726: ,p_token_1 => 'ERROR'
4727: ,p_value_1 => 'For MANUAL events event_id cannot be NULL'
4728: ,p_token_2 => 'LOCATION'
4729: ,p_value_2 => 'xla_events_pkg.update_transaction_number');
4730: END IF;
4731: g_context := C_MANUAL_EVENT_CONTEXT;
4732: ELSE
4733: g_context := C_REGULAR_EVENT_CONTEXT;
4766: ,p_token_1 => 'ERROR'
4767: ,p_value_1 => 'No event exists for the document represented '||
4768: 'by the given source information.'
4769: ,p_token_2 => 'LOCATION'
4770: ,p_value_2 => 'xla_events_pkg.update_transaction_number');
4771: END IF;
4772:
4773: update_entity_trx_number
4774: (p_transaction_number => p_transaction_number);
4784: WHEN xla_exceptions_pkg.application_exception THEN
4785: RAISE;
4786: WHEN OTHERS THEN
4787: xla_exceptions_pkg.raise_message
4788: (p_location => 'xla_events_pkg.update_transaction_number');
4789: END update_transaction_number;
4790:
4791: --============================================================================
4792: --
4951: ,p_token_1 => 'ERROR'
4952: ,p_value_1 => 'No event exists for the document represented '||
4953: 'by the given source information.'
4954: ,p_token_2 => 'LOCATION'
4955: ,p_value_2 => 'xla_events_pkg.allow_third_party_update');
4956: END IF;
4957:
4958: SELECT count(1)
4959: INTO l_count
5000: WHEN xla_exceptions_pkg.application_exception THEN
5001: RAISE;
5002: WHEN OTHERS THEN
5003: xla_exceptions_pkg.raise_message
5004: (p_location => 'xla_events_pkg.allow_third_party_update');
5005: END allow_third_party_update;
5006:
5007:
5008: --=============================================================================
5152: ,p_msg_name => 'XLA_COMMON_ERROR'
5153: ,p_token_1 => 'ERROR'
5154: ,p_value_1 => 'For MANUAL events event_id cannot be NULL'
5155: ,p_token_2 => 'LOCATION'
5156: ,p_value_2 => 'xla_events_pkg.get_entity_id');
5157: END IF;
5158: g_context := C_MANUAL_EVENT_CONTEXT;
5159: ELSE
5160: g_context := C_REGULAR_EVENT_CONTEXT;
5191: ,p_token_1 => 'ERROR'
5192: ,p_value_1 => 'No event exists for the document represented '||
5193: 'by the given source information.'
5194: ,p_token_2 => 'LOCATION'
5195: ,p_value_2 => 'xla_events_pkg.get_entity_id');
5196: END IF;
5197:
5198: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
5199: trace
5211: WHEN xla_exceptions_pkg.application_exception THEN
5212: RAISE;
5213: WHEN OTHERS THEN
5214: xla_exceptions_pkg.raise_message
5215: (p_location => 'xla_events_pkg.get_entity_id');
5216: END get_entity_id;
5217:
5218:
5219: --=============================================================================
5414: ,p_msg_name => 'XLA_COMMON_ERROR'
5415: ,p_token_1 => 'ERROR'
5416: ,p_value_1 => 'For MANUAL events this API cannot be called'
5417: ,p_token_2 => 'LOCATION'
5418: ,p_value_2 => 'xla_events_pkg.get_array_event_info (fn)');
5419: ELSE
5420: g_context := C_REGULAR_EVENT_CONTEXT;
5421: END IF;
5422:
5472: ,p_token_1 => 'ERROR'
5473: ,p_value_1 =>
5474: 'Event Number must be a number greater than 0 for entities that are subject to gapless processing'
5475: ,p_token_2 => 'LOCATION'
5476: ,p_value_2 => 'xla_events_pkg.create_bulk_events');
5477: return;
5478: end if;
5479: close csr_xla_event_number;
5480: end if;
5521: ,p_token_1 => 'ERROR'
5522: ,p_value_1 =>
5523: 'The parameters passed to the procedure do not match with the data in the xla_events_int_gt table'
5524: ,p_token_2 => 'LOCATION'
5525: ,p_value_2 => 'xla_events_pkg.create_bulk_events');
5526: return;
5527: end if;
5528: close csr_parameter_mismatch;
5529:
5536: ,p_msg_name => 'XLA_COMMON_ERROR'
5537: ,p_token_1 => 'ERROR'
5538: ,p_value_1 => 'Event status must be I, U or N'
5539: ,p_token_2 => 'LOCATION'
5540: ,p_value_2 => 'xla_events_pkg.create_bulk_events');
5541: return;
5542: end if;
5543: close csr_status_error;
5544:
5551: ,p_msg_name => 'XLA_COMMON_ERROR'
5552: ,p_token_1 => 'ERROR'
5553: ,p_value_1 => 'Event type must be a valid event type'
5554: ,p_token_2 => 'LOCATION'
5555: ,p_value_2 => 'xla_events_pkg.create_bulk_events');
5556: return;
5557: end if;
5558: close csr_event_type_error;
5559:
5563: ,p_token_1 => 'ERROR'
5564: ,p_value_1 =>
5565: 'Please check transaction ids in gt table. Mapped ids must have a not-null value, while unmapped ids cannot have value'
5566: ,p_token_2 => 'LOCATION'
5567: ,p_value_2 => 'xla_events_pkg.create_bulk_events');
5568: EXCEPTION
5569: WHEN others then
5570: --exception means the data is good
5571: null;
5937: RAISE;
5938: WHEN OTHERS THEN
5939: ROLLBACK to SAVEPOINT before_event_creation;
5940: xla_exceptions_pkg.raise_message
5941: (p_location => 'xla_events_pkg.create_bulk_events(blk)');
5942: END create_bulk_events;
5943:
5944: --==================================================================
5945: --
6018: WHEN xla_exceptions_pkg.application_exception THEN
6019: RAISE;
6020: WHEN OTHERS THEN
6021: xla_exceptions_pkg.raise_message
6022: (p_location => 'xla_events_pkg.create_bulk_events(blk)');
6023: END create_bulk_events;
6024:
6025:
6026:
6189: ,p_token_1 => 'ERROR'
6190: ,p_value_1 =>
6191: 'The parameter application_id does not match with the data in xla_events_int_gt table'
6192: ,p_token_2 => 'LOCATION'
6193: ,p_value_2 => 'xla_events_pkg.update_bulk_event_statuses(fn)');
6194: end if;
6195: close csr_invalid_app;
6196:
6197: open csr_invalid_event_id(p_application_id);
6203: ,p_msg_name => 'XLA_COMMON_ERROR'
6204: ,p_token_1 => 'ERROR'
6205: ,p_value_1 => '(Application id, Event ID) is not valid'
6206: ,p_token_2 => 'LOCATION'
6207: ,p_value_2 => 'xla_events_pkg.update_bulk_event_statuses(fn)');
6208: end if;
6209: close csr_invalid_event_id;
6210:
6211: open csr_invalid_event_status(p_application_id);
6218: ,p_token_1 => 'ERROR'
6219: ,p_value_1 =>
6220: 'Both the new and the old event status must be valid and cannot be P'
6221: ,p_token_2 => 'LOCATION'
6222: ,p_value_2 => 'xla_events_pkg.update_bulk_event_statuses(fn)');
6223: end if;
6224: close csr_invalid_event_status;
6225:
6226: -- If reach here, must be entity code error
6230: ,p_token_1 => 'ERROR'
6231: ,p_value_1 =>
6232: 'The entity_code is not valid. Either it does not match with the event id, or it is MANUAL entity. This API cannot be called for MANUAL entity'
6233: ,p_token_2 => 'LOCATION'
6234: ,p_value_2 => 'xla_events_pkg.update_bulk_event_statuses(fn)');
6235: end if;
6236: close csr_manual_processed_events;
6237:
6238:
6379: ,p_token_1 => 'ERROR'
6380: ,p_value_1 =>
6381: 'Error in the routine that does balance reversals'
6382: ,p_token_2 => 'LOCATION'
6383: ,p_value_2 => 'xla_events_pkg.update_bulk_event_statuses');
6384: END IF;
6385: */
6386: IF (C_LEVEL_STATEMENT>= g_log_level) THEN
6387: trace
6404: RAISE;
6405: WHEN OTHERS THEN
6406: ROLLBACK to SAVEPOINT before_update_bulk_statuses;
6407: xla_exceptions_pkg.raise_message
6408: (p_location => 'xla_events_pkg.update_bulk_event_statuses(blk)');
6409: END update_bulk_event_statuses;
6410:
6411:
6412: --==================================================================
6435: RAISE;
6436: WHEN OTHERS THEN
6437: ROLLBACK to SAVEPOINT before_update_bulk_statuses;
6438: xla_exceptions_pkg.raise_message
6439: (p_location => 'xla_events_pkg.update_bulk_event_statuses(blk)');
6440: END update_bulk_event_statuses;
6441:
6442:
6443:
6571: ,p_token_1 => 'ERROR'
6572: ,p_value_1 =>
6573: 'The parameter application_id does not match with the data in xla_events_int_gt table'
6574: ,p_token_2 => 'LOCATION'
6575: ,p_value_2 => 'xla_events_pkg.update_bulk_event_statuses(fn)');
6576: end if;
6577: close csr_invalid_app;
6578:
6579: open csr_invalid_event_id(p_application_id);
6585: ,p_msg_name => 'XLA_COMMON_ERROR'
6586: ,p_token_1 => 'ERROR'
6587: ,p_value_1 => '(Application id, Event ID) is not valid'
6588: ,p_token_2 => 'LOCATION'
6589: ,p_value_2 => 'xla_events_pkg.update_bulk_event_statuses(fn)');
6590: end if;
6591: close csr_invalid_event_id;
6592:
6593: open csr_invalid_event_status(p_application_id);
6600: ,p_token_1 => 'ERROR'
6601: ,p_value_1 =>
6602: 'The events to be deleted must be in status I, N or U'
6603: ,p_token_2 => 'LOCATION'
6604: ,p_value_2 => 'xla_events_pkg.update_bulk_event_statuses(fn)');
6605: end if;
6606: close csr_invalid_event_status;
6607:
6608: -- if reach here, it must be entity code problem
6612: ,p_token_1 => 'ERROR'
6613: ,p_value_1 =>
6614: 'Either the entity code does not match with the event id, or the entity code is MANUAL. This API cannot be called to delete event for MANUAL entity'
6615: ,p_token_2 => 'LOCATION'
6616: ,p_value_2 => 'xla_events_pkg.get_array_event_info (fn)');
6617: end if;
6618: close csr_manual_processed_events;
6619:
6620: ----------------------------------------------------------------------------
6655: ,p_token_1 => 'ERROR'
6656: ,p_value_1 =>
6657: 'Error in the routine that does balance reversals'
6658: ,p_token_2 => 'LOCATION'
6659: ,p_value_2 => 'xla_events_pkg.delete_bulk_events');
6660: END IF;
6661: */
6662:
6663: IF (C_LEVEL_STATEMENT>= g_log_level) THEN
6750: RAISE;
6751: WHEN OTHERS THEN
6752: ROLLBACK to SAVEPOINT before_delete_bulk_events;--Bug 10162587
6753: xla_exceptions_pkg.raise_message
6754: (p_location => 'xla_events_pkg.delete_bulk_events(blk)');
6755: END delete_bulk_events;
6756:
6757: --=============================================================================
6758: --
6947: ,p_msg_name => 'XLA_COMMON_ERROR'
6948: ,p_token_1 => 'ERROR'
6949: ,p_value_1 => 'For MANUAL events this API cannot be called'
6950: ,p_token_2 => 'LOCATION'
6951: ,p_value_2 => 'xla_events_pkg.get_array_event_info (fn)');
6952: ELSE
6953: g_context := C_REGULAR_EVENT_CONTEXT;
6954: END IF;
6955:
6992: ,p_token_1 => 'ERROR'
6993: ,p_value_1 => 'No event exists for the document represented '||
6994: 'by the given source information.'
6995: ,p_token_2 => 'LOCATION'
6996: ,p_value_2 => 'xla_events_pkg.get_array_event_info (fn)');
6997: END IF;
6998:
6999: FOR lc_evt IN c1 LOOP
7000: l_count := l_count + 1;
7035: WHEN xla_exceptions_pkg.application_exception THEN
7036: RAISE;
7037: WHEN OTHERS THEN
7038: xla_exceptions_pkg.raise_message
7039: (p_location => 'xla_events_pkg.get_array_event_info (fn)');
7040: END get_array_event_info;
7041:
7042:
7043: --=============================================================================
7117: WHEN xla_exceptions_pkg.application_exception THEN
7118: RAISE;
7119: WHEN OTHERS THEN
7120: xla_exceptions_pkg.raise_message
7121: (p_location => 'xla_events_pkg.initialize');
7122: END initialize;
7123:
7124:
7125: --=============================================================================
7254: WHEN xla_exceptions_pkg.application_exception THEN
7255: RAISE;
7256: WHEN OTHERS THEN
7257: xla_exceptions_pkg.raise_message
7258: (p_location => 'xla_events_pkg.source_info_changed');
7259: END;
7260:
7261:
7262: --=============================================================================
7288: ,p_token_1 => 'ERROR'
7289: ,p_value_1 =>
7290: 'Application ID has an invalid value. It cannot have a NULL value.'
7291: ,p_token_2 => 'LOCATION'
7292: ,p_value_2 => 'xla_events_pkg.validate_context');
7293: END IF;
7294:
7295: IF p_ledger_id IS NULL THEN
7296: xla_exceptions_pkg.raise_message
7299: ,p_token_1 => 'ERROR'
7300: ,p_value_1 =>
7301: 'Ledger ID has an invalid value. It cannot have a NULL value.'
7302: ,p_token_2 => 'LOCATION'
7303: ,p_value_2 => 'xla_events_pkg.validate_context');
7304: ELSE
7305: -------------------------------------------------------------------------
7306: -- Validate ledger
7307: -------------------------------------------------------------------------
7318: ,p_token_1 => 'ERROR'
7319: ,p_value_1 =>
7320: 'Entity Type Code has an invalid value. It cannot have a NULL value.'
7321: ,p_token_2 => 'LOCATION'
7322: ,p_value_2 => 'xla_events_pkg.validate_context');
7323: END IF;
7324: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
7325: trace
7326: (p_msg => 'end of procedure validate_context'
7332: WHEN xla_exceptions_pkg.application_exception THEN
7333: RAISE;
7334: WHEN OTHERS THEN
7335: xla_exceptions_pkg.raise_message
7336: (p_location => 'xla_events_pkg.validate_context');
7337: END validate_context;
7338:
7339:
7340: --=============================================================================
7417: ,p_token_1 => 'ERROR'
7418: ,p_value_1 => 'The setup for Entity Type, '||
7419: p_entity_type_code ||', is incorrect. Internal Error.'
7420: ,p_token_2 => 'LOCATION'
7421: ,p_value_2 => 'xla_events_pkg.get_id_mapping');
7422: END IF;
7423:
7424: IF p_source_id_code_1 = 'SOURCE_ID_INT_1'
7425: OR p_source_id_code_2 = 'SOURCE_ID_INT_1'
7503: WHEN xla_exceptions_pkg.application_exception THEN
7504: RAISE;
7505: WHEN OTHERS THEN
7506: xla_exceptions_pkg.raise_message
7507: (p_location => 'xla_events_pkg.get_id_mapping');
7508: END;
7509:
7510:
7511: --=============================================================================
7762: ,p_value_1 =>
7763: 'The source information passed does not map to the setups for Entity Type '
7764: || p_entity_type_code
7765: ,p_token_2 => 'LOCATION'
7766: ,p_value_2 => 'xla_events_pkg.validate_ids');
7767: END IF;
7768:
7769: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
7770: trace
7801: ,p_token_1 => 'ERROR'
7802: ,p_value_1 =>
7803: 'The application is not registerd with subledger accounting architectre'
7804: ,p_token_2 => 'LOCATION'
7805: ,p_value_2 => 'xla_events_pkg.validate_cached_setup');
7806: END IF;
7807:
7808: --
7809: -- Validate that the entity type code tables have been loaded
7816: ,p_value_1 =>
7817: 'There is no Entity Type Code defined for the application '
7818: ||g_application_id
7819: ,p_token_2 => 'LOCATION'
7820: ,p_value_2 => 'xla_events_pkg.validate_cached_setup');
7821: END IF;
7822:
7823: --
7824: -- Validate that the event class tables have been loaded
7831: ,p_value_1 =>
7832: 'There is no Event Class defined for the application '
7833: ||g_application_id
7834: ,p_token_2 => 'LOCATION'
7835: ,p_value_2 => 'xla_events_pkg.validate_cached_setup');
7836: END IF;
7837:
7838: --
7839: -- Validate that the event type code tables have been loaded
7846: ,p_value_1 =>
7847: 'There is no Event Type Code defined for the application '
7848: ||g_application_id
7849: ,p_token_2 => 'LOCATION'
7850: ,p_value_2 => 'xla_events_pkg.validate_cached_setup');
7851: END IF;
7852:
7853: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
7854: trace
7913: ,p_level => C_LEVEL_PROCEDURE
7914: ,p_module =>l_log_module);
7915: END IF;
7916:
7917: trace('> xla_events_pkg.cache_application_setup' , 20);
7918:
7919: g_application_id := null;
7920: g_entity_type_code_tbl.delete; --clear cache first
7921: g_event_class_code_tbl.delete; --clear cache first
7979: WHEN xla_exceptions_pkg.application_exception THEN
7980: RAISE;
7981: WHEN OTHERS THEN
7982: xla_exceptions_pkg.raise_message
7983: (p_location => 'xla_events_pkg.cache_application_setup');
7984: END cache_application_setup;
7985:
7986:
7987: --=============================================================================
8022: ,p_token_1 => 'ERROR'
8023: ,p_value_1 =>
8024: 'The entity Type is not enabled. Disabled entity types are not allowed for create/update APIs.'
8025: ,p_token_2 => 'LOCATION'
8026: ,p_value_2 => 'xla_events_pkg.validate_entity_type_code');
8027: END IF;
8028:
8029: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
8030: trace
8041: ,p_token_1 => 'ERROR'
8042: ,p_value_1 => p_entity_type_code||
8043: ' is not a defined entity type for the application '||g_application_id
8044: ,p_token_2 => 'LOCATION'
8045: ,p_value_2 => 'xla_events_pkg.validate_entity_type_code');
8046: WHEN xla_exceptions_pkg.application_exception THEN
8047: RAISE;
8048: WHEN OTHERS THEN
8049: xla_exceptions_pkg.raise_message
8046: WHEN xla_exceptions_pkg.application_exception THEN
8047: RAISE;
8048: WHEN OTHERS THEN
8049: xla_exceptions_pkg.raise_message
8050: (p_location => 'xla_events_pkg.validate_entity_type_code');
8051: END validate_entity_type_code;
8052:
8053:
8054: --=============================================================================
8088: ,p_token_1 => 'ERROR'
8089: ,p_value_1 =>
8090: 'The Event Class is not enabled. Disabled event classes are not allowed for create/update APIs.'
8091: ,p_token_2 => 'LOCATION'
8092: ,p_value_2 => 'xla_events_pkg.validate_event_class_code');
8093: END IF;
8094:
8095: IF p_entity_type_code <> l_entity_code THEN
8096: xla_exceptions_pkg.raise_message
8100: ,p_value_1 => 'Event class '||p_event_class_code||
8101: ' is not defined for the entity type '||p_entity_type_code||
8102: ' and application '||g_application_id
8103: ,p_token_2 => 'LOCATION'
8104: ,p_value_2 => 'xla_events_pkg.validate_event_class_code');
8105: END IF;
8106:
8107: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
8108: trace
8118: ,p_token_1 => 'ERROR'
8119: ,p_value_1 => p_event_class_code||
8120: ' is not a defined event class for the application '||g_application_id
8121: ,p_token_2 => 'LOCATION'
8122: ,p_value_2 => 'xla_events_pkg.validate_event_class_code');
8123: WHEN xla_exceptions_pkg.application_exception THEN
8124: RAISE;
8125: WHEN OTHERS THEN
8126: xla_exceptions_pkg.raise_message
8123: WHEN xla_exceptions_pkg.application_exception THEN
8124: RAISE;
8125: WHEN OTHERS THEN
8126: xla_exceptions_pkg.raise_message
8127: (p_location => 'xla_events_pkg.validate_event_class_code');
8128: END validate_event_class_code;
8129:
8130:
8131: --=============================================================================
8169: ,p_token_1 => 'ERROR'
8170: ,p_value_1 =>
8171: 'The Event Type is not enabled. Disabled event types are not allowed for create/update APIs.'
8172: ,p_token_2 => 'LOCATION'
8173: ,p_value_2 => 'xla_events_pkg.validate_event_type_code');
8174: END IF;
8175:
8176: IF ((p_entity_type_code <> l_entity_code) OR
8177: (NVL(p_event_class_code,l_event_class_code) <> l_event_class_code)
8185: ' is not defined for the entity type '||p_entity_type_code||
8186: ', event class '||p_event_class_code||
8187: ' and application '||g_application_id
8188: ,p_token_2 => 'LOCATION'
8189: ,p_value_2 => 'xla_events_pkg.validate_event_type_code');
8190: END IF;
8191:
8192: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
8193: trace
8195: ,p_level => C_LEVEL_PROCEDURE
8196: ,p_module =>l_log_module);
8197: END IF;
8198:
8199: trace('< xla_events_pkg.validate_event_type_code' , 20);
8200: EXCEPTION
8201: WHEN NO_DATA_FOUND THEN
8202: xla_exceptions_pkg.raise_message
8203: (p_appli_s_name => 'XLA'
8205: ,p_token_1 => 'ERROR'
8206: ,p_value_1 => p_event_type_code||
8207: ' is not a defined event type for the application '||g_application_id
8208: ,p_token_2 => 'LOCATION'
8209: ,p_value_2 => 'xla_events_pkg.validate_event_type_code');
8210: WHEN xla_exceptions_pkg.application_exception THEN
8211: RAISE;
8212: WHEN OTHERS THEN
8213: xla_exceptions_pkg.raise_message
8210: WHEN xla_exceptions_pkg.application_exception THEN
8211: RAISE;
8212: WHEN OTHERS THEN
8213: xla_exceptions_pkg.raise_message
8214: (p_location => 'xla_events_pkg.validate_event_type_code');
8215: END validate_event_type_code;
8216:
8217: --=============================================================================
8218: --
8255: ,p_value_1 => 'Event Status Code cannot have a '||
8256: p_event_status_code ||
8257: ' value.'
8258: ,p_token_2 => 'LOCATION'
8259: ,p_value_2 => 'xla_events_pkg.validate_status_code');
8260: END IF;
8261:
8262: ----------------------------------------------------------------------------
8263: -- Validate process status code against the possible valid statuses
8279: ,p_value_1 => 'Process Status Code cannot have a '||
8280: p_process_status_code ||
8281: ' value.'
8282: ,p_token_2 => 'LOCATION'
8283: ,p_value_2 => 'xla_events_pkg.validate_status_code');
8284: END IF;
8285:
8286: ----------------------------------------------------------------------------
8287: -- following code is modified to fix bug # 2899700
8298: ,p_token_1 => 'ERROR'
8299: ,p_value_1 => 'Process Status Code has an invalid value. '||
8300: 'It should always have a ''Unprocessed'' value.'
8301: ,p_token_2 => 'LOCATION'
8302: ,p_value_2 => 'xla_events_pkg.validate_status_code');
8303: END IF;
8304:
8305: IF p_event_status_code = xla_events_pub_pkg.C_EVENT_PROCESSED THEN
8306: xla_exceptions_pkg.raise_message
8309: ,p_token_1 => 'ERROR'
8310: ,p_value_1 => 'Event Status Code has an invalid value. '||
8311: 'It cannot have a ''Processed'' value.'
8312: ,p_token_2 => 'LOCATION'
8313: ,p_value_2 => 'xla_events_pkg.validate_status_code');
8314: END IF;
8315: ELSIF g_context = C_MANUAL_EVENT_CONTEXT THEN
8316:
8317: -------------------------------------------------------------------------
8328: 'Process Status Code = '|| p_process_status_code ||
8329: ', '||
8330: 'Event Status Code = '|| p_event_status_code
8331: ,p_token_2 => 'LOCATION'
8332: ,p_value_2 => 'xla_events_pkg.validate_status_code');
8333: END IF;
8334: ELSIF (p_process_status_code = C_INTERNAL_DRAFT) THEN
8335: IF (p_event_status_code <> xla_events_pub_pkg.C_EVENT_UNPROCESSED) THEN
8336: xla_exceptions_pkg.raise_message
8341: 'Process Status Code = '|| p_process_status_code ||
8342: ', '||
8343: 'Event Status Code = '|| p_event_status_code
8344: ,p_token_2 => 'LOCATION'
8345: ,p_value_2 => 'xla_events_pkg.validate_status_code');
8346: END IF;
8347: ELSIF (p_process_status_code = C_INTERNAL_UNPROCESSED) THEN
8348: IF (p_event_status_code = xla_events_pub_pkg.C_EVENT_PROCESSED) THEN
8349: xla_exceptions_pkg.raise_message
8354: 'Process Status Code = '|| p_process_status_code ||
8355: ', '||
8356: 'Event Status Code = '|| p_event_status_code
8357: ,p_token_2 => 'LOCATION'
8358: ,p_value_2 => 'xla_events_pkg.validate_status_code');
8359: END IF;
8360: ELSE
8361: xla_exceptions_pkg.raise_message
8362: (p_appli_s_name => 'XLA'
8366: 'Process Status Code = '|| p_process_status_code ||
8367: ', '||
8368: 'Event Status Code = '|| p_event_status_code
8369: ,p_token_2 => 'LOCATION'
8370: ,p_value_2 => 'xla_events_pkg.validate_status_code');
8371: END IF;
8372: END IF;
8373:
8374: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
8381: WHEN xla_exceptions_pkg.application_exception THEN
8382: RAISE;
8383: WHEN OTHERS THEN
8384: xla_exceptions_pkg.raise_message
8385: (p_location => 'xla_events_pkg.validate_status_code');
8386: END validate_status_code;
8387:
8388:
8389: --=============================================================================
8491: WHEN xla_exceptions_pkg.application_exception THEN
8492: RAISE;
8493: WHEN OTHERS THEN
8494: xla_exceptions_pkg.raise_message
8495: (p_location => 'xla_events_pkg.validate_params');
8496: END validate_params;
8497:
8498:
8499:
8543: 'The ledger is either not enabled or is marked as not to create events.'||
8544: 'ledger_id = '||p_ledger_id||
8545: 'application_id = '|| p_application_id
8546: ,p_token_2 => 'LOCATION'
8547: ,p_value_2 => 'xla_events_pkg.validate_ledger');
8548: END IF;
8549: ELSE
8550: BEGIN
8551: SELECT DECODE(enabled_flag
8578: WHEN xla_exceptions_pkg.application_exception THEN
8579: RAISE;
8580: WHEN OTHERS THEN
8581: xla_exceptions_pkg.raise_message
8582: (p_location => 'xla_events_pkg.validate_ledger');
8583: END validate_ledger;
8584:
8585:
8586: --=============================================================================
9026: IF c4%ISOPEN THEN -- Added bug 10649546
9027: CLOSE c4;
9028: END IF; -- end bug 10649546
9029: xla_exceptions_pkg.raise_message
9030: (p_location => 'xla_events_pkg.cache_entity_info');
9031: END cache_entity_info;
9032:
9033:
9034: --=============================================================================
9160: WHEN xla_exceptions_pkg.application_exception THEN
9161: RAISE;
9162: WHEN OTHERS THEN
9163: xla_exceptions_pkg.raise_message
9164: (p_location => 'xla_events_pkg.create_entity_event');
9165: END create_entity_event;
9166:
9167:
9168: --=============================================================================
9201: WHEN xla_exceptions_pkg.application_exception THEN
9202: RAISE;
9203: WHEN OTHERS THEN
9204: xla_exceptions_pkg.raise_message
9205: (p_location => 'xla_events_pkg.update_entity_trx_number');
9206: END update_entity_trx_number;
9207:
9208: --=============================================================================
9209: --
9380: WHEN xla_exceptions_pkg.application_exception THEN
9381: RAISE;
9382: WHEN OTHERS THEN
9383: xla_exceptions_pkg.raise_message
9384: (p_location => 'xla_events_pkg.add_event (fn)');
9385: END add_entity_event;
9386:
9387:
9388: --=============================================================================
9440: WHEN xla_exceptions_pkg.application_exception THEN
9441: RAISE;
9442: WHEN OTHERS THEN
9443: xla_exceptions_pkg.raise_message
9444: (p_location => 'xla_events_pkg.reset_cache');
9445: END reset_cache;
9446:
9447:
9448: --=============================================================================
9476: WHEN xla_exceptions_pkg.application_exception THEN
9477: RAISE;
9478: WHEN OTHERS THEN
9479: xla_exceptions_pkg.raise_message
9480: (p_location => 'xla_events_pkg.set_context');
9481: END set_context;
9482:
9483:
9484: --=============================================================================
9728: WHEN xla_exceptions_pkg.application_exception THEN
9729: RAISE;
9730: WHEN OTHERS THEN
9731: xla_exceptions_pkg.raise_message
9732: (p_location => 'xla_events_pkg.delete_je');
9733: END delete_je;
9734:
9735:
9736:
10121: END IF;
10122:
10123: initialize;
10124:
10125: END xla_events_pkg;