OCRN table in SAP Business One (Currencies)

OCRN is the SAP Business One currencies table: one row per currency code with its name, ISO code, decimals, rounding and the names printed on checks. Documents store the currency in DocCur and business partners in OCRD.Currency. The daily exchange rates of each currency are in ORTT, joined on ORTT.Currency = OCRN.CurrCode.

OCRN key fields

FieldWhat it holds
CurrCodeCurrency code, the key. OINV.DocCur, OCRD.Currency and ORTT.Currency point to it.
CurrNameCurrency name.
ISOCurrCodISO currency code, for example AED.
ISOCurrNumISO currency number.
DocCurrCodName printed on documents.
Decimals-1 = default, 0 = without decimals, 1 to 6 = number of digits.
RoundSys0 = no rounding, 1 = round to ten hundredth, 2 = round to one, 3 = round to ten, 4 = round to five hundredth.
RoundPymY = rounding in payments.
ChkName / Chk100NameNames printed on checks.
MaxInDiff / MaxOutDiffIncoming and outgoing amount difference allowed.
LockedY = locked.

How OCRN relates to other tables

OCRN is master data. ORTT holds one exchange rate per currency and date (Currency, RateDate, Rate). Document headers store DocCur, document lines store Currency (INV1.Currency) and business partners store OCRD.Currency, all pointing to OCRN.CurrCode.

Common joins

  • OCRN T0 LEFT JOIN ORTT T1 ON T1.Currency = T0.CurrCode (exchange rates of the currency)
  • OINV T2 INNER JOIN OCRN T0 ON T0.CurrCode = T2.DocCur (currency of the invoice)
  • OCRD T3 LEFT JOIN OCRN T0 ON T0.CurrCode = T3.Currency (currency of the business partner)

When you use the OCRN table

Use OCRN to map internal currency codes to ISO codes for bank files and e-invoices, to show the currency name on reports, and to list foreign-currency customers.

Example query: currencies with iso code and today's rate

SQL Server

SELECT T0.CurrCode, T0.CurrName, T0.ISOCurrCod, T0.Decimals, T1.Rate AS TodayRate
FROM OCRN T0
LEFT JOIN ORTT T1 ON T1.Currency = T0.CurrCode AND T1.RateDate = CAST(GETDATE() AS date)
ORDER BY T0.CurrCode

SAP HANA (column names in double quotes)

SELECT T0."CurrCode", T0."CurrName", T0."ISOCurrCod", T0."Decimals", T1."Rate" AS "TodayRate"
FROM OCRN T0
LEFT JOIN ORTT T1 ON T1."Currency" = T0."CurrCode" AND T1."RateDate" = CAST(CURRENT_TIMESTAMP AS date)
ORDER BY T0."CurrCode"

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

Common pitfall: Internal code is not always the ISO code

CurrCode is whatever the company set up, for example "$" or "EUR", and it can differ from the ISO code. Bank payment files and e-invoices need the ISO code, so read OCRN.ISOCurrCod instead of printing DocCur. The local currency has no rows in ORTT. See ORTT table (exchange rates).

Ready-made queries that use OCRN

  • Customer balances: All customers with a non-zero account balance, with credit limit and phone.

Questions about the OCRN table

Where are exchange rates stored in SAP Business One?

In ORTT, one row per currency and date, joined on ORTT.Currency = OCRN.CurrCode.

Does OCRN store the ISO currency code?

Yes, in ISOCurrCod, plus the ISO number in ISOCurrNum.

Which document column holds the currency?

DocCur on the header (for example OINV.DocCur) and Currency on the lines.

Related tables

ORTT (Exchange Rates) · OINV (A/R Invoice (header)) · OCRD (Business Partners) · 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.