---
id: object/table/8006
type: object
title: Table 8006 "Usage Data Billing"
summary: Table 8006 "Usage Data Billing" in Subscription Billing (Microsoft.SubscriptionBilling). 36 fields, 35 public procedures, 3 events. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - table
  - subscription billing
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: 34d02993dd952aad03e54dccef1d6d8f9d6e599efbb8d6ae2cce15d3545b912a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subscription%20Billing/app/Usage%20Based%20Billing/Tables/UsageDataBilling.Table.al
    title: src/Apps/W1/Subscription Billing/app/Usage Based Billing/Tables/UsageDataBilling.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/UBB/processing-usage-data/imports-processing
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/sales/subscription-billing/bill-subscriptions-based-on-usage
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9293
    - change/bcapps/10675
    - change/bcapps/8553
object_type: table
object_id: 8006
name: Usage Data Billing
namespace: Microsoft.SubscriptionBilling
app: Subscription Billing
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 36
  procedures: 55
  events: 3
  subscribers: 0
relations:
  out: 11
  referenced_by: 5
  pages: 1
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 8006 "Usage Data Billing"

> Table 8006 "Usage Data Billing" in Subscription Billing (Microsoft.SubscriptionBilling). 36 fields, 35 public procedures, 3 events. Introduced in BC29, still in BC30.

Subscription Billing · Microsoft.SubscriptionBilling · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Subscription%20Billing/app/Usage%20Based%20Billing/Tables/UsageDataBilling.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 8035 "Usage Data Billings"](../page/8035.md) (1 Learn page).

## Properties

| Property | Value |
|---|---|
| Caption | Usage Data Billing |
| DataClassification | CustomerContent |
| LookupPageId | Usage Data Billings |
| DrillDownPageId | Usage Data Billings |

## 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 |
|---|---|---|---|---|
| 1 | Entry No. | Integer | Specifies the sequential number assigned to the record when it was created. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | AutoIncrement |
| 2 | Usage Data Import Entry No. | Integer | Specifies the sequential number of the related import that was assigned to it when it was created. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 3 | Supplier No. | Code[20] | Specifies the number of the supplier to which this usage data refers. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 4 | Partner | Enum "Service Partner" | Specifies whether the Subscription Line partner is a customer or a vendor. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | enum [Enum 8053 "Service Partner"](../enum/8053.md) |
| 5 | Subscription Contract No. | Code[20] | Specifies the contract on which the usage data is billed. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | TableRelation [Table 8052 "Customer Subscription Contract"](../table/8052.md), [Table 8063 "Vendor Subscription Contract"](../table/8063.md) (if (Partner = const(Customer)) "Customer Subscription Contract" else if (Partner = const(Vendor)) "Vendor Subscription Contract") |
| 6 | Subscription Contract Line No. | Integer | Specifies the contract line through which the usage data is billed. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | TableRelation [Table 8062 "Cust. Sub. Contract Line"](../table/8062.md), [Table 8065 "Vend. Sub. Contract Line"](../table/8065.md) (if (Partner = const(Customer)) "Cust. Sub. Contract Line"."Line No." where("Subscription Contract No." = field("Subscription Contract No.")) else if (Partner = const(Vendor)) "Vend. Sub. Contract Line"."Line No." where("Subscription Contract No." = field("Subscription Contract No."))) |
| 7 | Subscription Header No. | Code[20] | Specifies the number of the related Subscription. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | TableRelation [Table 8057 "Subscription Header"](../table/8057.md) (Subscription Header) |
| 8 | Subscription Description | Text[100] | Specifies the description of the related Subscription. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | FlowField: lookup("Subscription Header".Description where("No." = field("Subscription Header No."))); not editable |
| 9 | Subscription Line Entry No. | Integer | — |  |
| 10 | Subscription Line Description | Text[100] | Specifies the Subscription Line for which the usage data is billed. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 11 | Processing Status | Enum "Processing Status" | Specifies whether the row has been processed. In case of an error during processing, it is displayed in the "Reason (Preview)" field. | enum [Enum 8012 "Processing Status"](../enum/8012.md); not editable |
| 12 | Processing Date | Date | Specifies the date of processing. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | not editable |
| 13 | Processing Time | Time | Specifies the time of processing. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 14 | Reason (Preview) | Text[80] | Specifies the preview why the last processing step failed. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | not editable |
| 15 | Reason | Blob | — |  |
| 16 | Charge Start Date | Date | Specifies the start date of the usage. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 17 | Charge Start Time | Time | — | obsolete Pending 26.0; #if not CLEANSCHEMA29 |
| 18 | Charge End Date | Date | Specifies the end date of the usage. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 19 | Charge End Time | Time | — | obsolete Pending 26.0; #if not CLEANSCHEMA29 |
| 20 | Charged Period (Days) | Decimal | Specifies the calculated period (in days). <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 21 | Charged Period (Hours) | Decimal | Specifies the calculated period (in hours). <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | obsolete Pending 26.0; #if not CLEANSCHEMA29 |
| 22 | Quantity | Decimal | Specifies the quantity. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 23 | Unit Cost | Decimal | Specifies the unit cost. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 24 | Cost Amount | Decimal | Specifies the total cost. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 25 | Unit Price | Decimal | Specifies the unit price. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 26 | Amount | Decimal | Specifies the total amount. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 27 | Currency Code | Code[10] | Specifies the currency code. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 28 | Usage Base Pricing | Enum "Usage Based Pricing" | Specifies the criterion used to calculate the usage based pricing. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | enum [Enum 8007 "Usage Based Pricing"](../enum/8007.md) |
| 29 | Pricing Unit Cost Surcharge % | Decimal | Specifies the unit cost surcharge for usage-dependent pricing. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> |  |
| 30 | Billing Line Entry No. | Integer | Specifies the billing line through which the usage data is billed. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | TableRelation [Table 8061 "Billing Line"](../table/8061.md) (if (Partner = const(Customer), "Document Type" = filter(None)) "Billing Line"."Entry No." where(Partner = const(Customer)) else if (Partner = const(Customer), "Document Type" = filter(Invoice)) "Billing Line"."Entry No." where(Partner = const(Customer), "Document Type" = const(Invoice), "Document No...) |
| 31 | Document Type | Enum "Usage Based Billing Doc. Type" | Specifies the document type through which the usage data will be invoiced. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | enum [Enum 8008 "Usage Based Billing Doc. Type"](../enum/8008.md) |
| 32 | Document No. | Code[20] | Specifies the document number via which the usage data is billed. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | TableRelation [Table 36 "Sales Header"](../table/36.md) (if (Partner = const(Customer), "Document Type" = const(Invoice)) "Sales Header"."No." where("Document Type" = const(Invoice)) else if (Partner = const(Customer), "Document Type" = const("Credit Memo")) "Sales Header"."No." where("Document Type" = const("Credit Memo")) else if (Partner = const(Custom...) |
| 33 | Document Line No. | Integer | Specifies the document line for which the usage data will be billed. <small>via [Page 8035 "Usage Data Billings"](../page/8035.md)</small> | TableRelation [Table 37 "Sales Line"](../table/37.md) (if (Partner = const(Customer), "Document Type" = const(Invoice)) "Sales Line"."Line No." where("Document Type" = const(Invoice), "Document No." = field("Document No.")) else if (Partner = const(Customer), "Document Type" = const("Credit Memo")) "Sales Line"."Line No." where("Document Type" = const("...) |
| 34 | Rebilling | Boolean | — |  |
| 35 | Product ID | Text[80] | Specifies the unique ID of the product for this subscription with the supplier. |  |
| 36 | Product Name | Text[100] | Specifies the vendor's product name for this subscription. |  |

## Keys

- PK: Entry No. (clustered)
- key1: Usage Data Import Entry No., Subscription Header No., Subscription Line Entry No., Partner, Document Type, Charge End Date
- key2: Subscription Contract No., Subscription Contract Line No.
- key3: Subscription Line Entry No., Document Type, Charge End Date
- key4: Document No., Document Type
- key5: Billing Line Entry No.

## Events published

- `OnAfterSaveDocumentValues(UsageDateBilling: Record "Usage Data Billing")` (integration)
- `OnAfterGetPrintoutDescription(Rec: Record "Usage Data Billing"; var Description: Text[100])` (integration)
- `OnAfterShouldPrintProductName(Rec: Record "Usage Data Billing"; var Result: Boolean)` (integration)

## Procedures

- `SetReason(ReasonText: Text)` (internal)
- `InitFrom(UsageDataImportEntryNo: Integer; SubscriptionHeaderNo: Code[20]; ProductID: Text[80]; ProductName: Text[100]; BillingPeriodStartDate: Date; BillingPeriodEndDate: Date; NewQuantity: Decimal)` (internal)
- `AlignContractCurrency(TempSubscriptionLine: Record "Subscription Line"; ImportCurrencyCode: Code[10])` (internal)
- `CalculateAmounts(UsageDataSupplier: Record "Usage Data Supplier"; ImportCurrencyCode: Code[10]; NewUnitCost: Decimal; NewCostAmount: Decimal; NewUnitPrice: Decimal; NewAmount: Decimal)` (internal)
- `FilterOnUsageDataImportAndServiceCommitment(UsageDataImportEntryNo: Integer; ServiceCommitment: Record "Subscription Line")` (internal)
- `ExcludeProcessingStatusError()` (internal)
- `FilterOnServiceCommitment(ServiceCommitment: Record "Subscription Line")` (internal)
- `UpdateChargedPeriod()` (internal)
- `ShowReason()` (internal)
- `GetReason(): Text` (internal)
- `ShowRelatedDocuments(var UsageBasedBilling: Record "Usage Data Billing"; DocumentType: Option Contract,"Contract Invoices","Posted Contract Invoices"; ServicePartner: Enum "Service Partner")` (internal)
- `MarkPurchaseHeaderFromUsageDataBilling(var UsageDataBilling: Record "Usage Data Billing"; var PurchaseHeader: Record "Purchase Header")` (internal)
- `FilterOnDocumentTypeAndDocumentNo(ServicePartner: Enum "Service Partner"; UsageBasedBillingDocType: Enum "Usage Based Billing Doc. Type"; DocumentNo: Code[20])` (internal)
- `SaveDocumentValues(UsageBasedBillingDocType: Enum "Usage Based Billing Doc. Type"; DocumentNo: Code[20]; DocumentEntryNo: Integer; BillingLineEntryNo: Integer)` (internal)
- `IsPartnerVendor(): Boolean` (internal)
- `IsPartnerCustomer(): Boolean` (internal)
- `FilterDocumentWithLine(ServicePartner: Enum "Service Partner"; DocumentType: Enum "Usage Based Billing Doc. Type"; DocumentNo: Code[20]; EntryNo: Integer)` (internal)
- `ShowForContractLine(ServicePartner: Enum "Service Partner"; ContractNo: Code[20]; EntryNo: Integer)` (internal)
- `ShowForDocuments(ServicePartner: Enum "Service Partner"; DocumentType: Enum "Usage Based Billing Doc. Type"; DocumentNo: Code[20]; EntryNo: Integer)` (internal)
- `ShowForSalesDocuments(DocumentType: Enum "Sales Document Type"; DocumentNo: Code[20]; EntryNo: Integer)` (internal)
- `ShowForPurchaseDocuments(DocumentType: Enum "Purchase Document Type"; DocumentNo: Code[20]; EntryNo: Integer)` (internal)
- `ShowForRecurringBilling(ServiceObjectNo: Code[20]; ServCommEntryNo: Integer; DocumentType: Enum "Rec. Billing Document Type"; DocumentNo: Code[20])` (internal)
- `ShowForServiceCommitments(ServicePartner: Enum "Service Partner"; ServiceObjectNo: Code[20]; EntryNo: Integer)` (internal)
- `ExistForContractLine(ServicePartner: Enum "Service Partner"; ContractNo: Code[20]; EntryNo: Integer): Boolean` (internal)
- `ExistForDocuments(ServicePartner: Enum "Service Partner"; DocumentType: Enum "Usage Based Billing Doc. Type"; DocumentNo: Code[20]; EntryNo: Integer): Boolean` (internal)
- `ExistForSalesDocuments(DocumentType: Enum "Sales Document Type"; DocumentNo: Code[20]; EntryNo: Integer): Boolean` (internal)
- `ExistForPurchaseDocuments(DocumentType: Enum "Purchase Document Type"; DocumentNo: Code[20]; EntryNo: Integer): Boolean` (internal)
- `ExistForRecurringBilling(ServiceObjectNo: Code[20]; ServCommEntryNo: Integer; DocumentType: Enum "Rec. Billing Document Type"; DocumentNo: Code[20]): Boolean` (internal)
- `ExistForServiceCommitments(ServicePartner: Enum "Service Partner"; ServiceObjectNo: Code[20]; EntryNo: Integer): Boolean` (internal)
- `UpdateRebilling()` (internal)
- `InsertMetadata()` (internal)
- `SetMetadataAsInvoiced()` (internal)
- `IsInvoiced(): Boolean` (internal)
- `GetPrintoutDescription(): Text[100]`
- `ShouldPrintProductName(): Boolean`

Plus 17 local procedures.

## Triggers

OnInsert, OnModify, OnDelete

## Relations

- drill-down page [Page 8035 "Usage Data Billings"](../page/8035.md)
- lookup page [Page 8035 "Usage Data Billings"](../page/8035.md)
- Document No.: TableRelation [Table 36 "Sales Header"](../table/36.md) (conditional)
- Document Line No.: TableRelation [Table 37 "Sales Line"](../table/37.md) (conditional)
- Subscription Contract No.: TableRelation [Table 8052 "Customer Subscription Contract"](../table/8052.md) (conditional)
- Subscription Description: CalcFormula [Table 8057 "Subscription Header"](../table/8057.md)
- Subscription Header No.: TableRelation [Table 8057 "Subscription Header"](../table/8057.md)
- Billing Line Entry No.: TableRelation [Table 8061 "Billing Line"](../table/8061.md) (conditional)
- Subscription Contract Line No.: TableRelation [Table 8062 "Cust. Sub. Contract Line"](../table/8062.md) (conditional)
- Subscription Contract No.: TableRelation [Table 8063 "Vendor Subscription Contract"](../table/8063.md) (conditional)
- Subscription Contract Line No.: TableRelation [Table 8065 "Vend. Sub. Contract Line"](../table/8065.md) (conditional)

## Referenced by

5 fields in 2 objects relate to this table (TableRelation or CalcFormula).

- [Table 8021 "Usage Data Billing Metadata"](../table/8021.md): Billing Document No., Billing Document Type, Usage Data Billing Entry No.
- [Table 8013 "Usage Data Import"](../table/8013.md): No. of UD Billing Errors, No. of Usage Data Billing

## Pages and codeunits on this table

- [Page 8035 "Usage Data Billings"](../page/8035.md) (source table)

## Recent changes

- 2026-09-25 [#9293 [Bug][SubscriptionBilling] Process Usage Data Billing uses lines marked Processing Status = Error (currency mismatch)](../../changes/bcapps/9293.md) (main, BC30, fix)
- 2026-08-27 [#10675 Temporarily suppress AS0072 (ObsoleteTag 29.0) on 10 Base App elements for v30 prep](../../changes/bcapps/10675.md) (main, BC30, fix)
- 2026-07-30 [#8553 [Bug][SubscriptionBilling]: Performance: Billing document creation does not scale to large datasets (4M+ subscription lines)](../../changes/bcapps/8553.md) (main, BC30, performance)

## Across versions

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

## Deprecations

- field Charge End Time: Pending 26.0 (#if not CLEANSCHEMA29), "No longer needed as the time component is not relevant for processing of usage data."
- field Charge Start Time: Pending 26.0 (#if not CLEANSCHEMA29), "No longer needed as the time component is not relevant for processing of usage data."
- field Charged Period (Hours): Pending 26.0 (#if not CLEANSCHEMA29), "No longer needed as the time component is not relevant for processing of usage data."

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: "table", object_name: "Usage Data Billing")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
