Sub topic 15
Migrating existing customers and suppliers
This chapter covers moving existing customer and supplier records to business partners. That happens in two main situations: converting an SAP ERP system to S/4HANA, and loading data from a legacy system into a new S/4HANA system.
It assumes you know the earlier chapters on CVI, groupings, number ranges and role mapping, and the configuration chapter just before this one. You also need to be comfortable reading tables such as KNA1, LFA1, BUT000, CVICUSTLINK and CVIVENDLINK.
Two migration paths
Both paths end in the same state: every customer and supplier has a business partner, and CVI links them.
| Path | Starting point | Tool | Main risk |
|---|---|---|---|
| System conversion | Existing ERP system with KNA1 and LFA1 data | Pre-check report, CVI customizing, synchronization cockpit | Inconsistent legacy data blocks the conversion |
| New implementation or data load | Files or tables from a legacy system | SAP S/4HANA Migration Cockpit | Wrong grouping, role or number range in the load templates |
In a conversion, the customer and supplier records already exist. The migration creates a business partner for each one and writes the link rows. In a data load, you create the business partner and let CVI create the customer or supplier, as it does in transaction BP.
Migration in a system conversion
The conversion blocks until all customers and suppliers have a business partner, so the work happens in a fixed order before the technical upgrade.
flowchart TDThe block above is not a diagram. The real diagram follows.
Step 1: Run the pre-check
The pre-check report PRECHECKUPGRADATIONREPORT runs in the source ERP system. It looks for conditions that would make synchronization fail. Typical findings are:
- Customers or suppliers with account groups that have no assigned business partner grouping.
- Number ranges that cannot hold the existing numbers.
- Missing or invalid values in fields that the business partner requires, such as country, language or a valid title.
- Customers or suppliers that already share the same business partner by an earlier link, but have inconsistent data.
Run the pre-check early and repeat it. Data keeps changing in a productive system, so a clean result weeks before the cut-over does not stay clean.
Step 2: Configure CVI for the migration
Synchronization needs the same customizing you met in the configuration chapter, and the conversion adds one requirement. The mapping must work in both directions, from business partner to customer or supplier and back.
- Assign a business partner grouping to each customer account group and each supplier account group.
- Set the number assignment so the business partner number equals the customer or supplier number. This is the same-number approach.
- Check that the business partner role, such as FLCU00 or FLVN00, is assigned for each direction.
The same-number approach keeps references stable. Interfaces, reports and users keep working with the numbers they know. It only works when the business partner number range covers every existing number and has no overlap with numbers already taken. Plan this before any load runs. Changing a number range after business partners exist is much harder.
> Keep the grouping assignment simple. If several account groups map to one grouping, the grouping's number range must accept the numbers from all of them.
Step 3: Run the synchronization load
Transaction MDSLOADCOCKPIT runs the load. It converts customers and suppliers in packages, creates a business partner for each one, and writes the entries in CVICUSTLINK and CVIVENDLINK. You can run customers and suppliers separately and restart failed packages.
What the load does with the old data:
- Customer and supplier general data goes to the business partner general data.
- Company code, sales area and purchasing organization data stays in the customer and supplier tables, now linked to the partner.
- Contact persons in KNVK become business partner relationships.
- A customer and a supplier that carry the same tax number or an explicit link can end up on one partner. Check this case separately, because the load does not decide it for you. The dual-role chapter covers the data conflicts.
Step 4: Verify the result
Check the links with a query before you continue. This report lists customers and suppliers that still have no link row.
REPORT z_cvi_unlinked_check.
SELECT k~kunnr
FROM kna1 AS k
LEFT OUTER JOIN cvi_cust_link AS c
ON c~customer = k~kunnr
WHERE c~customer IS NULL
INTO TABLE @DATA(lt_customers)
UP TO 100 ROWS.
SELECT l~lifnr
FROM lfa1 AS l
LEFT OUTER JOIN cvi_vend_link AS v
ON v~vendor = l~lifnr
WHERE v~vendor IS NULL
INTO TABLE @DATA(lt_vendors)
UP TO 100 ROWS.
WRITE: / 'Customers without link:', lines( lt_customers ),
/ 'Suppliers without link:', lines( lt_vendors ).The target for a finished migration is zero in both lines. Remove the row limit when you do the final check, because the limit of 100 hides the true count. Archived or flagged-for-deletion records may also appear, so decide with the business how to treat them.
Migration into a new system
When you load data into a new S/4HANA system, you do not convert anything. You use the SAP S/4HANA Migration Cockpit with the migration objects for business partners, customers and suppliers. The cockpit creates the business partner, which triggers CVI.
The points that cause most load failures:
- Grouping and number range. Each row needs a valid grouping. With external number assignment, the number in the file must fall inside the grouping's range.
- Roles. A row without a role creates a partner that is neither customer nor supplier. Include the role, such as FLCU00 or FLVN00, or the matching sales or purchasing role if you load that data.
- Organizational data. Sales area and company code values must already exist in customizing. A missing sales area fails only that row's sales data, and the general data may still load.
- Load order. Load organizational structures and customizing first, then partners, then any dependent data such as open items or credit data.
Always run the load in a test system with a full copy of the extract. Read the error list by message, not by count. Hundreds of errors usually trace back to two or three causes, such as one missing grouping.
Common failures and what they mean
| Symptom | Likely cause | Fix |
|---|---|---|
| Pre-check reports an account group with no grouping | Missing grouping assignment | Assign a grouping to the account group |
| Load stops with a number already in use | Overlapping number ranges | Adjust ranges before the load, not after |
| Partner exists but has no customer | Missing role or failed CVI sync | Add the role, check the synchronization log |
| Contact persons missing | Relationship data failed on a required field | Fix the contact record and rerun that package |
| Duplicate partners for one company | Customer and supplier loaded as separate partners | Merge deliberately, using the dual-role approach |
Planning the cut-over
Treat the migration as a project with measurable exit criteria, not a single run.
- Freeze or limit master data changes for the load window.
- Do at least one complete rehearsal on a recent copy of production, and time it. Load duration is the main input to your downtime plan.
- Count records before and after: customers in KNA1, suppliers in LFA1, and partners with links.
- Test business processes after the load, such as creating a sales order and posting a supplier invoice, not just the master data.
- Keep the log of the final run as evidence.
Exercise
After a conversion load, your check report shows 12 suppliers in LFA1 without a row in CVIVENDLINK. What are two things you check first, and why should you not simply create the link rows by hand?
Show answer
First read the synchronization or load log for those suppliers, and check whether their account group has a business partner grouping and whether the supplier numbers fit the grouping's number range. These are the usual causes of a failed package. Creating link rows by hand is wrong because a link row alone leaves out the business partner itself, its roles and its general data. The result would be inconsistent. Fix the cause and rerun the load for the failed packages so CVI creates the partner and the link together.