Standard Jobs That Should Run In Sap System

  • SAP_CCMS_MONI_BATCH_DP : Internally this job runs
  • RSAL_BATCH_TOOL_DISPATCHING report. This job dispatches monitoring architecture methods
  • SAP_COLLECTOR_FOR_JOBSTATISTIC : Internally this job runs RSBPCOLL report. This job generates run time statistics for background jobs
  • SAP_COLLECTOR_FOR_PERFMONITOR : Internally this job runs RSCOLL00 report. This job collects data for the performance monitor
  • SAP_COLLECTOR_FOR_NONE_R3_STAT : Internally this job runs RSN3_STAT_COLLECTOR report. This job will collect non-abap statistic data (Distributed Statistic Records – DSR)
  • SAP_REORG_ABAP_DUMPS : Internally this job runs RSSNAPDL report. This job cleans up old abap short dumps
  • SAP_REORG_BATCH_INPUT : Internally this job runs RSBDCREO report. This job cleans up old batch input sessions
  • SAP_REORG_JOBS : Internally this job runs RSBTCDEL report. This job cleans up old background jobs
  • SAP_REORG_JOBSTATIC :  Internally this job runs RSBPSTDE report. This job cleans up old data from the run time statistics of the jobs
  • SAP_REORG_ORPHANED_JOBLOGS : Internally this job runs RSTS0024 report. This job cleans up orphaned job logs. The logs that cannot be deleted by RSBTCDEL report (i.e SAP_REORG_JOBS), remains as orphans which will be deleted by this job.
  • SAP_REORG_SPOOL : This job internally runs RSPO0041 report. This job deletes old spool data
  • SAP_REORG_XMILOG : This job internally runs RSXMILOGREORG. This job deletes XMI logs
  • SAP_SOAP_RUNTIME_MANAGEMENT : This job internally runs RSWSMANAGEMENT report. This job does the SOAP runtime monitoring
  • SAP_REORG_UPDATERECORDS : This job internally runs RSM13002 report and this deletes old update records

System logs

In an SAP system, for every important action system log will get updated. So, in case of any issues with the system, basis administrators need to check the system log first to identify any errors or warnings.

Many times, we can resolve system issues by checking the system log and searching for relevant notes in the market place using keywords found in the system & applying them.

In case of issues like update failure, lock table overflow, spool overflow, operating system issues, network issues, table space full issues and other database issues system log will get updated with the error message and the relevant time stamp. By using this timestamp and error message, basis administrator can identify the cause for the issue and can fix the issue.

Based on the issue and the time stamp in system log, in many cases, you can find out relevant ABAP runtime dumps in ST22 (which provides much more detail about the issue) and the issue can be tackled accordingly.

System log can be checked using SM21 transaction code. Login to SAP system and goto SM21 which results in the similar screen as below:

As shown in the above screen, we can mention From date/time and To date/time and we can view system log based on problem classes.

As shown in the above screen there are 3 problem classes

Problems Only

Problems and warnings

All message

Based on the requirement, any one of the above problem classes can be selected.

By default, User text box is left empty. It means it displays system log related to all the users. In case you would like to view system log of any specific user, you can mention the user id there.

After providing these input selections, to view the system log of the application server on which you have logged on, please click “Reread system log” push button .

 

 

 

System Monitroing

Column Meaning
Number (Work Process Number) The internal ID of a work process. Used to identify messages that belong to a work process in the system log.

Internal ID numbers are assigned in ascending order after the server has started. However, because dynamic processes can be started or terminated while the system is running, this consecutive numbering can contain gaps.

Type (work process type) There are the following work process types:

  • DIA Work processes to execute:

– UI requests

– RFC requests

– Internal requests

  • UPD: process to execute update requests
  • UP2 process to execute deferred update requests
  • ENQ process to execute lock requests
  • BTC process to execute background jobs
  • SPO process to execute print requests
Process ID (Process Identification) Process ID of the operating system.

With this number the process can be processed using operating system commands (e.g. ps or kill in UNIX).

Info (Work Process Status Info) Current status of the work process. Possible statuses are:

  • Waiting: Process is waiting for requests
  • Running: The process is processing a request.
  • Stopped: The process is stopped for an individual user. Process is waiting for a message. Column Work Process Status indicates what the work process is waiting for.

If too many processes have status Stopped, then system performance suffers.

  • Ended: An error has terminated the process
  • Shutdown: Process terminated because of a shutdown
  • Standby : Process is only used in special situations (for example, for load situations or executing requests with high priority).
Info (Work Process Status Info) If a work process has status Stopped, the reason is displayed. Typical reasons include the following: Debugging, CPIC activity, locks, updates, GUI (system waits for response from the SAPGUI front-end program, for example, for a remote function call (RFC)). For an overview of the possible parameters, refer to the F1 help in the system.

You may also see PRIV (PRIVate use) as a reason for holding a work process. PRIV indicates that a work process is reserved for a single user for memory management use. The work process has exceeded the limit of the SAP memory that is used by other processes. The process is stopped for as long as the current user requires local memory.

If more than a certain percentage of work processes are in PRIV hold state, then PRIV transactions are automatically terminated if the user is not active in the transaction for a set period of time. You can set this timespan in the SAP system profile.

Restart (after error) Specifies whether the process should be automatically restarted if a process ends prematurely.

You can change the restrat status of a process from the menu:  Administration  Process  Restart After Error   Yes/No . Normally, leave Restart set to Yes.

If a work process aborts during its startup, the system automatically sets the restart status to No. This measure protects against endless attempts to restart a process if a database system is not available or another serious problem is affecting the system. As soon as the problem is fixed, you can set the restart status to Yes so that the system starts the work processes.

Failures (Work Process Failures). Indicates how many times a work process has failed since the instance was started. A work process can be terminated by the administrator or due to an error. The termination counter can be reset from the menu:  List  Reset  Failures .
locked Sem. (Locked Semaphore) Specifies the number of the semaphore held by the work process. If the process has stopped several semaphores, the numbers are separated by inverted commas. For a detailed list of possible semaphores, refer to the F1 help in the system.
(Semaphore To Be Locked) Specifies the number of the semaphore to be locked. Normally, this field should be empty. If the sempahore appears again after refresh, you can see in the Locked Semaphores column whether the semaphore is being held by another work process. F1 help provides a list of all semaphores used by SAP.
CPU Time CPU time since a work process was started. The CPU time of the work process is the sum of CPU system time and CPU user time. The time units are seconds and hundredths of seconds.
Time (runtime) This column shows the current runtime of a request in seconds.
Priority Priority with which requests are executed for this session. If there are work process bottlenecks, a request can be displaced by another request with higher priority. Presently, the following priorities are supported:

  • High: Priority for online sessions and internal system processes
  • Medium Priority for RFC calls from online sessions.
  • Low: Priority for background processing (batch) and RFC calls from background programs (batch jobs)
Client Client in which the current request is being processed.
User Name User whose request is being processed.
Work Process Action (Current Action of the Work Process) Action being executed by the active program. The actions that are displayed are those that are recorded by the SAP performance monitor. The performance monitor must be active (SAP profile parameter stat/level = 1 (default)) for actions or database table accesses to be displayed. F1 help provides a list of all possible Current Actions of the Work Process.
Current Action Info If the database is being accessed, this column contains the name of the table that is being accessed. If it is an AD opcode, this information is the number and name of the AD opcode.
Server name Name of the server. This name usually consists of the host name, database name, and system number. The default value should not be changed.
CPU Time (CPU system time) Current CPU system time used in the kernel at operating system level since the process was started. The time units are seconds and hundredths of seconds.
CPU Time (CPU user time) Current CPU user time used in the application program of the user since the process was started. The time units are seconds and hundredths of seconds.
Session Type Type of session executed, e.g. GUI, HTTP, RFC. F1 help provides a list of all possible session types.
Main Program Name of the main program.
Session Key Internal key of a session The internal key of a session consists of three parts:

  • Logon handle: index in the logon table
  • Logon ID: unique ID of the logon
  • Session handle: internal number of the session

The session key is displayed in the form T<logon handle>_U<logon ID>_M<session handle>, (for example, T15_U234_M2) and is also written in this format within the developer trace.

SE11- Table maintenance

Transaction code SE11 is a ABAP dictionary. By using this transaction code, you can create, change and display table entries and structures.

1. Transaction code SE11 is a ABAP dictionary. By using this transaction code, you can create, change and display table entries and structures.

Table T000 is a fundamental table in your SAP System. You create and maintain your SAP System clients in this table. Therefore, you should protect this table in your productive system from unauthorized access.

To protect T000, take the following precautions:

  • Give maintenance access to system administrators only. The corresponding authorization object is S_ADMI_FCD.
  • Define a process for creating and maintaining clients.
  • Make sure that the S_TCODE authorization object contains the table maintenance and client maintenance transactions SCC4, SM30 and SM31.
  • Set the indicator for client-independent maintenance field for the authorization object S_TABU_CLI to the value X.
  • Set the following fields for the authorization object S_TABU_DIS to the values shown in the table below.

Basis Consultant Administration

 

  • If file systems in SAP server is full, what need to be done?
  • How to avoid file system full in SAP?
  • How to delete un necessary files in file systems of SAP?
  • How to delete core files in SAP?
  • How to delete trace files in SAP?
  • How to delete stat files manually in SAP?
  • What is the transaction code used to delete stat files manually in SAP?
  • What are various reports to be run to cleanup when file system is full?
  • How to prune the file systems in SAP?
  • How to delete old archive files in SAP?
  • What is the location of work and data directories in SAP?
  • What is the location of global directory in SAP?
  • Can we delete old page file and role files when the SAP system is online?
  • What is the sap parameter to set the trace level in SAP?

Sometimes, a basis consultant will get alerts or information from customers that the file systems are full. To avoid system issues and to increase uptime of the SAP system, In those cases, we have 2 options.

i)              Delete un-necessary files in the file system

ii)            In case you found file system is defined as too small then increase the size of them.

In this article, am covering the option 1 mentioned above.Let us assume that the system id(SID) of the sap system is DP1. Then the

i)              work directory in (Unix, WindowsNT operating system) is  /usr/sap/DP1/DVEBMGSnn/work     (where nn is the instance number)

ii)            data directory in (Unix, WindowsNT) is

/usr/sap/DP1/DVEBMGSnn/data    (where nn is the instance number)

iii)           Global directory (i.e. for all instances)  is

/sapmnt/DP1/global  (for UNIX )

\\<sapglobalhost>\sapmnt\DP1\sys\global  (for WindowsNT)

 

Please follow below steps to avoid this issue :

1)   Delete core files from work directory

Work directory in Unix often contains old core files which were generated due to previous program terminations. These core files need to be deleted

2)   Delete old log files and spool files

Under global directory there will be many log files  which can be deleted regularly.

Those files are:-

Log file type                      Naming Convention

Spool requests            nnnSPOOL ( where nnn=client)

Job logs                      nnnJOBLG

Batch input logs          BI<hostname><instance-number>

 

Following reports can be run using SE38 or through background job for selective deletion of the files mentioned above.

RSPO0041  – This report is used for deletion of old spool files

RSBTCDEL –  Used for deletion of old job logs

RSBDCREO  – Report can be used for deletion of  batch input log files and reorganization.

3)   Deletion of old ABAP/4 trace files

Some trace files with the name AT<instance number>nnnn will be in the data directory. Old files of this type can be deleted. The maximum available space for all files is defined by the parameter abap/atrasizequota. Also transaction SE30 can be used to delete the files.

4)   Deletion of old archiving files

When old data is archived, some files are written to the global directory. The naming convention of those files is Rxxmmddn (xx= application, mm= month, dd=day, n=number). For example, RMM11056

If these files are already saved on tape and these data is no longer required for productive operation, then these files can be deleted from the disk

5)   Deletion of old output requests

Output requests are normally stored on the data directory. Naming convention will be like SP*. Under normal scenarios, they are deleted automatically when the output is completed. In case you see they are not getting deleted, you can delete the same

6)   Page file and Roll file

Under the data directory, normally page files and roll files are stored. Naming convention will be like PAGFILnn and ROLLFLnn. Please note that page file and roll files can only be deleted when the corresponding SAP instance is offline.

Deleting these files hardly makes any sense because these files will start growing  to the allowed maximum extent  during the R/3 system start up. However in some special scenarios (during or after client copy), the required space can be retrieved by deleting these files. As mentioned earlier, please note that this can be done only when the instance is offline.

The maximum size of the roll file is given by

(rdisp/ROLL_MAXFS – rdisp/ROLL_SHM) * 8 Kbytes

A similar formula applies to the paging file also.

In some scenarios, to avoid the file system full issue, we can even move these page and roll files to a different file system by defining alternate values for R/3 parameters DIR_ROLL and DIR_PAGING

7)   Deletion of Old sort and Extract files

By the ABAP commands SORT and EXTRACT, temporary files are created. The location of these files are set using profile parameter DIR_SORT or DIR_EXTRACT.

The temporary files for sort are named S+++++++<Extension> (On Windows NT .dat is used as extension  and on Unix there is no extension). Similarly for Extract, E+++++++<Extension> will be the file naming convention.

These files will be automatically deleted after the execution of these SORT and EXTRACT commands. However, in some scenarios, an abrupt termination can happen and these files won’t get deleted automatically. Those old files can be deleted by an administrator.

The exact file names for these are stored in the profile parameters FN_SORT or FN_EXTRACT

8)   Deletion of trace files

Trace files are created during a new system startup and they can be deleted. They are contained in the work directory

9)   Deletion of stat file or moving to different location

Please check whether the stat file which consists the work load statistics, has not been reorganized for some time and has therefore become too large. In emergency cases, this file can be either deleted manually or can be moved to different location.

To delete the stat file manually, please proceed as follows:

Goto ST03 transaction , call the delete function on the relevant instance by choosing :

Workload -> Reorganize -> Delete seq.stat.file

To change the location of stat file, change the value of system parameter ‘stat/file’ to a new location.

10) Deletion of job logs at operating system level

In some emergency cases, where you cannot start the R/3 system at all, the measure is to delete the job logs at operating system level and run RSBTCDEL report in forced mode.

Note: How to delete job logs at operating system level will be covered in a separate article later

11) Changing the trace level

If the trace files (dev_*) in the work directory are very large(normal size 0.1 to 20Kbyte), it is likely that the trace level is set to very high value. In SAP, rdisp/TRACE parameter is used to set the trace level. Normal value for trace is 1.

Please cross check this SAP parameter and reset to 1 if the value is maintained as 2 or higher. If this value is set to high, much more detailed trace will be collected and trace file sizes are likely to increase. Therefore recommending to decrease or set the trace level to 1.

Please refer below link to know, how to set the trace level in SAP.

I am sure, if you duly follow the steps mentioned above,  file system full issues can be addressed. However, if after carrying out all the above steps there is no improvement, then please consider to increase the file system size by requesting space to the relevant team.

Update Administration

There are two types of updates:-

  • Critical update- V1
  • Non-critical update- V2

Update management supports different statuses for update requests. These statuses are displayed in Update Management (transaction sm13) in the column Status.

The status indicates the phase of the update process that the request has reached, or in which the request has become “stuck”. The background of the status field can be green (not yet processed, currently being processed), yellow (not yet processed, probably “stuck”), or red (terminated with error). The column Info provides further information.

The most important statuses are described below.

As already discussed in the section entitled The Update Process, the dialog work process passes the update request onto an update work process after the dialog area has been completed. This then processes the V1 update modules. When the ABAP statement COMMIT WORK is received, the data is written to the database and the V2 update is output to a V2 work process (providing V2 modules exist in the update request).

The following statuses are possible during this phase:

Status Phase
initial The update request has been created, but has not yet been completely processed. (This status applies from the moment the dialog work process transfers the update request to the update work process to the COMMIT in the update work process).
Error An error occurred in the init phase, which prevents the update from being carried out.
Error (no retry) The update request has been canceled and the update cannot be repeated.
V1 processed The init phase has been successfully completed, and the V2 modules are being passed on for further processing. If no V2 modules exist, this update request no longer appears in the overview.
V2 processed The V2 modules have also been processed correctly, but there is still a collective run (can be regarded as V3) to be carried out.

If there is no collective processing to be carried out, this update request no longer appears in the overview.

processed If the parameter rdisp/vb_delete_after_execution is set to 2 – in other words, if automatic deletion is deactivated – an update that has been successfully completed has the status ok. If automatic deletion is activated (default), the update record no longer appears in the overview.
to delete This update request has been marked for deletion.
Enqueues deleted The SAP locks belonging to this update request were manually deleted (SM12).

SAP Post installation steps


After Installing R/3 into a new system, Basis has to perform some post Installation steps before handing over to end users for operation. Post Installation steps make sure that System is ready, properly configured, Tuned and take load of user requests.

 

Below are some standard steps which has to perform immediately after the installation is finished.

  • Login to SAP system using DDIC/000
  • Execute SICK/ SM28 to check for any Installation error , If anything is reported then trouble shoot those errors.
  • Apply SAP license through SLICENSE
  • Execute SE06 , Select Standard Installation and click on execute Perform Post Installation Steps. Click yes on each next screen.
  • Execute STMS , to configure TMS configuration system. If there is no Domain controller in organization then configure this new system as DC.
  • Login as SAP*/000
  • Execute RZ10 -> Utilities -> Import profiles -> Of Active Servers
  • check the system log in SM21
  • Check any dumps in ST22
  • Execute SCC4 -> Click on change button -> Confirm the warning and click on new entries to create a new client.
  • login to new client to perform a client copy using SAP*/<new client number>/PASS
  • Set your default client in SAP
  • Make changes to dialog process and background if you need to change than default one.
  • Define operation mode through RZ04 & SM63
  • Create one or two super users using SU01 with profiles SAP_ALL and SAP_NEW
  • printer configuration (if required )
  • Schedule SAP Standard Background jobs through SM36
  • Configure Web GUI
  • Create login page message
  • Display your company logo on initial screen of SAP
  • Disable import all option (this depends on organizations requirement )
  • Give protection to special users
  • Stop and Start SAP R/3 for profile parameter to be in effect.
  • Upgrade the kernel to the latest level
  • Upgrade the SPAM version to latest level

Backgorung job errors and troubleshooting

1.User and password Issues (Authentication/ Authorization) user lock, user id expiry, password change, lack of roles etc.
2. File system problems: BTC reads from the file system to update the database. File not opened, or corrupted, file sharing issues, file came with different characters, file not found as well.
3. Variants are not properly defined.
4. Dead locks issue (Lock mechanism congested)
5. Update mechanism failed
6. Table space over flow (ORA-1653; ORA-1654)
7. Table space max extent reached (ORA-1631; ORA-1632)
8. Archive struck (ORA-255; ORA-272)
9. The memory is not sufficient and errors
(No Roll Area, PXA (Buffer), Page Errors)
10. Problem in the program and inputs (Indefinite loops like 1/0)
11. Dependent jobs/ events failure
12. Target systems are not available to process the jobs.

Scheduling Standard Jobs

Give event name and description and press save button

Step2: Create a program that triggers this event by calling the FM ‘BP_EVENT_RAISE’.

Step3: Configure the background job from transaction SM36.

In the initial screen give job name and job class and press “Start condition” button.

In the popup screen press “After event” button and give the event name and then press save button.

In the initial screen press save button.

Provide program and variant name and after providing all the values press save button.

Check the status of job defined above