PS Program Custom development Interface

Network Activity Confirmation Upload from Weekly Timesheets Program

Short answer: A custom interface program that posts personnel, network, activity, date and hours rows from an external time tracking tool or an Excel timesheet as network activity confirmations in bulk. It skips rows already posted, checks in test mode and lists the confirmation number of every row.

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

Why is the standard not enough?

CN25 enters each confirmation on screen one at a time; the CN27 collective confirmation screen also needs the rows typed in. CATS requires every employee to record in CATS and an approval process. Companies that keep time records in an external tool or Excel need an upload that reads a file and prevents duplicate postings to transfer the weekly hours to the network.

Who uses it? Project controllers, engineering team leads and project offices that keep time records outside SAP.

Closest standard alternatives

  • CN25 Confirm Completions in Network. Enters a single activity confirmation on screen; does not read a file.
  • CAT2 Time Sheet: Maintain Times. Keeps time records in CATS; requires every employee to use CATS and a transfer/approval process.

Tables used

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

TableRoleAccessSystem
AFRUOrder ConfirmationsConfirmation record: personnel, hours, date, final flag; also read for the duplicate checkWriteECC + S/4
AFVVQuantities, Dates and Values of Order OperationsActivity actual work total (updated by the confirmation)WriteECC + S/4
AFVCOperation within an OrderActivity existence and work center checkReadECC + S/4
AUFKOrder Master DataNetwork existence and plantReadECC + S/4
JESTIndividual Object StatusNetwork status (released, not technically completed)ReadECC + S/4

BAPIs and functions used

  • BAPI_NETWORK_CONF_ADDAdd Network Confirmations. Posts network activity confirmations in bulk
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful confirmations 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/timesheet/
P_SERVERRead from application serverCheckbox—NoX
P_TESTTest mode (check without posting)Checkbox—NoX
P_SKIPDSkip rows already postedCheckbox—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
1Personnel noAFRU-PERNRNo
2NetworkAFRU-AUFNRYes
3ActivityAFRU-VORNRYes
4Posting dateAFRU-BUDATYes
5Actual workAFRU-ISMNWYes
6UnitAFRU-ISMNENo
7Activity typeAFRU-LEARRNo
8Final confirmation (X)AFRU-AUERUNo
9Confirmation textAFRU-LTXA1No

Sample upload file

1Personnel noNetwork *Activity *Posting date *Actual work *UnitActivity typeFinal confirmation (X)Confirmation text
2100454000123002011/13/20268HMUH01Mechanical drawing revision
3100524000131001011/13/202610HSAHA1Site setup
4100454000123002011/13/20268HMUH01Mechanical drawing revision
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2NetworkAFRU-AUFNR
3ActivityAFRU-VORNR
4Personnel noAFRU-PERNR
5Actual workAFRU-ISMNW
6Confirmation noAFRU-RUECK
7Confirmation counterAFRU-RMZHL
8StatusCalculated Posted, skipped (duplicate) or error
9MessageCalculated First error or success message from the BAPI return table

Sample result list

RowNetworkActivityPersonnel noActual workConfirmation noConfirmation counterStatusMessage
240001230020100458000007184200000014PostedConfirmation saved
3400013100101005210000007190700000006PostedConfirmation saved
440001230020100458SkippedA confirmation already exists for the same person, activity and date
A view built with fictional sample data; not real system data.

How does the program work?

  1. The file is read from the user’s PC or, in a background job, from a folder on the application server; each row carries personnel number, network, activity, posting date, hours, unit, activity type, final confirmation flag and text.
  2. Checks: the network and activity must exist and be released and must not be technically completed; hours must be above zero; the activity type must fit the activity.
  3. Duplicate check: if a non-cancelled (STOKZ blank) AFRU confirmation already exists for the same personnel number, network, activity and date, the row is skipped.
  4. Rows are grouped by network and posted with BAPI_NETWORK_CONF_ADD; in test mode the BAPI is called with its test flag and BAPI_TRANSACTION_ROLLBACK follows.
  5. In a real run BAPI_TRANSACTION_COMMIT is done per network; the confirmation number and counter (RUECK, RMZHL) are written to the result list. The processed file is moved to an archive folder and failed rows are written to a separate file.

Performance notes

Weekly files are usually a few thousand rows and are processed in minutes as a nightly job. Committing per network is enough for locking and error isolation. Rows that fail because the same network is locked in CN25 at the same time can be retried.

Features

  • Test mode (check without posting)
  • Line-by-line result and error log
  • Download failed lines as a separate file Failed rows can be corrected and uploaded again with the same template.
  • Runs as a background job Files in the server folder are processed automatically by a nightly job.

Authorization objects

  • C_AFRU_AWKConfirmation posting authorization by plant and order type
  • C_AFKO_AWKNetwork authorization by plant and order type

Frequently asked questions

Is the personnel number mandatory?

No. If cost and capacity are not tracked per person, the confirmation can be posted with only network, activity, date and hours. If a personnel number is given, it is checked against the HR master data.

How are wrongly uploaded confirmations reversed?

They are cancelled with CN29 or BAPI_NETWORK_CONF_CANCEL using the confirmation number and counter in the result list. A mass cancel option can be added to the program if needed.

Can this program be used on S/4HANA?

Yes. BAPI_NETWORK_CONF_ADD is supported for classic networks on S/4HANA.

Related reports

PS Report Custom ALV report

Network Activity Planned vs Actual Work Hours Report

A custom ALV report that compares planned work with confirmed actual work on network activities and lists the remaining hours, completion percentage, …

AUFK · AFKO · AFVC · AFVV

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: Network Activity Confirmation Upload from Weekly Timesheets Program