Date post: | 27-Oct-2014 |
Category: |
Documents |
Upload: | srinivasa-rao |
View: | 276 times |
Download: | 1 times |
India SAP CoE, Slide 1
CR1050 – SAP CRM Middleware v1.0
India SAP CoE, Slide 2
CRM Middleware
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
India SAP CoE, Slide 3
CRM Middleware
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
India SAP CoE, Slide 4
PrepareMe
• Purpose • Use • Challenges
India SAP CoE, Slide 5
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 company’s 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 6
Use
• SAP- CRM Middleware is used exchange data between the CRM system, mobile clients, connected R/3 System or any third party system
• It’s main functionalities are:– Data Queuing and Transport– Replication and re-alignment– Data Exchange and Mapping
India SAP CoE, Slide 7
Challenges
• Troubleshooting Errors• Any enhancement to the standard SAP objects
India SAP CoE, Slide 8
CRM Middleware
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
India SAP CoE, Slide 9
TellMe
• Overview• Concepts• Tools• Others
India SAP CoE, Slide 10
Overview
• CRM-Middleware• Landscape• CRM Middleware Architecture
India SAP CoE, Slide 11
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.
CRM-Middleware
India SAP CoE, Slide 12
Landscape
000
India SAP CoE, Slide 13
CRM Middleware Architecture
• The CRM Middleware– Is integral part of
CRM server– Is the message hub
• Requires– No additional software– No extra installation– No extra server
• Benefits– Significantly reduces
integration costs
CRM Server
CRM Middleware CRM ServerApplications
SAP Web Application Server
Groupware Adapter
External Interface Adapter
R/3 Adapter
BW Adapter
Mobile Client Adapter
CRM Database
CRM Adapter
(Validation service)
CDB
India SAP CoE, Slide 14
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 15
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 16
Site Type ConceptEvery 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
Mobile Clients
Site A
Same Site Type
Non R/3 Back-ends via XMLR/3 Backend
Same Site Type
Site B Site C Site D Site E
India SAP CoE, Slide 17
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 18
Initial Download of Customizing data (from R/3)
R3AS : Start Initial Load
For CustomizingAdapter Object
R/3 Adapter
Mapping FM
CRM Table
CRM R/3CRS_FIRST_DOWNLOAD_TRIGGER
Generic Extractor
R/3 Table
BAPIMTCS
qRFC
qRFC
India SAP CoE, Slide 19
Initial Download for Business Data
R3AS : Start Initial Load
For Business Adapter Object
R/3 Inbound Adapter
Validation Service
Outbound Message Flow
Inbound Message Flow
CRM Application
CRM Database
CRM R/3CRS_FIRST_DOWNLOAD_TRIGGER
Specific Extractor
R/3 Tables
BAPIMTCS
qRFC
qRFC
India SAP CoE, Slide 20
Business Adapter Objects
R3AC1
Source Site
R/3 tables used by the extractor
Filter Option
Filter Criteria
India SAP CoE, Slide 21
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 22
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 23
Request DownloadData request can be done in 3 steps
1. Defining requesta. 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 requesta. This function allows you to request defined data from a source site
and transfer it to a target site. b. Transaction: R3AR4
3. Monitor requesta. Here we can analyze or stop data requests to the R/3 back-end. b. Transaction: R3AR3
India SAP CoE, Slide 24
BDocs
• BDoc Introduction• BDoc Classes- Overview• sBDoc (Synchronization BDoc)• mBDoc (Messaging BDoc)
India SAP CoE, Slide 25
Business Documents (BDocs)
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.
Mobile Clients CRM Server
KNA1 ADRC KNVV
BDoc “David”
CRM Server
India SAP CoE, Slide 26
Business Documents (BDocs)Distinction
• 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 Id’s) for one BDoc instance.
( All fields )
BDoc type (structure)KNA1
KNA1
KNVV
BDoc instance Customer BDoc “David”
NAME1 = “David”
NAME2 = “Boon”
KUNNR = “60078”
BDoc message Customer BDoc “David” . Task = “update”
Fields CITY1 = “New York” , Street = “1 Broadway”
(Contains only modified fields)
Also: “insert” or “delete
India SAP CoE, Slide 27
Decoupling of Messaging and SynchronizationTwo Integration Layers
• 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.
R/3 Backend
• Messaging
• Synchronization
CRM Server
The synchronization layer provides more sophisticated replication services
Synchronization Layer
Messaging Layer
SAP Web Application Server
SAP BW
Non R/3 Backend
India SAP CoE, Slide 28
BDoc Classes- Overview
Synchronization BDocs (sBDoc)
sBDoc
Messaging BDocs (mBDoc)
mBDoc
Mobile Application BDocs
BDoc
• Data synchronization with Mobile Clients.• Mapping between of BDoc segments and CDB
tables.• Transport changed fields (delta info., net data)
• 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
• Used by the mobile sales/service application on the mobile client to query data from database.
India SAP CoE, Slide 29
mBDoc (Messaging BDoc)mBDoc type consists of two parts:
/1CRMG0/CRMW_BUPA_HEAD002
BUS_E1_MAIN
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
Extension
• This is optional structure.
• To be modeled with DDIC
• Contains the transaction data.
India SAP CoE, Slide 30
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.
sBDoc structure
Control segment
Header
Body
…
Error segment
Data segment
Data segment
Type, sender, timestamp, …Type, sender, timestamp, …
Business Partner Master
Business Partner Address
Eg. OrderEg. Order
India SAP CoE, Slide 31
Synchronization BDoc Type Synchronization BDoc Name
Name of the DDIC message
structure
mBDoc mapped to sBDoc
Function Module generated on activating the
BDoc
India SAP CoE, Slide 32
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 33
Publication-Replication Concept
• Publication• Subscription
India SAP CoE, Slide 34
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 35
PublicationPublication
Type
List of Replication object included in
the publication
Publication is assigned to this subscription.
Criteria value assignment for the
publication
India SAP CoE, Slide 36
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 37
SubscriptionCreating 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 38
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.
CDB
A B C
Table SMOxyz
A B C
Table xyz
India SAP CoE, Slide 39
Tools
• Administration Console• DIMA• BDoc Modeler• MW Cockpit• Queue monitor• Middleware Trace
India SAP CoE, Slide 40
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 41
Create R/3 site in Admin Console
• After Creation of the Site, Subscriptions are assigned to it
Get Site Attributes
Get Site Attributes
India SAP CoE, Slide 42
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 43
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 44
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 45
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 46
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 47
Queue monitor• Outbound queues: Transaction-SMQ1
CRM queue groups Description
Outbound queues
CDB* Start queues for loads CRM -> CDB
CRM_SITE* Load queues for Mobile Clients
CSA* Send queues of CRM Server Applications
EXT* Start queues for loads CRM -> Ext.
R3AI/R* Start queues for loads from ERP Backend system
R3AU* Load queues CRM -> ERP Backend system
India SAP CoE, Slide 48
Queue monitor• Inbound queues: Transaction-SMQ2
CRM queue groups Description
Inbound queues
CRI* Initial load queues CRM -> CDB
CRM_SITE* Load queues from Mobile Clients
R3A* Load queues ERP Backend -> CRM
CSA* Send inbound queues of CRM Server Applications
India SAP CoE, Slide 49
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 50
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 51
Others
• XIF Adapter• Groupware Adapter
India SAP CoE, Slide 52
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.
XIF AdaptermBdoc
XML file
XML file
External Systems
CRM
India SAP CoE, Slide 53
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 54
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
dSAP Groupware Connector
Groupware
Server CRM Server
CRM Server
CRM Middleware
Groupware Adapter
MapBox
Message Transformation
Business Partners
ActivitiesXML
Vcard/ICalendar XML BDoc Message
BDOC Message
--------------------
_____________
India SAP CoE, Slide 55
CRM Middleware
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
India SAP CoE, Slide 56
ShowMe
• Initial download - Monitor • BDoc monitor• Analyzing Problem• Debugging from CRM to R/3
India SAP CoE, Slide 57
Initial download - MonitorTransaction: R3AM1
This transaction is used to monitor the progress of the Initial download
India SAP CoE, Slide 58
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
Re-process
Delete
Show error
India SAP CoE, Slide 59
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 60
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 61
CRM Middleware
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
India SAP CoE, Slide 62
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.
4. Download a single Material from R/3 to CRM through Request download.
5. Go to Admin Console and identify the connected R/3 site.
India SAP CoE, Slide 63
CRM Middleware
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
India SAP CoE, Slide 64
HelpMe
• Flow Context• Tools available for analyzing the problem• Middleware Monitoring Transactions• Appendix: Classification of BDoc States
India SAP CoE, Slide 65
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 66
Analyzing Problem
Tools available for analyzing the problem:
Receivers SMW01: Displays a list of the receivers of a message
Errors SMW01: Displays error segments
Middleware Trace SMW01: Displays records for individual steps
Classic Data SMW01: Data segments of a message
Extension Data SMW01: Extension of a message (only for m-BDoc messages)
Outbound queues SMQ1 (see also outbound queue scheduler SMQS)
Inbound Queues SMQ2 (see also inbound queue scheduler SMQR)
Short Dumps ST22
DIMA SDIMA: Compare and adjust data between two data sources
System log SM21: Check for “User xxx is deleting inbound/outbound queue xxx” to see if queues were manually deleted.
India SAP CoE, Slide 67
Middleware Monitoring Transactions
Some of the main monitoring transactions:
Tool Description
SMWP Monitoring Cockpit
SMW01 Monitoring BDoc Messages
SMW02 BDoc Message Summary
SMW02A BDoc Message Error Analysis
SMW03 Unprocessed BDoc Messages
SMWT Monitoring Middleware Trace
SMW00 Error Handling Customizing
SMOHQUEUE Replication/ Realignment
R3AM1 Monitoring Initial Load
SMQ1 qRFC Outbound Queue Monitor
SMQ2 qRFC Inbound Queue Monitor
SMQR Inbound Queue Scheduler
SMQS Outbound Queue Scheduler
India SAP CoE, Slide 68
Classification of BDoc States
Bdoc State BDoc State Description
D01 To be processed (Debug)
E01 Technical error (incomplete)
E02 Partially send, receivers have errors
E03 BDoc cannot be read from DB
E04 BDoc validation error
E05 Inbound processing failed
E06 Outbound processing failed
E07 Conversion error
E08 Mapping error
E09 Update failure
F01 Rejected (fully processed)
F02 Confirmed (fully processed)
F03 Set to processed (fully processed)
F04 Confirmed (fully processed by all receivers)
F05 Information (no processing)
I01 Received (intermediate state)
I02 Written to qRFC Queue (intermediate state)
I03 After qRFC step (intermediate state)
I04 BDoc stored before update task (intermediate state)
O01 Sent to receivers (not all have confirmed)
R01 Retry after temporary error
T01 Temporary lack of ressources in application layer