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

Function RM_PROT_CURRENCY_CONVERSION 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 'RM_PROT_CURRENCY_CONVERSION'"Log currency conversion.
EXPORTING
* I_LINES = 0 "
* I_HEADER = ' ' "
I_TYPE = "
* I_PRICE_FROM = "Commodity Price
* I_PRICE_FROM_DECX = "
I_CURRENCY_FROM = "Currency of cash flow
* I_PRICE_TO = "Commodity Price
* I_PRICE_TO_DECX = "
I_CURRENCY_TO = "Currency of cash flow
I_RATE = "Bid rate
IMPORTING Parameters details for RM_PROT_CURRENCY_CONVERSION
I_LINES -
Data type: IOptional: Yes
Call by Reference: Yes
I_HEADER -
Data type: ABAP_BOOLDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_TYPE -
Data type: COptional: No
Call by Reference: Yes
I_PRICE_FROM - Commodity Price
Data type: VTVFGCF-BCWHROptional: Yes
Call by Reference: Yes
I_PRICE_FROM_DECX -
Data type: ANYOptional: Yes
Call by Reference: Yes
I_CURRENCY_FROM - Currency of cash flow
Data type: VTVFGCF-SCWHROptional: No
Call by Reference: Yes
I_PRICE_TO - Commodity Price
Data type: VTVFGCF-BCWHROptional: Yes
Call by Reference: Yes
I_PRICE_TO_DECX -
Data type: ANYOptional: Yes
Call by Reference: Yes
I_CURRENCY_TO - Currency of cash flow
Data type: VTVFGCF-SCWHROptional: No
Call by Reference: Yes
I_RATE - Bid rate
Data type: VTVSZCURR-GUKURSOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for RM_PROT_CURRENCY_CONVERSION 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_lines | TYPE I, " 0 | |||
| lv_i_header | TYPE ABAP_BOOL, " SPACE | |||
| lv_i_type | TYPE C, " | |||
| lv_i_price_from | TYPE VTVFGCF-BCWHR, " | |||
| lv_i_price_from_decx | TYPE ANY, " | |||
| lv_i_currency_from | TYPE VTVFGCF-SCWHR, " | |||
| lv_i_price_to | TYPE VTVFGCF-BCWHR, " | |||
| lv_i_price_to_decx | TYPE ANY, " | |||
| lv_i_currency_to | TYPE VTVFGCF-SCWHR, " | |||
| lv_i_rate | TYPE VTVSZCURR-GUKURS. " |
|   CALL FUNCTION 'RM_PROT_CURRENCY_CONVERSION' "Log currency conversion |
| EXPORTING | ||
| I_LINES | = lv_i_lines | |
| I_HEADER | = lv_i_header | |
| I_TYPE | = lv_i_type | |
| I_PRICE_FROM | = lv_i_price_from | |
| I_PRICE_FROM_DECX | = lv_i_price_from_decx | |
| I_CURRENCY_FROM | = lv_i_currency_from | |
| I_PRICE_TO | = lv_i_price_to | |
| I_PRICE_TO_DECX | = lv_i_price_to_decx | |
| I_CURRENCY_TO | = lv_i_currency_to | |
| I_RATE | = lv_i_rate | |
| . " RM_PROT_CURRENCY_CONVERSION | ||
ABAP code using 7.40 inline data declarations to call FM RM_PROT_CURRENCY_CONVERSION
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_header) | = ' '. | |||
| "SELECT single BCWHR FROM VTVFGCF INTO @DATA(ld_i_price_from). | ||||
| "SELECT single SCWHR FROM VTVFGCF INTO @DATA(ld_i_currency_from). | ||||
| "SELECT single BCWHR FROM VTVFGCF INTO @DATA(ld_i_price_to). | ||||
| "SELECT single SCWHR FROM VTVFGCF INTO @DATA(ld_i_currency_to). | ||||
| "SELECT single GUKURS FROM VTVSZCURR INTO @DATA(ld_i_rate). | ||||
Search for further information about these or an SAP related objects