MSP supports account data sync from SAP ERP which includes basic account data (Customer ID, VAT ID), its addresses and sales area information.
To control the number of accounts available for synchronization from SAP ERP to MSP database view need to be created in ERP system. Using this view one can filter on account SAP ERP Data (more on this later in the document) and thus reduce the number of customers (accounts) synced to MSP.
Important: MSP uses a URI to uniquely identify each customer/account object. The URI includes the hostname of the ERP system (source system) plus the customer/object ID to make it unique per customer/object. The hostname is found from the destination ECC_RFC_DESTINATION and follows the pattern of hostname and client.
For example, an account URI would look like:
- imc.prod is the SAP ERP hostname and comes from jco.client.ashost or jco.client.mshost
- 800 is the SAP ERP client number and comes from jco.client.client
- Account is the name of object type in MSP
- 123456 is the customer ID.
*Note that in MSP Account and Customer are used interchangeably.
Prerequisites (Basic Data Points)
- Country Region
- Sales Org
- Distribution Channel
- Sales Office
- Inco Terms
- Payment Terms
Note that: These data points with ERP IDs needs to maintain in advance before account sync.
Data Selection / Filter in SAP ERP
MSP uses databases views in SAP ERP to check which objects should be synced to MSP. This is also applicable to account sync.
Database views in SAP ERP can be created using transaction code SE11.
*: Database filters might return duplicated records since ERP does not support DISTINCT concept when creating views. This is currently handled on MSP side where duplicates are eliminated.
Account Sync Procedure
For this sync to work first create database view “Z_ISS_CUSTOMER” with columns
- “MANDT”, “KUNNR”, “VKORG”, “VTWEG”,” SPART”
in cases where the Sales Area information is needed to be synced from the view.
- “MANDT”, “KUNNR”
in cases where the Sales Area information is not needed from the view.
This view is based on standard SAP ERP tables “KNA1” and “KNVV”. Using this view, you can also do the pre-filtering of accounts / customers in SAP ERP which are to be synced to MSP.
View for customer with Sales Area information:
View for customer without Sales Area information:
Depending on the filter conditions the view might need to perform a join with different tables and a set of selection conditions.
Those filters need to be applied depending on the business case. It is recommended to limit the selection of the Customers to be synced to MSP as this will impact the performance. Larger set of data will take more time to complete the sync and incur higher database usage.
Important: Enable setting SettingERPAccountSyncWithSalesAreaFromView to sync Sales Area information from SAP ERP database view. Alternatively MSP can use BAPI to read this information.
With SELECTED Sales Area Information (Setting is ON)
If setting SettingERPAccountSyncWithSalesAreaFromView is ON, MSP will also try to sync the sales area information from ERP. For these following fields need to be mandatory created in the database view: KUNNR, VKORG, VTWEG, SPART. Any additional fields are generally ignored.
Example of SAP ERP view of selected Customers:
With ALL Sales Area Info (Setting is OFF)
In case only account information is required or if the setting SettingERPAccountSyncWithSalesAreaFromView is OFF. The only mandatory field in the database view is: KUNNR. The additional fields are generally ignored.
However, this does not mean that MSP will not synchronize the sales area for the Customers data. Users have the option to maintain Sales Area in database view, or MSP will sync ALL sales areas of the Customers using alternative BAPI: BAPI_CUSTOMER_GETSALESAREAS.
Manual and Explicit Customer Synchronization
To explicitly synchronize a Customer / Account, go to System processes-> ERP synchronization -> Sync Specific object.
Select Account and provide the full Customer / Account id as shown below
Background Account Synchronization
You can also run background sync by going to: System processes-> ERP synchronization -> select below option and click Synchronize button
Scheduled Account Synchronization (System Task)
You can also set up a system task to run scheduled Account sync in background. This can be done from Administration -> System Task -> create new task with a cron expression string and using the task resource AccountSyncJob
Note that there is no delta sync in ERP Account / Customer synchronization. The reason is that there is no correct way to know the last changed date of an account. In Mind Cloud recommend not to setup Account Synchronization System Task as this may consume system resources based on the number of SAP ERP Customers to be synced.