SAP OIJB_CONVERT_QUANTITIES Function Module for OIL-TSW: Convert quantities (Non HPM conversion)









OIJB_CONVERT_QUANTITIES is a standard oijb convert quantities SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for OIL-TSW: Convert quantities (Non HPM 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 oijb convert quantities FM, simply by entering the name OIJB_CONVERT_QUANTITIES into the relevant SAP transaction such as SE37 or SE38.

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



Function OIJB_CONVERT_QUANTITIES 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 'OIJB_CONVERT_QUANTITIES'"OIL-TSW: Convert quantities (Non HPM conversion)
EXPORTING
I_MATNR = "
I_UNIT_1 = "
* I_MENGE_1 = 0 "
I_UNIT_2 = "

IMPORTING
E_MENGE_2 = "

EXCEPTIONS
CONVERSION_NOT_FOUND = 1 INPUT_INVALID = 2 MATERIAL_NOT_FOUND = 3 MEINH_NOT_FOUND = 4 MEINS_MISSING = 5 NO_MEINH = 6 OUTPUT_INVALID = 7 OVERFLOW = 8 OTHERS = 9
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLOIJB_001 TSW: user exits for customer
EXIT_SAPLOIJB_002 TSW: user exits for customer handling of mvmt scenairo
EXIT_SAPLOIJB_003 TSW : User exits to do Rebrands

IMPORTING Parameters details for OIJB_CONVERT_QUANTITIES

I_MATNR -

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

I_UNIT_1 -

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

I_MENGE_1 -

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

I_UNIT_2 -

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

EXPORTING Parameters details for OIJB_CONVERT_QUANTITIES

E_MENGE_2 -

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

EXCEPTIONS details

CONVERSION_NOT_FOUND -

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

INPUT_INVALID -

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

MATERIAL_NOT_FOUND -

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

MEINH_NOT_FOUND -

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

MEINS_MISSING -

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

NO_MEINH -

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

OUTPUT_INVALID -

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

OVERFLOW -

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

OTHERS -

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

Copy and paste ABAP code example for OIJB_CONVERT_QUANTITIES 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_matnr  TYPE MARA-MATNR, "   
lv_e_menge_2  TYPE MSEG-MENGE, "   
lv_conversion_not_found  TYPE MSEG, "   
lv_i_unit_1  TYPE MSEG-MEINS, "   
lv_input_invalid  TYPE MSEG, "   
lv_i_menge_1  TYPE MSEG-MENGE, "   0
lv_material_not_found  TYPE MSEG, "   
lv_i_unit_2  TYPE MSEG-MEINS, "   
lv_meinh_not_found  TYPE MSEG, "   
lv_meins_missing  TYPE MSEG, "   
lv_no_meinh  TYPE MSEG, "   
lv_output_invalid  TYPE MSEG, "   
lv_overflow  TYPE MSEG, "   
lv_others  TYPE MSEG. "   

  CALL FUNCTION 'OIJB_CONVERT_QUANTITIES'  "OIL-TSW: Convert quantities (Non HPM conversion)
    EXPORTING
         I_MATNR = lv_i_matnr
         I_UNIT_1 = lv_i_unit_1
         I_MENGE_1 = lv_i_menge_1
         I_UNIT_2 = lv_i_unit_2
    IMPORTING
         E_MENGE_2 = lv_e_menge_2
    EXCEPTIONS
        CONVERSION_NOT_FOUND = 1
        INPUT_INVALID = 2
        MATERIAL_NOT_FOUND = 3
        MEINH_NOT_FOUND = 4
        MEINS_MISSING = 5
        NO_MEINH = 6
        OUTPUT_INVALID = 7
        OVERFLOW = 8
        OTHERS = 9
. " OIJB_CONVERT_QUANTITIES




ABAP code using 7.40 inline data declarations to call FM OIJB_CONVERT_QUANTITIES

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 MATNR FROM MARA INTO @DATA(ld_i_matnr).
 
"SELECT single MENGE FROM MSEG INTO @DATA(ld_e_menge_2).
 
 
"SELECT single MEINS FROM MSEG INTO @DATA(ld_i_unit_1).
 
 
"SELECT single MENGE FROM MSEG INTO @DATA(ld_i_menge_1).
 
 
"SELECT single MEINS FROM MSEG INTO @DATA(ld_i_unit_2).
 
 
 
 
 
 
 


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!