SAP /SDF/E2E_ENABLE_TRACE Function Module for Enable Trace
/SDF/E2E_ENABLE_TRACE is a standard /sdf/e2e enable trace SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Enable Trace processing and below is the pattern details for this FM, 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 /sdf/e2e enable trace FM, simply by entering the name /SDF/E2E_ENABLE_TRACE into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SDF/SMD_E2E_TRACE
Program Name: /SDF/SAPLSMD_E2E_TRACE
Main Program: /SDF/SAPLSMD_E2E_TRACE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function /SDF/E2E_ENABLE_TRACE 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 '/SDF/E2E_ENABLE_TRACE'"Enable Trace.
EXPORTING
* SET = ' ' "Single-character flag
* READ = 'X' "Single-character flag
* CONFIGSTRING = "
* ESP_TRC_LEVEL = "
* SPLIT_ATRA_FILES = ' ' "Single-character flag
IMPORTING
RETURN = "Return Parameter
PARAM_VALUE = "Character 100
CURR_ESP_TRC_LEVEL = "
EXCEPTIONS
NOT_AUTHORIZED = 1 NOT_CHANGEABLE = 2 NOT_FOUND = 3 INVALID_VALUE = 4 SHMPRF_ERROR = 5 UNKNOWN_OPCODE = 6 LENGTH_EXCEEDED = 7 JOB_ERROR = 8
IMPORTING Parameters details for /SDF/E2E_ENABLE_TRACE
SET - Single-character flag
Data type: CHAR1Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ - Single-character flag
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONFIGSTRING -
Data type: STRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
ESP_TRC_LEVEL -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
SPLIT_ATRA_FILES - Single-character flag
Data type: CHAR1Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for /SDF/E2E_ENABLE_TRACE
RETURN - Return Parameter
Data type: BAPIRETURNOptional: No
Call by Reference: No ( called with pass by value option)
PARAM_VALUE - Character 100
Data type: CHAR100Optional: No
Call by Reference: No ( called with pass by value option)
CURR_ESP_TRC_LEVEL -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_AUTHORIZED -
Data type:Optional: No
Call by Reference: Yes
NOT_CHANGEABLE -
Data type:Optional: No
Call by Reference: Yes
NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
INVALID_VALUE -
Data type:Optional: No
Call by Reference: Yes
SHMPRF_ERROR -
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_OPCODE -
Data type:Optional: No
Call by Reference: Yes
LENGTH_EXCEEDED -
Data type:Optional: No
Call by Reference: Yes
JOB_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for /SDF/E2E_ENABLE_TRACE 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_set | TYPE CHAR1, " ' ' | |||
| lv_return | TYPE BAPIRETURN, " | |||
| lv_not_authorized | TYPE BAPIRETURN, " | |||
| lv_read | TYPE CHAR1, " 'X' | |||
| lv_param_value | TYPE CHAR100, " | |||
| lv_not_changeable | TYPE CHAR100, " | |||
| lv_not_found | TYPE CHAR100, " | |||
| lv_configstring | TYPE STRING, " | |||
| lv_curr_esp_trc_level | TYPE I, " | |||
| lv_esp_trc_level | TYPE I, " | |||
| lv_invalid_value | TYPE I, " | |||
| lv_shmprf_error | TYPE I, " | |||
| lv_split_atra_files | TYPE CHAR1, " ' ' | |||
| lv_unknown_opcode | TYPE CHAR1, " | |||
| lv_length_exceeded | TYPE CHAR1, " | |||
| lv_job_error | TYPE CHAR1. " |
|   CALL FUNCTION '/SDF/E2E_ENABLE_TRACE' "Enable Trace |
| EXPORTING | ||
| SET | = lv_set | |
| READ | = lv_read | |
| CONFIGSTRING | = lv_configstring | |
| ESP_TRC_LEVEL | = lv_esp_trc_level | |
| SPLIT_ATRA_FILES | = lv_split_atra_files | |
| IMPORTING | ||
| RETURN | = lv_return | |
| PARAM_VALUE | = lv_param_value | |
| CURR_ESP_TRC_LEVEL | = lv_curr_esp_trc_level | |
| EXCEPTIONS | ||
| NOT_AUTHORIZED = 1 | ||
| NOT_CHANGEABLE = 2 | ||
| NOT_FOUND = 3 | ||
| INVALID_VALUE = 4 | ||
| SHMPRF_ERROR = 5 | ||
| UNKNOWN_OPCODE = 6 | ||
| LENGTH_EXCEEDED = 7 | ||
| JOB_ERROR = 8 | ||
| . " /SDF/E2E_ENABLE_TRACE | ||
ABAP code using 7.40 inline data declarations to call FM /SDF/E2E_ENABLE_TRACE
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.| DATA(ld_set) | = ' '. | |||
| DATA(ld_read) | = 'X'. | |||
| DATA(ld_split_atra_files) | = ' '. | |||
Search for further information about these or an SAP related objects