Results for “g_debugflag”
6 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
APPS.AS_IMPORT_SL_PVT is a private (PVT-classified) PL/SQL package within the Oracle EBS Sales Foundation module. Its sole business function is the bulk import of sales leads from external source systems into the EBS Sales Leads data model. The package acts as the engine behind the lead import concurrent program, reading staged records from the interface tables (AS_IMPORT_INTERFACE and its dependent child interface tables), validating and transforming supplier contact and address data, and ultimately inserting or updating records in the base Sales Leads tables. It also maintains a dedicated error repository so that rejected rows can be diagnosed and reprocessed without resubmitting the entire batch.
The package was introduced to support the CRM lead import flow, and its internal constant G_as_api_version (2.0) confirms it is aligned with the version 2 CRM APIs. The header carries the version marker 120.1.12020000.2 dated 21-May-2013, which is the shipping version for EBS 12.1.1 and 12.2.2 environments.
Key Procedures and Functions
- MAIN — The entry point for the concurrent program wrapper. It accepts the standard
errbufanderrcodeout parameters required by concurrent programs, together with the source system name, a debug message flag, a batch identifier, a purge-error flag, and parent/child request identifiers, resource identifier and group identifier (the latter two added for SOLIN support under bug 4702335). MAIN orchestrates the import run: it sets up logging to the log file and output file, initialises the global return status (G_return_status) toFND_API.G_RET_STS_SUCCESS, then delegates the actual processing to the lead import routine. It also truncates or purges the error table when the purge flag is set, and controls debug output throughG_DEBUGFLAG. - DO_LEAD_IMPORT — Performs the substantive work of the import. It takes the source system, debug flag, parent and child request IDs, and the SOLIN resource and group identifiers. It reads the rows staged in the interface tables, performs the lead import processing, and records failures. Internally it tracks status via the constants
G_LOAD_STATUS_SUCC('SUCCESS'),G_LOAD_STATUS_ERR('ERROR') andG_LOAD_STATUS_UNEXP_ERR('UNEXP_ERROR'), the last of which explains why a search for "unexp_error" surfaces this package: any row or batch element that fails with an unexpected exception is stamped with that status in the lead import error tables, giving the user a distinct signal that the failure was not a business-rule validation issue but an unhandled runtime error.
Tables Accessed
The package reads and writes the following documented tables through APPS synonyms:
- Interface tables: AS_IMPORT_INTERFACE (master staging), AS_IMP_CNT_PNT_INTERFACE and AS_IMP_CNT_ROL_INTERFACE (staged contact points and contact roles), AS_IMP_LINES_INTERFACE and AS_IMP_SL_FLEX (staged lead lines and descriptive flexfield data).
- Error tables: AS_LEAD_IMPORT_ERRORS and its sequence AS_LEAD_IMPORT_ERRORS_S, where rejected rows and their
UNEXP_ERRORorERRORstatuses are written. - Base tables: AS_SALES_LEADS (destination for successfully imported leads) and AML_INTERACTION_LEADS (interaction history for imported leads).
- Reference and matching tables: HZ_MATCHED_CONTACTS_GT, HZ_MATCHED_CPTS_GT, HZ_CONTACT_POINTS, HZ_CONTACT_PREFERENCES, HZ_LOCATIONS and FND_CURRENCIES, used for party/contact deduplication, contact-point creation, address resolution and currency validation.
Usage Notes
AS_IMPORT_SL_PVT is not intended for direct invocation from application forms. It is called by the Sales Leads Import concurrent program, which supplies the standard errbuf/errcode pair and the source system and batch parameters. In EBS 12.1.1 and 12.2.2 the program is submitted from the Sales Foundation responsibility, typically after an external feed has populated AS_IMPORT_INTERFACE. Because the package is PVT-classified with no dependents recorded in ETRM, it should be treated as internal: custom code should not call MAIN or DO_LEAD_IMPORT directly, but instead invoke the concurrent program. When troubleshooting, query AS_LEAD_IMPORT_ERRORS and filter on the load status to distinguish ordinary validation failures ('ERROR') from unexpected exceptions ('UNEXP_ERROR'); the latter usually point to a data condition or environment issue that requires the debug flag to be set to 'Y' to capture detailed messages in the log file. Set the purge-error flag only when the intent is to discard previously logged errors before a fresh run, since doing so removes the audit trail of earlier failed rows.