PCH1 table in SAP Business One (A/P Invoice (rows))
PCH1 is the SAP Business One table that stores the rows of A/P invoices: one row per item or service, with quantity, price, row total, tax, G/L account and warehouse. It joins to the header OPCH on DocEntry. BaseType 22 means the row came from a purchase order and 20 from a goods receipt PO.
What is the PCH1 table in SAP B1?
PCH1 is the SAP Business One table for the rows of A/P invoices (vendor invoices). Each row holds one item or service with its quantity, price, row total, tax and G/L account, and joins to the OPCH header on DocEntry. BaseType, BaseEntry and BaseLine point back to the purchase order or goods receipt PO row.
Where is the PCH1 table in SAP B1?
In SAP Business One 10.0, PCH1 is the "A/P Invoice - Rows" table with 343 columns. You see its data in Purchasing - A/P → A/P Invoice (header table OPCH).
| Table | PCH1 A/P Invoice - Rows (child of OPCH) |
|---|---|
| Object type (ObjType) | 18 (oPurchaseInvoices), the object type of OPCH |
| Menu path | Purchasing - A/P → A/P Invoice |
| DI API object | Documents (oPurchaseInvoices) |
| Service Layer entity | PurchaseInvoices (request builder) |
| Columns | 343 in SAP B1 10.0 (SDK database tables reference) |
PCH1 key fields
| Field | SAP type | What it holds |
|---|---|---|
DocEntry | Int(11) | Header key. Joins to OPCH.DocEntry. |
LineNum | Int(11) | Row number inside the invoice. |
ItemCode | nVarChar(50) | Item. Joins to OITM.ItemCode. Empty on service invoice rows. |
Dscription | nVarChar(200) | Item or service description (SAP spelling). |
Quantity | Num(19,6) | Quantity invoiced. |
Price / PriceBefDi | Num(19,6) | Price after the row discount / unit price before it. |
DiscPrcnt | Num(19,6) | Row discount in percent. |
LineTotal / TotalFrgn | Num(19,6) | Row total in local currency / in foreign currency, before tax. |
VatGroup / VatSum | nVarChar(8) / Num(19,6) | Tax group of the row (joins to OVTG.Code) and its tax amount. |
AcctCode | nVarChar(15) | G/L account of the row. Joins to OACT.AcctCode. |
WhsCode | nVarChar(8) | Warehouse. Joins to OWHS.WhsCode. |
BaseType | Int(11) | Base document type: 22 = purchase order, 20 = goods receipt PO. |
BaseEntry / BaseLine | Int(11) | Base document key and row. |
OcrCode / Project | nVarChar(8) / nVarChar(20) | Distribution rule (cost center) and project of the row. |
Types as listed in the SAP Business One 10.0 SDK database tables reference: nVarChar(n) is text of up to n characters, Num(19,6) a decimal with 6 places. Column names are the same on SQL Server and SAP HANA.
How PCH1 relates to other tables
PCH1 rows belong to one OPCH header (DocEntry). BaseType 20 with BaseEntry and BaseLine points to the goods receipt PO row in PDN1, and BaseType 22 to the purchase order row in POR1. When the invoice is credited, TargetType 19 and TrgetEntry point forward to the A/P credit memo (ORPC).
Common joins
PCH1 T1 INNER JOIN OPCH T0 ON T0.DocEntry = T1.DocEntry (header)PCH1 T1 LEFT JOIN OPDN T2 ON T2.DocEntry = T1.BaseEntry AND T1.BaseType = 20 (goods receipt PO)PCH1 T1 LEFT JOIN OPOR T3 ON T3.DocEntry = T1.BaseEntry AND T1.BaseType = 22 (purchase order)PCH1 T1 LEFT JOIN OITM T4 ON T4.ItemCode = T1.ItemCode (item master)
When you use the PCH1 table
Use PCH1 for purchase analysis by item, vendor or G/L account, for three-way match checks between purchase order, goods receipt and invoice, and for the last invoiced price per item.
Example query: a/p invoice rows with their goods receipt po or purchase order
SQL Server
SELECT T0.DocNum AS InvoiceNum, T0.DocDate, T0.CardCode, T1.ItemCode, T1.Quantity, T1.Price, T1.LineTotal, T2.DocNum AS GrpoNum, T3.DocNum AS PoNum FROM OPCH T0 INNER JOIN PCH1 T1 ON T1.DocEntry = T0.DocEntry LEFT JOIN OPDN T2 ON T2.DocEntry = T1.BaseEntry AND T1.BaseType = 20 LEFT JOIN OPOR T3 ON T3.DocEntry = T1.BaseEntry AND T1.BaseType = 22 WHERE T0.CANCELED = 'N' ORDER BY T0.DocDate DESC, T0.DocNum, T1.LineNum
SAP HANA (column names in double quotes)
SELECT T0."DocNum" AS "InvoiceNum", T0."DocDate", T0."CardCode", T1."ItemCode", T1."Quantity", T1."Price", T1."LineTotal", T2."DocNum" AS "GrpoNum", T3."DocNum" AS "PoNum" FROM OPCH T0 INNER JOIN PCH1 T1 ON T1."DocEntry" = T0."DocEntry" LEFT JOIN OPDN T2 ON T2."DocEntry" = T1."BaseEntry" AND T1."BaseType" = 20 LEFT JOIN OPOR T3 ON T3."DocEntry" = T1."BaseEntry" AND T1."BaseType" = 22 WHERE T0."CANCELED" = 'N' ORDER BY T0."DocDate" DESC, T0."DocNum", T1."LineNum"
Paste either version in Tools → Queries → Query Generator. Need the other dialect for your own query? Use the SQL to HANA converter.
Common pitfall: Service invoice rows have no ItemCode
On a service-type A/P invoice the rows carry a description and a G/L account (AcctCode) but no ItemCode. An INNER JOIN to OITM silently drops them, so purchase totals come out too low. Use a LEFT JOIN to OITM, and group expenses by AcctCode when you need the full spend. LineTotal is also before the header discount on OPCH.DiscPrcnt. See OPCH table (A/P invoice header).
Ready-made queries that use PCH1
- Last purchase price per item: The most recent A/P invoice price, vendor and date for every item.
- Vendor aging report (AP aging): Open A/P invoice balance per vendor in due-date buckets.
Building something on PCH1?
Reading PCH1 (A/P Invoice (rows)) in a query is the easy part. We build SAP Business One vendor portals: vendors confirm purchase orders and delivery dates, upload invoices as A/P drafts and check payment status. Or hire a dedicated SAP B1 developer for the whole job, fixed price per phase.
Questions about the PCH1 table
What is the PCH1 table in SAP B1?
PCH1 is the SAP Business One table for the rows of A/P invoices (vendor invoices). Each row holds one item or service with its quantity, price, row total, tax and G/L account, and joins to the OPCH header on DocEntry. BaseType, BaseEntry and BaseLine point back to the purchase order or goods receipt PO row.
What is the difference between OPCH and PCH1?
OPCH is the A/P invoice header (vendor, dates, totals, status), with one row per invoice. PCH1 holds the rows (items or services, quantities, prices, accounts). They join on DocEntry.
How do I link a PCH1 row to its purchase order?
If the invoice was copied from the purchase order: PCH1.BaseType = 22, PCH1.BaseEntry = OPOR.DocEntry and PCH1.BaseLine = POR1.LineNum. If it was copied from a goods receipt PO, BaseType is 20 and the receipt row in PDN1 points to the order.
Does PCH1.LineTotal include tax?
No. LineTotal is the row total before tax; the tax amount of the row is in VatSum. LineTotal is in local currency and TotalFrgn in the foreign currency of the document.
How do I find the A/P credit memo for an invoice row?
PCH1.TargetType = 19 and PCH1.TrgetEntry = ORPC.DocEntry. From the credit memo side, RPC1.BaseType = 18 and RPC1.BaseEntry = OPCH.DocEntry.
Related tables
OPCH (A/P Invoice (header)) · POR1 (Purchase Order (rows)) · PDN1 (Goods Receipt PO (rows)) · RPC1 (A/P Credit Memo (rows)) · search all SAP Business One tables
Sources: SAP Business One documentation and SDK (DI API database tables reference), SAP Help Portal; SDK 10.0 table page for PCH1.
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.
