Why SAPMSSY6 is scheduled to run in cycle?

Basis (Basis Technology Modules: Basis Component/System Administration, GUIs)

Moderators: Snowy, thx4allthefish

Post Reply
Posts: 274
Joined: Tue May 03, 2005 2:29 pm
Location: TX, USA

Why SAPMSSY6 is scheduled to run in cycle?

Post by sap-basis » Tue Sep 20, 2005 2:05 pm

Hi, All:

To my understanding, SAPMSSY6 is only useful when system starts, it will switch system into the right OP mode defined in timetable then the scheduling job is done by SAPMSSY2. But SAPMSSY6 is also scheduled to run in cycle each 300 seconds. Looks like it is used to deal with sth else not related with OP mode switching ?


Posts: 109
Joined: Fri Oct 15, 2004 1:44 am
Location: Bangkok, Thailand

Post by dr_k » Tue Sep 20, 2005 11:23 pm

SAP note 13691 may answer your question.


Invalid values occur in the control data of program SAPMSSY6. This
can be caused by a time problem or unexpectedly long execution
times ( > 9999 seconds) for individual background programs.
Program SAPMSSY6 controls a number of background programs.
For this, SAPMSSY6 is started cyclically in the background on all
application servers. The default cycle time is 5 minutes.
These background programs are subject to runtime supervision by
SAPMSSY6. This prevents a background program being called if it is
still running from the previous cycle.
Background programs are automatically excluded from execution, if
they once exceed a maximum allowed runtime T1 or repeatedly
exceed a maximum allowed runtime T2.
T1 and T2 are hard coded in SAPMSSY6 and are set approx. between
120sec..240sec for one-time execution and between 15sec..30sec
for repeated execution. Typical execution times lie somewhere in
the region of 1sec..2sec.
Pardon is the most glorious revenge.

Posts: 1760
Joined: Fri May 23, 2003 5:33 am

Post by SAP_Basis_Chap » Wed Sep 21, 2005 3:11 am

It is one of the most useful parts of the system. The program name gives you a clue.

When they developed SAP way back then the first thing they needed was an ABAP processing program so they called it SAPMSSY1.
They then decided they needed ABAP to run in background so created SAPMSSY2. And so it went, (I think SAPMSSY0 was not the first but came a little later)

So they had a SAP system running and if some work can into the dispatcher from a GUI or gateway it know what to do. Also the dispatcher (the true runner of the system) has a little timer in it and so knows when rdisp/btctime is up and so kicks off SAPMSSY2 (it has a few different screens for different functions). Also it has a little timer for rdisp/autoabaptime. This is set by default to 5 minutes and the more correct term for an autoabap is a cyclic system program or described more fully a program kicked off by SAPMSSY6. Have a look at the code in SAPMSSY6 and you will see what I mean. Also have a look in the menu in RZ03 and it will make more sense. You can even disable individual bits from there if confident you will not kill a system. If you think about it you can even add your own programs.

If you look through the programs in SAPMSSY6 you will suddenly realise that this is a very important part of the system. It does not just change op modes but also updates the message server with load balancing information. Remember in a course in your past where they said the message server gets updated every 5 minutes with balancing information, you know how now.
How about all of your monitoring, it either runs as a batch job once per hour as default (you must set up) or SAPMSSY6 kicks off SAPMSSY8 every 5 minutes to update monitoring in shared memory.

As for speeding up runtime as pasted from somewhere, do not be fooled. SAPMSSY6 may take 2 seconds to run but how about SAPMSSy8 running multiple times at once or the message server being thrashed with additional work. I have never had a reason to increase the time.

Now onto the userthat runs SAPMSSY6. In another post I discussed user SAPSYS. This is not a real user but the pseudo user the dispatcher uses supposedly in client 000 although it is all client ind. The dispatcher runs SAPMSSY2/6/8 (an otheres) and so you see user SAPSYS running these because it is the dispatcher.

If you up the trace level in a sandpit system with rdisp/TRACE=2 and restart the system and stop after 1 minute you will see in the dev_disp the dispatcher going in a loop checking for sapmssy6 and sapmssy2 and also other stuff like buffer synchronisation and restarting dead work processes.

The dispatcher is the control centre, kill and WP and it magically restarts but kill the dispatcher and all dies. (apart from that old rogue the message server)

When I discovered this part of the system everything made a sh*t load more sense. I hope it does for you all.

Posts: 274
Joined: Tue May 03, 2005 2:29 pm
Location: TX, USA

Post by sap-basis » Wed Sep 21, 2005 10:42 am

Hi, SAP_Basis_Chap:

This helps a lot, Thanks a lot!
I need to do some more reading to refresh my memory a little to better understand what you wrote, though :-)

Posts: 1760
Joined: Fri May 23, 2003 5:33 am

Post by SAP_Basis_Chap » Thu Sep 22, 2005 2:09 am

No problems,

if anything is unclear, let me know

Posts: 1
Joined: Thu Sep 07, 2017 10:04 am

Re: Why SAPMSSY6 is scheduled to run in cycle?

Post by hmishra » Thu Sep 07, 2017 12:34 pm

SAP_Basis_Chap wrote:No problems,

if anything is unclear, let me know
Hi Chap,

I am not sure if you are still active on this forum or not. But I hope you do. There are not so many people out there who could explain in such depth. I humbly appreciate you for the current post. I hope I could have read it much earlier.

Post Reply