SAP OIC_FA_QUANTITY_CONVERSION Function Module for Quantity conversion interface of Formula & Average
OIC_FA_QUANTITY_CONVERSION is a standard oic fa quantity 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 Quantity conversion interface of Formula & Average 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 oic fa quantity conversion FM, simply by entering the name OIC_FA_QUANTITY_CONVERSION into the relevant SAP transaction such as SE37 or SE38.
Function Group: OICQ
Program Name: SAPLOICQ
Main Program: SAPLOICQ
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIC_FA_QUANTITY_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 'OIC_FA_QUANTITY_CONVERSION'"Quantity conversion interface of Formula & Average.
EXPORTING
I_FROM_QTY = "Quantity
I_FROM_UOM = "Sales unit
I_TO_UOM = "Sales unit
I_RATEBASED = "Indicator, if F&A calculation is performed rate based
I_QTY_KOMK = "Pricing Communications-Header
I_QTY_KOMP = "Pricing Communication Item
I_QTY_KOMV = "Pricing Communications-Condition Record
IMPORTING
E_TO_QTY = "Quantity
E_QTY_KOMV = "Pricing Communications-Condition Record
EXCEPTIONS
QUANTITY_CONVERSION_ERROR = 1
IMPORTING Parameters details for OIC_FA_QUANTITY_CONVERSION
I_FROM_QTY - Quantity
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
I_FROM_UOM - Sales unit
Data type: KOMP-VRKMEOptional: No
Call by Reference: No ( called with pass by value option)
I_TO_UOM - Sales unit
Data type: KOMP-VRKMEOptional: No
Call by Reference: No ( called with pass by value option)
I_RATEBASED - Indicator, if F&A calculation is performed rate based
Data type: OIC_RATEBASEDOptional: No
Call by Reference: No ( called with pass by value option)
I_QTY_KOMK - Pricing Communications-Header
Data type: KOMKOptional: No
Call by Reference: No ( called with pass by value option)
I_QTY_KOMP - Pricing Communication Item
Data type: KOMPOptional: No
Call by Reference: No ( called with pass by value option)
I_QTY_KOMV - Pricing Communications-Condition Record
Data type: KOMVOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for OIC_FA_QUANTITY_CONVERSION
E_TO_QTY - Quantity
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_QTY_KOMV - Pricing Communications-Condition Record
Data type: KOMVOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
QUANTITY_CONVERSION_ERROR - Quantity conversion fails
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for OIC_FA_QUANTITY_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_e_to_qty | TYPE STRING, " | |||
| lv_i_from_qty | TYPE STRING, " | |||
| lv_quantity_conversion_error | TYPE STRING, " | |||
| lv_e_qty_komv | TYPE KOMV, " | |||
| lv_i_from_uom | TYPE KOMP-VRKME, " | |||
| lv_i_to_uom | TYPE KOMP-VRKME, " | |||
| lv_i_ratebased | TYPE OIC_RATEBASED, " | |||
| lv_i_qty_komk | TYPE KOMK, " | |||
| lv_i_qty_komp | TYPE KOMP, " | |||
| lv_i_qty_komv | TYPE KOMV. " |
|   CALL FUNCTION 'OIC_FA_QUANTITY_CONVERSION' "Quantity conversion interface of Formula & Average |
| EXPORTING | ||
| I_FROM_QTY | = lv_i_from_qty | |
| I_FROM_UOM | = lv_i_from_uom | |
| I_TO_UOM | = lv_i_to_uom | |
| I_RATEBASED | = lv_i_ratebased | |
| I_QTY_KOMK | = lv_i_qty_komk | |
| I_QTY_KOMP | = lv_i_qty_komp | |
| I_QTY_KOMV | = lv_i_qty_komv | |
| IMPORTING | ||
| E_TO_QTY | = lv_e_to_qty | |
| E_QTY_KOMV | = lv_e_qty_komv | |
| EXCEPTIONS | ||
| QUANTITY_CONVERSION_ERROR = 1 | ||
| . " OIC_FA_QUANTITY_CONVERSION | ||
ABAP code using 7.40 inline data declarations to call FM OIC_FA_QUANTITY_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.| "SELECT single VRKME FROM KOMP INTO @DATA(ld_i_from_uom). | ||||
| "SELECT single VRKME FROM KOMP INTO @DATA(ld_i_to_uom). | ||||
Search for further information about these or an SAP related objects