SAP OIJ_GAUGE_CALC Function Module for calculates quantity difference given a starting and ending gauge value









OIJ_GAUGE_CALC is a standard oij gauge calc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for calculates quantity difference given a starting and ending gauge value 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 oij gauge calc FM, simply by entering the name OIJ_GAUGE_CALC into the relevant SAP transaction such as SE37 or SE38.

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



Function OIJ_GAUGE_CALC 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 'OIJ_GAUGE_CALC'"calculates quantity difference given a starting and ending gauge value
EXPORTING
IV_LOCATION = "Location ID
IV_DIP_TOTAL_C_UOM = "Length UoM (Oil BDRP)
IV_DIP_WATER_C = "Tank dip: water dip height
IV_DIP_WATER_C_UOM = "Length UoM (Oil BDRP)
IV_UL_IN_IND_C = "Dipping method (innage, ullage)
* IV_ETMSTM_C = "Tank dip time stamp
IV_MATNR = "Material number
IV_TANK = "Sequence number of SO assigned to business location
IV_DIP_TOTAL_O = "Tank dip, total height
IV_DIP_TOTAL_O_UOM = "Length UoM (Oil BDRP)
IV_DIP_WATER_O = "Tank dip: water dip height
IV_DIP_WATER_O_UOM = "Length UoM (Oil BDRP)
IV_UL_IN_IND_O = "Dipping method (innage, ullage)
* IV_ETMSTM_O = "Tank dip time stamp
IV_DIP_TOTAL_C = "

IMPORTING
E_QUANTITY = "Scheduled qty
E_QTY_UOM = "Scheduled UoM

TABLES
T_O_DIP_PARAM = "Conversion Parameters of Tank Dips
T_O_DIP_QUAN = "Appendix: Silo management tank strapping history
T_C_DIP_PARAM = "Conversion Parameters of Tank Dips
T_C_DIP_QUAN = "Appendix: Silo management tank strapping history

EXCEPTIONS
NO_LOC_TANK = 1 INVALID_DIP = 2 INVALID_TANK = 3 UOM_CONV_ERROR = 4 INVALID_OPEN_DIP = 5 INVALID_CLOSE_DIP = 6 INVALID_START_TIMESTAMP = 7 INVALID_END_TIMESTAMP = 8
.



IMPORTING Parameters details for OIJ_GAUGE_CALC

IV_LOCATION - Location ID

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

IV_DIP_TOTAL_C_UOM - Length UoM (Oil BDRP)

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

IV_DIP_WATER_C - Tank dip: water dip height

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

IV_DIP_WATER_C_UOM - Length UoM (Oil BDRP)

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

IV_UL_IN_IND_C - Dipping method (innage, ullage)

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

IV_ETMSTM_C - Tank dip time stamp

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

IV_MATNR - Material number

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

IV_TANK - Sequence number of SO assigned to business location

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

IV_DIP_TOTAL_O - Tank dip, total height

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

IV_DIP_TOTAL_O_UOM - Length UoM (Oil BDRP)

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

IV_DIP_WATER_O - Tank dip: water dip height

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

IV_DIP_WATER_O_UOM - Length UoM (Oil BDRP)

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

IV_UL_IN_IND_O - Dipping method (innage, ullage)

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

IV_ETMSTM_O - Tank dip time stamp

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

IV_DIP_TOTAL_C -

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

EXPORTING Parameters details for OIJ_GAUGE_CALC

E_QUANTITY - Scheduled qty

Data type: OIJ_MENGE
Optional: No
Call by Reference: Yes

E_QTY_UOM - Scheduled UoM

Data type: OIJ_UNITI
Optional: No
Call by Reference: Yes

TABLES Parameters details for OIJ_GAUGE_CALC

T_O_DIP_PARAM - Conversion Parameters of Tank Dips

Data type: OII_DIP_PARAM
Optional: No
Call by Reference: Yes

T_O_DIP_QUAN - Appendix: Silo management tank strapping history

Data type: OII_DIP_QUAN
Optional: No
Call by Reference: Yes

T_C_DIP_PARAM - Conversion Parameters of Tank Dips

Data type: OII_DIP_PARAM
Optional: No
Call by Reference: Yes

T_C_DIP_QUAN - Appendix: Silo management tank strapping history

Data type: OII_DIP_QUAN
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NO_LOC_TANK -

Data type:
Optional: No
Call by Reference: Yes

INVALID_DIP -

Data type:
Optional: No
Call by Reference: Yes

INVALID_TANK -

Data type:
Optional: No
Call by Reference: Yes

UOM_CONV_ERROR -

Data type:
Optional: No
Call by Reference: Yes

INVALID_OPEN_DIP -

Data type:
Optional: No
Call by Reference: Yes

INVALID_CLOSE_DIP -

Data type:
Optional: No
Call by Reference: Yes

INVALID_START_TIMESTAMP -

Data type:
Optional: No
Call by Reference: Yes

INVALID_END_TIMESTAMP -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for OIJ_GAUGE_CALC 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 OIJ_MENGE, "   
lv_iv_location  TYPE OIJ_LOCID, "   
lv_no_loc_tank  TYPE OIJ_LOCID, "   
lt_t_o_dip_param  TYPE STANDARD TABLE OF OII_DIP_PARAM, "   
lv_iv_dip_total_c_uom  TYPE OII_LENUN, "   
lv_iv_dip_water_c  TYPE OII_WATERHEIGHT, "   
lv_iv_dip_water_c_uom  TYPE OII_LENUN, "   
lv_iv_ul_in_ind_c  TYPE OII_UL_IN_IND, "   
lv_iv_etmstm_c  TYPE OIB_TMSTM, "   
lv_iv_matnr  TYPE MATNR, "   
lv_iv_tank  TYPE OII_BSEQNR, "   
lv_e_qty_uom  TYPE OIJ_UNITI, "   
lv_invalid_dip  TYPE OIJ_UNITI, "   
lt_t_o_dip_quan  TYPE STANDARD TABLE OF OII_DIP_QUAN, "   
lv_invalid_tank  TYPE OII_DIP_QUAN, "   
lt_t_c_dip_param  TYPE STANDARD TABLE OF OII_DIP_PARAM, "   
lv_iv_dip_total_o  TYPE OII_TOTALHEIGHT, "   
lt_t_c_dip_quan  TYPE STANDARD TABLE OF OII_DIP_QUAN, "   
lv_uom_conv_error  TYPE OII_DIP_QUAN, "   
lv_iv_dip_total_o_uom  TYPE OII_LENUN, "   
lv_iv_dip_water_o  TYPE OII_WATERHEIGHT, "   
lv_invalid_open_dip  TYPE OII_WATERHEIGHT, "   
lv_invalid_close_dip  TYPE OII_WATERHEIGHT, "   
lv_iv_dip_water_o_uom  TYPE OII_LENUN, "   
lv_iv_ul_in_ind_o  TYPE OII_UL_IN_IND, "   
lv_invalid_start_timestamp  TYPE OII_UL_IN_IND, "   
lv_iv_etmstm_o  TYPE OIB_TMSTM, "   
lv_invalid_end_timestamp  TYPE OIB_TMSTM, "   
lv_iv_dip_total_c  TYPE OII_TOTALHEIGHT. "   

  CALL FUNCTION 'OIJ_GAUGE_CALC'  "calculates quantity difference given a starting and ending gauge value
    EXPORTING
         IV_LOCATION = lv_iv_location
         IV_DIP_TOTAL_C_UOM = lv_iv_dip_total_c_uom
         IV_DIP_WATER_C = lv_iv_dip_water_c
         IV_DIP_WATER_C_UOM = lv_iv_dip_water_c_uom
         IV_UL_IN_IND_C = lv_iv_ul_in_ind_c
         IV_ETMSTM_C = lv_iv_etmstm_c
         IV_MATNR = lv_iv_matnr
         IV_TANK = lv_iv_tank
         IV_DIP_TOTAL_O = lv_iv_dip_total_o
         IV_DIP_TOTAL_O_UOM = lv_iv_dip_total_o_uom
         IV_DIP_WATER_O = lv_iv_dip_water_o
         IV_DIP_WATER_O_UOM = lv_iv_dip_water_o_uom
         IV_UL_IN_IND_O = lv_iv_ul_in_ind_o
         IV_ETMSTM_O = lv_iv_etmstm_o
         IV_DIP_TOTAL_C = lv_iv_dip_total_c
    IMPORTING
         E_QUANTITY = lv_e_quantity
         E_QTY_UOM = lv_e_qty_uom
    TABLES
         T_O_DIP_PARAM = lt_t_o_dip_param
         T_O_DIP_QUAN = lt_t_o_dip_quan
         T_C_DIP_PARAM = lt_t_c_dip_param
         T_C_DIP_QUAN = lt_t_c_dip_quan
    EXCEPTIONS
        NO_LOC_TANK = 1
        INVALID_DIP = 2
        INVALID_TANK = 3
        UOM_CONV_ERROR = 4
        INVALID_OPEN_DIP = 5
        INVALID_CLOSE_DIP = 6
        INVALID_START_TIMESTAMP = 7
        INVALID_END_TIMESTAMP = 8
. " OIJ_GAUGE_CALC




ABAP code using 7.40 inline data declarations to call FM OIJ_GAUGE_CALC

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



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!