0% found this document useful (0 votes)
269 views

SAP BASIS FAQ and Important T Code

This document provides guidance on monitoring and maintaining SAP systems. It describes various transaction codes for monitoring processes, users, locks, updates, logs, jobs, buffers, workload, operating systems, dumps, databases, emails, and IDOCs. It also provides steps for configuring email in SAP using SMTP, including configuring user email addresses and SMTP nodes. Daily activities for SAP Basis like monitoring active servers, users, logs, runtime errors, clients, users, RFC destinations, profiles, and jobs are also outlined. The document discusses deleting old transport requests to free up disk space and improve performance.

Uploaded by

aniruddha_2012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
269 views

SAP BASIS FAQ and Important T Code

This document provides guidance on monitoring and maintaining SAP systems. It describes various transaction codes for monitoring processes, users, locks, updates, logs, jobs, buffers, workload, operating systems, dumps, databases, emails, and IDOCs. It also provides steps for configuring email in SAP using SMTP, including configuring user email addresses and SMTP nodes. Daily activities for SAP Basis like monitoring active servers, users, logs, runtime errors, clients, users, RFC destinations, profiles, and jobs are also outlined. The document discusses deleting old transport requests to free up disk space and improve performance.

Uploaded by

aniruddha_2012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 9

SAP BASIS FAQ and important T Code

How to Monitor SAP Systems?

This document is intended for all persons who are responsible to monitor Production Systems in
SAP. Following activities are explained in detail with screenshots:
 Check SAP Process Overview SM51/ SM50
 System Wide Work Process Overview SM66
 Users Logged On AL08/ SM04
 Spool Requests SP01
 Check SAP Locks SM12
 Check for Updates SM13
 Check System Log SM21
 Check Background Jobs SM37
 SAP Buffers ST02
 Workload Analysis ST03
 Operating System Monitor ST06
 ABAP Dump Analysis ST22
 Database Analysis ST04
 Check Database PerformanceDB02
 Check E-Mail and Fax Messages SOST
 Check for failed IDOCs WE02/ WE05
How to Configure Email on SAP ?
SAPconnect provides a direct connection to the Internet using the SMTP plug-in of the SAP Web Application
Server. This enables you to send and receive Internet mails without the need for an additional external
communication system, as well as faxes and text messages (pager/SMS). The SMTP plug-in is available for
Internet mail as of SAP Web AS 6.10, and for fax and text messages (pager/SMS) as of SAP Web AS 6.20.
The purpose of this document is to detail the steps required to setup email from SAP with configuration of
SMTP. See the step by step covered processes below:
 Configure user ID email addresses SU01
 Configure SMTP Node SCOT
 Testing the email So01
 Pushing queued messages manually SCOT
SAP Basis Quick Overview Training for Beginners
This unique introductory training provides easy-to-understand instructions for SAP Basis terms. After reading
this guide, you will be able to:
 Outline simple client/server configurations
 Describe the processing flow for user requests in SAP Systems
 Name the most important processes on an SAP Web Application Server
 Define the term instance and recognize the characteristics of a central instance
 Outline the structure and architecture of an SAP system
 List the technical components of the SAP Web Application Server
 Describe the process of the start procedure of an SAP System
 Start the entire SAP System or individual instances
 Create and Release Transport Requests
 Schedule and monitor jobs
 Create output devices
 Authorization concept
Daily SAP Basis Activities Guide for Beginners
After reading this comprehensive material, you will get an overview for the most used SAP Basis Activities for
the following processes;
 Active Servers SM51
 Work process overview SM50
 User Overview SM04
 Active Users Al08
 System Logs SM21
 ABAP runtime error/ ABAP dumps ST22
 Client Administration
 User Management SU01
 RFC Destination SM59
 System Profiles RZ10
 Logon Group (Logon Load Balancing) SMLG
 Lock Entries SM12
 Background Job management SM36 / SM37
 Update Management SM13

 Kernel Upgrade Step by Step

Deleting old transport requests


Why we need to delete the old transport requests?
 Re-use the space in the file system
 Large amount of data to be transported (lack of disk space)

 Compliance

 Increase the performance of the file system.

It is possible to delete the data which is no longer required from the sub
directories data, log and cofiles of transusing the tp function clearold.
Note: It is recommended to archive rather than to delete directly.
Requirements
Check if olddata exists as subdirectory of trans
olddata under trans directory: Check If the subdirectory ‘olddata’ within the transport
directory (/usr/sap/trans) does exist or not. If not create it and have one of the SAP System
administrator as the Owner and remaining SAP system administrators sharing the same trans
directory should have write permission (i.e., write authorization for the group).
 Parameter Settings: The minimum age of files in the transport directory that can be deleted can be set
in the transport profile.

The transport profile is the file ‘TPPARAM‘ in the subdirectory ‘bin’ in the transport directory.
In releases prior to 4.5A, this file was called TPPARAM
The new transport profile TP_DOMAIN_<SID>.PFL generated by TMS is used for all calls of
the transport control program from the SAP System. The settings in the transport profile
TPPARAM are ignored. <SID> is the SID of the first Domain controller when STMS was
configured.
The following parameters can be set (all durations are in days):
 datalifetime is the minimum lifetime of the files in data
 loglifetime is the minimum lifetime of the files in log
 olddatalifetime is the minimum lifetime of the files in olddata
 cofilelifetime is the minimum lifetime of the files in cofiles
Example:
datalifetime=30
loglifetime=60
olddatalifetime=60
cofilelifetime=30
 If STMS was configured with EXTENDED TRANSPORT CONTROL and used Target groups, make sure that
that below parameter are set globally.
CTC=1
NBUFFORM=1
Note: If above parameters are not set globally, the tp function “check all” will return below
error.
ERROR: A target system group (/FROMDEV/) is used with a name longer than 3.
This is only possible with NBUFFORM=TRUE!
ERROR: EXIT(16) -> process ID is: 27830
tp returncode summary:
TOOLS: Highest return code of single steps was: 16
ERRORS: Highest tp internal error was: 0204
tp finished with return code: 204
meaning:
parameter is missing
Transports clean-up can be performed in two steps
 First to run ‘tp check all’ is to make a list of all files in the subdirectories ‘log’, ‘cofiles’, ‘data’
and ‘oldata’ that are no longer required. This list can be found in the file ‘ALL_old.lis’ in the
‘tmp’ subdirectory of the transport directory. The age of the files is not taken into account here.
 In the second step (tp clearold all), the age of the files that are listed in the file ‘ALL_old.lis’ is
checked. Files from the directory ‘data’ which have exceeded their lifetime are moved to the
subdirectory ‘olddata’. Files from the other directories (‘log’, ‘cofiles’, ‘olddata’) which have
exceeded their lifetime are directly deleted.
“tp” checks and takes action on below sub directories of trans.
/usr/sap/trans/sapnames
/usr/sap/trans/cofiles
/usr/sap/trans/data
/usr/sap/trans/olddata
/usr/sap/trans/log
Actions being performed with TP clearold command
 Determines the removable files from cofiles-directory … and removes corresponding entries from files in
sapnames-directory … (/usr/sap/trans/sapnames/..)
 Deletes the cofiles that are determined in above step from /usr/sap/trans/cofiles/…
 Determine and delete the transport log files from /usr/sap/trans/log/….
 Determine and delete the data files present in /usr/sap/trans/olddata
 Moves the data files from /usr/sap/trans/data/ to /usr/sap/trans/olddata/
 Determine and delete the data files present in /usr/sap/trans/olddata, which met expiration date. This Step
again checks if any of the data files moved from /usr/sap/trans/data/ to /usr/sap/trans/olddata

Steps to start old transports deletion


 Log on as one of the SAP System administrators, Change to the subdirectory ‘bin’ in the transport directory:
Start tp with the arguments ‘check’ and ‘all’
devadm % cd /usr/sap/trans/bin
devadm % tp check all pf=TP_DOMAIN_DEV.PFL
 Start tp with the arguments ‘clearold’ and ‘all’:
devadm % tp clearold all pf=TP_DOMAIN_DEV.PFL
 Creates CLEAROLD.LOG in /usr/sap/trans/tmp
 CLEAROLD.LOG contains the entire log of actions taken on the sub directories of /usr/sap/trans.
Optionally we can simulate the “tp clearold all” by using the tp function “tp testold all”
devadm %tp testold all pf=/usr/sap/trans/bin/TP_DOMAIN_DEV.PFL
 Creates TESTOLD.LOG in /usr/sap/trans/tmp
 TESTOLD.LOG contains the entire log of actions that will be taken by the “tp clearold all” on
the sub directories of /usr/sap/trans.
 This just creates the log and does not perform any physical actions

STMS Configuration

 How to perform STMS configuration of an SAP system (local transport domain)?


 How to do STMS configuration in the post system refresh steps of SAP system
 Please use user id which has SAP_ALL access and login to 000 client of an SAP system.
 Please execute transaction code STMS
 A screen similar to below will appear. Provide the description of the system.

In the above screen, Transport domain name will be displayed by default. (Naming convention would be
DOMAIN_SID, where SID stands for system id of the system that is being refreshed)
In our example above SE1 is the system id and DOMAIN_SE1 is the domain.
In this example, am demonstrating on how to configure local transport domain for a standalone
SAP system.
Click the Save button in the above screen.
After that SE1 is configured as transport domain and a screen similar to below will appear.
An informational message will be displayed like “You are logged onto the domain controller”.
This completes the STMS configuration (local domain) for a sap system.
Please note that the above configuration is for standalone system. In case you would like to do
STMS configuration for a system which is part of another transport domain, a slightly different
process is to be followed which will be covered in a different article.
How to find out long running jobs in SAP ?

This article answers the following queries ?


 How to find out long running jobs in SAP ?
 How to find out executing server, job class, periodicity or frequency of a background job ?
 How to find out release or start details of a background job ?
 How to find out program name or command being executed in a background job ?
 How to find out workprocess number that is executing the background job?

How to find out long running jobs in SAP ?

Goto SM37 transaction and select the active job status between any 2 given date/time and list them. In the
output, sort the jobs based on duration column in descending order and identify the jobs that are running for
longer duration

All other questions can be answered from the below :

Goto transaction SM37 and list the jobs based on status and time interval.
Select any job for which you want to figure out the details. Double click on the job, which pops up “display
job screen”. In that screen, click on job details tab to view
 Job name
 Job class (i.e A, B and C)
 Status of the job
 Exec. Target (server/instance on which job is being run currently)
 Job frequency (hourly, monthly , weekly etc)
 Workprocess that is executing the job
 Client on which job is running
 Release time of the job
 Schedule start of the job

First of all identify the job that is long running and identify details like job class, workprocess that is executing
the job
How to identify long running background jobs
2) Click on the job to view the display job screen. In the screen, click on job log to understand what is being
performed by the job currently. This may give details like job is currently extracting some data packages or
processing data packages etc
3) Identify the executing server and process id of the job from the step 1 and goto transaction SM50 of the
respective executing server to view more details about the background job running.
Figure out the status of the job like On Hold or running from the process overview. If the job is On Hold, find
out the reason for On Hold by examing the “Reason” column of SM50 transaction. Reason for On Hold could
be due to CPIC/RFC/DEBUG/ENQ/PRIV/UPD etc.
Double click on the reason column for detailed information on the same and troubleshoot accordingly. If
reason is RFC, check out which RFC it is referring to and cross check whether destination system is up or not
and any other problems with that system.
 If it is ENQ, check out any lock issues like lock overflow etc
 If it is PRIV, check out for memory bottlenecks
 If it is UPD, check out whether any update issues
 If it is CPIC, check out for any network , gateway, message server and other communication problems
4) After performing step3, if you figure out job is not on Hold and it is in running state, then examine report
column to identify what report/program is being executed by the job. Once you got the report/program details,
figure whether it sap program or custom program and take actions accordingly.
5) Also examine Action and table columns in SM50 transaction of respective executing server to identify what
is the action( roll in/roll out /Sequential read/Physical read/insert/update/delete etc) being carried out by the
job currently and what is the table on which action is being carried out.
If it is sequential read, figure out the cost of that sequential etc and consider for indexing etc. If it is physical
read, check out whether there are too many swaps and consider resizing buffers accordingly. If you observed
delay is due to high roll in/roll out, identify reasons for the same and tune buffer/memory parameters
accordingly.
6) Once you get the table details on which action is being carried out, figure out
 How many records are existing in the table ?
 Is this taking long time due to volume of records ?
 Are there proper indexes on the table ?(If no proper index, consider index creation by taking help of DBA )
 Is the table having upto date statistics ? (If statistics are out of date,
consider updating statistics of that table)
7) Consider debugging the process in SM50 ( Program/Session -> Program -> Debugging ) to figureout the
issue
Using ST05 or ST12, a trace can be taken for background job to figure out where exactly time is being
consumed and to identify various cpu/memory bottlenecks or any buffer issues.
9) STAT/STAD transcation can be used to figure out what is the reason for high response time and actions can
be taken accordingly
10) By taking help of ABAP er, even ABAP run time analysis can be done using SE30 transaction
By following the above steps, you can pin point the issue and take actions accordingly to minimize runtime of
long running background jobs.

How to display a company logo on SAP main screen ?

Follow these steps:

1) Go to transaction SMW0
2) Select Binary Data for WebRFC Application and F8
3) Execute the report, w/o entering anything on the resulting screen
4) On next screen, click CREATE icon , Give some name and description
5) Press the IMPORT icon, and give the path of the JPG/GIF you need toupload and upload the file as BIN
6) Assign development class
7) Go to SM31, Give table/view as SSM_CUST and press Maintain
8)There give START_IMAGE as the name of the image you uploaded in SMW0.
9) Save
SAP TP and R3trans Commands
The complete objects in the request from the source system will be transported. This
tp export :
command also Used by SAP System when it releases a request.

tp r3e : R3trans export of one transport request.

tp sde : Application defined objects in one transport request can be exported.

tp tst : The test import for transport request can be done using this command.

tp createinfo : This command creates a information file that is automatically done during the export.

tp verse : This command creates version creates versions of the objects in the specified request.

tp showbuffer : Shows all the change requests ready to be imported to the target system.

Using this command users can find out the number of requests in the buffer waiting
tp count :
for import.

This command shows the environment variables needed for the connection to the
tp go :
database of the or target system.

All the values of modifiable tp parameters in the global parameter file. The default
tp showparams :
value is shown for parameters.

Tp showbuffer : show all change requests ready to be imported to the target system

Tp count number of requests in the buffer waiting for import

Tp importall: Imports all the request from buffer to the target system

Tp put system imports all the request from buffer to the target system and locks the system

tp sapstart : To start the R/3 system.

tp stopsap : To stop the R/3 system.

tp dbstart : To start the database.

tp dbstop : To stop the database

This command locks the system for all the users except SAP* and DDIC. The users that
tp locksys :
have already logged on are not affected by the call.

tp unlocksys : This command unlocks the system for all the users.
tp lock_eu : This command sets the system change option to “system can not be changed”
tmporarily. tmporarily.

tp unlock_eu : This command unlocks the system for all the changes.

This command starts a complete backup using R3trans command. It uses


tp backupall :
/usr/sap/trans/backup directory for the backup

R3trans -d : This command is used to check the database connection .

R3trans -u : Unconditional mode can be used as we have seen in the above example.

R3trans -v : This is used for verbose mode. It writes additional details to the log file

R3trans -i : This command directly imports data from data file without a control file.

R3trans -l : This provides output of a table of contents to the log file.

R3trans -n : This option provides a brief information about new features of R3trans.

R3trans –t: This option is used for the test mode. All modifications in the database are rolled back

This command is used for a complete backup. We will see in the next paragraph how
R3trans –ba:
to use the Control file for the backup.

This command is used for a delta backup if the user does not want a complete backup.
R3trans –bd:
R3trans –bi: This option will display backup information
Command Line Driven Transporting using the
‘tp’ Command
STMS is a very powerful transaction in the BASIS world. The whole transport system in SAP is paramount
to its functionality. 99% of the time, you will use STMS for your transport needs. What of that last 1%?
Sometimes it becomes more efficient, or just safer, to have a little more manual control.
It is possible to add transport requests to the buffer, and even import them via the CLI (Command Line
Interface). Keep in mind, whenever working on an instance at the OS level, you should be logged in as
[sid]adm.

To add transports to the buffer:

tp add to buffer [transport number] [SID] Client=[client number]


pf=/usr/sap/trans/bin/TP_DOMAIN_[DOMAIN_SID].PFL

If I wanted to add transport number DV1K907046 to the buffer for Q01 client 400 and the transport
domain controller was DV1 the string would look like this:
tp add to buffer DV1K907046 Q01 Client=400 pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL

To import transports via CLI:

tp pf=/usr/sap/trans/bin/TP_DOMAIN_[DOMAIN_SID].PFL import [transport number] [SID] U128


client=400

Since I’ve added DV1K907046 to the buffer, I can now import it with this string:

tp pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL import DV1K907046 Q01 U128 client=400


It is also possible to create shell or batch scripts from these commands to do multiple transports at one
time. I’ve found that this is when CLI tp management is most effective.
Using your favorite text editor, simply “stack” the commands on top of each other:

tp addtobuffer DV1K907046 Q01 Client=400 pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL


tp addtobuffer DV1K907047 Q01 Client=400 pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL
tp addtobuffer DV1K907048 Q01 Client=400 pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL
....

Then save as either a .sh for Unix or .bat for Windows.


The batching approach works for both adding to the buffer and for actual import. It’s best to separate
each task (add to buffer in one script, import in another).

You might also like