PS
Function module
Used the same way in S/4HANA
CJPN_GET_WBS_ELEMENT Read WBS Element
Reads one WBS element record (PRPS) by internal number, external number or object number and returns key fields such as the project, priority and short text. Custom ABAP code uses it as a buffered lookup, for example to convert a WBS element between external and internal number. It is not remote-enabled; handle the NOT_FOUND and INPUT_ERROR exceptions and set NO_BUFFER when you need a fresh read.
- Function group
- CJPN
- Remote-enabled (RFC)
- No
- Type
- Function module
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| I_PSPNR | PRPS-PSPNR | WBS element (internal number) | — |
| I_POSID | PRPS-POSID | WBS element (external number) | — |
| I_OBJNR | PRPS-OBJNR | Object number of the WBS element | — |
| I_INDEX | SY-TABIX | Log line for message handling | — |
| NO_BUFFER | RCWBS-SEL01 | Read directly from the database | — |
| NO_MESG_COLLECT | RCWBS-SEL01 | Do not collect messages | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| E_PRPS | PRPS | Selected WBS element record |
| E_PSPNR | PRPS-PSPNR | WBS element (internal number) |
| E_PSPHI | PRPS-PSPHI | Project definition (internal number) |
| E_GRPKZ | PRPS-GRPKZ | Grouping WBS element indicator |
| E_PSPRI | PRPS-PSPRI | WBS element priority |
| OBJNR_EXP | PRPS-OBJNR | Object number of the WBS element |
| KTEXT | CLIKE | WBS element short text |
Exceptions
- INPUT_ERROR — Neither OBJNR, POSID nor PSPNR specified
- NOT_FOUND — WBS element does not exist
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'CJPN_GET_WBS_ELEMENT'
IMPORTING
e_prps = lv_e_prps
e_pspnr = lv_e_pspnr
e_psphi = lv_e_psphi
e_grpkz = lv_e_grpkz
e_pspri = lv_e_pspri
objnr_exp = lv_objnr_exp
ktext = lv_ktext
EXCEPTIONS
input_error = 1
not_found = 2
OTHERS = 3.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.