Analyze and tune SAP system performance with ST02, ST03, ST22
✓Works with OpenClaudeYou are a SAP Basis administrator responsible for system performance analysis and tuning. The user wants to identify bottlenecks using ST02, ST03, and ST22 transactions and apply targeted tuning measures.
What to check first
- Run transaction
ST02(Tune Summary) to verify buffer pool status and memory allocation - Check transaction
ST03(SAP Statistics) to confirm statistical data collection is enabled (STAT parameter) - Access transaction
ST22(Dump Analysis) to review runtime error logs and frequency patterns - Verify you have the PFCG role
SAP_ALLorSAP_BASIS_ADMINfor full access
Steps
- Open transaction
ST02and navigate to the "Buffer" tab—examine hit ratios for DB buffer, program buffer, and CUA buffer (target: >99% for DB, >95% for program) - Identify critical misses in ST02's "Detail Analysis" section; note buffer types with <90% hit ratio requiring expansion via parameter
db_tabsize,db_ctry_size, orrsdb_max_filters - Execute transaction
ST03and select "Workload Analysis" for the current day—sort by "Total Time" to isolate expensive transactions consuming >10% of system time - In ST03, drill into top transactions (typically SAPMSSS0, SAPMSSS1, or module-specific transactions) and check "Database Time", "CPU Time", and "Roll Wait Time" columns
- Switch to transaction
ST22and filter dumps by "Exception Type"—focus onDBIF_REPO_NOT_FOUND,STATEMENT_NOT_EXECUTED, orSYSTEM_FAILUREpatterns indicating SQL, buffer, or memory issues - In ST22, select frequent runtime errors and click "Extended Information" to extract root causes; cross-reference with ST03 transaction times during error windows
- Adjust SAP profile parameters based on findings: increase
em/initial_size_mbif ST02 shows extended memory pressure, or modifyztta/roll_areaif ST03 shows high rollout rates - Monitor ST02 "Memory Configuration" post-change to validate buffer behavior; re-run ST03 analysis after 24–48 hours to quantify improvement in transaction response times
Code
REPORT zperf_tune_analysis.
DATA: lt_buffer_stats TYPE TABLE OF statistic_record,
lt_transaction_data TYPE TABLE OF sapstat_transaction,
ls_buffer LIKE LINE OF lt_buffer_stats,
lv_hit_ratio DECIMAL,
lv_db_time INT4,
lv_cpu_time INT4,
lv_buffer_name STRING.
" ST02 Buffer Analysis via RFC/API
CALL FUNCTION 'STUN_GET_BUFFER_STATISTICS'
EXPORTING
buffer_name = 'DB'
IMPORTING
statistics = lt_buffer_stats
EXCEPTIONS
buffer
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related SAP Skills
Other Claude Code skills in the same category — free to download.
ABAP Developer
Write clean ABAP code with modern syntax, CDS views, and best practices
SAP Fiori App
Build SAP Fiori applications with SAPUI5 and Fiori Elements
SAP BTP Setup
Set up and deploy applications on SAP Business Technology Platform
SAP HANA Query
Write and optimize SAP HANA SQL queries and calculation views
SAP OData Service
Create and consume OData services in SAP (V2 and V4)
SAP RFC Connector
Connect to SAP via RFC/BAPI from external applications
SAP CDS Model
Create Core Data Services models and annotations for SAP
SAP CAP App
Build full-stack applications with SAP Cloud Application Programming Model
Want a SAP skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.