SAP Document purchase_order

Purchase Order

A binding commitment to a supplier to buy goods or services. No stock, no G/L effect โ€” but it drives MRP and starts the three-way match.

A Purchase Order (PO) is the legal commitment from your company to a supplier: an undertaking to buy the listed items or services, at the agreed prices, delivered to the agreed place and date. It is the pivotal document of the procure-to-pay chain. Unlike a quotation it is binding, yet like a quotation it moves nothing in the warehouse or the ledger when it is raised โ€” its effect is a commitment, tracked and reported, not a posting.

Purpose

A PO answers the question “what have we agreed to buy, and from whom?” It converts an internal need (a purchase request, a low-stock signal, a chosen quotation) into a firm order placed on a supplier. Once issued it becomes the reference point everyone works against: the warehouse checks arriving goods against it, and accounts payable checks the supplier’s invoice against it.

The PO is the anchor of the three-way match โ€” the discipline of comparing what was ordered (PO), what was received (Goods Receipt PO), and what was billed (A/P Invoice) before releasing payment. Without a PO there is no order of record to match against, so buying without one quietly removes the main financial control over purchasing.

Because it is a commitment rather than a transaction, an open PO also feeds planning: it shows in MRP and stock projections as incoming stock, so the business can plan around goods that are on their way but not yet received.

Position in the document chain

The PO sits in the middle of the purchasing chain: it is copied from a purchase quotation (or raised directly), and copied into a Goods Receipt PO when the goods arrive, and ultimately an A/P Invoice when the supplier bills.

flowchart TD
    PQ[Purchase Quotation] -->|supplier chosen| PO[Purchase Order]
    PO -->|goods arrive| GRPO[Goods Receipt PO]
    GRPO -->|supplier invoices| API[A/P Invoice]
    API -->|payment due| OP([Outgoing Payment])

    style PO fill:#ede9fe,stroke:#7c3aed,stroke-width:3px
    style PQ fill:#ede9fe,stroke:#7c3aed
    style GRPO fill:#dcfce7,stroke:#16a34a
    style API fill:#fef9c3,stroke:#ca8a04
  • Copies from: a Purchase Quotation (optional), or nothing โ€” a PO can be raised directly.
  • Becomes: a Goods Receipt PO when goods are received, then an A/P Invoice when the supplier bills. The BaseType / BaseEntry / BaseLine fields on the target document’s lines point back to this PO, forming the traceable chain.

Partial fulfilment is normal: a single PO can be received in several GRPOs and billed across several invoices. The PO stays bost_Open until every line is fully received (or the remainder is closed manually).

Key fields

A PO is a Document entity โ€” the universal base shared by every SAP B1 transactional document โ€” distinguished by its DocObjectCode of oPurchaseOrders (22). The supplier is a business partner of vendor type, so its CardCode is a V-code (e.g. V001).

Header

FieldMeaning
DocEntryInternal primary key (assigned by SAP).
DocNumUser-visible document number.
DocObjectCodeoPurchaseOrders (22) โ€” identifies this as a PO.
CardCodeSupplier’s business-partner code โ€” a vendor V-code (e.g. V001).
CardNameSupplier name (defaults from the BP master).
DocDatePosting date (string, YYYYMMDD).
DocDueDateRequested delivery date.
DocCurrencyCurrency of the order.
DocTotalOrder total in document currency.
DocumentStatusbost_Open until fully received / closed.
CommentsFree-text remarks to the supplier.

Lines (DocumentLines collection)

FieldMeaning
LineNum0-based line index.
ItemCodeItem master code.
QuantityQuantity ordered.
PriceUnit price before VAT โ€” the agreed purchase price.
LineTotalQuantity ร— Price.
WarehouseCodeThe warehouse the goods are destined for (drives where a later GRPO lands stock).
VatGroupTax code for the line.
ShipDateRequired delivery date for the line.
BaseType / BaseEntry / BaseLineSet when the PO was copied from a quotation โ€” the chain link back to the source.

Stock and G/L effect

None. Raising a PO posts no journal entry and moves no inventory. It is a commitment, not a transaction. Its only “effect” is visibility: the ordered quantity appears as open purchase orders โ€” incoming stock โ€” in MRP, stock projections, and purchase-analysis reports. Stock and the general ledger stay untouched until the Goods Receipt PO is posted against it.

Service Layer entity

PropertyValue
SL entityPurchaseOrders
Object codeoPurchaseOrders (22)
Norma path/b1s/v1/PurchaseOrders

(SAP’s current generally-available Service Layer is /b1s/v2/; Norma’s connector and mock both speak /b1s/v1/PurchaseOrders.)

How to create it in Norma

Use the create_purchase_order tool. It needs:

  • card_code โ€” the supplier’s code, a vendor V-code (e.g. V001).
  • lines โ€” each an item_code + quantity.

Every Norma write is held for human review before it reaches SAP. The tool prepares the purchase order, the review gate shows exactly what will be created (supplier, lines, quantities, total), and only on approval does the connector POST it to /b1s/v1/PurchaseOrders. Nothing is written to SAP until a human approves โ€” the same gate guards every purchasing write, because a PO is a real financial commitment to a supplier.