SAP Function Modules

EC_TRACE_PERF SAP Function module







EC_TRACE_PERF is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name EC_TRACE_PERF into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PERF_TRA_ADD
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM EC_TRACE_PERF - EC TRACE PERF





CALL FUNCTION 'EC_TRACE_PERF' "
  EXPORTING
    p_block_name =              " etcmd_obj
    p_user = SY-UNAME           " sy-uname
*   p_sql_trace_on = 'X'        " char1
*   p_enq_trace_on = SPACE      " char1
*   p_rfc_trace_on = SPACE      " char1
*   p_buf_trace_on = SPACE      " char1
*   p_wait = 'X'                " char1
  IMPORTING
    p_start_kdate =             " dats
    p_start_ktime =             " tims
  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  "
    NO_AUTHORITY = 10           "
    UNKNOWN_ERROR_TRACE_ON = 11  "
    .  "  EC_TRACE_PERF

ABAP code example for Function Module EC_TRACE_PERF





The ABAP code below is a full code listing to execute function module EC_TRACE_PERF including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_p_start_kdate  TYPE DATS ,
ld_p_start_ktime  TYPE TIMS .

DATA(ld_p_block_name) = 'Check type of data required'.
DATA(ld_p_user) = 'some text here'.
DATA(ld_p_sql_trace_on) = 'some text here'.
DATA(ld_p_enq_trace_on) = 'some text here'.
DATA(ld_p_rfc_trace_on) = 'some text here'.
DATA(ld_p_buf_trace_on) = 'some text here'.
DATA(ld_p_wait) = 'some text here'. . CALL FUNCTION 'EC_TRACE_PERF' EXPORTING p_block_name = ld_p_block_name p_user = ld_p_user * p_sql_trace_on = ld_p_sql_trace_on * p_enq_trace_on = ld_p_enq_trace_on * p_rfc_trace_on = ld_p_rfc_trace_on * p_buf_trace_on = ld_p_buf_trace_on * p_wait = ld_p_wait IMPORTING p_start_kdate = ld_p_start_kdate p_start_ktime = ld_p_start_ktime 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 NO_AUTHORITY = 10 UNKNOWN_ERROR_TRACE_ON = 11 . " EC_TRACE_PERF
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 11. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_p_start_kdate  TYPE DATS ,
ld_p_block_name  TYPE ETCMD_OBJ ,
ld_p_start_ktime  TYPE TIMS ,
ld_p_user  TYPE SY-UNAME ,
ld_p_sql_trace_on  TYPE CHAR1 ,
ld_p_enq_trace_on  TYPE CHAR1 ,
ld_p_rfc_trace_on  TYPE CHAR1 ,
ld_p_buf_trace_on  TYPE CHAR1 ,
ld_p_wait  TYPE CHAR1 .

ld_p_block_name = 'some text here'.
ld_p_user = 'some text here'.
ld_p_sql_trace_on = 'some text here'.
ld_p_enq_trace_on = 'some text here'.
ld_p_rfc_trace_on = 'some text here'.
ld_p_buf_trace_on = 'some text here'.
ld_p_wait = 'some text here'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name EC_TRACE_PERF or its description.