---
title: "Codeunit 8023 Create Usage Data Billing"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/
type: codeunit
id: 8023
name: "Create Usage Data Billing"
app: "Subscription Billing"
namespace: Microsoft.SubscriptionBilling
versions: "26-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
source: "https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/source/?v=28 https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/source/"
checked: 2026-11-20
changed: 2026-10-10
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 8023 Create Usage Data Billing

JOP-AL, https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/

| | |
| --- | --- |
| App | Subscription Billing |
| Namespace | Microsoft.SubscriptionBilling |
| Versions | 26-29 |
| Minors | W1 26.0-29.0; DE 26.0-29.0; US 26.0-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/editions.json) |
| TableNo | Usage Data Import |
| Source file | Usage Based Billing/Codeunits/CreateUsageDataBilling.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CollectServiceCommitments | (var TempServiceCommitment: Record "Subscription Line" temporary; ServiceObjectNo: Code[20]; SubscriptionEndDate: Date) | - | internal | 26-29 | - | - |
| CreateUsageDataBillingFromTempServiceCommitments | (var TempServiceCommitment: Record "Subscription Line"; SupplierNo: Code[20]; UsageDataImportEntryNo: Integer; ServiceObjectNo: Code[20]; BillingPeriodStartDate: Date; BillingPeriodEndDate: Date; UnitCost: Decimal; NewQuantity: Decimal; CostAmount: Decimal; UnitPrice: Decimal; NewAmount: Decimal; CurrencyCode: Code[10]) | - | internal | 26 | - | - |
| GetRetryFailedUsageDataImport | () | Boolean | internal | 26-27 | - | - |
| CreateUsageDataBillingFromTempServiceCommitments | (var TempServiceCommitment: Record "Subscription Line"; SupplierNo: Code[20]; UsageDataImportEntryNo: Integer; ServiceObjectNo: Code[20]; ProductID: Text[80]; ProductName: Text[100]; BillingPeriodStartDate: Date; BillingPeriodEndDate: Date; UnitCost: Decimal; NewQuantity: Decimal; CostAmount: Decimal; UnitPrice: Decimal; NewAmount: Decimal; CurrencyCode: Code[10]) | - | internal | 27-28 | - | - |
| CreateUsageDataBillingFromTempServiceCommitments | (var TempServiceCommitment: Record "Subscription Line"; SupplierNo: Code[20]; UsageDataGenericImportGlobal: Record "Usage Data Generic Import") | - | internal | 29 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterCreateUsageDataBillingFromTempSubscriptionLine | (var TempSubscriptionLine: Record "Subscription Line"; var UsageDataBilling: Record "Usage Data Billing") | 26-29 | - | - |
| Integration event | OnAfterCreateUsageDataBillingFromTempSubscriptionLines | (var TempSubscriptionLine: Record "Subscription Line") | 26-29 | - | - |
| Integration event | OnAfterCollectServiceCommitments | (var TempSubscriptionLine: Record "Subscription Line" temporary; SubscriptionHeaderNo: Code[20]; SubscriptionLineEndDate: Date) | 26-29 | - | - |
| Integration event | OnBeforInsertUsageDataBilling | (var UsageDataBilling: Record "Usage Data Billing"; UsageDataGenericImportGlobal: Record "Usage Data Generic Import") | 29 | - | - |

## Source

Symbols: Microsoft.SubscriptionBilling.symbols.3099ffc7-4cf7-4df6-9b96-7e4bc2bb587c, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 408a4cc8d3a4c54b60464cc14c964479facb9ba0.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
