White Paper - CRM Contact Person Replication - 09feb10

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 11

Reusable Component

Contact Person Replication : ECC to CRM


Prepared by: L&T Infotech

Document Number: CRM-2010-0014


Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

Table of contents
1.0 Intended Audience 3
2.0 Executive Summary 3
3.0 Replicating Contact Persons from ECC to CRM 3
3.1 Allowed ECC Account Groups for replicating Customers 3
3.2 Maintaining Contact Persons in ECC 3
3.3 R/3 Tables – Contact Person 4
3.4 CRM Filter Settings – R3AC1 5
3.5 Initial Download of Contact Person 5
3.6 CRM Tables – Contact Person 5
3.7 R/3 Tables – Contact Person after download 5
3.8 Number Range during Replication 5
3.9 Trouble Shooting 5
3.10 Manual Download - Contact Person 6
4.0 Internal number range other than standard grouping 6
4.1 Copy function module BUPA_MWX_BDOC_MAP_MAIN_CENTRAL7
4.2 The function module Z_CHANGE_CONTACT_GROUPING 7
4.3 Transaction code CRMC_BUT_CALL_FU 8
4.4 The Contact Person gets transferred with new number range 8
5.0 Same Number Range of Contact Person : ECC and CRM 9
5.1 Copy Function Module BUPA_MWX_BDOC_MAP_MAIN_CENTRAL9
5.2 Transaction code : CRMC_BUT_CALL_FU 11

L&T Infotech - Confidential Page 2 of 11


Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

1.0 Intended Audience


This White Paper is targeted at SAP CRM consultants functional & Technical
Consultants.

2.0 Executive Summary


This reusable component gives all scenarios and configuration / development
settings of contact person replication from ECC to CRM. This includes:
 Download of contact persons from ECC to CRM with standard internal number
range
 Download of contact persons from ECC to CRM with non-standard internal
number range
 Download of contact persons from ECC to CRM using same number range as in
ECC

3.0 Replicating Contact Persons from ECC to CRM

3.1 Allowed ECC Account Groups for replicating Customers


Only customers with account groups allowed for transfer in R/3 transaction code PIDE are
allowed to get transferred to CRM. Contact Persons assigned to these customers are
downloaded from ECC to CRM

3.2 Maintaining Contact Persons in ECC


In R/3 contact persons are created via transaction code VAP1 directly or via the
customer master maintenance screen VD01/2. The number range for contact
persons is maintained via transaction code SNRO, Number range object : Partner

Create contact person in R/3 using Transaction code VAP1 or directly in the customer
master VD01/VD02 screen . The R/3 Contact persons are stored in R/3 table KNVK. Note

L&T Infotech - Confidential Page 3 of 11


Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

that there is a field called as contact person in table KNVP but this is only if you maintain
contact persons in the partner function screen of the sold-to party.

3.3 R/3 Tables – Contact Person

E.g. You create a sold-to-party 300100 with a contact person 2000103. The sold-to party
300100 can be seen in R/3 table CRMKUNNR and the contact person is stored in R/3 table
CRMPARNR.

L&T Infotech - Confidential Page 4 of 11


Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

3.4 CRM Filter Settings – R3AC1


In R3AC1, check the filter settings for object CUSTOMER_MAIN and CUSTOMER_REL. Make
sure that your customer is not blocked for transfer from R/3. If this is maintained
properly, then no additional settings are required after the initial download.

3.5 Initial Download of Contact Person


CRM Transaction code R3AS : Initial download put object name CUSTOMER_REL. In R3AC1
you see that this holds tables KNA1, KNVK, KNVP. This step need not be repeated every
time.

3.6 CRM Tables – Contact Person


After download check if the R/3 contact person data is seen in CRM table
CRMM_BUT_CONTNO and the main customer i.e. sold-to party is seen in CRM
CRMM_BUT_CUSTNO. This can also be seen via transaction code CRMM_BUPA_MAP.

3.7 R/3 Tables – Contact Person after download


After download the R/3 contact person data is seen in CRM table CRMM_BUT_CONTNO as
well as R/3 table CRMPARNR.

3.8 Number Range during Replication


In standard CRM, the number range of replicated contact person is taken from the
internal standard grouping in CRM. i.e. the ECC and CRM Contact Person codes are
different. To ensure both have the same code, see section 5.0

3.9 Trouble Shooting


To check completeness of replication, i.e. check if the contact person has come in the
main customer master go to SE16 – table BUT050. This table holds the partner functions
of a customer.

If contact person does not come down to CRM, check in Tx code R3AM1, make sure that
CUSTOMER_MAIN and CUSTOMER_REL are not in the running mode.

L&T Infotech - Confidential Page 5 of 11


Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

3.10 Manual Download - Contact Person


Use Transaction R3AR2 to create a request. however, in the order header you must
select CUSTOMER_REL as the object name, and in the details you must select the
customer numbers belonging to the contact persons. You can use Transaction R3AR4 to
start the requests and you can use Transaction R3AR3 to monitor them.

4.0 Internal number range other than standard grouping


In standard CRM, the number range of replicated contact person is determined by the
number range assigned to the standard internal Grouping.

We want the system to select number range ZZ assigned to grouping Z002 which is not
Standard Internal Grouping.

The Process Steps include:


 Create a new grouping Z002 with internal number range ZZ
 Copy function module BUPA_MWX_BDOC_MAP_MAIN_CENTRAL to
Z_CHANGE_CONTACT_GROUPING.
 In the above function module, put CONSTANTS lc_contact_grouping TYPE
bu_group value as ‘Z002’.

L&T Infotech - Confidential Page 6 of 11


Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

 In Transaction code CRMC_BUT_CALL_FU, assign this function module to event CRM


Inbound and object ‘Business Partner’.

4.1 Copy function module BUPA_MWX_BDOC_MAP_MAIN_CENTRAL


Copy function module BUPA_MWX_BDOC_MAP_MAIN_CENTRAL to
Z_CHANGE_CONTACT_GROUPING.

4.2 The function module Z_CHANGE_CONTACT_GROUPING

FUNCTION Z_CHANGE_CONTACT_GROUPING.
*"--------------------------------------------------------------------
*"*"Local interface:
*" EXPORTING
*" REFERENCE(STATUS) TYPE SMWVALSTAT
*" CHANGING
*" REFERENCE(C_BP_STRUCT) TYPE BUS_EI_EXTERN
*" REFERENCE(ERROR_SEGMENTS) TYPE SMW_ERRTAB
*"--------------------------------------------------------------------

CONSTANTS lc_contact_grouping TYPE bu_group


VALUE 'Z002'. " << ENTER CONTACT GROUPING

DATA lS_MAP_CONTACT TYPE CRMM_BUT_CONTNO.

status = 'S'.

CHECK c_bp_struct-header-object_task CA 'ICM'.


L&T Infotech - Confidential Page 7 of 11
Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

READ TABLE c_bp_struct-central_data-role-roles


WITH KEY data_key = 'BUP001' TRANSPORTING NO FIELDS.
CHECK sy-subrc = 0.

* contact number is not filled in R/3 outbound processing


SELECT SINGLE * FROM crmm_but_contno INTO ls_map_contact
WHERE person_guid = c_bp_struct-HEADER-OBJECT_INSTANCE-BPARTNERGUID.

if sy-subrc = 0.
MOVE ls_map_contact-CONTACT_NO
TO c_bp_struct-HEADER-OBJECT_INSTANCE-BPARTNER.
MOVE lc_contact_grouping
TO c_bp_struct-central_data-common-data-bp_control-grouping.
ENDIF.

ENDFUNCTION.

4.3 Transaction code CRMC_BUT_CALL_FU

4.4 The Contact Person gets transferred with new number range

L&T Infotech - Confidential Page 8 of 11


Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

5.0 Same Number Range of Contact Person : ECC and CRM


Ensuring that the number range of contact person is same in both R/3 and CRM -
OSS note 564538.

CRM Tx code BUCF is used to maintain number range 04 and BUC2 is used to
maintain number range grouping 04.

Note : The number range 04 of CRM is external and a mirror of number range of
contact in R/3. Number range of contact person in R/3 is seen via number range
object PARTNER – Transaction code SNRO.

5.1 Copy Function Module BUPA_MWX_BDOC_MAP_MAIN_CENTRAL


Create function module : Z_CHANGE_CONTACT_GROUPING copying
BUPA_MWX_BDOC_MAP_MAIN_CENTRAL

L&T Infotech - Confidential Page 9 of 11


Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

FUNCTION Z_CHANGE_CONTACT_GROUPING.
*"--------------------------------------------------------------------
*"*"Local interface:
*" EXPORTING
*" REFERENCE(STATUS) TYPE SMWVALSTAT
*" CHANGING
*" REFERENCE(C_BP_STRUCT) TYPE BUS_EI_EXTERN
*" REFERENCE(ERROR_SEGMENTS) TYPE SMW_ERRTAB
*"--------------------------------------------------------------------

CONSTANTS lc_contact_grouping TYPE bu_group


VALUE '04'. " << ENTER CONTACT GROUPING

DATA lS_MAP_CONTACT TYPE CRMM_BUT_CONTNO.

status = 'S'.

CHECK c_bp_struct-header-object_task CA 'ICM'.

READ TABLE c_bp_struct-central_data-role-roles


WITH KEY data_key = 'BUP001' TRANSPORTING NO FIELDS.
CHECK sy-subrc = 0.

* contact number is not filled in R/3 outbound processing


SELECT SINGLE * FROM crmm_but_contno INTO ls_map_contact
WHERE person_guid = c_bp_struct-HEADER-OBJECT_INSTANCE-BPARTNERGUID.

if sy-subrc = 0.
MOVE ls_map_contact-CONTACT_NO
TO c_bp_struct-HEADER-OBJECT_INSTANCE-BPARTNER.
MOVE lc_contact_grouping
TO c_bp_struct-central_data-common-data-bp_control-grouping.
ENDIF.

L&T Infotech - Confidential Page 10 of 11


Reusable Component – Contact Persons in CRM
Feb 2010
Author: Kaushik Sarkar

ENDFUNCTION.

5.2 Transaction code : CRMC_BUT_CALL_FU

Activate the above function module.

L&T Infotech - Confidential Page 11 of 11

You might also like