SAP ME_READ_ITEM_INVOICE Function Module for NOTRANSL: Lesen Einkaufsbelegpositionen für Rechnungseingang









ME_READ_ITEM_INVOICE is a standard me read item 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 Einkaufsbelegpositionen für Rechnungseingang 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 item invoice FM, simply by entering the name ME_READ_ITEM_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_ITEM_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_ITEM_INVOICE'"NOTRANSL: Lesen Einkaufsbelegpositionen für Rechnungseingang
EXPORTING
* DISPLAY = ' ' "Only for display (without ENQUEUE)
* I_VORGANG = "Calling Application
* I_BLDAT = "
* I_LBLNI = ' ' "
* LFBNR = "
* LFGJA = "
* LFPOS = "
* I_WERKS = "Plant
* I_EKBE_KEY = "Structure for Accessing a Document in Table EKBE
* PARKED_INV_KEY = "Document Header Incoming Invoice - Key Fields
* KEY_DATE = "
* EBELP = 00000 "Purchasing document item
IEKKO = "Purchasing document header
RE_KURSF = "Exchange rate
RE_WAERS = "Currency key
RE_WWERT = "Value date
* XEK08R_FLAG = ' ' "Reset indicator XEK08R
* LFDAT_AB = "
* LFDAT_BIS = "

IMPORTING
ET_POEXT_ITEM = "Table Type Enhancement Fields for Purchase Order (Item)

CHANGING
* TLIMIT = "

TABLES
* TEKSEL = "Table of items to be selected
* XEK08BN = "Table of delivery costs
* XEK08RN = "Table of items, edited for IR
* XEK08BN_CURR = "
* XEK08RN_CURR = "
* XEK08RN_ITEM = "PO Item Data for Invoice Verification (Multiple Acct Assgmt)

EXCEPTIONS
NOT_FOUND_ANY = 1 NOT_FOUND_ONE = 2 NOT_VALID_ANY = 3 NOT_VALID_ONE = 4 ENQUEUE_FAILED = 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_ITEM_INVOICE

DISPLAY - Only for display (without ENQUEUE)

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

I_VORGANG - Calling Application

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

I_BLDAT -

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

I_LBLNI -

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

LFBNR -

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

LFGJA -

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

LFPOS -

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

I_WERKS - Plant

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

I_EKBE_KEY - Structure for Accessing a Document in Table EKBE

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

PARKED_INV_KEY - Document Header Incoming Invoice - Key Fields

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

KEY_DATE -

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

EBELP - Purchasing document item

Data type: EKPO-EBELP
Default: 00000
Optional: Yes
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)

RE_KURSF - Exchange rate

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

RE_WAERS - Currency key

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

RE_WWERT - Value date

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

XEK08R_FLAG - Reset indicator XEK08R

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

LFDAT_AB -

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

LFDAT_BIS -

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

EXPORTING Parameters details for ME_READ_ITEM_INVOICE

ET_POEXT_ITEM - Table Type Enhancement Fields for Purchase Order (Item)

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

CHANGING Parameters details for ME_READ_ITEM_INVOICE

TLIMIT -

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

TABLES Parameters details for ME_READ_ITEM_INVOICE

TEKSEL - Table of items to be selected

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

XEK08BN - Table of delivery costs

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

XEK08RN - Table of items, edited for IR

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

XEK08BN_CURR -

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

XEK08RN_CURR -

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

XEK08RN_ITEM - PO Item Data for Invoice Verification (Multiple Acct Assgmt)

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

EXCEPTIONS details

NOT_FOUND_ANY - No Position Available

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

NOT_FOUND_ONE - Specified item does not exist

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

NOT_VALID_ANY - No item valid for IR

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

NOT_VALID_ONE - Specified item not valid for IR

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

ENQUEUE_FAILED -

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

Copy and paste ABAP code example for ME_READ_ITEM_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:
lt_teksel  TYPE STANDARD TABLE OF EKSEL, "   
lv_tlimit  TYPE MMCR_TLIMIT, "   
lv_display  TYPE MMCR_TLIMIT, "   SPACE
lv_et_poext_item  TYPE ME_POEXT_ITEM, "   
lv_not_found_any  TYPE ME_POEXT_ITEM, "   
lv_i_vorgang  TYPE T160-VORGA, "   
lv_i_bldat  TYPE MKPF-BLDAT, "   
lv_i_lblni  TYPE ESSR-LBLNI, "   SPACE
lv_lfbnr  TYPE EKBE-LFBNR, "   
lv_lfgja  TYPE EKBE-LFGJA, "   
lv_lfpos  TYPE EKBE-LFPOS, "   
lv_i_werks  TYPE EKPO-WERKS, "   
lv_i_ekbe_key  TYPE EKBE_KEY_DOCUMENT, "   
lv_parked_inv_key  TYPE RBKP_KEY, "   
lv_key_date  TYPE DATUM, "   
lv_ebelp  TYPE EKPO-EBELP, "   00000
lt_xek08bn  TYPE STANDARD TABLE OF EK08BN, "   
lv_not_found_one  TYPE EK08BN, "   
lv_iekko  TYPE EKKO, "   
lt_xek08rn  TYPE STANDARD TABLE OF EK08RN, "   
lv_not_valid_any  TYPE EK08RN, "   
lv_re_kursf  TYPE BKPF-KURSF, "   
lt_xek08bn_curr  TYPE STANDARD TABLE OF MMCR_XEK08BN, "   
lv_not_valid_one  TYPE MMCR_XEK08BN, "   
lv_re_waers  TYPE BKPF-WAERS, "   
lt_xek08rn_curr  TYPE STANDARD TABLE OF MMCR_XEK08RN, "   
lv_enqueue_failed  TYPE MMCR_XEK08RN, "   
lv_re_wwert  TYPE BKPF-WWERT, "   
lt_xek08rn_item  TYPE STANDARD TABLE OF EK08RN_ITEM, "   
lv_xek08r_flag  TYPE EK08RN_ITEM, "   SPACE
lv_lfdat_ab  TYPE RBKP_V-LFDATABLI, "   
lv_lfdat_bis  TYPE RBKP_V-LFDATBISLI. "   

  CALL FUNCTION 'ME_READ_ITEM_INVOICE'  "NOTRANSL: Lesen Einkaufsbelegpositionen für Rechnungseingang
    EXPORTING
         DISPLAY = lv_display
         I_VORGANG = lv_i_vorgang
         I_BLDAT = lv_i_bldat
         I_LBLNI = lv_i_lblni
         LFBNR = lv_lfbnr
         LFGJA = lv_lfgja
         LFPOS = lv_lfpos
         I_WERKS = lv_i_werks
         I_EKBE_KEY = lv_i_ekbe_key
         PARKED_INV_KEY = lv_parked_inv_key
         KEY_DATE = lv_key_date
         EBELP = lv_ebelp
         IEKKO = lv_iekko
         RE_KURSF = lv_re_kursf
         RE_WAERS = lv_re_waers
         RE_WWERT = lv_re_wwert
         XEK08R_FLAG = lv_xek08r_flag
         LFDAT_AB = lv_lfdat_ab
         LFDAT_BIS = lv_lfdat_bis
    IMPORTING
         ET_POEXT_ITEM = lv_et_poext_item
    CHANGING
         TLIMIT = lv_tlimit
    TABLES
         TEKSEL = lt_teksel
         XEK08BN = lt_xek08bn
         XEK08RN = lt_xek08rn
         XEK08BN_CURR = lt_xek08bn_curr
         XEK08RN_CURR = lt_xek08rn_curr
         XEK08RN_ITEM = lt_xek08rn_item
    EXCEPTIONS
        NOT_FOUND_ANY = 1
        NOT_FOUND_ONE = 2
        NOT_VALID_ANY = 3
        NOT_VALID_ONE = 4
        ENQUEUE_FAILED = 5
. " ME_READ_ITEM_INVOICE




ABAP code using 7.40 inline data declarations to call FM ME_READ_ITEM_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 VORGA FROM T160 INTO @DATA(ld_i_vorgang).
 
"SELECT single BLDAT FROM MKPF INTO @DATA(ld_i_bldat).
 
"SELECT single LBLNI FROM ESSR INTO @DATA(ld_i_lblni).
DATA(ld_i_lblni) = ' '.
 
"SELECT single LFBNR FROM EKBE INTO @DATA(ld_lfbnr).
 
"SELECT single LFGJA FROM EKBE INTO @DATA(ld_lfgja).
 
"SELECT single LFPOS FROM EKBE INTO @DATA(ld_lfpos).
 
"SELECT single WERKS FROM EKPO INTO @DATA(ld_i_werks).
 
 
 
 
"SELECT single EBELP FROM EKPO INTO @DATA(ld_ebelp).
DATA(ld_ebelp) = 00000.
 
 
 
 
 
 
"SELECT single KURSF FROM BKPF INTO @DATA(ld_re_kursf).
 
 
 
"SELECT single WAERS FROM BKPF INTO @DATA(ld_re_waers).
 
 
 
"SELECT single WWERT FROM BKPF INTO @DATA(ld_re_wwert).
 
 
DATA(ld_xek08r_flag) = ' '.
 
"SELECT single LFDATABLI FROM RBKP_V INTO @DATA(ld_lfdat_ab).
 
"SELECT single LFDATBISLI FROM RBKP_V INTO @DATA(ld_lfdat_bis).
 


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!