Search Results get_primary_customer




Overview

PA_PROJECTS_MAINT_UTILS is a public PL/SQL utility package owned by the APPS schema in Oracle E-Business Suite, delivered under the Projects (PA) module. It provides a centralized library of validation and lookup routines used during the creation and maintenance of project records. The package consolidates common edit checks — validating organization names or identifiers, project status codes, customer names and identifiers, probability codes, calendars, classification categories, and billing rate schedules — into reusable, callable procedures. This design allows Oracle Projects forms, concurrent programs, and dependent APIs to enforce consistent business rules without duplicating logic. In the 12.1.1 and 12.2.2 releases the package is classified as an "OTHER" API, meaning it is not part of the formally published, version-controlled public API set but remains widely referenced internally.

Key Procedures and Functions

The package exposes 34 documented procedures and functions. The validation routines follow a consistent pattern: they accept either an internal identifier or a descriptive name, resolve the two against each other, and return a status and error message code. Documented examples include CHECK_ORG_NAME_OR_ID, which reconciles an HR organization name with its organization_id; CHECK_PROJECT_STATUS_OR_ID, which validates a project status code or name; CHECK_CUSTOMER_NAME_OR_ID; CHECK_PROBABILITY_CODE_OR_ID; and CHECK_CALENDAR_NAME_OR_ID. Lookup routines such as GET_PROJECT_MANAGER and GET_PROJECT_MANAGER_NAME retrieve the project manager identifier or display name, while GET_PRIMARY_CUSTOMER and GET_PRIMARY_CUSTOMER_NAME return the primary customer account or its name. This last pair is directly relevant to the search term "get_primary_customer_name," which resolves to the GET_PRIMARY_CUSTOMER_NAME function. Additional documented procedures include CLASS_CHECK_TRANS, CHECK_CLASS_CATG_CAN_DELETE, CHECK_DUPLICATE_CLASS_CATG, CHECK_CLASS_CATG_ONE_ONLY_CODE, CHECK_CLASS_CATG_CAN_OVERRIDE, CHECK_PROBABILITY_CAN_CHANGE, CHECK_BILL_JOB_GRP_REQ, GET_COST_JOB_GROUP_ID, CHECK_BILL_RATE_SCHL_EXISTS, CHECK_PROJECT_OPTION_EXISTS, and CHECK_CATEGORY_TOTAL_VALID.

Tables Accessed

The package reads and validates against a broad set of APPS-synonymed tables. Customer identification relies on HZ_CUST_ACCOUNTS and HZ_PARTIES, reflecting the TCA (Trading Community Architecture) model used in Release 12. Project and status data come from PA_PROJECTS_ALL and PA_PROJECT_STATUSES. Classification logic references PA_CLASS_CATEGORIES and PA_CLASS_CODES. Probability validation uses PA_PROBABILITY_LISTS and PA_PROBABILITY_MEMBERS. Currency and calendar lookups use FND_CURRENCIES and JTF_CALENDARS_B, while message text is drawn from FND_NEW_MESSAGES. Cost and revenue checks draw on PA_COST_DISTRIBUTION_LINES, PA_COST_DISTRIBUTION_LINES_ALL, PA_DRAFT_INVOICES, and PA_DRAFT_REVENUES.

Usage Notes

PA_PROJECTS_MAINT_UTILS is invoked primarily from the Oracle Projects maintenance forms, where field-level validation and defaulting depend on these routines. It is also called by 31 other packages, making it a shared dependency within the PA module. Custom extensions, project templates, and concurrent programs that must validate project attributes or resolve a primary customer should call the same routines to preserve consistency with standard behavior. Because the package uses AUTHID CURRENT_USER, callers require appropriate privileges on the underlying tables. As an "OTHER" API, its signatures are not guaranteed under Oracle's formal API compatibility policy, so custom code should be validated against each target release (12.1.1 versus 12.2.2) before deployment.