SAP CMS_API_CURR_CONV Function Module for Performs currency conversion
CMS_API_CURR_CONV is a standard cms api curr conv SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Performs currency conversion 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 cms api curr conv FM, simply by entering the name CMS_API_CURR_CONV into the relevant SAP transaction such as SE37 or SE38.
Function Group: CMS_API_CURR
Program Name: SAPLCMS_API_CURR
Main Program: SAPLCMS_API_CURR
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CMS_API_CURR_CONV 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 'CMS_API_CURR_CONV'"Performs currency conversion.
EXPORTING
I_ORIGINAL_CURR = "Currency conversion details
I_ORIGINAL_AMT = "Original amount that is to be converted.
I_RESULT_CURR = "Result currency for converting Original amount.
* I_RATE_TYPE = 'M' "Default:'M' Avg Rate.Exchange Rate type for currency conversion
* I_CONV_DATE = SY-DATUM "Date and Time, Current (Application Server) Date
IMPORTING
E_CONV_AMT = "Amount converted to result currency.
E_RATE = "Exchange Rate
E_TAB_RC = "Return Code and corresponding Message
IMPORTING Parameters details for CMS_API_CURR_CONV
I_ORIGINAL_CURR - Currency conversion details
Data type: CMS_DTE_ORIGINAL_CURROptional: No
Call by Reference: No ( called with pass by value option)
I_ORIGINAL_AMT - Original amount that is to be converted.
Data type: CMS_DTE_ORIGINAL_AMTOptional: No
Call by Reference: No ( called with pass by value option)
I_RESULT_CURR - Result currency for converting Original amount.
Data type: CMS_DTE_RESULT_CURROptional: No
Call by Reference: No ( called with pass by value option)
I_RATE_TYPE - Default:'M' Avg Rate.Exchange Rate type for currency conversion
Data type: CMS_DTE_RATE_TYPEDefault: 'M'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CONV_DATE - Date and Time, Current (Application Server) Date
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CMS_API_CURR_CONV
E_CONV_AMT - Amount converted to result currency.
Data type: CMS_DTE_CONV_AMTOptional: No
Call by Reference: No ( called with pass by value option)
E_RATE - Exchange Rate
Data type: UKURS_CURROptional: No
Call by Reference: No ( called with pass by value option)
E_TAB_RC - Return Code and corresponding Message
Data type: CMS_TAB_MSG_COL_MESSAGEOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CMS_API_CURR_CONV 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_conv_amt | TYPE CMS_DTE_CONV_AMT, " | |||
| lv_i_original_curr | TYPE CMS_DTE_ORIGINAL_CURR, " | |||
| lv_e_rate | TYPE UKURS_CURR, " | |||
| lv_i_original_amt | TYPE CMS_DTE_ORIGINAL_AMT, " | |||
| lv_e_tab_rc | TYPE CMS_TAB_MSG_COL_MESSAGE, " | |||
| lv_i_result_curr | TYPE CMS_DTE_RESULT_CURR, " | |||
| lv_i_rate_type | TYPE CMS_DTE_RATE_TYPE, " 'M' | |||
| lv_i_conv_date | TYPE SY-DATUM. " SY-DATUM |
|   CALL FUNCTION 'CMS_API_CURR_CONV' "Performs currency conversion |
| EXPORTING | ||
| I_ORIGINAL_CURR | = lv_i_original_curr | |
| I_ORIGINAL_AMT | = lv_i_original_amt | |
| I_RESULT_CURR | = lv_i_result_curr | |
| I_RATE_TYPE | = lv_i_rate_type | |
| I_CONV_DATE | = lv_i_conv_date | |
| IMPORTING | ||
| E_CONV_AMT | = lv_e_conv_amt | |
| E_RATE | = lv_e_rate | |
| E_TAB_RC | = lv_e_tab_rc | |
| . " CMS_API_CURR_CONV | ||
ABAP code using 7.40 inline data declarations to call FM CMS_API_CURR_CONV
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.| DATA(ld_i_rate_type) | = 'M'. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_i_conv_date). | ||||
| DATA(ld_i_conv_date) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects