Search Results ap_oie_kff_segments_t




Overview

APPS.AP_WEB_CUS_ACCTG_PKG is a server-side PL/SQL package that belongs to the Oracle Payables Web Expenses (Internet Expenses / AP Web) accounting subsystem. In Oracle EBS 12.1.1 and 12.2.2, it supports the Account Generator logic used when OIE expense reports, distribution lines, and project-related expenditure items are converted into valid accounting flexfield combinations before they are transferred to Payables, Projects, and the General Ledger.

The key word in the object name is "CUS" — a strong convention in EBS for customer / customization extension points. This package provides the seeded framework that sites can extend or override so that the creation of expense account combinations can reflect client-specific defaults, derived cost centers, and project distribution validations. It is declared AUTHID CURRENT_USER, meaning its SQL and any dynamic privilege checks are executed under the caller's security context rather than as definer-rights code.

Key Procedures and Functions

ETRM documents four callable units, three of which are functions returning BOOLEAN success indicators and one returning a NUMBER flag:

  • GetIsCustomBuildOnly — Returns a NUMBER that signals whether account building should be handled exclusively by the customized (customer) logic, effectively a switch consulted by the calling account-generation flow to decide whether to bypass the standard builder.
  • BuildAccount — The core account construction function. It accepts report header/line identifiers, employee and cost center context, an expense type parameter, incoming KFF segments, and a starting CCID, together with a build mode. It returns the new segment values, a new CCID, and an error message, and reports success via BOOLEAN.
  • BuildDistProjectAccount — Builds the accounting combination for a project-related distribution, taking report header, line, and distribution IDs plus an expense type parameter. It returns the new segments, new CCID, error message, and a status string.
  • CustomValidateProjectDist — A validation hook (introduced or annotated under Bug 7176464) that checks a project distribution against its report line, web parameter, project/task/award, expenditure organization, and amount, returning success or an error message.

All output parameters use OUT NOCOPY, reflecting performance-conscious passing of PL/SQL record collections.

Tables Accessed

The package centers on the PL/SQL collection type AP_OIE_KFF_SEGMENTS_T, which carries key flexfield segment values for an account combination. It is passed both inbound and outbound, so segment arrays are populated, transformed, and returned to the caller rather than being persisted by the package itself. Because it is an API-style extension point, most persistent reads and writes occur in the parent account-generation and Internet Expenses processes (report headers, report lines, report distributions, expenditure type parameters, and code combinations in FND), for which this package supplies derived values and validation outcomes. No standalone table list is documented in the ETRM extract.

Usage Notes

AP_WEB_CUS_ACCTG_PKG is not typically invoked directly from an Oracle Forms window or from a standalone concurrent program. It is called by the seeded Internet Expenses / Payables Web accounting engine during the Create Accounting, expense report validation, and distribution build phases, when an expense line must be resolved to a valid CCID. Because two other packages reference it, the natural entrant path is the standard AP Web accounting flow, with customer extensions implemented as wrapper or replacement code.

Typical deployment is a customization: developers create a site-specific package or modify the seeded behavior so that BuildAccount, BuildDistProjectAccount, and CustomValidateProjectDist apply local business rules — default segments, project-derived accounts, or rejection of invalid project distributions. All calls should supply valid report header, line, and distribution identifiers, expect BOOLEAN return signaling, and inspect the OUT error message and status parameters before proceeding. Patch levels matter: the package footers in 12.1.1 (build 120.2.12010000.x) carry fixes such as Bug 7176464, so customized copies must be re-merged on upgrade to 12.2.2 to retain those corrections.