SAP PERFORMANCE_TRACE_ON Function Module for
PERFORMANCE_TRACE_ON is a standard performance trace on SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for performance trace on FM, simply by entering the name PERFORMANCE_TRACE_ON into the relevant SAP transaction such as SE37 or SE38.
Function Group: SSQ0
Program Name: SAPLSSQ0
Main Program: SAPLSSQ0
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function PERFORMANCE_TRACE_ON pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'PERFORMANCE_TRACE_ON'".
EXPORTING
* CLIENT = ' ' "Client
* TAB_INC = "
* TAB_EXC = "
* USE_TRACE_EXCEPTIONS = 'X' "
* TRACE_USER = SY-UNAME "Trace fuer Nutzer oder Muster einschalten
* SQL_TRACE_ON = 'X' "SQL-Trace einschalten
* ENQ_TRACE_ON = ' ' "Enqueue-Trace einschalten
* RFC_TRACE_ON = ' ' "RFC-Trace einschalten
* BUF_TRACE_ON = ' ' "Table-Buffer-Trace einschalten
* PROC_NR = ' ' "
* TCODE = ' ' "
* PROGNAME = ' ' "
IMPORTING
LAST_MOD_DAT = "Field of Type DATS
LAST_MOD_TIME = "Field of type TIMS
SQL_TRACE_ALREADY_ON = "
RFC_TRACE_ALREADY_ON = "
ENQ_TRACE_ALREADY_ON = "
BUF_TRACE_ALREADY_ON = "
ST01_TRACE_ALREADY_ON = "
ACT_TRACE_USER = "
EXCEPTIONS
NO_TRACE_SELECTED = 1 ERROR_TRACE_ON = 2 TRACE_ON_FOR_ALL = 3 TRACE_ON_FOR_USER = 4 SQL_TRACE_ON = 5 RFC_TRACE_ON = 6 ENQUEUE_TRACE_ON = 7 BUFFER_TRACE_ON = 8 ERROR_ONLY_PROGNAM_OR_TCODE = 9
IMPORTING Parameters details for PERFORMANCE_TRACE_ON
CLIENT - Client
Data type: SY-MANDTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TAB_INC -
Data type: TABLIMITOptional: Yes
Call by Reference: No ( called with pass by value option)
TAB_EXC -
Data type: TABLIMITOptional: Yes
Call by Reference: No ( called with pass by value option)
USE_TRACE_EXCEPTIONS -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TRACE_USER - Trace fuer Nutzer oder Muster einschalten
Data type: SY-UNAMEDefault: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)
SQL_TRACE_ON - SQL-Trace einschalten
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENQ_TRACE_ON - Enqueue-Trace einschalten
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RFC_TRACE_ON - RFC-Trace einschalten
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
BUF_TRACE_ON - Table-Buffer-Trace einschalten
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PROC_NR -
Data type: CHAR3Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TCODE -
Data type: RSTRFTCODEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PROGNAME -
Data type: RSTRFPROGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for PERFORMANCE_TRACE_ON
LAST_MOD_DAT - Field of Type DATS
Data type: DATSOptional: No
Call by Reference: No ( called with pass by value option)
LAST_MOD_TIME - Field of type TIMS
Data type: TIMSOptional: No
Call by Reference: No ( called with pass by value option)
SQL_TRACE_ALREADY_ON -
Data type: CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
RFC_TRACE_ALREADY_ON -
Data type: CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
ENQ_TRACE_ALREADY_ON -
Data type: CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
BUF_TRACE_ALREADY_ON -
Data type: CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
ST01_TRACE_ALREADY_ON -
Data type: CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
ACT_TRACE_USER -
Data type: SQLTPATTEROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_TRACE_SELECTED - Keinen Trace zum Einschalten ausgewählt
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_TRACE_ON -
Data type:Optional: No
Call by Reference: Yes
TRACE_ON_FOR_ALL -
Data type:Optional: No
Call by Reference: Yes
TRACE_ON_FOR_USER -
Data type:Optional: No
Call by Reference: Yes
SQL_TRACE_ON - SQL-Trace einschalten
Data type:Optional: No
Call by Reference: Yes
RFC_TRACE_ON - RFC-Trace einschalten
Data type:Optional: No
Call by Reference: Yes
ENQUEUE_TRACE_ON -
Data type:Optional: No
Call by Reference: Yes
BUFFER_TRACE_ON -
Data type:Optional: No
Call by Reference: Yes
ERROR_ONLY_PROGNAM_OR_TCODE -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for PERFORMANCE_TRACE_ON Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_client | TYPE SY-MANDT, " SPACE | |||
| lv_last_mod_dat | TYPE DATS, " | |||
| lv_no_trace_selected | TYPE DATS, " | |||
| lv_tab_inc | TYPE TABLIMIT, " | |||
| lv_tab_exc | TYPE TABLIMIT, " | |||
| lv_use_trace_exceptions | TYPE CHAR1, " 'X' | |||
| lv_trace_user | TYPE SY-UNAME, " SY-UNAME | |||
| lv_last_mod_time | TYPE TIMS, " | |||
| lv_error_trace_on | TYPE TIMS, " | |||
| lv_sql_trace_on | TYPE CHAR1, " 'X' | |||
| lv_trace_on_for_all | TYPE CHAR1, " | |||
| lv_sql_trace_already_on | TYPE CHAR1, " | |||
| lv_enq_trace_on | TYPE CHAR1, " SPACE | |||
| lv_trace_on_for_user | TYPE CHAR1, " | |||
| lv_rfc_trace_already_on | TYPE CHAR1, " | |||
| lv_rfc_trace_on | TYPE CHAR1, " SPACE | |||
| lv_sql_trace_on | TYPE CHAR1, " | |||
| lv_enq_trace_already_on | TYPE CHAR1, " | |||
| lv_buf_trace_on | TYPE CHAR1, " SPACE | |||
| lv_rfc_trace_on | TYPE CHAR1, " | |||
| lv_buf_trace_already_on | TYPE CHAR1, " | |||
| lv_proc_nr | TYPE CHAR3, " SPACE | |||
| lv_enqueue_trace_on | TYPE CHAR3, " | |||
| lv_st01_trace_already_on | TYPE CHAR1, " | |||
| lv_tcode | TYPE RSTRFTCODE, " SPACE | |||
| lv_act_trace_user | TYPE SQLTPATTER, " | |||
| lv_buffer_trace_on | TYPE SQLTPATTER, " | |||
| lv_progname | TYPE RSTRFPROG, " SPACE | |||
| lv_error_only_prognam_or_tcode | TYPE RSTRFPROG. " |
|   CALL FUNCTION 'PERFORMANCE_TRACE_ON' " |
| EXPORTING | ||
| CLIENT | = lv_client | |
| TAB_INC | = lv_tab_inc | |
| TAB_EXC | = lv_tab_exc | |
| USE_TRACE_EXCEPTIONS | = lv_use_trace_exceptions | |
| TRACE_USER | = lv_trace_user | |
| SQL_TRACE_ON | = lv_sql_trace_on | |
| ENQ_TRACE_ON | = lv_enq_trace_on | |
| RFC_TRACE_ON | = lv_rfc_trace_on | |
| BUF_TRACE_ON | = lv_buf_trace_on | |
| PROC_NR | = lv_proc_nr | |
| TCODE | = lv_tcode | |
| PROGNAME | = lv_progname | |
| IMPORTING | ||
| LAST_MOD_DAT | = lv_last_mod_dat | |
| LAST_MOD_TIME | = lv_last_mod_time | |
| SQL_TRACE_ALREADY_ON | = lv_sql_trace_already_on | |
| RFC_TRACE_ALREADY_ON | = lv_rfc_trace_already_on | |
| ENQ_TRACE_ALREADY_ON | = lv_enq_trace_already_on | |
| BUF_TRACE_ALREADY_ON | = lv_buf_trace_already_on | |
| ST01_TRACE_ALREADY_ON | = lv_st01_trace_already_on | |
| ACT_TRACE_USER | = lv_act_trace_user | |
| EXCEPTIONS | ||
| NO_TRACE_SELECTED = 1 | ||
| ERROR_TRACE_ON = 2 | ||
| TRACE_ON_FOR_ALL = 3 | ||
| TRACE_ON_FOR_USER = 4 | ||
| SQL_TRACE_ON = 5 | ||
| RFC_TRACE_ON = 6 | ||
| ENQUEUE_TRACE_ON = 7 | ||
| BUFFER_TRACE_ON = 8 | ||
| ERROR_ONLY_PROGNAM_OR_TCODE = 9 | ||
| . " PERFORMANCE_TRACE_ON | ||
ABAP code using 7.40 inline data declarations to call FM PERFORMANCE_TRACE_ON
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single MANDT FROM SY INTO @DATA(ld_client). | ||||
| DATA(ld_client) | = ' '. | |||
| DATA(ld_use_trace_exceptions) | = 'X'. | |||
| "SELECT single UNAME FROM SY INTO @DATA(ld_trace_user). | ||||
| DATA(ld_trace_user) | = SY-UNAME. | |||
| DATA(ld_sql_trace_on) | = 'X'. | |||
| DATA(ld_enq_trace_on) | = ' '. | |||
| DATA(ld_rfc_trace_on) | = ' '. | |||
| DATA(ld_buf_trace_on) | = ' '. | |||
| DATA(ld_proc_nr) | = ' '. | |||
| DATA(ld_tcode) | = ' '. | |||
| DATA(ld_progname) | = ' '. | |||
Search for further information about these or an SAP related objects