OIGN table in SAP Business One (Goods Receipt (header))

OIGN is the SAP Business One table that stores the header of every goods receipt, the inventory document that adds stock without a purchase order, for example opening stock, found items or finished goods from production. Its object type is 59. The rows are in IGN1, joined on DocEntry.

OIGN key fields

FieldWhat it holds
DocEntryInternal key. Joins to IGN1.DocEntry.
DocNumDocument number users see.
DocDatePosting date.
CANCELEDY = cancelled, N = not cancelled.
DocStatusO = open, C = closed.
DocTotalDocument total.
Ref2Reference 2.
Comments / JrnlMemoRemarks and journal remarks.
TransIdJournal entry created by the receipt. Joins to OJDT.TransId.
UserSignUser who created it. Joins to OUSR.
ObjTypeObject type, 59 = goods receipt.

How OIGN relates to other tables

OIGN is the header and IGN1 holds one row per item received, with WhsCode, Quantity, Price and AcctCode. A row created from a production order has IGN1.BaseType = 202 and BaseEntry = OWOR.DocEntry. Each posted row also writes a warehouse journal row in OINM, which updates stock in OITW.

Common joins

  • OIGN T0 INNER JOIN IGN1 T1 ON T1.DocEntry = T0.DocEntry (rows)
  • IGN1 T1 LEFT JOIN OWOR T2 ON T2.DocEntry = T1.BaseEntry AND T1.BaseType = 202 (production order)
  • OIGN T0 LEFT JOIN OJDT T3 ON T3.TransId = T0.TransId (journal entry)

When you use the OIGN table

Use OIGN with IGN1 to list manual stock additions per period, to separate receipts from production from other receipts, to audit who added stock and to check the offset account used on each row.

Example query: goods receipts of the last 30 days per row, production receipts flagged

SQL Server

SELECT T0.DocNum, T0.DocDate, T1.ItemCode, T1.WhsCode, T1.Quantity, T1.Price,
  T1.AcctCode, CASE WHEN T1.BaseType = 202 THEN 'Production' ELSE 'Manual' END AS Source
FROM OIGN T0
INNER JOIN IGN1 T1 ON T1.DocEntry = T0.DocEntry
WHERE T0.CANCELED = 'N' AND DATEDIFF(day, T0.DocDate, GETDATE()) <= 30
ORDER BY T0.DocDate DESC

SAP HANA (column names in double quotes)

SELECT T0."DocNum", T0."DocDate", T1."ItemCode", T1."WhsCode", T1."Quantity", T1."Price",
  T1."AcctCode", CASE WHEN T1."BaseType" = 202 THEN 'Production' ELSE 'Manual' END AS "Source"
FROM OIGN T0
INNER JOIN IGN1 T1 ON T1."DocEntry" = T0."DocEntry"
WHERE T0."CANCELED" = 'N' AND DAYS_BETWEEN(T0."DocDate", CURRENT_TIMESTAMP) <= 30
ORDER BY T0."DocDate" DESC

Paste either version in Tools → Queries → Query Generator. Need the other dialect for your own query? Use the SQL to HANA converter.

Common pitfall: Mixing production receipts with manual receipts

Finished goods reported from a production order are also goods receipts (IGN1.BaseType = 202). A report of "manual stock additions" that does not filter BaseType counts production output too. For stock on a date, use OINM, not OIGN. See OINM table (warehouse journal).

Ready-made queries that use OIGN

Questions about the OIGN table

What is the object type of a goods receipt in SAP B1?

59. It is the default of OIGN.ObjType and IGN1.ObjType.

Is OIGN the same as a goods receipt PO?

No. OIGN is the inventory goods receipt without a purchase order (object 59). The goods receipt PO is OPDN (object 20).

How do I find goods receipts from production orders?

Filter IGN1.BaseType = 202; IGN1.BaseEntry is the production order DocEntry in OWOR.

Related tables

IGN1 (Goods Receipt (rows)) · OIGE (Goods Issue (header)) · OINM (Warehouse Journal (inventory audit)) · OITW (Item stock per warehouse) · search all SAP Business One tables

Sources: SAP Business One documentation and SDK (DI API database tables reference), SAP Help Portal.

Ready to get started?

Tell us what you need. You get a clear technical answer, a fixed scope and a price, usually within 24 hours.