Search Results ap_exp_report_dists




Overview

The APPS.AP_WEB_DB_EXPDIST_PKG is a server-side PL/SQL package within the Oracle E-Business Suite Payables (AP) module that manages the accounting distribution lines associated with expense reports submitted through the internet expenses workflow. Its central business function is to create, maintain, and reallocate the distribution records stored in AP_EXP_REPORT_DISTS, the table that holds the accounting flexfield combinations, amounts, and project-related attributes for each expense report line. The package is classified as an OTHER API and is documented as VALID in the ETRM repository for both 12.1.1 and 12.2.2. Because it governs which general ledger accounts and project segments receive expense costs, it sits at the intersection of the Expenses module and subledger accounting. The name fragment often surfaced in searches — ap_exp_report_dists — reflects the primary table this package manipulates rather than the package itself, which explains why the object appears in dependency tracing for that table.

Key Procedures and Functions

ETRM documents sixteen procedures and functions within the package. The distribution-persistence routines include ADDDISTRIBUTIONLINE, which inserts a new accounting distribution, and DELETEREPORTDISTRIBUTIONS, which removes distributions for a given expense report. Retrieval and testing helpers include FOUNDDISTRIBUTIONS, which determines whether distributions exist for a report or line, and FOUNDCCID, which verifies the presence of a code combination identifier.

Account assignment is handled by SETDISTCCID, UPDATEDISTCCID, UPDATEDISTACCOUNTVALUES, UPDATEDISTACCTVALUESFORFORMS, and UPDATEACCOUNTVALUES. These routines set or refresh the accounting flexfield combination on distribution rows, with the FORMS-suffixed variant tailored to the Oracle Forms front end.

Redistribution logic is provided by MOVEDISTRIBUTIONS, DUPLICATEDISTRIBUTIONS, and RESPLITDISTAMOUNTS, which support moving, copying, and re-apportioning distribution amounts between lines. Project-awareness is delivered through CONTAINSPROJECTRELATEDDIST and CONTAINSNONPROJECTRELATEDDIST, both of which test a distribution set for project-related content. Finally, GETCCSEGMENTVALUE returns a specific segment value from a code combination.

Tables Accessed

The package reads and writes AP_EXP_REPORT_DISTS, AP_EXP_REPORT_DISTS_ALL, and AP_EXP_REPORT_DISTS_S, which hold the accounting distributions, their translated (_ALL) and secure (_S) variants, and provide the primary write targets. AP_EXPENSE_REPORT_LINES and AP_EXPENSE_REPORT_HEADERS supply the parent expense report context. Validation of accounting flexfield combinations draws on GL_CODE_COMBINATIONS and FND_ID_FLEX_SEGMENTS. Project segment data is sourced from AP_OIE_KFF_SEGMENTS_T, and dynamic SQL assembly uses DBMS_SQL, PLITBLM, and DUAL.

Usage Notes

The package is invoked indirectly by the Internet Expenses form flow and by workflow-enabled processes rather than by end users directly. ETRM records it as referenced by AP_WEB_AUDIT_PROCESS, AP_WEB_DB_EXPLINE_PKG, and AP_WEB_EXPENSE_WF, indicating that distribution creation and reallocation occur as users enter or revise expense lines and as the expense workflow proceeds. The UPDATEDISTACCTVALUESFORMS entry confirms that Oracle Forms calls the package to synchronize account values back to the user interface. Because the package is not a public, versioned API, customizations should generally avoid direct calls and instead rely on the standard expense report interfaces; dependency tracing remains the most reliable way to assess impact during upgrades or patches.