SAP Document purchase_return

Purchase Return

Sends received goods back to a supplier. Decreases stock and reverses the GRNI accrual โ€” the mirror of a Goods Receipt PO.

A Purchase Return records goods going back to a supplier โ€” the reversal of a Goods Receipt PO. It is the document that corrects the physical side of purchasing: where the GRPO increased stock when goods arrived, the Purchase Return decreases it when goods leave again. It handles damaged, wrong, surplus, or rejected deliveries.

Purpose

A Purchase Return answers the question “we received these goods, but they are going back โ€” undo the receipt.” When received goods are found faulty, incorrect, or simply not wanted, the warehouse ships them back to the supplier and records a Purchase Return against the original Goods Receipt PO. This removes the goods from stock and reverses the accrued liability, so both inventory and the ledger reflect that the goods are no longer held.

The Purchase Return is the goods-movement reversal. It is distinct from the A/P Credit Memo, which reverses the money on an A/P Invoice. When a supplier has already invoiced, the return of goods is typically paired with a credit memo so both the stock and the payable are corrected; when the goods are sent back before any invoice, the Purchase Return alone reverses the GRNI accrual.

Position in the document chain

The Purchase Return branches off the Goods Receipt PO: it copies from the GRPO and reverses it. When money has also changed hands, an A/P Credit Memo settles the value.

flowchart TD
    PO[Purchase Order] --> GRPO[Goods Receipt PO]
    GRPO -->|goods sent back| PRET[Purchase Return]
    PRET -.->|value credited| ACM[A/P Credit Memo]

    style PRET fill:#fee2e2,stroke:#dc2626,stroke-width:3px
    style GRPO fill:#dcfce7,stroke:#16a34a
    style PO fill:#ede9fe,stroke:#7c3aed
    style ACM fill:#fef9c3,stroke:#ca8a04
  • Copies from: a Goods Receipt PO (normal), or nothing โ€” it can be raised directly.
  • Relates to: an A/P Credit Memo when the goods were already invoiced (the credit memo reverses the money; the return reverses the stock).

Each return line carries BaseType / BaseEntry / BaseLine pointing back to the GRPO line it reverses, so partial returns match cleanly against the original receipt.

Key fields

A Purchase Return is a Document entity โ€” the universal base shared by every SAP B1 transactional document โ€” distinguished by its DocObjectCode of oPurchaseReturns (21). The supplier’s CardCode is a vendor V-code (e.g. V001).

Header

FieldMeaning
DocEntryInternal primary key (assigned by SAP).
DocNumUser-visible document number.
DocObjectCodeoPurchaseReturns (21) โ€” identifies this as a Purchase Return.
CardCodeSupplier’s business-partner code โ€” a vendor V-code (e.g. V001).
CardNameSupplier name (defaults from the BP master).
DocDatePosting date โ€” when stock is removed and the accrual reversed (string, YYYYMMDD).
DocCurrencyCurrency of the return.
DocTotalValue of goods returned, in document currency.
DocumentStatusbost_Open / bost_Close.
TransNumG/L transaction number of the reversing journal entry.

Lines (DocumentLines collection)

FieldMeaning
LineNum0-based line index.
ItemCodeItem master code.
QuantityQuantity being returned.
PriceUnit cost โ€” used to value the stock removal and accrual reversal.
LineTotalQuantity ร— Price.
WarehouseCodeThe warehouse the stock leaves โ€” decides where inventory decreases.
BaseType / BaseEntry / BaseLineChain link back to the originating GRPO line.

Stock and G/L effect

Stock decreases by the returned quantity out of each line’s WarehouseCode โ€” the exact reverse of the Goods Receipt PO.

Under perpetual inventory it also posts a reversing journal entry: it credits Inventory (the asset leaves) and debits Goods Received Not Invoiced (unwinding the accrual the GRPO had raised) โ€” the mirror image of the GRPO posting:

Purchase Return (goods sent back, reverses the receipt):

DR  Goods Received Not Invoiced        1,000
CR      Inventory                             1,000

If the goods had already been invoiced, the GRNI accrual is no longer open, so the value side is corrected by a paired A/P Credit Memo instead. A return into (or out of) the wrong warehouse mis-states location stock, the same risk as a GRPO into the wrong place.

Service Layer entity

PropertyValue
SL entityPurchaseReturns
Object codeoPurchaseReturns (21)
Norma path/b1s/v1/PurchaseReturns

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

How to create it in Norma

Use the create_purchase_return tool. It needs:

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

Every Norma write is held for human review before it reaches SAP. A Purchase Return moves real stock out and reverses the accrual, so the review gate shows exactly what will be returned (supplier, lines, quantities, warehouse, value) before anything posts. Only on approval does the connector POST it to /b1s/v1/PurchaseReturns. Nothing is written to SAP until a human approves.