MSS_STMTHISTDET SAP (History details for an expensive SQL statement) Structure details

Dictionary Type: Structure
Description: History details for an expensive SQL statement




ABAP Code to SELECT data from MSS_STMTHISTDET
Related tables to MSS_STMTHISTDET
Access table MSS_STMTHISTDET




Structure field list including key, data, relationships and ABAP select examples

MSS_STMTHISTDET is a standard SAP Structure so does not store data like a database table does. It can be used to define the fields of other actual tables or to process "History details for an expensive SQL statement" Information within sap ABAP programs.

This is done by declaring abap internal tables, work areas or database tables based on this Structure. These can then be used to store and process the required data appropriately.

i.e. DATA: wa_MSS_STMTHISTDET TYPE MSS_STMTHISTDET.

The MSS_STMTHISTDET table consists of various fields, each holding specific information or linking keys about History details for an expensive SQL statement data available in SAP. These include STW_COLLID (Unique ID of a set of collected expensive SQL Statements), COLL_DT (Date when SQL Statement statistics were saved), COLL_TM (Time when SQL Statement statistics were saved), HIGH_ELAP (High elapsed time).. See below for full list along with technical details, documentation, text table, check tables, foreign key relationships, conversion routines, relevant tcodes and example ABAP select code etc. .

Delivery Class:
Display/Maintenance via tcode SM30: Display/Maintenance Allowed but with Restrictions
SAP enhancement categories: Cannot Be Enhanced


SAP MSS_STMTHISTDET structure fields - Full list of fields found in SAP data dictionary

Field Description Data Element Data Type length (Dec) Check table Conversion Routine Domain Name MemoryID SHLP
STW_IDUnique ID of a set of collected expensive SQL Statements MSSSTMTHCOLLIDDEC20
STW_COLLIDUnique ID of a set of collected expensive SQL Statements MSSSTMTHCOLLIDDEC20
COLL_DTDate when SQL Statement statistics were saved MSSSTMTHDTDATS8
COLL_TMTime when SQL Statement statistics were saved MSSSTMTHTMTIMS6
HIGH_ELAPHigh elapsed time MSSELAPFLAGCHAR1CHAR1
PCT_ELAPSED_TIMEPercentage of all server elapsed times MSSPCTELAPSEDTIMEDEC5(2)
HIGH_CALLSFlag set if statement was included because of # of calls MSSCALLSFLAGCHAR1CHAR1
PCT_EXEC_COUNTPercentage of server total execution counts MSSPCTEXECCNTDEC5(2)
HIGH_PHYRDStatement included because of high physical reads MSSPHYRDFLAGCHAR1CHAR1
PCT_PHYS_READSPercent of all physical reads MSSPCTPHYSREADSDEC5(2)
HIGH_LOGRDHigh logical reads for this statement MSSLOGRDFLAGCHAR1CHAR1
PCT_LOGICAL_READSPercent of server wide logical reads MSSPCTLOGICALREADSDEC5(2)
HIGH_LOGWRStatement has high logical writes MSSLOGWRFLAGCHAR1CHAR1
PCT_LOG_WRITESPercentage of all logical writes MSSPCTLOGWRITESDEC5(2)
HIGH_CPUHigh CPU time MSSCPUFLAGCHAR1CHAR1
PCT_CPU_TIMEPercent of total worker time MSSPCTWORKERTIMEDEC5(2)
SQLTEXTFirst 50 characters of a SQL Server statement MSSPARTIALSQLCHAR50TEXT50
SQLHANDLEhandle pointing to sql statment or procedure MSSSQLHANDLECHAR130MSSHANDLE
PLANHANDLEhandle pointing to plan used in execution of sql stmt/proc MSSPLANHANDLECHAR130MSSHANDLE
OBJ_NAMEMS SQL Server object name MSSOBJNAMECHAR30TEXT30
EXEC_COUNTNumber of plan executions since last compile MSSEXECCOUNTDEC20
TTL_LOGICAL_READSTotal logical reads for this plan since compiled MSSTTLLOGICALREADSDEC20
AVG_LOGICAL_READSAverage logical reads for this plan since compiled MSSAVGLOGICALREADSDEC20
MAX_LOGICAL_READSMaximum number of logical reads this plan has ever performed MSSMAXLOGICALREADSDEC20
MIN_LOGICAL_READSMinimum number of logical reads this plan has ever performed MSSMINLOGICALREADSDEC20
LAST_LOGICAL_READSLast logical reads for this plan since compiled MSSLASTLOGICALREADSDEC20
TTL_ELAPSED_TIMETotal elapsed time in microseconds MSSTTLELAPSEDTIMEDEC20
AVG_ELAPSED_TIMEAverage elapsed time in microseconds MSSAVGELAPSEDTIMEDEC20
MAX_ELAPSED_TIMEMaximum elapsed time in microseconds MSSMAXELAPSEDTIMEDEC20
MIN_ELAPSED_TIMEMinimum elapsed time in microseconds MSSMINELAPSEDTIMEDEC20
LAST_ELAPSED_TIMELast elapsed time in microseconds MSSLASTELAPSEDTIMEDEC20
ET_PER_ROWElapsed time in microseconds per row MSSETPERROWDEC20
TTL_ROWSTotal number of rows returned for a query plan MSSTTLROWSDEC20
AVG_ROWSAverage rows returned per execution MSSAVGROWSDEC20
MAX_ROWSMaximun number of rows returned for a query plan MSSMAXQROWSDEC20
MIN_ROWSMinimum number of rows returned for a query plan MSSMINQROWSDEC20
LAST_ROWSTotal number of rows returned for a query plan MSSLASTROWSDEC20
AVG_CPU_TIMEAverage amount of CPU time consumed by executions MSSAVGWORKERTIMEDEC20
MAX_CPU_TIMEMaximum CPU time consumed by this plan MSSMAXWORKERTIMEDEC20
MIN_CPU_TIMEMinimum CPU time consumed by this plan MSSMINWORKERTIMEDEC20
LAST_CPU_TIMECPU time consumed by last execution of this plan MSSLASTWORKERTIMEDEC20
TTL_PHYS_READSTotal physical reads for this plan MSSTTLPHYSREADSDEC20
AVG_PHYS_READSAverage physical reads for this plan MSSAVGPHYSREADSDEC20
MAX_PHYS_READSMaximum number of physical reads for this plan MSSMAXPHYSREADSDEC20
MIN_PHYS_READSMinimum number of physical reads for this plan MSSMINPHYSREADSDEC20
LAST_PHYS_READSPhysical reads last time this plan executed MSSLASTPHYSREADSDEC20
TTL_LOG_WRITESTotal logical writes for this plan since compiled MSSTTLLOGWRITESDEC20
AVG_LOG_WRITESAverage logical writes for this plan since compiled MSSAVGLOGWRITESDEC20
MAX_LOG_WRITESMaximum logical writes for this plan for a single execution MSSMAXLOGWRITESDEC20
MIN_LOG_WRITESMinimum logical writes for this plan for a single execution MSSMINLOGWRITESDEC20
LAST_LOG_WRITESTotal logical writes for this plan since compiled MSSLASTLOGWRITESDEC20
WAIT_FACTORElapsed time/CPU time MSSWAITFACTORDEC20
EXECS_PER_HOURExecutions per hour MSSEXECSPHDEC16(3)
STMT_START_OFFSETStart statement offset MSSSTARTOFFSETINT410INT4
STMT_END_OFFSETStatement end offset MSSENDOFFSETINT410INT4
ABAP_NAMEName of the ABAP report MSSABNAMECHAR40PROGNAME
ABAP_LOCOffset of a Processing Control Block ABP_CONTINT410
PLAN_GEN_NUMNumber of times this plan has been recompiled MSSPLANGENNUMDEC20
CREATION_TIMEMS SQL Server time at which the plan was compiled. MSSPLANCRETIMECHAR20TEXT20
LAST_EXEC_TIMEMS SQL Server: Last time at which the plan was executed. MSSPLANEXECTIMECHAR20TEXT20
LINE_COLOR Color attributes of this entry0

Key field Non-key field



How do I retrieve data from SAP structure MSS_STMTHISTDET using ABAP code?

As MSS_STMTHISTDET is a database structure and not a table it does not store any data in the SAP data dictionary. The ABAP SELECT statement is therefore not appropriate and can not be performed on MSS_STMTHISTDET as there is no data to select.

How to access SAP table MSS_STMTHISTDET

Within an ECC or HANA version of SAP you can also view further information about MSS_STMTHISTDET and the data within it using relevant transactions such as

SE11 (ABAP Dictionary Maintenance)
SM30 (Maintain Table Data)
SE80 (Object Navigator)
SE16 (Data Browser).


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!