SAP IDOC_RECORD_READ Function Module for Read IDoc record types (RFC-compatible)
IDOC_RECORD_READ is a standard idoc record 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 Read IDoc record types (RFC-compatible) 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 idoc record read FM, simply by entering the name IDOC_RECORD_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: EDIMEXT
Program Name: SAPLEDIMEXT
Main Program: SAPLEDIMEXT
Appliation area: S
Release date: 14-Apr-1998
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function IDOC_RECORD_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 'IDOC_RECORD_READ'"Read IDoc record types (RFC-compatible).
EXPORTING
* PI_VERSION = '3' "Version of IDoc record types
TABLES
* PT_HEADER = "Header data for IDoc record types
* DC_FIELDS = "Fields in IDoc control record
* DD_FIELDS = "Fields in IDoc data record
* DS_FIELDS = "Fields in IDoc status record
* PT_FVALUES = "Possible field values
EXCEPTIONS
VERSION_UNKNOWN = 1 DDIC_READ_ERROR = 2
IMPORTING Parameters details for IDOC_RECORD_READ
PI_VERSION - Version of IDoc record types
Data type: EDI_VERREC-VERSIONDefault: '3'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for IDOC_RECORD_READ
PT_HEADER - Header data for IDoc record types
Data type: EDI_IAPI15Optional: Yes
Call by Reference: No ( called with pass by value option)
DC_FIELDS - Fields in IDoc control record
Data type: EDI_IAPI16Optional: Yes
Call by Reference: No ( called with pass by value option)
DD_FIELDS - Fields in IDoc data record
Data type: EDI_IAPI16Optional: Yes
Call by Reference: No ( called with pass by value option)
DS_FIELDS - Fields in IDoc status record
Data type: EDI_IAPI16Optional: Yes
Call by Reference: No ( called with pass by value option)
PT_FVALUES - Possible field values
Data type: EDI_IAPI14Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
VERSION_UNKNOWN - Version of IDoc record types does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DDIC_READ_ERROR - Error while reading from Data Dictionary
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for IDOC_RECORD_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: | ||||
| lt_pt_header | TYPE STANDARD TABLE OF EDI_IAPI15, " | |||
| lv_pi_version | TYPE EDI_VERREC-VERSION, " '3' | |||
| lv_version_unknown | TYPE EDI_VERREC, " | |||
| lt_dc_fields | TYPE STANDARD TABLE OF EDI_IAPI16, " | |||
| lv_ddic_read_error | TYPE EDI_IAPI16, " | |||
| lt_dd_fields | TYPE STANDARD TABLE OF EDI_IAPI16, " | |||
| lt_ds_fields | TYPE STANDARD TABLE OF EDI_IAPI16, " | |||
| lt_pt_fvalues | TYPE STANDARD TABLE OF EDI_IAPI14. " |
|   CALL FUNCTION 'IDOC_RECORD_READ' "Read IDoc record types (RFC-compatible) |
| EXPORTING | ||
| PI_VERSION | = lv_pi_version | |
| TABLES | ||
| PT_HEADER | = lt_pt_header | |
| DC_FIELDS | = lt_dc_fields | |
| DD_FIELDS | = lt_dd_fields | |
| DS_FIELDS | = lt_ds_fields | |
| PT_FVALUES | = lt_pt_fvalues | |
| EXCEPTIONS | ||
| VERSION_UNKNOWN = 1 | ||
| DDIC_READ_ERROR = 2 | ||
| . " IDOC_RECORD_READ | ||
ABAP code using 7.40 inline data declarations to call FM IDOC_RECORD_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 VERSION FROM EDI_VERREC INTO @DATA(ld_pi_version). | ||||
| DATA(ld_pi_version) | = '3'. | |||
Search for further information about these or an SAP related objects