You are on page 1of 15

Demystyfying SAP CRM Technical

Page 1 of 15

Document History
Version Date Author Reason Reviewers Date

Page 2 of 15

Table of Contents
1.0 Executive Summary.............................................. .................................4 2.0 Tables.................................................................................... ................5
2.1 Master Data Tables...........................................................................................5 2.2 Transaction Data Tables...................................................................................6 2.3 Table Enhancements .......................................................................................6 1.1 Document Purpose...........................................................................................4 1.2 Document scope...............................................................................................4

3.0 Table Links for Data Retrieval......................................... .......................7 4.0 Data Retrieval ....................................................................... ................8 5.0 Function Modules..................................................................... ..............9
5.1 5.2 5.3 5.4 5.5 Data Creation.................................................................................................10 Data Retrieval................................................................................................10 Data Maintenance...........................................................................................12 Generic ..........................................................................................................13 Other..............................................................................................................13

6.0 Additional Details.............................................................................. ...13
6.1 Commonly Used Transactions.........................................................................13

Page 3 of 15

1.0 Executive Summary
1.1 Document Purpose
• • Provide functional consultants with the basic technical information enabling them to write better Functional Specification, reducing the timeframe in development of an object. Reduce the learning curve for Technical Consultants new to SAP CRM.

1.2 Document scope
The document comprises of • • • Details about most commonly used master/transaction/enhanced tables Details about most commonly used function modules for data creation/retrieval/maintenance Most common data retrievals linking various master/transaction tables.

The information presented in this document has been gathered and analysed after discussions held with various personnel involved in SAP CRM developments.

Page 4 of 15

2.0 Tables
2.1 Master Data Tables
Table Name Business Partner
BUT000

Description

BP: General data Contains Business Partner Number, Partner Category, Partner Type, First Name, Last Name etc. BUT020 BP: Addresses BUT050 BP relationships/role definitions: General data Contains Relationship, Partner Number (PARTNER1), Relationship Category BUT051 BP Relationship: Contact Person Relationship Similar to BUT050 , additionally contains Contact Person’s Address data BUT0BK Business Partner: Bank Data & Details BP Number, Bank Key, Bank Country Key, Bank Account Number BNKA Bank Master Data BUT100 BP: Roles ADR2 Telephone Numbers (Business Address Services) ADR6 SMTP Numbers (Business Address Services) Contains Email – Id of the BP. ADRC Addresses (Business Address Services) BP’s Complete Address Details- City, Country, Post Code, District, Street, Title No Etc TSAD3T Table containing the Title text against a Title No. Note: Pass the langu key with the language in which you want the text. COMM_PRODUCT Master Table for Product CRMM_BUAG Master table for Business Agreement CRMM_BUAG_H Header Data for Business Agreement such as Tax Category, Tax Characteristic, Form key, Business Agreement Class. Data in this table correspond to ISU Contract account table FKKVKP. CRMM_BABR_H Rule data for business agreements – data in this table correspond to ISU Contract account table FKKVK Business Transaction(Service Contracts in Particular) CNCCRMPRCUSZZBUR Condition Records for Service Contracts. We get Basic Unit Rate, Standing Charge Rate etc. (This is a Z table used in a leading ISU SAP-CRM implementation. You can give the table SAP0090 – this is a standard table. – in general all condition tables have the naming convention CNCC*) CRMD_ORDERADM_H Contains the Header Information for a Business Transaction. Note: 1. It doesn’t store the Business Partner responsible for the transaction. To get the Partner No, link it with CRM_ORDER_INDEX. 2. This table can be used for search based on the Object Id(Business Transaction No). CRMD_CUSTOMER_H Additional Site Details at the Header Level of a Business Transaction CRMC_PROC_TYPE Master table Business Transaction Type

Page 5 of 15

CRMC_PARTNER_FCT SCPRIOT

CRMC_PROC_TYPE_T CRMC_ACT_OBJ_T TJ30T CRMC_PR_ASSIGN IBIB IBIN

Definition of Partner Functions Priorities for Activities with priority text. Note: Pass the langu key with the language in which you want the text. Text for a transaction type Objective Number and Text for Activities All the status code and text Transaction Type and its Transaction Type Object. Installed Base/Ibase Installed Base Components

2.2 Transaction Data Tables
Table Name
CRMD_LINK CRMD_ORDER_INDEX

Description
Transaction GUID set for all the Business Transactions Contains Header as well as Item details for a Business Transaction. Note: 1. It doesn’t store the Business Transaction No (Object ID). To get the Business Transaction No link the table with CRMD_ORDERADM_H 2. This table can be used for search based on the Partner No Stores the Item information for a Business Transaction. The scenarios where we have a Contract Header and within contract we have Line Items for the contract, this table can be useful. E.g. Service Contracts Additional Site Details at the Item Level of a Service Contract Table for individual Appointment Types for a transaction. Individual Object Status for any business transaction. Current Status for a business transaction along with set date, set time and status code.

CRMD_ORDERADM_I

CRMD_CUSTOMER_I SCAPPTSEG CRM_JEST CRM_JCDS

2.3 Table Enhancements
Following tables were enhanced as per the project requirement in a leading ISU-SAP CRM implementation. Easy Enhancement workbench can be used for enhancing most of the transactions in CRM. Table Name
BUT000 CRMM_BUAG_H

Description
Fields such as Registration No, SIC Code, Cost to Serve etc. that appear in the additional details tab in BP transaction Fields such as Acc in Legacy, Invoice Output, Clearing Category, Bill Form, Lock Process Type etc. that appear in the Business Agreement tab in BP transaction This table is used as an extension of the service contract header i.e. if there is a requirement to

CRMD_CUSTOMER_H

Page 6 of 15

CRMD_CUSTOMER_I

add new fields to CRMD_ORDERADM_H then; this table has to be used to add the fields. This table is used as an extension of the service contract header i.e. if there is a requirement to add new fields to CRMD_ORDERADM_I then; this table has to be used to add the fields. For e.g. fields required for additional site details tab at item level of Service Contract are added to this table.

3.0 Table Links for Data Retrieval

Page 7 of 15

Business Partner

BUT0

BUT05

BUT05

BUT10

BUT00

BUT02

BNKA

ADRC

TSAD3

ADR2

ADR6

Contract CRMD_ORDER_INDEX

CRMD_LINK

CRMD_ORDERADM_

CRMD_CUSTOMER_ CRMC_PROC_TYP CRMD_ORDERADM_I

CRMC_PROC_ASSIG N

CRMD_CUSTOMER_I

4.0 Data Retrieval

Page 8 of 15

Linking Business Partner Tables logically • • • • • • BUT000 - contains the key as Business Partner Number – thus other details of business partner such as Category, Type, Name, Language, Country, Contact Person etc can be obtained from it by using the corresponding BP Number. BUT0BK- Using the BP Number and Bank Detail ID, details such as Bank Account Number, Account Holder’s Name, and Name of Bank Account etc can be obtained. BUT020 – ADRC – ADR2 – ADR6 is the link of tables used to get the Address Details of the BP corresponding to Business Partner Number (obtained from BUT000) and the address number from BUT020 table. Roles of Business Partner can be obtained from the table BUT100. Contact Person and related details for a BP number (BUT000) can be obtained using the table BUT051. Business Partner’s Roles and Relationship Details for BP number (BUT000) can be obtained from BUT050.

Linking Service Contract Tables Logically • • • • • CRMD_ORDER_INDEX: Contains GUID’s of all the transactions in CRM. Also provides a link to connect Business Partner with the CRM Transaction. CRMD_CUSTOMER_H: Contains Additional Contract Details (enhanced fields), linked to Header GUID. CRMD_CUSTOMER_I: Contains Additional Site Details (enhanced fields), links Header and Item GUID’s for all the transactions. CRMD_ORDERADM_H: Contains Header Details. GUID field can be used to link with CRMD_ORDER_INDEX. CRMD_ORDERADM_I: Contains Item Details. HEADER field can be used to link with CRMD_ORDERADM_H (header guid).

Categorization of CRM Business Transaction based on Subobject Category We have used Subobjects to categorize the Business Transactions in CRM for a leading ISU-SAP CRM implementation. Business Transaction Name Activity Service Contract Lead Opportunity Task Utility contract item Note: SUBOBJECT CATEGORY BUS2000126 BUS2000112 BUS2000108 BUS2000111 BUS2000125 BUS2000147

1. For Example if you want to retrieve all the activities in CRM, pass the OBJECT_TYPE
as ‘BUS2000126‘ in CRMD_ORDER_INDEX table. 2. The Subobject Category can be customized for a business transaction from the transaction SPRO.

5.0 Function Modules

Page 9 of 15

Function Group BUBA_3 – Contains function modules to read and change business partner addresses, central data, bank details, payment cards, roles. Function modules for contact person and employee specific information retrieval / change are also included. For most of the function modules that retrieve data, business partner number is passed as import parameter. Data is retrieved in the table specified in the interface. Return table returns status messages. For most of the function modules that add business partner related details, business partner number and a table containing the details to be added are passed via the interface. Return table returns status messages.

5.1 Data Creation
Name
GUID_CREATE BAPI_BUSPROCESSND_CREATEMULTI

Description
Create GUID for a Business Transaction Bapi to create Service Contracts programmatically. Pass the inputfields to be created in the contract. Note: BAPI_BUSPROCESSND_SAVE must be called after this function call to save the Service Contract. Bapi to save the Service Contracts. Initialize the creation of Ibase in CRM Create the Installed Base and its components. Note: Always call the function module ‘BAPI_TRANSACTION_COMMIT’ after call to any Bapi Initialize the changes to be done in Ibase in CRM Call this FM to save the changes in the Ibase Bapi to create Business Agreement for a customer Add invoice address for business partner. Pass the address type as 'rechnung' to add invoice address Add bank details for the business partner BAPI for business partner creation as Organization, Person or Group in general role. Same BAPI can be used to create Contact Person for the Business Partner Function module to establish the Business Partner and Contact Person Relationship. Pass the Relationship Category as ‘BUR001’ Add Role to Business Partner for e.g. Sold to Party ‘CRM001’, Contact Person ‘BUP001’ BAPI Add Tax Number for the existing Business Partner Create Classification Data for a Business Partner Create Business Agreement BAPI to create Contract. Populate the Header and Line Item Details before calling the BAPI

BAPI_BUSPROCESSND_SAVE BAPI_ECRMISUTO_INIT BAPI_ECRMISUTO_CREATEMULTIPLE

CRM_IBASE_INITIALIZE CRM_IBASE_SAVE BAPI_BUPA_FRG0130_CREATE BAPI_BUPA_ADDRESS_ADD BAPI_BUPA_BANKDETAIL_ADD BAPI_BUPA_CREATE_FROM_DATA

BAPI_BUPR_RELATIONSHIP_CREATE

BAPI_BUPA_ROLE_ADD BAPI_BUPA_TAX_ADD BAPI_BUPA_FRG0040_CREATE BAPI_BUPA_FRG0130_CREATE BAPI_BUSPROCESSND_CREATEMULTI

5.2 Data Retrieval
Name Description

Page 10 of 15

BAPI_BUPA_ADDRESSES_GET BAPI_BUPA_ADDRESS_GETDETAIL BAPI_BUPA_ADDRESS_GET_NUMBERS BAPI_BUPA_BANKDETAILS_GET BAPI_BUPA_BANKDETAIL_GETDETAIL BAPI_BUPA_BANKDETAIL_NUMBERS BAPI_BUPA_CENTRAL_GETDETAIL BAPI_BUPA_EXISTENCE_CHECK BAPI_BUPA_GET_NUMBERS BAPI_BUPA_RELATIONSHIPS_GET BAPI_BUPA_ROLES_GET BAPI_BUPA_ROLE_EXISTENCE_CHECK BAPI_BUPA_SEARCH BAPI_BUPA_STATUS_GETDETAIL BAPI_BUPR_ACTIVITYP_EXISTCHECK BAPI_BUPR_CONTP_ADDRESSES_GET BAPI_BUPR_CONTP_ADDR_GETDETAIL BAPI_BUPR_CONTP_GETDETAIL BAPI_BUPR_EMPLO_ADDRESSES_GET BAPI_BUPR_EMPLO_ADDR_GETDETAIL BAPI_BUPR_EMPLO_GETDETAIL BAPI_BUPR_RELATIONSHIP_GET BAPI_BUPR_RELSHIP_CHECKEXIST BAPI_BUPR_RELSHIP_GET_DETAIL BAPI_BUPR_RESP_EMPLO_CHEKEXIST BUPA_PARTNER_CONTACT_SEARCH ECRM_ISU_COMP_BY_ADDRESS CRM_ORDER_GET_HEADER_GUID CRM_ORDERADM_H_READ_OW CRM_ORDERADM_I_READ_OW CRM_ORDER_READ

CRM_ORDER_GETSTATUS

Determine All Addresses Read Address Read Address Numbers Determine All Bank Details Read Bank Details Read Bank Details Numbers Read Central Data Check Existence of Business Partner Read Business Partner Numbers Determine All BP Relationships Determine All Roles Check Existence of Role Search Business Partner for Telephone, E-Mail, Address Business Partner: Read Status Check Existence of Contact Partner Relationship Read Contact Person Relationship Addresses Read Contact Person Relationship Addresses Read Contact Person Relationship Read Contact Person Relationship Addresses Read Employee Relationship Address Read Employee Relationship Read General Relationship Check Existence of General Relationship Read General Relationship Read Relationship of Employee Responsible Searches business partners for telephone, E-Mail, address Check for Existence of Ibase Get Header GUID for Item GUID pass ref_kind as b Read the Header Details for a Business Transaction. Pass the Header guid. Read the Line Item Details for a line item. Pass the line item guid. Get all the Service Contract details. Note: Pass the requested objects to fetch only the required details. This can also be used to get the details of activities/leads/opportunities etc. Get status of the Service Contract

Note: CRM_ORDER_READ Function Module 1. 2. 3.
CRM_ORDER_READ is a function module which can be used to get the details of any business transaction based on the Header GUID, Item GUID or both. Always pass the IT_REQUESTED_OBJECTS structure to this function module to fetch the required details only. This function module can not be executed directly instead SAP has provided a report CRM_ORDER_READ for the same for testing purpose. We can pass Business Transaction Number (Object ID), Header GUID or Item GUID to this report to get the required details.

Some Exporting Parameters in CRM_ORDER_READ Function Module Return Structure Name
ET_ORDERADM_H

Details Fetched
Header Details of a Business Transaction such as OBJECT_ID, PROCESS_TYPE etc.

Page 11 of 15

ET_ORDERADM_I ET_ACTIVITY_H ET_ACTIVITY_I ET_CUSTOMER_H ET_CUSTOMER_I ET_APPOINTMENT ET_PARTNER ET_STATUS ET_BILLING

ET_ORDPRP_OBJL_I_D ET_DOC_FLOW

Item Details of a Business Transaction such as PRODUCT, PRODUCT_KIND, HEADER etc. Header Details of an activity such as PRIORITY, OBJECTIVE, Address Details etc. Item Details of an activity. Additional details at Header level Additional details at Item level All the dates at Header and Item level Partner Details at Header and Item level Status of Business Transaction at Header and Item level Billing related details for a Business Transaction both at Header and Item (This structure was enhanced in a leading ISU SAP-CRM implementation to include BUAG_ID(Business Agreement) field in a Service Contract Object List details such as PRODUCT Ref. Details of the previous Business Transaction

5.3 Data Maintenance
Name
BAPI_BUSPROCESSND_CHANGEMULTI

Description
Bapi to change Service Contracts programmatically. Pass the inputfields to be modified. Note: CRM_ORDER_SAVE function module must be called to save the changed contract explicitly after call to this function module. Save the changes made to the Service Contract. Just pass the Header_GUID of the service contract. Maintain the Dates for a Service Contract (Start Date, End date, Date of Sale, Planned Contract Start Date etc). Don’t forget to pass the input_fields to be maintained. Note: CRM_ORDER_SAVE function module must be called to save the changed contract explicitly after call to this function module. Maintain the user status of Service Contracts. Don’t forget to pass the input_fields to be maintained. Note: CRM_ORDER_SAVE function module must be called to save the changed contract explicitly after call to this function module. Change the Installed Base components Note: Always call the FM ‘CRM_IBASE_SAVE’ to save the changes done to Ibase Change Bank Details Delete Bank Details Change Central Data Change Address Delete Address Change Bank Details Delete Bank Details Change Central Data ALE Replicating Central Data Business Partner: Delete Status Change Contact Partner Relationship Delete Contact Partner Relationship

CRM_ORDER_SAVE CRM_APPT_MAINTAIN_SINGLE_OW

CRM_STATUS_MAINTAIN_OW

CRM_IBASE_COMP_CHANGE

BAPI_BUPA_BANKDETAIL_CHANGE BAPI_BUPA_BANKDETAIL_REMOVE BAPI_BUPA_CENTRAL_CHANGE BAPI_BUPA_ADDRESS_CHANGE BAPI_BUPA_ADDRESS_REMOVE BAPI_BUPA_BANKDETAIL_CHANGE BAPI_BUPA_BANKDETAIL_REMOVE BAPI_BUPA_CENTRAL_CHANGE BAPI_BUPA_CENTRAL_SAVEREPLICA BAPI_BUPA_STATUS_REMOVE BAPI_BUPR_ACTIVITYP_CHANGE BAPI_BUPR_ACTIVITYP_DELETE

Page 12 of 15

BAPI_BUPR_CONTP_ADDR_CHANGE BAPI_BUPR_CONTP_ADDR_REMOVE BAPI_BUPR_CONTP_CHANGE BAPI_BUPR_CONTP_DELETE BAPI_BUPR_EMPLO_ADDR_CHANGE BAPI_BUPR_EMPLO_ADDR_REMOVE BAPI_BUPR_EMPLO_DELETE BAPI_BUPR_RELATIONSHIP_CHANGE BAPI_BUPR_RELATIONSHIP_DELETE BAPI_BUPR_RELATIONSHIP_REMOVE BAPI_BUPR_RESP_EMPLO_DELETE

Change Contact Person Relationship Address Delete Contact Person Relationship Address Change Contact Person Relationship Address Delete Contact Person Relationship Change Employee Relationship Address Delete Employee Relationship Address Delete Employee Relationship Change General Relationship Delete Relationships Delete General Relationship Delete Relationship of Employee Responsible

5.4 Generic
Name
BAPI_CURRENCY_CONV_TO_INTERNAL CCM_GO_BACK_MONTHS

Description
Function Module to convert the Currency field to internal format. Enter the currency and amount to convert. Go Back specified number of months from a given date.

5.5 Other
Name
ECRM_ISU_ACTIVITY_DISPLAY CRM_CLM_CREATE_CALL_LIST

Description
Displays an activity by taking the Business Transaction Number for the same. Create call list for activities generated

6.0 Additional Details
6.1 Commonly Used Transactions

Page 13 of 15

Transaction

Description

Page 14 of 15

BP CIC0 CRMD_ORDER SPRO CRMD_CALL_LIST IB51 / IB52 / IB53 COMMPR01 PPOSA_CRM SBDM SMOEAC SMQ1,SMQ2 SMW01

Business Partner (Creation/View/Modification) Customer Interaction Centre CRM Transaction (Create/View/Modify) Configuration related settings Create/ Maintain Call list Ibase Creation / Change / View Maintain Products Display Organizational Model Bdoc maintenance Administration console – CRM Middleware Queue monitoring transactions for inbound and outbound queues. Transaction for monitoring bdocs.

Page 15 of 15