Search Results pv_ame_api_w




Overview

PV_AME_API_W is a public PL/SQL package owned by the APPS schema that exposes Oracle E-Business Suite partner and referral approval logic to external callers through the Approvals Management Engine (AME). It acts as the wrapper layer (the "_W" suffix is the conventional EBS indicator) around the internal approval engine, providing a stable API surface for initiating an approval process against a referral and for recording the response returned by an approver. The package is declared AUTHID CURRENT_USER, so all SQL executed inside it runs with the privileges of the calling session rather than the definer, and callers must therefore hold the appropriate object grants. The two entry points support the full round trip of an approval cycle: raising the approval request and then feeding back the approver's decision. Because the header carries a revision from 2005 (pvapprls.pls 120.3), the interface reflects the older PL/SQL API conventions that remain in use through Release 12.1.1 and 12.2.2.

Key Procedures and Functions

  • START_APPROVAL_PROCESS — Initiates the AME approval process for a given referral. Its inputs identify the referral and, optionally, the partner, and allow the caller to indicate that the referral country has changed and to supply the replacement country code. A parameter designates the approval entity (PVREFFRL, PVDEALRN, or PVDQMAPR), selecting the business object against which approvals are evaluated. Standard EBS API parameters control the API version, message list initialization, commit behaviour, and validation level, while OUT parameters return the standard return status, message count, and message data.
  • UPDATE_APPROVER_RESPONSE — Records an approver's action against an in-flight approval. It accepts the referral identifier and approval entity, the response code (mapped to the AME_UTIL.approverIn values), the user ID of the approver supplying the response, and optionally the forwardee's user ID when the action is a delegation. A note-added flag indicates whether a note accompanied the response. The procedure returns x_approval_done to tell the caller whether the approval process has finished, alongside the standard return status, message count, and message data.

Tables Accessed

The package reads and writes several base tables through APPS synonyms. PV_REFERRALS_B holds the referral header record that anchors both procedures. PV_GE_TEMP_APPROVERS and its _S sequence object support temporary approver staging used while the approval chain is being assembled or refreshed. FND_USER is referenced to resolve and validate approver and forwardee identities from their user IDs. JTF_RS_RESOURCE_EXTNS is used to relate those users to resource records. PLITBLM is the standard EBS PL/SQL message table used by the API message-handling framework.

Usage Notes

PV_AME_API_W is typically invoked from the Oracle Forms-based partner and referral approval screens, from concurrent programs that drive approval processing in batch, and from custom PL/SQL integration code that needs to submit or complete approvals without going through the user interface. Callers must honor the standard EBS API contract: pass p_init_msg_list and p_commit explicitly rather than relying on the defaults, check x_return_status against FND_API.G_RET_STS_SUCCESS after every call, and drain the message stack using x_msg_count and x_msg_data when an error is reported. The note in the header that p_country_code is required only when the country-change flag is set illustrates the conditional validation callers should observe. The package is not referenced by any other documented package, so it functions as a terminal integration point rather than a shared internal utility.