---
id: change/bcapps/10029
type: change
title: "#10029 [Main]-Import of e-documents with format ZUGfERD & XRECHNUNG fail with error message You cannot insert a purchase line without a purchase header in German localisation"
summary: An earlier fix in the German XRechnung and ZUGFeRD import codeunits is reverted. The error 'You cannot insert a purchase line without a purchase header' is now handled by a separate change to Purchase Line and Sales Line in another PR.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit import xrechnung document
  - codeunit import zugferd document
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:09:06.134Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 20031cfcfbb4ae9319b25506e881fbecab4df98e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10029
    title: "microsoft/BCApps#10029: [Main]-Import of e-documents with format ZUGfERD & XRECHNUNG fail with error message You cannot insert a purchase line without a purchase header in German localisation"
    date: "2026-08-14"
    commit: 20031cfcfbb4ae9319b25506e881fbecab4df98e
    t: null
    quote: This pull requested is created to revert back the previous fix as Purchase and Sales Line is modified
links:
  learn: []
  objects:
    - object/codeunit/13915-de
    - object/codeunit/13919-de
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10029
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10029
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-14T07:24:59Z"
author: DeepsShukla
author_type: User
community_contribution: false
labels:
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 18
  deletions: 18
  al: 2
apps:
  - EDocumentDE
objects_touched:
  - key: codeunit/13915
    page: codeunit/13915-de
    type: codeunit
    id: 13915
    name: Import XRechnung Document
    app: EDocumentDE
    status: modified
  - key: codeunit/13919
    page: codeunit/13919-de
    type: codeunit
    id: 13919
    name: Import ZUGFeRD Document
    app: EDocumentDE
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 636659
systems:
  - integration
quote: This pull requested is created to revert back the previous fix as Purchase and Sales Line is modified
joined_against:
  major: "30"
  commit: a4406cfa9e57437fedc49c53c327a199a854491e
---

# #10029 [Main]-Import of e-documents with format ZUGfERD & XRECHNUNG fail with error message You cannot insert a purchase line without a purchase header in German localisation

> An earlier fix in the German XRechnung and ZUGFeRD import codeunits is reverted. The error 'You cannot insert a purchase line without a purchase header' is now handled by a separate change to Purchase Line and Sales Line in another PR.

[Pull request](https://github.com/microsoft/BCApps/pull/10029) · merged into `main` (BC30) on 2026-08-14 by DeepsShukla · 2 files (+18 -18), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Reverts a previous fix in the XRechnung and ZUGFeRD import codeunits of the German e-document app
- The revert is done because Purchase Line and Sales Line were changed in another PR
- Linked to the bug where these imports failed because a purchase line had no purchase header
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 13915 "Import XRechnung Document"](../../objects/codeunit/13915-de.md), EDocumentDE (DE layer): modified
- [Codeunit 13919 "Import ZUGFeRD Document"](../../objects/codeunit/13919-de.md), EDocumentDE (DE layer): modified

## Context

- Work items: AB#636659
- Labels: Team: Finance
- Systems: integration
- From the description: "This pull requested is created to revert back the previous fix as Purchase and Sales Line is modified"

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
