SAP TRSPA_READ_FOR_AUTO_REVERSE Function Module for Selection of Registrations - Automatic Fixing
TRSPA_READ_FOR_AUTO_REVERSE is a standard trspa read for auto reverse SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Selection of Registrations - Automatic Fixing 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 trspa read for auto reverse FM, simply by entering the name TRSPA_READ_FOR_AUTO_REVERSE into the relevant SAP transaction such as SE37 or SE38.
Function Group: TRIA_CORE
Program Name: SAPLTRIA_CORE
Main Program: SAPLTRIA_CORE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TRSPA_READ_FOR_AUTO_REVERSE 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 'TRSPA_READ_FOR_AUTO_REVERSE'"Selection of Registrations - Automatic Fixing.
EXPORTING
IM_SPA_DATE_TO = "Security Price Fixing Date
IM_RANGE_COMCO = "Range Table for Company Code
* IM_RANGE_BEARER_ID = "Range Table for Security Price Adjustment Bearer ID
* IM_RANGE_BEARER_CAT = "Range Table for Security Price Adjustment Category
* IM_RANGE_SECURITY = "Range Table for Security ID Numbers
* IM_RANGE_EXCHANGE = "Range table type for Treasury Exchange
* IM_RANGE_PRICE_TYPE = "Range table type for Rate/Price Type - Treasury Instruments
IMPORTING
EX_TAB_BEARER = "Table of Security Price Ajustment Bearers
EXCEPTIONS
NO_REGISTRATIONS_FOUND = 1
IMPORTING Parameters details for TRSPA_READ_FOR_AUTO_REVERSE
IM_SPA_DATE_TO - Security Price Fixing Date
Data type: TB_SPA_DATEOptional: No
Call by Reference: Yes
IM_RANGE_COMCO - Range Table for Company Code
Data type: TRGR_COMPANY_CODEOptional: No
Call by Reference: Yes
IM_RANGE_BEARER_ID - Range Table for Security Price Adjustment Bearer ID
Data type: TRIAR_BEARER_IDOptional: Yes
Call by Reference: Yes
IM_RANGE_BEARER_CAT - Range Table for Security Price Adjustment Category
Data type: TRIAR_BEARER_CATOptional: Yes
Call by Reference: Yes
IM_RANGE_SECURITY - Range Table for Security ID Numbers
Data type: TRGR_SECURITY_IDOptional: Yes
Call by Reference: Yes
IM_RANGE_EXCHANGE - Range table type for Treasury Exchange
Data type: TRSPAR_EXCHANGEOptional: Yes
Call by Reference: Yes
IM_RANGE_PRICE_TYPE - Range table type for Rate/Price Type - Treasury Instruments
Data type: TRSPAR_PRICE_TYPEOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for TRSPA_READ_FOR_AUTO_REVERSE
EX_TAB_BEARER - Table of Security Price Ajustment Bearers
Data type: TRIAY_BEAREROptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_REGISTRATIONS_FOUND - Keine Registrierungen zur gewählten Selektion vorhanden
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TRSPA_READ_FOR_AUTO_REVERSE 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_ex_tab_bearer | TYPE TRIAY_BEARER, " | |||
| lv_im_spa_date_to | TYPE TB_SPA_DATE, " | |||
| lv_no_registrations_found | TYPE TB_SPA_DATE, " | |||
| lv_im_range_comco | TYPE TRGR_COMPANY_CODE, " | |||
| lv_im_range_bearer_id | TYPE TRIAR_BEARER_ID, " | |||
| lv_im_range_bearer_cat | TYPE TRIAR_BEARER_CAT, " | |||
| lv_im_range_security | TYPE TRGR_SECURITY_ID, " | |||
| lv_im_range_exchange | TYPE TRSPAR_EXCHANGE, " | |||
| lv_im_range_price_type | TYPE TRSPAR_PRICE_TYPE. " |
|   CALL FUNCTION 'TRSPA_READ_FOR_AUTO_REVERSE' "Selection of Registrations - Automatic Fixing |
| EXPORTING | ||
| IM_SPA_DATE_TO | = lv_im_spa_date_to | |
| IM_RANGE_COMCO | = lv_im_range_comco | |
| IM_RANGE_BEARER_ID | = lv_im_range_bearer_id | |
| IM_RANGE_BEARER_CAT | = lv_im_range_bearer_cat | |
| IM_RANGE_SECURITY | = lv_im_range_security | |
| IM_RANGE_EXCHANGE | = lv_im_range_exchange | |
| IM_RANGE_PRICE_TYPE | = lv_im_range_price_type | |
| IMPORTING | ||
| EX_TAB_BEARER | = lv_ex_tab_bearer | |
| EXCEPTIONS | ||
| NO_REGISTRATIONS_FOUND = 1 | ||
| . " TRSPA_READ_FOR_AUTO_REVERSE | ||
ABAP code using 7.40 inline data declarations to call FM TRSPA_READ_FOR_AUTO_REVERSE
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