A worked example
Follow one order through the system
Illustrative example The order, plant and figures below are invented to show the mechanics. The rules applied at each step are the real ones from the code.
-
SAP
A customer orders 600 cases
A retailer's distribution centre orders 600 cases of a sports drink, shipping from plant 8123 on Thursday. SAP records sales order 0012345678 and confirms it can promise 540 of those cases.
Order type ZOR · ordered 600 cs · ATP 540 cs
-
02
The next run picks up the change
The order-line extract sees the order changed after its last watermark and copies the line: 600 cases ordered (10 pallets of 60), 540 promised, 60 at risk. Once the warehouse creates a delivery and a truck is booked, the delivery and shipment extracts copy those too.
pgt_whd_ordr_item_extrct_tbl → pgt_whd_dlvry_extrct_tbl → pgt_whd_shpmt_extrct_tbl
-
03
It becomes one row with a status
The order-delivery detail joins the line to its delivery, truck, carrier and customer hierarchy. A delivery exists and there is no block, so the status is RLSD (released). Until the truck actually leaves, the ship date is the planned goods-issue date.
ord_dely_detl_pgt · sap_stts = RLSD
-
04
The plant's coverage is scored
Plant 8123 has 300 cases free and 100 on quality hold, which count as 75. Another 120 cases are on a truck from a sister plant (trusted at 80%) and 200 are planned for production (trusted at 50%). Measured against everything due out on Thursday, the plant scores 85% for that day.
plant_matnr_fcs_dly · FCS_PCT for Thursday = 85
-
05
The order gets its numbers and a light
Fill rate is 90% (540 ÷ 600). Revenue at risk is $1,080 (60 cases × $18). Confidence is 85, taken from the plant's Thursday score. The order is short, so it can't be green or yellow. The plant's "max cut & ship" setting decides between orange and red.
fact_order_pqgc → PQGC_SPOTLIGHT.FACT_ORDER_PQGC_DLT → FO_DLT_MRGE()
-
07
It shows up in Spotlight
Stored procedures merge the changed orders into the app's tables, and the "Last Spotlight Refresh" clock moves forward. A planner filtering for orange and red orders now sees this one.
PQGC_SPOTLIGHT.Timestamp
-
08
A planner acts and SAP receives the change
The planner's change goes into the app's writeback queue. The writeback notebook turns the queue into a CSV file for SAP S/4. Once SAP applies it, the fast-refresh notebook pushes the updated order back to the app, and the next full run starts the loop again.
PQGC_SPOTLIGHT.Writeback → SL_S4_Writeback_<time>.csv → SAP S/4