SAP BAPI_EXCHANGERATE_GETDETAIL Function Module for Exchange Rate Stored for Exch.Rate Type, Currency Pair, Value Date
BAPI_EXCHANGERATE_GETDETAIL is a standard bapi exchangerate getdetail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Exchange Rate Stored for Exch.Rate Type, Currency Pair, Value Date 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 bapi exchangerate getdetail FM, simply by entering the name BAPI_EXCHANGERATE_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.
Function Group: BUS1093
Program Name: SAPLBUS1093
Main Program: SAPLBUS1093
Appliation area: F
Release date: 11-Oct-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_EXCHANGERATE_GETDETAIL 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 'BAPI_EXCHANGERATE_GETDETAIL'"Exchange Rate Stored for Exch.Rate Type, Currency Pair, Value Date.
EXPORTING
RATE_TYPE = "Exchange Rate Type
FROM_CURR = "From Currency
TO_CURRNCY = "To Currency
DATE = "Value Date
IMPORTING
EXCH_RATE = "Exchange Rate, Factors for Currency Pair
RETURN = "Error Message
IMPORTING Parameters details for BAPI_EXCHANGERATE_GETDETAIL
RATE_TYPE - Exchange Rate Type
Data type: BAPI1093_1-RATE_TYPEOptional: No
Call by Reference: No ( called with pass by value option)
FROM_CURR - From Currency
Data type: BAPI1093_1-FROM_CURROptional: No
Call by Reference: No ( called with pass by value option)
TO_CURRNCY - To Currency
Data type: BAPI1093_1-TO_CURRNCYOptional: No
Call by Reference: No ( called with pass by value option)
DATE - Value Date
Data type: BAPI1093_2-TRANS_DATEOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_EXCHANGERATE_GETDETAIL
EXCH_RATE - Exchange Rate, Factors for Currency Pair
Data type: BAPI1093_0Optional: No
Call by Reference: No ( called with pass by value option)
RETURN - Error Message
Data type: BAPIRET1Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_EXCHANGERATE_GETDETAIL 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_exch_rate | TYPE BAPI1093_0, " | |||
| lv_rate_type | TYPE BAPI1093_1-RATE_TYPE, " | |||
| lv_return | TYPE BAPIRET1, " | |||
| lv_from_curr | TYPE BAPI1093_1-FROM_CURR, " | |||
| lv_to_currncy | TYPE BAPI1093_1-TO_CURRNCY, " | |||
| lv_date | TYPE BAPI1093_2-TRANS_DATE. " |
|   CALL FUNCTION 'BAPI_EXCHANGERATE_GETDETAIL' "Exchange Rate Stored for Exch.Rate Type, Currency Pair, Value Date |
| EXPORTING | ||
| RATE_TYPE | = lv_rate_type | |
| FROM_CURR | = lv_from_curr | |
| TO_CURRNCY | = lv_to_currncy | |
| DATE | = lv_date | |
| IMPORTING | ||
| EXCH_RATE | = lv_exch_rate | |
| RETURN | = lv_return | |
| . " BAPI_EXCHANGERATE_GETDETAIL | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_EXCHANGERATE_GETDETAIL
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 RATE_TYPE FROM BAPI1093_1 INTO @DATA(ld_rate_type). | ||||
| "SELECT single FROM_CURR FROM BAPI1093_1 INTO @DATA(ld_from_curr). | ||||
| "SELECT single TO_CURRNCY FROM BAPI1093_1 INTO @DATA(ld_to_currncy). | ||||
| "SELECT single TRANS_DATE FROM BAPI1093_2 INTO @DATA(ld_date). | ||||
Search for further information about these or an SAP related objects