SAP OII_METER_GET Function Module for Get storage object characteristics of an object
OII_METER_GET is a standard oii meter get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get storage object characteristics of an object 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 oii meter get FM, simply by entering the name OII_METER_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIIM
Program Name: SAPLOIIM
Main Program: SAPLOIIM
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OII_METER_GET 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 'OII_METER_GET'"Get storage object characteristics of an object.
EXPORTING
I_ACCESSMODE = "
* I_METER_NR = "SOCSEG to be created/maintained/displayed
* I_KNA1 = "Customer data for header
* I_SEQNR = "
* I_PBLB = "
* I_ACC_GROUP = "SSR Meters - meter access profile ID
IMPORTING
E_GMMK = "
E_GMMKS = "
E_GMMIKN = "SOCSEG number returned for create mode
E_GMMIBL = "
E_GMMTYP = "
E_GMMTYPS = "
TABLES
* T_OIIGMMH = "
* T_OIIGMMS = "
EXCEPTIONS
INVALID_METER_ID = 1
IMPORTING Parameters details for OII_METER_GET
I_ACCESSMODE -
Data type: OIISOCAM-SOCAMOptional: No
Call by Reference: No ( called with pass by value option)
I_METER_NR - SOCSEG to be created/maintained/displayed
Data type: OIIGMMK-GMMNROptional: Yes
Call by Reference: No ( called with pass by value option)
I_KNA1 - Customer data for header
Data type: ROIIKNA1Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SEQNR -
Data type: OIISOCIKN-SEQNROptional: Yes
Call by Reference: No ( called with pass by value option)
I_PBLB -
Data type: ROIIGPBLOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ACC_GROUP - SSR Meters - meter access profile ID
Data type: OIRBPBLB-ACC_GROUPOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for OII_METER_GET
E_GMMK -
Data type: OIIGMMKOptional: No
Call by Reference: No ( called with pass by value option)
E_GMMKS -
Data type: OIIGMMKSOptional: No
Call by Reference: No ( called with pass by value option)
E_GMMIKN - SOCSEG number returned for create mode
Data type: OIIGMMIKNOptional: No
Call by Reference: No ( called with pass by value option)
E_GMMIBL -
Data type: OIRBMATMETOptional: No
Call by Reference: No ( called with pass by value option)
E_GMMTYP -
Data type: OIIGMMTOptional: No
Call by Reference: No ( called with pass by value option)
E_GMMTYPS -
Data type: OIIGMMTSOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for OII_METER_GET
T_OIIGMMH -
Data type: OIIGMMHOptional: Yes
Call by Reference: No ( called with pass by value option)
T_OIIGMMS -
Data type: OIIGMMSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_METER_ID - SOCSEG ID not allowed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for OII_METER_GET 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_gmmk | TYPE OIIGMMK, " | |||
| lt_t_oiigmmh | TYPE STANDARD TABLE OF OIIGMMH, " | |||
| lv_i_accessmode | TYPE OIISOCAM-SOCAM, " | |||
| lv_invalid_meter_id | TYPE OIISOCAM, " | |||
| lv_e_gmmks | TYPE OIIGMMKS, " | |||
| lt_t_oiigmms | TYPE STANDARD TABLE OF OIIGMMS, " | |||
| lv_i_meter_nr | TYPE OIIGMMK-GMMNR, " | |||
| lv_i_kna1 | TYPE ROIIKNA1, " | |||
| lv_e_gmmikn | TYPE OIIGMMIKN, " | |||
| lv_i_seqnr | TYPE OIISOCIKN-SEQNR, " | |||
| lv_e_gmmibl | TYPE OIRBMATMET, " | |||
| lv_i_pblb | TYPE ROIIGPBL, " | |||
| lv_e_gmmtyp | TYPE OIIGMMT, " | |||
| lv_e_gmmtyps | TYPE OIIGMMTS, " | |||
| lv_i_acc_group | TYPE OIRBPBLB-ACC_GROUP. " |
|   CALL FUNCTION 'OII_METER_GET' "Get storage object characteristics of an object |
| EXPORTING | ||
| I_ACCESSMODE | = lv_i_accessmode | |
| I_METER_NR | = lv_i_meter_nr | |
| I_KNA1 | = lv_i_kna1 | |
| I_SEQNR | = lv_i_seqnr | |
| I_PBLB | = lv_i_pblb | |
| I_ACC_GROUP | = lv_i_acc_group | |
| IMPORTING | ||
| E_GMMK | = lv_e_gmmk | |
| E_GMMKS | = lv_e_gmmks | |
| E_GMMIKN | = lv_e_gmmikn | |
| E_GMMIBL | = lv_e_gmmibl | |
| E_GMMTYP | = lv_e_gmmtyp | |
| E_GMMTYPS | = lv_e_gmmtyps | |
| TABLES | ||
| T_OIIGMMH | = lt_t_oiigmmh | |
| T_OIIGMMS | = lt_t_oiigmms | |
| EXCEPTIONS | ||
| INVALID_METER_ID = 1 | ||
| . " OII_METER_GET | ||
ABAP code using 7.40 inline data declarations to call FM OII_METER_GET
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 SOCAM FROM OIISOCAM INTO @DATA(ld_i_accessmode). | ||||
| "SELECT single GMMNR FROM OIIGMMK INTO @DATA(ld_i_meter_nr). | ||||
| "SELECT single SEQNR FROM OIISOCIKN INTO @DATA(ld_i_seqnr). | ||||
| "SELECT single ACC_GROUP FROM OIRBPBLB INTO @DATA(ld_i_acc_group). | ||||
Search for further information about these or an SAP related objects