Search Results delete_changed_entity
Overview
The APPS.AS_ATA_NEW_PUB package body is a public PL/SQL API belonging to the Oracle E-Business Suite Territory Management (Sales Foundation) module. Its private constant G_ENTITY is set to 'ATA NEW MODE', indicating that the package governs the "Assign Territory Accesses – New Mode" processing model. The package supports the automated re-evaluation and reassignment of territory access when underlying sales entities change, including accounts, leads, opportunities, quotes, proposals, and JTY transactions. It coordinates the transition of data both before (PRE ATA) and after (POST ATA) territory assignment, and it provides a mechanism to purge stale assignment artifacts when a source entity has been modified after an initial territory assignment run.
Key Procedures and Functions
- ASSIGN_TERRITORY_ACCESSES — The single documented public entry point. It drives the territory access assignment cycle and is the routine custom code and concurrent programs are expected to call.
- DELETE_CHANGED_ENTITY — A private routine that removes records for an entity that has changed since its last territory evaluation, ensuring downstream processing does not operate on stale data. It accepts an entity identifier and returns an error buffer and return code to the caller.
- PRE_ATA — A private pre-processing step executed before territory assignment, establishing prerequisites such as submitting the GAR (Generate Assignment Results) job, as reflected in the
G_GAR_SUBMITconstant. - POST_ATA — A private post-processing step executed after assignment, reconciling results once territory access records have been generated.
- PROCESS_TRANS_DATA — A private driver that processes a specific transaction, accepting a transaction ID, optional additional WHERE clause, an analyzed percentage, a trace-mode flag, and returning a status value.
Private constants define the entity labels processed by these routines, including process account, lead, opportunity, quote, proposal, and JTY transactions, along with the PRE ATA, POST ATA, and DELETE CHANGED ENTITY markers.
Tables Accessed
The package reads and writes change-tracking and staging tables through APPS synonyms. Entity change tables include AS_CHANGED_ACCOUNTS_ALL, ASO_CHANGED_QUOTES, JTY_CHANGED_TERRS, and PRP_CHANGED_PROPOSALS. The JTF_TAE_1001_* family of tables (account, lead, opportunity, proposal, and quote name transactions) provides the working view of entities qualifying for territory assignment. The temporary staging table AS_TERR_RESOURCES_TMP holds intermediate resource-to-territory mappings. Configuration and user context is supplied by FND_PROFILE_OPTIONS, FND_PROFILE_OPTION_VALUES, and FND_USER. DBMS_STATS is used to refresh optimizer statistics, while PLITBLM provides the PL/SQL table utility types.
Usage Notes
This package is typically invoked by Territory Management concurrent programs and by internal Sales Foundation processing that must reassign access after source records change. Before running, the caller must supply a valid application context via FND_GLOBAL, since profile options and user information are read from FND tables. When a caller has modified accounts, leads, opportunities, quotes, proposals, or JTY transactions, DELETE_CHANGED_ENTITY should be executed first to clear stale assignment rows before ASSIGN_TERRITORY_ACCESSES re-runs territory evaluation. Because the documented public surface is a single procedure, custom code should call only ASSIGN_TERRITORY_ACCESSES and rely on the internal routines for cleanup and staging. The package is not referenced by other documented packages, so it functions as a top-level integration point rather than a shared library.
-
APPS.AS_ATA_NEW_PUB SQL Statements
12.1.1
-
APPS.AS_ATA_NEW_PUB SQL Statements
12.2.2
-
APPS.AS_ATA_TOTAL_PUB SQL Statements
12.1.1
-
APPS.AS_ATA_TOTAL_PUB SQL Statements
12.2.2
-
PACKAGE BODY: APPS.AS_ATA_NEW_PUB
12.1.1
-
PACKAGE: APPS.AS_ATA_TOTAL_PUB
12.1.1
-
PACKAGE BODY: APPS.AS_ATA_NEW_PUB
12.2.2
-
PACKAGE: APPS.AS_ATA_TOTAL_PUB
12.2.2
-
PACKAGE BODY: APPS.AS_ATA_TOTAL_PUB
12.1.1
-
PACKAGE BODY: APPS.AS_ATA_TOTAL_PUB
12.2.2
-
APPS.AS_ATA_NEW_PUB dependencies on FND_API
12.1.1
-
APPS.AS_ATA_NEW_PUB dependencies on FND_API
12.2.2
-
APPS.AS_ATA_NEW_PUB dependencies on AS_GAR
12.1.1
-
APPS.AS_ATA_NEW_PUB dependencies on FND_CONCURRENT
12.1.1
-
APPS.AS_ATA_NEW_PUB dependencies on AS_GAR
12.2.2
-
APPS.AS_ATA_NEW_PUB dependencies on FND_CONCURRENT
12.2.2
-
APPS.AS_ATA_TOTAL_PUB dependencies on AS_GAR
12.1.1
-
APPS.AS_ATA_TOTAL_PUB dependencies on AS_GAR
12.2.2
-
APPS.AS_ATA_TOTAL_PUB dependencies on FND_CONCURRENT
12.1.1
-
APPS.AS_ATA_TOTAL_PUB dependencies on FND_CONCURRENT
12.2.2