---
id: object/report/790
type: object
title: Report 790 "Calculate Inventory"
summary: Report 790 "Calculate Inventory" in Base Application (Microsoft.Inventory.Counting.Journal). 9 public procedures, 41 events. Present since at least BC23, still in BC30, changed in BC24-26, BC28-29.
tier: official
language: en
tags:
  - report
  - base application
versions:
  introduced: null
  last_changed: "29"
  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: 2dc2148cd15f9aa3bf450740c5e6d061ac91e48d73c5b9d0bbd919aeba4945a3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Counting/Journal/CalculateInventory.Report.al
    title: src/Layers/W1/BaseApp/Inventory/Counting/Journal/CalculateInventory.Report.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10220
    - change/bcapps/9745
object_type: report
object_id: 790
name: Calculate Inventory
namespace: Microsoft.Inventory.Counting.Journal
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"
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 68
  events: 41
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 5
  called_by: 0
  implements: 0
---

# Report 790 "Calculate Inventory"

> Report 790 "Calculate Inventory" in Base Application (Microsoft.Inventory.Counting.Journal). 9 public procedures, 41 events. Present since at least BC23, still in BC30, changed in BC24-26, BC28-29.

Base Application · Microsoft.Inventory.Counting.Journal · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Counting/Journal/CalculateInventory.Report.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Caption | Calculate Inventory |

## Events published

- `OnAfterGetRecordItemLedgEntryOnBeforeUpdateBuffer(var Item: Record Item; ItemLedgEntry: Record "Item Ledger Entry"; var ByBin: Boolean; var IsHandled: Boolean)` (integration)
- `OnAfterInsertItemJnlLine(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnAfterItemOnPreDataItem(var Item: Record Item; ZeroQty: Boolean; IncludeItemWithNoTransaction: Boolean)` (integration)
- `OnAfterWhseEntrySetFilters(var WarehouseEntry: Record "Warehouse Entry"; var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnItemLedgerEntryOnAfterPreDataItem(var ItemLedgerEntry: Record "Item Ledger Entry"; var Item: Record Item)` (integration)
- `OnItemLedgerEntryOnAfterGetRecordOnBeforeUpdateBuffer(var WarehouseEntry: Record "Warehouse Entry")` (integration)
- `OnWarehouseEntryOnAfterGetRecordOnBeforeItemLedgerEntryIsEmptyCheck(var ItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean)` (integration)
- `OnInsertItemJnlLineOnBeforeInit(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnInsertItemJnlLineOnAfterCalcShouldInsertItemJnlLine(ItemNo: Code[20]; VariantCode2: Code[10]; DimEntryNo2: Integer; BinCode2: Code[20]; Quantity2: Decimal; PhysInvQuantity: Decimal; ZeroQty: Boolean; var ShouldInsertItemJnlLine: Boolean; Location: Record Location; var NextLineNo: Integer)` (integration)
- `OnInsertItemJnlLineOnAfterValidateLocationCode(ItemNo: Code[20]; VariantCode2: Code[10]; DimEntryNo2: Integer; BinCode2: Code[20]; Quantity2: Decimal; PhysInvQuantity: Decimal; var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnAddZeroQtySKUOnBeforeInsertQuantityOnHandBuffer(var TempInventoryBuffer: Record "Inventory Buffer" temporary; StockkeepingUnit: Record "Stockkeeping Unit"; Item: Record Item)` (integration)
- `OnBeforeItemOnAfterGetRecord(var Item: Record Item; var IsHandled: Boolean)` (integration)
- `OnBeforeFunctionInsertItemJnlLine(ItemNo: Code[20]; VariantCode2: Code[10]; DimEntryNo2: Integer; BinCode2: Code[20]; Quantity2: Decimal; PhysInvQuantity: Decimal; var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean; Location: Record Location)` (integration)
- `OnBeforeInsertItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var InventoryBuffer: Record "Inventory Buffer")` (integration)
- `OnBeforeRetrieveBuffer(var TempInventoryBuffer: Record "Inventory Buffer" temporary; ItemLedgerEntry: Record "Item Ledger Entry"; BinCode: Code[20]; DimEntryNo: Integer; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeQuantityOnHandBufferFindAndInsert(var InventoryBuffer: Record "Inventory Buffer"; WarehouseEntry: Record "Warehouse Entry")` (integration)
- `OnAfterFunctionInsertItemJnlLine(ItemNo: Code[20]; VariantCode2: Code[10]; DimEntryNo2: Integer; BinCode2: Code[20]; Quantity2: Decimal; PhysInvQuantity: Decimal; var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnItemLedgerEntryOnPreDataItemOnBeforeInsertQuantityOnHandBuffer(var TempInventoryBuffer: Record "Inventory Buffer" temporary; Item: Record Item)` (integration)
- `OnItemLedgerEntryOnPreDataItemOnBeforeClearQuantityOnHandBuffer(var ItemLedgerEntry: Record "Item Ledger Entry"; Item: Record Item)` (integration)
- `OnCalcPhysInvQtyAndInsertItemJnlLineOnBeforeCheckIfInsertNeeded(InventoryBuffer: Record "Inventory Buffer")` (integration)
- `OnCalcPhysInvQtyAndInsertItemJnlLineOnBeforeFindset(var InventoryBuffer: Record "Inventory Buffer")` (integration)
- `OnCalcWhseQtyOnAfterLotRequiredWhseEntryClearFilters(var WarehouseEntry: Record "Warehouse Entry")` (integration)
- `OnCalcWhseQtyOnAfterLotRequiredWhseEntrySetFilters(var WarehouseEntry: Record "Warehouse Entry")` (integration)
- `OnCalcWhseQtyOnAfterWhseEntrySetFilters(var WarehouseEntry: Record "Warehouse Entry")` (integration)
- `OnInsertItemJnlLineOnAfterUpdateDimensionSetID(var ItemJnlLine: Record "Item Journal Line")` (integration)
- `OnPreDataItemOnAfterGetItemJnlTemplateAndBatch(var ItemJnlTemplate: Record "Item Journal Template"; var ItemJnlBatch: Record "Item Journal Batch")` (integration)
- `OnRetrieveBufferOnBeforeFind(var InventoryBuffer: Record "Inventory Buffer"; ItemLedgerEntry: Record "Item Ledger Entry")` (integration)
- `OnReserveWarehouseOnAfterWhseEntry2SetFilters(var ItemJnlLine: Record "Item Journal Line"; var WhseEntry: Record "Warehouse Entry"; var WhseEntry2: Record "Warehouse Entry"; EntryType: Option)` (integration)
- `OnUpdateBufferOnBeforeInsert(var InventoryBuffer: Record "Inventory Buffer"; CalledFromItemLedgerEntry: Boolean)` (integration)
- `OnUpdateBufferOnBeforeModify(var InventoryBuffer: Record "Inventory Buffer"; CalledFromItemLedgerEntry: Boolean)` (integration)
- `OnBeforeOnPreReport(var ItemJournalLine: Record "Item Journal Line"; var PostingDate: Date)` (integration)
- `OnAddZeroQtyOnAfterFilterSKU(var Item: Record Item; var SKU: Record "Stockkeeping Unit")` (integration)
- `OnAddZeroQtyOnAfterCalcShouldAddZeroQty(var Item: Record Item; ZeroQty: Boolean; var ShouldAddZeroQty: Boolean)` (integration)
- `OnAddZeroQtySKUOnBeforeInsertZeroQtySKU(var Item: Record Item; var SKU: Record "Stockkeeping Unit"; var TempInventoryBuffer: Record "Inventory Buffer" temporary; var IsHandled: Boolean)` (integration)
- `OnInsertItemJnlLineOnBeforeValidateItemNo(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnCalcWhseQtyOnAfterGetWhseItemTrkgSetup(LocationCode: Code[10]; var ItemTrackingSetup: Record "Item Tracking Setup")` (integration)
- `OnBeforeItemBinLocationIsCalculated(ItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean; var IsCalculated: Boolean; var WarehouseEntry: Record "Warehouse Entry")` (integration)
- `OnInsertQuantityOnHandBufferOnBeforeInsert(var InventoryBuffer: Record "Inventory Buffer")` (integration)
- `OnWhseEntryLoopOnBeforeFindlast(var WarehouseEntry: Record "Warehouse Entry"; var IsHandled: Boolean)` (integration)
- `OnAfterGetRecordItemLedgEntryOnBeforeWhseEntryFind(var WarehouseEntry: Record "Warehouse Entry"; ItemLedgerEntry: Record "Item Ledger Entry")` (integration)
- `OnItemBinLocationIsCalculatedOnBeforeFind(var InventoryBuffer: Record "Inventory Buffer"; ItemLedgerEntry: Record "Item Ledger Entry")` (integration)

## Procedures

- `SetItemJnlLine(var NewItemJnlLine: Record "Item Journal Line")`
- `ValidatePostingDate()`
- `InsertItemJnlLine(ItemNo: Code[20]; VariantCode2: Code[10]; DimEntryNo2: Integer; BinCode2: Code[20]; Quantity2: Decimal; PhysInvQuantity: Decimal)`
- `InitializeRequest(NewPostingDate: Date; DocNo: Code[20]; ItemsNotOnInvt: Boolean; InclItemWithNoTrans: Boolean)`
- `SetHideValidationDialog(NewHideValidationDialog: Boolean)`
- `InitializePhysInvtCount(PhysInvtCountCode2: Code[10]; CountSourceType2: Option " ",Item,SKU)`
- `GetLocation(LocationCode: Code[10]): Boolean`
- `SetSkipDim(NewSkipDim: Boolean)`
- `AddZeroQtySKU()`

Plus 18 local procedures.

## Triggers

OnPreReport

## 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 411 "Dimension Buffer Management"](../codeunit/411.md) (4 calls: `CreateDimFromDefault → InsertDimensions`, `InsertItemJnlLine → GetDimensions`, `UpdateBuffer → FindDimensions`, …)
- [Codeunit 99000830 "Create Reserv. Entry"](../codeunit/99000830.md) (3 calls: `ReserveWarehouse → CreateEntry`, `ReserveWarehouse → CreateReservEntryFor`, `ReserveWarehouse → SetDates`)
- [Codeunit 408 "DimensionManagement"](../codeunit/408.md) (2 calls: `InsertItemJnlLine → GetDimensionSetID`, `InsertItemJnlLine → UpdateGlobalDimFromDimSetID`)
- [Codeunit 6500 "Item Tracking Management"](../codeunit/6500.md) (1 call: `CalcWhseQty → GetWhseItemTrkgSetup`)
- [Page 456 "No. Series"](../page/456.md) (1 call: `ValidatePostingDate → (object)`)

## Recent changes

- 2026-08-14 [#10220 [main] Calculate Inventory - Add check to skip report processing if Warehouse Entry table is empty](../../changes/bcapps/10220.md) (main, BC30, performance)
- 2026-07-30 [#9745 [main] Implement item variant caching in calculate inventory](../../changes/bcapps/9745.md) (main, BC30, performance)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-26, BC28-29

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: "report", object_name: "Calculate Inventory")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
