Manual
eInvoice Viewer for SAPInstall, work, configure
einvoice4s / Manuals / eInvoice Viewer for SAP

eInvoice Viewer for SAP

Applies to version 1.0.0. As of 8 November 2026.

1 · What it does

The eInvoice Viewer for SAP shows electronic invoices in readable form directly in the SAP GUI. It opens XRechnung, ZUGFeRD and Factur-X, Peppol invoices and every other invoice according to EN 16931, as an XML file or as a PDF with an embedded e-invoice. Instead of raw XML the clerk sees the invoice with all its fields, and on request with the numbers of the standard ( BT fields ).

The viewer comes in two editions:

EditionContent
eInvoice Viewer for SAPThe readable invoice, the XML and, for a PDF, its visual representation, together with the attachments of the invoice
eInvoice Viewer for SAP with ChecksEverything of the first edition, plus three checks against the master data in SAP: the Inbound Check for invoices from suppliers, the Outbound Check for your own invoices to customers, and the Identifier Check for IBAN, BIC, VAT identification numbers and other identifiers

Both editions follow the same principles:

  • The viewer only reads. It writes nothing to SAP tables, changes nothing in the archive and posts nothing.
  • Nothing leaves your company. The display runs entirely in the HTML control of the SAP GUI on the workstation. It loads nothing and calls no address on the internet.
  • No change to the SAP standard. There is no modification, no enhancement and no BAdI. Outside the package there is only one entry for the menu item in "Services for Object" and, if you wish, a few variables in STVARV.
  • One package that can be removed without a trace. Everything is in a single abapGit package, including the display itself.

2 · Requirements

WhatRequirement
SAP systemSAP ECC 6.0 on basis 7.40 from SP05, or S/4HANA on-premise
abapGitThe report ZABAPGIT in the system. If you do not want to keep abapGit in the system, install the standalone version ZABAPGIT_STANDALONE for the installation only and delete it afterwards. The source code is a single file: download zabapgit_standalone.prog.abap ( right click, "Save link as" ). The installation guide of abapGit describes how to create the report from it in SE38.
WorkstationSAP GUI for Windows 7.70 or newer with the browser control "Edge (based on Chromium)"
AuthorisationCreating a package and importing objects into the development system
E-invoicesThe e-invoices are stored in ArchiveLink at the document, as an XML file or as a PDF

Important: With the older browser control "Internet Explorer" the viewer does not start. You set the control in the SAP GUI under Options → Interaction Design → Controls → Browser Control.

3 · Installation

After your purchase on einvoice4s.de you receive a ZIP file for abapGit:

EditionFile
eInvoice Viewer for SAPeinvoice-viewer-for-sap-abapgit.zip
eInvoice Viewer for SAP with Checkseinvoice-viewer-for-sap-checks-abapgit.zip

Do not unpack this file. abapGit reads it as it is.

For a first test without a transport

For productive use

Instead of the local package, create a package of your own that can be transported, for example ZSPE_EVIEWER, and choose it in step 2. abapGit then asks for a transport request. From there the objects move through your system landscape like any development of your own.

What the package contains

ObjectTypeTask
ZSPE_EVIEWERReportShows the e-invoice for a given document or from a file; contains the tool "Delete local app copies"
ZCL_SPE_EVIEWER_GOSClassThe menu item "Show e-invoice" in "Services for Object"
ZCL_SPE_EVIEWER_VIEWClassOpens the display in a window above the document
ZCL_SPE_EVIEWER_APPClassBrings the display to the workstation and receives files from the display
ZCL_SPE_EVIEWER_DATAClassReads the document, the archive document and the master data
ZCL_SPE_EVIEWER_JSONClassPrepares the data read for the display
ZSPE_EVIEWER_APPMIME objectThe display itself

There is deliberately no transaction.

The first test

During the first test, watch for the following:

  • whether the SAP GUI asks for permission when writing to the temporary folder; if so, grant it permanently for this folder ( chapter 12 ),
  • whether the invoice appears and, in the edition with Checks, the tabs "Inbound Check" or "Outbound Check" and "Identifier Check" show results,
  • whether the tab "PDF" shows the visual representation of a ZUGFeRD PDF,
  • whether "Save" in the display opens the file dialog of the SAP GUI and the saved file is complete,
  • whether "Close" and the cross of the window lead back to the selection screen.

4 · Setting up the menu item "Show e-invoice"

In daily work you open the e-invoice through "Services for Object", the icon with the small arrow in the title bar of a document. The entry "Show e-invoice" appears there for accounting documents ( for example in FB03 ), for invoice documents of Logistics Invoice Verification ( MIR4 ) and for billing documents ( VF03 ). It is active only when an e-invoice is stored in the archive for the document; otherwise it is greyed out.

The services of this menu are kept in the table SGOSATTR. They form a chain: each entry names in the field "Next service" the service that stands directly below it in the menu. The last service of a level has this field empty. A submenu such as "Create…" is an entry of the service type "Service list"; its field "Subservice" names the first entry of the submenu, and from there a chain of its own runs through "Next service".

To hook in "Show e-invoice", you therefore pick a predecessor: the service below which the new entry is to stand. The predecessor decides the level and the position in the menu. The new entry takes over the predecessor's previous successor, and the predecessor then points to the new entry.

Finding the predecessor

Note: Always pick a predecessor and never the first position of a level. The first position would mean changing the reference of the service list instead of a "Next service"; that is more error-prone and gains nothing.

Creating the entry

FieldValue
Name of serviceZSPE_EVIEWER
DescriptionShow e-invoice
Quick infoShow e-invoice
Class for generic serviceZCL_SPE_EVIEWER_GOS
Iconstays empty
Next servicethe value you noted under "Finding the predecessor" in step 3, or empty
Subservicestays empty
Controlstays empty
Service typeSingle service
Commit requiredstays unticked, because the service only reads

Checking

Screenshot missingscreenshots/sap-dienste-zum-objekt.en.pngThe menu "Services for Object" of a document with the new entry "Show e-invoice" below the attachment list ( shown with the German interface )
The menu "Services for Object" of a document with the new entry "Show e-invoice" below the attachment list ( shown with the German interface )

Caution: If a previous entry is missing from the menu after saving, the chain is broken. Usually the new entry does not carry the predecessor's old successor; add it there. If two entries name the same "Next service", part of the menu appears twice or not at all.

Note: The labels in SM30 and SE16 can differ slightly between releases and logon languages. What matters are the name of the service, the class, the service type and the chaining through "Next service".

5 · Settings in STVARV

The viewer needs no settings. Without an entry, every XML or PDF document at the document counts as an e-invoice, an XML takes precedence over a PDF, and the display uses the light SAP Quartz design. If you want to change anything, create variables in the standard transaction STVARV. There is no customising table of its own.

VariableTypeContentEffect
ZSPE_EVIEWER_DOC_OUTSelection optionThe ArchiveLink document types of your outgoing e-invoicesOnly these count as invoices to a customer
ZSPE_EVIEWER_DOC_INSelection optionThe ArchiveLink document types of your incoming e-invoicesOnly these count as invoices from a supplier
ZSPE_EVIEWER_KITParametersap-horizonSAP Horizon design instead of SAP Quartz
ZSPE_EVIEWER_DARKParameterXDark design

As soon as at least one of the two document type variables is maintained, only the document types named there count, and the direction ( inbound or outbound ) comes from there. Without these variables the direction comes from the document: a vendor line means inbound, a customer line means outbound.

Finding the document types

OAC3 lists the links between SAP object and document type, for example object type BKPF or VBRK with the document type of the e-invoice. OAC2 shows the description of each document type, such as "eDocuments Outbound XML". What you need is the technical name in the column "Document type".

Creating a selection option

Creating a parameter

In STVARV, on the tab "Parameters", create the name ZSPE_EVIEWER_KIT with the value sap-horizon or the name ZSPE_EVIEWER_DARK with the value X, and save.

The settings apply to all users in the client, in the menu item and in the report alike.

6 · Opening an e-invoice

From a document

The viewer looks for the e-invoice at the accounting document and at its original document, that is at the invoice document for an invoice entered in MIRO and at the billing document for a billing document.

Through the report

The report ZSPE_EVIEWER in SA38 opens the e-invoice of a given document or a file from the workstation.

Note: On the very first call on a workstation, the package unpacks the display once into the temporary folder of the SAP GUI. This takes a few seconds. Every further call is there at once.

7 · What the display shows

At the top are the title, the origin of the invoice ( company code, document number and fiscal year ) and the button "Close". Below are the tabs:

TabContent
InvoiceThe invoice in readable form: invoice data, buyer, seller, delivery, payment, lines, totals and attachments
XMLThe e-invoice as it is stored in the archive
PDFFor a PDF only: the visual representation as the sender designed it
Inbound Check or Outbound CheckIn the edition with Checks only: the check against your master data, depending on the direction of the invoice
Identifier CheckIn the edition with Checks only: the formal check of the identifiers

With "Show BT codes" each field shows its number from the standard EN 16931, for example BT-1 for the invoice number. With "Only filled fields" you hide all empty fields.

Screenshot missingscreenshots/sap-rechnung.en.pngAn outgoing invoice from FB03 on the tab "Invoice" with the BT codes switched on and the notice on the findings of the Outbound Check ( shown with the German interface )
An outgoing invoice from FB03 on the tab "Invoice" with the BT codes switched on and the notice on the findings of the Outbound Check ( shown with the German interface )

Attachments

If the e-invoice carries an attachment, such as a statement or a delivery note as PDF, it is listed at the bottom of the tab "Invoice" in the table "Attachments". "View" shows it directly in the display, "Save" stores it on the workstation.

Screenshot missingscreenshots/sap-anlage.en.pngThe table "Attachments" of an invoice with an opened service charge statement as PDF ( shown with the German interface )
The table "Attachments" of an invoice with an opened service charge statement as PDF ( shown with the German interface )

A PDF file

For a PDF the viewer extracts the embedded e-invoice itself and shows it like an XML file; the visual representation is on the tab "PDF". If the PDF contains no e-invoice, the display says so and shows the PDF itself below.

Saving

Everything the display saves, such as an attachment or the visual representation, goes through the file dialog of the SAP GUI. You choose there where the file is stored.

8 · The checks ( edition with Checks )

The checks start by themselves when the invoice opens. Which one appears depends on the direction of the invoice: an invoice from a supplier gets the Inbound Check, your own invoice to a customer gets the Outbound Check. The Identifier Check appears for both.

Each finding stands directly at the field it concerns, with a heading, an explanation and the values involved. An error is marked red and calls for a correction; a warning is orange and calls for a look. Above the invoice a sentence says how many fields the check has marked.

Screenshot missingscreenshots/sap-outbound-check.en.pngFindings of the Outbound Check: differing addresses as warnings and a foreign VAT identification number of the seller as an error ( shown with the German interface )
Findings of the Outbound Check: differing addresses as warnings and a foreign VAT identification number of the seller as an error ( shown with the German interface )

Inbound Check

The Inbound Check checks an invoice from a supplier against your company and against the vendor in SAP:

  • whether the invoice is addressed to your company, with the name, address and VAT identification number of the company code,
  • whether the bank account of the invoice is stored for the vendor; a new IBAN of a known supplier is the most common route of invoice fraud,
  • whether the invoice number has already been posted for this supplier, with document number, fiscal year and document date of the existing document,
  • whether the purchase order named exists and belongs to this supplier,
  • whether due date and cash discount match the payment terms of the vendor,
  • and whether the mandatory details of an invoice are present.

Note: The reference of a document in SAP has only 16 characters. To find a duplicate invoice, the viewer therefore uses the first 16 characters of the invoice number.

Outbound Check

The Outbound Check checks your own invoice before the customer objects to it:

  • whether name, address and VAT identification number of the seller match your company code,
  • whether the bank account named is one of your house banks,
  • whether name, address and VAT identification number of the customer match the customer master,
  • whether the Leitweg-ID is in the invoice when one is stored for the customer,
  • and whether due date and cash discount match the payment terms.

Identifier Check

The Identifier Check checks the identifiers of the invoice formally, for example the check digits of IBAN and VAT identification numbers and the structure of a BIC. It asks no service on the internet for this.

Where the master data come from

The master data are read fresh from SAP on every call and are maintained there. They cannot be changed in the display; there is therefore no supplier or customer list of its own. When a file is opened without a document, the viewer looks for the partner by the VAT identification number and the IBAN of the invoice, with at most ten hits. For a PDF file without a document this is not possible; the checks against the partner are then skipped with a notice that the invoice was not opened from a document, and the formal checks still run.

9 · Data protection and what is read

The viewer only reads. For each display the package writes the data of the document into a small file in the temporary folder of the SAP GUI and deletes it as soon as the window is closed. Nothing is stored in the browser control except the language chosen.

DataRead from
Document and directionBKPF, BSEG ( a vendor line means inbound, a customer line outbound ); for MIRO RBKP and RSEG, for a billing document VBRK
Archive documentArchiveLink through ARCHIV_GET_CONNECTIONS and SCMS_AO_TABLE_GET
Own companyT001, ADRC, T001N, house banks T012 and T012K with TIBAN and BNKA
VendorLFA1, LFB1, LFBK with TIBAN and BNKA
CustomerKNA1, KNB1, KNBK with TIBAN and BNKA
Duplicate invoiceBSIK and BSAK ( same reference for the same vendor )
Purchase orderEKKO, for MIRO also RSEG
Payment termsT052
SettingsTVARVC ( STVARV )

10 · Changing the edition and updating

Changing to the edition with Checks. Both editions use the same object names, so a system always has exactly one of them. To change, choose "Import ZIP" in the existing offline repository in abapGit with the file of the edition with Checks and run "Pull". Only the display in the MIME object is replaced; the menu item and the settings stay.

Importing a new version. A new version comes as a new ZIP file for abapGit and is imported in the same way. On the workstation the viewer unpacks each version into a folder of its own, so old and new do not interfere.

11 · Removing

Keep to this order:

Caution: Step 1 must come first. An entry in SGOSATTR whose class is missing causes an error message when "Services for Object" is opened.

12 · Questions and problems

The menu item "Show e-invoice" is greyed out. No e-invoice that the viewer recognises is stored for the document. Check in the attachment list whether an XML or PDF document is there. If document types are maintained in STVARV, only those count.

The menu item is missing altogether. The entry in SGOSATTR is missing, or the chain through "Next service" is broken ( chapter 4 ).

The window stays empty. The SAP GUI still uses the browser control "Internet Explorer". Change it to "Edge (based on Chromium)" ( chapter 2 ).

The SAP GUI asks for permission on the first call. When unpacking for the first time, the SAP GUI asks for each new folder whether it may write there. Answering the first prompt with "Remember my decision" and "Allow" grants the permission for the whole folder of the display. A permanent rule can be set in the security settings of the SAP GUI for its temporary folder.

The checks are missing. You imported the edition without Checks ( chapter 10 ).

Finding the partner of a file takes long. Without a document the viewer looks for the partner by the VAT identification number. This field has no index in SAP; with a very large master the search can take a few seconds.

13 · List of images

This list shows which screenshots this manual expects and which were found in the folder screenshots/ of the package. An image is always named key.language.png, for example sap-dienste-zum-objekt.en.png. The images show sample data only.

StatusFileWhat it shows
–sap-dienste-zum-objekt.en.pngThe menu "Services for Object" of a document with the new entry "Show e-invoice" below the attachment list ( shown with the German interface )
–sap-rechnung.en.pngAn outgoing invoice from FB03 on the tab "Invoice" with the BT codes switched on and the notice on the findings of the Outbound Check ( shown with the German interface )
–sap-anlage.en.pngThe table "Attachments" of an invoice with an opened service charge statement as PDF ( shown with the German interface )
–sap-outbound-check.en.pngFindings of the Outbound Check: differing addresses as warnings and a foreign VAT identification number of the seller as an error ( shown with the German interface )