SAP CJPN_GET_PROJECT_DEFINITION Function Module for NOTRANSL: gepuffertes Lesen einer Projektdefinition
CJPN_GET_PROJECT_DEFINITION is a standard cjpn get project definition 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: gepuffertes Lesen einer Projektdefinition 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 cjpn get project definition FM, simply by entering the name CJPN_GET_PROJECT_DEFINITION into the relevant SAP transaction such as SE37 or SE38.
Function Group: CJPN
Program Name: SAPLCJPN
Main Program: SAPLCJPN
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CJPN_GET_PROJECT_DEFINITION 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 'CJPN_GET_PROJECT_DEFINITION'"NOTRANSL: gepuffertes Lesen einer Projektdefinition.
EXPORTING
* I_INDEX = 1 "
* I_OBJNR = ' ' "
* I_PSPID = ' ' "
* I_PSPNR = '00000000' "
* NO_BUFFER = ' ' "read directly from hard disk
IMPORTING
E_PROJ = "
KTEXT = "Description (short text) from PROJ-POST1
NEW_DEFINITION = "
EXCEPTIONS
INPUT_ERROR = 1 NOT_FOUND = 2
IMPORTING Parameters details for CJPN_GET_PROJECT_DEFINITION
I_INDEX -
Data type: SY-TABIXDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_OBJNR -
Data type: PROJ-OBJNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PSPID -
Data type: PROJ-PSPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PSPNR -
Data type: PROJ-PSPNRDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_BUFFER - read directly from hard disk
Data type: RCWBS-SEL01Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CJPN_GET_PROJECT_DEFINITION
E_PROJ -
Data type: PROJOptional: No
Call by Reference: No ( called with pass by value option)
KTEXT - Description (short text) from PROJ-POST1
Data type: CLIKEOptional: No
Call by Reference: No ( called with pass by value option)
NEW_DEFINITION -
Data type: RCJ_MARKL-MARKOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INPUT_ERROR - Neither PSPNR, PSPID nor OBJNR specified
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND - Project definition does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CJPN_GET_PROJECT_DEFINITION 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_proj | TYPE PROJ, " | |||
| lv_i_index | TYPE SY-TABIX, " 1 | |||
| lv_input_error | TYPE SY, " | |||
| lv_ktext | TYPE CLIKE, " | |||
| lv_i_objnr | TYPE PROJ-OBJNR, " SPACE | |||
| lv_not_found | TYPE PROJ, " | |||
| lv_i_pspid | TYPE PROJ-PSPID, " SPACE | |||
| lv_new_definition | TYPE RCJ_MARKL-MARK, " | |||
| lv_i_pspnr | TYPE PROJ-PSPNR, " '00000000' | |||
| lv_no_buffer | TYPE RCWBS-SEL01. " SPACE |
|   CALL FUNCTION 'CJPN_GET_PROJECT_DEFINITION' "NOTRANSL: gepuffertes Lesen einer Projektdefinition |
| EXPORTING | ||
| I_INDEX | = lv_i_index | |
| I_OBJNR | = lv_i_objnr | |
| I_PSPID | = lv_i_pspid | |
| I_PSPNR | = lv_i_pspnr | |
| NO_BUFFER | = lv_no_buffer | |
| IMPORTING | ||
| E_PROJ | = lv_e_proj | |
| KTEXT | = lv_ktext | |
| NEW_DEFINITION | = lv_new_definition | |
| EXCEPTIONS | ||
| INPUT_ERROR = 1 | ||
| NOT_FOUND = 2 | ||
| . " CJPN_GET_PROJECT_DEFINITION | ||
ABAP code using 7.40 inline data declarations to call FM CJPN_GET_PROJECT_DEFINITION
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 TABIX FROM SY INTO @DATA(ld_i_index). | ||||
| DATA(ld_i_index) | = 1. | |||
| "SELECT single OBJNR FROM PROJ INTO @DATA(ld_i_objnr). | ||||
| DATA(ld_i_objnr) | = ' '. | |||
| "SELECT single PSPID FROM PROJ INTO @DATA(ld_i_pspid). | ||||
| DATA(ld_i_pspid) | = ' '. | |||
| "SELECT single MARK FROM RCJ_MARKL INTO @DATA(ld_new_definition). | ||||
| "SELECT single PSPNR FROM PROJ INTO @DATA(ld_i_pspnr). | ||||
| DATA(ld_i_pspnr) | = '00000000'. | |||
| "SELECT single SEL01 FROM RCWBS INTO @DATA(ld_no_buffer). | ||||
| DATA(ld_no_buffer) | = ' '. | |||
Search for further information about these or an SAP related objects