---
id: object/tableextension/20512
type: object
title: Table extension 20512 "Subc. Purchase Line"
summary: Table extension 20512 "Subc. Purchase Line" in Subcontracting (Microsoft.Manufacturing.Subcontracting), extends "Purchase Line". 9 fields, 5 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - tableextension
  - subcontracting
versions:
  introduced: "29"
  last_changed: null
  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: 2d0da500d364ee8105268806eec4ccf7fa64296d2dad306ed21f9c6e9446406d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subcontracting/app/src/Purchase/SubcPurchaseLine.TableExt.al
    title: src/Apps/W1/Subcontracting/app/src/Purchase/SubcPurchaseLine.TableExt.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/39
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9892
object_type: tableextension
object_id: 20512
name: Subc. Purchase Line
namespace: Microsoft.Manufacturing.Subcontracting
app: Subcontracting
extends: Purchase Line
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 9
  procedures: 6
  events: 0
  subscribers: 0
relations:
  out: 7
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table extension 20512 "Subc. Purchase Line"

> Table extension 20512 "Subc. Purchase Line" in Subcontracting (Microsoft.Manufacturing.Subcontracting), extends "Purchase Line". 9 fields, 5 public procedures. Introduced in BC29, still in BC30.

Subcontracting · Microsoft.Manufacturing.Subcontracting · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subcontracting/app/src/Purchase/SubcPurchaseLine.TableExt.al) · facts from BC29

Extends [Purchase Line](../table/39.md).

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 20543 | Subc. Prod. Order No. | Code[20] | Prod. Order No. (Sub) <small>caption</small> | TableRelation [Table 5405 "Production Order"](../table/5405.md) ("Production Order"."No." where(Status = const(Released))); not editable; DataClassification CustomerContent |
| 20544 | Subc. Prod. Order Line No. | Integer | Prod. Order Line No. (Sub) <small>caption</small> | TableRelation [Table 5406 "Prod. Order Line"](../table/5406.md) ("Prod. Order Line"."Line No." where(Status = const(Released), "Prod. Order No." = field("Subc. Prod. Order No."))); not editable; DataClassification CustomerContent |
| 20545 | Subc. Routing No. | Code[20] | Routing No. (Sub) <small>caption</small> | TableRelation [Table 99000763 "Routing Header"](../table/99000763.md) (Routing Header); not editable; DataClassification CustomerContent |
| 20546 | Subc. Rtng Reference No. | Integer | Routing Reference No. (Sub) <small>caption</small> | not editable; DataClassification CustomerContent |
| 20547 | Subc. Operation No. | Code[10] | Operation No. (Sub) <small>caption</small> | TableRelation [Table 5409 "Prod. Order Routing Line"](../table/5409.md) ("Prod. Order Routing Line"."Operation No." where(Status = const(Released), "Prod. Order No." = field("Prod. Order No."), "Routing No." = field("Subc. Routing No."), "Routing Reference No." = field("Subc. Rtng Reference No."))); not editable; DataClassification CustomerContent |
| 20548 | Subc. Work Center No. | Code[20] | Work Center No. (Sub) <small>caption</small> | TableRelation [Table 99000754 "Work Center"](../table/99000754.md) (Work Center); not editable; DataClassification CustomerContent |
| 20549 | Subc. Purchase Line Type | Enum "Subc. Purchase Line Type" | Subcontracting Line Type <small>caption</small> | enum [Enum 20507 "Subc. Purchase Line Type"](../enum/20507.md); not editable; DataClassification CustomerContent |
| 20550 | Subc.Whse.Outstanding Quantity | Decimal | Whse. Outstanding Quantity <small>caption</small> | FlowField: sum("Warehouse Receipt Line"."Qty. Outstanding" where("Source Type" = const(39), #pragma warning disable AL0603 "Source Subtype" = field("Document Type"), #pragma warning restore AL0603 "Source No." = field("Document No."), "Source Line No." = field("Line No."))); not editable |
| 20560 | Transfer WIP Item | Boolean | Specifies whether this purchase line is linked to a WIP item transfer operation. | DataClassification CustomerContent |

## Keys

- SubcPurchLineKey: Subc. Purchase Line Type

## Procedures

- `GetQuantityPerUOM(): Decimal`
- `GetQuantityBase(): Decimal`
- `CalcBaseQtyFromQuantity(SourceQuantity: Decimal; BasedOnField: Text; FromFieldName: Text; ToFieldName: Text): Decimal` (internal): Calculates the base quantity from a quantity
- `IsSubcontractingLine(var ProdOrderLine: Record "Prod. Order Line"): Boolean` (internal): Determine if the purchase line is a subcontracting line
- `IsSubcontractingLineWithLastOperation(var ProdOrderLine: Record "Prod. Order Line"): Boolean` (internal): Determines if the purchase line is a subcontracting line with the last operation

Plus 1 local procedures.

## Relations

- extends [Table 39 "Purchase Line"](../table/39.md)
- Subc. Prod. Order No.: TableRelation [Table 5405 "Production Order"](../table/5405.md)
- Subc. Prod. Order Line No.: TableRelation [Table 5406 "Prod. Order Line"](../table/5406.md)
- Subc. Operation No.: TableRelation [Table 5409 "Prod. Order Routing Line"](../table/5409.md)
- Subc.Whse.Outstanding Quantity: CalcFormula [Table 7317 "Warehouse Receipt Line"](../table/7317.md)
- Subc. Work Center No.: TableRelation [Table 99000754 "Work Center"](../table/99000754.md)
- Subc. Routing No.: TableRelation [Table 99000763 "Routing Header"](../table/99000763.md)

## Recent changes

- 2026-08-18 [#9892 [main] Bug 644283: Renumber Subcontracting app object ids as it clashes with partner range](../../changes/bcapps/9892.md) (main, BC30, refactor)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

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). 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: "tableextension", object_name: "Subc. Purchase Line")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
