SAP EAM_MES_CREATE_MEASUREM_DOCUM Function Module for Create Measurement Document









EAM_MES_CREATE_MEASUREM_DOCUM is a standard eam mes create measurem docum SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create Measurement Document 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 eam mes create measurem docum FM, simply by entering the name EAM_MES_CREATE_MEASUREM_DOCUM into the relevant SAP transaction such as SE37 or SE38.

Function Group: EAM_MES_INT
Program Name: SAPLEAM_MES_INT
Main Program: SAPLEAM_MES_INT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function EAM_MES_CREATE_MEASUREM_DOCUM 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 'EAM_MES_CREATE_MEASUREM_DOCUM'"Create Measurement Document
EXPORTING
IV_EQUIPMENT = "Equipment Number
IV_QUANTITYROLECODE = "type of the measurement value
* IV_RECORDED_VALUE = "Measurement Reading in Unit of Entry
* IV_DIFFERENCE_READING = "Indicator: Counter Reading Entered as Difference
* IV_READING_DATE = SY-DATUM "Date of the Measurement
* IV_READING_TIME = SY-UZEIT "Time of Measurement
* IV_READER = SY-UNAME "Person who Took the Measurement Reading

IMPORTING
ET_MDOCM = "Measurement Document
ET_RETURN = "Return parameter table
.



IMPORTING Parameters details for EAM_MES_CREATE_MEASUREM_DOCUM

IV_EQUIPMENT - Equipment Number

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

IV_QUANTITYROLECODE - type of the measurement value

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

IV_RECORDED_VALUE - Measurement Reading in Unit of Entry

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

IV_DIFFERENCE_READING - Indicator: Counter Reading Entered as Difference

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

IV_READING_DATE - Date of the Measurement

Data type: IMRG-IDATE
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_READING_TIME - Time of Measurement

Data type: IMRG-ITIME
Default: SY-UZEIT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_READER - Person who Took the Measurement Reading

Data type: IMRG-READR
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for EAM_MES_CREATE_MEASUREM_DOCUM

ET_MDOCM - Measurement Document

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

ET_RETURN - Return parameter table

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

Copy and paste ABAP code example for EAM_MES_CREATE_MEASUREM_DOCUM 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_et_mdocm  TYPE IMRG_TAB, "   
lv_iv_equipment  TYPE EQUNR, "   
lv_et_return  TYPE BAPIRET2_T, "   
lv_iv_quantityrolecode  TYPE STRING, "   
lv_iv_recorded_value  TYPE RIMR0-RECDC, "   
lv_iv_difference_reading  TYPE IMRG-IDIFF, "   
lv_iv_reading_date  TYPE IMRG-IDATE, "   SY-DATUM
lv_iv_reading_time  TYPE IMRG-ITIME, "   SY-UZEIT
lv_iv_reader  TYPE IMRG-READR. "   SY-UNAME

  CALL FUNCTION 'EAM_MES_CREATE_MEASUREM_DOCUM'  "Create Measurement Document
    EXPORTING
         IV_EQUIPMENT = lv_iv_equipment
         IV_QUANTITYROLECODE = lv_iv_quantityrolecode
         IV_RECORDED_VALUE = lv_iv_recorded_value
         IV_DIFFERENCE_READING = lv_iv_difference_reading
         IV_READING_DATE = lv_iv_reading_date
         IV_READING_TIME = lv_iv_reading_time
         IV_READER = lv_iv_reader
    IMPORTING
         ET_MDOCM = lv_et_mdocm
         ET_RETURN = lv_et_return
. " EAM_MES_CREATE_MEASUREM_DOCUM




ABAP code using 7.40 inline data declarations to call FM EAM_MES_CREATE_MEASUREM_DOCUM

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 RECDC FROM RIMR0 INTO @DATA(ld_iv_recorded_value).
 
"SELECT single IDIFF FROM IMRG INTO @DATA(ld_iv_difference_reading).
 
"SELECT single IDATE FROM IMRG INTO @DATA(ld_iv_reading_date).
DATA(ld_iv_reading_date) = SY-DATUM.
 
"SELECT single ITIME FROM IMRG INTO @DATA(ld_iv_reading_time).
DATA(ld_iv_reading_time) = SY-UZEIT.
 
"SELECT single READR FROM IMRG INTO @DATA(ld_iv_reader).
DATA(ld_iv_reader) = SY-UNAME.
 


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!