Practical Guide to CRM Business Partner Delta Loads via Middleware-Part 1
+*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+ |
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
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+ ![]() 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 .
*_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+)+. If you are working with consumers you have to replicate the reference customer before.Based on current requirements Consumers were not being used . *Procedure*
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
* iii>_Technical Setup_*
Hold Data holds the data in ECC before sending to CRM ( useful to set for debugging as it is held in the outbound queue )
*iv>Actual Transfer*
* *
*This shows that the bdoc BUPA_MAIN has been transferred to the ECC system and is awaiting confirmation .*
* C> *Vendor Replication *_ i>Functional Setup_*
Same as for customer
Same as for customer
External number range for CRM BP Vendor roles .
** 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 )*
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.
+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.
*_ 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*
* 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.
|
New NetWeaver Information at SAP.com
Very Helpfull