PS Program Custom development Background program

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

  • CJ20N Project Builder. Sets the status by hand for a project or WBS element; does not check collectively which ones are ready to close.
  • CJ02 Change Work Breakdown Structure. Changes one WBS element; has no mass processing or check list.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
JESTIndividual Object StatusObject status: TECO or CLSD becomes active here; also read for the current statusWriteECC + S/4
JCDSChange Documents for System/User StatusesStatus change documentWriteECC + S/4
PRPSWBS Element Master DataWBS element: external number, description, object numberReadECC + S/4
PROJProject DefinitionProject definition (BAPI call per project)ReadECC + S/4
RPSCOProject Info Database: Costs, Revenues, FinancesOpen requisition and order commitmentReadECC + S/4
COSPCO Object: Cost Totals for External PostingsActual balance (settlement check)ReadECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
S_PSPIDProject definitionRange / multiplePROJ-PSPIDNoP-25-0088
S_POSIDWBS elementRange / multiplePRPS-POSIDNoP-25-0088-03
S_PBUKRCompany codeRange / multiplePRPS-PBUKRYes1000
R_TECOTarget status: TECO (otherwise CLSD)Radio button—NoX
P_CHKCMCheck open commitmentsCheckbox—NoX
P_CHKBLCheck zero balance (CLSD)Checkbox—NoX
P_FILEWBS list file (optional)Single value—NoC:\temp\wbs_kapanis.xlsx
P_TESTTest mode (check without changing)Checkbox—NoX

Result list columns

#ColumnSource
1ProjectPROJ-PSPID
2WBS elementPRPS-POSID
3DescriptionPRPS-POST1
4Current statusCalculated Active system status read with STATUS_READ
5Target statusCalculated TECO or CLSD from the selection screen
6Open commitmentCalculated Σ RPSCO values (WRTTP 21, 22)
7BalanceCalculated Σ COSP actual values (WRTTP 04, all years)
8Check resultCalculated Passed or the first failed check
9StatusCalculated Changed, skipped or error
10MessageCalculated Skip reason or BAPI return message

Sample result list

ProjectWBS elementDescriptionCurrent statusTarget statusOpen commitmentBalanceCheck resultStatusMessage
P-25-0088P-25-0088-03Installation and commissioningRELTECO00PassedChangedSystem status set to TECO
P-25-0102P-25-0102-01Electrical infrastructureTECOCLSD00PassedChangedSystem status set to CLSD
P-26-0003P-26-0003-02Mechanical installationRELTECO18,4000Open order commitmentSkipped2 open order items assigned to the WBS
P-26-0011P-26-0011-04Testing and acceptanceTECOCLSD07,250Balance is not zeroSkippedSettle with CJ88 first
A view built with fictional sample data; not real system data.

How does the program work?

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

PS Package Custom

Project Closing Control Pack

A five-component pack for closing projects without leaving open items behind: a technical completion readiness check, reconciliation of project …

5 components · v1.0

Related reports

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.

Related report: Mass TECO and Close (CLSD) Status Change Program for WBS Elements