Sub topic 9
Customer data: general, company code and sales area
This chapter assumes you know SAP GUI navigation, the classic customer master views (general, accounting, sales), and organizational units such as company code and sales area. It also assumes you know the business partner roles and how CVI links a partner to a customer. Here you will see where each level of customer data lives and how to read it.
The three levels of customer data
Classic customer data sits at three levels. Each level has its own key and its own scope.
| Level | Key | Typical content | Business partner role |
|---|---|---|---|
| General | Customer number | Name, address, tax numbers, communication data | FLCU00 or FLCU01 |
| Company code | Customer and company code | Reconciliation account, payment terms, dunning, payment methods | FLCU00 (FI customer) |
| Sales area | Customer, sales organization, distribution channel, division | Pricing, shipping, incoterms, partner functions | FLCU01 (customer) |
The general level holds data that is valid for the whole client. Company code data is valid for one legal entity. Sales area data is valid for one combination of sales organization, distribution channel and division.
Where the data is stored
In S/4HANA the business partner is the leading object. General data such as name and address is stored once, in the business partner tables (for example BUT000 and the address tables). CVI then creates and updates the classic customer tables. These tables stay in the system because sales, billing and accounting still read them.
- KNA1 holds general customer data.
- KNB1 holds company code data.
- KNVV holds sales area data.
The link table CVICUSTLINK connects the business partner (by its GUID) to the customer number.
How roles unlock the levels
Roles decide which levels you can maintain in transaction BP. The FI customer role (FLCU00) opens the company code data. The customer role (FLCU01) opens the sales area data. Both roles share the general data.
If a partner has no customer role, CVI does not create a customer. Adding a role later makes CVI create the customer record at that moment, using the same business partner number in most setups.
Reading the levels
The following query joins the partner header to the CVI link table. It returns the customer number behind each organization partner, which is the key you then use to reach KNA1, KNB1 and KNVV.
SELECT b~partner, c~customer
FROM but000 AS b
INNER JOIN cvi_cust_link AS c
ON c~partner_guid = b~partner_guid
WHERE b~type = '2'
INTO TABLE @DATA(lt_customers)
UP TO 10 ROWS.Through the released API you can read the same keys. This request returns five organization partners with their customer and supplier numbers.
GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$filter=BusinessPartnerCategory eq '2'&$select=BusinessPartner,BusinessPartnerFullName,BusinessPartnerGrouping,Customer,Supplier&$top=5
Accept: application/jsonCommon errors
- A customer has company code data but no sales area data. Orders fail because the partner lacks the customer role, or the sales area was never added.
- Data appears in BUT000 but not in KNA1. The CVI synchronization failed or the role is missing.
- Changes made directly in the customer tables are overwritten or rejected. Always maintain data in transaction BP.
Exercise
A user needs to maintain payment terms for a partner in company code 1000 and pricing data for sales area 1000/10/00. Which roles must the partner have, and in which tables will the data end up?
Show answer
The partner needs the FI customer role (FLCU00) for the company code data and the customer role (FLCU01) for the sales area data. Payment terms end up in KNB1, and sales area data ends up in KNVV. General data is in KNA1.