# Project Definition and WBS Structure Upload from Excel Program

> A custom program that creates the project definition and a multi-level WBS structure in bulk from Excel rows, including descriptions, dates, responsible person, profit center and planning / account assignment / billing indicators. It checks the whole hierarchy in test mode first, then lists the result of every WBS row.

- Type: Program, Custom development, Mass upload
- Module: PS
- Estimated effort: L (7–10 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/project-and-wbs-structure-upload-from-excel-program/


## Why is the standard not enough?

CJ20N creates the project on screen, element by element. Standard templates (CJ91, CJ92) copy the structure but do not take each element's description, dates, responsible person and profit center from a file. The graphical CJ20N screens are not suitable for an LSMW recording. Entering structures with hundreds of elements by hand for every new project takes time and causes errors.

### Closest standard alternatives

- CJ20N: Creates the project on screen element by element; does not read a file.
- CJ11: Creates a single WBS element; does not load a hierarchy in bulk.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| PROJ | Project definition: number, description, profile, company code | Write | - | ECC + S/4 |
| PRPS | WBS element: description, responsible person, profit center and indicators | Write | - | ECC + S/4 |
| PRTE | WBS basic start and finish dates | Write | - | ECC + S/4 |
| PRHI | WBS hierarchy (up, down, neighbours) | Write | - | ECC + S/4 |
| TCJ41 | Project profile check | Read | TCJ41-PROFIDPROJ = PROJ-PROFL | ECC + S/4 |
| TCJ04 | Responsible person check | Read | TCJ04-VERNR = PRPS-VERNR | ECC + S/4 |

## BAPIs and functions used

- BAPI_PS_INITIALIZATION: Initializes the PS BAPI unit of work
- BAPI_BUS2001_CREATE: Creates the project definition
- BAPI_BUS2054_CREATE_MULTI: Creates the WBS elements in bulk in hierarchy order
- BAPI_PS_PRECOMMIT: Runs the consistency checks before saving
- BAPI_TRANSACTION_COMMIT: Saves a successful project permanently
- BAPI_TRANSACTION_ROLLBACK: Rolls back changes in test mode or on error

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| P_FILE | Upload file (XLSX or CSV) | Single value | - | Yes |
| P_TEST | Test mode (check without posting) | Checkbox | - | No |
| P_EXIST | Add WBS elements to an existing project | Checkbox | - | No |

## Input file columns

| Column | Target field | Required |
|---|---|---|
| Project definition | PROJ-PSPID | Yes |
| Project description | PROJ-POST1 | No |
| Project profile | PROJ-PROFL | No |
| Company code (project) | PROJ-VBUKR | No |
| WBS element | PRPS-POSID | Yes |
| WBS description | PRPS-POST1 | Yes |
| Parent WBS (blank = level 1) | PRPS-POSID | No |
| Company code (WBS) | PRPS-PBUKR | No |
| Profit center | PRPS-PRCTR | No |
| Responsible person no | PRPS-VERNR | No |
| Planning element | PRPS-PLAKZ | No |
| Account assignment element | PRPS-BELKZ | No |
| Billing element | PRPS-FAKKZ | No |
| Basic start | PRTE-PSTRT | No |
| Basic finish | PRTE-PENDE | No |

## Result list columns

| Column | Source |
|---|---|
| Row | Calculated: Row number in the file |
| Project | PROJ-PSPID |
| WBS element | PRPS-POSID |
| Level | PRPS-STUFE |
| Description | PRPS-POST1 |
| Profit center | PRPS-PRCTR |
| Status | Calculated: From the BAPI return messages: checked, created or error |
| Message | Calculated: First error or success message from the BAPI return table |

## How does the program work?

1. The file is read; each row is one WBS element and carries the project definition, WBS number, parent WBS number, description, organizational data and dates.
2. Checks: project profile (TCJ41), responsible person number (TCJ04), company code and profit center; WBS numbers must follow the coding mask and every parent must come before its children in the file.
3. BAPI_PS_INITIALIZATION is called; if the project does not exist, the project definition is created with BAPI_BUS2001_CREATE.
4. The WBS elements are created in hierarchy order in one call to BAPI_BUS2054_CREATE_MULTI; the parent and left neighbour are derived from the row order in the file. BAPI_PS_PRECOMMIT then runs.
5. In test mode everything is rolled back with BAPI_TRANSACTION_ROLLBACK; in a real run BAPI_TRANSACTION_COMMIT is done per project. Results and messages are listed per row, and failed rows can be downloaded as a separate file.

## Authorization objects

- C_PROJ_TCD: Create authorization by project business transaction
- C_PROJ_KOK: Project authorization by controlling area
- C_PRPS_PRC: WBS element authorization by profit center

## Frequently asked questions

### Can networks and activities be loaded as well?

The base version covers the project definition and WBS structure. Networks and activities can be added as a second sheet with BAPI_BUS2002_CREATE and the activity BAPIs; this increases the effort range.

### Are budget or planned costs loaded from the same file?

No. Budget and plan values are separate processes with their own approval steps. A separate upload program is recommended for them.

### Can this program be used on S/4HANA?

Yes. The PS BAPIs are supported for classic Project System on S/4HANA. If enterprise projects are used, a separate design with the related APIs is needed.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=ps-project-structure-upload
