SAP CJDB_GET_PROJECT_FROM_LDB_PSJ Function Module for RSTHIE for Project from LDB PSJ
CJDB_GET_PROJECT_FROM_LDB_PSJ is a standard cjdb get project from ldb psj SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for RSTHIE for Project from LDB PSJ 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 cjdb get project from ldb psj FM, simply by entering the name CJDB_GET_PROJECT_FROM_LDB_PSJ into the relevant SAP transaction such as SE37 or SE38.
Function Group: CJDB
Program Name: SAPLCJDB
Main Program: SAPLCJDB
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CJDB_GET_PROJECT_FROM_LDB_PSJ 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 'CJDB_GET_PROJECT_FROM_LDB_PSJ'"RSTHIE for Project from LDB PSJ.
EXPORTING
I_PSJ_CALLER = "
* I_SELECTION_SET = ' ' "Variant Name
* I_SEL_SET_REPORT = ' ' "
* I_HANDLE = "
* IT_VBTYP = "
* I_TRANGE = "
* I_TCNDB = ' ' "Database profile
* I_TCNDS = ' ' "
* I_FLG_NO_HIERARCHY = ' ' "
* I_FLG_MASS_SELECTION = ' ' "
* I_FLG_OBJECT_LIST_ONLY = ' ' "
* I_SEL_MODE = 0 "
* I_FLG_WITH_RPSCO = ' ' "
TABLES
* T_RSPARAMS = "
* T_PRPS_R = "
* T_AUFK = "
* T_AFKO = "
* T_ACT01 = "
* T_RESB = "
* T_PEGOB = "
* T_PEGQTY = "
* T_RPSCO_M = "
* T_RPSQT_M = "
* T_LKO74SEND = "
* T_SELECT_FIELDS = "
* T_VERSIONEN = "
* T_RSTHIE_M = "
* T_ELM_PS = "
* T_RSTTYP = "
* T_PSJ_AUTH_M = "
* T_VSKOPF = "
* T_PROJ = "
EXCEPTIONS
NO_PSJ_CALLER = 1 ELM_PS_EMPTY = 10 NO_SELECTION_POSSIBLE = 2 NO_DATA_FOUND = 3 NO_VARIANT = 4 OBJECT_LIST_ONLY = 5 TCNDB_MISSING = 6 TCNDS_MISSING = 7 RSTHIE_M_EMPTY = 8 RPSCO_M_EMPTY = 9
IMPORTING Parameters details for CJDB_GET_PROJECT_FROM_LDB_PSJ
I_PSJ_CALLER -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
I_SELECTION_SET - Variant Name
Data type: SY-SLSETDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SEL_SET_REPORT -
Data type: SY-REPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_HANDLE -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_VBTYP -
Data type: CNLDB_PSJ_TTVBTYPOptional: Yes
Call by Reference: Yes
I_TRANGE -
Data type: RSDS_TRANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_TCNDB - Database profile
Data type: TCNDBDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TCNDS -
Data type: TCNDSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_NO_HIERARCHY -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_MASS_SELECTION -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_OBJECT_LIST_ONLY -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SEL_MODE -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_WITH_RPSCO -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
TABLES Parameters details for CJDB_GET_PROJECT_FROM_LDB_PSJ
T_RSPARAMS -
Data type: RSPARAMSOptional: Yes
Call by Reference: No ( called with pass by value option)
T_PRPS_R -
Data type: PRPS_CJDB_REPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_AUFK -
Data type: AUFK_CJDB_REPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_AFKO -
Data type: AFKO_CJDB_REPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_ACT01 -
Data type: ACT01_CJDB_REPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_RESB -
Data type: RESB01_CJDB_REPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_PEGOB -
Data type: PEGOBOptional: Yes
Call by Reference: No ( called with pass by value option)
T_PEGQTY -
Data type: PEGQTYOptional: Yes
Call by Reference: No ( called with pass by value option)
T_RPSCO_M -
Data type: RPSCO_MOptional: Yes
Call by Reference: No ( called with pass by value option)
T_RPSQT_M -
Data type: RPSQT_MOptional: Yes
Call by Reference: No ( called with pass by value option)
T_LKO74SEND -
Data type: LKO74SENDOptional: Yes
Call by Reference: No ( called with pass by value option)
T_SELECT_FIELDS -
Data type: RSFS_FIELDSOptional: Yes
Call by Reference: No ( called with pass by value option)
T_VERSIONEN -
Data type: PSJ_VERSIONENOptional: Yes
Call by Reference: No ( called with pass by value option)
T_RSTHIE_M -
Data type: RSTHIE_MOptional: Yes
Call by Reference: No ( called with pass by value option)
T_ELM_PS -
Data type: ELM_PSOptional: Yes
Call by Reference: No ( called with pass by value option)
T_RSTTYP -
Data type: RSTTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_PSJ_AUTH_M -
Data type: PSJ_AUTH_MOptional: Yes
Call by Reference: No ( called with pass by value option)
T_VSKOPF -
Data type: VSKOPFOptional: Yes
Call by Reference: No ( called with pass by value option)
T_PROJ -
Data type: PROJ_CJDB_REPOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_PSJ_CALLER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ELM_PS_EMPTY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SELECTION_POSSIBLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_DATA_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VARIANT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_LIST_ONLY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TCNDB_MISSING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TCNDS_MISSING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RSTHIE_M_EMPTY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RPSCO_M_EMPTY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CJDB_GET_PROJECT_FROM_LDB_PSJ 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_t_rsparams | TYPE STANDARD TABLE OF RSPARAMS, " | |||
| lv_i_psj_caller | TYPE SY-REPID, " | |||
| lv_no_psj_caller | TYPE SY, " | |||
| lt_t_prps_r | TYPE STANDARD TABLE OF PRPS_CJDB_REP, " | |||
| lv_elm_ps_empty | TYPE PRPS_CJDB_REP, " | |||
| lv_i_selection_set | TYPE SY-SLSET, " SPACE | |||
| lt_t_aufk | TYPE STANDARD TABLE OF AUFK_CJDB_REP, " | |||
| lv_i_sel_set_report | TYPE SY-REPID, " SPACE | |||
| lt_t_afko | TYPE STANDARD TABLE OF AFKO_CJDB_REP, " | |||
| lv_i_handle | TYPE I, " | |||
| lt_t_act01 | TYPE STANDARD TABLE OF ACT01_CJDB_REP, " | |||
| lv_it_vbtyp | TYPE CNLDB_PSJ_TTVBTYP, " | |||
| lt_t_resb | TYPE STANDARD TABLE OF RESB01_CJDB_REP, " | |||
| lt_t_pegob | TYPE STANDARD TABLE OF PEGOB, " | |||
| lt_t_pegqty | TYPE STANDARD TABLE OF PEGQTY, " | |||
| lt_t_rpsco_m | TYPE STANDARD TABLE OF RPSCO_M, " | |||
| lt_t_rpsqt_m | TYPE STANDARD TABLE OF RPSQT_M, " | |||
| lt_t_lko74send | TYPE STANDARD TABLE OF LKO74SEND, " | |||
| lv_i_trange | TYPE RSDS_TRANGE, " | |||
| lt_t_select_fields | TYPE STANDARD TABLE OF RSFS_FIELDS, " | |||
| lv_no_selection_possible | TYPE RSFS_FIELDS, " | |||
| lv_i_tcndb | TYPE TCNDB, " SPACE | |||
| lt_t_versionen | TYPE STANDARD TABLE OF PSJ_VERSIONEN, " | |||
| lv_no_data_found | TYPE PSJ_VERSIONEN, " | |||
| lv_i_tcnds | TYPE TCNDS, " SPACE | |||
| lv_no_variant | TYPE TCNDS, " | |||
| lt_t_rsthie_m | TYPE STANDARD TABLE OF RSTHIE_M, " | |||
| lt_t_elm_ps | TYPE STANDARD TABLE OF ELM_PS, " | |||
| lv_object_list_only | TYPE ELM_PS, " | |||
| lv_i_flg_no_hierarchy | TYPE C, " SPACE | |||
| lt_t_rsttyp | TYPE STANDARD TABLE OF RSTTYP, " | |||
| lv_tcndb_missing | TYPE RSTTYP, " | |||
| lv_i_flg_mass_selection | TYPE C, " SPACE | |||
| lt_t_psj_auth_m | TYPE STANDARD TABLE OF PSJ_AUTH_M, " | |||
| lv_tcnds_missing | TYPE PSJ_AUTH_M, " | |||
| lv_i_flg_object_list_only | TYPE C, " SPACE | |||
| lt_t_vskopf | TYPE STANDARD TABLE OF VSKOPF, " | |||
| lv_i_sel_mode | TYPE I, " 0 | |||
| lv_rsthie_m_empty | TYPE I, " | |||
| lt_t_proj | TYPE STANDARD TABLE OF PROJ_CJDB_REP, " | |||
| lv_rpsco_m_empty | TYPE PROJ_CJDB_REP, " | |||
| lv_i_flg_with_rpsco | TYPE C. " SPACE |
|   CALL FUNCTION 'CJDB_GET_PROJECT_FROM_LDB_PSJ' "RSTHIE for Project from LDB PSJ |
| EXPORTING | ||
| I_PSJ_CALLER | = lv_i_psj_caller | |
| I_SELECTION_SET | = lv_i_selection_set | |
| I_SEL_SET_REPORT | = lv_i_sel_set_report | |
| I_HANDLE | = lv_i_handle | |
| IT_VBTYP | = lv_it_vbtyp | |
| I_TRANGE | = lv_i_trange | |
| I_TCNDB | = lv_i_tcndb | |
| I_TCNDS | = lv_i_tcnds | |
| I_FLG_NO_HIERARCHY | = lv_i_flg_no_hierarchy | |
| I_FLG_MASS_SELECTION | = lv_i_flg_mass_selection | |
| I_FLG_OBJECT_LIST_ONLY | = lv_i_flg_object_list_only | |
| I_SEL_MODE | = lv_i_sel_mode | |
| I_FLG_WITH_RPSCO | = lv_i_flg_with_rpsco | |
| TABLES | ||
| T_RSPARAMS | = lt_t_rsparams | |
| T_PRPS_R | = lt_t_prps_r | |
| T_AUFK | = lt_t_aufk | |
| T_AFKO | = lt_t_afko | |
| T_ACT01 | = lt_t_act01 | |
| T_RESB | = lt_t_resb | |
| T_PEGOB | = lt_t_pegob | |
| T_PEGQTY | = lt_t_pegqty | |
| T_RPSCO_M | = lt_t_rpsco_m | |
| T_RPSQT_M | = lt_t_rpsqt_m | |
| T_LKO74SEND | = lt_t_lko74send | |
| T_SELECT_FIELDS | = lt_t_select_fields | |
| T_VERSIONEN | = lt_t_versionen | |
| T_RSTHIE_M | = lt_t_rsthie_m | |
| T_ELM_PS | = lt_t_elm_ps | |
| T_RSTTYP | = lt_t_rsttyp | |
| T_PSJ_AUTH_M | = lt_t_psj_auth_m | |
| T_VSKOPF | = lt_t_vskopf | |
| T_PROJ | = lt_t_proj | |
| EXCEPTIONS | ||
| NO_PSJ_CALLER = 1 | ||
| ELM_PS_EMPTY = 10 | ||
| NO_SELECTION_POSSIBLE = 2 | ||
| NO_DATA_FOUND = 3 | ||
| NO_VARIANT = 4 | ||
| OBJECT_LIST_ONLY = 5 | ||
| TCNDB_MISSING = 6 | ||
| TCNDS_MISSING = 7 | ||
| RSTHIE_M_EMPTY = 8 | ||
| RPSCO_M_EMPTY = 9 | ||
| . " CJDB_GET_PROJECT_FROM_LDB_PSJ | ||
ABAP code using 7.40 inline data declarations to call FM CJDB_GET_PROJECT_FROM_LDB_PSJ
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 REPID FROM SY INTO @DATA(ld_i_psj_caller). | ||||
| "SELECT single SLSET FROM SY INTO @DATA(ld_i_selection_set). | ||||
| DATA(ld_i_selection_set) | = ' '. | |||
| "SELECT single REPID FROM SY INTO @DATA(ld_i_sel_set_report). | ||||
| DATA(ld_i_sel_set_report) | = ' '. | |||
| DATA(ld_i_tcndb) | = ' '. | |||
| DATA(ld_i_tcnds) | = ' '. | |||
| DATA(ld_i_flg_no_hierarchy) | = ' '. | |||
| DATA(ld_i_flg_mass_selection) | = ' '. | |||
| DATA(ld_i_flg_object_list_only) | = ' '. | |||
| DATA(ld_i_flg_with_rpsco) | = ' '. | |||
Search for further information about these or an SAP related objects