βš™οΈSAPTools

MARA: General Material Data

MM

MARA is the central material master table in SAP ERP. It holds one row per material number with the data that applies across the whole company: material type, material group, base unit of measure, weights and industry sector. Anything that depends on a plant, storage location, valuation area or language is stored in dependent tables such as MARC, MBEW and MAKT, all linked through MATNR.

Primary key

MATNR

plus the client field

Module

MM

Fields in this reference

12

How the MARA key works

The primary key is MANDT plus MATNR. Open SQL applies the client automatically, so queries normally filter on MATNR alone. Purely numeric material numbers are stored with leading zeros, so pass user input through the MATN1 conversion exit (function module CONVERSION_EXIT_MATN1_INPUT) before comparing it with MARA-MATNR.

MARA fields

FieldType / data elementLengthDescription
πŸ”‘MANDTCLNT3Client
πŸ”‘MATNRMATNR18Material Number
ERSDADATUM8Created On
ERNAMUNAME12Created By
MTARTMTART4Material Type
MBRSHMBRSH1Industry Sector
MATKLMATKL9Material Group
MEINSMEINS3Base Unit of Measure
BRGEWBRGEW13Gross Weight
NTGEWNTGEW13Net Weight
GEWEIGEWEI3Weight Unit
BISMTBISMT18Old Material Number

This is a curated subset of the most commonly used fields, not the complete table definition. A real system contains more fields and can differ by release and customizing, so confirm the definition in transaction SE11 before relying on it.

Example ABAP SELECT for MARA

" Open SQL applies the client (MANDT) automatically, so it is not part of the WHERE clause.
DATA lv_matnr TYPE mara-matnr.

SELECT ersda, ernam, mtart
  FROM mara
  WHERE matnr = @lv_matnr
  INTO TABLE @DATA(lt_mara).

Modern Open SQL with host variables (ABAP 7.40 and later). Need a different field list or conditions? Build it in the ABAP SELECT Builder.

MARA in SAP S/4HANA

In SAP S/4HANA the material number can be up to 40 characters long, while classic ECC systems use 18. Avoid hard-coding the length and declare variables with the data element, for example TYPE mara-matnr.

Tables related to MARA

  • MARC (joined on MATNR): Plant-level data such as MRP settings and the purchasing group.
  • MBEW (joined on MATNR): Valuation data: price control, standard price and moving average price.
  • MAKT (joined on MATNR + SPRAS): Material descriptions per language. MARA itself stores no text.
  • EKPO (joined on MATNR): Purchase order items that reference the material.
  • VBAP (joined on MATNR): Sales order items that reference the material.

Practical tips for MARA

  • Read the material description from MAKT (key MATNR + SPRAS). MARA has no description field.
  • A real MARA has far more fields than this reference lists, so select only the columns you need instead of using SELECT *.
  • To check whether a material is maintained in a plant, look for a row in MARC instead of testing fields in MARA.

MARA FAQ

What is the primary key of the MARA table?

MANDT and MATNR. Because the client is handled automatically in Open SQL, you normally filter on MATNR only.

Where is the material description stored?

In table MAKT, keyed by the material number (MATNR) and the language key (SPRAS). MARA contains only language-independent data.

Keep exploring