Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
bhargav_bhatt
Active Participant
Hi All,

Being a SAP Admin you need to frequently deal with various maintenance activities involving application database or operating system. SAP has come up with tcode - SMAINTENANCE to make SAP application ramp down/up activity easy for us.

SMAINTENANCE tcode can be used to monitor and control the status of the system in terms of the so called "Maintenance Mode".

 

Prerequisite

For using smaintenance t-code we need to create security policy from t-code SECPOL.  Below two attributes are mandatory to use smaintenance t-code

TENANT_RUNLEVEL_LOGON_PRIVILEGE = 1

SERVER_LOGON_PRIVILEGE = 1

 


 

This security policy needs to be assigned to all system Admin users in SU01 which needs to be allowed when system is in maintenance mode

 


 

Below is the screen of t-code smaintenance


 

When we "Switch to Maintenance" only Admin users who are having security policy assigned are allowed to login to system and perform maintenance activity.

Remaining all users including system users are blocked against SAP logon.

Switch to Maintenance

The action "Switch to Maintenance" starts a workflow which sets the system to mode "In Maintenance". The workflow consists of the modes as described above: "Running -> Web dispatcher closed -> Cool down -> In Maintenance". The current duration of the whole workflow is 10 minutes.

Switch to Running

The action "Switch to Running" starts a workflow which sets the system to mode "Running". The workflow consists of the modes "In Maintenance -> Running". The switch to "Running" is performed immediately.

 

On the top current system status is displayed as show in below


 

There are different modes system goes through:

Running (Runlevel - 0)
The system is fully operational for business end users and administrator. There are no restrictions for services (e.g. batch, rfc, ...) or for inbound and outbound connections.

Web dispatcher Closed (Runlevel - 4)
The system is fully operational for business end users and administrators but connections to the Web dispatcher from outside are blocked. That is users connected via the web dispatcher cannot work any longer.

Cool down (Runlevel - 9)
The system is fully operational for administrators only. Business users are expected to finish their work and logout. At the end of the cool down phase business end users' sessions are terminated.

In Maintenance (Runlevel - 100)
The system is fully operational for administrators only. Administrators are users which have a special security policy assigned. There are no business end users logged onto the system.

Error during mode switch
An error occurred during a system mode switch.

 

 

Below you see the so called "Maintenance Periods" and a "Log" of the maintenance mode.


 


 

Maintenance Periods
The maintenance periods are time periods in which the system is set to Maintenance Mode or where the system is shut down. Maintenance Periods may be defined by external monitoring tools or from within the system by creating a new entry in this view. Only entries created from within the system may be deleted here.

There is no automatic mode switch implemented according to this schedule. By default the schedule of the current year is displayed. Use the selection button to modify this default selection.

 

Log
The log shows messages created by the framework which performs system mode switches. By default the log of the current month is displayed. Use the selection button to modify this default selection.

 

When system is in maintenance mode below things are restricted

  1. Users which are not having security policy assigned are prevented to logon

  2. Background jobs are not allowed to run during maintenance mode

  3. All sessions and users are logged off post 10 mins upon activating maintenance mode

  4. HTTP sessions(webservices) are also closed and users will get 503 error

  5. External interfaces/RFC are restricted to connect SAP system


 

Message end users will see when system in maintenance mode


 

By using this we need not worry about ramp down activities such as users locking/unlocking, Job suspend, system messages, etc during any maintenance related task

 

References link : https://blogs.sap.com/2020/06/18/abap-platform-part-3-whats-new-for-the-basis-administrators/

https://help.sap.com/viewer/e067931e0b0a4b2089f4db327879cd55/202110.000/en-US/79b58c0b017f437aad8f41...

 
12 Comments
former_member784475
Discoverer
Very Useful and informative Block. Nice one !.
NK4
Discoverer
Superb! Thanks for sharing Bhargav
parth_raval
Participant
Very informative and useful. Thanks for sharing in detail!
RobA
Participant
Really helpful, thank you
former_member227281
Active Participant
0 Kudos

Very nice and useful .

ChetanSharma
Explorer
0 Kudos
Nice Blog!!

  1. Could you please let me know the SAP System Release and Support package Level  Prerequisites for the SMAINTENANCE ?

  2.  Could you please do let me know if the Maintenance Mode on, what will happen for the existing logged on users and running Background Jobs?


Thanks,

Chetan Sharna

 
bhargav_bhatt
Active Participant
0 Kudos
Hi Chetan,

 

  1. There is no official statement from which version this was released but Its available with all S4 release also in NW system having release 750 and above

  2. As mentioned in blog users will be given system message as soon as you switch to maintenance mode and post 10 mins they will be logged off, Also as you switch to maintenance mode no new jobs will be allowed to start and running jobs will be allowed to run for 10 mins post which is it terminated.


 

Regards

Bhargav Bhatt
ChetanSharma
Explorer
0 Kudos
Thanks Bhargava!

It seems Tcode SMAINTENANCE is not existing in NW7.50 . We have NW 7.50 SP11 System and it is not existing. do we need to implement any Corrction NOtes for getting this done in NW7.50 or below?

It is available  NW 7.52 and above system.

 

Thanks Again!
Matt_Fraser
Active Contributor
0 Kudos
Confirmed, in our NW 7.50 sps20 system it does not exist.
bhargav_bhatt
Active Participant
0 Kudos

Hi Chetan,

This is available since SAP_BASIS 752

kalyan
Participant
0 Kudos
bhargav.bhatt - Quick question. The help link you referenced doesn't mention this attribute - SERVER_LOGON_PRIVILEGE.  It only mentions the other one in your blog. Is this attribute mandatory - SERVER_LOGON_PRIVILEGE. Do you have any reference KBA for this ?
0 Kudos
Nice Blog!!
Labels in this area