SAP OIU_ME_DOC_INIT Function Module for E&P Measurement: Initialize measurement system
OIU_ME_DOC_INIT is a standard oiu me doc init SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for E&P Measurement: Initialize measurement system 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 oiu me doc init FM, simply by entering the name OIU_ME_DOC_INIT into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIU_ME_DOC
Program Name: SAPLOIU_ME_DOC
Main Program: SAPLOIU_ME_DOC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIU_ME_DOC_INIT 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 'OIU_ME_DOC_INIT'"E&P Measurement: Initialize measurement system.
EXPORTING
I_MECLS = "
* I_DIALOG = 'X' "
* I_AUTOTABS = ' ' "
* I_NO_MRGRP = ' ' "
* I_MODE = '1' "
TABLES
T_SRCDOC = "Source documents
* T_MDATA_HD = "Additional data - header details
* T_MDATA_VL = "Additional data - values
EXCEPTIONS
INVALID_SOURCE = 1 INVALID_SOURCE_OBJECT = 2 INVALID_MEAS_TYPE = 3 NO_READINGS_IN_MEAS_TYPE = 4
IMPORTING Parameters details for OIU_ME_DOC_INIT
I_MECLS -
Data type: OIU_ME_MEDOC-MECLSOptional: No
Call by Reference: No ( called with pass by value option)
I_DIALOG -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_AUTOTABS -
Data type: CDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_MRGRP -
Data type: CDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MODE -
Data type: CDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for OIU_ME_DOC_INIT
T_SRCDOC - Source documents
Data type: ROIU_ME_SRCDOCOptional: No
Call by Reference: Yes
T_MDATA_HD - Additional data - header details
Data type: ROIU_ME_MDATA_HDOptional: Yes
Call by Reference: Yes
T_MDATA_VL - Additional data - values
Data type: ROIU_ME_MDATA_VLOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
INVALID_SOURCE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_SOURCE_OBJECT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_MEAS_TYPE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_READINGS_IN_MEAS_TYPE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for OIU_ME_DOC_INIT 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_mecls | TYPE OIU_ME_MEDOC-MECLS, " | |||
| lt_t_srcdoc | TYPE STANDARD TABLE OF ROIU_ME_SRCDOC, " | |||
| lv_invalid_source | TYPE ROIU_ME_SRCDOC, " | |||
| lv_i_dialog | TYPE C, " 'X' | |||
| lt_t_mdata_hd | TYPE STANDARD TABLE OF ROIU_ME_MDATA_HD, " | |||
| lv_invalid_source_object | TYPE ROIU_ME_MDATA_HD, " | |||
| lv_i_autotabs | TYPE C, " ' ' | |||
| lt_t_mdata_vl | TYPE STANDARD TABLE OF ROIU_ME_MDATA_VL, " | |||
| lv_invalid_meas_type | TYPE ROIU_ME_MDATA_VL, " | |||
| lv_i_no_mrgrp | TYPE C, " ' ' | |||
| lv_no_readings_in_meas_type | TYPE C, " | |||
| lv_i_mode | TYPE C. " '1' |
|   CALL FUNCTION 'OIU_ME_DOC_INIT' "E&P Measurement: Initialize measurement system |
| EXPORTING | ||
| I_MECLS | = lv_i_mecls | |
| I_DIALOG | = lv_i_dialog | |
| I_AUTOTABS | = lv_i_autotabs | |
| I_NO_MRGRP | = lv_i_no_mrgrp | |
| I_MODE | = lv_i_mode | |
| TABLES | ||
| T_SRCDOC | = lt_t_srcdoc | |
| T_MDATA_HD | = lt_t_mdata_hd | |
| T_MDATA_VL | = lt_t_mdata_vl | |
| EXCEPTIONS | ||
| INVALID_SOURCE = 1 | ||
| INVALID_SOURCE_OBJECT = 2 | ||
| INVALID_MEAS_TYPE = 3 | ||
| NO_READINGS_IN_MEAS_TYPE = 4 | ||
| . " OIU_ME_DOC_INIT | ||
ABAP code using 7.40 inline data declarations to call FM OIU_ME_DOC_INIT
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 MECLS FROM OIU_ME_MEDOC INTO @DATA(ld_i_mecls). | ||||
| DATA(ld_i_dialog) | = 'X'. | |||
| DATA(ld_i_autotabs) | = ' '. | |||
| DATA(ld_i_no_mrgrp) | = ' '. | |||
| DATA(ld_i_mode) | = '1'. | |||
Search for further information about these or an SAP related objects