The Pro*C batch programs that power the automated ordering engine in Oracle RMS.
The Replenishment Batch Flow
While REPL_ITEM_LOC defines the rules, the actual work of automated ordering happens overnight during the RMS batch window. Replenishment in RMS is broken down into a multi-step sequence of Pro*C batch programs.
This multi-step approach is crucial: it allows RMS to calculate the pure "need" first, then apply constraints (like investment buying or supplier minimums), and finally generate the actual documents (POs or Transfers).
Requirement Extraction (reqext.pc)
The Requirement Extraction program is the heavy lifter.
What it does:
- It scans
REPL_ITEM_LOCfor all active records. - It checks the Review Cycle. If the item is not scheduled for review today, it skips it.
- It calculates Net Inventory (
SOH + In Transit + On Order - Reserved). - It evaluates the Net Inventory against the replenishment method thresholds (Min/Max, Dynamic, etc.).
- If the Net Inventory is below the threshold, it calculates the raw quantity required to reach the Max level.
Where it writes:
The output of reqext.pc is written to the REPL_RESULTS table. This table contains the raw "need" for every item/location that triggered tonight.
Scaling reqext.pc
Because reqext.pc processes potentially millions of item/location combinations, it is heavily multi-threaded in RMS. It is usually partitioned by Department or Item to allow parallel execution.
Replenishment Build (rplbld.pc)
Once reqext.pc has identified what needs to be ordered, Replenishment Build takes over.
What it does:
- It reads the raw requirements from
REPL_RESULTS. - It looks at the sourcing rules. Should this requirement be fulfilled by a Warehouse (Transfer) or by a Supplier (Purchase Order)?
- Scaling & Rounding: It applies supplier constraints. If the raw requirement is 12 units, but the supplier only sells in Cases of 10,
rplbld.pcwill round the order to either 10 or 20 based on the rounding rules in RMS. - It inserts headers and details into the
ORDHEAD/ORDLOCtables (for POs) orTSFHEAD/TSFDETAILtables (for Transfers) in a Worksheet (W) status.
Replenishment Approval (rplapprv.pc)
The final step in the core sequence is Replenishment Approval.
What it does:
By default, rplbld.pc creates orders in Worksheet status. rplapprv.pc attempts to automatically move these orders to Approved (A) status so they can be transmitted to the supplier (via EDI) or the warehouse (via RIB).
It evaluates conditions like:
- Does the Purchase Order meet the supplier's Minimum Order Quantity (MOQ)?
- Does the PO meet the supplier's Minimum Order Value (MOV)?
- Does the Transfer exceed available warehouse inventory?
If the order fails these checks, rplapprv.pc leaves it in Worksheet status, and a buyer must manually review it the next morning.
Troubleshooting Batch Failures
When replenishment "isn't working," it usually means one of the batches skipped an item. Here is how to trace it:
- Check
REPL_ITEM_LOC: Is the item active? Is today on its Review Cycle? - Check Net Inventory: Run the formula manually. Is the Net Inventory actually below the minimum?
- Check
REPL_RESULTS: Didreqext.pcwrite a record here? If yes,reqextworked fine. - Check
ORDHEAD/TSFHEAD: Look for orders created by the batch user (usuallyRMSBATCH). Are they stuck in Worksheet status because they failed an MOQ check inrplapprv.pc?
Key Takeaways
- Replenishment in RMS is a multi-step batch process: Extract, Build, Approve.
- reqext.pc calculates the raw need and populates REPL_RESULTS.
- rplbld.pc converts raw need into actual POs or Transfers and applies pack rounding.
- rplapprv.pc attempts to automatically approve orders, failing them to Worksheet if supplier minimums aren't met.


