RPC1 table in SAP Business One (A/P Credit Memo (rows))
RPC1 is the SAP Business One table that stores the rows of A/P credit memos: one row per item or service credited by the vendor, with quantity, price, row total, tax and warehouse. It joins to the header ORPC on DocEntry, and BaseType 18 with BaseEntry points to the A/P invoice that was credited.
What is the RPC1 table in SAP B1?
RPC1 is the SAP Business One table for A/P credit memo rows. Each row is one item or service a vendor credited, with quantity, price, row total and tax, and joins to the ORPC header on DocEntry. BaseType 18 with BaseEntry and BaseLine points to the original A/P invoice row in PCH1; BaseType 21 points to a goods return.
Where is the RPC1 table in SAP B1?
In SAP Business One 10.0, RPC1 is the "A/P Credit Memo - Rows" table with 343 columns. You see its data in Purchasing - A/P → A/P Credit Memo (header table ORPC).
| Table | RPC1 A/P Credit Memo - Rows (child of ORPC) |
|---|---|
| Object type (ObjType) | 19 (oPurchaseCreditNotes), the object type of ORPC |
| Menu path | Purchasing - A/P → A/P Credit Memo |
| DI API object | Documents (oPurchaseCreditNotes) |
| Service Layer entity | PurchaseCreditNotes (request builder) |
| Columns | 343 in SAP B1 10.0 (SDK database tables reference) |
RPC1 key fields
| Field | SAP type | What it holds |
|---|---|---|
DocEntry | Int(11) | Header key. Joins to ORPC.DocEntry. |
LineNum | Int(11) | Row number inside the credit memo. |
ItemCode | nVarChar(50) | Item credited. Joins to OITM.ItemCode. Empty on service rows. |
Dscription | nVarChar(200) | Item or service description (SAP spelling). |
Quantity | Num(19,6) | Quantity credited. |
Price / PriceBefDi | Num(19,6) | Price after the row discount / unit price before it. |
LineTotal | Num(19,6) | Row total before tax, stored as a positive amount. |
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 the stock leaves. Joins to OWHS.WhsCode. |
BaseType | Int(11) | Base document type: 18 = A/P invoice, 21 = goods return. |
BaseEntry / BaseLine | Int(11) | Base document key and 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 RPC1 relates to other tables
RPC1 rows belong to one ORPC header (DocEntry). A credit memo copied from an A/P invoice stores BaseType 18, BaseEntry = OPCH.DocEntry and BaseLine = PCH1.LineNum, and the invoice row keeps TargetType 19. A credit memo copied from a goods return stores BaseType 21. A credit memo typed in directly has no base document.
Common joins
RPC1 T1 INNER JOIN ORPC T0 ON T0.DocEntry = T1.DocEntry (header)RPC1 T1 LEFT JOIN OPCH T2 ON T2.DocEntry = T1.BaseEntry AND T1.BaseType = 18 (credited A/P invoice)RPC1 T1 LEFT JOIN OITM T3 ON T3.ItemCode = T1.ItemCode (item master)
When you use the RPC1 table
Use RPC1 to subtract vendor credits from purchase analysis, to list credited items per vendor, and to check which A/P invoices were credited and for how much.
Example query: a/p credit memo rows with the invoice they credit
SQL Server
SELECT T0.DocNum AS CreditNum, T0.DocDate, T0.CardCode, T1.ItemCode, T1.Quantity, T1.LineTotal, T2.DocNum AS InvoiceNum FROM ORPC T0 INNER JOIN RPC1 T1 ON T1.DocEntry = T0.DocEntry LEFT JOIN OPCH T2 ON T2.DocEntry = T1.BaseEntry AND T1.BaseType = 18 WHERE T0.CANCELED = 'N' ORDER BY T0.DocDate DESC, T0.DocNum, T1.LineNum
SAP HANA (column names in double quotes)
SELECT T0."DocNum" AS "CreditNum", T0."DocDate", T0."CardCode", T1."ItemCode", T1."Quantity", T1."LineTotal", T2."DocNum" AS "InvoiceNum" FROM ORPC T0 INNER JOIN RPC1 T1 ON T1."DocEntry" = T0."DocEntry" LEFT JOIN OPCH T2 ON T2."DocEntry" = T1."BaseEntry" AND T1."BaseType" = 18 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: Credit memo amounts are stored as positive numbers
Quantity and LineTotal in RPC1 are positive, like on an invoice. A purchase report that adds PCH1 and RPC1 together counts credits as extra purchases. Subtract the RPC1 rows (or multiply them by -1 in a UNION ALL) to get net purchases, and remember that a credit memo without a base document has no link to an invoice. See ORPC table (A/P credit memo header).
Ready-made queries that use RPC1
- Vendor aging report (AP aging): Open A/P invoice balance per vendor in due-date buckets.
- Last purchase price per item: The most recent A/P invoice price, vendor and date for every item.
Building something on RPC1?
Reading RPC1 (A/P Credit Memo (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 remote SAP Business One developer for the whole job, fixed price per phase.
Questions about the RPC1 table
What is the RPC1 table in SAP B1?
RPC1 is the SAP Business One table for A/P credit memo rows. Each row is one item or service a vendor credited, with quantity, price, row total and tax, and joins to the ORPC header on DocEntry. BaseType 18 with BaseEntry and BaseLine points to the original A/P invoice row in PCH1; BaseType 21 points to a goods return.
How do I link an A/P credit memo row to the original invoice?
RPC1.BaseType = 18, RPC1.BaseEntry = OPCH.DocEntry and RPC1.BaseLine = PCH1.LineNum. Rows with no base document were entered directly and have no link.
What is the difference between ORPC and RPC1?
ORPC is the A/P credit memo header (vendor, dates, totals), with one row per credit memo. RPC1 holds the item or service rows. They join on DocEntry.
How do I get net purchases per item in SAP B1?
Add the A/P invoice rows from PCH1 and subtract the credit memo rows from RPC1, both joined to their headers with CANCELED = N. RPC1 amounts are positive, so they must be subtracted.
Related tables
ORPC (A/P Credit Memo (header)) · PCH1 (A/P Invoice (rows)) · OPCH (A/P Invoice (header)) · 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 RPC1.
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.
