BP Synchronization Chat
User:
In BP synchronisation, I'm getting error as grouping EM does not exist.
But grouping is present.
Now the customer wants to continue with the same grouping and number range as available in ECC system
Assistant:
The error **"Grouping EM does not exist"** during **BP (Business Partner) synchronization** in S/4HANA typically
points to an inconsistency between:
1. The **BP Grouping** defined in **S/4HANA**, and
2. The **Customer Account Group** and **Number Range** settings migrated from ECC.
Even though grouping "EM" *exists*, the error may still occur due to one or more of the following reasons:
---
### **Checklist to Fix the Issue**
Heres how you can fix the issue and allow the customer to retain the same grouping and number range as in ECC:
#### 1. **Verify Grouping in S/4HANA**
- Go to **Transaction: BUCG** or **View: V_TB001_GROUP**
- Check if **Grouping EM** is defined.
- Ensure **Internal/External number range assignment** is consistent with how ECC used it.
#### 2. **Check Number Range Assignment**
- Go to **Transaction: BP**
- Navigate to **SAP Reference IMG > Cross-Application Components > SAP Business Partner > Business Partner >
Basic Settings > Number Ranges and Groupings > Define Number Ranges**
- Make sure the number range assigned to Grouping EM matches the one used in ECC (either internal or external).
- Also, check **Define Groupings and Assign Number Ranges** ensure "EM" is correctly assigned to the desired range.
#### 3. **Check CVI Customizing**
Page 1
BP Synchronization Chat
- Go to **Transaction: CVI_IMG**
- Navigate to:
- *Customer/Vendor Integration > Business Partner Settings > Customer Integration > Assign BP Grouping to
Customer Account Group*
- Make sure the **Customer Account Group** from ECC (e.g., EM) is correctly mapped to **BP Grouping EM**.
- Do the same for Vendor if applicable.
#### 4. **Check Synchronization Settings**
- If using **MDS_LOAD_COCKPIT** or **CVI_UPGRADE_CHECK_RESOLVE**, verify that the Grouping EM is
recognized in those processes.
- Sometimes the **BP grouping must be in uppercase**, even though it's displayed fine in lowercase in config.
---
### **If the Grouping Exists but Still Errors**
Sometimes the issue is **cache-related or a bug**:
- Try restarting the system cache using **transaction `SICF` (Services) or `SE38` with program
`CVI_FS_CHECK_CUSTOMIZING`**
- Also run **program `CVI_SYNCHRONIZE_CUSTOMER`** in test and update mode to check mapping issues.
---
### **To Retain ECC Number Range**
- Set grouping "EM" to use **external number range** (if ECC had custom numbers).
- Ensure that **BP numbers** and **Customer numbers** remain the same this avoids conflicts.
- Use **Predefined BP Grouping** and assign ECC numbers explicitly during synchronization.
---
Let me know if you'd like help drafting a custom code snippet or a step-by-step in SPRO.
User:
If im unable to figure it out, I want to by pass that error.
Page 2
BP Synchronization Chat
So can you give me the badi and it's implementation logic
I found one /shcm/b_ee_bp_sync
Assistant:
If you want to **bypass the BP grouping error during synchronization**, you're on risky ground but it's technically
possible to handle or suppress such errors using a BAdI. However, the BAdI you mentioned,
**`/SHCM/B_EE_BP_SYNC`**, is **specific to HCM (HR) BP Synchronization**, not general CVI (Customer-Vendor
Integration).
For **general BP synchronization**, especially during **CVI (Customer/Vendor) integration**, you should consider the
following:
---
### **Relevant BAdIs for BP Synchronization / CVI**
1. **`CVI_CUSTOM_MAPPER`**
- This is the **main BAdI** used to control mapping between Customer/Vendor and Business Partner.
- You can use this to:
- Influence grouping
- Default or override values
- Avoid errors by custom logic
2. **`CVI_EI_INBOUND_MAIN`**
- This allows you to control inbound synchronization logic (e.g., from customer to BP).
---
### **How to Use `CVI_CUSTOM_MAPPER` to Default/Bypass Grouping Issue**
#### Step 1: Implement the BAdI
Go to **SE18**, and search for:
- **BAdI: `CVI_CUSTOM_MAPPER`**
Page 3
BP Synchronization Chat
- Create an implementation if not already present.
#### Step 2: Use method: `MAP_CUST_TO_BP`
Heres a sample implementation logic:
```abap
METHOD if_ex_cvi_custom_mapper~map_cust_to_bp.
" Check if grouping is initial or invalid
IF is_customer-central_data IS NOT INITIAL AND
cs_bp_data-central_data IS NOT INITIAL AND
cs_bp_data-central_data-grouping IS INITIAL.
" Default it to EM if not provided
cs_bp_data-central_data-grouping = 'EM'.
ENDIF.
ENDMETHOD.
```
---
### **Alternative BAdIs**
If you're working with HR or Employee data, then `/SHCM/B_EE_BP_SYNC` would apply, and you can implement
method:
- `IF_EX_/SHCM/IF_EE_BP_SYNC~GET_GROUPING`
Example:
Page 4
BP Synchronization Chat
```abap
METHOD if_ex_/shcm/if_ee_bp_sync~get_grouping.
" Always return grouping EM
ev_grouping = 'EM'.
ENDMETHOD.
```
---
### **Warning**
Bypassing grouping errors without resolving the root cause **can lead to inconsistent Business Partner data**. Always
make sure:
- Grouping exists in config (`BUCG`)
- Grouping is properly assigned to the correct number range
- Mappings in CVI are consistent
---
Would you like me to generate a full sample enhancement project structure or help with deploying this via SE19?
Page 5