This blog will explain the replication of Customer Master Data from ECC into CRM. This will be achieved by Middleware replication of ECC fields. In ECC we have the customer master data field called ‘Plan-Level Customer’.where as this ‘Plan-Level Customer’ field is not available in CRM. We will first create this field in CRM then we will map the ECC - ‘Plan-Level Customer’ field against CRM-- ‘Plan-Level Customer’ field.
In ECC
In ECC—XD02 (Tcode)
![s1.PNG]()
Click on MORE data…
![s2.PNG]()
![3.PNG]()
Change the Plan-Level Customer and click the Save.
After clicking on save, the Master Data will flow from ECC to CRM.
In CRM
Step involved in debugging the Master Data flow of ECC into CRM.
In CRM- SMQR (Tcode)
Step 1:
De-Register the R3A*- Quee- This is inbound quee in CRM for R/3 Data.
![4.PNG]()
Step 2:
In CRM- SMQ2 ( Tcode)
Open the inbound Quee –
![5.PNG]()
Once Master Data of BP gets saved in ECC, the ECC Data get captured in the above quee.
![6.PNG]()
Just double click on it..
![7.PNG]()
There is the DEBUG-LUW icon will be there. Which will start the debugger.
Place the breakpoint in the INBOUND Quee FM
![8.PNG]()
Expand the CP_BP_STRUCT to see the R/3 Field data.
Path:
C_BP_STRUCT-CENTRAL_DATA-COMMON-DATA-ZZFLD00001D
C_BP_STRUCT-CENTRAL_DATA-COMMON-DATAX-ZZFLD00001D
![9.PNG]()
In DATA field-
![10.PNG]()
In DATAX field-
![11.PNG]()
In ECC for the Customer -50059571 we have given PLC as ‘AT1005014’.The same PLC is successfully mapped against the CRM PLC field. This shows ECC PLC field has flowed correctly to the CRM PLC Field.
Middleware replication will update in the Database table
![12.PNG]()
Now we will see how to achieve this ECC replication into CRM Field.
Step involved in customer Master Data Replication
Step1:
In CRM:
As we know we need to create this PLC field first. Let us create this field through ‘AET’.
![13.PNG]()
Step 2:
In ECC, Tcode :SM30 and maintain table TBE24. Create a product and mark it active.
Step 3:
In ECC,Tcode :SM30 and maintain table TBE34 for the event DE_EIOUT.
![15.PNG]()
Note: ZSFM_SEND_PLC_TO_CRM_DE_EIOUT should be created prior.
Step 4:
In ECC Tr. SE11, look for the structure BSS_CENTI, double click on CI_CUST and create structure CI_CUST, structure CI_EEW_BUT000 (CRM -STUCTURE).
![16.PNG]()
In ECC
![17.PNG]()
In CRM
![18.PNG]()
Caution: Both the data type and length should be same. Otherwise mapping will be done incorrectly.
Step 5;
Follow the same for the structure BSS_CENTIX double click on the CI_CUST_X and create structure CI_CUST_X.
ECC:
![19.PNG]()
In CRM:
![20.PNG]()
Caution: Both the data type and length should be same. Otherwise mapping will be done incorrectly.
Step 6;
In the Function Module : The below Parameters are important to send the ECC Master Data Feild
![21.PNG]()
Code:
FUNCTION zsfm_send_plc_to_crm_de_eiout.
* LOCAL DATA
DATA: ls_extern TYPE busei_com_extern,
lv_partner_guid TYPE sysuuid_c,
ls_ct_main_extern TYPE busei_com_extern_t.
FIELD-SYMBOLS: <ls_extern> LIKE LINE OF ct_main_extern,
<ls_xknb1> TYPE knb1.
******************************************************
* MAPPING KNB1 to Business Partner
******************************************************
LOOP AT it_xknb1 ASSIGNING <ls_xknb1> WHERE kunnr EQ iv_customer.
READ TABLE ct_main_extern INDEX 1 ASSIGNING <ls_extern>.
IF sy-subrc = 0.
*----Add the PLC code
<ls_extern>-central_data-common-data-ci_include-zzfld00001d = <ls_xknb1>-zzplc.
<ls_extern>-central_data-common-datax-ci_include-zzfld00001d = 'X'.
ELSE.
ls_extern-header-object = 'BusinessPartner'.
ls_extern-header-object_instance-bpartner = iv_customer.
CALL FUNCTION 'PI_BP_CRM_MAP_KUNNR_TO_BP'
EXPORTING
iv_customer = iv_customer
IMPORTING
ev_partner_guid = lv_partner_guid
EXCEPTIONS
partner_not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
ls_extern-header-object_instance-bpartnerguid = lv_partner_guid.
ls_extern-header-object_task = 'U'.
*----Add the PLC code
ls_extern-central_data-common-data-ci_include-zzfld00001d = <ls_xknb1>-zzplc.
ls_extern-central_data-common-datax-ci_include-zzfld00001d = 'X'.
APPEND ls_extern TO ct_main_extern.
ENDIF.
ENDIF.
ENDLOOP.
ENDFUNCTION.