SAP TREX_EXT_GET_ALERT_STATUS Function Module for Get the Alert Monitor Check Results









TREX_EXT_GET_ALERT_STATUS is a standard trex ext get alert status SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get the Alert Monitor Check Results 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 trex ext get alert status FM, simply by entering the name TREX_EXT_GET_ALERT_STATUS into the relevant SAP transaction such as SE37 or SE38.

Function Group: TREX_EXT_ADMINISTRATION
Program Name: SAPLTREX_EXT_ADMINISTRATION
Main Program: SAPLTREX_EXT_ADMINISTRATION
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TREX_EXT_GET_ALERT_STATUS 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 'TREX_EXT_GET_ALERT_STATUS'"Get the Alert Monitor Check Results
EXPORTING
I_RFC_DESTINATION = "RFC destination to TREX engine
* I_MINIMUM_DATE = "
* I_MINIMUM_STATE = 0 "Return all checks that have this status or worse
* I_SHOW_CURRENT = '1' "1: also return current results
* I_SHOW_HISTORY = '1' "1: also return history results

IMPORTING
E_RETURN_CODE = "Return Code
E_HISTORY_DETAIL_FORMAT = "Line structure of a alert monitor check details line
E_HISTORY_DETAILS = "Details for Alert Monitor Results
E_RETURN_TEXT = "Return Text
E_CURRENT_RESULT = "Result of Alert Monitor Tests
E_CURRENT_DETAIL_FORMAT = "Line structure of a alert monitor check details line
E_CURRENT_DETAILS = "Details for Alert Monitor Results
E_SUMMARY_RESULT = "Result of Alert Monitor Tests
E_SUMMARY_DETAIL_FORMAT = "Line structure of a alert monitor check details line
E_SUMMARY_DETAILS = "Details for Alert Monitor Results
E_HISTORY_RESULT = "Result of Alert Monitor Tests

EXCEPTIONS
CONVERSION_ERROR = 1 ERROR = 2
.



IMPORTING Parameters details for TREX_EXT_GET_ALERT_STATUS

I_RFC_DESTINATION - RFC destination to TREX engine

Data type: TREX_RFC-RFC_DESTINATION
Optional: No
Call by Reference: Yes

I_MINIMUM_DATE -

Data type: TREX_RFC-TIME_STAMP
Optional: Yes
Call by Reference: Yes

I_MINIMUM_STATE - Return all checks that have this status or worse

Data type: TREXD_ALERT_STATUS
Optional: Yes
Call by Reference: Yes

I_SHOW_CURRENT - 1: also return current results

Data type: TREX_RFC-FLAG
Default: '1'
Optional: Yes
Call by Reference: Yes

I_SHOW_HISTORY - 1: also return history results

Data type: TREX_RFC-FLAG
Default: '1'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for TREX_EXT_GET_ALERT_STATUS

E_RETURN_CODE - Return Code

Data type: TREX_RFC-RETURN_CODE
Optional: No
Call by Reference: Yes

E_HISTORY_DETAIL_FORMAT - Line structure of a alert monitor check details line

Data type: TREXT_DETAIL_FORMAT
Optional: No
Call by Reference: Yes

E_HISTORY_DETAILS - Details for Alert Monitor Results

Data type: TREXT_ALERT_DETAILS
Optional: No
Call by Reference: Yes

E_RETURN_TEXT - Return Text

Data type: TREX_RFC-RETURN_TEXT
Optional: No
Call by Reference: Yes

E_CURRENT_RESULT - Result of Alert Monitor Tests

Data type: TREXT_ALERT_STATUS
Optional: No
Call by Reference: Yes

E_CURRENT_DETAIL_FORMAT - Line structure of a alert monitor check details line

Data type: TREXT_DETAIL_FORMAT
Optional: No
Call by Reference: Yes

E_CURRENT_DETAILS - Details for Alert Monitor Results

Data type: TREXT_ALERT_DETAILS
Optional: No
Call by Reference: Yes

E_SUMMARY_RESULT - Result of Alert Monitor Tests

Data type: TREXT_ALERT_STATUS
Optional: No
Call by Reference: Yes

E_SUMMARY_DETAIL_FORMAT - Line structure of a alert monitor check details line

Data type: TREXT_DETAIL_FORMAT
Optional: No
Call by Reference: Yes

E_SUMMARY_DETAILS - Details for Alert Monitor Results

Data type: TREXT_ALERT_DETAILS
Optional: No
Call by Reference: Yes

E_HISTORY_RESULT - Result of Alert Monitor Tests

Data type: TREXT_ALERT_STATUS
Optional: No
Call by Reference: Yes

EXCEPTIONS details

CONVERSION_ERROR - Error during conversion from/to UTF8

Data type:
Optional: No
Call by Reference: Yes

ERROR - Error, see error message

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TREX_EXT_GET_ALERT_STATUS 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_e_return_code  TYPE TREX_RFC-RETURN_CODE, "   
lv_conversion_error  TYPE TREX_RFC, "   
lv_i_rfc_destination  TYPE TREX_RFC-RFC_DESTINATION, "   
lv_e_history_detail_format  TYPE TREXT_DETAIL_FORMAT, "   
lv_e_history_details  TYPE TREXT_ALERT_DETAILS, "   
lv_error  TYPE TREXT_ALERT_DETAILS, "   
lv_e_return_text  TYPE TREX_RFC-RETURN_TEXT, "   
lv_i_minimum_date  TYPE TREX_RFC-TIME_STAMP, "   
lv_i_minimum_state  TYPE TREXD_ALERT_STATUS, "   0
lv_e_current_result  TYPE TREXT_ALERT_STATUS, "   
lv_i_show_current  TYPE TREX_RFC-FLAG, "   '1'
lv_e_current_detail_format  TYPE TREXT_DETAIL_FORMAT, "   
lv_i_show_history  TYPE TREX_RFC-FLAG, "   '1'
lv_e_current_details  TYPE TREXT_ALERT_DETAILS, "   
lv_e_summary_result  TYPE TREXT_ALERT_STATUS, "   
lv_e_summary_detail_format  TYPE TREXT_DETAIL_FORMAT, "   
lv_e_summary_details  TYPE TREXT_ALERT_DETAILS, "   
lv_e_history_result  TYPE TREXT_ALERT_STATUS. "   

  CALL FUNCTION 'TREX_EXT_GET_ALERT_STATUS'  "Get the Alert Monitor Check Results
    EXPORTING
         I_RFC_DESTINATION = lv_i_rfc_destination
         I_MINIMUM_DATE = lv_i_minimum_date
         I_MINIMUM_STATE = lv_i_minimum_state
         I_SHOW_CURRENT = lv_i_show_current
         I_SHOW_HISTORY = lv_i_show_history
    IMPORTING
         E_RETURN_CODE = lv_e_return_code
         E_HISTORY_DETAIL_FORMAT = lv_e_history_detail_format
         E_HISTORY_DETAILS = lv_e_history_details
         E_RETURN_TEXT = lv_e_return_text
         E_CURRENT_RESULT = lv_e_current_result
         E_CURRENT_DETAIL_FORMAT = lv_e_current_detail_format
         E_CURRENT_DETAILS = lv_e_current_details
         E_SUMMARY_RESULT = lv_e_summary_result
         E_SUMMARY_DETAIL_FORMAT = lv_e_summary_detail_format
         E_SUMMARY_DETAILS = lv_e_summary_details
         E_HISTORY_RESULT = lv_e_history_result
    EXCEPTIONS
        CONVERSION_ERROR = 1
        ERROR = 2
. " TREX_EXT_GET_ALERT_STATUS




ABAP code using 7.40 inline data declarations to call FM TREX_EXT_GET_ALERT_STATUS

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 RETURN_CODE FROM TREX_RFC INTO @DATA(ld_e_return_code).
 
 
"SELECT single RFC_DESTINATION FROM TREX_RFC INTO @DATA(ld_i_rfc_destination).
 
 
 
 
"SELECT single RETURN_TEXT FROM TREX_RFC INTO @DATA(ld_e_return_text).
 
"SELECT single TIME_STAMP FROM TREX_RFC INTO @DATA(ld_i_minimum_date).
 
 
 
"SELECT single FLAG FROM TREX_RFC INTO @DATA(ld_i_show_current).
DATA(ld_i_show_current) = '1'.
 
 
"SELECT single FLAG FROM TREX_RFC INTO @DATA(ld_i_show_history).
DATA(ld_i_show_history) = '1'.
 
 
 
 
 
 


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!