SAP System Setup Training Course
Reveals How To Setup A Free SAP Developer System.
Learn SAP & Practice For Certification. Developer Tips Included:

How To Monitor Your Background Jobs With CCMS In SAP Systems

As a Basis Consultant how many times have you been asked to monitor a job and warn somebody of its possible failure, or delays, and so on? Most probably, more than once! In my case, many times and on various occasions I have been asked to automate this very task. Some jobs can take a very long time and I do not enjoy watching the screen day and night time and time again. Well, at least not for job monitoring! So, what I have decided to write about today is the proposition of a quick and  simple solution for monitoring several jobs automatically.

The Limitations Of This CCMS Monitoring Solution

I mentioned monitoring several jobs, but there are limits to the solution I’m going to show you. My own experiments have showed that trying to monitor more than 100 jobs is not a good idea I will not work very well. You see, the major problem is that the Internal Dispatcher has to loop through many tasks including the job monitoring task within a 5 minute time period. So as long as your list of jobs is not too long and the loop can be achieved with the 5 minute time limit this solution should work just fine.

Initial Configuration

First of all, we need to select a job to be monitored and I’m not talking about a single report. Pick a real batch job; one that may contain several reports.

For this example I will first call the transaction SE16 (You may know this one, don’t you?), and in the table name field, just type ALBTCMON. See screen below:

SE16 Data Browser - Table ALBTCMON

Next, press the “F5” key, or click on the Create Entries button. The system will pop up a warning informing you the table you are trying to add entries to is a Cross Client table:

SAP Cross Client Warning

This is completely normal, nothing to be scared of. Press the green tick button to confirm and proceed. You will then be presented with the following screen (Or something similar as mine already has entries filled in).

SAP Table View For Batch Monitoring

Click the New Entries Button and the following screen will appear:

SAP New Entries Table View For Batch Monitoring

I won’t go through the whole list of possible parameters as a full list of possible entries would require a full article in itself. But I will mention the 3 main ones:

  • System Group: This option allows you to group your alerts by system name by adding a system group entry.
  • Job Name: Enter the name of the job that we want to monitor. Please take note that you can use a pattern here (Wild cards etc…) and if many jobs are to be monitored with similar names it’s much more efficient to use a pattern. It can also allow you to exceed the 100 jobs limit!
  • MTE class: This is the monitoring class which to be created and associated with your alerts. If you are to assign an auto reaction method to your alerts I would strongly recommend you to use this to group your jobs per functional areas.

Once you have entered you records, press the save button. You will be prompted for a transport number to enable you to transport you configuration into another system if required. However, from past experience I have noticed this type of activity is usually done directly in the desired system as many job names can change between development, quality assurance and production environments.

Anyway, now we are ready to go to the next step.

Job Monitoring Activation

Here I will activate what is called the data collection method associated to the job monitoring function. By default, it’s deactivated.

Go to the transaction RZ21, select Method Definitions and choose Display Overview. You will a screen like this:

Transaction RZ21 - Monitoring Properties and Methods

Select the method CCMS_BATCH_MONITORING and choose Edit Data.

As shown in the screen below, switch to the edit mode and then activate the function Execute method immediately after monitoring segment start.

CCMS Batch Job Monitoring Methods

Save your entry and you’re all done….well almost. Here, you have two options, to really activate it, either you restart your system, or you switch your monitoring system to the warm up mode…that’s up to you.

In order to check, that everything is ok, just go to the transaction RZ20 and everything will be visible in the All Monitoring Contexts monitor of the SAP CCMS Technical Expert Monitors monitor set, as displayed in the screenshot below:

RZ20_AllMonContext

By expanding the nodes, you will notice there different monitoring points available:

  • Status
  • Log of Current Job
  • Runtime
  • Delay
  • Delay + Runtime

Those are the possible alerts for your newly monitored jobs. They should cover most of your needs regarding the monitoring of your jobs.

Conclusion

As we saw, it’s quite simple to put in place a simple monitoring system for your jobs, failures won’t be left unnoticed. We didn’t cover the automatic delivery of an email in this article, but this is something which can be done quite easily for somebody who knows how to assign an auto reaction method to the MTE we just created.

...

Jérôme has been working in the SAP industry as a Technical Consultant for more than 14 years. He is NetWeaver certified and his main areas of expertise are Solution Manager, PI, SLD, NWDI and Portal. You can contact Jérôme at: jmorignot at Hotmail.com or leave a comment below this post.

About the Author:

Pete has been working with SAP technologies for over 10 years. He started out as an ABAP consultant and then moved on to BW where he has worked many different clients covering a wide variety of industries. "I love introducing SAP technology (especially BI) to new clients and showing them how they can go from zero to hero within their business in super fast time". Contact me on twitter @PeterMoxon

x

Free SAP Training Course

d
c