October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
The Finance Base
The Money Desk · Blog
Re:

3 Steps to Creating Purchase Orders via API in Oracle E-Business Suite R12

The supported Oracle EBS R12 purchase-order integration pattern is PDOI plus Import Standard Purchase Orders—not a universal single PL/SQL call. Learn the three steps, required data, approval states, reconciliation and recovery paths.
From TheFinanceBase Team7 min to read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Oracle E-Business Suite R12, the supported standard-purchase-order creation flow is usually not one PL/SQL call. Load validated data into the Purchasing Documents Open Interface (PDOI), run the Import Standard Purchase Orders concurrent program (commonly executable POXPOPDOI), then reconcile the request and resulting document. Oracle describes this interface-plus-import process here: Purchasing Documents Open Interface.

This guide uses “API” broadly. A SOAP PurchaseOrderService is a separate creation option, while PO_DOCUMENT_CONTROL_PUB is for actions on an existing document, such as approval or cancellation—not a replacement for PDOI creation.

What “API” means in R12 Purchasing

These mechanisms are related but not interchangeable:

  • Open interface: your program stages rows in interface tables; Oracle validates and imports them.
  • Concurrent program: Import Standard Purchase Orders processes those rows and creates the PO.
  • Web service: Oracle’s PurchaseOrderService exposes a service operation for creating purchase orders.
  • Document-control API: PO_DOCUMENT_CONTROL_PUB performs control actions on an existing document.
  • Direct base-table inserts: unsupported because they bypass Purchasing validation, defaulting, workflow and related processing.

Oracle’s interface reference lists PDOI components including PO_HEADERS_INTERFACE, PO_LINES_INTERFACE, PO_PRICE_DIFF_INTERFACE and PO_DISTRIBUTIONS_INTERFACE: R12 Purchasing interface reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before you load anything: confirm the R12 setup

Check the release and patch level (R12.1 or R12.2), and test in the same responsibility, operating-unit and security context used by the integration. Purchasing is multi-organization; supplier, site, buyer and accounting values must belong to the applicable operating unit.

  • Purchasing responsibility and operating-unit context.
  • Active supplier and supplier site with the required Purchasing and Payables functions.
  • Buyer configured as a Purchasing agent.
  • Standard Purchase Order document style and valid currency.
  • Ship-to and bill-to locations, receiving organization and payment terms where required.
  • For item lines: item, destination organization, category, line type and unit of measure.
  • For expense or inventory distributions: valid charge account or accounting combination.
  • Approval rules, limits, workflow, tax, receiving, encumbrance and project-accounting requirements.
  • Database access to the appropriate application schema and permission to submit concurrent requests.

Oracle’s R12 procurement scenarios identify operating unit, responsibility, document style, supplier, supplier site and buyer as key setup data: Purchasing setup and web-service scenario.

Step 1: Populate the Purchasing Documents Open Interface

Use the complete document hierarchy

A typical standard PO follows this logical structure:

PO_HEADERS_INTERFACE
 └── PO_LINES_INTERFACE
      └── PO_LINE_LOCATIONS_INTERFACE
           └── PO_DISTRIBUTIONS_INTERFACE

The exact rows depend on the line type, destination and implementation. A basic document normally has one header, one or more lines, shipment (line-location) rows, and distributions when accounting, destination or allocation requires them. Do not assume that header and line rows alone produce a complete, usable PO.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Resolve Oracle IDs before insertion

External names and codes often are not accepted directly. Resolve supplier, supplier site, buyer, item, organization, location, line type, UOM and accounting combinations to the internal IDs expected by your installed interface definition. Validate active dates, operating-unit assignments and cross-references before creating interface rows.

Illustrative fields

These examples orient development; they are not a universal list of required columns. Confirm mandatory columns and valid values against your installed R12 documentation and patch level.

Level Illustrative values
Header interface_header_id, batch_id, action, org_id, document_type_code, document_subtype, agent_id, vendor_id, vendor_site_id, currency_code, approval_status
Line interface_line_id, interface_header_id, line_num, line_type_id, item_id or description, category_id, quantity, unit_price, unit_of_measure
Shipment Line-location identifier, ship-to organization/location, quantity, need-by date and receiving controls as required
Distribution Distribution identifier, quantity, destination type/organization, subinventory and code_combination_id or other accounting fields

Use staging and correlation

  1. Receive the source payload in a custom staging table.
  2. Resolve Oracle IDs and validate supplier/site, item, UOM, organization, location, buyer and account data.
  3. Assign unique interface IDs and a controlled batch ID.
  4. Insert the validated batch into PDOI tables.
  5. Store the source-system document ID in staging or a custom audit structure.
  6. Commit before submitting the concurrent request when submission uses another session.

Use a unique constraint on source system plus source document ID. PDOI does not prevent a retry from creating a duplicate PO.

Structural PL/SQL template

DECLARE
  l_request_id NUMBER;
BEGIN
  -- Resolve and validate org, supplier/site, buyer, item,
  -- locations, line type, UOM and accounting values.

  INSERT INTO po_headers_interface (
      interface_header_id, batch_id, action, org_id,
      document_type_code, document_subtype, agent_id,
      vendor_id, vendor_site_id, currency_code, approval_status
  ) VALUES (
      :header_interface_id, :batch_id, 'ORIGINAL', :org_id,
      'STANDARD', 'STANDARD', :agent_id,
      :vendor_id, :vendor_site_id, :currency_code, 'INCOMPLETE'
  );

  INSERT INTO po_lines_interface (
      interface_line_id, interface_header_id, action,
      line_num, line_type_id, item_id, quantity,
      unit_price, unit_of_measure
  ) VALUES (
      :line_interface_id, :header_interface_id, 'ADD',
      1, :line_type_id, :item_id, :quantity,
      :unit_price, :uom
  );

  -- Insert required shipment and distribution rows.
  COMMIT;
  -- Submit Import Standard Purchase Orders through the
  -- supported concurrent-request mechanism for this installation.
END;
/

The exact application initialization sequence, including responsibility and operating-unit context, depends on how the code runs. Calls such as FND_GLOBAL.APPS_INITIALIZE and MO_GLOBAL routines are common in custom programs, but should be verified for the chosen execution method rather than copied as a universal recipe.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 2: Run Import Standard Purchase Orders

Submit the concurrent program commonly identified as POXPOPDOI. It validates the interface rows and creates the standard PO. Capture the concurrent request ID and associate it with the source document, batch ID and interface header ID.

Approval-status choices

Import choice Result
INCOMPLETE Creates the document without completing approval processing.
APPROVED Requests an approved result where Purchasing controls permit it; this is not a universal approval bypass.
INITIATE APPROVAL Creates the document and starts configured approval processing.

Approval authority, document rules and workflow still determine whether a document can be approved. Oracle also documents parameters such as Default Buyer and Create or Update Item; an invalid buyer supplied in the interface can cause an error rather than being silently replaced: Import Standard Purchase Orders documentation.

The process is normally asynchronous. A successful submission only means the request was queued; it does not mean the PO was created or approved.

Step 3: Retrieve, verify and reconcile the PO

After the request finishes, record the interface header ID, batch ID, request ID, resulting PO header ID and document number. Verify through supported application views or the Purchasing forms; do not infer success from a committed interface insert.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verification checklist

  • Header: supplier, supplier site, operating unit, buyer, currency, document type/style and approval status.
  • Lines: item or description, category, quantity, UOM and unit price.
  • Shipments: ship-to organization/location, need-by date and receiving controls.
  • Distributions: charge account, destination, quantity allocation and project/task fields where applicable.

Keep separate states for submission failed, import failed, PO created, incomplete, pending approval, approved and rejected. A created PO is not necessarily an approved PO.

Transaction and retry rules

  • Use one identifiable batch per source transaction or controlled group.
  • Do not commit halfway through a document unless restart logic explicitly supports partial data.
  • Before retrying a timeout, search by source ID and request history; the first request may have completed.
  • Never delete or alter rows already accepted or being processed without following Oracle’s restart and cleanup guidance.

Troubleshooting rejected interface records

Symptom Likely cause Corrective action
Supplier or site error Inactive site, wrong operating-unit assignment, or site not enabled for the required function Resolve the supplier-site relationship in supported application views, correct staging data and resubmit using the installation’s cleanup procedure.
Buyer error Buyer is not an active Purchasing agent or conflicts with the default buyer Correct the agent or parameter and validate operating-unit availability.
Line rejected Invalid item, UOM, category or line type Classify the line correctly as item-based, description-based expense, service or another configured type, then supply compatible values.
Shipment or distribution rejected Missing destination, account, shipment quantity or allocation Add valid line-location and distribution data; ensure distribution quantities reconcile to shipment quantities.
PO created but not approved Approval hierarchy, limits or workflow configuration Inspect the resulting approval status and workflow; creation and approval are separate outcomes.
Duplicate PO risk Retry after timeout or repeated batch submission Reconcile source ID, request ID, interface rows and existing documents before retrying.
Import request failed Invalid or partially processed interface data Record the request and messages, inspect processing-status fields, correct or purge unprocessed data as directed, reinsert corrected rows and resubmit.

Oracle’s documented restart approach is to identify the failed request, record its errors, review PO_HEADERS_INTERFACE and PO_LINES_INTERFACE, inspect fields such as PROCESS_CODE and INTERFACE_STATUS_CODE, clean up unprocessed data, and resubmit: Import Standard Purchase Order restart guidance. Do not casually update status columns or Purchasing base tables; partially processed data may require an Oracle-supported data fix or Support case.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When PDOI is not the best choice

Purchasing web service

Oracle documents PurchaseOrderService with a create-purchase-order operation. It suits service-oriented integrations that need a SOAP contract and can support the required deployment, WSDL, security and middleware configuration. Oracle’s testing scenario lists web-service deployment/configuration and SOAP UI/WSDL mapping prerequisites: R12 web-service scenario.

Compared with PDOI, a web service can provide a more service-shaped interface but introduces web, security and network troubleshooting, and its payload behavior may differ from the interface tables.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Requisition-first processing

If policy requires requester approval or sourcing, import or create a requisition, obtain approval, then autocreate or otherwise process it into a PO. Oracle documents workflow for requisition and purchase-order approvals and automatic document creation: Purchasing workflow documentation.

Document-control API

Use PO_DOCUMENT_CONTROL_PUB for control actions on an existing document. Oracle lists it as a document-control API, not as the central standard-PO creation mechanism: R12 Purchasing API reference.

Do not confuse EBS R12 with Fusion Procurement

Oracle Fusion Cloud Procurement REST resources use Fusion-specific URLs, roles, payloads and privileges. They are not automatically available in EBS R12 and cannot substitute for PDOI, R12 web services or R12 PL/SQL integrations. See the separate Fusion documentation for purchase-order REST APIs and inbound Purchasing REST integrations.

Production readiness checklist

  • R12 release, patch level and supported interface definition confirmed.
  • Correct responsibility, security and operating-unit context established.
  • Supplier/site, buyer, item or description line, UOM, locations and accounts validated.
  • Shipment and distribution rows complete for the document’s destination and accounting model.
  • Unique source correlation key enforced.
  • Interface, batch and concurrent request IDs persisted.
  • Approval result checked separately from creation result.
  • Interface errors, retries and duplicate detection monitored.
  • Restart and cleanup procedure tested in a representative environment.
  • No direct inserts into Purchasing base tables.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More post from the Money Desk

  1. The Money DeskBlogTheFinanceBase07 MAR 2625 minWhat Is a 457 Plan?
  2. The Money DeskBlogTheFinanceBase07 MAR 2621 minTime Value of Money: What It Is and How It Works
  3. The Money DeskBlogTheFinanceBase07 MAR 2627 minAre You Living in One of These Top 10 Most Expensive Cities to Retire?
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.