AletheonAI Labs

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.

GroupTableHoldsKey column
CustomersKNA1Customer master: general dataKUNNR
CustomersKNB1Customer master: company code dataKUNNR + BUKRS
CustomersKNVVCustomer master: sales dataKUNNR + sales area
VendorsLFA1Vendor master: general dataLIFNR
VendorsLFB1Vendor master: company code dataLIFNR + BUKRS
Business partnersBUT000Business partner: general data (S/4HANA)PARTNER
AddressesADRCAddressesADDRNUMBER
MaterialsMARAMaterial master: general dataMATNR
MaterialsMAKTMaterial descriptions, per languageMATNR + SPRAS
MaterialsMARCMaterial master: plant dataMATNR + plant
AccountsSKA1G/L account master (chart of accounts)SAKNR
AccountsSKATG/L account textsSAKNR + SPRAS
AccountsSKB1G/L account master (company code)SAKNR + BUKRS
OrganisationT001Company codesBUKRS
OrganisationCSKSCost center masterKOSTL
FinanceBKPFAccounting document headerBUKRS + BELNR + GJAHR
FinanceBSEGAccounting document line itemsBUKRS + BELNR + GJAHR + BUZEI
FinanceACDOCAUniversal journal entry line items (S/4HANA)Document and line
FinanceBSIDCustomer open itemsCustomer and document
FinanceBSIKVendor open itemsVendor and document
AssetsANLAAsset master recordAsset number
SalesVBAKSales document headerVBELN
SalesVBAPSales document itemsVBELN + POSNR
PurchasingEKKOPurchasing document headerEBELN
PurchasingEKPOPurchasing document itemsEBELN + EBELP
HRPA0001HR master record: organisational assignmentPERNR
HRPA0002HR master record: personal dataPERNR
SAP tables recognised by Aletheon's SAP profile (27)

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 columnMeaningOdoo contact field
KUNNR / LIFNRCustomer / vendor numberref (keep the leading zeros)
NAME1Name 1name
NAME2 to NAME4Name 2 to 4 (continuation)Usually joined to name, or kept in a note
STRASStreet and house numberstreet
ORT01Citycity
PSTLZPostal codezip (text)
REGIORegion (state, province)state_id, matched by code
LAND1Country keycountry_id, matched by ISO code
TELF1Telephone numberphone
SMTP_ADDRE-mail address (ADRC/ADR6 rather than KNA1)email
STCEGVAT registration numbervat
STCD1Tax number 1Country-specific; often a custom field
SPRASLanguage keylang, mapped from SAP's code
KTOKD / KTOKKAccount groupUsually a tag or category
LOEVMDeletion flag (X = marked for deletion)Filter: usually not migrated
SPERRPosting block (X = blocked)Decide: archive or migrate as inactive
KNA1 / LFA1 columns, their meaning and an Odoo destination

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)).

  1. Company codes and the chart of accounts (T001, SKA1, SKAT, SKB1).
  2. Business partners and addresses (KNA1, LFA1, ADRC, KNB1, LFB1, or BUT000 on S/4HANA).
  3. Materials and their names (MARA, MAKT, MARC).
  4. Open items and balances (BSID, BSIK, or BKPF and BSEG for the selected documents).
  5. 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).

ColumnWhyUsual rule
KUNNR, LIFNR, MATNRZero-padded codesKeep as text; keep the same form in every file
NAME2 to NAME4Name continued over several columnsJoin or keep separately; decide once
ADRNRAddress held in ADRCJoin ADRC; compare with the SAP screen
LAND1, REGIO, SPRASSAP codesMatch to the destination's countries, states and languages
LOEVM, SPERRDeleted or blocked recordsFilter out, or migrate as archived
MAKTX, TXT50Text per languagePick the language; keep others if supported
DMBTR + SHKZGUnsigned amount and debit/credit flagApply the sign: H is negative
ERDAT, ENDDAYYYYMMDD, 00000000, 99991231Read as dates; empty for zeros; decide on open-ended
Columns that need a rule, not just a match

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
Start free sample

Keep reading

Contact us

SAP, multi-company Odoo or more than 2 million records?

Most migrations start with the free sample and need no call. For jobs above 2,000,000 records, SAP or multi-company ERP, or a pathway marked Contact us, tell us what you are moving and we will reply within one business day.

  • A reply from a person within one business day
  • A written plan and a price before any work starts
  • The same reconciliation report and rollback journal as every self-serve run
We reply within one business day, and use these details only to reply.