SAP tables for data migration: KNA1, LFA1, MARA, BSEG and where each column goes
- United States
- United Kingdom
- European Union
- India
- UAE
- Australia
- Canada
In short
A migration out of SAP usually needs a dozen tables. KNA1 and LFA1 hold customers and vendors, with company-code data in KNB1 and LFB1 and sales data in KNVV. MARA holds materials, with names in MAKT and plant data in MARC. SKA1 and SKB1 hold the chart of accounts. BSID and BSIK hold open customer and vendor items, BKPF and BSEG accounting documents, and ACDOCA the S/4HANA universal journal. Addresses users see often come from ADRC, linked by ADRNR. Load masters first, then open items.
The tables, grouped by what they hold
SAP splits each business object across several tables: general data, data per company code, data per sales area or plant. A migration needs the general table and usually one or two of the others. The table below lists the ones Aletheon recognises by name, with the column that identifies each record.
| Group | Table | Holds | Key column |
|---|---|---|---|
| Customers | KNA1 | Customer master: general data | KUNNR |
| Customers | KNB1 | Customer master: company code data | KUNNR + BUKRS |
| Customers | KNVV | Customer master: sales data | KUNNR + sales area |
| Vendors | LFA1 | Vendor master: general data | LIFNR |
| Vendors | LFB1 | Vendor master: company code data | LIFNR + BUKRS |
| Business partners | BUT000 | Business partner: general data (S/4HANA) | PARTNER |
| Addresses | ADRC | Addresses | ADDRNUMBER |
| Materials | MARA | Material master: general data | MATNR |
| Materials | MAKT | Material descriptions, per language | MATNR + SPRAS |
| Materials | MARC | Material master: plant data | MATNR + plant |
| Accounts | SKA1 | G/L account master (chart of accounts) | SAKNR |
| Accounts | SKAT | G/L account texts | SAKNR + SPRAS |
| Accounts | SKB1 | G/L account master (company code) | SAKNR + BUKRS |
| Organisation | T001 | Company codes | BUKRS |
| Organisation | CSKS | Cost center master | KOSTL |
| Finance | BKPF | Accounting document header | BUKRS + BELNR + GJAHR |
| Finance | BSEG | Accounting document line items | BUKRS + BELNR + GJAHR + BUZEI |
| Finance | ACDOCA | Universal journal entry line items (S/4HANA) | Document and line |
| Finance | BSID | Customer open items | Customer and document |
| Finance | BSIK | Vendor open items | Vendor and document |
| Assets | ANLA | Asset master record | Asset number |
| Sales | VBAK | Sales document header | VBELN |
| Sales | VBAP | Sales document items | VBELN + POSNR |
| Purchasing | EKKO | Purchasing document header | EBELN |
| Purchasing | EKPO | Purchasing document items | EBELN + EBELP |
| HR | PA0001 | HR master record: organisational assignment | PERNR |
| HR | PA0002 | HR master record: personal data | PERNR |
Customer and vendor columns, and where they go
KNA1 and LFA1 share most of their columns, so one map serves both. The right-hand column shows where each one lands on an Odoo contact (res.partner), as an example of a destination. Country and region are codes in SAP (DE, BY) and links to records in Odoo, so they are matched by code rather than copied as text. KNA1 has its own guide, with the tables around it and how to export it: KNA1 table in SAP.
| SAP column | Meaning | Odoo contact field |
|---|---|---|
| KUNNR / LIFNR | Customer / vendor number | ref (keep the leading zeros) |
| NAME1 | Name 1 | name |
| NAME2 to NAME4 | Name 2 to 4 (continuation) | Usually joined to name, or kept in a note |
| STRAS | Street and house number | street |
| ORT01 | City | city |
| PSTLZ | Postal code | zip (text) |
| REGIO | Region (state, province) | state_id, matched by code |
| LAND1 | Country key | country_id, matched by ISO code |
| TELF1 | Telephone number | phone |
| SMTP_ADDR | E-mail address (ADRC/ADR6 rather than KNA1) | |
| STCEG | VAT registration number | vat |
| STCD1 | Tax number 1 | Country-specific; often a custom field |
| SPRAS | Language key | lang, mapped from SAP's code |
| KTOKD / KTOKK | Account group | Usually a tag or category |
| LOEVM | Deletion flag (X = marked for deletion) | Filter: usually not migrated |
| SPERR | Posting block (X = blocked) | Decide: archive or migrate as inactive |
Where the address really lives: KNA1 or ADRC
KNA1 and LFA1 carry name and address columns, but in many systems the address users see is maintained in the central address table ADRC, linked by the address number ADRNR. Fivetran's troubleshooting note explains why NAME1 to NAME4 in KNA1 can be shorter than what the SAP screen shows: the screen reads ADRC (Fivetran (opens in a new tab)). SAP's own KBA on reading these fields names both tables (SAP KBA 3328402 (opens in a new tab)).
So download ADRC with KNA1 and LFA1, and compare a few records with the SAP screen before trusting either. On S/4HANA, customers and vendors are business partners (BUT000), with KNA1 and LFA1 kept in step with them.
Materials, accounts and open items
Materials. MARA has the number (MATNR), type (MTART) and base unit (MEINS), but not the name: names are in MAKT, one row per language (SPRAS). Join MAKT for the language you want, or every product arrives unnamed. In Odoo, MATNR usually becomes the internal reference (default_code) and MAKTX the product name.
Accounts. SKA1 holds the chart of accounts and SKAT the account names, again per language. SKB1 holds the settings per company code. Many projects keep SAP's account numbers. Others map them to the destination's chart, which is a decision for the finance team, not a field map.
Open items. BSID and BSIK hold open customer and vendor items. In S/4HANA, the line items live in the universal journal (ACDOCA), and BSEG and the open-item tables remain for compatibility. For a move to another system, open items usually travel as one balance per invoice. Amounts are unsigned with SHKZG for debit or credit, as described in SAP downloads that break on import.
Load order
Parents before children, so every line points at something that already exists. SAP's own data migration guidance for S/4HANA follows the same order: organisational data and G/L accounts, then customers, vendors and materials, then open items and balances (SAP Help (opens in a new tab)).
- Company codes and the chart of accounts (T001, SKA1, SKAT, SKB1).
- Business partners and addresses (KNA1, LFA1, ADRC, KNB1, LFB1, or BUT000 on S/4HANA).
- Materials and their names (MARA, MAKT, MARC).
- Open items and balances (BSID, BSIK, or BKPF and BSEG for the selected documents).
- Open sales and purchase orders, if they move at all (VBAK, VBAP, EKKO, EKPO).
What Aletheon does with these tables
When an upload shows SAP's table names and columns, the SAP profile describes 27 tables and 71 columns and gives each a plain alias the mapper matches on (KNA1 to customers, ORT01 to city, STCEG to vat_number). Code columns stay text and YYYYMMDD dates become dates. When a master table's key is unique in the file, it becomes the key, and the same column in other tables becomes a link to it: BSEG.KUNNR to KNA1.KUNNR, for example. Nothing is renamed and no value is changed.
The limits matter too. SAP pathways are planned with you and quoted after a paid discovery; they are not self-serve. Aletheon reads SAP from files. The S/4HANA OData connector is read-only and has not been run against a live system. And Aletheon does not write journal entries or invoices into Odoo yet, so accounting history moves as opening balances. The free check and the details are on the SAP page (opens in a new tab).
| Column | Why | Usual rule |
|---|---|---|
| KUNNR, LIFNR, MATNR | Zero-padded codes | Keep as text; keep the same form in every file |
| NAME2 to NAME4 | Name continued over several columns | Join or keep separately; decide once |
| ADRNR | Address held in ADRC | Join ADRC; compare with the SAP screen |
| LAND1, REGIO, SPRAS | SAP codes | Match to the destination's countries, states and languages |
| LOEVM, SPERR | Deleted or blocked records | Filter out, or migrate as archived |
| MAKTX, TXT50 | Text per language | Pick the language; keep others if supported |
| DMBTR + SHKZG | Unsigned amount and debit/credit flag | Apply the sign: H is negative |
| ERDAT, ENDDA | YYYYMMDD, 00000000, 99991231 | Read as dates; empty for zeros; decide on open-ended |
Questions people ask
What is the KNA1 table in SAP?
KNA1 is the customer master table for general data: customer number (KUNNR), name, address, country, tax numbers and account group. Company-code data is in KNB1 and sales-area data in KNVV.
Should I export customer addresses from KNA1 or ADRC?
Check both. In many systems the address users see is kept in ADRC, linked by the address number ADRNR, and the name and address columns in KNA1 can differ. Download ADRC with KNA1 and compare a few records with the SAP screen.
Where are material names in SAP?
In MAKT, not MARA. MAKT has one description per material and language (SPRAS), so join it for the language you want.
In what order should SAP master data be migrated?
Organisation and the chart of accounts first, then business partners and addresses, then materials, then open items and balances. Every later record then points at a customer, vendor, material or account that already exists.
Can Aletheon migrate SAP data to Odoo?
It reads SAP downloads, recognises the tables and maps master data such as customers, vendors and products, which it can write into Odoo. It does not write accounting entries into Odoo yet, so balances move as opening balances. SAP projects are quoted after a paid discovery; checking your files is free.
Sources
Try it on your own data
Run the free sample, read the reconciliation report, roll it back if you like.
Check your SAP downloads free