RIN1 table in SAP Business One (A/R Credit Memo (lines))
RIN1 is the SAP Business One table that stores the lines of A/R credit memos: item, quantity, price, line total, warehouse and the document each line was copied from. It has no header data, so you join it to ORIN on DocEntry for the date, customer and cancel status.
RIN1 key fields
| Field | What it holds |
|---|---|
DocEntry | Key of the credit memo. Joins to ORIN.DocEntry. |
LineNum | Line number inside the credit memo, starting at 0. |
ItemCode | Item credited. Joins to OITM.ItemCode. Empty on service credit memos. |
Dscription | Line description (SAP spelling, same as INV1). |
Quantity | Quantity credited in the sales unit. |
Price | Unit price after the line discount. |
LineTotal | Line amount in local currency, before tax and before the header discount. |
WhsCode | Warehouse the returned stock goes back to. Joins to OWHS.WhsCode. |
NoInvtryMv | Y = line posted "Without Qty Posting": a price-only credit, no stock comes back. |
BaseType / BaseEntry / BaseLine | Source document: 13 = A/R invoice, 16 = sales return, -1 = no base document. |
AcctCode | Revenue or returns G/L account the line posts to. |
How RIN1 relates to other tables
RIN1 is the line table of ORIN; DocEntry + LineNum is the unique key of a line. BaseEntry and BaseLine point to the exact invoice line (INV1.DocEntry and INV1.LineNum) when BaseType = 13, which is how SAP B1 tracks how much of an invoice line is still open for crediting and why it refuses a credit quantity above the invoiced quantity.
Common joins
RIN1 T1 INNER JOIN ORIN T0 ON T1.DocEntry = T0.DocEntry (header)RIN1 T1 INNER JOIN INV1 T2 ON T1.BaseType = 13 AND T1.BaseEntry = T2.DocEntry AND T1.BaseLine = T2.LineNum (invoice line)RIN1 T1 LEFT JOIN OITM T3 ON T1.ItemCode = T3.ItemCode (item master)
When you use the RIN1 table
Use RIN1 for anything per item: returns by item or warehouse, return rate against INV1 quantities sold, and net item sales (INV1 minus RIN1). Quality and purchasing teams use the return quantities to find items with supplier or packing problems.
Example query: quantity returned and net credit per item
SQL Server
SELECT T1.ItemCode, T1.Dscription, SUM(T1.Quantity) AS QtyReturned, SUM(T1.LineTotal * (1 - T0.DiscPrcnt / 100.0)) AS NetCredit FROM ORIN T0 INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.CANCELED = 'N' AND T1.NoInvtryMv = 'N' AND T0.DocDate >= '20260101' GROUP BY T1.ItemCode, T1.Dscription ORDER BY QtyReturned DESC
SAP HANA (column names in double quotes)
SELECT T1."ItemCode", T1."Dscription", SUM(T1."Quantity") AS "QtyReturned", SUM(T1."LineTotal" * (1 - T0."DiscPrcnt" / 100.0)) AS "NetCredit" FROM ORIN T0 INNER JOIN RIN1 T1 ON T0."DocEntry" = T1."DocEntry" WHERE T0."CANCELED" = 'N' AND T1."NoInvtryMv" = 'N' AND T0."DocDate" >= '20260101' GROUP BY T1."ItemCode", T1."Dscription" ORDER BY "QtyReturned" 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: Price-only credits inflate return quantities
A credit memo line posted "Without Qty Posting" (NoInvtryMv = 'Y') still carries a Quantity (the price difference is calculated on it), even though nothing came back to the warehouse. If you sum RIN1.Quantity as returns without the filter used above, a simple price correction looks like a full return of the goods. For value reports keep those lines (they are real credits); for stock and return-rate reports exclude them. Apply the header discount factor as on INV1, or net sales from lines will not match the Sales Analysis report. See Why SAP B1 sales totals do not match (header discount).
Ready-made queries that use RIN1
- Top 20 selling items: Best-selling items by sales value, with quantity sold, for a date range.
Related tables
ORIN (A/R Credit Memo (header)) · INV1 (A/R Invoice (lines)) · OITM (Items (item master data)) · 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.
