PL/SQLintermediate

Oracle EBS Public APIs and TCA Architecture

Explain why Oracle exposes public PL/SQL APIs and how they should be used instead of direct table DML

Oracle EBS ships hundreds of public PL/SQL APIs — packages like AP_INVOICES_PKG, PO_HEADERS_PKG, HZ_PARTY_V2PUB (Trading Community Architecture), and OE_ORDER_PUB — specifically designed as the supported entry point for creating or updating application data. These APIs encapsulate validation, defaulting logic, workflow triggering, and audit trail maintenance that direct table inserts/updates would bypass entirely.

Public APIs are like using a bank's teller window instead of reaching behind the counter into the vault yourself — the teller (API) enforces all the necessary verification, logging, and compliance steps that a raw vault transaction would skip entirely.

Key Concepts

1
The Trading Community Architecture (TCA) APIs, especially HZ_PARTY_V2PUB and HZ_CUST_ACCOUNT_V2PUB, are the standard for creating parties, customer accounts, and addresses, replacing the old flat customer model. TCA's data model separates the concept of a 'Party' (a person or organization, which can play multiple roles) from a 'Customer Account' (the commercial relationship), enabling one party to be both a customer and a supplier without data duplication.
Trading Community Architecture (TCA)HZ_PARTY_V2PUBHZ_CUST_ACCOUNT_V2PUB
2
Using public APIs correctly means understanding their standard calling convention: most accept an x_return_status OUT parameter ('S' for success, 'E' for error, 'U' for unexpected error), plus x_msg_count and x_msg_data for retrieving messages from the FND Message Dictionary stack via FND_MSG_PUB.GET. This consistent pattern lets developers write generic error-handling wrappers around any Oracle API.
FND Message Dictionaryx_return_status'S''E''U'
3
Interviewers almost universally probe whether a candidate defaults to writing direct INSERT/UPDATE statements against base tables (a red flag) versus using the appropriate public API — direct DML risks corrupting data integrity, skipping workflow notifications, and breaking on the next patch when Oracle changes the underlying schema.