SAP ME_PURCHASE_DOCUMENT_DATA_READ Function Module for NOTRANSL: Lesen und aufbereiten von Bestellbelegen für Änderungen
ME_PURCHASE_DOCUMENT_DATA_READ is a standard me purchase document data read 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 und aufbereiten von Bestellbelegen für Änderungen 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 purchase document data read FM, simply by entering the name ME_PURCHASE_DOCUMENT_DATA_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: EINI
Program Name: SAPLEINI
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ME_PURCHASE_DOCUMENT_DATA_READ 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_PURCHASE_DOCUMENT_DATA_READ'"NOTRANSL: Lesen und aufbereiten von Bestellbelegen für Änderungen.
EXPORTING
I_EBELN = "Purchasing Document Number
I_TCODE = "Transaction Code
* I_NO_COMMIT = ' ' "Generic Type
I_TRTYP = "Transaction Type
* I_NO_MESSAGING = "Generic Type
* I_NO_MESSAGE_REQ = "Generic Type
* I_NO_AUTHORITY_CHECK = "No authorization check
* I_VORGA = "Status of Purchasing Document
IMPORTING
E_EKKO = "Purchasing Document Header
TABLES
* T_EKPO = "Purchasing Document Item
* T_EKET = "Scheduling Agreement Schedule Lines
* T_EKKN = "Account Assignment in Purchasing Document
* T_KOMV = "Pricing Communications-Condition Record
EXCEPTIONS
NO_EBLNR = 1 EBLNR_NOT_FOUND = 2 NO_TCODE = 3 TCODE_NOT_ALLOWED = 4 NO_TRTYP = 5 INVALID_CALL_OF_FB = 6
IMPORTING Parameters details for ME_PURCHASE_DOCUMENT_DATA_READ
I_EBELN - Purchasing Document Number
Data type: EKKO-EBELNOptional: No
Call by Reference: No ( called with pass by value option)
I_TCODE - Transaction Code
Data type: SY-TCODEOptional: No
Call by Reference: No ( called with pass by value option)
I_NO_COMMIT - Generic Type
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TRTYP - Transaction Type
Data type: T160-TRTYPOptional: No
Call by Reference: No ( called with pass by value option)
I_NO_MESSAGING - Generic Type
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_MESSAGE_REQ - Generic Type
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_AUTHORITY_CHECK - No authorization check
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
I_VORGA - Status of Purchasing Document
Data type: EKKO-STATUOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ME_PURCHASE_DOCUMENT_DATA_READ
E_EKKO - Purchasing Document Header
Data type: EKKOOptional: No
Call by Reference: Yes
TABLES Parameters details for ME_PURCHASE_DOCUMENT_DATA_READ
T_EKPO - Purchasing Document Item
Data type: EKPOOptional: Yes
Call by Reference: No ( called with pass by value option)
T_EKET - Scheduling Agreement Schedule Lines
Data type: EKETOptional: Yes
Call by Reference: No ( called with pass by value option)
T_EKKN - Account Assignment in Purchasing Document
Data type: EKKNOptional: Yes
Call by Reference: No ( called with pass by value option)
T_KOMV - Pricing Communications-Condition Record
Data type: KOMVOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_EBLNR - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EBLNR_NOT_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_TCODE - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TCODE_NOT_ALLOWED - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_TRTYP - No Transaction Type
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_CALL_OF_FB -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ME_PURCHASE_DOCUMENT_DATA_READ 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_e_ekko | TYPE EKKO, " | |||
| lt_t_ekpo | TYPE STANDARD TABLE OF EKPO, " | |||
| lv_i_ebeln | TYPE EKKO-EBELN, " | |||
| lv_no_eblnr | TYPE EKKO, " | |||
| lt_t_eket | TYPE STANDARD TABLE OF EKET, " | |||
| lv_i_tcode | TYPE SY-TCODE, " | |||
| lv_eblnr_not_found | TYPE SY, " | |||
| lt_t_ekkn | TYPE STANDARD TABLE OF EKKN, " | |||
| lv_no_tcode | TYPE EKKN, " | |||
| lv_i_no_commit | TYPE C, " SPACE | |||
| lt_t_komv | TYPE STANDARD TABLE OF KOMV, " | |||
| lv_i_trtyp | TYPE T160-TRTYP, " | |||
| lv_tcode_not_allowed | TYPE T160, " | |||
| lv_no_trtyp | TYPE T160, " | |||
| lv_i_no_messaging | TYPE C, " | |||
| lv_i_no_message_req | TYPE C, " | |||
| lv_invalid_call_of_fb | TYPE C, " | |||
| lv_i_no_authority_check | TYPE C, " | |||
| lv_i_vorga | TYPE EKKO-STATU. " |
|   CALL FUNCTION 'ME_PURCHASE_DOCUMENT_DATA_READ' "NOTRANSL: Lesen und aufbereiten von Bestellbelegen für Änderungen |
| EXPORTING | ||
| I_EBELN | = lv_i_ebeln | |
| I_TCODE | = lv_i_tcode | |
| I_NO_COMMIT | = lv_i_no_commit | |
| I_TRTYP | = lv_i_trtyp | |
| I_NO_MESSAGING | = lv_i_no_messaging | |
| I_NO_MESSAGE_REQ | = lv_i_no_message_req | |
| I_NO_AUTHORITY_CHECK | = lv_i_no_authority_check | |
| I_VORGA | = lv_i_vorga | |
| IMPORTING | ||
| E_EKKO | = lv_e_ekko | |
| TABLES | ||
| T_EKPO | = lt_t_ekpo | |
| T_EKET | = lt_t_eket | |
| T_EKKN | = lt_t_ekkn | |
| T_KOMV | = lt_t_komv | |
| EXCEPTIONS | ||
| NO_EBLNR = 1 | ||
| EBLNR_NOT_FOUND = 2 | ||
| NO_TCODE = 3 | ||
| TCODE_NOT_ALLOWED = 4 | ||
| NO_TRTYP = 5 | ||
| INVALID_CALL_OF_FB = 6 | ||
| . " ME_PURCHASE_DOCUMENT_DATA_READ | ||
ABAP code using 7.40 inline data declarations to call FM ME_PURCHASE_DOCUMENT_DATA_READ
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_i_ebeln). | ||||
| "SELECT single TCODE FROM SY INTO @DATA(ld_i_tcode). | ||||
| DATA(ld_i_no_commit) | = ' '. | |||
| "SELECT single TRTYP FROM T160 INTO @DATA(ld_i_trtyp). | ||||
| "SELECT single STATU FROM EKKO INTO @DATA(ld_i_vorga). | ||||
Search for further information about these or an SAP related objects