Search Results lock_document_with_validate




Overview

PO_DRAFTS_GRP is a PL/SQL package in the APPS schema that supports the supplier-facing and catalog administrator draft authoring workflow within Oracle Purchasing. Its header carries a version string of 120.7 dated 2006/09/18, indicating the package has been part of the purchasing code line since at least the early 11i/12.x releases and remains present in EBS 12.1.1 and 12.2.2. The package is classified in ETRM as an API group (GRP), meaning it exposes a set of related server-side procedures rather than a single transactional API or a private utility body.

The central business concept embodied in PO_DRAFTS_GRP is the draft: a proposed change to a purchase order or agreement that originates from a supplier or a catalog administrator and must be reviewed before it becomes an actual revision to the purchasing document. The package owns the set of status codes that describe the lifecycle of such a draft, including NO_DRAFT, SUPPLIER_SUBMISSION_PENDING, SUPPLIER_CHANGES_SUBMITTED, CAT_ADMIN_SUBMISSION_PENDING, and CAT_ADMIN_CHANGES_SUBMITTED. These constants are exposed publicly so that forms, concurrent programs, and custom code can compare against documented values rather than hard-coded literals.

Key Procedures and Functions

  • GET_ONLINE_AUTH_STATUS_CODE — Returns the online authoring authorization status code for a given purchase order header, allowing callers to determine whether a supplier or catalog administrator currently holds the document in draft state.
  • SUPPLIER_AUTH_ALLOWED — Reports whether the supplier is permitted to author changes against the specified header, and returns an accompanying message when authoring is blocked.
  • GET_UPLOAD_STATUS_INFO — Retrieves the status of an upload (submission) associated with a document for a supplied role, including the upload status code, the requestor role identifier, the concurrent job number, a display string, and an error indicator.
  • GET_IN_PROCESS_UPLOAD_INFO — Reports whether an upload is currently in progress, together with the status code, requestor role and role identifier, concurrent job number, and a display string for the in-flight submission.
  • DISCARD_UPLOAD_ERROR — Clears or discards a recorded upload error on a document so the submission workflow can proceed.
  • LOCK_DOCUMENT_WITH_VALIDATE — Acquires a lock on the draft document while performing validation; this is the entry point most commonly searched for, because it is the guard used before a draft is modified or submitted, ensuring the document is not concurrently edited and that it satisfies validation rules.

Tables Accessed

ETRM documents a single table reference: PO_DRAFTS, accessed through its APPS synonym. This table stores draft records keyed by purchase order header, and it is the source of the status values surfaced by GET_ONLINE_AUTH_STATUS_CODE, GET_UPLOAD_STATUS_INFO, and GET_IN_PROCESS_UPLOAD_INFO. Writes to the same table occur when DISCARD_UPLOAD_ERROR clears an error flag and when LOCK_DOCUMENT_WITH_VALIDATE locks a draft row prior to modification. Although only PO_DRAFTS is formally listed, the procedures logically also depend on purchasing PO header data to resolve the document being validated.

Usage Notes

PO_DRAFTS_GRP is invoked from the supplier and catalog administrator authoring screens in Oracle iSupplier Portal and from the purchasing forms that manage draft changes, and it is referenced by one other package in the ETRM inventory. Custom integrations that need to detect draft state should call GET_ONLINE_AUTH_STATUS_CODE or SUPPLIER_AUTH_ALLOWED before attempting document changes. Because LOCK_DOCUMENT_WITH_VALIDATE performs both locking and validation, callers should treat a failed return status as a signal to abort the modification rather than retry blindly, and should commit or roll back promptly to release the row lock. Given the age of the header, compatibility with 12.1.1 and 12.2.2 should be verified against the installed package body, since later EBS releases may have introduced additional procedures or changed the underlying PO_DRAFTS structure.