SAP /SAPTRX/EVENT_DATA_SETUP Function Module for Setup of event data
/SAPTRX/EVENT_DATA_SETUP is a standard /saptrx/event data setup SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Setup of event data 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 /saptrx/event data setup FM, simply by entering the name /SAPTRX/EVENT_DATA_SETUP into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SAPTRX/ASC2
Program Name: /SAPTRX/SAPLASC2
Main Program: /SAPTRX/SAPLASC2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /SAPTRX/EVENT_DATA_SETUP 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 '/SAPTRX/EVENT_DATA_SETUP'"Setup of event data.
EXPORTING
I_APPSYS = "Logical System ID of an Application System
I_ALL_APPL_TABLES = "Container with references to all tables passed by the application
I_EVENT_TYPE_CNTL_TABS = "Control tables and nametabs for all event types
I_EVENTS = "Control WA and nametabs for all event types
CHANGING
C_EVENTID_MAP = "Mapping between ctab and BAPI header entries
TABLES
I_EVENT_TYPES = "Event Types
* CT_TRACKCONFIRMSTATUS = "Confirmation Status table for event message input.
* CT_TRACKNEXTEVENT = "Next Event table for event message input
* CT_TRACKNEXTEVDEADLINES = "Next Event Deadlines table for event message input
* CT_TRACKREFERENCES = "Further Reference table for event message input.
* CT_TRACKMEASURESULTS = "Measurement Results table for event message input
* CT_TRACKSTATUSATTRIB = "Status Attribute Structure
* CT_TRACKPARAMETERS = "BAPI structure for Event Handler control parameters
* CT_TRACKFILEHEADER = "Attached file: header table.
* CT_TRACKFILEREF = "File reference
* CT_TRACKFILEBIN = "Contents of a binary file
CT_TRACKINGHEADER = "Bapi for message input: message Header
* CT_TRACKFILECHAR = "Contents of a text file
* CT_TRACKTEXTHEADER = "Text Header table for event message input
* CT_TRACKTEXTLINES = "Event message table for event message input
* CT_TRACKEEMODIFY = "Modification to Expected Event List
* CT_EXTENSIONIN = "Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
* CT_EXTENSIONOUT = "Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
* CT_TRACKLOCATION = "Location table for event message input
* CT_TRACKADDRESS = "Event message Location / Partner Address
* CT_TRACKLOCATIONDESCR = "Location description table for event message input
* CT_TRACKLOCADDITIONALID = "Location Additional Identifier table for event message input
* CT_TRACKPARTNERID = "Partner Header table for event message input
* CT_TRACKPARTNERADDID = "Partner Additional Identifier table for event message input
* CT_TRACKESTIMDEADLINE = "Estimated Deadline table for event message input.
EXCEPTIONS
PARAMETER_ERROR = 1 EVENT_DATA_ERROR = 2
IMPORTING Parameters details for /SAPTRX/EVENT_DATA_SETUP
I_APPSYS - Logical System ID of an Application System
Data type: /SAPTRX/APPLSYSTEMOptional: No
Call by Reference: Yes
I_ALL_APPL_TABLES - Container with references to all tables passed by the application
Data type: TRXAS_TABCONTAINEROptional: No
Call by Reference: Yes
I_EVENT_TYPE_CNTL_TABS - Control tables and nametabs for all event types
Data type: TRXAS_EVENTTYPE_TABSOptional: No
Call by Reference: Yes
I_EVENTS - Control WA and nametabs for all event types
Data type: TRXAS_EVT_CTABSOptional: No
Call by Reference: Yes
CHANGING Parameters details for /SAPTRX/EVENT_DATA_SETUP
C_EVENTID_MAP - Mapping between ctab and BAPI header entries
Data type: TRXAS_EVTID_EVTCNT_MAPOptional: No
Call by Reference: Yes
TABLES Parameters details for /SAPTRX/EVENT_DATA_SETUP
I_EVENT_TYPES - Event Types
Data type: /SAPTRX/EVTYPESOptional: No
Call by Reference: Yes
CT_TRACKCONFIRMSTATUS - Confirmation Status table for event message input.
Data type: /SAPTRX/BAPI_EVM_CONFSTATOptional: Yes
Call by Reference: Yes
CT_TRACKNEXTEVENT - Next Event table for event message input
Data type: /SAPTRX/BAPI_EVM_NEXTEVENTOptional: Yes
Call by Reference: Yes
CT_TRACKNEXTEVDEADLINES - Next Event Deadlines table for event message input
Data type: /SAPTRX/BAPI_EVM_NEXTEVDEADLOptional: Yes
Call by Reference: Yes
CT_TRACKREFERENCES - Further Reference table for event message input.
Data type: /SAPTRX/BAPI_EVM_REFERENCEOptional: Yes
Call by Reference: Yes
CT_TRACKMEASURESULTS - Measurement Results table for event message input
Data type: /SAPTRX/BAPI_EVM_MEASRESULTOptional: Yes
Call by Reference: Yes
CT_TRACKSTATUSATTRIB - Status Attribute Structure
Data type: /SAPTRX/BAPI_EVM_STATUSATTROptional: Yes
Call by Reference: Yes
CT_TRACKPARAMETERS - BAPI structure for Event Handler control parameters
Data type: /SAPTRX/BAPI_EVM_PARAMETERSOptional: Yes
Call by Reference: Yes
CT_TRACKFILEHEADER - Attached file: header table.
Data type: /SAPTRX/BAPI_EVM_FILEHEADEROptional: Yes
Call by Reference: Yes
CT_TRACKFILEREF - File reference
Data type: /SAPTRX/BAPI_EVM_FILEREFOptional: Yes
Call by Reference: Yes
CT_TRACKFILEBIN - Contents of a binary file
Data type: /SAPTRX/BAPI_EVM_FILEBINOptional: Yes
Call by Reference: Yes
CT_TRACKINGHEADER - Bapi for message input: message Header
Data type: /SAPTRX/BAPI_EVM_HEADEROptional: No
Call by Reference: Yes
CT_TRACKFILECHAR - Contents of a text file
Data type: /SAPTRX/BAPI_EVM_FILECHAROptional: Yes
Call by Reference: Yes
CT_TRACKTEXTHEADER - Text Header table for event message input
Data type: /SAPTRX/BAPI_EVM_TEXTHEADEROptional: Yes
Call by Reference: Yes
CT_TRACKTEXTLINES - Event message table for event message input
Data type: /SAPTRX/BAPI_EVM_TEXTLINESOptional: Yes
Call by Reference: Yes
CT_TRACKEEMODIFY - Modification to Expected Event List
Data type: /SAPTRX/BAPI_EVM_EE_MODIFYOptional: Yes
Call by Reference: Yes
CT_EXTENSIONIN - Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
CT_EXTENSIONOUT - Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
CT_TRACKLOCATION - Location table for event message input
Data type: /SAPTRX/BAPI_EVM_LOCATIONIDOptional: Yes
Call by Reference: Yes
CT_TRACKADDRESS - Event message Location / Partner Address
Data type: /SAPTRX/BAPI_EVM_ADDRESSOptional: Yes
Call by Reference: Yes
CT_TRACKLOCATIONDESCR - Location description table for event message input
Data type: /SAPTRX/BAPI_EVM_LOCDESCROptional: Yes
Call by Reference: Yes
CT_TRACKLOCADDITIONALID - Location Additional Identifier table for event message input
Data type: /SAPTRX/BAPI_EVM_LOCADDIDOptional: Yes
Call by Reference: Yes
CT_TRACKPARTNERID - Partner Header table for event message input
Data type: /SAPTRX/BAPI_EVM_PARTNERIDOptional: Yes
Call by Reference: Yes
CT_TRACKPARTNERADDID - Partner Additional Identifier table for event message input
Data type: /SAPTRX/BAPI_EVM_PARTNERADDIDOptional: Yes
Call by Reference: Yes
CT_TRACKESTIMDEADLINE - Estimated Deadline table for event message input.
Data type: /SAPTRX/BAPI_EVM_ESTIMDEADLOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
PARAMETER_ERROR - Error in Parameters
Data type:Optional: No
Call by Reference: Yes
EVENT_DATA_ERROR - event data could not be determined
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for /SAPTRX/EVENT_DATA_SETUP 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_i_appsys | TYPE /SAPTRX/APPLSYSTEM, " | |||
| lv_c_eventid_map | TYPE TRXAS_EVTID_EVTCNT_MAP, " | |||
| lt_i_event_types | TYPE STANDARD TABLE OF /SAPTRX/EVTYPES, " | |||
| lv_parameter_error | TYPE /SAPTRX/EVTYPES, " | |||
| lt_ct_trackconfirmstatus | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_CONFSTAT, " | |||
| lt_ct_tracknextevent | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_NEXTEVENT, " | |||
| lt_ct_tracknextevdeadlines | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_NEXTEVDEADL, " | |||
| lt_ct_trackreferences | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_REFERENCE, " | |||
| lt_ct_trackmeasuresults | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_MEASRESULT, " | |||
| lt_ct_trackstatusattrib | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_STATUSATTR, " | |||
| lt_ct_trackparameters | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_PARAMETERS, " | |||
| lt_ct_trackfileheader | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_FILEHEADER, " | |||
| lt_ct_trackfileref | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_FILEREF, " | |||
| lt_ct_trackfilebin | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_FILEBIN, " | |||
| lv_event_data_error | TYPE /SAPTRX/BAPI_EVM_FILEBIN, " | |||
| lt_ct_trackingheader | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_HEADER, " | |||
| lv_i_all_appl_tables | TYPE TRXAS_TABCONTAINER, " | |||
| lt_ct_trackfilechar | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_FILECHAR, " | |||
| lt_ct_tracktextheader | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_TEXTHEADER, " | |||
| lt_ct_tracktextlines | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_TEXTLINES, " | |||
| lt_ct_trackeemodify | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_EE_MODIFY, " | |||
| lt_ct_extensionin | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_ct_extensionout | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_ct_tracklocation | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_LOCATIONID, " | |||
| lv_i_event_type_cntl_tabs | TYPE TRXAS_EVENTTYPE_TABS, " | |||
| lv_i_events | TYPE TRXAS_EVT_CTABS, " | |||
| lt_ct_trackaddress | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_ADDRESS, " | |||
| lt_ct_tracklocationdescr | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_LOCDESCR, " | |||
| lt_ct_tracklocadditionalid | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_LOCADDID, " | |||
| lt_ct_trackpartnerid | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_PARTNERID, " | |||
| lt_ct_trackpartneraddid | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_PARTNERADDID, " | |||
| lt_ct_trackestimdeadline | TYPE STANDARD TABLE OF /SAPTRX/BAPI_EVM_ESTIMDEADL. " |
|   CALL FUNCTION '/SAPTRX/EVENT_DATA_SETUP' "Setup of event data |
| EXPORTING | ||
| I_APPSYS | = lv_i_appsys | |
| I_ALL_APPL_TABLES | = lv_i_all_appl_tables | |
| I_EVENT_TYPE_CNTL_TABS | = lv_i_event_type_cntl_tabs | |
| I_EVENTS | = lv_i_events | |
| CHANGING | ||
| C_EVENTID_MAP | = lv_c_eventid_map | |
| TABLES | ||
| I_EVENT_TYPES | = lt_i_event_types | |
| CT_TRACKCONFIRMSTATUS | = lt_ct_trackconfirmstatus | |
| CT_TRACKNEXTEVENT | = lt_ct_tracknextevent | |
| CT_TRACKNEXTEVDEADLINES | = lt_ct_tracknextevdeadlines | |
| CT_TRACKREFERENCES | = lt_ct_trackreferences | |
| CT_TRACKMEASURESULTS | = lt_ct_trackmeasuresults | |
| CT_TRACKSTATUSATTRIB | = lt_ct_trackstatusattrib | |
| CT_TRACKPARAMETERS | = lt_ct_trackparameters | |
| CT_TRACKFILEHEADER | = lt_ct_trackfileheader | |
| CT_TRACKFILEREF | = lt_ct_trackfileref | |
| CT_TRACKFILEBIN | = lt_ct_trackfilebin | |
| CT_TRACKINGHEADER | = lt_ct_trackingheader | |
| CT_TRACKFILECHAR | = lt_ct_trackfilechar | |
| CT_TRACKTEXTHEADER | = lt_ct_tracktextheader | |
| CT_TRACKTEXTLINES | = lt_ct_tracktextlines | |
| CT_TRACKEEMODIFY | = lt_ct_trackeemodify | |
| CT_EXTENSIONIN | = lt_ct_extensionin | |
| CT_EXTENSIONOUT | = lt_ct_extensionout | |
| CT_TRACKLOCATION | = lt_ct_tracklocation | |
| CT_TRACKADDRESS | = lt_ct_trackaddress | |
| CT_TRACKLOCATIONDESCR | = lt_ct_tracklocationdescr | |
| CT_TRACKLOCADDITIONALID | = lt_ct_tracklocadditionalid | |
| CT_TRACKPARTNERID | = lt_ct_trackpartnerid | |
| CT_TRACKPARTNERADDID | = lt_ct_trackpartneraddid | |
| CT_TRACKESTIMDEADLINE | = lt_ct_trackestimdeadline | |
| EXCEPTIONS | ||
| PARAMETER_ERROR = 1 | ||
| EVENT_DATA_ERROR = 2 | ||
| . " /SAPTRX/EVENT_DATA_SETUP | ||
ABAP code using 7.40 inline data declarations to call FM /SAPTRX/EVENT_DATA_SETUP
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.Search for further information about these or an SAP related objects