SAP OIJ_METER_STOP_CALC Function Module for calculates closing reading of meter given qty. and opening reading









OIJ_METER_STOP_CALC is a standard oij meter stop 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 closing reading of meter given qty. and opening reading 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 meter stop calc FM, simply by entering the name OIJ_METER_STOP_CALC into the relevant SAP transaction such as SE37 or SE38.

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



Function OIJ_METER_STOP_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_METER_STOP_CALC'"calculates closing reading of meter given qty. and opening reading
EXPORTING
I_LOCATION = "Location ID
I_METER = "GMM: Sequence number of meter assigned to customer
I_RNBT = "Retail network business type
I_METER_RDG = "GMM: Start counter reading
I_QUANTITY = "Scheduled qty
I_QTY_UOM = "Scheduled UoM
I_MATNR = "Material number

IMPORTING
E_STOPRDG = "GMM: End counter reading
E_METER_VOLUOM = "GMM: Volume UoM (Oil BDRP)

EXCEPTIONS
NO_LOC_METER = 1 INVALID_READING = 2 INVALID_QTY = 3 UOM_CONV_ERROR = 4
.



IMPORTING Parameters details for OIJ_METER_STOP_CALC

I_LOCATION - Location ID

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

I_METER - GMM: Sequence number of meter assigned to customer

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

I_RNBT - Retail network business type

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

I_METER_RDG - GMM: Start counter reading

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

I_QUANTITY - Scheduled qty

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

I_QTY_UOM - Scheduled UoM

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

I_MATNR - Material number

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

EXPORTING Parameters details for OIJ_METER_STOP_CALC

E_STOPRDG - GMM: End counter reading

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

E_METER_VOLUOM - GMM: Volume UoM (Oil BDRP)

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

EXCEPTIONS details

NO_LOC_METER -

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

INVALID_READING -

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

INVALID_QTY -

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

UOM_CONV_ERROR -

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

Copy and paste ABAP code example for OIJ_METER_STOP_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_stoprdg  TYPE OII_ENCOUN, "   
lv_i_location  TYPE OIJ_LOCID, "   
lv_no_loc_meter  TYPE OIJ_LOCID, "   
lv_i_meter  TYPE OII_GSEQNR, "   
lv_e_meter_voluom  TYPE OII_VOLUM, "   
lv_invalid_reading  TYPE OII_VOLUM, "   
lv_i_rnbt  TYPE OIRA_RNBT, "   
lv_invalid_qty  TYPE OIRA_RNBT, "   
lv_i_meter_rdg  TYPE OII_STCOUN, "   
lv_uom_conv_error  TYPE OII_STCOUN, "   
lv_i_quantity  TYPE OIJ_MENGE, "   
lv_i_qty_uom  TYPE OIJ_UNITI, "   
lv_i_matnr  TYPE MATNR. "   

  CALL FUNCTION 'OIJ_METER_STOP_CALC'  "calculates closing reading of meter given qty. and opening reading
    EXPORTING
         I_LOCATION = lv_i_location
         I_METER = lv_i_meter
         I_RNBT = lv_i_rnbt
         I_METER_RDG = lv_i_meter_rdg
         I_QUANTITY = lv_i_quantity
         I_QTY_UOM = lv_i_qty_uom
         I_MATNR = lv_i_matnr
    IMPORTING
         E_STOPRDG = lv_e_stoprdg
         E_METER_VOLUOM = lv_e_meter_voluom
    EXCEPTIONS
        NO_LOC_METER = 1
        INVALID_READING = 2
        INVALID_QTY = 3
        UOM_CONV_ERROR = 4
. " OIJ_METER_STOP_CALC




ABAP code using 7.40 inline data declarations to call FM OIJ_METER_STOP_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!