SAP EDI_PORT_READ Function Module for IDoc: Read port (general)
EDI_PORT_READ is a standard edi port 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 IDoc: Read port (general) 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 edi port read FM, simply by entering the name EDI_PORT_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: EDIO
Program Name: SAPLEDIO
Main Program: SAPLEDIO
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EDI_PORT_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 'EDI_PORT_READ'"IDoc: Read port (general).
EXPORTING
PORTNAME = "
IMPORTING
ALE_PORT = "
DESCRIPTION = "Port description
FILE_PORT = "
R2_PORT = "
INET_PORT = "
XMB_PORT = "
XML_PORT = "
PSS_PORT = "
TYP = "Port type
VERSION = "
EXCEPTIONS
PORT_NOT_EXIST = 1
IMPORTING Parameters details for EDI_PORT_READ
PORTNAME -
Data type: EDIPORT-PORTOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EDI_PORT_READ
ALE_PORT -
Data type: EDIPOAOptional: No
Call by Reference: No ( called with pass by value option)
DESCRIPTION - Port description
Data type: EDIPORT-DESCRIOptional: No
Call by Reference: No ( called with pass by value option)
FILE_PORT -
Data type: EDIPODOptional: No
Call by Reference: No ( called with pass by value option)
R2_PORT -
Data type: EDIPO2Optional: No
Call by Reference: No ( called with pass by value option)
INET_PORT -
Data type: EDIPOIOptional: No
Call by Reference: No ( called with pass by value option)
XMB_PORT -
Data type: EDIPOXHOptional: No
Call by Reference: No ( called with pass by value option)
XML_PORT -
Data type: EDIPOXOptional: No
Call by Reference: No ( called with pass by value option)
PSS_PORT -
Data type: EDIPOFOptional: No
Call by Reference: No ( called with pass by value option)
TYP - Port type
Data type: EDIPORT-PORTTYPOptional: No
Call by Reference: No ( called with pass by value option)
VERSION -
Data type: EDIPOD-VERSIOOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PORT_NOT_EXIST -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EDI_PORT_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_ale_port | TYPE EDIPOA, " | |||
| lv_portname | TYPE EDIPORT-PORT, " | |||
| lv_port_not_exist | TYPE EDIPORT, " | |||
| lv_description | TYPE EDIPORT-DESCRI, " | |||
| lv_file_port | TYPE EDIPOD, " | |||
| lv_r2_port | TYPE EDIPO2, " | |||
| lv_inet_port | TYPE EDIPOI, " | |||
| lv_xmb_port | TYPE EDIPOXH, " | |||
| lv_xml_port | TYPE EDIPOX, " | |||
| lv_pss_port | TYPE EDIPOF, " | |||
| lv_typ | TYPE EDIPORT-PORTTYP, " | |||
| lv_version | TYPE EDIPOD-VERSIO. " |
|   CALL FUNCTION 'EDI_PORT_READ' "IDoc: Read port (general) |
| EXPORTING | ||
| PORTNAME | = lv_portname | |
| IMPORTING | ||
| ALE_PORT | = lv_ale_port | |
| DESCRIPTION | = lv_description | |
| FILE_PORT | = lv_file_port | |
| R2_PORT | = lv_r2_port | |
| INET_PORT | = lv_inet_port | |
| XMB_PORT | = lv_xmb_port | |
| XML_PORT | = lv_xml_port | |
| PSS_PORT | = lv_pss_port | |
| TYP | = lv_typ | |
| VERSION | = lv_version | |
| EXCEPTIONS | ||
| PORT_NOT_EXIST = 1 | ||
| . " EDI_PORT_READ | ||
ABAP code using 7.40 inline data declarations to call FM EDI_PORT_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 PORT FROM EDIPORT INTO @DATA(ld_portname). | ||||
| "SELECT single DESCRI FROM EDIPORT INTO @DATA(ld_description). | ||||
| "SELECT single PORTTYP FROM EDIPORT INTO @DATA(ld_typ). | ||||
| "SELECT single VERSIO FROM EDIPOD INTO @DATA(ld_version). | ||||
Search for further information about these or an SAP related objects