# SAP Business One SQL Server to HANA Migration Checklist

> Source: https://netray.co/tools/sap-b1-sql-server-to-hana-migration-checklist
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Pre-assessment, SQL rewrite, migration, validation and cut over checks for moving SAP Business One company databases from SQL Server to SAP HANA.

## Category

sap

## Erp

SAP Business One

## Audience

- SAP Business One consultant
- SAP Business One developer
- ERP administrator

## Tool

**Kind:** checklist

**Groups:**

#### 1. Pre-assessment

**Items:**

**Text:** Source SQL Server and target HANA installation run the same SAP Business One version and patch level

**Critical:** true

HANA hardware sized per the SAP Business One, version for SAP HANA hardware requirements guide

SUSE Linux Enterprise Server or Red Hat Enterprise Linux version listed in the Platform Support Matrix

**Text:** Every add-on is available in a HANA version from its vendor

**Critical:** true

Inventory saved queries, formatted searches, alerts and dashboards that contain SQL

**Text:** Inventory stored procedures: SBO_SP_TransactionNotification, SBO_SP_PostTransactionNotice and any custom procedures, views and functions

**Critical:** true

Inventory Crystal reports with SQL commands or direct SQL Server connections

List user-defined fields, tables and objects and confirm they are standard B1 UDF/UDT/UDO (no direct table changes)

#### 2. Rewrite

**Items:**

**Text:** Convert T-SQL to HANA SQL: ISNULL to IFNULL, GETDATE() to CURRENT_DATE or NOW(), DATEADD to ADD_DAYS / ADD_MONTHS, DATEDIFF to DAYS_BETWEEN

**Critical:** true

Quote mixed case or reserved identifiers with double quotes (for example "OITM"."ItemCode") and drop square brackets

Add FROM DUMMY to SELECTs without a table

Replace string concatenation with + by || or CONCAT

**Text:** Rewrite SBO_SP_TransactionNotification and SBO_SP_PostTransactionNotice in SQLScript, keeping the closing select :error, :error_message FROM DUMMY

**Critical:** true

Switch Crystal reports to the HANA ODBC driver (HDBODBC) and test each report

Change integration code to the HANA server type (DI API BoDataServerTypes.dst_HANADB) and HANA connection details

Retest every formatted search and saved query after conversion

#### 3. Migration

**Items:**

**Text:** Back up all SQL Server company databases and the common database before starting

**Critical:** true

Run the SQL Server to HANA migration tool described in the SAP Business One, version for SAP HANA Administrator's Guide

**Text:** Migrate each company database and keep the log per company

**Critical:** true

Review the migration log for warnings and failed objects

Deploy the rewritten stored procedures and views on the new schemas

#### 4. Validation

**Items:**

**Text:** Compare row counts of key tables (OINV, ORDR, OITM, OJDT, JDT1) between source and target

**Critical:** true

**Text:** Compare the trial balance for the current and previous period

**Critical:** true

Compare inventory valuation and stock by warehouse

Check open documents: open orders, deliveries, purchase orders and unpaid invoices

Test user authorizations and approval procedures

Test print layouts and Crystal reports

Test Service Layer endpoints and DI API integrations

#### 5. Cutover

**Items:**

**Text:** Freeze transactions on the SQL Server system

**Critical:** true

Run the final migration and repeat the validation checks

Point clients to the HANA System Landscape Directory (server name in the client login or DNS change)

Keep the SQL Server system read only for an agreed period, then decommission

**Scoring Note:** Tool names and supported versions change between feature packs. Confirm the migration procedure in the SAP Business One, version for SAP HANA Administrator's Guide for your exact version before you start.

## Content

**Intro:** This checklist covers moving SAP Business One company databases from Microsoft SQL Server to SAP Business One, version for SAP HANA. The heavy work is not the data move itself but rewriting SQL in queries, stored procedures, reports and integrations, so most items sit there.

**Sections:**

#### How to use it

**Body:** Start with the inventory in group 1; it decides the effort. Every place where SQL is written by hand needs review: saved queries, formatted searches, alerts, SP_TransactionNotification, Crystal reports and integration code. Do a full trial migration of a copy, run the validation group on it, then fix and repeat until the numbers match. Keep the exported checklist per company database.

#### T-SQL to HANA SQL differences

**Body:** HANA is stricter about identifiers: unquoted names are upper-cased, so B1 columns such as ItemCode need double quotes. Square brackets do not exist. Common function changes are ISNULL to IFNULL, GETDATE() to CURRENT_DATE or NOW(), DATEADD to ADD_DAYS or ADD_MONTHS, and DATEDIFF to DAYS_BETWEEN. SELECT without a table needs FROM DUMMY. Variables and procedural code in SBO_SP_TransactionNotification become SQLScript: declare error and error_message as local variables, assign with :=, reference them with a colon, and return them at the end with select :error, :error_message FROM DUMMY.

**Bullets:**

- SQL Server: SELECT ISNULL(T0.[ItemName], '') FROM OITM T0
- HANA: SELECT IFNULL(T0."ItemName", '') FROM OITM T0
- SQL Server: SELECT GETDATE()  HANA: SELECT CURRENT_DATE FROM DUMMY

#### Worked example

**Body:** A distributor has 2 company databases, 120 saved queries, 40 formatted searches, a 600 line SP_TransactionNotification, 25 Crystal reports and a DI API order import. The inventory shows the stored procedure and 15 reports with SQL commands are the main effort. After rewriting, the first trial migration finds a difference in open purchase orders caused by a custom view; once fixed, the trial balance and stock values match, and the final migration runs over a weekend.

#### Common mistakes

**Body:** Migrating between different B1 versions or patch levels, forgetting SP_PostTransactionNotice, testing queries only as a superuser, and leaving Crystal reports on the SQL Server connection. Another frequent issue is integration code that still sets the SQL Server type, so connections fail after cut over.

**Cta:** If you want your team to ask SAP Business One on HANA questions in plain English with data that never leaves your server, we can set up that private AI layer after the migration.

**Faq:**

#### How do I migrate SAP Business One from SQL Server to HANA?

**Answer:** Install SAP Business One, version for SAP HANA at the same version and patch as the source, rewrite custom SQL, stored procedures and reports for HANA, run the migration tool from the HANA Administrator's Guide per company database, then validate counts, balances and integrations before cut over.

#### Do I need to rewrite SP_TransactionNotification for HANA?

**Answer:** Yes. On HANA SBO_SP_TransactionNotification is a SQLScript procedure, so T-SQL code cannot be copied over: variables use := and a colon prefix, and the result is returned with select :error, :error_message FROM DUMMY. Rewrite the logic, test each validation and also convert SBO_SP_PostTransactionNotice if you use it.

#### Do Crystal reports work after the migration?

**Answer:** They work after you change the data source to the HANA ODBC driver and convert any SQL commands inside the report to HANA syntax. Test each report, since joins and functions in commands often need changes.

#### What changes in DI API code?

**Answer:** Set the server type to BoDataServerTypes.dst_HANADB and use the HANA server and port in the connection settings. Any direct SQL your code runs through Recordset objects must also use HANA syntax with quoted identifiers.

## Search terms

sap business one sql to hana migration, steps for sap b1 migration, sap business one hana installation, sap business one to hana, sap business one for hana, sp_transactionnotification hana

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
