---
id: object/codeunit/99000838
type: object
title: Codeunit 99000838 "Prod. Order Comp.-Reserve"
summary: Codeunit 99000838 "Prod. Order Comp.-Reserve" in Base Application (Microsoft.Manufacturing.Document). 22 public procedures, 16 events, 33 event subscribers. Present since at least BC23, still in BC30, changed in BC24-28, BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "30"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: fcf46d17a353f460a9e1830d9ebe800e16fffb47bf31eaf001079aaa87ff2f32
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Manufacturing/Document/ProdOrderCompReserve.Codeunit.al
    title: src/Layers/W1/BaseApp/Manufacturing/Document/ProdOrderCompReserve.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12066
object_type: codeunit
object_id: 99000838
name: Prod. Order Comp.-Reserve
namespace: Microsoft.Manufacturing.Document
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 83
  events: 16
  subscribers: 33
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 10
  called_by: 11
  implements: 0
---

# Codeunit 99000838 "Prod. Order Comp.-Reserve"

> Codeunit 99000838 "Prod. Order Comp.-Reserve" in Base Application (Microsoft.Manufacturing.Document). 22 public procedures, 16 events, 33 event subscribers. Present since at least BC23, still in BC30, changed in BC24-28, BC30.

Base Application · Microsoft.Manufacturing.Document · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Manufacturing/Document/ProdOrderCompReserve.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "Reservation Entry" = rimd, TableData "Prod. Order Component" = rimd, TableData "Action Message Entry" = rm |

## Events published

- `OnAfterCallItemTracking(var ProdOrderComponent: Record "Prod. Order Component")` (integration)
- `OnBeforeTransferPOCompToPOComp(var OldProdOrderComp: Record "Prod. Order Component"; var NewProdOrderComp: Record "Prod. Order Component")` (integration)
- `OnBeforeTransferPOCompToItemJnlLineCheckILE(var ProdOrderComp: Record "Prod. Order Component"; var ItemJnlLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeVerifyQuantity(var NewProdOrderComponent: Record "Prod. Order Component"; OldProdOrderComponent: Record "Prod. Order Component"; var ReservationManagement: Codeunit "Reservation Management"; var IsHandled: Boolean)` (integration)
- `OnDeleteLineOnAfterDeleteReservEntries(var ProdOrderComponent: Record "Prod. Order Component")` (integration)
- `OnVerifyChangeOnBeforeHasError(NewProdOrderComp: Record "Prod. Order Component"; OldProdOrderComp: Record "Prod. Order Component"; var HasError: Boolean; var ShowError: Boolean)` (integration)
  - subscribers: [Codeunit 20530 "Subc. Prod. Ord. Comp. Res."](../codeunit/20530.md) Prod. Order Comp.-Reserve_OnVerifyChangeOnBeforeHasError
- `OnTransferPOCompToItemJnlLineCheckILEOnAfterTransferReservEntry(NewItemJnlLine: Record "Item Journal Line"; OldReservEntry: Record "Reservation Entry")` (integration)
- `OnTransferPOCompToItemJnlLineCheckILEOnBeforeCheckTransferQty(var OldProdOrderComponent: Record "Prod. Order Component"; var NewItemJournalLine: Record "Item Journal Line"; var OldReservationEntry: Record "Reservation Entry"; var TransferQty: Decimal; var TrackedQty: Decimal)` (integration)
- `OnTransferPOCompToItemJnlLineCheckILEOnBeforeTransferReservEntry(NewItemJnlLine: Record "Item Journal Line"; OldReservEntry: Record "Reservation Entry")` (integration)
- `OnBeforeGetSourceValue(ReservEntry: Record "Reservation Entry"; var SourceRecRef: RecordRef; ReturnOption: Option "Net Qty. (Base)","Gross Qty. (Base)"; var ReturnValue: Decimal; var IsHandled: Boolean)` (integration)
- `OnCallItemTrackingOnBeforeItemTrackingLinesRunModal(var ProdOrderComponent: Record "Prod. Order Component"; var ItemTrackingLines: Page "Item Tracking Lines")` (integration)
- `OnBeforeAutoReserveProdOrderComp(ReservSummEntryNo: Integer; var RemainingQtyToReserve: Decimal; var RemainingQtyToReserveBase: Decimal; Description: Text[100]; AvailabilityDate: Date; var IsReserved: Boolean; Search: Text[1]; NextStep: Integer; CalcReservEntry: Record "Reservation Entry")` (integration)
- `OnSetSourceForReservationOnBeforeUpdateReservation(var ReservEntry: Record "Reservation Entry"; ProdOrderComp: Record "Prod. Order Component")` (integration, obsolete 27.0)
- `OnAfterInitFromProdOrderComp(var TrackingSpecification: Record "Tracking Specification"; ProdOrderComponent: Record "Prod. Order Component")` (integration)
  - subscribers: [Codeunit 20524 "Subc. Prod. Order Comp. Ext."](../codeunit/20524.md) OnAfterInitFromProdOrderComp
- `OnCreateReservationOnBeforeCreateReservEntry(var ProdOrderComponent: Record "Prod. Order Component"; var Quantity: Decimal; var QuantityBase: Decimal; var ReservationEntry: Record "Reservation Entry"; var FromTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean; ExpectedReceiptDate: Date; Description: Text[100]; ShipmentDate: Date)` (integration)
- `OnSetProdOrderCompOnBeforeUpdateReservation(var ReservEntry: Record "Reservation Entry"; ProdOrderComp: Record "Prod. Order Component")` (integration)

## Event subscriptions

- OnGetQtyPerUOMFromSourceRecRef subscribes to Page "Reservation" OnGetQtyPerUOMFromSourceRecRef
- ReservationOnSetReservSource subscribes to Page "Reservation" OnSetReservSource
- ReservationOnDrillDownTotalQuantity subscribes to Page "Reservation" OnDrillDownTotalQuantity
- ReservationOnFilterReservEntry subscribes to Page "Reservation" OnFilterReservEntry
- ReservationOnRelatesToEntrySummary subscribes to Page "Reservation" OnAfterRelatesToSummEntry
- OnDrillDownTotalQuantity subscribes to Codeunit "Item Ledger Entry-Reserve" OnDrillDownTotalQuantity
- OnCreateReservation subscribes to Codeunit "Reservation Management" OnCreateReservation
- OnLookupDocument subscribes to Codeunit "Reservation Management" OnLookupDocument
- OnLookupLine subscribes to Codeunit "Reservation Management" OnLookupLine
- OnFilterReservFor subscribes to Codeunit "Reservation Management" OnFilterReservFor
- OnCalculateRemainingQty subscribes to Codeunit "Reservation Management" OnCalculateRemainingQty
- OnGetSourceRecordValue subscribes to Codeunit "Reservation Management" OnGetSourceRecordValue
- OnUpdateStatistics subscribes to Codeunit "Reservation Management" OnUpdateStatistics
- OnLookupReserved subscribes to Page "Reservation Entries" OnLookupReserved
- OnAfterAutoReserveOneLine subscribes to Codeunit "Reservation Management" OnAfterAutoReserveOneLine
- OnAutoReserveOnBeforeStopReservation subscribes to Codeunit "Reservation Management" OnAutoReserveOnBeforeStopReservation
- OnAutoTrackOnCheckSourceType subscribes to Codeunit "Reservation Management" OnAutoTrackOnCheckSourceType
- CheckSourceTypeSubtype subscribes to Codeunit "Create Reserv. Entry" OnCheckSourceTypeSubtype
- OnRevertDateToSourceDate subscribes to Codeunit "Reservation Engine Mgt." OnRevertDateToSourceDate
- OnGetActivePointerFieldsOnBeforeAssignArrayValues subscribes to Codeunit "Reservation Engine Mgt." OnGetActivePointerFieldsOnBeforeAssignArrayValues
- OnAfterCreateText subscribes to Codeunit "Reservation Engine Mgt." OnCreateText
- OnBeforeSummEntryNo subscribes to Table "Reservation Entry" OnAfterSummEntryNo
- ReservationEntryOnUpdateSourceCost subscribes to Table "Reservation Entry" OnUpdateSourceCost
- OnReserveBindingOrder subscribes to Table "Requisition Line" OnReserveBindingOrder
- OrderTrackingManagementOnSetSourceRecord subscribes to Codeunit "OrderTrackingManagement" OnSetSourceRecord
- OnInsertOrderTrackingEntry subscribes to Codeunit "OrderTrackingManagement" OnInsertOrderTrackingEntry
- OnGetSourceShipmentDate subscribes to Table "Tracking Specification" OnGetSourceShipmentDate
- OnUpdateDerivedTrackingOnAfterSetReservationEntryFilters subscribes to Codeunit "Plng. Component-Reserve" OnUpdateDerivedTrackingOnAfterSetReservationEntryFilters
- OnSetSourceForProdOrderComp subscribes to Codeunit "Reservation Management" OnSetSourceForProdOrderComp
- OnReserveBindingOrderToPurch subscribes to Codeunit "Req. Wksh.-Make Order" OnReserveBindingOrderToPurch
- OnInitPurchOrderLineOnBeforeUpdateQuantity subscribes to Codeunit "Req. Wksh.-Make Order" OnInitPurchOrderLineOnBeforeUpdateQuantity
- OnAfterDeleteLine subscribes to Codeunit "Req. Line-Reserve" OnAfterDeleteLine
- OnCalcResQtyOnProdOrderComp subscribes to Table "Item" OnCalcResQtyOnProdOrderComp

## Procedures

- `CreateReservation(ProdOrderComponent: Record "Prod. Order Component"; Description: Text[100]; ExpectedReceiptDate: Date; Quantity: Decimal; QuantityBase: Decimal; ForReservationEntry: Record "Reservation Entry")`
- `CreateBindingReservation(ProdOrderComponent: Record "Prod. Order Component"; Description: Text[100]; ExpectedReceiptDate: Date; Quantity: Decimal; QuantityBase: Decimal)`
- `CreateReservationSetFrom(TrackingSpecification: Record "Tracking Specification")`
- `SetBinding(Binding: Enum "Reservation Binding")`
- `Caption(ProdOrderComponent: Record "Prod. Order Component"): Text`
- `FindReservEntry(ProdOrderComponent: Record "Prod. Order Component"; var ReservationEntry: Record "Reservation Entry"): Boolean`
- `GetReservedQtyFromInventory(ProdOrderComponent: Record "Prod. Order Component"): Decimal`
- `GetReservedQtyFromInventory(ProductionOrder: Record "Production Order"): Decimal`
- `ReservEntryExist(ProdOrderComponent: Record "Prod. Order Component"): Boolean`
- `VerifyChange(var NewProdOrderComponent: Record "Prod. Order Component"; var OldProdOrderComponent: Record "Prod. Order Component")`
- `VerifyQuantity(var NewProdOrderComponent: Record "Prod. Order Component"; var OldProdOrderComponent: Record "Prod. Order Component")`
- `TransferPOCompToPOComp(var OldProdOrderComponent: Record "Prod. Order Component"; var NewProdOrderComponent: Record "Prod. Order Component"; TransferQty: Decimal; TransferAll: Boolean)`
- `TransferPOCompToItemJnlLine(var OldProdOrderComponent: Record "Prod. Order Component"; var NewItemJournalLine: Record "Item Journal Line"; TransferQty: Decimal)`
- `TransferPOCompToItemJnlLineCheckILE(var OldProdOrderComponent: Record "Prod. Order Component"; var NewItemJournalLine: Record "Item Journal Line"; TransferQty: Decimal; CheckApplFromItemEntry: Boolean)`
- `DeleteLineConfirm(var ProdOrderComponent: Record "Prod. Order Component"): Boolean`
- `DeleteLine(var ProdOrderComponent: Record "Prod. Order Component")`
- `Block(SetBlocked: Boolean)`
- `CallItemTracking(var ProdOrderComponent: Record "Prod. Order Component")`
- `UpdateItemTrackingAfterPosting(ProdOrderComponent: Record "Prod. Order Component")`
- `BindToTracking(ProdOrderComponent: Record "Prod. Order Component"; TrackingSpecification: Record "Tracking Specification"; Description: Text[100]; ExpectedDate: Date; ReservQty: Decimal; ReservQtyBase: Decimal)`
- `InitFromProdOrderComp(var TrackingSpecification: Record "Tracking Specification"; var ProdOrderComp: Record "Prod. Order Component")`
- `TransferPlanningCompToPOComp(var OldPlanningComponent: Record "Planning Component"; var NewProdOrderComponent: Record "Prod. Order Component"; TransferQty: Decimal; TransferAll: Boolean)`

Plus 12 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 99000845 "Reservation Management"](../codeunit/99000845.md) (22 calls: `AutoReserveProdOrderComp → GetAvailabilityFilter`, `AutoReserveProdOrderComp → InsertReservationEntries`, `AutoReserveProdOrderComp → SetQtyToReserveDownToTrackedQuantity`, …)
- [Codeunit 99000830 "Create Reserv. Entry"](../codeunit/99000830.md) (7 calls: `CreateReservation → CreateReservEntry`, `CreateReservation → CreateReservEntryFor`, `CreateReservation → CreateReservEntryFrom`, …)
- [Codeunit 99000831 "Reservation Engine Mgt."](../codeunit/99000831.md) (3 calls: `ReservEntryExist → InitFilterAndSortingLookupFor`, `TransferPOCompToItemJnlLineCheckILE → InitRecordSet`, `TransferPOCompToItemJnlLineCheckILE → NEXTRecord`)
- [Codeunit 99000840 "Plng. Component-Reserve"](../codeunit/99000840.md) (2 calls: `TransferPlanningCompToPOComp → FindReservEntry`, `TransferPlanningCompToPOComp → TransferReservations`)
- [Codeunit 99000841 "Item Ledger Entry-Reserve"](../codeunit/99000841.md) (1 call: `OnDrillDownTotalQuantity → DrillDownTotalQuantity`)
- [Codeunit 99000891 "Mfg. Item Tracking Mgt."](../codeunit/99000891.md) (1 call: `CallItemTracking → ShowItemTrackingForProdOrderComp`)
- [Page 99000813 "Planned Production Order"](../page/99000813.md) (1 call: `OnLookupDocument → (object)`)
- [Page 99000829 "Firm Planned Prod. Order"](../page/99000829.md) (1 call: `OnLookupDocument → (object)`)
- [Page 99000831 "Released Production Order"](../page/99000831.md) (1 call: `OnLookupDocument → (object)`)
- [Page 99000912 "Simulated Production Order"](../page/99000912.md) (1 call: `OnLookupDocument → (object)`)

## Called by

- [Table 5407 "Prod. Order Component"](../table/5407.md) (7 calls: `AdjustQtyToReservedFromInventory → GetReservedQtyFromInventory`, `BlockDynamicTracking → Block`, `CheckIfProdOrderCompMeetsReservedFromStockSetting → GetReservedQtyFromInventory`, …)
- [Codeunit 99000766 "Mfg. Whse. Activity Post"](../codeunit/99000766.md) (2 calls: `PostConsumptionLine → TransferPOCompToItemJnlLineCheckILE`, `PostConsumptionLine → UpdateItemTrackingAfterPosting`)
- [Codeunit 99000822 "Mfg. Item Jnl.-Post Line"](../codeunit/99000822.md) (2 calls: `InsertConsumpEntry → TransferPOCompToItemJnlLine`, `PostFlushedConsumption → TransferPOCompToItemJnlLine`)
- [Page 99000818 "Prod. Order Components"](../page/99000818.md) (2 calls: `OnDeleteRecord → DeleteLine`, `OnDeleteRecord → DeleteLineConfirm`)
- [Codeunit 5407 "Prod. Order Status Management"](../codeunit/5407.md) (1 call: `TransProdOrderComp → TransferPOCompToPOComp`)
- [Codeunit 99000787 "Create Prod. Order Lines"](../codeunit/99000787.md) (1 call: `ReserveMultiLevelStructure → BindToTracking`)
- [Codeunit 99000849 "Mfg. ReservCheckDateConfl"](../codeunit/99000849.md) (1 call: `ProdOrderComponentCheck → FindReservEntry`)
- [Codeunit 99000858 "Mfg. Get Demand To Reserve"](../codeunit/99000858.md) (1 call: `OnGetSourceDocumentLineQuantities → GetReservedQtyFromInventory`)
- [Codeunit 99000898 "Mfg. Item Substitution"](../codeunit/99000898.md) (1 call: `UpdateProdOrderComp → DeleteLine`)
- [Page 874 "Prod. Order Comp. Item FactBox"](../page/874.md) (1 call: `GetQtyReservedFromStockState → GetReservedQtyFromInventory`)
- [Table 5405 "Production Order"](../table/5405.md) (1 call: `GetQtyReservedFromStockState → GetReservedQtyFromInventory`)

## Recent changes

- 2026-10-02 [#12066 Bugs/remove asm inv mfg clean27 tags for wave2 2026](../../changes/bcapps/12066.md) (main, BC30, obsoletion)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-28, BC30

## Deprecations

- procedure OnSetSourceForReservationOnBeforeUpdateReservation: Pending 27.0 (#if not CLEAN27), "This event is never raised."

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Prod. Order Comp.-Reserve")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
