SAP ANST_TESTING_AGENT_UTRACE_ON Function Module for User Trace









ANST_TESTING_AGENT_UTRACE_ON is a standard anst testing agent utrace on SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for User 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 anst testing agent utrace on FM, simply by entering the name ANST_TESTING_AGENT_UTRACE_ON into the relevant SAP transaction such as SE37 or SE38.

Function Group: ANST_SEARCH_TRACES
Program Name: SAPLANST_SEARCH_TRACES
Main Program: SAPLANST_SEARCH_TRACES
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function ANST_TESTING_AGENT_UTRACE_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 'ANST_TESTING_AGENT_UTRACE_ON'"User Trace
EXPORTING
* IV_UREQ_SUSER = SY-UNAME "Benutzer, der die zu vermessenden Anwendung startet
* IV_UREQ_CLIENT = SY-MANDT "Nummer des externen Modus (siehe SM04)
* IV_UREQ_IRUNS = 50 "Natürliche Zahl
* IV_ALL_SERVERS = "Trace auf allen Servern einplanen
* IV_ATRA_OBJECT_NAME = "Atra Trace Object Name
* IV_ACTIVATE_TABLE_TRACE = "Tabellentrace aktivieren?
* IT_TABLE_TYPES = "Types of table to be traced

IMPORTING
ET_REQ_IDS = "Tabellentyp zu E2ET_s_SERVER_REQID
EV_RETURN_CODE = "Rückgabewert, Rückgabewert nach ABAP-Anweisungen

EXCEPTIONS
ANST_TA_REL_NOT_SUPPORTED = 1 ANST_TA_ERROR = 2
.



IMPORTING Parameters details for ANST_TESTING_AGENT_UTRACE_ON

IV_UREQ_SUSER - Benutzer, der die zu vermessenden Anwendung startet

Data type: SY-UNAME
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_UREQ_CLIENT - Nummer des externen Modus (siehe SM04)

Data type: MANDT
Default: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_UREQ_IRUNS - Natürliche Zahl

Data type: INT4
Default: 50
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ALL_SERVERS - Trace auf allen Servern einplanen

Data type: FLAG
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ATRA_OBJECT_NAME - Atra Trace Object Name

Data type: CHAR40
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ACTIVATE_TABLE_TRACE - Tabellentrace aktivieren?

Data type: FLAG
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_TABLE_TYPES - Types of table to be traced

Data type: VALUEKEYS
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for ANST_TESTING_AGENT_UTRACE_ON

ET_REQ_IDS - Tabellentyp zu E2ET_s_SERVER_REQID

Data type: ANST_T_SERVER_REQID
Optional: No
Call by Reference: No ( called with pass by value option)

EV_RETURN_CODE - Rückgabewert, Rückgabewert nach ABAP-Anweisungen

Data type: SY-SUBRC
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ANST_TA_REL_NOT_SUPPORTED - Funktionalität nicht untertützt in diesem Release

Data type:
Optional: No
Call by Reference: Yes

ANST_TA_ERROR - Allgemeiner Fehler

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ANST_TESTING_AGENT_UTRACE_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_et_req_ids  TYPE ANST_T_SERVER_REQID, "   
lv_iv_ureq_suser  TYPE SY-UNAME, "   SY-UNAME
lv_anst_ta_rel_not_supported  TYPE SY, "   
lv_anst_ta_error  TYPE SY, "   
lv_ev_return_code  TYPE SY-SUBRC, "   
lv_iv_ureq_client  TYPE MANDT, "   SY-MANDT
lv_iv_ureq_iruns  TYPE INT4, "   50
lv_iv_all_servers  TYPE FLAG, "   
lv_iv_atra_object_name  TYPE CHAR40, "   
lv_iv_activate_table_trace  TYPE FLAG, "   
lv_it_table_types  TYPE VALUEKEYS. "   

  CALL FUNCTION 'ANST_TESTING_AGENT_UTRACE_ON'  "User Trace
    EXPORTING
         IV_UREQ_SUSER = lv_iv_ureq_suser
         IV_UREQ_CLIENT = lv_iv_ureq_client
         IV_UREQ_IRUNS = lv_iv_ureq_iruns
         IV_ALL_SERVERS = lv_iv_all_servers
         IV_ATRA_OBJECT_NAME = lv_iv_atra_object_name
         IV_ACTIVATE_TABLE_TRACE = lv_iv_activate_table_trace
         IT_TABLE_TYPES = lv_it_table_types
    IMPORTING
         ET_REQ_IDS = lv_et_req_ids
         EV_RETURN_CODE = lv_ev_return_code
    EXCEPTIONS
        ANST_TA_REL_NOT_SUPPORTED = 1
        ANST_TA_ERROR = 2
. " ANST_TESTING_AGENT_UTRACE_ON




ABAP code using 7.40 inline data declarations to call FM ANST_TESTING_AGENT_UTRACE_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 UNAME FROM SY INTO @DATA(ld_iv_ureq_suser).
DATA(ld_iv_ureq_suser) = SY-UNAME.
 
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_ev_return_code).
 
DATA(ld_iv_ureq_client) = SY-MANDT.
 
DATA(ld_iv_ureq_iruns) = 50.
 
 
 
 
 


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!