SAP EC_TRACE_OFF Function Module for
EC_TRACE_OFF is a standard ec trace off 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 ec trace off FM, simply by entering the name EC_TRACE_OFF into the relevant SAP transaction such as SE37 or SE38.
Function Group: PERF_TRA_ADD
Program Name: SAPLPERF_TRA_ADD
Main Program: SAPLPERF_TRA_ADD
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function EC_TRACE_OFF 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 'EC_TRACE_OFF'".
EXPORTING
* P_USER = SY-UNAME "
* P_SQL_TRACE_OFF = 'X' "
* P_ENQ_TRACE_OFF = ' ' "
* P_RFC_TRACE_OFF = ' ' "
* P_BUF_TRACE_OFF = ' ' "
P_START_KDATE = "
P_START_KTIME = "
* P_WAIT = 'X' "
IMPORTING
P_END_KDATE = "
P_END_KTIME = "
P_WAIT_COUNTER = "
EXCEPTIONS
NO_TRACE_SELECTED = 1 ERROR_TRACE_OFF = 2 SQL_TRACE_OFF = 3 RFC_TRACE_OFF = 4 ENQUEUE_TRACE_OFF = 5 BUFFER_TRACE_OFF = 6 ERROR_MOD_USER = 7 TIME_ERROR = 8 UNKNOWN_ERROR_TRACE_OFF = 9
IMPORTING Parameters details for EC_TRACE_OFF
P_USER -
Data type: SY-UNAMEDefault: SY-UNAME
Optional: No
Call by Reference: No ( called with pass by value option)
P_SQL_TRACE_OFF -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
P_ENQ_TRACE_OFF -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
P_RFC_TRACE_OFF -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
P_BUF_TRACE_OFF -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
P_START_KDATE -
Data type: DATSOptional: No
Call by Reference: No ( called with pass by value option)
P_START_KTIME -
Data type: TIMSOptional: No
Call by Reference: No ( called with pass by value option)
P_WAIT -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EC_TRACE_OFF
P_END_KDATE -
Data type: DATSOptional: No
Call by Reference: No ( called with pass by value option)
P_END_KTIME -
Data type: TIMSOptional: No
Call by Reference: No ( called with pass by value option)
P_WAIT_COUNTER -
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_TRACE_SELECTED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_TRACE_OFF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SQL_TRACE_OFF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RFC_TRACE_OFF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ENQUEUE_TRACE_OFF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BUFFER_TRACE_OFF -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_MOD_USER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TIME_ERROR -
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_ERROR_TRACE_OFF -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for EC_TRACE_OFF 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_p_user | TYPE SY-UNAME, " SY-UNAME | |||
| lv_p_end_kdate | TYPE DATS, " | |||
| lv_no_trace_selected | TYPE DATS, " | |||
| lv_p_end_ktime | TYPE TIMS, " | |||
| lv_error_trace_off | TYPE TIMS, " | |||
| lv_p_sql_trace_off | TYPE CHAR1, " 'X' | |||
| lv_sql_trace_off | TYPE CHAR1, " | |||
| lv_p_wait_counter | TYPE SY-TABIX, " | |||
| lv_p_enq_trace_off | TYPE CHAR1, " SPACE | |||
| lv_rfc_trace_off | TYPE CHAR1, " | |||
| lv_p_rfc_trace_off | TYPE CHAR1, " SPACE | |||
| lv_p_buf_trace_off | TYPE CHAR1, " SPACE | |||
| lv_enqueue_trace_off | TYPE CHAR1, " | |||
| lv_p_start_kdate | TYPE DATS, " | |||
| lv_buffer_trace_off | TYPE DATS, " | |||
| lv_p_start_ktime | TYPE TIMS, " | |||
| lv_error_mod_user | TYPE TIMS, " | |||
| lv_p_wait | TYPE CHAR1, " 'X' | |||
| lv_time_error | TYPE CHAR1, " | |||
| lv_unknown_error_trace_off | TYPE CHAR1. " |
|   CALL FUNCTION 'EC_TRACE_OFF' " |
| EXPORTING | ||
| P_USER | = lv_p_user | |
| P_SQL_TRACE_OFF | = lv_p_sql_trace_off | |
| P_ENQ_TRACE_OFF | = lv_p_enq_trace_off | |
| P_RFC_TRACE_OFF | = lv_p_rfc_trace_off | |
| P_BUF_TRACE_OFF | = lv_p_buf_trace_off | |
| P_START_KDATE | = lv_p_start_kdate | |
| P_START_KTIME | = lv_p_start_ktime | |
| P_WAIT | = lv_p_wait | |
| IMPORTING | ||
| P_END_KDATE | = lv_p_end_kdate | |
| P_END_KTIME | = lv_p_end_ktime | |
| P_WAIT_COUNTER | = lv_p_wait_counter | |
| EXCEPTIONS | ||
| NO_TRACE_SELECTED = 1 | ||
| ERROR_TRACE_OFF = 2 | ||
| SQL_TRACE_OFF = 3 | ||
| RFC_TRACE_OFF = 4 | ||
| ENQUEUE_TRACE_OFF = 5 | ||
| BUFFER_TRACE_OFF = 6 | ||
| ERROR_MOD_USER = 7 | ||
| TIME_ERROR = 8 | ||
| UNKNOWN_ERROR_TRACE_OFF = 9 | ||
| . " EC_TRACE_OFF | ||
ABAP code using 7.40 inline data declarations to call FM EC_TRACE_OFF
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 UNAME FROM SY INTO @DATA(ld_p_user). | ||||
| DATA(ld_p_user) | = SY-UNAME. | |||
| DATA(ld_p_sql_trace_off) | = 'X'. | |||
| "SELECT single TABIX FROM SY INTO @DATA(ld_p_wait_counter). | ||||
| DATA(ld_p_enq_trace_off) | = ' '. | |||
| DATA(ld_p_rfc_trace_off) | = ' '. | |||
| DATA(ld_p_buf_trace_off) | = ' '. | |||
| DATA(ld_p_wait) | = 'X'. | |||
Search for further information about these or an SAP related objects