---
id: object/report/402
type: object
title: Report 402 "Purchase Document - Test"
summary: Report 402 "Purchase Document - Test" in Base Application (Microsoft.Purchases.Reports). 3 public procedures, 9 events. Present since at least BC23, still in BC30, changed in BC27, BC29.
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: b95d9625c44dccbf437901ec8c9a22b7dce22f89b4c57b936f087b2be9438035
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Purchases/Reports/PurchaseDocumentTest.Report.al
    title: src/Layers/W1/BaseApp/Purchases/Reports/PurchaseDocumentTest.Report.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/au
    - localization/ca
    - localization/mx
    - localization/nz
    - localization/us
  videos: []
  posts: []
  guidelines: []
object_type: report
object_id: 402
name: Purchase Document - Test
namespace: Microsoft.Purchases.Reports
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "27"
  - "29"
source_major: "29"
obsolete: null
countries:
  - au
  - ca
  - mx
  - nz
  - us
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 20
  events: 9
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 3
  called_by: 0
  implements: 0
---

# Report 402 "Purchase Document - Test"

> Report 402 "Purchase Document - Test" in Base Application (Microsoft.Purchases.Reports). 3 public procedures, 9 events. Present since at least BC23, still in BC30, changed in BC27, BC29.

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

## Properties

| Property | Value |
|---|---|
| Caption | Purchase Document - Test |

## Events published

- `OnAfterAddDimToTempLine(var PurchLine: Record "Purchase Line")` (integration)
- `OnAfterCheckPurchaseDoc(PurchaseHeader: Record "Purchase Header"; var ErrorText: array[99] of Text[250]; var ErrorCounter: Integer)` (integration)
  - subscribers: [Codeunit 4812 "Intrastat Report Doc. Compl."](../codeunit/4812.md) CheckIntrastatMandatoryFieldsOnAfterCheckPurchaseDocPurchaseDocumentTest
- `OnBeforeCheckDimValuePostingHeader(var PurchaseHeader: Record "Purchase Header"; var TableID: array[10] of Integer; var No: array[10] of Code[20])` (integration)
- `OnBeforeCheckDimValuePostingLine(var PurchaseLine: Record "Purchase Line"; var TableID: array[10] of Integer; var No: array[10] of Code[20])` (integration)
  - subscribers: [Codeunit 99000789 "Mfg. Purchase Document Mgt."](../codeunit/99000789.md) OnBeforeCheckDimValuePostingLine
- `OnBeforeTestJobFields(var PurchaseLine: Record "Purchase Line"; var ErrorCounter: Integer; var ErrorText: array[50] of Text[250]; var IsHandled: Boolean)` (integration)
- `OnCheckPurchLineCaseTypeElse(LineType: Option; No.: Code[20]; var ErrorText: Text[250])` (integration)
- `OnRoundLoopOnAfterGetRecord(var PurchaseLine: Record "Purchase Line"; var ErrorText: array[99] of Text[250]; var ErrorCounter: Integer)` (integration)
- `OnRoundLoopOnBeforeAfterGetRecord(var PurchaseLine: Record "Purchase Line"; var ErrorCounter: Integer; var ErrorText: array[99] of Text[250])` (integration)
- `OnAfterCheckPurchLine(PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var ErrorCounter: Integer; var ErrorText: Text[250])` (integration)

## Procedures

- `TestJobFields(var PurchLine: Record "Purchase Line")`
- `AddDimToTempLine(PurchLine: Record "Purchase Line")`
- `InitializeRequest(NewReceiveShipOnNextPostReq: Boolean; NewInvOnNextPostReq: Boolean; NewShowDim: Boolean; NewShowItemChargeAssgnt: Boolean)`

Plus 8 local procedures.

## Triggers

OnInitReport, 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 408 "DimensionManagement"](../codeunit/408.md) (9 calls: `AddDimToTempLine → AddDimSource`, `AddDimToTempLine → GetDefaultDimID`, `AddDimToTempLine → PurchLineTypeToTableID`, …)
- [Codeunit 5826 "Matched Order Line Mgmt."](../codeunit/5826.md) (2 calls: `CheckRcptLines → IsLineMatchedToReceiptShipment`, `CheckRcptLines → SetMatchedReceiptLinesFilter`)
- [Codeunit 5700 "User Setup Management"](../codeunit/5700.md) (1 call: `VerifyPostingDate → TestAllowedPostingDate`)

## Across versions

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

## Countries that replace it

[AU](../../localizations/au.md), [CA](../../localizations/ca.md), [MX](../../localizations/mx.md), [NZ](../../localizations/nz.md), [US](../../localizations/us.md)

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: "Purchase Document - Test")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
