---
id: object/codeunit/99000793
type: object
title: Codeunit 99000793 "Calculate Low-Level Code"
summary: Codeunit 99000793 "Calculate Low-Level Code" in Base Application (Microsoft.Manufacturing.ProductionBOM). 7 public procedures, 7 events. Present since at least BC23, still in BC30, changed in BC24-25, BC29.
tier: official
language: en
tags:
  - codeunit
  - 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: 8ab5edd9b0b155f3cb0c9d92eea85e35ec65ef8feb1b4467948e19cbf472b42b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Manufacturing/ProductionBOM/CalculateLowLevelCode.Codeunit.al
    title: src/Layers/W1/BaseApp/Manufacturing/ProductionBOM/CalculateLowLevelCode.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/10030
object_type: codeunit
object_id: 99000793
name: Calculate Low-Level Code
namespace: Microsoft.Manufacturing.ProductionBOM
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"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 16
  events: 7
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 1
  implements: 0
---

# Codeunit 99000793 "Calculate Low-Level Code"

> Codeunit 99000793 "Calculate Low-Level Code" in Base Application (Microsoft.Manufacturing.ProductionBOM). 7 public procedures, 7 events. Present since at least BC23, still in BC30, changed in BC24-25, BC29.

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

## Properties

| Property | Value |
|---|---|
| TableNo | Item |
| Permissions | TableData Item = rm, TableData "Manufacturing Setup" = r, TableData "Stockkeeping Unit" = r |

## Events published

- `OnAfterCalcLevels(Type: Option " ",Item,"Production BOM",Assembly; No: Code[20]; var TotalLevels: Integer; Level: Integer; LevelDepth: Integer)` (integration)
- `OnBeforeCalcLevels(Type: Option; No: Code[20]; Level: Integer; LevelDepth: Integer; var Result: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeItemModify(var Item: Record Item)` (integration)
- `OnBeforeSetRecursiveLevelsOnBOM(var ProductionBOMHeader: Record "Production BOM Header"; LowLevelCode: Integer; IgnoreMissingItemsOrBOMs: Boolean; var IsHandled: Boolean)` (integration)
- `OnCalcLevelsForProdBOM(var Item: Record Item; No: Code[20]; Level: Integer; LevelDepth: Integer; var TotalLevels: Integer)` (integration)
- `OnSetRecursiveLevelsOnItemOnBeforeCompItemModify(var CompItem: Record Item; IgnoreMissingItemsOrBOMs: Boolean)` (integration)
- `OnBeforeSetRecursiveLevelsOnItem(var CompItem: Record Item; LowLevelCode: Integer; IgnoreMissingItemsOrBOMs: Boolean; var IsHandled: Boolean)` (integration)

## Procedures

- `CalcLevels(Type: Option " ",Item,"Production BOM",Assembly; No: Code[20]; Level: Integer; LevelDepth: Integer): Integer`
- `RecalcLowerLevels(ProdBOMNo: Code[20]; LowLevelCode: Integer; IgnoreMissingItemsOrBOMs: Boolean)`
- `RecalcAsmLowerLevels(ParentItemNo: Code[20]; LowLevelCode: Integer; IgnoreMissingItemsOrBOMs: Boolean)`
- `SetRecursiveLevelsOnItem(var CompItem: Record Item; LowLevelCode: Integer; IgnoreMissingItemsOrBOMs: Boolean)`
- `SetRecursiveLevelsOnBOM(var CompBOM: Record "Production BOM Header"; LowLevelCode: Integer; IgnoreMissingItemsOrBOMs: Boolean)`
- `GetMax(Level1: Integer; Level2: Integer): Integer`
- `SetActualProdBOM(ActualProdBOM2: Record "Production BOM Header")`

Plus 2 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 27 "Item"](../table/27.md)

## Called by

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 99000769 "Production BOM-Check"](../codeunit/99000769.md) (4 calls: `Code → CalcLevels`, `Code → RecalcLowerLevels`, `Code → SetActualProdBOM`, …)

## Recent changes

- 2026-08-27 [#10030 [main]planning worksheet requires second runof calculate regenerative plan](../../changes/bcapps/10030.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC29

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: "Calculate Low-Level Code")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
