Skip to Content
  +*CRM Business Partner Replication*+   *•1.    *CRM Middleware Overview

CRM uses Middleware to transfer data to/from CRM server to other systems . The transfer is performed using Business Documents commonly known as bdocs . BDOC’s are structured documents with contents of the entire business object ( e.g business partner ) stored in them . The bdocs are transferred using Qrfc technology .

*•2.    **_Business Partner Replication Overview_* The current blog series discusses the configuration settings required for the             Replication of  business partner data ( customers and vendors ). Part 1 discusses the steps involved in setting up a Delta upload ( CRM -> ECC ) Part 2 discusses the steps involved in setting up a Delta download ( ECC -> CRM )   Part 3 discusses the key middleware transactions & debugging the middleware . Customer( Sold to Party ) and Vendors Roles are transferred .   BP is created in CRM via transaction *‘BP’. *The Business Partner can be a Person or Organization. The bdoc created is *BUPA_MAIN* for the customer role and *VEND_MAIN* for the vendor role. I was working with ECC 6.0 and CRM 5.0 . Vendor replication is possible in ECC 6.0 but not available in versions like 4.6 I think . Please refer to the reference material at the end of the blog and service.sap.com to identify whether you can perform vendor replication in your environment .   *•3.    **_Business Partner  Replication ( CRM to R/3 )_* The process of BP replication from CRM to ECC is called Upload.Initial uploads are performed as part of the data migration process ( Creates only ) . Delta Uploads are performed whenever a new bp is created or changed . When the application is saved the BP data is stored in the application tables in CRM and also a message BDOC (mBDOC) is created ( BUPA_MAIN( customer role) and VEND_MAIN ( vendor role ) ) . This is done for all customers with *classification Customer, Consumer , Competitor , Prospective Customer  and for all bp with vendor roles* . *A>Message Flow * *CRM* This BDOC is sent to the outbound flow via qRFC  .The Flow context MO1 and MOA is called . Each Flow context has a set of services ( function modules ). ** For each receiver the _Outbound Adapter_ is called . Here the mBDOC is converted to BAPIMTCS data structure ** The receiving system receives the BAPIMTCS data container via qRFC . Queue ( Outbound ) is R3AU* *ECC* Receiving system ( ECC ) 0.1. Function Module CRM_UPLOAD_TRIGGER is called which calls the corresponding function modules for the object ( table CRMSUBTAB ) . This stores the data in the ECC tables ( Vendor/Customer record created ) .The function module IDOC_INPUT_CREDITOR/DEBITOR is called which performs a BDC to load the vendor/customer 0.2. Finally a synchronous confirmation callback  to CRM is made  . The bdoc involved is CUSTOMER_MAIN .The return call can be held in a RFC outbound queue in ECC and it is manually released ( based on the configuration of the CRMRFCPAR in ECC )   *CRM ( CONFIRMATION)*   0.1. The confirmation is executed in CRM which verifies that the initial message was received by ECC . A link table is maintained in both systems so that the Customer number in ECC and the BP object GUID are linked. *B>Customer Replication* *  i>Functional Setup*   0.1. *Defining the Number range ( CRM )*For the business partners created in the CRM system you have to define number ranges. You can define one number range for all classifications or define for example a separate number range for each classification.   | | *Transaction code* | BUCF | | | *SAP CRM IMG menu* | | +Cross Application Components+ ® +SAP++Business Partner+ ® +Business++Partner+ ® +Basic++Settings+ ® +Number++Ranges and Groupings+ ® +Define Number Ranges+   0.1. *Create the following groupings(CRM)*            | | *Transaction code* | SPRO | | | *SAP CRM IMG menu* | | +Cross Application Components+ à +SAP++Business Partner+ à +Business++Partner+à +Basic++Settings+ à +Number++Ranges+ +and Groupings+ à +Define Grouping and Assign Number Ranges+               For each of the classifications you can keep a different number range group     0.1. *Create the Number ranges in ECC *

 

*Transaction code*

OVZC

*SAP ECC IMG menu*

+Logistics – General+ ® +Business Partner+ ® +Customers +® +Control+ ® +Define and assign customer number ranges+

!https://weblogs.sdn.sap.com/cs/blank/edit/wlg/|height=1|alt=|width=1|src=https://weblogs.sdn.sap.com/cs/blank/edit/wlg/|border=0!image

The external flag needs to be selected

  • *Create the account groups and assign the number range to the account group.*

*             *  Every customer created in ECC will have an account group . The account group is key to detailing the field statuses , number range and a whole lot of other details image   image                                         image                     For each of the classifications you can keep a different account group if they have a different number range group in CRM. Account Groups will be set to external in ECC.   _** Need to make sure that the customers created in CRM and transferred to ECC are set in a different number range to customers created in ECC. This will avoid confusion regarding where the customer is created._     0.1. *Define the Partner functions* *and connect to the account group created*   Please do the following account group assignments: image  image   Please note that a partner function can be connected to multiple account groups .     0.1. *Mapping the CRM Classifications to ECC Account Groups ( ECC )( ( transaction PIDE )*  | | *Classification* | | *Account Group* | | *Name**Synchronizing Field Settings for Customers ( SAP ECC ) with Business Partners in CRM *

 

For testing purposes set all mandatory fields in the account group to optional in ECC. In productive systems all fields must be synchronized with the CRM system.

 

In order to replicate business partners from the OLTP ECC to the CRM system and vice versa you have to synchronize the field settings for business partner, i.e. if a master data record field in the receiving system has the setting +Required Entry+ an upload is only successful if this field maintained in the master data record of the sending system.

 

*Transaction code*

OVT0

*SAP ECC IMG menu* | +Logistics General +à +Logistics Basic Data: Business partners+ | à +Customers +à Control à+ Define account groups and field selection for customer+   image   0.1. 1. Choose an account group that is relevant for the mapping. 0.2. 2. Choose +Details+.0.1. 3. Double-click the text +General Data+ in the screen area +Field status+.0.1. 4. Double-click on each of the different entries in the +Select Group+ area, for example, +Address+. The corresponding field list is displayed.0.1. 5. Repeat these steps for all field status areas (Company code data, Sales data). 0.2. 6. In the *CRM system* choose the IMG activity: +Cross-Application Components+ à +SAP Business Partner+ à +Business Partner+ à +Basic Settings+ à +Field Groupings+ à +Configure Field Attributes per BP Role+0.1. 7. Choose the business partner roles that correspond to the account group and check if the required entries are identical. In order to check if the replication of business partners works in general without regarding problems caused by incomplete master record fields you can set all fields for the relevant account groups to status +Optional+. After a successful test replication for a single business partner you have to reset these fields to status +Required+ in order to avoid data inconsistencies.   Sometimes some the fields do not get passed across to ECC , in which some of the BTE events need to be tweaked to fill the field . The BTE is a function module which gets called during the inbound process in ECC and the field can be filled based on various criteria.   For e.g if the country field needs to be filled construct the function module with the following code *******sample code

FUNCTION ZFILLBP.

*”———————————————————————

*”*”Local Interface:

*” IMPORTING

*” VALUE(IS_COMPLEX_STRUCTURE) TYPE BUSEI_COM_EXTERN

*” VALUE(IS_COMPLEX_STRUCTURE_RELATIONS) TYPE BUSEI_RCOM_EXTERN

*” TABLES

*” CT_IDOC_CONTROL STRUCTURE EDIDC

*” CT_IDOC_DATA STRUCTURE EDIDD

*” IT_BAPIMTCS STRUCTURE BAPIMTCS

*”——————————————————————— DATA : E_GEN_DATA TYPE E1KNA1M . loop at ct_idoc_data where segnam eq ‘E1KNA1M’. clear e_gen_data . e_gen_data = ct_idoc_data-sdata . e_gen_data-spras = ‘DE’. e_gen_data-land1 = ‘GB’. ct_idoc_data-sdata = e_gen_data . modify ct_idoc_data . endloop. loop at ct_idoc_data where segnam eq ‘E1KNA1M’. clear e_gen_data . e_gen_data = ct_idoc_data-sdata . ENDLOOP. loop at ct_idoc_data where segnam eq ‘E1KNA1M’. clear e_gen_data . e_gen_data = ct_idoc_data-sdata . ENDLOOP. ENDFUNCTION.   *******end sample code                             This is called when the Idoc structure for updating the Customer is called . Then attach the function module to the BTE event *DE_BALE . *This is done via transaction FIBF

BTE events are events called at various points in the application . It is possible to attach exits ( function modules ) to these events and write custom code . The interface of the event defines what fields are accessible and what can be modified .

image

 

image

 

 

*_ii>Pre-requisites _*

 

It may be required that an Account Group customizing load is performed into CRM from ECC before the replication is performed. This is because the CUST_MAIN status idoc fails if there is no account group in CRM. This is held in the table T077d table .There may be other objects as mentioned in the Configuration guide

 

There are some prerequisite configuration objects before you load business partners. Make sure the necessary configuration objects are loaded successfully (transaction R3AM1+)+.
The essential 12 configuration objects are the following:
DNL_CUST_ACGRPB, DNL_CUST_BNKA, DNL_CUST_ADDR, DNL_CUST_KTOKD, DNL_CUST_TVPV, DNL_CUST_TVLS, DNL_CUST_TVIP, DNL_CUST_TVGF, DNL_CUST_TVKN, DNL_CUST_TKUKL, DNL_CUST_TVFS, DNL_CUST_TVAST, DNL_CUST_TSAB, DNL_CUST_TPFK, DNL_CUST_T502T, DNL_CUST_TBRC.

If you are working with consumers you have to replicate the reference customer before.Based on current requirements Consumers were not being used .

*Procedure*

  • 1. To replicate the customers, either as specified in the filter or all customers, into the CRM system, access the activity using one of the following navigation options:

*Transaction code*

R3AS

*SAP CRM menu*

+Architecture and Technology +® +Middleware +® Data Exchange ®+ Initial Load +® +Start+

  • 2. In the +Load Object+ field, enter +CUSTOMER_MAIN+.
  • 3. In the +Source Site+ field enter +OLTP+ and in the +Destination Site+ field enter +CRM+.
  • 4. To run the replication, choose +Execute (F8)+.

 

The Customer status updates ( CUSTOMER_MAIN ) was erroring out .The reason was that the table CRMC_T077D was not populated . This is loaded in the Account group customizing download

 

                  image

 

 

* iii>_Technical Setup_*

 

  • Make sure the highest available Plug-In (PI) Support Packages plus Core Support Packages are installed in the OLTP(ECC) in the same way as on the CRM/EBP server.
  • Check the setting for ECC table CRMRFCPAR (see chapter +Maintaining Table CRMRFCPAR+).The CUSTOMER_MAIN bdoc entry must be present in the table.

           

image

image

 

Hold Data holds the data in ECC before sending to CRM ( useful to set for debugging as it is held in the outbound queue )

 

  • Check the RFC connections from CRM to ECC and vice versa. ( Transaction SM59 )

 

image

 

image

 

  • Create the Sites and link them to the RFC destination ( transaction SMOEAC ) . CRM & ECC are the sites in our case .

image

 

 

  • Create Subscriptions which connects the publication to the site

 

image

 

  • Make sure that the Function modules connected to the Flow contexts are active.
  • In transaction R3AC1 the adapter objects BUPA_MAIN and CUSTOMER_MAIN must be active. A filter for each role of role category customer can be set for object BUPA_MAIN so that only relevant business partners are transferred.

image

 

  • In table CRMSUBTAB ( in ECC ) the entries for BUPA_MAIN and CUSTOMER_MAIN should be active .

      *iv>Actual Transfer*

 

  • *Create a Business Partner ( transaction BP )*

image

*             * 

 

 

  • *Check the BDOC log (SMW01 )*

image

*This shows that the bdoc BUPA_MAIN has been transferred to the ECC system and is awaiting confirmation .*

 

 

  • *Check the Customer master in ECC ( transaction xd03 )*

image

 

  • Check the outbound queue in ECC ( smq1 ) and the confirmation is waiting in the queue . Reason is the setting in CRMRFCPAR . Execute LUW. This will send the confirmation back . In productive environment this will be automatic .

 

image

 

  • *Check the logs in CRM *

image

 

 

 

 

* C> *Vendor Replication

 

*_         i>Functional Setup_*

 

  • *Defining the Number range *

                         Same as for customer

 

  • *Create the following groupings*

                         Same as for customer

 

  • *Create the Number ranges in ECC *

 

image

 

  External number range for CRM BP Vendor roles .

 

  • *Create the vendor account groups and assign the number range to the account group*

 

image

image

image

**                    Need to make sure that the vendors created in CRM and transferred to ECC are set in a different number range to vendors created in ECC. This will avoid confusion regarding where the vendor is created.     0.1. connecting the BP vendor role to the account group*( transaction PIDV )*    image     0.1. *Synchronizing Field Settings for Vendors ( SAP ECC ) with Business Partners in CRM *

 

For testing purposes set all mandatory fields in the account group to optional in ECC. In productive systems all fields must be synchronized with the CRM system.

 

In order to replicate business partners from the OLTP ECC to the CRM system and vice versa you have to synchronize the field settings for business partner, i.e. if a master data record field in the receiving system has the setting +Required Entry+ an upload is only successful if this field maintained in the master data record of the sending system.

image

 

image

 

 

+Define Account Groups and Field Selection ({code:html}*Vendor*{code})+: select the group (or groups) you have defined for exchange in transaction PIDV. Press the button +Details+. Double-click on the corresponding data groups (on the text) listed in the frame +Field Status+, for example double-click on +General Data+ and then on the data group +Address+

and

+Define Transaction-Dependent Screen Layout+: select the activity type and press the button +Details+. Double-click on the corresponding data groups (on the text) listed in the frame +Field Status+, for example double-click on +General Data+ and then on the data group +Address+.

 

                  Sometimes some the fields do not get passed across to ECC , in which some of the BTE events need to be tweaked to fill the field . The BTE is a function module which gets called during the inbound process in ECC and the field can be filled based on various criteria. Check the example for Customer Load.

image

           

*_     ii>Pre-requisites _*

 

 It may be required that an Account Group customizing needed are performed . There was none needed in the systems where the demo was done .

*Procedure*

  • 5. To replicate the customers, either as specified in the filter or all customers, into the CRM system, access the activity using one of the following navigation options:

*Transaction code*

R3AS

*SAP CRM menu*

+Architecture and Technology +® +Middleware +® Data Exchange ®+ Initial Load +® +Start+

  • 6. In the +Load Object+ field, enter +VENDOR_MAIN+.
  • 7. In the +Source Site+ field enter +OLTP+ and in the +Destination Site+ field enter +CRM+.
  • 8. To run the replication, choose +Execute (F8)+.

*       iii>_Technical Setup_*   0.1. Make sure the highest available Plug-In (PI) Support Packages plus Core Support Packages are installed in the OLTP(ECC) in the same way as on the CRM/EBP server. 0.2. Check the setting for ECC table CRMRFCPAR (see chapter +Maintaining Table CRMRFCPAR+).The VENDOR_MAIN bdoc entry must be present in the table.            image   0.1. Check the RFC connections from CRM to ECC and vice versa and linking to site & Check the subscriptions / publications for CRM upload .                                     Same as customer   0.1. Create the Sites and link them to the RFC destination ( transaction SMOEAC ) . CRM & ECC .                                     Same as customer   0.1. Create Subscriptions which connects the publication to the site image     0.1. Make sure that the Function modules connected to the Flow contexts are active. 0.2. In transaction R3AC1 the adapter objects VENDOR_MAIN and VEND_MAIN must be active. A filter for each role of role category customer must be set for object VEND_MAIN so that only relevant vendors are transferred.   image 0.1. In ECC , Within transaction SM31, in the table *COM_BUPA_CALL_FU* for R/3 object inbound processing (time R3OBI) of vendor records (object VEND), the function PI_BP_PROXY_BAPI_VENDOR must be active, and the function PI_BP_PROXY_BAPI_CUST_VEND must not be active. In transaction SM31, table CRMC_BUT_CALL_FU for the Business Partner            Outbound of Business Partner objects, the function MWX_CREATE_MAIN_BDOC             must be active ( CRM outbound )   image                               0.1. In transaction SM31, table *CRMSUBTAB* for User CRM the function *COM_VEND_MAIN_INBOUND* shall be active for object VEND_MAIN of class BUPA for upload*             PI_BP_VENDOR_MAIN_EXTRACT* shall be active for object VENDOR_MAIN of    class VEND for download.       *iv>Actual Transfer ( CRM to R/3 )*   0.1. Create a Business Partner ( transaction BP ) in vendor role   *             * image

 

 

  • Check the BDOC log (SMW01 )

image

To report this post you need to login first.

19 Comments

You must be Logged on to comment or reply to a post.

    1. TICH Tarwireyi
      Hi Guys

      Please can you tell me if its possible to replicate the Business Partner from CRM to ECC6 without creating customers or vendors. I am using industry solution IS-PS and all i need is the BP master and role MKK Contract Partner , for me to create contract accounts in FICA/PSCD

      If its possible , How

      Thanks guys

      (0) 
  1. Stefan Kübler
    Hi Radha,

    great information!
    Will you continue with the announced parts 2 & 3? I’m especially interested in the possibilities of debugging of the middleware!

    Best regards
    Stefan

    (0) 
  2. Daniel Bischofer
    Hi Radha,

    good work.

    What about the other direction (download from ECC to crm)? Do you know if there is a delta download available for VENDOR_MAIN?

    Kind regards
    Daniel

    (0) 
    1. Radha Subramanian Post author
      Hi Daniel,
                 Gld you liked it . Yes I do have the info for delta downloads . I will send you the document if you give me your email .

      Regards,
      Radha

      (0) 
  3. Oliver Bredow
    Hi,
    I’ve read your blog with great pleasure. My question is: do you have any information about the upload of BPs from CRM to ECC with an active IS-Media (or IS-U) solution? The problem is not to use the BP (and SAP BP)in ECC. I need the account receiveables and functions in table KNA1.

    Kind Regards
    olli

    (0) 
  4. Amit Gadgil
    Hi Radha,

    This information is quiet helpful. Thanks for this. However I am finding an issue. we are creating an BP in CRM which is getting replicated in ISU as BP with roles as contract partner. But we have done the respective configuration for creation of SD customer in SD with sold to party.

    We have created the reference customer and all BP are been created as sold to party but teh sale area is not getting extended. Whereas my reference customer is already extended with teh sales area.

    Any suggestion.

    (0) 
    1. ashutosh deshpande
      hi amit ,

      i am also facing the same issue ,it would be very nice of you if you can tell me what you have done to solve this issue ..

      thanks in advance …

      ashutosh deshpande

      (0) 
  5. ribes marga
    Hi Radha,
    I do really like your blog, I see that you control the replication flows and I need  some help, I would like to be able of replicating  Account individuals that became Customers in a Customer ERP accounts not in a Consumer one.  Do you Know how to do that? It should be great If succed with this issue cause  i have the same problem in several Clients..
    Thank you in advance
    Marga Ribes
    (0) 
  6. Surajit Roy
    Hi Radha,

    Your blog was really helpful to me for Vendor replication from CRM to ECC.

    My client creates BPs in CRM which gets replicated to ECC.
    Once the BP has been replicated to ECC, the client DOES NOT want any subsequent updates to the BP master data in CRM to be uploaded to ECC.

    How can we accomplish this task?

    (0) 
  7. Madhuri Gururaj
    Radha,
    We are interested in bringing over the characteristics data for customer master in ECC that is maintained in the xd03 – Extras menu and then classification. 

    For a customer records, we have a class for licence key under which we have a characteristic and value.  We want to bring this characteristic and value over to CRM.  How do we accomplish that and where would be the best place to host this information in CRM for the business partner? Currently we have the customer master flow from ECC to crm thru the middleware but the characteristics data is not coming over.  What do we need to do to bring it to crm.

    Appreciate your input.

    (0) 
  8. Hitesh Shah
    Hi Radha

    It’s one of the best article I gone through and would like to read part 2 and 3 of it.

    Please let me know when you will be adding it to SDN.

    Thanks & Regards
    Hitesh Shah

    (0) 

Leave a Reply