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
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
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
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 datalog 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.


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


0 comments:

Copyright © 2013 VENKAT SAP BASIS