Skip to content
SAP Reference

XD02

Change S/4HANA status: Replaced

Change Customer (Centrally)

Module: SD · Sales & Distribution S/4HANA replacement: BP
Notes

Customer master maintenance is consolidated into the Business Partner transaction (BP) via Customer/Vendor Integration (CVI) in S/4HANA.

What the badges mean
S/4HANA status: Active
Active and unchanged in S/4HANA.
S/4HANA status: Deprecated
Still readable today, but no longer SAP's strategic path — plan around it.
S/4HANA status: Replaced
Replaced by a new persistence in S/4HANA; the classic name may still answer reads (see read mechanism).
S/4HANA status: Migrating to IBP
Planning scope is moving from APO toward IBP.
S/4HANA status: Active (StRM) · Replaced (EWM)
Path-dependent: active with SAP Stock Room Management, replaced where EWM is the warehouse path.
S/4HANA status: Replaced · Compat View
Compatibility view: the classic table name is redirected to a view over the new persistence — see how the physical model moved.
S/4HANA status: Active · Proxy View
Proxy view: reads route through NSDM proxy/CDS views — see how the physical model moved.
master
Data class: what the table holds — master data, transaction documents, org structure, config, or texts (one row per language — see the quirks guide).
In field listings, K marks a primary-key field, and linked type codes in the Type column jump to the matching quirks-guide section.

Boilerplate SQL

Databricks SQL

Starting point for querying the tables behind this transaction. Set your Unity Catalog location and filter values below — they’re substituted into the SQL and the copy button.

Query parameters

5 parameters not filled: <catalog>, <schema>, <MANDT>, <KUNNR>, <VKORG>

-- ============================================================
-- T-Code : XD02 Change Customer (Centrally)
-- Purpose: Change customer master centrally
-- Grain  : One row per customer / sales area combination
-- Tables : KNA1, KNB1, KNVV, T001, TVKOT
-- Notes  : KNA1 = general, KNB1 = company-code (accounting), KNVV = sales-area (sales org / distribution channel / division). In S/4HANA, the Business Partner (BUT000) replaces customer master — this ECC pattern still works via compatibility views.
-- ============================================================
SELECT
  -- Keys
  c.MANDT   AS "Client",
  c.KUNNR   AS "Customer",
  kb.BUKRS  AS "Company Code",
  kv.VKORG  AS "Sales Organization",
  kv.VTWEG  AS "Distribution Channel",
  kv.SPART  AS "Division",

  -- Descriptive text
  c.NAME1   AS "Customer Name",
  c.NAME2   AS "Customer Name 2",

  -- Dates
  c.ERDAT   AS "Created On",
  c.UPDAT   AS "Changed On",

  -- Status / indicators
  c.LOEVM   AS "Central Deletion Flag",
  c.SPERR   AS "Central Posting Block",

  -- Org fields
  c.ORT01   AS "City",
  c.PSTLZ   AS "Postal Code",
  c.LAND1   AS "Country",
  c.REGIO   AS "Region",
  c.TELF1   AS "Telephone",
  c.STCEG   AS "VAT Registration Number",
  cc.BUTXT  AS "Company Code Name",
  so.VTEXT  AS "Sales Organization Name",

  -- Master data enrichment
  c.KTOKD   AS "Customer Account Group",
  kb.AKONT  AS "Reconciliation Account",
  kb.ZTERM  AS "Terms of Payment (FI)",
  kv.KDGRP  AS "Customer Group",
  kv.BZIRK  AS "Sales District",
  kv.KLABC  AS "ABC Classification",
  kv.ZTERM  AS "Terms of Payment (SD)"
FROM <catalog>.<schema>.kna1 c
LEFT JOIN <catalog>.<schema>.knb1 kb
  ON  kb.MANDT = c.MANDT
  AND kb.KUNNR = c.KUNNR
LEFT JOIN <catalog>.<schema>.knvv kv
  ON  kv.MANDT = c.MANDT
  AND kv.KUNNR = c.KUNNR
LEFT JOIN <catalog>.<schema>.t001 cc
  ON  cc.MANDT = kb.MANDT
  AND cc.BUKRS = kb.BUKRS
LEFT JOIN <catalog>.<schema>.tvkot so
  ON  so.MANDT = kv.MANDT
  AND so.VKORG = kv.VKORG
  AND so.SPRAS = 'E'
WHERE
  c.MANDT = '<MANDT>'
  AND c.KUNNR = '<KUNNR>'
  -- AND kv.VKORG = '<VKORG>'
  -- AND c.LOEVM <> 'X'
ORDER BY c.KUNNR, kb.BUKRS, kv.VKORG;

Tables Used by This Transaction

How these tables connect — join details in the list below.

Join details

  • KNB1KNA1foreign key · N:1
    ON knb1.KUNNR = kna1.KUNNR
  • KNVVKNA1foreign key · N:1
    ON knvv.KUNNR = kna1.KUNNR

More Sales & Distribution t-codes