CRM-DBM Integration
The sales drive of any automotive dealer is to get as many leads as possible to sell vehicles. The CRM
solution with the Lead object achieves the capture of prospects or leads. DBM being the execution
system has no information of the leads captured in CRM. This note is intended to set up the integration
of DBM to CRM so that the leads can flow into DBM from CRM and based on the status of the lead, the
status of the lead in CRM is updated back.
The current scope of this note is to provide steps to integrate SAP CRM system to SAP DBM system. The
note has to be implemented manually.
Integration of Business Partner: The business partner/customer needs to be synchronized between the
CRM and DBM. When the lead is created in CRM, CRM is the first point of entry and the business partner
is created in CRM. This business partner must flow to DBM. When the vehicle is ordered, the business
partner is converted to customer in DBM and synchronized with CRM. The source of customer/business
partner can be either CRM or DBM.
Integration of Model: The vehicle model is at the core of creation of the lead. The source for vehicle
model is the DBM system. With integration to CRM, the vehicle model created in DBM is synchronized
to CRM.
Integration of Material: If the lead management is planned for spare parts selling, the spare part
(Material) needs to be integrated with CRM. The source of information for spare parts is DBM.
Integration of Packages: It is a common scenario nowadays that packages are created and sold with the
vehicle. In order to use packages with lead management, packages can be integrated to CRM system.
The source of package information is DBM.
General Settings for Enabling the Middleware Transfer between CRM and ERP
The content in this document is a summary of the middleware settings. For more details on CRM
middleware integration, see the guides available at:
https://help.sap.com/bp_crmv12007/CRM_DE/BBLibrary/html/C03_EN_DE.htm
http://help.sap.com/saap/sap_bp/CRM_701_XX/Html/Content_Library_CRM_EN_XX.htm
To enable data transfer via middleware from SAP ERP to SAP CRM
On ERP side:
Create RFC destination to CRM system via SM59
Maintain entries in CRMCONSUM as mentioned, that is, Consumer CRM is active.
Maintain entries in table CRMRFCPAR as follows :
To enable data transfer via middleware from SAP CRM to SAP ERP
On CRM side:
Create RFC destination to CRM system via SM59
Maintain entries in CRMCONSUM as mentioned, that is, Consumer EXT is active.
Maintain the target sites to which data needs to transferred from SAP CRM system. The
details will follow in subsequent sections.
Launch transaction R3AC1.
Click on position MATERIAL.
Change the filter settings accordingly. DBM objects are sent as materials with material type
as MDL /PACK/HAWA as per the default implementation. Set the filter values based on the
need.
Master Data Set Up in CRM
On ERP Side:
Transfer DBM models to CRM as products. The DBM vehicle models are created in CRM system as
products. In order to prepare necessary products for CRM, the extractor Function Module needs to be
defined and customized .You can refer to the Function Modules in /DBM/DEMO package for details.
To do this, open the view CRMSUBTAB in SAP ERP and define the upload function module
for customization.
The function module /DBM/CRS_DBM_DATA_EXTRACT serves as an example on how DBM models, parts
and packages can be uploaded to CRM system.
If only parts need to be transferred to CRM, the standard function module CRS_MATERIAL_EXTRACT can
be used as the MOD_NAME.
For packages and models, refer to function modules /DBM/CRS_PACKAGE_EXTRACT and
/DBM/CRS_MODEL_EXTRACT respectively.
In all these function modules the preparation of product ID can be influenced with the help of the BAdI
/DBM/PRODUCT_CONVERSION. This BAdI has a default implementation for each product type, i.e.,
model, parts and package.
For details on the BAdI implementation, refer to the Customizing under Logistics Execution -> Dealer
Business Management -> Vehicle Sales -> CRM-DBM Integration -> Conversion of product to/from CRM.
Note: If there is a change in the product ID prepared as in default implementation, make sure to
implement both interface methods accordingly.
On CRM Side:
Define new product categories
Launch transaction COMM_HIERARCHY
Define two new product categories by copying the existing subcategory under category
MAT_ with name MAT_XXXX of hierarchy R3PRODSTYP for package and model
respectively.
(For example, MAT_PART and MAT_PACK in CRM as Product Type Material)
Note: For parts, the existing category MAT_HAWA is sufficient.
How to Upload the DBM Data to CRM
o Launch transaction R3AS for initial load.
o Ensure that the necessary Customizing objects are already downloaded before material load.
o Monitor the completion of initial load using transaction R3AM1.
o Run initial load of object MATERIAL in CRM with source system as ERP system and target as
CRM.
Once the initial load for MATERIAL is done, the delta transfer will also start. That is to say, whenever
material is created/changed in ERP, the object will be loaded to CRM.
To avoid this, deactivate the delta load in CRM via R3AC4:
o Launch transaction R3AC4
o Position on object class MATERIAL
o Click on corresponding RFC destination and mark it Inactive
If delta load is needed to be triggered for DBM Model create/change, the necessary function module
needs to be called on saving of the DBM model and package.
Business Partner Setup
CRM Side:
Open view CRMSUBTAB and maintain entries as follows:
Launch transaction SMOEAC
Select the object type Site and click Create
Fill in name and description and click Site Attributes to select the RFC destination
Save the data
Subscribe the ERP site for Publication All business partners
For this, click Create button under Subscriptions tab and search for all
Confirm selection and save the site
Launch R3AC4 and add the object Class BUPA with the RFC destination
Ensure none of the queues (inbound/outbound) are blocked. If blocked, the BPs will not be
available in ERP and will result in loss of leads.
Scenario 1: New BPs
Define a dedicated number range and grouping in CRM for vehicle prospects
Define the same number group in ERP with necessary number ranges
In order to accept the numbers generated by CRM, the number range in ERP should be
external.
Maintain necessary Customizing in PIDE
Open BUPA_MAIN and add a filter to transfer only the dedicated number range to ERP
Scenario 2: DBM customers as BP with Role Sold to party
Open CUSTOMER_MAIN via R3AC1, add the ERP site
Trigger initial load (R3AS) of the DBM customers via Middleware object CUSTOMER_MAIN
Maintain the required number groups that are maintained and used in ERP for BP creation
Maintain necessary Customizing in PIDE
Scenario 3: Already existing CRM BPs as BPs with general role in ERP
If the BPs are outside the number range, they need to be sent explicitly
The necessary number group must be existing in ERP
Create a request object via R3AR2 with required filter values
Run the request load using R3AR4 for the specific request load object to ERP before
transferring the lead to ERP
SAP CRM Lead transfer to ERP
Before transferring the lead ,Transfer the required text from Lead using RFC to ERP site. To do
this use the RFC /DBM/COPY_CRM_LEAD_CUSTOMIZING. The sample code is attached:
Define logical system to send out data
In Customizing, go to Customer Relationship Management -> CRM Middleware and related
components -> Communication Setup -> Set Up Logical Systems -> Define Logical System -> Add
new logical system, which refers to the ERP system to which data needs to be sent
Save the data
In SAP area menu go to Architecture and Technology -> Middleware -> Development -> Message
Flow -> Define Customer-Specific Flow
Define an entry as follows and save it:
Required DDIC Structures:
Create Structure - ZCAMPAIGN_S
Component Component Type
MANDT MANDT
GUID SMO_SFACPN
EXTERNAL_ID CRM_MKTPL_CAMPAIGNID
CAMP_TYPE CRM_MKTPL_CAMPTYPE
CAMP_TYPETX CRM_MKTPL_CAMPTYPETX
CAMP_TYPE_LANGU LANGU
ACTUALSTART CGPL_ACTUALSTART
ACTUALFINISH CGPL_ACTUALFINISH
PLANSTART CGPL_PLANSTART
PLANFINISH CGPL_PLANFINISH
CREATED_ON CGPL_CREATED_ON
CHANGED_ON CGPL_CHANGED_ON
PARENT_GUID SMO_SFACPN
Create Structure - ZDOC_FLOW_S
Component Component Type
MANDT MANDT
CRM_LEAD_GUID CRMT_OBJECT_GUID
CRM_CAMPAIGN_GUID SMO_SFACPN
Create Structure - ZCAMPAIGN_DESC_S
Component Component Type
MANDT MANDT
GUID SMO_SFACPN
LANGU LANGU
TEXT1 CGPL_TEXT1
The code for service function module is attached here:
Launch transaction SMOEAC
Select the object type Site and click Create
Fill in name and description and click Site Attributes to select the RFC destination
Save the data
Subscribe the ERP site for Publication All business transactions
For this, click Create button under Subscriptions tab and search for all.
Confirm selection and save the site
Launch R3AC4
Activate delta load for lead, add entry object class of object class BUSPROCESSND for
required site
On ERP Side:
To receive the CRM products at ERP system, there should be a mapping defined between the
CRM product categories and DBM technical item categories. For details, in Customizing go to
Logistics Execution -> Dealer Business Management -> Vehicle Sales -> CRM-DBM integration ->
Map CRM Product Category to DBM Technical Item Category.
Implement the BadIs to to convert the model/package/parts from CRM product IDs to DBM item
category under Logistics Execution -> Dealer Business Management -> Vehicle Sales -> CRM-DBM
Integration -> Conversion of product to/from CRM
Define the mapping between CRM partner function and DBM partner functions via
o Logistics Execution -> Dealer Business Management -> Vehicle Sales -> CRM-DBM
Integration -> Map CRM Lead Partner to DBM Deal Partner
o One partner function must be the main partners which will be considered as the
customer for VSA
Define the default task code and task text which will be visible as the sales activity list of the
concerned sales assistant in VSA. Go to Logistics Execution -> Dealer Business Management ->
Vehicle Sales -> CRM-DBM Integration -> Assign default task code for Notification Type. For each
item, a sales activity will be created.
SAP CRM Lead Status update back to CRM
In order to update the status of the lead back to CRM ,the necessary logic needs to be incorporated
at specific places .
The status update can take place based on the notification status and this can take place during the
BTE event PM000010, BTE Function Module /DBM/CU17_BTE_NTF_EVENT_SAVE.
The default implementation on how to update the CRM lead back is embedded in Function Module
/DBM/UPDATE_LEAD_STATUS_BTE under /DBM/DEMO package.
This Function Module internally calls a remote Function module created in CRM .The sample code
for the RFC is embedded here.
Note: Both the function module would require necessary changes based on the notification status
and the corresponding CRM lead status .