SAP Production Scheduling & WIP | WL Plastics Case Study | Ayoka
SAP Integration, Production Scheduling, Work Orders & WIP / Production Progress

WL Plastics Scheduler

Ayoka developed a manufacturing scheduling application that pulls open sales-order lines and inventory from SAP Business ByDesign over OData/HTTP, normalizes them into its own SQL-backed operational model, assembles facility-level demand, and lets planners schedule products to production lines. It creates and tracks work orders, records actual production against work orders, adjusts remaining scheduled quantity, and exports shop-floor job information as XML for ShopLogix. SAP is the inbound order/inventory system of record; the reviewed SAP integration contains no SAP posting or production-confirmation endpoint.

Production-progress visibility is implemented. This system enabled a more comprehensive WIP accounting ledger, automatic machine telemetry ingestion, capacity optimization engine, SAP write-back, and demonstrated KPI improvements.

SAP Business ByDesignOrders & inventory
Multi-Plant SchedulingFacility & line rules
Work Orders & WIPProduction progress
ShopLogixOutbound job specifications

ERP demand to production execution

SAP OrdersCustomer demand
InventoryPlant availability
ScheduleLines, rates, sequence
Work OrdersShop-floor instructions
Production ProgressActual vs. remaining

1. Project background and intended outcomes

WL Plastics is a North American polyethylene-pipe manufacturer whose acquisition of multiple facilities and growing demand made flexible, scalable scheduling necessary. The organization previously relied on older scheduling software with significant customization requirements. The stated purpose was a more flexible, maintainable scheduler capable of supporting future development and enhancements. The design explicitly called for user-experience collaboration, domain modeling, and production-data integration.

The scope included modeling product demand, open orders, product requirements, scheduling rules, work-order generation and SAP as the system of record.

What the system addresses

  1. Relieves manual transfer of SAP customer demand into an isolated production schedule by retrieving sales orders and inventory programmatically.
  2. Gives schedulers a consolidated view of product, customer, requested date, fulfilled quantity, available stock, applicable facilities/lines and production rates.
  3. Translates demand into scheduled line positions and production work orders, including variants and conduit-component needs.
  4. Makes actual output entries visible against the work order, allowing remaining quantity and remaining runtime to be recalculated.
  5. Provides an outbound machine/job interface to ShopLogix via file-based XML rather than requiring operators to rekey every work-order parameter.

2. System architecture and integration boundaries

System / layerOwnership and verified responsibilities
SAP Business ByDesignRead-only OData analytical query result sets for sales orders and inventory. Filters by selling organization or site.
Scheduler API / applicationASP.NET Core/C# services; data reconciliation, demand aggregation, scheduling, work order actions, production entry, exports.
Scheduler operational databaseEntity Framework Core records open orders, inventory snapshots, schedule lines, production rates, work orders, production events, facilities and maintenance.
WLP master-data databaseSeparate EF DbContext with product masters, BOM components, customer master, locations, base product numbers, print templates and ShopLogix templates.
Web applicationVue/TypeScript scheduling board, demand summary, user permissions, work-order modals, production entry and refresh.
ShopLogixDistinct outbound XML file generation through a configurable template and facility export path; no confirmation receiver evidenced.
Other user interfacesMaster Products Database; TrackVia; work-order CSV export.

Facility identification

The scheduler distinguishes a plant/site ID (Location.LocationSapId) from a sales organization (Location.LocationSales). On refresh it retrieves SAP sales orders for the selling organization associated with the selected plant, while inventory is retrieved for the plant code itself. The resulting open-order and stock caches are accordingly keyed by different organizational dimensions. This distinction is essential when implementing additional plants or troubleshooting orders that appear in one plant but not another.

3. SAP transport, API endpoints and authentication

The SAP adapter is SapService (ISapService). It exposes GetSalesOrder(facilityCode) and GetInventory(facilityCode), constructs URLs using string.Format against configured templates, and sends HTTP GET using BaseHttpService. The base HTTP class creates an HttpClient, adds an Authorization header using the configured Basic authentication string, parses the HTTP response as JSON, and surfaces HTTP error reasons through a UserFriendlyException. This is an SAP Business ByDesign analytics OData integration, not an RFC/BAPI or IDoc connector.

Setting / contractObserved behavior
SAP service rootsap/byd/odata/ana_businessanalytics_analytics.svc on the configured SAP Business ByDesign tenant.
Sales-order query entityanalytics query result set.
Inventory query entityanalytics query result set.
Wire formatOData v2-style JSON wrapper: d.results.
AuthenticationHTTP Basic authorization from SapConfiguration/AuthSettings.
FiltersSales: sales organization plus product, status and fulfillment predicates. Inventory: site and product group predicate.
LimitBoth configured URLs contain $top=400.
WritebackNo POST/PATCH/PUT to SAP; GET for both SAP resources.

The application configuration sets SAP query names and select/filter strings. Changes in a SAP analytical query, tenant, or field identifier may affect the integration.

4. Sales-order extraction: field-level contract

The imported payload corresponds to the Sales Order Detail. Below are key property mappings used in the application.

Application meaningPurpose downstream
SalesOrderNumberUnique order document ID
SalesItemNumberComposite order-line reconciliation key
CreatedDateCreation date
AccountNumberCustomer master join
ProductNumberProduct master join
ProductSpecProduct specification text
VariantConduit/BOM and inventory variant grouping
QuantityRequestedSales demand quantity
QuantityFulfilledCompleted fulfillment deduction
RequestedDateRequired date/priority context
SalesOrganizationSelling organization cache partition
StatusHeaderIdPost-query exclusion when equal to "4"
ItemStatusIdSelected in API and filtered at server level
PurchaseOrderNumberMapped locally as PurchaseOrder
SpecialInstructionsPreserved through demand/work-order display
ShipToCityCustomer destination context
ShipToStateCustomer destination context
Display statusesText display status and item lifecycle

5. Inventory extraction and inventory-use rules

Mapped value / handling
Site code; response class property is misleadingly named SalesOrderNumber; mapped to InventoryItem.LocationName.
PartNumber -> InventoryItem.ProductNumber.
IStockId; GetStockId strips the product prefix to provide a stock/batch identifier.
UnitOfMeasure -> UnitMeasure.
InventoryValue -> QuantityOnHand. SAP metadata labels this measure Un-Restricted Stock.
DateLastCounted retained as string.
DateLastPickup mapped to LastPickupDate.
Variant; used with product number for matching inventory to demand.

On each direct SyncDemandSummary call, the code filters out entries whose InventoryValue equals zero, deletes all existing local InventoryItem rows for the selected facility, and inserts the newly fetched rows. Thus this is a full facility snapshot refresh, not a stock-movement ledger or incremental difference reconciliation. It provides availability context for planning, not warehouse transaction provenance. The older UpdateInventory background-job class uses an upsert keyed only by ProductNumber and is separate from the primary refresh method; no call site was found for that job in the supplied code.

For ordinary product demand, the code groups inventory by ProductNumber + Variant and aggregates matched amounts; this helps prevent stock belonging to another specification from being treated as interchangeable. For conduit, the code additionally compares identified stock identifiers to correlate finished goods and component inventory.

6. SAP-to-scheduler synchronization

  1. Resolve the currently selected LocationSapId to a Location master row and fetch its LocationSales value.
  2. Issue SAP sales-order GET by sales organization, discard select payload records with a certain header status.
  3. Issue SAP inventory GET by plant/site code, dropping records with an exact zero stock value.
  4. Load existing scheduler open orders, schedule lines, active work orders and inventory for the facility.
  5. Before order reconciliation, recalculate existing production-line start dates in line order using previous remaining hours.
  6. Find orders no longer present in SAP. Delete those without linked noncompleted work orders; retain orders with active linked work orders but set QuantityRequested to zero.
  7. Insert newly returned order-line pairs and update existing matching pairs (SalesOrderNumber + SalesItemNumber) using bulk repository methods.
  8. Delete schedule lines not linked to any work order and no longer backed by an open-order row (excluding maintenance lines).
  9. Bulk delete the facility inventory cache and insert nonzero SAP inventory records.
  10. Return success. A separate facility-sync-time endpoint writes a timestamp and the frontend invokes it on successful explicit refresh.

7. Demand construction and order-to-product joins

DemandSummary processing combines several sources rather than simply displaying unmodified SAP rows: (1) locally cached open orders; (2) master-data customer name matching; (3) product master and product-child relationships; (4) inventory per plant/product/variant; (5) production rates; and (6) existing schedule/work-order/production records. The code does an inner join between open orders and pipe products, so an SAP product absent from the product master will not enter the resulting product-demand list.

For pressure-pipe (single-stage) demand, the calculation is RequestedQuantity minus QuantityFulfilled when the requested quantity is positive. The demand is grouped by product number, variant and product-specification text. The system tracks each underlying order line/customer as a separate DemandSourceDto, with sales item, customer, order, required date, special instructions, PO, current scheduled quantity and linked work orders.

For conduit (multistage) demand, the system groups by parent finished product and variant, looks up component products/BOM relationships, identifies related component stock, and converts requested finished-product footage into component demand using product master length and BOM InputQuantity. The source explicitly distinguishes conduit from non-conduit products; conduit requirements are not a generic unstructured order list.

8. Production scheduling capabilities

WL Plastics demand summary and production schedule board
Demand Summary and Schedule Board. The production planning interface connects customer demand with production lines, run rates, work orders and scheduled run times.
CapabilityConfirmed implementation
Facility and line assignmentScheduleLine records retain Facility, LineNumber and OrderInSchedule; scheduling UI supports selecting a suitable line and inserting/reordering jobs.
Product/line compatibilityFacilityLine OD minimum/maximum compared with product support; rates stored per base product, plant and production line.
Estimated production timeQuantity (ft) × LbFt = pounds; pounds ÷ configured production rate = hours.
Rate selectionDefaultRunRate and CurrentRunRate stored on each scheduled row; editable production rates by line.
Sequence and start dateLine rows ordered by OrderInSchedule; start of each following row based on previous row StartDate + HoursRemaining.
Maintenance blocksIsMaintenance and MaintenanceReasonId permit scheduling nonproduction downtime on the same board.
Demand visibilityDemand Summary grouped by product and customer, with available inventory, outstanding sales demand and currently scheduled quantity.
Line filtering / drag-and-dropVue components support line and search filters and draggable scheduling actions.
Scheduled versus remainingScheduledQuantity persists original planned footage; UpdatedQuantityToProduce represents remaining footage after recording.

The design addresses a maintenance duration, filtering demand by production line, showing product specifications, and placing demand onto a line by drag-and-drop. These workflows have supporting implementation in the Vue UI and C# services.

9. Scheduling mathematics and production quantities

MetricCode-supported derivationExample (illustrative only)
Open sales demandRequestedQuantity − QuantityFulfilled if request > 010,000 ft − 2,000 ft = 8,000 ft
Required production weightQuantityToProduce × LbFt8,000 ft × 4.0 lb/ft = 32,000 lb
Estimated hoursQuantityInPounds ÷ line RunRate32,000 lb ÷ 2,000 lb/hour = 16 hr
Remaining scheduled ftScheduledQuantity − Σ WorkOrderProduction.RecordedValue8,000 ft − 3,000 ft = 5,000 ft
Remaining hoursRemaining ft × LbFt ÷ CurrentRunRate5,000 × 4 ÷ 2,000 = 10 hr
Conduit component demandFinished footage ÷ finished piece length × BOM input quantity400 ft ÷ 20 ft/piece × 2 = 40 component units (if consistent units)
Next scheduled startPrevious scheduled start + previous HoursRemaining8:00 + 10 hours = 18:00 (time/calendar rules must be validated)

For an open work order, GetScheduleBoard recalculates HoursRemaining from UpdatedQuantityToProduce, LbFt and CurrentRunRate, then rounds upward to the next one-tenth of an hour. Production-rate service returns zero estimated time when the configured rate is zero; other paths divide by CurrentRunRate without an explicit local guard, so validation is important. The first line starting at the shift start and subsequent activities chaining from previous durations; the actual code uses a timezone-aware SetToCurrentDate helper and stored start values.

10. Production work orders: creation, enrichment and lifecycle

WL Plastics work order scheduling interface
Work-order scheduling. The scheduler carries customer, sales-order, production-line, run-rate and estimated-time information into the work-order workflow.

The scheduler creates a WorkOrder connected to a ScheduleLine (and thus indirectly to an SAP order line when OpenOrderId is populated). The WorkOrder entity retains facility, production line, product number, creation date, work-order number, natural resin, print-line details, special instructions, completion flag, ShopLogix export-failure flag, and linked production entries. The full work-order retrieval joins schedule line, facility information, product master, base product, selected open order and rate information to assemble shop-floor instructions.

The generated work-order information includes customer and plant; scheduled footage, updated remaining footage, run rate, estimated run time and line; product number, description, cut length, OD/diameter and DR; tolerances such as minimum/maximum wall and OD; size system, pressure class, stripes, stamps and standards; resin and relevant plant certification flags; customer number, specification and print-line instructions. This supports accurate manufacturing setup and reduces the need to reconstruct production details manually from separate systems.

Creating a work order saves it and then attempts a ShopLogix XML export. Failure is reported to the UI and the work order is flagged FailedToExportXml for follow-up. The app also offers an XML retrieval/explicit export endpoint, enabling export retrial. Completion changes IsCompleted to true and deletes (soft-deletes under the ScheduleLine model) the related schedule board row.

11. Production recording and WIP-related visibility

WL Plastics production recording and remaining work interface
Production progress and remaining work. Actual production is recorded against the work order so the remaining balance can be recalculated and kept visible to planners.

The most defensible description is “work-order-level production-progress and remaining-work tracking.” The WorkOrderProduction table holds RecordedValue, ProductionDate, CreationTime and WorkOrderId. An operator uses the Vue production-details screen to enter actual production against a specific work order, after which the application stores the entry and updates the corresponding scheduled board row. Existing production events can also be edited by ID.

On SaveSchedule, the server aggregates WorkOrderProduction.RecordedValue for each ScheduleLineId and sets UpdatedQuantityToProduce = ScheduledQuantity − total recorded production. On the demand summary, it displays CurrentScheduled = sum scheduled quantity − production recorded against linked work orders. This allows a scheduler to distinguish an 8,000-foot job with 3,000 feet produced from a job whose full 8,000 feet remain. An open WorkOrder keeps an associated sales order from being discarded during synchronization even if SAP no longer returns it; the external order’s QuantityRequested is set to zero in that scenario.

WIP View Summary

FeaturesReporting
Work orders in progress / completion flagFinancial WIP valuation by labor, material and overhead
Per-entry actual production amount and production dateAutomated PLC/SCADA machine count acquisition
Remaining scheduled footage and run hoursOperation-by-operation routing and percent completion
Work order–schedule–SAP order-line traceabilityLot genealogy, consumption journals or quality release
Production history tied to a work orderScrap/rework/variance posting to SAP ERP
Plant/line assignment and maintenance scheduleAutomatic backflush of resin and components
ShopLogix export job templateVerified return telemetry and closed-loop job status

Important interpretation: WIP is a manufacturing term with several meanings. In this application the code provides operational WIP progress (“what remains to run”), rather than documented inventory accounting status (“what materials/costs currently sit at each manufacturing stage”). Those should not be conflated in commercial or legal claims.

12. Conduit / multistage production and component-level planning

The conduit path is materially more complex than single-stage pipe demand. The master data represents finished products and child component products through ProductComponent, including OutputProductId, InputProductId, ProductSpec, BomId, BomVariant and InputQuantity. For each finished-product order and matching variant, ConduitDemandNewDto discovers child products, converts finished-item demand into component amounts, locates stock matching product and identified-stock suffix, and surfaces separate demand source rows and product information to the scheduler.

A component’s demand includes the customer demand converted by finished-piece length and BOM input quantity. The code can also present combined availability derived from finished-goods equivalent units plus component inventory. This helps planners see that a finished conduit product needs specific precursor material/components even though SAP sales demand is for the finished product. This is evidence of multistage demand decomposition and component-aware scheduling support, not proof that materials were issued, reserved or consumed in SAP.

The separate conduit part-number generator workbook contains unit/component/reel/PSIS request forms, standard data, product lists and identified-stock reference worksheets. It corroborates the business significance of variant-specific manufacturing, but is a reference/master-data aid rather than a demonstrated runtime SAP interface.

13. ShopLogix integration: separate from SAP

The implemented shop-floor output is an XML export, not an SAP OData write. WorkOrderXmlExporter reads a ShopLogix template from the master database, resolves work-order placeholders, XML-serializes a JobScheduleEdit payload, and writes an XML file named after the work-order number in the configured facility ShopLogixPath. The parser supports machine ID, action, job name, description, filters, due date, expected run speed, expected production quantity, cycle factors and setup expectations.

Template token examplesSource data
PlantPrefix; LineNumber; WorkOrderNumberPlant identification and job key
ProductID; ProductDescription; BasePartNumberMaterial and product master data
ProductSpecification; PrimaryApp; SecondaryAppSpecification and application
RequestedDateOrder requested date
JobRateValue; JobRateThreshholdFacility/product production-rate settings
LbFt; CycleFactor; InvCycleFactorPipe unit weight and derived cycle values
QTYInPounds; Length; ProductODProduction target and dimensions

The code shows file creation and a success/failure flag but no file acknowledgment, job-completion callback, inbound ShopLogix event feed or downstream SAP confirmation. Accordingly, the system can be described as preparing and transmitting job specifications to shop-floor software via XML. Fully automated ShopLogix production feedback is not proven.

14. Database and entity relationships

EntityKey data / relationship
OpenOrderSAP SalesOrderNumber + SalesItemNumber; status, requested/fulfilled quantity, dates, product, customer account and variant. Has many ScheduleLines.
InventoryItemFacility, product, variant, identified stock, unit, quantity, count/pickup dates. Full refreshed snapshot.
ScheduleLineFacility, line, sequence, product, planned amount, remaining amount, start date, run rate, downtime, optional OpenOrderId, many WorkOrders.
WorkOrderWorkOrderNumber, ScheduleLineId, product, facility, resin, line, completed/export statuses; many WorkOrderProductions.
WorkOrderProductionWorkOrderId, RecordedValue, ProductionDate, CreationTime; individual production-progress entries.
ProductionRate / ProductionRateLineBase product and per-facility/line production rate, job threshold.
FacilityInfo / FacilityLineShift start and supported production lines; per-line operating constraints.
ProductMaster / ProductComponentWLP master DB product attributes and BOM child/parent relationships.
Location / CustomerSales/plant crosswalk; customer account master enrichment.
FacilitySyncTimePer-facility last reported sync timestamp.
MaintenanceReasonCategorized production-line downtime item.

There are two EF Core contexts. WlpSchedulerDbContext stores operational scheduling and production-progress data; WlpMasterDataDbContext holds reference product, customer, location and template data. It is important to preserve cross-database identifiers when migrating the system. The uploaded archive provides entity classes and EF configurations; actual live schema, indexes, migrations deployed to the client and SQL contents have not been authenticated against an operational database.

15. UI and operational workflows

WL Plastics facility schedule selection interface
Multi-facility scheduling. Planners can select the facility schedule they need to manage within the same scheduling application.

Planner refresh

At the Demand Summary screen, an authorized writer clicks Refresh; SAP open orders and inventory are imported, reconciliation occurs, demand is recalculated and the board is reloaded.

Demand review

Planner searches or filters demand, examines due dates, product specs, inventory and customer/order requirements, and selects a sales demand source.

Scheduling

Planner selects a compatible production line and desired quantity, with run rate and estimated time available, then drags/adds a schedule row; sequence and remaining hours are tracked.

Work order

Authorized planner generates a work order for a scheduled product/line, chooses resin/batch/print details and saves; system tries ShopLogix XML export.

In-process production

Operator opens the work order, adds actual production amount and production date, and sees scheduled remaining quantity reduced.

Maintenance downtime

Planner adds a nonproduction schedule item with duration/reason so a scheduled line accounts for downtime.

Closeout

User marks a work order complete; active schedule line is removed. Production records remain linked historically in the database unless separately removed.

16. Source-to-design comparison

Key requirementsObserved implementation
SAP source of recordSAP inbound sales and inventory OData; no SAP writes
Import open ordersDirect service and facility synchronization
Display product requirementsProduct/demand DTOs + Vue demand screens
Rules for scheduling logicFacility/line compatibility, rates and schedule sequencing
Work-order generationDB work-order creation, rich print information, ShopLogix XML
Master Products Database readSeparate EF context and product/BOM joins
Export Work Order CSVActual implementation exports ShopLogix XML
TrackVia reading SQL/fileNo direct TrackVia client found in reviewed source
Maintenance time on boardIsMaintenance, downtime reason and schedule entries
Record production against WOWorkOrderProduction and operator UI/API
Automatic machine-led WIP trackingNo inbound telemetry pipeline found

19. Business value

This solution demonstrates a significant integration and manufacturing-operations case study: Ayoka built a bridge from ERP customer orders and inventory into a manufacturing planning layer that applied plant-specific run rates, production line suitability, product variations and conduit BOMs. It kept planned production connected to sales-order demand, gave operators structured production work orders, and captured actual completed footage so planners could see the remaining run. A separate ShopLogix export path moved job definitions toward the shop floor.

For Manufacturing Buyers

Questions buyers ask about SAP production scheduling and WIP

When does a manufacturer need custom production scheduling software instead of the ERP scheduling module?
This case illustrates the need for a separate manufacturing scheduling layer when production decisions depend on plant-specific line capabilities, product rules, run rates, sequencing, maintenance time, multistage component demand and work-order progress that are not represented by the inbound ERP order and inventory data alone.
Can SAP orders and inventory feed custom production scheduling software?
Yes. In the WL Plastics implementation, SAP Business ByDesign remained the inbound system of record for sales orders and inventory. The scheduler retrieved those records programmatically, normalized them into its operational model and used them to construct production demand.
How do you integrate SAP Business ByDesign with production scheduling?
The reviewed implementation uses SAP Business ByDesign analytics OData over HTTP to retrieve sales-order and inventory query results. The scheduler then reconciles those records with local product, facility, line, work-order and production data.
Can production scheduling software work across multiple plants?
Yes. The scheduler distinguishes plant or site identifiers from sales organizations, maintains facility and production-line data, and lets planners work with facility-specific schedules, inventory, line constraints and production rates.
How do manufacturers calculate what still needs to be produced from open orders and inventory?
The application combines requested and fulfilled sales-order quantities with matching inventory, existing schedule rows, work orders and recorded production. This provides planners with the remaining production requirement rather than simply displaying raw ERP demand.
How can production scheduling account for different machine or production-line capabilities?
The WL Plastics scheduler uses facility-line constraints and product attributes to determine line compatibility. It also stores production rates by base product, facility and production line so estimated run time can reflect the line selected.
How do you connect work orders with actual production and remaining WIP?
Work orders are linked to scheduled production. Operators record actual production against a work order, and the scheduler subtracts recorded output from the scheduled quantity to recalculate remaining production and remaining run time.
Can an ERP remain the system of record while custom software handles production scheduling?
Yes. In the reviewed WL Plastics implementation, SAP remained the inbound source of record for customer orders and inventory while the custom application handled production-specific scheduling, work orders, line sequencing and production-progress visibility.
How do manufacturers connect SAP with shop-floor software?
In this implementation, the scheduler reads order and inventory data from SAP and separately prepares work-order job specifications for ShopLogix through XML files. The reviewed code supports outbound ShopLogix job definitions; closed-loop ShopLogix production feedback was not established by the source review.
How can production scheduling software account for BOM components and multistage production?
For conduit production, the scheduler models finished products and component products through BOM relationships. It converts finished-product demand into component requirements and compares those requirements with matching component inventory.
How can a manufacturer modernize a legacy production scheduler without replacing SAP?
WL Plastics used a custom scheduling application around SAP rather than replacing SAP. The scheduler consumed ERP orders and inventory, added manufacturing-specific rules and planning logic, generated work orders, tracked production progress and exported job information toward the shop floor.
Winning Is in the WIP™

When It Has to Work. When It Has to Work on Time.

Talk to Ayoka about production scheduling, SAP integration, work orders, WIP visibility or custom manufacturing software.

Start a Conversation
Production UI images are from the WL Plastics scheduling application supplied for this case study.

Start the Conversation

Tell us what you’re seeing. We’ll start with the operational problem and help determine what is getting in the way.

Captcha