Memory is limited in SAP. Work processes consume memory, hence we cannot define very high number of work processes in SAP.
We know that dialog activity is usually more during day time and batch processes are executed more during night time. So, we should configure more dialog work processes and less background work processes during day time and more background work processes and less dialog work processes during night time.
So it would make sense to have more dialog work process during day time and to convert some of those dialog work processes to background work process at night so that work processes can be utilized in a more efficient way.
This concept of work process switching where dialog work processes get converted to background work processes and vice versa during specific duration is called Operation Mode.
Procedure to setup Operation mode:
Execute transaction code RZ04 as shown below:
Click on create button to create an operation mode. It prompts to enter the operation mode name and short description as shown below. Please provide the same and click on save:
We have created an Operation mode called “day”. Similarly create a mode for “night”:
The two modes which have been created are as follows:
Now, Click Instances/Operation Modes and navigate to Settings ->Based on Current status -> New Instances -> Generate.
In the above screen we see that there are 10 dialog work processes and 3 background work processes for both day as well as night mode.
10 dialog and 3 background work processes for day mode seems fine, but having 10 dialog and only 3 background work processes for the night mode doesn’t look like an efficient combination since long running batch jobs are generally scheduled to run during the night time. As already discussed, we should have more background work processes at night as compared to day time. Also since not much of interactive (foreground) activities are performed at night, it’s better to have fewer dialog work processes during night as compared to day.
Place the cursor on the “night” operation mode and double click on it to get the Work Process Distribution screen as shown below:
We can see that the number of dialog and background work processes is 10 and 3 respectively. As already discussed, number of background work processes should be more at night as compared to day. To increase the number of background work processes (and to subsequently reduce the number of dialog work processes) for night mode, place the cursor on the text box next to Dialog or Background (shown in the above figure) and click on minus or plus button shown in the bottom. This will reduce or increase the Dialog and Background work processes for the respective mode.
Let’s increase the background work processes from 3 to 6 (and subsequently decrease the number of Dialog work processes from 10 to 7):
We get the following Work process distribution after making the changes:
By now we have defined the names of operation modes (day mode and night mode) and the number of work processes in each mode. Now we need to define the time duration for each mode, e.g. day mode can be defined from 8 AM to 8 PM and night mode can be defined from 8 PM till 8 AM. This configuration can be done via tcode SM63 (Display/Maintain Operating Mode Set).