SMAINTENANCE | Perform Administrative task in SAP ABAP Environment

SAP

As a SAP Administrator, you are often tasked with various maintenance activities that involve the application database or operating system. SAP has introduced a transaction code – SMAINTENANCE, designed to simplify the process of ramping down/up SAP applications.

smaintenance
The SMAINTENANCE transaction code is a powerful tool that allows you to monitor and control the system’s status in what is referred to as “Maintenance Mode”.

Prerequisites

Before you can use the SMAINTENANCE transaction code, you need to create a security policy using the SECPOL transaction code. The following two attributes are essential for using the SMAINTENANCE transaction code:

– TENANT_RUNLEVEL_LOGON_PRIVILEGE = 1
– SERVER_LOGON_PRIVILEGE = 1

This security policy must be assigned to all system Admin users in SU01 who need access when the system is in maintenance mode.

Understanding SMAINTENANCE

When you “Switch to Maintenance”, only Admin users who have the security policy assigned can log into the system and perform maintenance activities. All other users, including system users, are blocked from SAP logon.

Switch to Maintenance

The “Switch to Maintenance” action initiates a workflow that sets the system to “In Maintenance” mode. This workflow comprises the following modes: “Running -> Web dispatcher closed -> Cool down -> In Maintenance”. The entire workflow currently takes 10 minutes.

Click here to Read – Save Time and Money on automated SAP BASIS

Switch to Running

The “Switch to Running” action starts a workflow that sets the system back to “Running” mode. This workflow consists of the modes “In Maintenance -> Running”. The switch to “Running” is performed immediately.

System Modes

The system goes through different modes:

– Running (Runlevel – 0): The system is fully operational for both business end users and administrators. 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. This means 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 log out. 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 who have a special security policy assigned. There are no business end users logged onto the system.

Maintenance Periods and Logs

The so-called “Maintenance Periods” and a “Log” of the maintenance mode are displayed.

Maintenance Periods are time periods in which the system is set to Maintenance Mode or where the system is shut down. These 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.

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

Restrictions During Maintenance Mode

When the system is in maintenance mode, the following restrictions apply:

– Users without the assigned security policy are prevented from logging on.
– Background jobs are not allowed to run during maintenance mode.
– All sessions and users are logged off 10 minutes after activating maintenance mode.
– HTTP sessions (web services) are also closed, and users will receive a 503 error.
– External interfaces/RFC are restricted from connecting to the SAP system.

By using SMAINTENANCE, you can effectively manage ramp down activities such as user locking/unlocking, job suspension, system messages, etc., during any maintenance-related task. This makes it an invaluable tool for any SAP Administrator.

Remember, a well-maintained system is key to efficient business operations. Happy maintaining!

Click here to read more details on SAP.

Read SAP Note – 3211973 – “Maintenance Period” vs “Maintenance Mode” when using tcode SMAINTENANCE

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.