Você está na página 1de 6

CRM Middleware Demystified

by Ned Falk, Senior Education Consultant, SAP America

CRM Middleware contains important functionality to help SAP CRM share data with other
>> Key Concept
systems. Learn about the components involved with CRM Middleware and then see how it helps CRM Middleware provides software
to transfer data between SAP CRM and R/3 or SAP ERP Central Component. to enable the transfer of data to and
from SAP CRM. CRM Middleware is
SAP CRM, SAP NetWeaver Business delve more deeply into the configuration an integrated part of SAP CRM and
Intelligence (BI), and R/3 or SAP ERP aspects of CRM Middleware. links SAP CRM with another applica-
Central Component (ECC) share master system, such as SAP ERP Central
For those who want a refresher on the terms Component, or a non-SAP system.
data about customers and orders. CRM
used when discussing CRM Middleware,
Middleware software, delivered standard
refer to the sidebar, “Before You Begin:
with SAP CRM, facilitates these activities
CRM Middleware Terms.” The processes it passes between them and SAP CRM.
by ensuring that the data passes smoothly
mentioned in this article apply to R/3 4.6
among the systems. However, I often find CRM Middleware is the collection of
and later and mySAP CRM 4.0 and later.
that people who take my classes are unfa- software that links SAP CRM with its
miliar with how CRM Middleware works. supporting applications, such as Inter-
CRM Middleware Architecture action Center and Campaign Management.
Although it is impossible to discuss and
Although CRM Middleware has support This collection is further grouped into
describe CRM Middleware thoroughly in
for generic technologies (specifically separate software that links SAP CRM
just one article, let me introduce you to
XML), nearly all companies leverage the with one specific type of system (site).
the basic architecture of CRM Middle-
SAP-specific technologies used to pass The specific software for each purpose is
ware. Then I’ll walk you through the steps
data between CRM and the other SAP called an adapter, which functions as a
of using CRM Middleware to transfer data
software. Figure 1 shows which systems technology link between SAP CRM and the
from R/3 to SAP CRM. Finally, I’ll show
are typically involved in a CRM Middle- associated system (Figure 2 on the next
you the reverse steps of sending data from
ware implementation and the kinds of data page). For instance, the BW Adapter links
SAP CRM to R/3. In a future article, I’ll
SAP CRM data into the format and tech-
nical storage required to feed the data to
SAP NetWeaver BI. The R/3 Adapter
passes data between CRM and R/3 (ECC).

Adapters are delivered functionality of


the CRM Server. Although most adapters
have names that disclose the system types
they pass data between (for example, the
R/3 Adapter), two of them might not be
so obvious. One is the CRM Adapter. This
collection of software validates incoming
data using the logic configured for each
CRM application. This ensures that only
valid data is written to the CRM system.
The second is the External Interface
Adapter (XIF), which is responsible for
the communication between CRM and
third-party systems (normally back-office
Figure 1 The basic landscape and data involved with SAP CRM systems). It is designed to process incom-
ing and outgoing XML or IDoc messages. BUPA_MAIN is for business partners Step 5. The system uses different function
modules to validate specific business
and BUS_TRANSACTION_MESSAGE
Sending Data from R/3 data and save it in SAP CRM using the
is the mBDoc for sales orders. CRM Adapter. If the data saves success-
to SAP CRM
Before I get into the data flows, I should
mention that you must make some techni-
cal settings to link the CRM system to
your other systems. For example, you
need to set up Remote Function Call (RFC)
destinations with log-on information in
SAP CRM and, in most cases, the target
system. In addition, you must set up the
tables delivered with the plug-in to tell
R/3 which RFC destinations are active
CRM systems that need R/3 information.
Let’s track what happens in two scenarios.
First let’s see what happens when you
create a new sales order in R/3 and you
want to transfer this information to SAP
CRM. Figure 3 depicts a simplified
version of the seven steps in this flow.
Step 1. A user saves or updates an order
in R/3. In many cases, you may maintain
the orders in SAP CRM, but either direction
is common and possible. Figure 2 Adapters with CRM Middleware
Step 2. The save triggers a Business
Transaction Event (BTE). This takes
the customer data and writes it into a flat
generic structure BAPIMTCS. This struc-
ture consists of a very long field, which
stores the order and customer data.
Step 3. SAP CRM uses queued RFC
(qRFC) to write the BAPIMTCS struc-
ture to an outbound queue in R/3. The
structure containing the data is only sent
to SAP CRM if there are available
resources and a live connection exists. To
accomplish this, CRM uses a qRFC to
transfer the data to an outbound R/3
queue. The data then moves to an inbound
queue in SAP CRM.

Step 4. The R/3 Adapter in CRM takes


the BAPIMTCS structure from the
inbound queue and converts it to a
messaging BDoc (mBDoc). The mBDoc
is a database object designed to hold a
specific piece of data. For example, Figure 3 The track of a delta order that originates in R/3
fully, then it is valid and the system calls Sending Data from
the outbound flow.
SAP CRM to R/3 >>Note
For more information, you can attend
Step 6. The outbound flow calls various Now that I’ve shown you the flow for
SAP Education’s CRM Middleware
services (software functions for a specific delta processing from R/3 to SAP CRM,
overview in course CR500 (CRM Mid-
purpose). The most important is the noti- I’ll describe the minor differences, at a
dleware). You can read more about
fication service, which uses the data high level, in the other direction. Basi-
this course at www.sap.com/usa/
maintained in the administration console cally, instead of R/3 initiating the inbound
services/education/index.epx.
to determine which sites need the data in flow, the system calls the CRM Adapter
the order. For example, if a mobile site when you create or change a business
needs the data, the system writes it to the object in SAP CRM. This process calls
the outbound messaging flow and any >>Note
Consolidated Database (CDB) for later
applicable adapters. Account groups are used in R/3
replication to mobile employees.
for number range assignment.
Step 7. The system calls other adapters The R/3 Adapter, in outbound mode, is To ensure that business partners
as needed. If other R/3 systems or third- responsible for taking the BDoc struc- created in SAP CRM have the same
tured data, mapping it to the BAPIMTCS
party back ends need the data, the system customer number when they get
structure, and sending it via qRFC to R/3.
calls the appropriate adapter software to to R/3, SAP CRM needs the informa-
The plug-in software then executes a spe-
accomplish the task. tion about these account groups.
cific function module to parse the very
This is an example of the need to
In most cases, the system also calls the long data field, which is in the structure
transfer customizing data from R/3
BW Adapter as part of the outbound flow. that contains the business information,
to SAP CRM.
The BW Adapter’s job is to take the data and write the record to the R/3 tables.
(in the format of a BDoc) and transfer it to
The previous section covers delta pro-
a specialized outbound queue called the
cessing in both directions for business
BW delta queue. It transfers the data to a objects containing both master data and
flat structure format that SAP NetWeaver transaction data. However, you may be
BI can subsequently upload. The BW wondering about all the records existing
Adapter is called in most outbound flows in your R/3 system, which most likely
no matter how the record originated. This have been around for a few years. This
means orders or customers starting in any includes pricing condition records (dis-
system (in this example, R/3) are available counts, surcharges, and general price
for complex analysis in your SAP Net- information), and customizing settings
Weaver BI system. that SAP CRM needs (Figure 4), master

Figure 4 Customizing adapter objects settings (transaction R3AC3)


data, and transactions (e.g., orders). Initial Step 2. The plug-in determines that a to synchronization. In this process,
loads handle this data when you first generic extraction program for custom- the CDB, which is CRM’s main
implement SAP CRM. izing data is necessary. This program, database, and R/3 (ECC) must be in
combined with the parameters of the sync. Although in a perfect world, the
Initial load transactions are delivered as needed table, extracts the data and puts it initial loads and delta mechanisms
standard with SAP CRM. They use the into the BAPIMTCS structure. would keep everything in line, this is
settings in adapter objects to request or not the case. Therefore, SAP CRM
Step 3. The R/3 Adapter writes the data
send data to and from CRM as a group. allows you to request a refresh of the
into similar tables in SAP CRM. Note
These are the same adapter objects that data from one system (with the correct
that the initial flow of business data is
contain mapping functions for the delta data) to another system (the one with
more complicated and involves BDocs
downloads referenced above. This is true data problems).
and flows. It also goes in both directions.
with the exception of pricing and custom-
Use transaction R3AR2 to define which
izing loads, which are normally just from Synchronization sets of business data you want to refresh
R/3 to SAP CRM. R/3 is normally the Between Systems from one system to another (Figure 7).
baseline for these settings, so data almost
never flows from SAP CRM to R/3 for Let me mention two final important These requests flow in a similar way as
CRM Middleware features that are key initial loads but are designed to be
price conditions and customizing.

Figure 4 shows the customizing adapter


object that is responsible for mapping R/3
account groups to SAP CRM. Although
the initial load flow for business objects
(partners and transactions) is more
complex, the adapter objects look pretty
much the same.

The flow for initial downloads for business,


customizing, and condition objects all
use transaction R3AS to initiate the trans-
fer (Figure 5). However, the flow is less
complicated for customizing objects,
Figure 5 Start the initial transfer of business, customizing, and pricing data between
because they do not support delta process- SAP CRM and other systems
ing and it is mostly an R/3 to SAP CRM
transfer.
Notice that the data flow in Figure 6 (for
customizing objects) does not involve
BDocs, nor the inbound and outbound
flows. In this case, R/3 and SAP CRM
supply the function modules for extraction
and mapping. These functions facilitate
requesting, then the extraction and transfer,
and subsequently storage of the data in
SAP CRM.
Step 1. Start the initial download trans-
action R3AS for the desired customizing
table. In this example, the source system
is R/3 and the target system is SAP CRM.
SAP CRM sends a qRFC telling R/3 to
open up a table and see which function it
should execute when it requests this Figure 6 Data flow for customizing objects, such as moving account groups from R/3
object’s data. to SAP CRM
>> Before You Begin: CRM Middleware Terms
CRM BDoc: A data container for moving objects (orders/ about it almost instantaneously. Although this is the goal and
master) data within CRM. Messaging BDocs (mBDocs) are it normally happens, SAP CRM is loosely connected to its
special BDocs used to move data between R/3 and SAP CRM supporting systems via an SAP NetWeaver (not SAP CRM-
(as well as other systems). specific) technology called queued Remote Function Call
(qRFC). The data the system sends from SAP CRM goes to
R/3 (ECC) plug-in: A collection of software functions
an outbound queue. The system then passes the data to the
required to process requests for data from CRM or SAP
inbound queue on SAP ECC. Once there, SAP ECC picks it
NetWeaver BI systems. This collection of tables and func-
up and writes it to the database. The reverse happens when
tions resides on the R/3 system. Although it is called the
data passes to SAP CRM.
plug-in, as of SAP ECC 6.0, it comes as part of the normal
installation and does not need to be added later. Outbound CRM Middleware adapters: Collection of software
and inbound interfaces are the parts of the plug-in software designed to interface SAP CRM with specific applications,
geared to either extracting the records from R/3 or writing such as SAP ECC, SAP NetWeaver BI, or external systems.
them to R/3. They facilitate the exchange of both master data and transac-
tion data to these systems.
Structure: An ABAP term for a collection of fields that the
system processes and references together Consolidated Database (CDB): The mobile sales force
needs to get information about just its customers and their
Messaging flow: BDocs have associated messaging flows
orders. The sales reps, however, often move from one organi-
that can be inbound or outbound flows. The flow is made up
zation to another. When this happens, they need to discard
of one or more services (function modules) run in sequence,
their old customers and orders and load the new batch. To
such as calling the Billing Engine or the BW Adapter or
make this possible, the customers and orders are not directly
checking what sites are supposed to receive the data in the
passed to mobile sites; rather, they are written to this special
BDoc message.
database. When the mobile force logs in, it syncs up to this
Messaging queues (inbound and outbound): If you create a database.
new customer or sales order in SAP CRM, ECC should know
Adapter objects: Objects that contain the settings necessary
to exchange and map specific pieces of data between a source
and target system, such as business partners between R/3 and
SAP CRM. These objects are further grouped into:

• Business objects (e.g., orders or business partners)

• Customizing objects (e.g., item categories or calendars)

• Condition objects (e.g., pricing, rebates, or surcharges)

Administration console: Manages which sites get which


data from SAP CRM. One major site is your ECC system.
Other sites can be for linking to groupware (such as Micro-
soft Outlook). They can also be mobile sites linked to mobile
sale force personnel. Sites subscribe to selections of data
from publications, which link back to SAP CRM business
objects, such as orders or business partners (Figure 1).

Initial and delta loads: Both master data (e.g., customers)


and transaction data (e.g., orders) support delta processing,
Figure 1 SAP CRM uses data maintained by the Adminis- which means that they only send the new or changed records
tration Console to determine who needs what to and from SAP CRM. Customizing data and pricing infor-
CRM data mation, in most cases, flow only from R/3 to SAP CRM.
targeted refreshes of limited data while
delta processing continues uninterrupted.

The ability to first compare data sets


between systems is contained within the
refresh functionality. For example, does
SAP CRM have the same customer data
for Ned Falk as R/3? The Data Integrity
Manager (transaction SDIMA) contains
this ability. This functionality shows you
the differences among data sets across
systems. If one of the systems is out of
Figure 7 A data request to fix bad data in one system (customer number 301101) by whack, you can automatically execute a
refreshing it from the correct system
request to fix it, as discussed above. n

Ned Falk is a senior education consultant at SAP. In prior positions, he implemented many ERP solutions, most recently R/3. At
SAP, he initially focused on logistics, but now he focuses on SAP NetWeaver BI and SAP CRM. He specializes in BI and CRM
interfaces. He has been working with SAP products for more than 12 years. You may contact him via email at ned.falk@sap.com
or meet him in person when he teaches SAP NetWeaver BI from the Atlanta SAP office.

Você também pode gostar