SAP Basis Basics Part 27
Maintenance Mode (for S/4HANA)
Maintenance mode is a system status in which selected users can perform administration tasks. The system is not available for end users during this time.
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
Call transaction SMAINTENANCE to set your SAP system to maintenance mode or to carry out administration tasks during this time.
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.
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.
When system is in maintenance mode below things are restricted:
- Users which are not having security policy assigned are prevented to logon
- Background jobs are not allowed to run during maintenance mode
- All sessions and users are logged off post 10 mins upon activating maintenance mode
- HTTP sessions(webservices) are also closed and users will get 503 error
External interfaces/RFC are restricted to connect SAP system