Search Results validate_budget_status_code




Overview

AS_SALES_LEADS_PVT is a private PL/SQL API package in the Oracle E-Business Suite (EBS) Sales Foundation module, owned by the APPS schema and declared with AUTHID CURRENT_USER. It encapsulates the core business logic for Sales Leads Management, and its header date (last updated 2003/01/23, version 115.34) reflects its long-standing role as the internal engine behind the public Sales Leads APIs. The package name suffix "_PVT" indicates it is a private API layer, intended to be invoked by other packages rather than directly by end-user code; the ETRM metadata classifies it as API classification "PVT," and it is referenced by six other packages.

Key Procedures and Functions

The documented interface exposes 34 procedures and functions, dominated by a family of item-level validation routines. These validators follow a consistent signature pattern: an input value, an optional message-list initialization flag, a validation mode, and OUT parameters returning return status, message count, and message data. The metadata reveals the following validation procedures: VALIDATE_LEAD_NUMBER (now commented out and obsolete, as the lead number column became non-mandatory), VALIDATE_SALES_LEAD_ID, VALIDATE_CUSTOMER_ID, VALIDATE_ADDRESS_ID, VALIDATE_STATUS_CODE, VALIDATE_SOURCE_PROMOTION_ID, VALIDATE_CHANNEL_CODE, VALIDATE_CURRENCY_CODE, VALIDATE_DECN_TIMEFRAME_CODE, VALIDATE_CLOSE_REASON, VALIDATE_LEAD_RANK_ID, VALIDATE_ASSIGN_TO_PERSON_ID, VALIDATE_ASSIGN_TO_SF_ID, VALIDATE_BUDGET_STATUS_CODE, VALIDATE_VEHICLE_RESPONSE_CODE, VALIDATE_REJECT_REASON_CODE, VALIDATE_FLAGS, VALIDATE_STATUS_CLOSE_REASON, VALIDATE_REF_BY_REF_TYPE, and VALIDATE_OFFER_ID.

VALIDATE_CHANNEL_CODE, the routine the user searched for, is the channel-code validator that confirms the supplied channel reference is valid before a sales lead record is created or updated. Beyond validators, the package includes creation logic such as create_opportunity_for_lead, which creates an opportunity from a lead and accepts P_OPP_STATUS to set the opportunity status. The noted procedure CALL_WF_TO_ASSIGN was added to support workflow-based lead assignment (bug 1423478).

Tables Accessed

The package operates against a broad set of Sales and Trading Community tables via APPS synonyms. Lead master data resides in AS_SALES_LEADS, with audit information in AS_SALES_LEADS_LOG, contacts in AS_SALES_LEAD_CONTACTS, and line details in AS_SALES_LEAD_LINES. Opportunity linkage is maintained in AS_SALES_LEAD_OPPORTUNITY. Validation lookups draw on AS_SALES_LEAD_RANKS_B, AS_SALES_METHODOLOGY_B, AS_SALES_METH_STAGE_MAP, AS_SALES_STAGES_ALL_B, AS_STATUSES_B, AMS_SOURCE_CODES, AML_SALES_LEAD_TIMEFRAMES, and FND_LOOKUP_VALUES. Customer and address validation reference HZ_PARTIES and HZ_LOCATIONS. These reads and writes support value verification, record persistence, and referential integrity across the leads model.

Usage Notes

Because AS_SALES_LEADS_PVT is a private API, it is not called directly from Oracle Forms or concurrent programs; instead, it is invoked by public API packages and other internal components that pass validated lead data downward. Validation procedures are typically called during data entry or import processing to confirm codes and IDs before an insert or update against AS_SALES_LEADS. Customizations should call the public Sales Leads API rather than this private package, since the private interface is subject to change between releases such as 12.1.1 and 12.2.2. Developers troubleshooting validation failures—particularly channel, status, or customer errors—should trace calls from the public API into the corresponding VALIDATE_* routine, checking the returned message list for the cause.