Sub topic 16
Troubleshooting synchronization and data issues
This chapter assumes you know how roles, groupings and number ranges work, and what CVI does. You should also know the customer and supplier data levels, and be able to run a simple SQL or ABAP query. The goal is a repeatable way to find out why a business partner and its customer or supplier record disagree.
How synchronization fails
When you save a partner in transaction BP, CVI maps the business partner data to the classic customer (KNA1, KNB1, KNVV) and supplier (LFA1, LFB1, LFM1) structures. It then writes the link record in CVICUSTLINK or CVIVENDLINK. Everything downstream, such as sales orders and invoices, reads the classic tables. A partner without a link record is therefore invisible to those processes.
Three things go wrong in practice:
- The mapping never starts, because the partner has no role that triggers it.
- The mapping starts but the classic side rejects the data, because of number ranges, mandatory fields or account group rules.
- The data is created or changed somewhere other than transaction BP, so the two sides drift apart.
A diagnostic path
Work from the cheapest check to the most expensive one.
Common symptoms and causes
| Symptom | Likely cause | First check |
|---|---|---|
| Partner exists, but no customer number | The customer roles FLCU00 or FLCU01 are missing | Role tab in transaction BP, table BUT100 |
| Customer exists, but sales order says no sales area | The role FLCU01 is missing, or the sales area was never extended | Sales area data in BP, table KNVV |
| Save fails with a number range message | The BP grouping and the customer account group disagree | Grouping and account group number range assignments |
| Save works, but the customer is missing later | The error was stored as a post-processing order | Transaction MDS_PPO2 |
| API returns 403 on POST | The CSRF token is missing or expired | Fetch a new token with a GET first |
| Mandatory field error from the customer side | The account group field status requires a field that the BP screen did not fill | Field status of the account group |
Missing roles
The role decides which classic object is created. In the standard delivery, FLCU00 is the FI customer role. FLCU01 is the sales customer role. FLVN00 is the FI supplier role. FLVN01 is the purchasing supplier role. A partner with only a general role such as 000000 never gets a link record, and that is correct behavior.
Role problems usually show up in one of three ways:
- The role was never added. Add it in transaction BP and save.
- The role exists, but the role category is not mapped to a customer or supplier in the CVI customizing for the direction BP to customer or supplier. Check that mapping under Cross-Application Components, Master Data Synchronization.
- The sales or purchasing role is present, but no organizational data was entered. The FI role creates the company code data. The sales role needs a sales area.
Adding a role does not create the organizational data. You still maintain company code, sales area or purchasing organization data yourself. For the dual-role case, add both the customer and the supplier role, and check that each link table gets its own record.
Number conflicts
CVI needs each side to accept the same number, or to assign one that the other side accepts. Three configuration pieces must agree:
- The number range attached to the BP grouping.
- The number range of the customer account group, or the supplier account group, that the grouping maps to.
- The setting that keeps the business partner number equal to the customer or supplier number, if your project uses that convention.
Typical failures:
- The partner got a number that is already in use as a customer number from a legacy load.
- An external range on the BP side holds numbers that fall outside the interval of the classic account group.
- An internal range was assigned on both sides, so the two numbers differ and the same-number convention breaks.
Fix the customizing first, in a development or test client. Do not change number range intervals in production without checking the current number status. Deleting or shrinking a range can reissue numbers that are already in use.
Failed synchronization and post-processing orders
Depending on how a change arrives, an error either stops the save in transaction BP or is stored as a post-processing order. Open transaction MDS_PPO2 to see these orders. Each one holds the object, the message and the data that failed. The usual loop is:
- Read the message. It names the classic field or the rule that rejected the data.
- Correct the cause: customizing, missing master data such as a payment term or reconciliation account, or the field value itself.
- Reprocess the order, or correct the partner and save it again.
- Confirm that the link table now has a record.
For large loads during migration, the synchronization cockpit (transaction MDSLOADCOCKPIT) shows which customers and suppliers were converted and which failed. The reasons it lists are the same kinds of errors as above, so the diagnosis is the same.
Finding inconsistencies with a query
A partner with a customer role but no link record is the clearest sign of a broken synchronization. This report lists them. The outer join keeps partners that have no link, and the IS NULL test selects those.
REPORT z_bp_missing_customer_link.
SELECT DISTINCT b~partner
FROM but000 AS b
INNER JOIN but100 AS r
ON r~partner = b~partner
LEFT OUTER JOIN cvi_cust_link AS c
ON c~partner_guid = b~partner_guid
WHERE r~rltyp IN ( 'FLCU00', 'FLCU01' )
AND c~customer IS NULL
INTO TABLE @DATA(lt_missing)
UP TO 50 ROWS.
IF lt_missing IS INITIAL.
WRITE / 'Every customer partner has a link record.'.
ELSE.
LOOP AT lt_missing INTO DATA(ls_missing).
WRITE / ls_missing-partner.
ENDLOOP.
ENDIF.Run the same pattern for suppliers by replacing the link table with CVIVENDLINK, its field vendor, and the roles FLVN00 and FLVN01. Check the field names in your release, because the structure of the link tables can differ slightly.
For the reverse check, a customer that has no business partner, compare KNA1 against CVICUSTLINK. This situation normally appears only after incomplete migrations or direct database loads.
Issues when using the API
When you read through APIBUSINESSPARTNER, the Customer and Supplier properties of A_BusinessPartner are the quickest view of the link. An empty value for a partner with a role points back to the checks above.
Typical API-specific causes:
- A POST that omits
to_BusinessPartnerRolecreates a partner that has no customer or supplier. The partner is valid, but CVI has nothing to create. - A grouping value that is not defined in the target system returns an error. Groupings are customizing, so BP02 may not exist or may use a different number range in your system.
- A POST without a valid
x-csrf-tokenis rejected with 403. Fetch the token with a GET that sendsx-csrf-token: fetch. - Role names such as FLCU00 must be sent exactly as in customizing.
Habits that prevent problems
- Keep BP groupings, account groups and number ranges documented as one table per client, and compare it between systems after every transport.
- After a load, run the missing-link query and review MDS_PPO2 before users find the gaps.
- Use transaction BP, or the released API, for every change. Direct writes to the classic tables bypass the checks that keep both sides aligned.
- Treat blocks and deletion flags as data to compare, not only keys. A central block on the partner and a missing block on the customer is a data drift problem.
Exercise
A user created a business partner with grouping BP02 and only the general role. Sales asks why no customer number exists. What do you check, and what do you do?
Show answer
Check the Role tab and table BUT100. The partner has no FLCU00 or FLCU01 role, so CVI never creates a customer and there is no record in CVICUSTLINK. Add the FI customer role and the sales customer role in transaction BP, maintain the company code and sales area data, and save. Then confirm that the link table now has a record for the partner.
Exercise
The missing-link query returns partners that have the FLCU00 role. Roles and the role category mapping are correct. Name the next two places to look.
Show answer
First, open transaction MDS_PPO2 and look for post-processing orders for those partners, because the error may have been stored for later correction. Second, check the number range of the BP grouping against the number range of the mapped customer account group. A mismatch is a common reason that the customer cannot be created.