---
id: object/codeunit/6648
type: object
title: Codeunit 6648 "Purch.-Get Return Shipments"
summary: Codeunit 6648 "Purch.-Get Return Shipments" in Base Application (Microsoft.Purchases.Document). 4 public procedures, 12 events. Present since at least BC23, still in BC30, changed in BC26, BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: 0f2658a24a22663dfe4f2f7c68627a85906351af613573adbada66f4d4a2764f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Purchases/Document/PurchGetReturnShipments.Codeunit.al
    title: src/Layers/W1/BaseApp/Purchases/Document/PurchGetReturnShipments.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 6648
name: Purch.-Get Return Shipments
namespace: Microsoft.Purchases.Document
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 25
  events: 12
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 2
  implements: 0
---

# Codeunit 6648 "Purch.-Get Return Shipments"

> Codeunit 6648 "Purch.-Get Return Shipments" in Base Application (Microsoft.Purchases.Document). 4 public procedures, 12 events. Present since at least BC23, still in BC30, changed in BC26, BC28.

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

## Properties

| Property | Value |
|---|---|
| TableNo | Purchase Line |

## Events published

- `OnAfterCreateInvLines(PurchaseHeader: Record "Purchase Header")` (integration)
- `OnBeforeCheckHeader(var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckReturnShptPayToVendorNo(ReturnShipmentHeader: Record "Return Shipment Header"; PurchaseHeader: Record "Purchase Header"; ReturnShipmentLine: Record "Return Shipment Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeTransferLineToPurchaseDoc(ReturnShipmentHeader: Record "Return Shipment Header"; ReturnShipmentLine: Record "Return Shipment Line"; var PurchaseHeader: Record "Purchase Header"; var TransferLine: Boolean)` (integration)
- `OnCreateInvLinesOnAfterCalcShouldInsertReturnRcptLine(var ReturnShipmentHeader: Record "Return Shipment Header"; var ReturnShipmentLine: Record "Return Shipment Line"; var PurchaseHeader: Record "Purchase Header"; var ShouldInsertReturnRcptLine: Boolean; PurchLine: Record "Purchase Line")` (integration)
- `OnCreateInvLinesOnAfterReturnShptLine2SetFilters(var ReturnShipmentLine: Record "Return Shipment Line"; var PurchaseHeader: Record "Purchase Header")` (integration)
- `OnCreateInvLinesOnAfterLoopIteration(ReturnShipmentHeader: Record "Return Shipment Header"; ReturnShipmentLine2: Record "Return Shipment Line"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; ShouldInsertReturnRcptLine: Boolean)` (integration)
- `OnRunOnAfterSetReturnShptLineFilters(var ReturnShipmentLine: Record "Return Shipment Line"; PurchaseHeader: Record "Purchase Header")` (integration)
- `OnBeforeCheckReturnShipmentLineVATBusPostingGroup(ReturnShipmentLine: Record "Return Shipment Line"; PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnCopyItemChargeAssgntOnAfterFindPurchLine2(var PurchLine2: Record "Purchase Line"; var ItemChargeAssgntPurch2: Record "Item Charge Assignment (Purch)")` (integration)
- `OnCopyItemChargeAssgntOnBeforeFindPurchLine2(var PurchLine2: Record "Purchase Line"; var ItemChargeAssgntPurch2: Record "Item Charge Assignment (Purch)")` (integration)
- `OnSetPurchHeaderOnBegoreTestIsCreditMemo(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)

## Procedures

- `CreateInvLines(var ReturnShptLine2: Record "Return Shipment Line")`
- `SetPurchHeader(var PurchHeader2: Record "Purchase Header")`
- `GetItemChargeAssgnt(var ReturnShptLine: Record "Return Shipment Line"; QtyToInv: Decimal)`
- `GetPurchRetOrderCrMemos(var TempPurchCrMemoHdr: Record "Purch. Cr. Memo Hdr." temporary; ReturnOrderNo: Code[20])`

Plus 9 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 39 "Purchase Line"](../table/39.md)

## 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 1173 "Document Attachment Mgmt"](../codeunit/1173.md) (1 call: `CopyDocumentAttachments → CopyAttachments`)
- [Codeunit 5402 "Unit of Measure Management"](../codeunit/5402.md) (1 call: `CopyItemChargeAssgnt → QtyRndPrecision`)

## Called by

- [Page 6648 "Get Return Shipment Lines"](../page/6648.md) (2 calls: `LookupOKOnPush → CreateInvLines`, `LookupOKOnPush → SetPurchHeader`)
- [Page 98 "Purch. Cr. Memo Subform"](../page/98.md) (1 call: `GetReturnShipment → (object)`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC26, BC28

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: "Purch.-Get Return Shipments")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
