You are on page 1of 68

CR1050 SAP CRM Middleware v1.

India SAP CoE, Slide 1

CRM Middleware
1 2

PrepareMe TellMe
3

ShowMe
LetMe HelpMe

5
India SAP CoE, Slide 2

CRM Middleware
1 2

PrepareMe TellMe
3

ShowMe
LetMe HelpMe

5
India SAP CoE, Slide 3

PrepareMe

Purpose Use Challenges

India SAP CoE, Slide 4

Purpose
CRM Middleware links together the various heterogeneous systems (mobile clients, R/3 back-end systems, BW, etc.) within a CRM landscape, and provides all components with the necessary information CRM middleware is scalable and can easily be configured to grow with your companys needs. Data is exchanged between the CRM system and the connected R/3 System or any third party system primarily via the CRM Middleware. This can be realized through adapters

India SAP CoE, Slide 5

Use
SAP- CRM Middleware is used exchange data between the CRM system, mobile clients, connected R/3 System or any third party system Its main functionalities are:
Data Queuing and Transport Replication and re-alignment Data Exchange and Mapping

India SAP CoE, Slide 6

Challenges
Troubleshooting Errors Any enhancement to the standard SAP objects

India SAP CoE, Slide 7

CRM Middleware
1 2

PrepareMe TellMe
3

ShowMe
LetMe HelpMe

5
India SAP CoE, Slide 8

TellMe
Overview Concepts Tools Others

India SAP CoE, Slide 9

Overview
CRM-Middleware Landscape CRM Middleware Architecture

India SAP CoE, Slide 10

CRM-Middleware
CRM Middleware links together various types of data producers within a CRM landscape.

Mobile clients R/3 back-end systems BW Other Non SAP systems

It is the component responsible for replication, synchronization and distribution of data objects between the CRM application and other back-end systems.

India SAP CoE, Slide 11

Landscape

000

India SAP CoE, Slide 12

CRM Middleware Architecture


CRM Server The CRM Middleware
Is integral part of CRM server Is the message hub
CRM Middleware Groupware Adapter External Interface Adapter R/3 Adapter BW Adapter Mobile Client Adapter SAP Web Application Server CDB CRM Server Applications

Requires
No additional software No extra installation No extra server

CRM Adapter (Validation service)

Benefits
Significantly reduces integration costs

CRM Database

India SAP CoE, Slide 13

Concepts
Data Exchange Site Type Concept Initial download Adapter Objects Delta Load Synchronization load Request load BDocs Replication and Re-alignment Publication-Replication Concept CDB (Consolidated Database)

India SAP CoE, Slide 14

Data Exchange
Data exchange between SAP CRM and SAP R/3 back end or Third Party systems or Mobile Clients take place primarily via the CRM Middleware
SAP CRM & SAP Back End systems: A plug-in is installed in R/3 end which acts as the equivalent of R/3 adapter in the CRM side. Third Party systems: The data exchange is done through XIF (External Interface) adapters, either in the form of XML documents or in the form of IDOCs.

Mobile Clients: The mobile clients are connected to the CRM server via communication station.

India SAP CoE, Slide 15

Site Type Concept


Every receiver of messages is represented within the CRM Middleware as Site. There is a one-to-one relationship between sites and physical receivers. Each site is assigned to a site type . A site representing a SAP R/3 Back-End is of site type R/3
Same Site Type Same Site Type

Site A

Site B

Site C

Site D

Site E

Mobile Clients

R/3 Backend

Non R/3 Back-ends via XML

India SAP CoE, Slide 16

Initial download
CRM being the Lead System, all data coming inside the CRM system is considered as download. Through initial load Business and customizing data can be downloaded. Initial load can be done from the R/3 Back-End to the CRM Database, from the CRM Database to the CDB, from the CRM Database to external site Transaction: R3AS

India SAP CoE, Slide 17

Initial Download of Customizing data (from R/3)


CRM
R3AS : Start Initial Load For Customizing Adapter Object R/3 Adapter

R/3
CRS_FIRST_DOWNLOAD_TRIGGER qRFC

BAPIMTCS
qRFC

Generic Extractor

Mapping FM R/3 Table

CRM Table

India SAP CoE, Slide 18

Initial Download for Business Data


CRM
R3AS : Start Initial Load For Business Adapter Object R/3 Inbound Adapter

R/3
CRS_FIRST_DOWNLOAD_TRIGGER qRFC

BAPIMTCS
qRFC

Specific Extractor

Inbound Message Flow

Validation Service R/3 Tables CRM Application

CRM Database

Outbound Message Flow

India SAP CoE, Slide 19

Business Adapter Objects


R3AC1

Source Site

Filter Option

Filter Criteria

R/3 tables used by the extractor

India SAP CoE, Slide 20

Delta Load
The delta download and upload is used to keep the business data and the master data in the CRM, the R/3 system, and the CDB in sync during normal operation. Delta load is applicable only for business data and not for customizing data. Manual de-activation of Delta Loads is possible via the transaction R3AC4. For this, in the CRM Server for each object class there are two groups of queues which control the data transfer.
Via the queue group for the initial data download (R3AI*), the initial data is provided for the CRM Server from the R/3 backend. In the queue group for the delta data synchronization (R3AD*) change information is collected for the initial data.

During an initial data transfer the delta queues are suspended for each business object. Once the initial data transfer is complete, the delta queues are released again and the change information forwarded to the CRM Server.

India SAP CoE, Slide 21

Synchronization Download
This type of download is used for customizing data and is only possible between CRM and an R/3 based OLTP system. In contrast to the delta download for business objects, customizing data is not downloaded automatically. Instead, the synchronization download has to be started manually or should be scheduled for fixed time intervals (e.g. weekly or monthly) in a productive system. The queue name for these queues starts with R3AI* and can be monitored in the monitor for initial download.

India SAP CoE, Slide 22

Request Download
Data request can be done in 3 steps 1. Defining request
a. We can define data requests from an R/3 backend or from the CRM database. b. The filter criteria defined for the initial data transfer from R/3 are taken into account automatically in requests. c. Transaction: R3AR2

2.

Start request
a. This function allows you to request defined data from a source site and transfer it to a target site. b. Transaction: R3AR4

3.

Monitor request
a. Here we can analyze or stop data requests to the R/3 back-end. b. Transaction: R3AR3

India SAP CoE, Slide 23

BDocs
BDoc Introduction BDoc Classes- Overview sBDoc (Synchronization BDoc) mBDoc (Messaging BDoc)

India SAP CoE, Slide 24

Business Documents (BDocs)


Mobile Clients
KNA1 ADRC KNVV

CRM Server

CRM Server

BDoc David

BDocs acts as a process container for processing Business objects and for transporting them as one unit instead of having to process/transport several individual table entries.

India SAP CoE, Slide 25

Business Documents (BDocs)


Distinction BDoc type (structure)
KNA1 KNA1 KNVV

BDoc instance

Customer BDoc David NAME1 = David NAME2 = Boon KUNNR = 60078 ( All fields ) Also: insert or delete

BDoc message

Customer BDoc David . Task = update Fields CITY1 = New York , Street = 1 Broadway (Contains only modified fields)

BDocs Type: This is a structure that needs to be defined to each Business object. BDoc Instance: The BDoc type with all the required fields. BDoc message: This contains modified fields only. It also includes deleted fields. There will be one BDoc instance for a Business Object, but there can be multiple BDoc messages (with their own Ids) for one BDoc instance.
India SAP CoE, Slide 26

Decoupling of Messaging and Synchronization


Two Integration Layers Messaging Synchronization
R/3 Backend

CRM Server

Synchronization Layer
SAP BW

Messaging Layer

SAP Web Application Server


Non R/3 Backend

The synchronization layer provides more sophisticated replication services

The Messaging Layer uses messaging BDocs for data exchanges with CRM Server Applications, R/3 Back-ends and external System. The synchronization layer exchanges data with mobile clients and uses synchronization BDocs.

India SAP CoE, Slide 27

BDoc Classes- Overview


Synchronization BDocs (sBDoc) sBDoc
Data synchronization with Mobile Clients. Mapping between of BDoc segments and CDB tables. Transport changed fields (delta info., net data)

Messaging BDocs (mBDoc)


mBDoc

No exchange with Mobile Clients. Not stored in CDB No mapping between segments and database tables. Transport entire instances (gross data) to CRM server application

Mobile Application BDocs BDoc

Used by the mobile sales/service application on the mobile client to query data from database.

India SAP CoE, Slide 28

mBDoc (Messaging BDoc)


mBDoc type consists of two parts: Classical Part
This is a mandatory structure. The BDoc header and segments are arranged in a hierarchical fashion. To be modeled with BDoc modeler. This is used to determine the receivers of mBDoc messages. Generated structure
/1CRMG0/CRMW_BUPA_HEAD002

BUS_E1_MAIN

Extension
This is optional structure. To be modeled with DDIC

Contains the transaction data.

India SAP CoE, Slide 29

sBDoc (Synchronization BDoc)


Only used for data synchronization with mobile clients. sBDoc types contain direct mappings to tables of the consolidated database. sBDoc types are used to make data persistent in the CDB and to exchange messages between the CRM Server and mobile clients. Realignment and dependencies between sBDoc types are supported.
Type, sender, timestamp, Eg. Order Header Control segment Body Business Partner Master

sBDoc structure

Error segment
Data segment Data segment Business Partner Address

India SAP CoE, Slide 30

Synchronization BDoc Type

Synchronization BDoc Name

mBDoc mapped to sBDoc

Function Module generated on activating the BDoc

Name of the DDIC message structure

India SAP CoE, Slide 31

Replication and Re-alignment


Replication means message forwarding to one or more site or The distribution of Business data from a source site to a target site through the CRM Server. It defines the rules for how the data is distributed

Replication Model is created in the Administration Console. In Administration Console we define the sites for data replication
Objects to define a Replication Model are:
Replication Object Publication Subscription

The process of data redistribution is called data Re-alignment.

India SAP CoE, Slide 32

Publication-Replication Concept
Publication Subscription

India SAP CoE, Slide 33

Publication
Publications are defined as data containers in which data is grouped together logically. Replication object can be assigned to a publication. You define publications in order to make them available to subscriptions. You can use these to subscribe to sites (data sets) for the predefined publications and you can state concrete values for the criteria fields. You can only change publications of the type Unfiltered (bulk) and Simple unfiltered. There are different types Of Publication
Intelligent Simple Intelligent (SYNC) Bulk Simple Bulk (MSEG) Simple Intelligent (MSEG)

India SAP CoE, Slide 34

Publication
Publication Type List of Replication object included in the publication

Criteria value assignment for the publication

Publication is assigned to this subscription.

India SAP CoE, Slide 35

Subscription
Subscriptions are assignments of sites to previously defined publications. They are created and maintained by the system administrator. Only when subscriptions have been made for a site is data made available to this site. You can determine the distribution of data to the current sites by creating subscriptions. For this reason you have to subscribe to a publication, and then you can assign one or more sites to the subscription.

Subscription is assigned to the site

India SAP CoE, Slide 36

Subscription
Creating Subscription
Choose Object Create Choose Continue and in the following screen enter the name of the new subscription, as well as the publication to which you want to subscribe

Choose Continue. You now have to establish criteria values for your subscription in the case of intelligent and simple intelligent publications.
To do so, enter a low value for each criteria field and also a high value if the operator requires a value range.

India SAP CoE, Slide 37

CDB (Consolidated Database)


CDB is a logical Database within the CRM database Most CDB tables have the prefix SMO in their table name. CDB tables that correspond to R/3 tables have the same table name plus the prefix SMO. CDB tables and R/3 tables are partly alike. Depending on the application, CDB tables may have less or more fields than the relating R/3 tables.

Table xyz
A B C

Table SMOxyz
A B C

CDB

India SAP CoE, Slide 38

Tools
Administration Console DIMA BDoc Modeler MW Cockpit Queue monitor Middleware Trace

India SAP CoE, Slide 39

Administration Console
It is used for administering sites and mobile users, as well as for administering and configuring data distribution Administration console supports the creation, change and deletion of R/3 sites The entries for jobs to extract data from BDoc types of the type bulk in EXTRACTBLK which is one of the replication and realignment queues are created by the Administration Console Transaction: SMOEAC

India SAP CoE, Slide 40

Create R/3 site in Admin Console


Get Site Attributes Get Site Attributes

After Creation of the Site, Subscriptions are assigned to it

India SAP CoE, Slide 41

The Data Integrity Manager (DIMA)


It helps you to detect and repair inconsistencies between objects across components within the SAP CRM System landscape, means we can actually compare records at table level, say, for business partners; across systems. i.e. between CRM and R/3 or CRM and CDB (Mobile). DIMA tool is accessed via transaction code SDIMA

India SAP CoE, Slide 42

BDoc Modeler
The BDoc Modeler is a tool used for displaying, creating and enhancing BDoc types and these BDoc types are further stored and administered in the CRM Middleware Repository The hierarchical segment structure is modeled with the BDoc Modeler Transaction: SBDM

India SAP CoE, Slide 43

Monitoring Cockpit
The Monitoring Cockpit provides you with status information and also serves as a navigation platform to access important administration and monitoring tools The Monitoring Cockpit provides an alert monitor for CRM Middleware. Transaction: SMWP

India SAP CoE, Slide 44

Queue monitor
There are various queues within CRM Middleware which can be displayed and monitored. Following are the different queues
Mobile Site queue Outbound queues Inbound queues Replication & Realignment (R&R) queues

Queue Scheduler:
QIN Scheduler (Trans: SMQR) - The processing of all inbound queues is scheduled by the QIN Scheduler. You can use this scheduler to register, deregister, activate, or deactivate your queues. QOUT Scheduler (Trans: SMQS) This is implemented to improve performance when sending qRFC and tRFC messages.

India SAP CoE, Slide 45

Queue monitor
Site queue: With this function you can display all the mobile sites defined in the CRM System
together with the queue assigned to each of these sites. For eg. if we want to know which queue is assigned to a specific site, if we want to check if this queue has been registered for the qRFC scheduler and when data was last entered into this queue. Transaction: SMWMQUEUES

India SAP CoE, Slide 46

Queue monitor
Outbound queues: Transaction-SMQ1

CRM queue groups Outbound queues CDB* CRM_SITE* CSA* EXT* R3AI/R* R3AU*

Description

Start queues for loads CRM -> CDB Load queues for Mobile Clients Send queues of CRM Server Applications Start queues for loads CRM -> Ext. Start queues for loads from ERP Backend system Load queues CRM -> ERP Backend system

India SAP CoE, Slide 47

Queue monitor
Inbound queues: Transaction-SMQ2

CRM queue groups Inbound queues CRI* CRM_SITE* R3A* CSA*

Description

Initial load queues CRM -> CDB Load queues from Mobile Clients Load queues ERP Backend -> CRM Send inbound queues of CRM Server Applications

India SAP CoE, Slide 48

Queue monitor
Replication & Realignment (R&R) queues: Monitors the replication and
realignment queues for the clients of the CRM System. To call up this function in your SAP Easy Access user menu choose Architecture and Technology Middleware Monitoring Queues Monitor R&R Queues. Transaction: SMOHQUEUE

India SAP CoE, Slide 49

Middleware trace

The Middleware Trace Monitor is a tool to record events and display the recorded information. Depending on the data we want to display, we can specify different trace levels. To get a higher granularity of the trace data, you can also choose between several trace environments

India SAP CoE, Slide 50

Others
XIF Adapter Groupware Adapter

India SAP CoE, Slide 51

XIF Adapter
Data is exchanged between the CRM System and a connected third-party system primarily via the CRM Middleware. The connectivity is realized through the XIF (external Interface) Adapter. The XIF Adapter transfers data from and to the external system, usually with XML documents via HTTP (s). The external interface adapter (XIF adapter) provides:
Services in the CRM Server Messaging Flow Bulk-message capable IDoc and XML interfaces for external systems.

CRM

XML file mBdoc

XIF Adapter
XML file

External Systems

India SAP CoE, Slide 52

Groupware Adapter
An enhancement to the CRM Middleware provides a framework that seamlessly integrates mySAP CRM with the Microsoft Exchange or Lotus Domino groupware server. This capability allows users of groupware solutions to access tasks and business partners that have been created by an application of the mySAP CRM solution. This CRM groupware integration will also include Workforce Management.

Business Scenarios
Account Management Activity Management Workforce Management

India SAP CoE, Slide 53

Groupware Adapter
The Groupware Adapter on the CRM server supports the conversion of messages. BDoc messages are converted to standard Groupware formats (iCalendar and vCard). iCalendar and vCard are the Internet standards for the display of Groupware calendar objects and contacts
CRM Server
CRM Middleware

Groupware Server

d SAP
Groupware Connector

Business Partners Activities

Groupware Adapter

CRM Server
MapBox
_____ ____ ____

------------------

Message Transformation

BDOC Message

XML Vcard/ICalendar

XML BDoc Message

India SAP CoE, Slide 54

CRM Middleware
1 2

PrepareMe TellMe
3

ShowMe
LetMe HelpMe

5
India SAP CoE, Slide 55

ShowMe
Initial download - Monitor BDoc monitor Analyzing Problem Debugging from CRM to R/3

India SAP CoE, Slide 56

Initial download - Monitor


Transaction: R3AM1 This transaction is used to monitor the progress of the Initial download

India SAP CoE, Slide 57

BDoc monitor
Transactions: SMW01 / SMW02 Features of BDoc monitor: Analysis
Search for special error situations per BDoc ID, BDoc type, user, date, message ID, flow context, BDoc status and linked BDoc messages.

Display functionality Corrective action


Reprocess failed BDocs Delete failed BDoc messages

Show error

Re-process Delete

India SAP CoE, Slide 58

Analyzing Problem
Tips for troubleshooting: Scenario: Data exchange with R/3 system Analyze the status of BDoc message Check outbound/inbound queue in CRM side Check for short dumps in R/3 side Check outbound/inbound queue in R/3 side Check for short dump in CRM side

India SAP CoE, Slide 59

Debugging from CRM to R/3


Steps for debugging a document from CRM to R/3

Stop the document flow in the queue


Stopping the flow without deregistering the queue Stopping the flow by deregistering the queue

Start the process from queue Call to R/3 system

India SAP CoE, Slide 60

CRM Middleware
1 2

PrepareMe TellMe
3

ShowMe
LetMe HelpMe

5
India SAP CoE, Slide 61

LetMe
1. Create a BP and find out the sites to which it is being replicated. Hint: Replication object is BUPA_MAIN 2. In initial load we need to replicate a certain range of sales orders from R/3. How can this be achieved?

3.

Identify the Adapter object that could be used download R/3 Material. Note down the associated Bdoc name.
Download a single Material from R/3 to CRM through Request download. Go to Admin Console and identify the connected R/3 site.

4.

5.

India SAP CoE, Slide 62

CRM Middleware
1 2

PrepareMe TellMe
3

ShowMe
LetMe HelpMe

5
India SAP CoE, Slide 63

HelpMe
Flow Context Tools available for analyzing the problem Middleware Monitoring Transactions Appendix: Classification of BDoc States

India SAP CoE, Slide 64

Flow context
A sequence of services for a BDoc type is called Flow Context. The entire Flow of a BDoc type may consist of one or more Flow Contexts. Transaction: SMO8FD

India SAP CoE, Slide 65

Analyzing Problem
Tools available for analyzing the problem:
Receivers Errors Middleware Trace Classic Data SMW01: Displays a list of the receivers of a message SMW01: Displays error segments SMW01: Displays records for individual steps SMW01: Data segments of a message SMW01: Extension of a message (only for m-BDoc messages) SMQ1 (see also outbound queue scheduler SMQS) SMQ2 (see also inbound queue scheduler SMQR) ST22 SDIMA: Compare and adjust data between two data sources

Extension Data
Outbound queues Inbound Queues Short Dumps DIMA System log
India SAP CoE, Slide 66

SM21: Check for User xxx is deleting inbound/outbound queue xxx to see if queues were manually deleted.

Middleware Monitoring Transactions


Some of the main monitoring transactions:
Tool
SMWP SMW01 SMW02 SMW02A

Description
Monitoring Cockpit Monitoring BDoc Messages BDoc Message Summary BDoc Message Error Analysis

SMW03
SMWT SMW00 SMOHQUEUE R3AM1

Unprocessed BDoc Messages


Monitoring Middleware Trace Error Handling Customizing Replication/ Realignment Monitoring Initial Load

SMQ1
SMQ2 SMQR SMQS

qRFC Outbound Queue Monitor


qRFC Inbound Queue Monitor Inbound Queue Scheduler Outbound Queue Scheduler

India SAP CoE, Slide 67

Classification of BDoc States


Bdoc State
D01 E01 E02 E03 E04 E05 E06 E07 E08 E09 F01 F02 F03 F04 F05 I01 I02 I03 I04 O01

BDoc State Description


To be processed (Debug) Technical error (incomplete) Partially send, receivers have errors BDoc cannot be read from DB BDoc validation error Inbound processing failed Outbound processing failed Conversion error Mapping error Update failure Rejected (fully processed) Confirmed (fully processed) Set to processed (fully processed) Confirmed (fully processed by all receivers) Information (no processing) Received (intermediate state) Written to qRFC Queue (intermediate state) After qRFC step (intermediate state) BDoc stored before update task (intermediate state) Sent to receivers (not all have confirmed)

R01
T01

Retry after temporary error


Temporary lack of ressources in application layer

India SAP CoE, Slide 68

You might also like