Search Results get_cust_payment_term
Overview
WSH_ECE_VIEWS_DEF is a PL/SQL package owned by APPS that supports Oracle E-Business Suite's E-Commerce Gateway (ECE) and shipping execution integration flows. The package is declared with AUTHID CURRENT_USER, meaning its SQL statements execute under the privileges of the invoking user rather than the definer, which is consistent with its role as a reusable data-access layer. Its primary business function is to resolve and return reference, contact, and location information required when Oracle Shipping Execution emits outbound EDI or XML transactions — such as advance ship notices, delivery records, and invoice references — to trading partners. The package bridges shipping transaction data (WSH tables) with trading partner configuration (ECE_TP_HEADERS) and Oracle Receivables / Oracle Customers Online master data (HZ and RA tables), returning derived values that populate outbound interface views. In the context of the searched term get_cont_area_code, this package exposes a lookup function that retrieves a contact's telephone area code, allowing outbound documents to carry correctly formatted contact telephone information.
Key Procedures and Functions
The ETRM metadata documents thirteen procedures and functions, falling into several logical groupings:
- GET_CONT_AREA_CODE — Returns the area code associated with a contact, keyed by contact identifier. This is the object referenced in the user's search.
- GET_CONT_PHONE_NUMBER — Returns the contact telephone number, complementing the area code lookup.
- GET_CUST_AREA_CODE — Returns the area code for a customer, keyed by customer identifier.
- GET_CUST_PHONE_NUMBER — Returns the customer telephone number.
- GET_INVOICE_NUMBER — Retrieves the invoice number for a given delivery.
- GET_VEHICLE_TYPE_CODE — Derives the vehicle type code from vehicle organization and item identifiers.
- GET_CUST_PAYMENT_TERM — Returns the payment term name associated with a payment term identifier.
- GET_CROSS_REFERENCE — Returns the cross-reference value for an inventory item within an organization.
- UPDATE_DEL_ASN_INFO — Updates delivery ASN information, including timestamp sequence numbers and dates.
- GET_LOCATION_CODE — Returns the location code for a given location identifier.
- GET_LOCATION_INFO — Returns a comprehensive location record, including EDI location code, trading partner references, customer name, multi-line address, and contact telephone details.
- GET_DLVY_LOCATION_INFO — Returns delivery-specific location information.
- GET_DLVY_DEST_CONT_INFO — Returns destination contact information for a delivery.
The package also declares module-level variables cont_phone_number_x and cust_phone_number_x used in phone number resolution.
Tables Accessed
The documented table references reflect the package's EDI and shipping focus:
- ECE_TP_HEADERS — Trading partner header configuration, supplying EDI location codes and trading partner reference values.
- HZ_CONTACT_POINTS — Contact point records (including telephone and area code data) underlying the contact phone functions.
- HZ_CUST_ACCOUNT_ROLES, HZ_ORG_CONTACTS, HZ_PARTIES, HZ_RELATIONSHIPS — Customer and organization contact master data used to resolve contact identities and relationships.
- MTL_CROSS_REFERENCES, MTL_SYSTEM_ITEMS — Item cross-reference lookup and item master data for vehicle and item resolution.
- RA_TERMS — Receivables payment terms used by GET_CUST_PAYMENT_TERM.
- WSH_ASN_SEQ_NUMBER_S, WSH_DELIVERY_ASSIGNMENTS, WSH_DELIVERY_DETAILS, WSH_NEW_DELIVERIES — Shipping delivery, assignment, and ASN sequence data used by delivery and invoice lookups and the ASN update procedure.
- DUAL — Used for single-row evaluations.
Usage Notes
WSH_ECE_VIEWS_DEF is typically invoked indirectly by outbound E-Commerce Gateway interface view definitions and shipping execution extraction logic rather than called directly by end users. It is referenced by nine other packages, indicating its role as a shared utility layer for EDI and shipping data derivation. In practice, it is invoked from concurrent programs and ECE interface programs that assemble outbound transactions, and from forms or custom extensions that need standardized resolution of contact phone data, customer phone data, payment terms, location information, or item cross-references. When get_cont_area_code is called, the function relies on the invoking user's privileges (per AUTHID CURRENT_USER) and the HZ contact point tables to return the area code. Customizations should treat the package as a read-mostly utility, with the exception of UPDATE_DEL_ASN_INFO, which writes ASN timestamp sequence and date values back to shipping delivery records.