SAP OIB_QCI_CONVERSION_SIMPLE Function Module for Function module to convert a quantity between two units of measure









OIB_QCI_CONVERSION_SIMPLE is a standard oib qci conversion simple SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Function module to convert a quantity between two units of measure 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 oib qci conversion simple FM, simply by entering the name OIB_QCI_CONVERSION_SIMPLE into the relevant SAP transaction such as SE37 or SE38.

Function Group: OIB_QCI
Program Name: SAPLOIB_QCI
Main Program: SAPLOIB_QCI
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function OIB_QCI_CONVERSION_SIMPLE 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 'OIB_QCI_CONVERSION_SIMPLE'"Function module to convert a quantity between two units of measure
EXPORTING
* I_CONVERSIONGROUP = "Oil conversion group
I_UOM = "Unit of measurement
I_QUANTITY = "Additional oil/gas quantity
I_TARGETUOM = "Unit of measurement
* I_PARAMETERS = "HPM Import/export for Quantity Conversion (OIB1, OIB_QCI)
* I_MATERIAL = "Material number
* I_PLANT = "Plant
* I_BATCH = "Batch number
* I_STANDARDCALC = "Indicator for standard calculation

IMPORTING
E_QUANTITY = "Additional oil/gas quantity
E_QUANTITY_PACKED = "Additional oil quantity (packed format)

TABLES
* IT_PARAMETERS = "Structure for external applications (QCI_SIMPLE)
* T_RETURN = "Return parameter

EXCEPTIONS
CALCULATION_FAILURE = 1 INCONSISTENT_DATA = 2 INCONSISTENT_CUSTOMIZING = 3 TRANS_UOM_NOT_FOUND = 4
.



IMPORTING Parameters details for OIB_QCI_CONVERSION_SIMPLE

I_CONVERSIONGROUP - Oil conversion group

Data type: OIB01-UMRSL
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_UOM - Unit of measurement

Data type: OIB_A05-MSEHI
Optional: No
Call by Reference: No ( called with pass by value option)

I_QUANTITY - Additional oil/gas quantity

Data type: OIB_A05-ADQNT
Optional: No
Call by Reference: No ( called with pass by value option)

I_TARGETUOM - Unit of measurement

Data type: OIB_A05-MSEHI
Optional: No
Call by Reference: No ( called with pass by value option)

I_PARAMETERS - HPM Import/export for Quantity Conversion (OIB1, OIB_QCI)

Data type: OIB_A04
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MATERIAL - Material number

Data type: MATNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PLANT - Plant

Data type: WERKS_D
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BATCH - Batch number

Data type: MCHA-CHARG
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_STANDARDCALC - Indicator for standard calculation

Data type: OIB_STANDARD
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for OIB_QCI_CONVERSION_SIMPLE

E_QUANTITY - Additional oil/gas quantity

Data type: OIB_A05-ADQNT
Optional: No
Call by Reference: No ( called with pass by value option)

E_QUANTITY_PACKED - Additional oil quantity (packed format)

Data type: OIB_A05-ADQNTP
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for OIB_QCI_CONVERSION_SIMPLE

IT_PARAMETERS - Structure for external applications (QCI_SIMPLE)

Data type: OIB_READING_PAR
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_RETURN - Return parameter

Data type: BAPIRET2
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

CALCULATION_FAILURE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INCONSISTENT_DATA -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INCONSISTENT_CUSTOMIZING -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TRANS_UOM_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for OIB_QCI_CONVERSION_SIMPLE 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_quantity  TYPE OIB_A05-ADQNT, "   
lt_it_parameters  TYPE STANDARD TABLE OF OIB_READING_PAR, "   
lv_i_conversiongroup  TYPE OIB01-UMRSL, "   
lv_calculation_failure  TYPE OIB01, "   
lv_i_uom  TYPE OIB_A05-MSEHI, "   
lt_t_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_e_quantity_packed  TYPE OIB_A05-ADQNTP, "   
lv_inconsistent_data  TYPE OIB_A05, "   
lv_i_quantity  TYPE OIB_A05-ADQNT, "   
lv_inconsistent_customizing  TYPE OIB_A05, "   
lv_i_targetuom  TYPE OIB_A05-MSEHI, "   
lv_trans_uom_not_found  TYPE OIB_A05, "   
lv_i_parameters  TYPE OIB_A04, "   
lv_i_material  TYPE MATNR, "   
lv_i_plant  TYPE WERKS_D, "   
lv_i_batch  TYPE MCHA-CHARG, "   
lv_i_standardcalc  TYPE OIB_STANDARD. "   

  CALL FUNCTION 'OIB_QCI_CONVERSION_SIMPLE'  "Function module to convert a quantity between two units of measure
    EXPORTING
         I_CONVERSIONGROUP = lv_i_conversiongroup
         I_UOM = lv_i_uom
         I_QUANTITY = lv_i_quantity
         I_TARGETUOM = lv_i_targetuom
         I_PARAMETERS = lv_i_parameters
         I_MATERIAL = lv_i_material
         I_PLANT = lv_i_plant
         I_BATCH = lv_i_batch
         I_STANDARDCALC = lv_i_standardcalc
    IMPORTING
         E_QUANTITY = lv_e_quantity
         E_QUANTITY_PACKED = lv_e_quantity_packed
    TABLES
         IT_PARAMETERS = lt_it_parameters
         T_RETURN = lt_t_return
    EXCEPTIONS
        CALCULATION_FAILURE = 1
        INCONSISTENT_DATA = 2
        INCONSISTENT_CUSTOMIZING = 3
        TRANS_UOM_NOT_FOUND = 4
. " OIB_QCI_CONVERSION_SIMPLE




ABAP code using 7.40 inline data declarations to call FM OIB_QCI_CONVERSION_SIMPLE

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 ADQNT FROM OIB_A05 INTO @DATA(ld_e_quantity).
 
 
"SELECT single UMRSL FROM OIB01 INTO @DATA(ld_i_conversiongroup).
 
 
"SELECT single MSEHI FROM OIB_A05 INTO @DATA(ld_i_uom).
 
 
"SELECT single ADQNTP FROM OIB_A05 INTO @DATA(ld_e_quantity_packed).
 
 
"SELECT single ADQNT FROM OIB_A05 INTO @DATA(ld_i_quantity).
 
 
"SELECT single MSEHI FROM OIB_A05 INTO @DATA(ld_i_targetuom).
 
 
 
 
 
"SELECT single CHARG FROM MCHA INTO @DATA(ld_i_batch).
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!