PS Program Custom development Interface

Primavera / MS Project Schedule Import to Network Activities Interface

Short answer: A custom interface program that transfers activity duration, work and constraint dates updated in the scheduling tool (Primavera P6, MS Project or Excel) to SAP network activities via a file. Project planners keep the schedule in one place, and cost planning, capacity and material requirement dates in SAP stay current.

Estimated effort
M · 5–7 working days
System
ECC and S/4HANA
Tables
4
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

CN22 and CJ20N change network activities one by one; there is no standard transaction that takes updates from an external scheduling tool from a file in a scheduled and controlled way. As a result the dates in the two systems quickly drift apart. The custom interface matches the activities, writes only changed values and keeps a log of every transfer.

Who uses it? Project schedulers, project control (PMO) teams and project managers.

Closest standard alternatives

  • CN22 Change Network. Changes network activities one by one; no scheduled transfer from a file.
  • CJ20N Project Builder. Dates and durations are updated manually in the Project Builder; no comparison with the external plan and no log.

Tables used

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

TableRoleAccessSystem
AFVVQuantities, Dates and Values of Order OperationsActivity quantities and dates: duration, work, constraint types and constraint datesWriteECC + S/4
AFVCOperation within an OrderNetwork activity: activity number, description, WBS assignmentReadECC + S/4
AFKOOrder Header Data for PP OrdersNetwork header: routing numberReadECC + S/4
PRPSWBS Element Master DataWBS element shown in the logReadECC + S/4

BAPIs and functions used

  • BAPI_PS_INITIALIZATIONInitialize PS BAPI Processing. Initializes the PS BAPI buffer for each network
  • BAPI_BUS2002_ACT_CHANGE_MULTIChange Network Activities. Updates duration, work and constraint dates of the changed activities
  • BAPI_PS_PRECOMMITPrecommit for PS BAPIs. Runs the PS consistency checks before saving
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful networks permanently
  • BAPI_TRANSACTION_ROLLBACKRoll Back BAPI Transaction. Rolls back changes in test mode or on error

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEFile or server folderSingle value—Yes/interface/ps/schedule/
P_SERVERRead from application serverCheckbox—NoX
P_ONLYCHWrite changed values onlyCheckbox—NoX
P_TESTTest mode (check without saving)Checkbox—NoX

Input file columns

The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.

#ColumnTarget fieldRequired
1NetworkAFKO-AUFNRYes
2ActivityAFVC-VORNRYes
3Activity description (for checking)AFVC-LTXA1No
4Normal durationAFVV-DAUNONo
5Duration unitAFVV-DAUNENo
6WorkAFVV-ARBEINo
7Work unitAFVV-ARBEHNo
8Start constraint typeAFVV-EINSANo
9Constrained start dateAFVV-NTANFNo
10Finish constraint typeAFVV-EINSENo
11Constrained finish dateAFVV-NTENDNo

Sample upload file

1Network *Activity *Activity description (for checking)Normal durationDuration unitWorkWork unitStart constraint typeConstrained start dateFinish constraint typeConstrained finish date
240002150010Basic design15DAY240H112/01/2026
340002150020Detailed engineering25DAY600H
440002150050Site installation30DAY1,440H103/01/2027204/15/2027
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2NetworkAFKO-AUFNR
3ActivityAFVC-VORNR
4Activity descriptionAFVC-LTXA1
5New durationAFVV-DAUNO
6Constrained startAFVV-NTANF
7Changed fieldsCalculated List of the fields that differ between file and AFVV
8StatusCalculated Updated, no change or error
9MessageCalculated First error or success message from the BAPI return table

Sample result list

RowNetworkActivityActivity descriptionNew durationConstrained startChanged fieldsStatusMessage
240002150010Basic design1512/01/2026Duration, constrained startUpdatedActivity 0010 changed
340002150020Detailed engineering25No changeValues equal to SAP
440002150050Site installation3003/01/2027Work, constraint datesErrorActivity partly confirmed; work cannot be reduced below confirmed work
A view built with fictional sample data; not real system data.

How does the program work?

  1. The file is read from the local PC or a folder on the application server; network and activity number are the mandatory key fields.
  2. The routing number (AUFPL) of the network is found in AFKO; the activity (VORNR) is matched in AFVC. Rows without a match become errors.
  3. The current duration (DAUNO/DAUNE), work (ARBEI/ARBEH), constraint types (EINSA/EINSE) and constraint dates (NTANF/NTEND) in AFVV are compared with the file; with “changed only” selected, rows without differences are skipped.
  4. For each network BAPI_PS_INITIALIZATION is called, changed activities are updated with BAPI_BUS2002_ACT_CHANGE_MULTI and BAPI_PS_PRECOMMIT is run.
  5. Without errors the changes are saved with BAPI_TRANSACTION_COMMIT; in test mode or on error BAPI_TRANSACTION_ROLLBACK runs. Old and new values are written to the log; a server file is moved to an archive folder after processing.

Performance notes

Read AFKO, AFVC and AFVV in one pass with the network numbers from the file. Call the BAPI once per network with all changed activities, not once per activity. When scheduled as a nightly job, choose hours when users are not changing the same networks.

Features

  • Test mode (check without posting)
  • Line-by-line result and error log
  • Download failed lines as a separate file Failed rows are returned to the scheduler as a file for correction.
  • Runs as a background job
  • Send the result by email A summary of each transfer can be sent to the project scheduler.

Authorization objects

  • C_AFKO_AWKChange authorization by network type
  • C_PROJ_KOKProject authorization by controlling area

Frequently asked questions

How are activity codes in the scheduling tool matched to SAP?

The simplest way is to use a code field in the scheduling tool that holds the SAP network and activity number. If that is not possible, a mapping table is kept and the program translates the code in the file through it.

Is the network rescheduled after the transfer?

If scheduling on save is set in the network profile, SAP recalculates the dates when saving. If not, a separate scheduling job can be planned after the transfer; this step is optional.

Does it work on S/4HANA?

Yes. BAPI_BUS2002_ACT_CHANGE_MULTI and the network tables are supported in S/4HANA. For the read side, the CDS view I_NetworkActivityByInternalKey can be used for a clean core approach.

Packages that include this solution

PS Package Custom

Project Planning and Earned Value Pack

A four-component pack that brings the project plan into SAP and measures performance with earned value: WBS cost plan upload from Excel, transfer of …

4 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: Primavera / MS Project Schedule Import to Network Activities Interface