SAP ME_READ_HISTORY_DAO Function Module for Read PO History, Lesen Bestellentwicklung, calculate sums









ME_READ_HISTORY_DAO is a standard me read history dao SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read PO History, Lesen Bestellentwicklung, calculate sums 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 me read history dao FM, simply by entering the name ME_READ_HISTORY_DAO into the relevant SAP transaction such as SE37 or SE38.

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



Function ME_READ_HISTORY_DAO 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 'ME_READ_HISTORY_DAO'"Read PO History, Lesen Bestellentwicklung, calculate sums
EXPORTING
EBELN = "Purchasing document number
* VRTKZ = "Distribution Indicator for Multiple Account Assignment
* I_NO_EXPAND_MA = ' ' "Checkbox
* DATA_PROVIDER = "Interface for reading of the PO History data using HDB features if available
* EBELP = 00000 "Purchasing document item
WEBRE = "Indicator GR-related invoice verif
* I_BYPASSING_BUFFER = "Read Without Buffer
* I_REFRESH_BUFFER = "
* I_EKBEH = "
* LFGJA = "Fiscal Year of a Reference Document
* LFBNR = "Document number of a reference document
* LFPOS = "Item of a Reference Document

TABLES
* XEKBE = "Purchase Order History Records
* XEKBNK_MA = "Total Delivery Costs at Account Assignment Level
* XEKBES = "Purchase order history totals
* XEKBEZ = "Purchase order history totals acco
* XEKBNK = "Delivery costs totals
* XEKBZ = "Delivery costs data records
* XRSEG = "Document item: Incoming invoice
* XEKBE_MA = "History of Purchasing Document at Account Assignment Level
* XEKBZ_MA = "Delivery Costs at Account Assignment Level
* XEKBES_MA = "Total Purchase Order History at Account Assignment Level

EXCEPTIONS
DATAPROVIDER_NOT_DEFINED = 1
.



IMPORTING Parameters details for ME_READ_HISTORY_DAO

EBELN - Purchasing document number

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

VRTKZ - Distribution Indicator for Multiple Account Assignment

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

I_NO_EXPAND_MA - Checkbox

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

DATA_PROVIDER - Interface for reading of the PO History data using HDB features if available

Data type: IF_MMPUR_ME_READ_HISTORY
Optional: Yes
Call by Reference: Yes

EBELP - Purchasing document item

Data type: EKPO-EBELP
Default: 00000
Optional: Yes
Call by Reference: No ( called with pass by value option)

WEBRE - Indicator GR-related invoice verif

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

I_BYPASSING_BUFFER - Read Without Buffer

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

I_REFRESH_BUFFER -

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

I_EKBEH -

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

LFGJA - Fiscal Year of a Reference Document

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

LFBNR - Document number of a reference document

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

LFPOS - Item of a Reference Document

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

TABLES Parameters details for ME_READ_HISTORY_DAO

XEKBE - Purchase Order History Records

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

XEKBNK_MA - Total Delivery Costs at Account Assignment Level

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

XEKBES - Purchase order history totals

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

XEKBEZ - Purchase order history totals acco

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

XEKBNK - Delivery costs totals

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

XEKBZ - Delivery costs data records

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

XRSEG - Document item: Incoming invoice

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

XEKBE_MA - History of Purchasing Document at Account Assignment Level

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

XEKBZ_MA - Delivery Costs at Account Assignment Level

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

XEKBES_MA - Total Purchase Order History at Account Assignment Level

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

EXCEPTIONS details

DATAPROVIDER_NOT_DEFINED - DATAPROVIDER IS NOT DEFINED

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ME_READ_HISTORY_DAO 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_ebeln  TYPE EKKO-EBELN, "   
lt_xekbe  TYPE STANDARD TABLE OF EKBE, "   
lv_dataprovider_not_defined  TYPE EKBE, "   
lv_vrtkz  TYPE EKPO-VRTKZ, "   
lt_xekbnk_ma  TYPE STANDARD TABLE OF EKBNK_MA, "   
lv_i_no_expand_ma  TYPE XFELD, "   SPACE
lv_data_provider  TYPE IF_MMPUR_ME_READ_HISTORY, "   
lv_ebelp  TYPE EKPO-EBELP, "   00000
lt_xekbes  TYPE STANDARD TABLE OF EKBES, "   
lv_webre  TYPE EKPO-WEBRE, "   
lt_xekbez  TYPE STANDARD TABLE OF EKBEZ, "   
lt_xekbnk  TYPE STANDARD TABLE OF EKBNK, "   
lv_i_bypassing_buffer  TYPE C, "   
lt_xekbz  TYPE STANDARD TABLE OF EKBZ, "   
lv_i_refresh_buffer  TYPE C, "   
lt_xrseg  TYPE STANDARD TABLE OF RSEG, "   
lv_i_ekbeh  TYPE C, "   
lv_lfgja  TYPE EKBE-LFGJA, "   
lt_xekbe_ma  TYPE STANDARD TABLE OF EKBE_MA_S, "   
lv_lfbnr  TYPE EKBE-LFBNR, "   
lt_xekbz_ma  TYPE STANDARD TABLE OF EKBZ_MA, "   
lv_lfpos  TYPE EKBE-LFPOS, "   
lt_xekbes_ma  TYPE STANDARD TABLE OF EKBES_MA. "   

  CALL FUNCTION 'ME_READ_HISTORY_DAO'  "Read PO History, Lesen Bestellentwicklung, calculate sums
    EXPORTING
         EBELN = lv_ebeln
         VRTKZ = lv_vrtkz
         I_NO_EXPAND_MA = lv_i_no_expand_ma
         DATA_PROVIDER = lv_data_provider
         EBELP = lv_ebelp
         WEBRE = lv_webre
         I_BYPASSING_BUFFER = lv_i_bypassing_buffer
         I_REFRESH_BUFFER = lv_i_refresh_buffer
         I_EKBEH = lv_i_ekbeh
         LFGJA = lv_lfgja
         LFBNR = lv_lfbnr
         LFPOS = lv_lfpos
    TABLES
         XEKBE = lt_xekbe
         XEKBNK_MA = lt_xekbnk_ma
         XEKBES = lt_xekbes
         XEKBEZ = lt_xekbez
         XEKBNK = lt_xekbnk
         XEKBZ = lt_xekbz
         XRSEG = lt_xrseg
         XEKBE_MA = lt_xekbe_ma
         XEKBZ_MA = lt_xekbz_ma
         XEKBES_MA = lt_xekbes_ma
    EXCEPTIONS
        DATAPROVIDER_NOT_DEFINED = 1
. " ME_READ_HISTORY_DAO




ABAP code using 7.40 inline data declarations to call FM ME_READ_HISTORY_DAO

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 EBELN FROM EKKO INTO @DATA(ld_ebeln).
 
 
 
"SELECT single VRTKZ FROM EKPO INTO @DATA(ld_vrtkz).
 
 
DATA(ld_i_no_expand_ma) = ' '.
 
 
"SELECT single EBELP FROM EKPO INTO @DATA(ld_ebelp).
DATA(ld_ebelp) = 00000.
 
 
"SELECT single WEBRE FROM EKPO INTO @DATA(ld_webre).
 
 
 
 
 
 
 
 
"SELECT single LFGJA FROM EKBE INTO @DATA(ld_lfgja).
 
 
"SELECT single LFBNR FROM EKBE INTO @DATA(ld_lfbnr).
 
 
"SELECT single LFPOS FROM EKBE INTO @DATA(ld_lfpos).
 
 


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!