sap crm middleware monitoring and error analysis for replication

Upload: aniruddha-chakraborty

Post on 04-Jun-2018

244 views

Category:

Documents


4 download

TRANSCRIPT

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    1/17

    SAP CRM Middleware Monitoring and Error

    Analysis for Replication

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    2/17

    About SAP CRM Middleware

    All current day Software applications use messaging architecture instead of a point to pointcommunication between its various logical & physical components. SAP CRM is no different. Oneof the so called new dimension technologies from SAP CRM version 7also uses a structurecomponent nown as SAP CRM Middleware to communicate internally between its various logicaland physical components.

    !hese mode of communication happens through business document typenow as Bdoc. Abusiness document type "#$oc type% is a set of transaction statements that represent a logicalobect. 't is a container of the business data that is necessary to run a business process " Forexample:for a Business Partner the bdoc is BUPA_MAIN%.

    n!ormation "n Bdocs

    Classes o! B#oc $%pes

    #$oc types used in a mySAP CRM scenario can be classified as follows(

    S%nc&roni'ation B#oc t%pes (sB#oc t%pes)

    !hese #$oc types are processed in the CRM Server as well as in the mobile client and containmappings to tables. !hey were previously called write #$ocs in the client)based #$oc Modeler.Synchroni*ation #$oc types are used to e+change data between the CRM Server and mobileclients.

    Segments are mapped to table"s% where the mapping defines the relation between abstractionand physical database.

    Mobile Application B#oc t%pes!hese #$oc types are used by CRM Mobile Applications and are processed outside the CRMServer. !hey contain mappings to tables. !here are two classes of mobile application #$octypes, Read Only and Modifiable Read.

    Messa*in* B#oc t%pes (mB#oc t%pes)

    Messaging #$oc types are used by CRM Server applications. !hese #$oc types are mapped tosynchroni*ation #$oc types through adapters that are processed in the CRM Server. !heirsegment structure is not mapped to database tables. !hese #$oc types do not have anyparameters, oins, and where clauses.

    Contents o! B#oc Messa*es

    #$oc messages are based on #$oc types. A #$oc message contains header, body, receiver

    and error information as e+plained below(

    !he header contains data such as the globally uni-ue #$oc message '$, #$oc sender,

    send time, and #$oc type, which identifies the data segment structure.

    !he body contains a hierarchical data structure holding business information.

    #$oc messages e+changed between the CRM Server and mobile clients are based on

    synchroni*ation #$oc types. Synchroni*ation #$oc types contain data segments mappedto table fields that mae up the corresponding business obect type.

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    3/17

    #$oc messages e+changed between the CRM Server and SAP and non)SAP

    applications are based on messaging #$oc types. !hese #$oc types contain ahierarchical segment structure "the classical part% and an e+tension created in the $ata$ictionary that holds business data. !he hierarchical segment structure may contain aselection of the fields of the e+tension for receiver determination, which allows the filtercriteria to be specified for these fields in replication modeling.

    Provides the details of the receivers of a message, such as receiver site name, site '$,

    and site type.

    Provides the details of errors, such as date, time, and type of error, message te+t,

    message class, and message number.

    !he following figures outline the structure of the two inds of messages mentioned.Messa*e +xc&an*ed Between t&e CRM Server and Mobile Clients

    Messa*e +xc&an*ed Between t&e CRM Server and SAP and non,SAP applications

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    4/17

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    5/17

    -eneral problems !aced wit& B#ocs

    $ue to the nature of the messaging architecture #$ocs which are none other than structured

    messages -uite often get stuc in the message flow. !here are certain checpoints in the CRMsystem where the messages which fail to attain their normal flow gets accumulated.

    !he -RC architecture of CRM has the advantage of storing messages in different places withinthe system rather than loosing them in transit. !he inbound & outbound -ueues of the CRMsystem are often fait for lot of incoming & outgoing messages. !his is one problem theMiddleware person often faces. /ormally if the messages end up in the inbound -ueue of CRMthere are general problems with the 0M1 pacet i.e. the data inside the pacet is often corrupted.Otherwise they can fail because of the module responsible for picing up the data from theinbound -ueue failed at a very early stage because of some maor Master data validation issue.

    Messages stuc in the outbound -ueue often signify a failure in the receiving system2s receivermodule which is supposed to e+tract the messages. 3+ample of such module will be 4Contrans5used by mobile systems to synchroni*e data between the two systems. $ata while going tosystems lie R67, #8 and APO can also get stuc in the outbound -ueue because of the non)availability of those systems. #ut these problems happen not so often & generally looed after bythe basis team of the proect.

    Once progressed further #$ocs "S#$OC6M#$OC% fail further, generally because of datainconsistency between various systems. 9ere CRM2s uni-ue architecture plays important role.:nlie R67 CRM has two databases. CRM online database & consolidated database.

    #$ocs often fail at a later stage because of inconsistencies between these two databases. 3.g.8hen a #$oc is trying to update a record in any of these databases and the record e+ists in onebut not the other cases the #$OC to fail. #$ocs failing at a later stage can be found in the system

    by going to Middleware,Monitorin*,Messa*e Flow,#ispla% B#"C Messa*es from theSAP standard SAP Menu "$ransaction , SM/01%.

    Another reason for failure can be because of Master data inconsistency between CRM & R67system. !here can be various other reasons maing the analysis of the failure tougher & tougher.

    !he obective of this document will be to establish a general procedure for analy*ing #$OCrelated issues in CRM Middleware. 8e will try to focus on a generali*ed approach for solving any#$oc related issues rather than targeting individual #$ocs flowing across the system. rom paste+perience it has been found that #$ocs meant for a particular purpose "e.g. Sales order relatedS#$ocs% often results in a failure because of various reasons. And the resolution also variesdepending upon situation. 9ence the analysis becomes much crucial & concluding issues cannotbe generali*ed for a particular #$OC.

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    6/17

    +stablis&in* an approac& to solve B#"C issues

    As discussed earlier we can further discuss the resolution process in two categories.

    #$ocs failing at the ;ueue level "'nbound6Outbound% &

    #$ocs failing at a 1ater stage "!ransaction )SM8

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    7/17

    Please refer to the following screen shot(

    't has been seen that sometimes once we resolve the problematic message all the othermessages gets processed automatically, that is lot of genuine messages can get stuc becauseof a problematic message.

    "utbound $ransaction SM21

    #$oc messages stuc in outbound -ueues are often because of the failure or non availability ofthe receiving system. !here is hardly somebody can act on this case. Rather that is thearchitecture of -RC or asynchronous communication between two systems.

    >enerally no action is e+pected from a normal CRM consultant for messages stuc in theoutbound -ueue & rather to be referred to #asis team of the organi*ation.

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    8/17

    B#ocs !ailin* at a 5ater sta*e ($ransaction ,SM/01) ,

    !he maority of the problems are faced in this stage. 'f you have followed carefully the s#$oc &the m#$oc flow specified earlier you may have seen, once the component of the CRM systemresponsible of picing up messages from the inbound -ueue pics up a #$oc message &passes through various steps before reaching its final target destination. And in between these

    steps a #$oc can fail because of various reasons including master & transaction data. !he lastbut no least concern will be CRM system having more than one database to be updated by anymessaging structure lie a #$oc.

    1et2s try to establish a common process to solve these issues. ' am sure once some body gathersmore & more e+perience solving this ind of issues we can try to start randomly at any of thesestages. !ill then we will try to follow a common protocol for the problem.

    8e will start with Middleware , Monitorin* , Messa*e !low ,#ispla% B#oc

    messa*es

    8e can find in many ways the erroneous #$OC, i.e. can use the short name of the

    #$oc, search with message id or use the #$oc state and low conte+t to search for the

    erroneous #$oc.

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    9/17

    After setting the desired filter criteria pressing the ? button will get u the list of erroneous

    #$ocs.

    irst the errors button should return you the e+act error message. Most of the times this

    is descriptive enough giving you the reason of the problem. Please try to analy*e itcarefully. Most of the master & transactional data inconsistencies are clearly displayed inthe error message. 9ere you may want to compare the data of the #$oc with the relevantR67 system or CRM system. Also refer to the long te+t button at the right most side of thescreen shown below.

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    10/17

    @ou may find some custom error message out here which ' thin maes your life

    simpler. #ecause you may soon find the particular message no in the message editorand by using the 1ongte+t you can find in which program, user e+it or function moduleyou have implemented in the error message. And then you now very well why the #$ochave failed. 'n case it is not a custom error message you can still try to simulate the errorby trying to reprocess the #$oc & debug till you get the error message. Also in the 3rrorswindow as displayed below it gives you in which standard class or implementation the#$oc has failed. #ut ' will only suggest as the last & very last option. !he errordescription is most of the times more than sufficient.

    @ou can loo at the #$OC body at this stage by using the Classic $ata functionality.

    !his really displays the complete #$oc with its segments. After clicing on Classicdata further clic on the Single 3ntry button to have a better loo of the complete#$oc. rom there you have to figure out the root & the child segments which arecarrying data. !he root segment will always carry = record & the child segments willcarry = or more than one record.

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    11/17

    Clic on the grid icon after the number of entries, & it will show you the e+act data.

    Out of the first few fields the tas field is very important. !he possible values are=) :pdateB) 'nsert7) $elete

    'n case of m#$oc s this value sometimes vary between =,B & 7 and the firstcharacter of 'nsert, :pdate or $elete. i.e. ' : $.

    Scroll right to the same screen. !here you may find the field "b6ect# for sB#ocs

    which are often the SA ey "7B characters% for the corresponding table. "you can try

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    12/17

    to analy*e the #$oc table relationship from the transaction SB#M%. 'n case ofm#$ocs you should possibly find a logical name for the guid field. 3.g.#PAR!/3R>:'$ for #:PAMA'/.

    !his will allow you to chec the relevant data in C$#, Online and also in R67 & MSA if

    re-uired. 'f there are transactional data inconsistencies this often helps in focusingupon the error.

    'f the 3rror Messages does not help the ne+t step will be to try to analy*e the

    Middleware !race"!ransaction Middleware !race%. Clic the button Middleware!race & CRM the system will tell you that which steps of the flow conte+t wassuccessful & which steps were not. !ae time to analy*e the same.

    low conte+t of any #$oc refers to the flow pattern of a #$oc inside the CRM system

    & at various levels what the #$oc is supposed to do to the CRM system. ' will e+plainthat in the ne+t steps first let2s have a loo into the Middleware trace.

    'f u really want to understand the flow conte+t of the erroneous #$oc we will go

    to Middleware )DMessage low)D$isplay and Chec low $ef.

    Provide the #$oc name to be analy*ed & press ?. !he resulting list calls for

    special understanding where u will find the steps this particular #$oc is

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    13/17

    supposed to perform. At each step the activity of the #$oc is captured in the formof a function module.

    !he relevance of this understanding will be in the Middleware trace you see at

    a particular step the system is bacing up because of some errors. rom theabove mentioned step you now the function module name which has to bedebugged if absolutely necessary & there are no other options.

    'n E

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    14/17

    !his will copy the erroneous s#$oc into a s#$oc with the status as 4Received5 "/ote the

    traffic light & and the #$oc '$ of the copied #$oc.

    /ow if you try to reprocess & then debug you

    can very well find the root cause of the error.

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    15/17

    Middleware Monitorin* $able wit& S%mptoms and #ia*nosis $able

    Below Activit% need to be done b% FAM CRM $eam

    +!!ort: to 8 9ours Approximatel% in a #a%

    Freuenc% #ail%

    $code SM/P Monitorin* Coc;pit

    Monitorin* < Anal%sis and trouble s&ootin* o! all t&e middle ware ob6ect !or entire s%stemis done &er .

    $code SM/01 #ispla% Bdoc

    Monitorin* < anal%sis and trouble s&ootin* o! all t&e business document is done &ere !or.

    $code SM/04A +rror Anal%sis

    Monitorin* < anal%sis and trouble s&ootin* o! all t&e error business document is done &ere

    $code SM2R 2RFC Monitor

    Re*istraion and de,re*istration o! t&e ue and monitorin* o! nbound RFC ue is done&ere.

    $code SM2S 2,"ut Sc&eduler

    Re*istraion and de,re*istration o! t&e ue and monitorin* o! t&e "utboud RFC ue is done&ere.

    $code RAS, nitial download

    nitial laod o! all customi'in* < condition and business adaptor ob6ect between SAPBac;end and CRM sever is done &ere.

    $code RAM1 Monitor "b6ect

    Monitorin* all t&e load !or customi'in* < condition and business adaptor ob6ects based ont&e status e* /aitin* < Runnin* < Abort and done between SAP Bac;end and CRM server.

    $code RAC1, Business "b6ect

    S%mptom Source3#estinations%stems

    SAP$ransactions #ia*nosis Remar;s3Comments

    ;ueue errors/OS3/$-ueues

    PRG6RC SM;= Activate the-ueues or delete= entry in the-ueue andactivate theothers

    8e need toactivate the-ueues with thehelp of !AMteam

  • 8/13/2019 SAP CRM Middleware Monitoring and Error Analysis for Replication

    16/17

    Monitor and c&ec; all available Business adaptor "b6ect

    $code RAC=, Condition "b6ect

    Monitor and c&ec; all available Condition adaptor "b6ect.

    $code RAC , Customi'in* "b6ect.Monitor and c&ec; all available customi'in* adaptor "b6ect.

    $Code RAR4, Reuest 9eader

    Create t&e Reuest !or activatin* or deactivatin* t&e "b6ect.

    $Code RAR, Monitor Reuest

    Monitorin* t&e reuest ob6ect based on t&e status e* /aitin* < Runnin* < Abort and done$Code SM"+AC Admin Consol

    $&is is administration consol !or Monitorin* and Mana*in* "b6ect t%pe li;e site