SAP SPROJECT_READ Function Module for
SPROJECT_READ is a standard sproject read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 sproject read FM, simply by entering the name SPROJECT_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: PROJECT_ADMINISTRATION
Program Name: SAPLPROJECT_ADMINISTRATION
Main Program: SAPLPROJECT_ADMINISTRATION
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SPROJECT_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 'SPROJECT_READ'".
EXPORTING
PROJECT_ID = "
* LANGUAGE = SY-LANGU "
* READ_HEADER_ONLY = "
IMPORTING
HEADER = "
MESSAGE = "
MILESTONES = "
PARTNER = "Partner Company Data
ORGUNITS = "Organizational Units Affected in a Project
SOLARTABS = "
KW_STATUS = "
TABLES
* STATUS = "
* PRIORITY = "
* RESOURCE = "
* KEYWORDS = "
* NOTETYPE = "
* OBJECTLIST = "
* DEVOBJECTS = "
IMPORTING Parameters details for SPROJECT_READ
PROJECT_ID -
Data type: SPRO_HEAD-PROJECT_IDOptional: No
Call by Reference: No ( called with pass by value option)
LANGUAGE -
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ_HEADER_ONLY -
Data type: CHAR1Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for SPROJECT_READ
HEADER -
Data type: SPRO_HEADOptional: No
Call by Reference: No ( called with pass by value option)
MESSAGE -
Data type: SPRO_MESSAGEOptional: No
Call by Reference: No ( called with pass by value option)
MILESTONES -
Data type: PRMILESTONETOptional: No
Call by Reference: No ( called with pass by value option)
PARTNER - Partner Company Data
Data type: PRCOMPANYTOptional: No
Call by Reference: No ( called with pass by value option)
ORGUNITS - Organizational Units Affected in a Project
Data type: PRORGUNITSTOptional: No
Call by Reference: No ( called with pass by value option)
SOLARTABS -
Data type: PROJTABSTRIPSTOptional: No
Call by Reference: No ( called with pass by value option)
KW_STATUS -
Data type: PRKWSTATUSTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SPROJECT_READ
STATUS -
Data type: SPRO_STATUS_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
PRIORITY -
Data type: SPRO_PRIORITY_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
RESOURCE -
Data type: SPRO_RESOURCE_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
KEYWORDS -
Data type: SPRO_KEYWORD_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
NOTETYPE -
Data type: SPRO_NOTETYPE_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
OBJECTLIST -
Data type: SPRO_OBJECTLIST_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
DEVOBJECTS -
Data type: IOBJSTRUCOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for SPROJECT_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_header | TYPE SPRO_HEAD, " | |||
| lt_status | TYPE STANDARD TABLE OF SPRO_STATUS_TAB, " | |||
| lv_project_id | TYPE SPRO_HEAD-PROJECT_ID, " | |||
| lv_message | TYPE SPRO_MESSAGE, " | |||
| lv_language | TYPE SY-LANGU, " SY-LANGU | |||
| lt_priority | TYPE STANDARD TABLE OF SPRO_PRIORITY_TAB, " | |||
| lt_resource | TYPE STANDARD TABLE OF SPRO_RESOURCE_TAB, " | |||
| lv_milestones | TYPE PRMILESTONET, " | |||
| lv_read_header_only | TYPE CHAR1, " | |||
| lv_partner | TYPE PRCOMPANYT, " | |||
| lt_keywords | TYPE STANDARD TABLE OF SPRO_KEYWORD_TAB, " | |||
| lt_notetype | TYPE STANDARD TABLE OF SPRO_NOTETYPE_TAB, " | |||
| lv_orgunits | TYPE PRORGUNITST, " | |||
| lv_solartabs | TYPE PROJTABSTRIPST, " | |||
| lt_objectlist | TYPE STANDARD TABLE OF SPRO_OBJECTLIST_TAB, " | |||
| lv_kw_status | TYPE PRKWSTATUST, " | |||
| lt_devobjects | TYPE STANDARD TABLE OF IOBJSTRUC. " |
|   CALL FUNCTION 'SPROJECT_READ' " |
| EXPORTING | ||
| PROJECT_ID | = lv_project_id | |
| LANGUAGE | = lv_language | |
| READ_HEADER_ONLY | = lv_read_header_only | |
| IMPORTING | ||
| HEADER | = lv_header | |
| MESSAGE | = lv_message | |
| MILESTONES | = lv_milestones | |
| PARTNER | = lv_partner | |
| ORGUNITS | = lv_orgunits | |
| SOLARTABS | = lv_solartabs | |
| KW_STATUS | = lv_kw_status | |
| TABLES | ||
| STATUS | = lt_status | |
| PRIORITY | = lt_priority | |
| RESOURCE | = lt_resource | |
| KEYWORDS | = lt_keywords | |
| NOTETYPE | = lt_notetype | |
| OBJECTLIST | = lt_objectlist | |
| DEVOBJECTS | = lt_devobjects | |
| . " SPROJECT_READ | ||
ABAP code using 7.40 inline data declarations to call FM SPROJECT_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 PROJECT_ID FROM SPRO_HEAD INTO @DATA(ld_project_id). | ||||
| "SELECT single LANGU FROM SY INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects