SAP CJWB_CREATE_PRPS Function Module for NOTRANSL: Anlegen eines PSP-Elementes









CJWB_CREATE_PRPS is a standard cjwb create prps 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: Anlegen eines PSP-Elementes 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 cjwb create prps FM, simply by entering the name CJWB_CREATE_PRPS into the relevant SAP transaction such as SE37 or SE38.

Function Group: CJWB
Program Name: SAPLCJWB
Main Program: SAPLCJWB
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CJWB_CREATE_PRPS 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 'CJWB_CREATE_PRPS'"NOTRANSL: Anlegen eines PSP-Elementes
EXPORTING
I_PRPS = "WBS (Work Breakdown Structure) Element Master Data
I_PSPID = "Project Definition
* I_PRTE = "Document Structure of Table PRTE
* I_FLG_TESTMODE = ' ' "
* NO_PROJ_PROFILE = ' ' "

IMPORTING
E_PSPNR = "WBS Element
E_OBJNR = "Object number
E_INDEX = "ABAP System Field: Row Index of Internal Tables
E_PSPHI = "Current number of the appropriate project
E_PRPS = "WBS (Work Breakdown Structure) Element Master Data

EXCEPTIONS
NO_PROJ = 1 PROJ_GESPERRT = 2 PRPS_GESPERRT = 3 ELEMENT_EXISTS = 4 WRONG_PROFILE = 5 WRONG_STSMA = 6 WRONG_STSMA_OB = 7 ACTIVITY_NOT_ALLOWED = 8 STRU_GESP = 9
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLCJWB_001 PS Customer Exit WOrk Breakdown Structure User Fields
EXIT_SAPLCJWB_002 PS Customer Exit: User Specific Fields PROJ (Data SAP -> SUBSCREEN)
EXIT_SAPLCJWB_003 PS Customer Exit: User Specific Fields PROJ (Data SUBSCREEN -> SAP)
EXIT_SAPLCJWB_004 PS Customer Exit: User Specific Fields PRPS (Data SAP _> SUBSCREEN)
EXIT_SAPLCJWB_005 PS Customer Exit: User Specific Fields PRPS (Data SUBSCREEN -> SAP)
EXIT_SAPLCJWB_006 PS Customer EXit: Pre-set Search/Replace String

IMPORTING Parameters details for CJWB_CREATE_PRPS

I_PRPS - WBS (Work Breakdown Structure) Element Master Data

Data type: PRPS
Optional: No
Call by Reference: No ( called with pass by value option)

I_PSPID - Project Definition

Data type: PROJ-PSPID
Optional: No
Call by Reference: No ( called with pass by value option)

I_PRTE - Document Structure of Table PRTE

Data type: PRTEB
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FLG_TESTMODE -

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_PROJ_PROFILE -

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CJWB_CREATE_PRPS

E_PSPNR - WBS Element

Data type: PRPS-PSPNR
Optional: No
Call by Reference: No ( called with pass by value option)

E_OBJNR - Object number

Data type: PRPS-OBJNR
Optional: No
Call by Reference: No ( called with pass by value option)

E_INDEX - ABAP System Field: Row Index of Internal Tables

Data type: SY-TABIX
Optional: No
Call by Reference: No ( called with pass by value option)

E_PSPHI - Current number of the appropriate project

Data type: PRPS-PSPHI
Optional: No
Call by Reference: No ( called with pass by value option)

E_PRPS - WBS (Work Breakdown Structure) Element Master Data

Data type: PRPS
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NO_PROJ -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PROJ_GESPERRT -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PRPS_GESPERRT -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ELEMENT_EXISTS -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_PROFILE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_STSMA -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_STSMA_OB -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ACTIVITY_NOT_ALLOWED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

STRU_GESP -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CJWB_CREATE_PRPS 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_i_prps  TYPE PRPS, "   
lv_e_pspnr  TYPE PRPS-PSPNR, "   
lv_no_proj  TYPE PRPS, "   
lv_e_objnr  TYPE PRPS-OBJNR, "   
lv_i_pspid  TYPE PROJ-PSPID, "   
lv_proj_gesperrt  TYPE PROJ, "   
lv_i_prte  TYPE PRTEB, "   
lv_e_index  TYPE SY-TABIX, "   
lv_prps_gesperrt  TYPE SY, "   
lv_e_psphi  TYPE PRPS-PSPHI, "   
lv_element_exists  TYPE PRPS, "   
lv_i_flg_testmode  TYPE PRPS, "   ' '
lv_e_prps  TYPE PRPS, "   
lv_wrong_profile  TYPE PRPS, "   
lv_no_proj_profile  TYPE PRPS, "   ' '
lv_wrong_stsma  TYPE PRPS, "   
lv_wrong_stsma_ob  TYPE PRPS, "   
lv_activity_not_allowed  TYPE PRPS, "   
lv_stru_gesp  TYPE PRPS. "   

  CALL FUNCTION 'CJWB_CREATE_PRPS'  "NOTRANSL: Anlegen eines PSP-Elementes
    EXPORTING
         I_PRPS = lv_i_prps
         I_PSPID = lv_i_pspid
         I_PRTE = lv_i_prte
         I_FLG_TESTMODE = lv_i_flg_testmode
         NO_PROJ_PROFILE = lv_no_proj_profile
    IMPORTING
         E_PSPNR = lv_e_pspnr
         E_OBJNR = lv_e_objnr
         E_INDEX = lv_e_index
         E_PSPHI = lv_e_psphi
         E_PRPS = lv_e_prps
    EXCEPTIONS
        NO_PROJ = 1
        PROJ_GESPERRT = 2
        PRPS_GESPERRT = 3
        ELEMENT_EXISTS = 4
        WRONG_PROFILE = 5
        WRONG_STSMA = 6
        WRONG_STSMA_OB = 7
        ACTIVITY_NOT_ALLOWED = 8
        STRU_GESP = 9
. " CJWB_CREATE_PRPS




ABAP code using 7.40 inline data declarations to call FM CJWB_CREATE_PRPS

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 PSPNR FROM PRPS INTO @DATA(ld_e_pspnr).
 
 
"SELECT single OBJNR FROM PRPS INTO @DATA(ld_e_objnr).
 
"SELECT single PSPID FROM PROJ INTO @DATA(ld_i_pspid).
 
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_e_index).
 
 
"SELECT single PSPHI FROM PRPS INTO @DATA(ld_e_psphi).
 
 
DATA(ld_i_flg_testmode) = ' '.
 
 
 
DATA(ld_no_proj_profile) = ' '.
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!