Search Results approve_activity_status




Overview

APPS.AMS_APPROVAL_PVT is a private PL/SQL package body within the Oracle E-Business Suite Advanced Marketing (AMS) module, responsible for driving the approval workflow logic associated with marketing activities and offers. Its header comment (amsvappb.pls, version 120.7.12020000.2, last shipped 2013/02/21) confirms it belongs to the R12 code line and remains current through EBS 12.1.1 and 12.2.2. The package encapsulates the server-side business rules that determine whether a marketing activity or offer requires approval, identify the appropriate approver, route the document through the Oracle Workflow engine, and update the approval status of the underlying activity or budget line once a decision is rendered.

The package defines the global constant G_ITEMTYPE as 'AMSAPRV', which is the Workflow item type under which approval processes are instantiated. A private set_org_ctx routine invokes MO_GLOBAL.init('OZF') and MO_GLOBAL.set_policy_context to establish the multi-org (Operating Unit) security context before any query of offer or budget data — a mandatory R12 enhancement that ensures the correct organization's data is visible. A find_org_id helper resolves the owning organization of an offer by reading QP_LIST_HEADERS_ALL_B for the supplied list header ID.

Key Procedures and Functions

The package exposes thirty-four documented procedures and functions. The principal entry points include:

Tables Accessed

The package reads and writes a defined set of application tables via APPS synonyms. AMS_APPROVAL_DETAILS stores the per-document approval history and status; AMS_APPROVERS holds approver assignments; AMS_OBJECT_RULES_B supplies the approval rule definitions. Offer and budget data is read from OZF_OFFERS, OZF_ACT_BUDGETS, and QP_LIST_HEADERS_ALL_B. User and responsibility references are resolved through FND_USER, FND_FORM_FUNCTIONS, JTF_RS_ROLES_B, and JTF_RS_ROLE_RELATIONS. Oracle Workflow routing is configured through WF_ROUTING_RULES and WF_ROUTING_RULE_ATTRIBUTES, while DUAL is used for context initialization.

Usage Notes

AMS_APPROVAL_PVT is an internal (PVT) package — it is not intended to be called directly by end users or custom code. It is invoked by the AMS approval Workflow processes (item type AMSAPRV) and by the AMS marketing forms that submit activities and offers for approval, as well as by concurrent processes that re-evaluate pending approvals. The package is referenced by eight other packages within the AMS schema, indicating it is a foundational component of the approval framework. Because it performs Operating Unit context setup through MO_GLOBAL, any external invocation must ensure the correct org_id is available; failure to do so will return incorrect or no data. Callers are also expected to be aware that APPROVE_ACTIVITY_STATUS and its counterparts commit status changes that are visible immediately to the Workflow engine.