PP Program Custom development Mass upload

Mass Routing Creation Upload Program from Excel

Short answer: A custom program that creates material routings in bulk from operation rows in an Excel or CSV file, with header, operations, work centers, control keys and setup/machine/labor standard values. In test mode it checks the work center and material, skips materials that already have a routing and lists the result for each routing.

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

Why is the standard not enough?

CA01 enters one routing on screen, operation by operation; for hundreds of new materials with dozens of operations this takes days. CA85 only replaces work centers in existing routings and does not create new ones. LSMW recordings are sensitive to screen changes and are not recommended in S/4HANA; the Migration Cockpit is for the initial migration. The custom program groups the file per routing and creates it through a BAPI.

Who uses it? Industrial engineering teams introducing new products, PP master data owners and project teams opening a new plant.

Closest standard alternatives

  • CA01 Create Routing. Creates one routing on screen; does not read files.
  • CA85 Replace Work Center in Task Lists. Replaces work centers in existing routings in mass; does not create new routings.

Tables used

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

TableRoleAccessSystem
MARCPlant Data for MaterialExistence of the material in the plantReadECC + S/4
CRHDWork Center HeaderExistence and deletion flag of the work centerReadECC + S/4
PLKOTask List HeaderRouting header: usage, status, lot sizeWriteECC + S/4
MAPLAssignment of Task Lists to MaterialsMaterial – routing assignmentWriteECC + S/4
PLASTask List Selection of OperationsAssignment of operations to the routing counterWriteECC + S/4
PLPOTask List OperationOperations: work center, control key, standard valuesWriteECC + S/4

BAPIs and functions used

  • BAPI_ROUTING_EXISTENCE_CHECKCheck Routing Existence. Checks whether the material already has a routing with the same usage
  • BAPI_ROUTING_CREATECreate Routing. Creates the routing with header, material assignment and operations
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful routings permanently
  • BAPI_TRANSACTION_ROLLBACKRoll Back BAPI Transaction. Rolls back in test mode and for failed routings

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEUpload file (XLSX or CSV)Single value—YesC:\temp\yeni-rotalar.xlsx
P_DATUVValid fromSingle valuePLKO-DATUVYes01.12.2026
P_AENNRChange numberSingle valuePLKO-AENNRNo500000000455
P_TESTTest mode (check without posting)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
1MaterialMAPL-MATNRYes
2PlantMAPL-WERKSYes
3UsagePLKO-VERWEYes
4StatusPLKO-STATUNo
5Lot size fromPLKO-LOSVNNo
6Lot size toPLKO-LOSBSNo
7Routing textPLKO-KTEXTNo
8OperationPLPO-VORNRYes
9Work centerCRHD-ARBPLYes
10Control keyPLPO-STEUSYes
11Operation textPLPO-LTXA1No
12Base quantityPLPO-BMSCHNo
13Setup timePLPO-VGW01No
14Machine timePLPO-VGW02No
15Labor timePLPO-VGW03No
16Time unitPLPO-VGE01No

Sample upload file

1Material *Plant *Usage *StatusLot size fromLot size toRouting textOperation *Work center *Control key *Operation textBase quantitySetup timeMachine timeLabor timeTime unit
2FG-8100100014199,999,999Shelf unit R3 production0010PRES-01PP01Sheet cutting and bending103066MIN
3FG-8100100014199,999,999Shelf unit R3 production0020KAYN-02PP01Welding10151212MIN
4FG-8100100014199,999,999Shelf unit R3 production0030BOYA-01PP01Powder coating102084MIN
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowsCalculated File row range of the routing
2MaterialMAPL-MATNR
3PlantMAPL-WERKS
4OperationsCalculated Number of rows in the group
5Routing groupPLKO-PLNNR
6CounterPLKO-PLNAL
7StatusCalculated Created, test passed, already exists or error
8MessageCalculated BAPI return message or check error

Sample result list

RowsMaterialPlantOperationsRouting groupCounterStatusMessage
2–4FG-810010003500002311CreatedRouting 50000231 saved
5–9FG-820010005ErrorRow 7: work center MONT-09 does not exist in plant 1000
10–12FG-610010003500001441Already existsRouting exists for usage 1
A view built with fictional sample data; not real system data.

How does the program work?

  1. The file (XLSX or CSV) is read; consecutive rows with the same material, plant and usage are grouped into one routing, each row being an operation.
  2. MARC confirms the material exists in the plant, CRHD that the work center is defined for the plant and not flagged for deletion; operation numbers must be ascending and unique.
  3. BAPI_ROUTING_EXISTENCE_CHECK checks whether the material already has a routing with the same usage; if so, the routing is skipped as ‘already exists’.
  4. For valid groups BAPI_ROUTING_CREATE is called with the header (usage, status, lot size range, text), the material assignment and the operations (work center, control key, text, base quantity, VGW01–VGW03 and unit); the valid-from date and change number come from the selection screen.
  5. In test mode the call is rolled back with BAPI_TRANSACTION_ROLLBACK; in a real run each routing is committed separately.
  6. The result list shows routing group, counter, number of operations and the BAPI message; rows of failed routings can be downloaded as an error file.

Performance notes

Each routing is processed with a separate BAPI call and commit; run files above a few thousand operations in the background. Do the work center and material checks in one read with the keys from the file.

Features

  • Test mode (check without posting)
  • Line-by-line result and error log
  • Download failed lines as a separate file All rows of failed routings are downloaded in the same template.
  • Runs as a background job

Authorization objects

  • C_ROUTAuthorization to create routings
  • C_ROUT_MATAssignment of the routing to materials

Frequently asked questions

Can component allocation and production resources/tools be loaded too?

The base template covers operations and standard values. Allocation of BOM components to operations and production resources/tools can be added to the template as separate sheets; each extra object increases the effort range.

Can existing routings be updated?

This program creates new routings. A separate change mode working with change numbers can be added to update standard values in existing routings; the changes can be audited in the routing standard value change report.

Does the program work on S/4HANA?

Yes. BAPI_ROUTING_CREATE is supported on S/4HANA. Because S/4HANA also needs a production version to use the routing, the program can optionally produce a version proposal for the new routing.

Packages that include this solution

PP Package Custom

BOM, Routing and Production Version Pack

A five-component pack that loads, changes and audits production master data: mass routing creation from Excel, mass BOM component changes, an audit of …

5 components · v1.0

Related reports

PP Report Custom ALV report

Routing Standard Value Change Audit Report

A custom ALV report that lists operations changed in routings within a date range, with the old and new setup, machine and labor standard values, the …

PLPO · PLAS · PLKO · MAPL

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 Routing Creation Upload Program from Excel