Stage 2 · Value tables · Conditions

Value tables for e-invoices from SAP: invoice type, payment means and conditions without programming

Much of what appears on an e-invoice does not exist in SAP at all. The invoice type, the payment means according to the standard or the tax category are derived from SAP keys: from the billing type, the payment method, the tax code. These translations are kept in value tables on the processing server, and all mappings share them.

At a glance

Three things make this special. A translation is maintained once and applies to all document types. Every code is checked against the code lists of the standard when it is maintained. And you decide which conditions appear on the invoice per sales organisation, billing type and pricing procedure.


Your customers want one total per item, SAP delivers a dozen conditions

A billing item often carries twelve conditions: base price, several discounts, freight surcharge, cash discount base, calculation aids. If they are passed into the e-invoice unfiltered, the recipient sees lines they should never see, and some invoices become confusing. Most customers want something else: one price per item, several discounts combined into one line and bills of material as a single line.

It is similar with the invoice type and the payment means. Your own corrective invoice should go out as a corrective invoice, your payment method “U” as a credit transfer. In a custom development, something like this sits as a case distinction in every single program, and every new billing type has to be added everywhere.


How a value table works

A value table has key columns from SAP, for example sales document category, billing category and billing type, and result columns according to the standard, for example the invoice type. An empty key means “applies to all”. If several rows match, the most specific one wins. This is the same rule you know from the customizing of the SAP add-on.

Excerpt from the value table for the invoice type in SD
Sales document categoryBilling typeBilling plan typeInvoice type
M Invoice380 Invoice
O Credit memo381 Credit note
Your corrective invoice384 Corrected invoice
M InvoicePartial billing326 Partial invoice
M InvoiceFinal construction work877 Final invoice construction work

What you gain: A new billing type is a new row. You do not have to touch the mappings for it.


The document leads: the order of precedence for every piece of information

  • 1. What is in the document

    A payment method in the document is translated via the value table; a house bank in the document is used.

  • 2. What is maintained differently for the partner

    If the document contains nothing, the entry for the partner in SAP applies, for example a fixed payment means for a customer.

  • 3. The default

    Otherwise the default per company code and organisation from the add-on’s customizing applies.

  • 4. The rule in the mapping

    Only then does the rule in the mapping take effect. If a mandatory value remains empty, nothing is guessed; a finding is reported.


The value tables supplied

The mapping package comes with eleven value tables whose rows cover the SAP standard. You add the keys of your company and can create your own value tables for your own mappings.

Value tables supplied
Value tabletranslatesinto
Invoice type SDsales document category, billing category, billing type, billing plan typeInvoice type
Invoice type FIdocument type, debit or creditInvoice type
Invoice type purchasingtransaction, document type, invoice or credit memoinvoice type, for example 389 and 261 in self-billing
Invoice type Settlement Managementdocument category, settlement typeInvoice type
Payment meanscountry and payment methodpayment means according to the standard and its text
Taxcompany code, tax code, languagetax category, exemption reason and text
Condition rule setcompany code, sales organisation, billing type, pricing proceduresettings for the presentation
Condition typesrule set, condition typetreatment and group
Groupsgroup, languagetext and basic code of a line
Units of measureunit of measurecode according to UN/ECE Rec 20, exceptions only
Countriescountrycode according to ISO 3166, exceptions only

Conditions: you decide what appears on the invoice

For the conditions you choose a rule set per company code, sales organisation, billing type and pricing procedure. In the rule set you specify whether an item appears individually with charges and allowances or only with a price, whether sub-items are included in their higher-level item and which item categories are dropped when the amount is zero. Then each condition type gets a treatment.

Include in the price

The condition is contained in the net price of the item. The recipient sees a price that already includes the discount.

Show as charge or allowance

The condition appears as a separate line on the item or, summed up, in the invoice header. You combine several condition types into a group with one text.

Do not output

Calculation aids and internal values do not appear at all. Statistical and inactive conditions are already filtered out by the add-on.

What you gain: The invoice shows what your customer expects. Finally, the server checks whether quantity times price minus allowances plus charges again gives the item value; a discrepancy is reported and not silently balanced out.


The Value Table Studio with the Condition Mapper

The value tables are maintained with the Value Table Studio, a tool that runs in your browser without installation. It is in progress and follows the same design as the Mapping Studio.

  • Prefill from SAP

    You load a table extract from SE16, for example the billing types, the payment methods or the condition types, and the studio proposes a row for each key.

  • Check codes

    Every result value is checked against the code list of the standard and against your target formats.

  • Test on real documents

    You load transfer XMLs of your documents and see for each one which row applies and why.

  • Assign conditions

    The Condition Mapper shows all condition types of your billing documents with count and total. You assign treatment and group with a click, and you see every item before and after.


Release, proof and a clear boundary

Four eyes before every change

A draft is uploaded to the server and run against the latest documents. A second person sees for which documents a field would change and releases the new version with a cut-off date. The old version is retained.

Every document names its versions

For every invoice the server reports which value tables were used in which version, and SAP records this with the document.

No partner data on the server

A value table must not have a customer or vendor as a key. Whatever deviates for an individual partner is maintained by your business department in SAP in the recipient profile. That way every piece of information is in one place, and the value tables contain no personal data.


Questions and answers

Frequently asked questions

Because they translate, they do not control. Whether a code is valid depends on the target format, and the server knows that. In addition, translations can be tested on real documents there before release.

No. A new version of a value table is released on the server. Whatever concerns individual partners is maintained by the business department directly in SAP anyway.

Then the rule in the mapping takes effect, for example “sales document category credit memo results in 381”. If that is missing too, the server reports a finding.

Yes, for your own mappings, for example for a custom classification of items. They behave like the supplied ones.


What do the conditions on your invoices look like today?

Send me an example, and I will show you what a rule set for it would look like.