Mass TECO and Close (CLSD) Status Change Program for WBS Elements
Short answer: A custom background program that runs selected WBS elements, or those listed in a file, through checks for open commitments, non-zero balance and open networks, and sets technically completed (TECO) or closed (CLSD) in bulk for those that pass. For every WBS element that fails, the reason is listed.
- Estimated effort
- M · 4–6 working days
- System
- ECC and S/4HANA
- Tables
- 6
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
In CJ20N and CJ02 the status is set by hand for each project or WBS element; a status set at the top of the structure passes down to lower elements but does not check which element is ready to close. For CLSD the zero balance and open commitment checks come back to the user one error message at a time. Companies with hundreds of old WBS elements spend days on this by hand at year end.
Who uses it? Project controllers, cost accounting doing month-end and year-end closing, project offices.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| JESTIndividual Object Status | Object status: TECO or CLSD becomes active here; also read for the current status | Write | ECC + S/4 |
| JCDSChange Documents for System/User Statuses | Status change document | Write | ECC + S/4 |
| PRPSWBS Element Master Data | WBS element: external number, description, object number | Read | ECC + S/4 |
| PROJProject Definition | Project definition (BAPI call per project) | Read | ECC + S/4 |
| RPSCOProject Info Database: Costs, Revenues, Finances | Open requisition and order commitment | Read | ECC + S/4 |
| COSPCO Object: Cost Totals for External Postings | Actual balance (settlement check) | Read | ECC + S/4 |
S/4HANA notes
- COSP → ACDOCA: In S/4HANA COSP is a view, not a table; actual totals are calculated from ACDOCA.
BAPIs and functions used
- BAPI_PS_INITIALIZATIONInitialize PS BAPI Processing. Starts the PS BAPI logical unit
- BAPI_BUS2054_SET_STATUSSet or Reset WBS Element Status. Sets the TECO or CLSD system status on WBS elements
- BAPI_PS_PRECOMMITPrecommit for PS BAPIs. Checks the changes before saving
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves the status changes permanently
- BAPI_TRANSACTION_ROLLBACKRoll Back BAPI Transaction. Rolls back changes in test mode or on error
- STATUS_READRead Object Status. Reads the current statuses of the WBS element
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_PSPID | Project definition | Range / multiple | PROJ-PSPID | No | P-25-0088 |
| S_POSID | WBS element | Range / multiple | PRPS-POSID | No | P-25-0088-03 |
| S_PBUKR | Company code | Range / multiple | PRPS-PBUKR | Yes | 1000 |
| R_TECO | Target status: TECO (otherwise CLSD) | Radio button | — | No | X |
| P_CHKCM | Check open commitments | Checkbox | — | No | X |
| P_CHKBL | Check zero balance (CLSD) | Checkbox | — | No | X |
| P_FILE | WBS list file (optional) | Single value | — | No | C:\temp\wbs_kapanis.xlsx |
| P_TEST | Test mode (check without changing) | Checkbox | — | No | X |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Project | PROJ-PSPID |
| 2 | WBS element | PRPS-POSID |
| 3 | Description | PRPS-POST1 |
| 4 | Current status | Calculated Active system status read with STATUS_READ |
| 5 | Target status | Calculated TECO or CLSD from the selection screen |
| 6 | Open commitment | Calculated Σ RPSCO values (WRTTP 21, 22) |
| 7 | Balance | Calculated Σ COSP actual values (WRTTP 04, all years) |
| 8 | Check result | Calculated Passed or the first failed check |
| 9 | Status | Calculated Changed, skipped or error |
| 10 | Message | Calculated Skip reason or BAPI return message |
Sample result list
| Project | WBS element | Description | Current status | Target status | Open commitment | Balance | Check result | Status | Message |
|---|---|---|---|---|---|---|---|---|---|
| P-25-0088 | P-25-0088-03 | Installation and commissioning | REL | TECO | 0 | 0 | Passed | Changed | System status set to TECO |
| P-25-0102 | P-25-0102-01 | Electrical infrastructure | TECO | CLSD | 0 | 0 | Passed | Changed | System status set to CLSD |
| P-26-0003 | P-26-0003-02 | Mechanical installation | REL | TECO | 18,400 | 0 | Open order commitment | Skipped | 2 open order items assigned to the WBS |
| P-26-0011 | P-26-0011-04 | Testing and acceptance | TECO | CLSD | 0 | 7,250 | Balance is not zero | Skipped | Settle with CJ88 first |
How does the program work?
- WBS elements are read from the selection screen (project, WBS, company code) or from the list given with P_FILE; the current status comes from JEST (STATUS_READ), and those that already have the target status are skipped.
- TECO checks: requisition and order commitments in RPSCO (WRTTP 21, 22) must be zero (P_CHKCM); linked networks must also be TECO or be completed together.
- CLSD checks: the WBS element must already be TECO; the all-year total of actual values (WRTTP 04) in COSP must be zero, meaning it has been settled (P_CHKBL); there must be no open commitment.
- WBS elements that pass are processed per project with BAPI_PS_INITIALIZATION, BAPI_BUS2054_SET_STATUS (target system status TECO or CLSD) and BAPI_PS_PRECOMMIT; in test mode BAPI_TRANSACTION_ROLLBACK follows PRECOMMIT.
- In a real run BAPI_TRANSACTION_COMMIT is done per project; the status change is written to JEST and the change document to JCDS. The result list gives the changed, skipped and failed WBS elements with their reasons.
Performance notes
PS BAPIs open one logical unit per project, so WBS elements are grouped by project. At year end thousands of WBS elements can be processed in one nightly job; locked projects fail and are retried in the next run.
Features
- Test mode (check without posting)
- Line-by-line result and error log
- Runs as a background job
- Send the result by email Skipped WBS elements can be sent to the project managers with their reasons.
Authorization objects
- C_PROJ_TCDAuthorization by project business transaction (status change)
- C_PROJ_KOKProject authorization by controlling area
Frequently asked questions
Can the TECO or CLSD status be reversed?
Yes. Both statuses can be reversed in CJ20N with the business transaction. If needed, the program can be extended with an undo option that returns the same list to its previous status in bulk.
Are linked networks closed as well?
When a WBS element is set to TECO, the linked networks need to be completed too. The program checks the networks and can optionally set the network status in the same run with BAPI_BUS2002_SET_STATUS.
Does the program work on S/4HANA?
Yes. The PS BAPIs and status tables are the same in S/4HANA. On S/4HANA the balance check can be done directly from ACDOCA if preferred.
Packages that include this solution
Project Closing Control Pack
A five-component pack for closing projects without leaving open items behind: a technical completion readiness check, reconciliation of project …
Related reports
Technically Completed WBS Elements with Unsettled Balance Report
A custom ALV report that lists technically completed (TECO) or closed WBS elements that still carry a cost balance, with status date, balance, …
Project Stock Left on Technically Completed or Closed WBS Elements Report
A custom ALV report that lists project stock (special stock Q) still sitting on technically completed (TECO) or closed (CLSD) WBS elements with …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.