System Performance Analysis Transaction Codes
Here are some transaction codes I find useful when checking for performance related issues in a system:
Depending on the issue, I start with ST05 with all trace options (SQL, Enqueue, RFC, Buffer) active with a very small time frame where data is captured so as not to have more than +-2000 records.
I then compare the results with an identical capture of the same process and time frame using standard SAP.
With both recordings I activate the extended results, which gives times for each execution. Permitting one to easily see the time differences between the executions. These results should point you in the right direction.
Here are the transaction codes I find useful in this analysis:
- SM21 – System Log
- ST03N - R3 Workload statistics
- ST03G - Global System Workload Analysis
- STAD - Statistical Records
- STATTRACE - Functional Trace
- ST05 - Performance Trace (SQL, Enqueue, RFC, Buffer)
- SLIN - ABAP Program Syntax Check
- SE30 - ABAP Runtime Analysis
Send a SAP message via a dialog box in the GUI
This one has been a personal trick of mine for a few years. Use it with caution and hopefully all you system administrators have restricted this functionality (Function Module testing) to responsible users.
There are a number of requirements where you may wish to send a message to a specific user or all users in a system. Yes there are alternative solutions in doing this, but here is a simple and powerful method.
You can send a message which will be pushed to the user on the users desktop via a dialog box through the SAP GUI. To do this simply use SE37 and the Function Module “TH_POPUP”.
Beware what values you use in the import parameters.
If you do not use a user ID, the system will send the message to everyone in the system.
If you use a user ID the system will send the message to that user only. The user must be logged into the system to receive the message.
An example of settings you can use:
- CLIENT 211 (Your client)
- USER S1010631 (Your user ID)
- MESSAGE PLEASE RELEASE SALES DOC 1234567 URGENTLY (Any Message)
- MESSAGE_LEN 0
- CUT_BLANKS
Background Job Variants
You may know how to check the parameter values of a variant in SM37 by checking the variant name associated with the program being executed. But what do you do if the variant was created ad-hoc and has not been saved. That is it was a temporary variant with a name similar to SAP&0001.
You can see the values used in temporary variants by doing the following:
From the job overview within SM37:
- Select the Job that was run/is running.
- Select the “Step” button (Ctrl+Shift+F9)
- Select the program name.
- Then select the menu path Goto–>Variant
Also – A tip is changing the defaulted Job Overview screen Layout to add the “Executing server” to the display. Do this from within the Job Overview of SM37 by selecting (Ctrl+F7).
SM12 – Lock Entries Tips
If you check SM12 you may find some lock entries – this is not a problem. Locked entries are required in standard SAP processing. In most instances the entry will remain in SM12 for a few seconds milliseconds, however they could remain in SM12 for a lot longer depending on the logical unit of work.
Factors which can impact the entry in SM12:
- Sizing and performance of the enqueue server.
- Sizing and performance of the application server/number of available processing sessions. (indirectly related)
- Program logic being executed on the application server.
What you may not know is that there is a hidden menu path for SM12 analysis. To activate this menu path you can do the following:
Run SM12, then enter OK code “test”. You will now see the top menu path has included a new Menu Option labelled “Error Handling”.
This menu option has many parameters and test functions which you can use to analyse the enqueue and dequeue processes.
If you require advice on how to use this new functionality you can refer to OSS note 5424 which is the SM12 FAQ! Success!
SAP Change Logs
Use
To view the changes made to a table or a configuration node in the IMG, you can use transaction SCU3.
To view the changes, you must first have activated the change log for the required tables.
The system will read each change to an existing data record for example (Update/delete) and record it is table log.
Pre-requisite
In order to use table logging you need to do 2 steps:
Step 1:
Activate the system/client parameter. Check your systems value with RZ11 with the value: rec/client
Some options:
- rec/client = ALL - Log all clients.
- rec/client = 001,002,003 - Log the specified clients. (Note you can specify up to 10 clients.)
- rec/client = OFF - Do not log.
- TIP – make sure this parameter is the same for all servers of a system.
Step 2:
The Table then needs to be active for logging – you can do this in transaction SE13.
Additional Info
The data is stored in tables DBTABPRT and DBTABLOG.
If you have too much data in these tables:
- As of Release 4.5A you can use Transaction SCU3 to start a deletion program (Menu “Edit –>Change Docs –>Delete”).
- Or you can drop the table on database level and recreate it with transaction SE14.
History of table logging
- Report RSTBSERV was used prior to 3.0
- Report RSTBHIST was used between 3.0 and 4.5
- Report RSVTPROT is used after 4.5
External Send – email Output and Transaction SCOT
Question: How does the external sending of email for output messages for example standard Order Confirmation occur with SAPconnect?
Answer: The format of the output must be adjusted to be used by the SMTP email server as used in SAPconnect (transaction SCOT). Here is a quick guideline for email outbound processing only:
1) You have to adjust the profile of the SAP Web Application Server if you want to use the SMTP function. The SAPconnect send job can only be scheduled for servers on which SMTP has been activated. For this reason, you must activate SMTP for all of the SAP system’s application servers. – Use transaction RZ10.
2) You maintain the SAPconnect settings for the SMTP node. For more information on SCOT see standard SAP help: Here
3) Next the original format of your standard output,for example order confirmation output could be in SCR (Standard SAPscript). In this case the SD messages are transferred to SAPconnect in SCR format (SAPscript) these are then converted to OTF format and may be converted to PDF format in accordance with the conversion rules in the IMG.
The configuration for the system is done in “SAP Customizing Implementation Guide–> SAPNetWeaver –>SAP Web Application Server -> Basis Services -> Communication Interfaces -> SAPconnect Client-Wide Settings -> General Settings -> Conversion Rules”.
4) Lastly the emails from the SAP spplication are stored in a queue. A background job needs to be created to collect the emails from the queue and process/send them. You can schedul ethe job in SAPconnect with SCOT as follows:
- From the user menu in SCOT select View–>Jobs
- Select Create
- Enter a job name and confirm it.
- Select the variant SAP&CONNECTALL Sending requests
- Schedule the job to run periodically for example every 10 mins.
For more information, refer to the online documentation for SAPconnect (component BC-SRV-COM).
Efficiency in SAP with Parameters
Using SAP as a consultant or super user you may find yourself always entering the same data over and over again. You may save time by having the system automatically populate these fields. Some common culprits are:
- Sales organisation
- Distribution Channel
- Division
You can set the value automatically for any field that has a parameter by settings its value in your user profile. To do this first locate the fields parameter, by selecting the field and then selecting F1 (Help) followed by F9 (Technical Information).
Some common parameters are:
- Sales organisation VBAK-VKORG – parameter = VKO
- Distribution Channel VBAK-VTWEG - parameter = VTW
- Division VBAK-SPART - parameter = SPA
Proceed to your user profile, either with SU3 or SU01 and enter the Parameter ID and Parameter Value in the “Parameter” tab.
Now each time you access that field the value will automatically be defaulted.
Variants: Transaction Screen Standard Dynamic
What is the difference between a screen variant,a transaction variant, a variant transaction, a standard variant and a dynamic transaction variant
A screen variant – Can be used to hide fields on a screen, assign values to fields, or set the fields to not ready for input.
A transaction variant – Is simply a collection of screen variants. Transaction variants are created or changed using transaction SHD0.
Great Tip- did you know that you can assign a transaction variant to a sales document (as long as it is a cross client transaction variant) in field - V_TVAK-VARIANT as seen in VOV8.
A variant transaction - In Se93 when you create a new transaction, you can add a transaction variant to this transaction. When you execute the new transaction, the system uses this variant. This basic function can be used in any transaction and it can change any screen. Each transaction code can have one variant transaction only.
A standard variant - Like a variant transaction except that it is simply a variant assigned to a standard transaction. You are then no longer able to call this transaction ‘without’ a variant.
A dynamic transaction variant – This permits you to assign more than 1 transaction variant to a transaction code. In the case of a dynamic transaction variant, the screen variant is only determined at runtime. (This function is only implemented for screens in the SAPMV45A program, for example, not on the condition screen, pricing screen, text screen and billing plan screen.)
If you need to make more modifications in sales documents you can also make changes in MV45AFZZ FORM USEREXIT_FIELD_MODIFICATION to change screen attributes.
Wild cards in searches
Did you know that a wild card search in a selection such as * is not the only wild card option. A * is used as a wild card for 1 or more characters, while a + may also be used as a wild card for a single character.
Great SAP Authority Check Search
Talking about authority checks, I love using the transaction SUIM to analyse authorization objects and values for users.
But one could also use a program such as RSABAPSC which can be used to trace the authority-check commands used in a program and its sub programs.
Also as a general rule of thumb you could check for the AUTHORITY_CHECK statement to identify the authority objects in programs.
However both of these methods RSABAPSC and the AUTHORITY_CHECK statement will not catch all authority checks.
Remember to use SU53 to see the details of a failed authority check object.
Translations
Hi Glynn do you have any tips on translations of texts?
This is a big area, however, a little time saver can be to use the unicode translator transaction SE63 which is a shortcut to all texts which need to be maintained and translated. Always check oss note – 0585116 for more info on using SE63.
Dont forget you can use SO10 to translate standard texts as well.
Compare ABAP objects across systems
So you know how to use OY19 to see and compare cross system customising objects and you know how to use SE39 to see and compare an ABAP program across systems. But do you know how to search and compare all ABAP objects across a system?
For example you have made a system copy and want to compare all Z* and Y* programs?
You can do this with Transaction Code – SREPO - Repository Comparison.
1) Select the RFC destination (you can use SM59 to do this).
2) Select “Customer Objects and Modified SAP objects”
Then follow the wizard.
How to change Servers on a System
So you login to server X on a system and you would like to move to server Y on the same system without logging off and back on again – How do you do it?
You can do this a number of ways – the method I follow is:
- Go to transaction SM51. (see server overview)
- Double click on a server to see the processes.
- Then open a new session, you will now be on the new server you double clicked.
Be careful NOT to use the back arrow from the work process overview or else you will move back to the old server.
How to Run SAP LSMW in the Background
Did you know that you can run an LSMW object in the background?
(Basic Premise: There are 3 main executable tasks, as long as you can run these in the background and their results can be placed on the application server then the process can be run in the background.)
In order to do this proceed as follows: Read more 
Workflow Analysis
To see how the workflow passes values from/to the different container’s, you can use transaction SWUD.
Other useful tools for workflow error search, are: SWEL (first turn on even trace with SWELS.)
You can test the workflow in SWUS then view the workitem in SWI2_FREQ and display the container to see the outcome.
Great ABAP Transaction Code
If you have never used this transaction code before – try it out – ABAPDOCU
It provides the SAP ABAP Documentation with examples.
Basic SAP Workflow Function Modules
SWW_WI_POPUP_FOR_COMPLETION ” shows the compeleted status of a workflow
SWW_ADDR_KEY_CREATE_FROM_USER ” display the address of the user or recipient
SWW_WI_DELETE ” delete work item
SWW_WI_CREATE_VIA_EVENT ” create work item as result of event
SWW_WI_DEADLINE_CHANGE ” change of deadline attribute of work item
SWW_WI_COMP_EVENT_RECEIVE ” complete workitem using events
SWW_WI_REJECT ” reject work item
SWW_WI_EVENT_RECEIVE ” retrive event for a workflow
SWW_WI_DISABLE ” lock workitem against execution
SWW_WI_ENABLE ” remove lock against execution of workitem
Important SAP Workflow Transaction Codes
The area menu ‘SWLD’ lists all the transactions associated with Business workflows.
SWDD - Main Workflow Builder.
PFTC – General task maintenance.
SWO1- Business Object Builder.
SBWP- The Business Workplace SWDM – Business Workflow Explorer
SWELS – Switch Event Trace On/Off
SWETYPV - Display/Maint. Event Type Linkages
SWUS – Test Workflow
SWUI – Start Workflow
SWI6 – Workflow for Objects
SW14 – Workflows for Objects Types
SWDB – Workflow Builder – Create Workflow
SWLV – Maintain Views
TASK/TASK GROUPS
PFTC_INS – Create
PFTC_CHG – Change
PFTC_DIS – Display
PFTC_COP – Copy
PFTC_DEL – Delete
Tcodes Related To Events
Events Creation
BSVW – Status management
NACE – Message Control
AWUW – Logistics Information System (LIS)
Event Linkages
SWB_COND – Workflow Start Conditions
Work item analysis
SWI2_FREQ – Work Items Per Task
SWI2_DEAD – Work Items With Monitored Deadlines
SWI2_DURA – Work Items By Processing Duration
Task analysis
SWI11 – Tasks in Workflows
SWI13 – Task profile
Support Packages
To check the support packages in the System we can go to the menu and select System –> Status then select the component information (magnifying glass) under Sap System Data.
One will then see the following:
- Software Component
- Release
- Level
- Highest Support
- Short description
But did you know that the information is depicted in a transaction code SPAM – the Support Package Manager.
Select “All Support Packages” then button “Display”.
If you open the Package header for example: SAP_APPL - Logistics and Accounting
You will see the Support packages and their Numbers.
Quick and Easy Tut – EDI – Pricing Condition Records
Introduction
So you know that SAP can send pricing condition records from your SAP system to another system using ALE/EDI. An investigation of transaction WE60 can show you the structure of the Basic Type “COND_A03″.
But what is the easiest method of sending the initial data load from SAP to another system for pricing condition records, or how do you use it? Read more 
Number Range Buffering
Basic Introduction to NRIV
The document number is assigned in chronologically ascending order based on the table NRIV. For this, the table NRIV is locked until the application (LUW) is terminated by either a COMMIT WORK or ROLLBACK (OSS Note 639754). Another application cannot take a document number during this time. Read more 
Function Modules for SD Reports and Smartforms
These function modules are great to get the information used to populate Smartforms and reports in SD.
Remember you can access the data with transaction SE37 and use the test/execute icon [F8].
How To: Generate a WSDL from a RFC Function Module
WSDL – Web Service Description language – (WSDL, pronounced ‘wiz-del’) is an XML-based language that provides a model for describing Web services. (A web service is typically an application programming interface (API) or Web API that is accessed via Hypertext Transfer Protocol (HTTP) and executed on a remote system, hosting the requested service.)
An example in layman’s terms is, you can have a RFC (Remote Function Call) function module which is used in SAP for example to create a sales document. You then have a company outside of your system which needs to send the input parameters to your system in order to create the sales document. The process to follow below will create the interface WSDL which the external company can use to place the data. Read more 
IDoc numbers related to Sales Documents

System Workload Transaction and User Analyses
If you have access to transaction ST03 or ST03N in your system you can access some very important information.
For example do you want to know if a transaction code is used in your SAP instance? Read more 




