Sub topic 1
Where customer and vendor masters came from
The business partner model in SAP S/4HANA makes more sense once you know the problem it replaces. This chapter covers how SAP ERP stored customers and vendors as two separate master data objects, what that cost, and what changed in S/4HANA. The later chapters build on this.
Prerequisites
This chapter assumes the following:
- You can navigate SAP GUI and call transactions by code.
- You know what customer and vendor master data are used for in sales, purchasing and accounting.
- You know the organizational units company code, sales area and purchasing organization.
- You can read a simple relational join and understand primary keys.
Two masters for two processes
In SAP R/3 and SAP ERP (ECC), a customer and a vendor are two unrelated master data objects. Each one has its own transactions, tables, number ranges and authorization objects.
A customer is a party you sell to and invoice. A vendor (also called a supplier) is a party you buy from and pay. The two objects grew up inside different application areas, so each was shaped by the needs of its own process.
| Aspect | Customer master | Vendor master |
|---|---|---|
| Create transactions | XD01 (central), FD01 (accounting), VD01 (sales) | XK01 (central), FK01 (accounting), MK01 (purchasing) |
| General data table | KNA1 | LFA1 |
| Company code table | KNB1 | LFB1 |
| Organization-level table | KNVV (sales area) | LFM1 (purchasing organization) |
| Key field | KUNNR | LIFNR |
| Classification field | Account group (KTOKD) | Account group (KTOKK) |
The table names are worth remembering. They still exist in S/4HANA and you will meet them again in the chapters on CVI and on table access.
The data levels
Both masters are layered. Data valid for the whole client sits at the general level. Data that depends on an organizational unit sits at a lower level.
- General level: name, address, tax numbers, communication data and bank details. One record per customer or vendor in the client.
- Company code level: reconciliation account, payment terms and payment methods. One record per company code.
- Sales area or purchasing organization level: the sales area is a combination of sales organization, distribution channel and division, and holds pricing, shipping and delivery data. For vendors, the purchasing organization holds order currency and purchasing terms.
Account groups steer the master
Every customer and vendor belongs to an account group. The account group controls three things:
- Which number range the record draws its number from.
- Which fields are required, optional, hidden or display-only on the screens.
- Whether the record is a normal account or a one-time account.
Customers and vendors have separate account groups, with separate number ranges. Many companies ended up with a customer number that differed from the vendor number of the same real-world company. They also ended up with number intervals that were hard to align across systems.
Problems with the two-master design
The design worked for each process in isolation. It caused trouble wherever the two processes met.
- Duplicate data. A company that is both your customer and your supplier appears twice. Name, address, tax number and bank details are stored in KNA1 and again in LFA1. Someone has to change both records after a move or a bank change, and nothing forces them to.
- Inconsistent data. When only one record is updated, the two drift apart. Credit checks, dunning and netting then work on conflicting addresses and tax data.
- Weak linking. ECC offered a cross-reference. The customer record has a field for the vendor number (LIFNR in KNA1) and the vendor record has one for the customer number (KUNNR in LFA1). Clearing and netting between the two accounts relied on these fields. They were optional, entered by hand and not validated against the real-world identity of the partner.
- Separate person-like data. Contact persons and relationships were handled in each master with its own mechanisms (for example, the contact person tables for customers, and a different approach for vendors).
- Integration gaps with other SAP products. SAP CRM and SAP SRM already used a business partner object. Connecting them to ERP meant mapping partner records to customer and vendor records in middleware.
You can see how much overlap a system has with a short report. It lists customers that carry a vendor cross-reference.
REPORT zdemo_legacy_overlap.
SELECT kunnr, name1, ktokd, lifnr
FROM kna1
WHERE lifnr <> @space
ORDER BY kunnr
INTO TABLE @DATA(lt_overlap)
UP TO 20 ROWS.
cl_demo_output=>display( lt_overlap ).Every row is a company stored at least twice. Only rows where someone typed the vendor number show up, so the report understates the true duplication. A partner that was never linked looks like two unrelated companies.
The business partner as the first fix
SAP did not introduce the business partner in S/4HANA. It added it to ERP earlier as an option. Customer/Vendor Integration (CVI) kept the classic customer and vendor records in step with a business partner that could be maintained in transaction BP. Many ECC customers did not adopt it, because the classic transactions kept working and nothing forced them to.
The business partner idea has a simple core:
- One record represents the real-world party once, with one set of address, tax and bank data.
- The party takes on functions through roles. A partner with a customer role can be used in sales and billing. A partner with a supplier role can be used in purchasing and payables.
- The same partner can hold both roles without any copied data.
The following chapters explain each of these ideas. Here it is enough to see that the business partner removes the duplicate data. It does this by making the shared part of the master a single object and treating "customer" and "supplier" as roles on that object.
What changed in SAP S/4HANA
In S/4HANA the business partner approach is mandatory. SAP Note 2265093 documents it as a simplification item, which is relevant when you plan a conversion from ECC. The main consequences are these.
- Transaction BP is the maintenance transaction for customers and suppliers. The classic create and change transactions such as XD01 and XK01 are no longer the way to maintain these masters. In S/4HANA they are redirected or unavailable, depending on release.
- CVI is part of the system's standard operation. When you save a business partner with a customer or supplier role, CVI writes the corresponding customer or supplier records.
- The customer and supplier tables remain, because sales, billing, purchasing and accounting processes still read them. The business partner becomes the leading object, and the classic tables are kept in sync from it.
- Customer and vendor numbers are still used by those processes, so the link between business partner number and customer or supplier number must be defined. Chapters on groupings and number ranges cover this.
Summary of the shift
| Topic | ECC without CVI | S/4HANA |
|---|---|---|
| Leading object | Customer and vendor separately | Business partner |
| Maintenance transaction | XD01, XK01 and related | BP |
| Shared data | Stored twice | Stored once on the partner |
| Dual role | Manual cross-reference fields | Two roles on one partner |
| Customer or vendor tables | Primary storage | Kept in sync by CVI |
Exercise
A company is both a customer and a supplier in an ECC system without CVI. Name two data quality problems this setup can cause, and explain how the S/4HANA business partner model addresses them.
Show answer
The address, tax number and bank details are stored twice, in KNA1 and LFA1, so they can drift apart when only one record is updated. The cross-reference between the customer and the vendor (LIFNR in KNA1, KUNNR in LFA1) is optional and entered by hand, so netting and reporting may work on a partner that was never linked. In S/4HANA the shared data is stored once on a single business partner, and the customer and supplier functions are two roles on that partner, so one change updates both and no manual link is needed.
Exercise
Which tables hold the general data, company code data and organization-level data for a vendor in ECC?
Show answer
LFA1 holds the general data, LFB1 holds the company code data, and LFM1 holds the purchasing organization data.