SAP ME_READ_HEADER_INVOICE Function Module for NOTRANSL: Lesen Einkaufsbelegkopf für Rechnungsprüfung









ME_READ_HEADER_INVOICE is a standard me read header invoice SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Lesen Einkaufsbelegkopf für Rechnungsprüfung 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 header invoice FM, simply by entering the name ME_READ_HEADER_INVOICE into the relevant SAP transaction such as SE37 or SE38.

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



Function ME_READ_HEADER_INVOICE 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_HEADER_INVOICE'"NOTRANSL: Lesen Einkaufsbelegkopf für Rechnungsprüfung
EXPORTING
* DISPLAY = ' ' "Display only (no enqueue)
EBELN = "Purchasing document
* KURS_ABW = 0 "Max. exchange rate variance
RE_KURSF = "Exchange rate of invoice
RE_WAERS = "Currency of invoice
* HS_WAERS = "

IMPORTING
CURRERR = "Return code currency check
IEKKO = "Purchasing document header
E_ADDRESS = "
VBUND = "
E_POEXT_HEADER = "Enhancement Fields for Purchase Order (All Header Fields)

EXCEPTIONS
NOT_ACTIV = 1 NOT_FOUND = 2 WRONG_TYPE = 3 NOT_RELEASED = 4 PARKED_DOCUMENT = 5
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLEINR_001 Calculation of Default GR Quantity and Over-/Underdelivery Tolerance
EXIT_SAPLEINR_002 Adopt Batch Numbers from Shipping Notification When Posting Goods Receipt
EXIT_SAPLEINR_003 Adjustm. of Qty. and Date for Price Determination, GR Against Sched. Agmt.
EXIT_SAPLEINR_004 Determine Earliest Delivery Date, GR Check (PO Only)
EXIT_SAPLEINR_400 Exit for IS-Oil re-pricing at MM Invoice Verification

IMPORTING Parameters details for ME_READ_HEADER_INVOICE

DISPLAY - Display only (no enqueue)

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

EBELN - Purchasing document

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

KURS_ABW - Max. exchange rate variance

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

RE_KURSF - Exchange rate of invoice

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

RE_WAERS - Currency of invoice

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

HS_WAERS -

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

EXPORTING Parameters details for ME_READ_HEADER_INVOICE

CURRERR - Return code currency check

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

IEKKO - Purchasing document header

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

E_ADDRESS -

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

VBUND -

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

E_POEXT_HEADER - Enhancement Fields for Purchase Order (All Header Fields)

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

EXCEPTIONS details

NOT_ACTIV - Inactive

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

NOT_FOUND - Not available

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

WRONG_TYPE - No purchase order/scheduling agreement

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

NOT_RELEASED -

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

PARKED_DOCUMENT -

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

Copy and paste ABAP code example for ME_READ_HEADER_INVOICE 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_currerr  TYPE STRING, "   
lv_display  TYPE STRING, "   SPACE
lv_not_activ  TYPE STRING, "   
lv_ebeln  TYPE EKKO-EBELN, "   
lv_iekko  TYPE EKKO, "   
lv_not_found  TYPE EKKO, "   
lv_kurs_abw  TYPE T001-WAABW, "   0
lv_e_address  TYPE ADDR1_VAL, "   
lv_wrong_type  TYPE ADDR1_VAL, "   
lv_vbund  TYPE LFA1-VBUND, "   
lv_re_kursf  TYPE BKPF-KURSF, "   
lv_not_released  TYPE BKPF, "   
lv_re_waers  TYPE BKPF-WAERS, "   
lv_e_poext_header  TYPE POEXT_HEADER, "   
lv_parked_document  TYPE POEXT_HEADER, "   
lv_hs_waers  TYPE T001-WAERS. "   

  CALL FUNCTION 'ME_READ_HEADER_INVOICE'  "NOTRANSL: Lesen Einkaufsbelegkopf für Rechnungsprüfung
    EXPORTING
         DISPLAY = lv_display
         EBELN = lv_ebeln
         KURS_ABW = lv_kurs_abw
         RE_KURSF = lv_re_kursf
         RE_WAERS = lv_re_waers
         HS_WAERS = lv_hs_waers
    IMPORTING
         CURRERR = lv_currerr
         IEKKO = lv_iekko
         E_ADDRESS = lv_e_address
         VBUND = lv_vbund
         E_POEXT_HEADER = lv_e_poext_header
    EXCEPTIONS
        NOT_ACTIV = 1
        NOT_FOUND = 2
        WRONG_TYPE = 3
        NOT_RELEASED = 4
        PARKED_DOCUMENT = 5
. " ME_READ_HEADER_INVOICE




ABAP code using 7.40 inline data declarations to call FM ME_READ_HEADER_INVOICE

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.

 
DATA(ld_display) = ' '.
 
 
"SELECT single EBELN FROM EKKO INTO @DATA(ld_ebeln).
 
 
 
"SELECT single WAABW FROM T001 INTO @DATA(ld_kurs_abw).
 
 
 
"SELECT single VBUND FROM LFA1 INTO @DATA(ld_vbund).
 
"SELECT single KURSF FROM BKPF INTO @DATA(ld_re_kursf).
 
 
"SELECT single WAERS FROM BKPF INTO @DATA(ld_re_waers).
 
 
 
"SELECT single WAERS FROM T001 INTO @DATA(ld_hs_waers).
 


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!