Skip to content

MARA — General Material Master Data

Client-independent fields for every material; one row per material number regardless of plant or storage location.

Purpose

MARA holds the attributes that apply to a material across the whole system: material type, material group, base unit of measure, industry sector, and lifecycle dates. It is the root table of the material master; all plant- and storage-location-specific data lives in MARC and MARD respectively.

Key fields

Field Type Description
MANDT CLNT(3) Client
MATNR CHAR(18) Material number (may carry leading zeros)
MTART CHAR(4) Material type: ROH=Raw material FERT=Finished product HAWA=Trading goods
MATKL CHAR(9) Material group
MEINS UNIT(3) Base unit of measure
MBRSH CHAR(1) Industry sector
ERSDA DATS(8) Creation date
LAEDA DATS(8) Date of last change

Common queries

All finished goods

SELECT matnr, matkl, meins, ersda
  INTO TABLE @DATA(lt_fert)
  FROM mara
  WHERE mandt = @sy-mandt
    AND mtart = 'FERT'.

Materials belonging to a specific material group

SELECT matnr, mtart, meins
  INTO TABLE @DATA(lt_by_group)
  FROM mara
  WHERE mandt  = @sy-mandt
    AND matkl  = @lv_matkl.

Materials created in the last 30 days

DATA(lv_from) = sy-datum - 30.

SELECT matnr, mtart, matkl, ersda
  INTO TABLE @DATA(lt_recent)
  FROM mara
  WHERE mandt = @sy-mandt
    AND ersda >= @lv_from
  ORDER BY ersda DESCENDING.

Joins

Join target Key fields Purpose
MARC MATNR Plant-level data (MRP, storage location, status)
MAKT MATNR + SPRAS Material short text / descriptions by language
MARD MATNR + WERKS + LGORT Storage-location stock quantities
" Material number with description (current logon language)
SELECT m~matnr, m~mtart, m~matkl, t~maktx
  INTO TABLE @DATA(lt_mat_desc)
  FROM mara AS m
  INNER JOIN makt AS t ON t~mandt = m~mandt
                       AND t~matnr = m~matnr
                       AND t~spras = @sy-langu
  WHERE m~mandt = @sy-mandt
    AND m~mtart = 'FERT'.

Pitfalls

MARA contains no plant or stock data

Fields like storage location, MRP settings, and stock quantities do not exist in MARA. Join to MARC for plant data and MARD for stock levels. A material present in MARA may not yet be extended to any plant.

Leading zeros in MATNR

Material numbers are stored internally with leading zeros padded to 18 characters (e.g., 000000000000001234). Use function module CONVERSION_EXIT_MATN1_INPUT to convert an external number before querying, or use LIKE '%1234' as a last resort.

Always filter MANDT

Without a MANDT filter the query scans all clients. MARA is a large table and cross-client reads are almost never intentional.

See also

  • marc.md — Plant-level material data
  • vbak-vbap.md — Sales orders referencing MATNR in VBAP

Comments