SAP OIRC_PRICE_CONVERSION Function Module for SSR Pricing - Convert price (currency, number of units, UoM)
OIRC_PRICE_CONVERSION is a standard oirc price 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 SSR Pricing - Convert price (currency, number of units, UoM) 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 oirc price conversion FM, simply by entering the name OIRC_PRICE_CONVERSION into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIRC_PRICE
Program Name: SAPLOIRC_PRICE
Main Program: SAPLOIRC_PRICE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIRC_PRICE_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 'OIRC_PRICE_CONVERSION'"SSR Pricing - Convert price (currency, number of units, UoM).
EXPORTING
I_DATE = "Transaction date
* I_MATNR = "Material Number
I_KBETR_ACTUAL = "Actual price
I_KONWA_ACTUAL = "Actual currency
I_KPEIN_ACTUAL = "Actual price pricing unit
I_KMEIN_ACTUAL = "Actual UoM
I_KONWA_TARGET = "Reference currency
I_KPEIN_TARGET = "Reference pricing unit
I_KMEIN_TARGET = "Reference UoM
IMPORTING
E_KBETR_TARGET = "Converted price
EXCEPTIONS
UOM_CONVERSION_ERROR = 1 CURRENCY_CONVERSION_ERROR = 2
IMPORTING Parameters details for OIRC_PRICE_CONVERSION
I_DATE - Transaction date
Data type: SYDATUMOptional: No
Call by Reference: Yes
I_MATNR - Material Number
Data type: MATNROptional: Yes
Call by Reference: Yes
I_KBETR_ACTUAL - Actual price
Data type: OIRC_KBETR_ACTUALOptional: No
Call by Reference: Yes
I_KONWA_ACTUAL - Actual currency
Data type: OIRC_KONWA_ACTUALOptional: No
Call by Reference: Yes
I_KPEIN_ACTUAL - Actual price pricing unit
Data type: OIRC_KPEIN_ACTUALOptional: No
Call by Reference: Yes
I_KMEIN_ACTUAL - Actual UoM
Data type: OIRC_KMEIN_ACTUALOptional: No
Call by Reference: Yes
I_KONWA_TARGET - Reference currency
Data type: OIRC_KONWA_TARGETOptional: No
Call by Reference: Yes
I_KPEIN_TARGET - Reference pricing unit
Data type: OIRC_KPEIN_TARGETOptional: No
Call by Reference: Yes
I_KMEIN_TARGET - Reference UoM
Data type: OIRC_KMEIN_TARGETOptional: No
Call by Reference: Yes
EXPORTING Parameters details for OIRC_PRICE_CONVERSION
E_KBETR_TARGET - Converted price
Data type: OIRC_KBETR_TARGETOptional: No
Call by Reference: Yes
EXCEPTIONS details
UOM_CONVERSION_ERROR - Error during unit of measure conversion
Data type:Optional: No
Call by Reference: Yes
CURRENCY_CONVERSION_ERROR - Error during currency conversion
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for OIRC_PRICE_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_date | TYPE SYDATUM, " | |||
| lv_e_kbetr_target | TYPE OIRC_KBETR_TARGET, " | |||
| lv_uom_conversion_error | TYPE OIRC_KBETR_TARGET, " | |||
| lv_i_matnr | TYPE MATNR, " | |||
| lv_currency_conversion_error | TYPE MATNR, " | |||
| lv_i_kbetr_actual | TYPE OIRC_KBETR_ACTUAL, " | |||
| lv_i_konwa_actual | TYPE OIRC_KONWA_ACTUAL, " | |||
| lv_i_kpein_actual | TYPE OIRC_KPEIN_ACTUAL, " | |||
| lv_i_kmein_actual | TYPE OIRC_KMEIN_ACTUAL, " | |||
| lv_i_konwa_target | TYPE OIRC_KONWA_TARGET, " | |||
| lv_i_kpein_target | TYPE OIRC_KPEIN_TARGET, " | |||
| lv_i_kmein_target | TYPE OIRC_KMEIN_TARGET. " |
|   CALL FUNCTION 'OIRC_PRICE_CONVERSION' "SSR Pricing - Convert price (currency, number of units, UoM) |
| EXPORTING | ||
| I_DATE | = lv_i_date | |
| I_MATNR | = lv_i_matnr | |
| I_KBETR_ACTUAL | = lv_i_kbetr_actual | |
| I_KONWA_ACTUAL | = lv_i_konwa_actual | |
| I_KPEIN_ACTUAL | = lv_i_kpein_actual | |
| I_KMEIN_ACTUAL | = lv_i_kmein_actual | |
| I_KONWA_TARGET | = lv_i_konwa_target | |
| I_KPEIN_TARGET | = lv_i_kpein_target | |
| I_KMEIN_TARGET | = lv_i_kmein_target | |
| IMPORTING | ||
| E_KBETR_TARGET | = lv_e_kbetr_target | |
| EXCEPTIONS | ||
| UOM_CONVERSION_ERROR = 1 | ||
| CURRENCY_CONVERSION_ERROR = 2 | ||
| . " OIRC_PRICE_CONVERSION | ||
ABAP code using 7.40 inline data declarations to call FM OIRC_PRICE_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.Search for further information about these or an SAP related objects