BAHAG INVOIC Guide D01B V2.1 DE AT LU NL SI Eng
BAHAG INVOIC Guide D01B V2.1 DE AT LU NL SI Eng
for
invoice data interchange
via EDI-INVOIC
Changelog 3
Introduction and general considerations 4
EDIFACT syntax overview 5
Segment summary 9
Detailed segment description 12
Message example 89
1. The guideline is based on the EANCOM message type INVOIC, version D01B according to the
EANCOM specification.
2. The specifications contained therein describe the lengths and types of fields, as they are
required for processing at BAHAG AG. Failure to comply with these specifications will result
in the submitted EDI-message not being processed and considered as 'not received'.
3. The segment status as specified in the segment notes can differ from the official EANCOM
status displayed in the header.
5. As a general rule, all details that were previously communicated via paper invoices must also
be provided in the EDI-INVOIC message. Therefore, the contents of a paper invoice and its
EDI-INVOIC representation must be identical.
8. If the supplier specified in the NAD+SU segment is not the provider of goods or services, its
details must be specified in the NAD+SF segment.
9. The central email address for all technical and support issues is [email protected].
10. EDI INVOIC messages are intended solely for the processing of invoices. Credit notes
(BGM+381) and Corrected invoices (BGM+384) will not be processed. Partial Statements are
valid depending on contractual agreements.
11. The EDI-INVOIC message has to be coded in ISO-8859-1 or as UTF-8. The corresponding
presentation is to be found in the UNB.
12. Due to rounding differences, a maximum of 3 cents is tolerated for the calculation of VAT
and the calculation of the total tax amount.
Segments starting with “UN” are called “service segments” and act as a frame for EDIFACT messages.
Other segments include the actual information that should be transmitted according to the specific
message type.
A message is the sum of all segments and groups of segments that are required for the representation
of a business process (e.g. an Invoice). Each Segment has its own distinct position in the sequence of
segments/segment groups within the message.
Segments of the same type can appear at various places within the message, for instance in the head
section, in the details section and/or repeatedly in the same part of the message.
The most left column contains the name of a data element, the next column contains the description
and is followed by a column that contains the EDIFACT status identification (Conditional or
Mandatory), then by the data format and eventually by the length of the data element. These
details, which appear under the “EDIFACT” head row, lay out the original EDIFACT description. The
EDIFACT description is followed by details that are specific to BAHAG AG and appear in the fifth, sixth
and seventh columns under the head row “Application, allowed codes”.
The fifth column contains a status indicator for the usage of data elements, followed by the data
format as well as by the length of the element in column six and by the seventh column with
comments and utilized code values.
Status types:
Status Status Description
M Mandatory
N Not used
C Conditional
Format description:
Format Format Description
A alphabetic symbol
N numeric symbol
an alphanumeric symbol
a3 3 alphabetic symbols of a fixed length
n3 3 numeric symbols of a fixed length
an3 3 alphanumeric symbols of a fixed length
a..3 up to 3 alphabetic symbols
n..3 up to 3 numeric symbols
an..3 Up to 3 alphanumeric symbols
4. Qualifiers
A qualifier is a special data element. Its value is coded and further specifies the meaning of a group of
data elements or to a segment. Valid values for these “qualifiers” are defined in a directory of codes.
5. Separators
Example: DTM+137:20140119:102’
a. Decimal symbols
Commas and period symbols are allowed. The decimal symbol is not counted when determining the
maximum field length of a data element’s value. When a decimal symbol is transferred it should be
preceded and followed by at least one more symbol.
c. Algebraic signs
Numerical data elements are considered to be positive.
In case a negative value has to be provided, it must be must preceded at once by a minus sign, e.g.
-112. The minus sign does not count towards the length of data element.
UNOY =
UN/ECE level C (UTF-8 without
BOM)
0002 Syntax version number M n1 M n1 3 = Version 3 (only for UNOC)
Note: The test indicator in S005-0035 has no meaning for BAHAG AG.
Note: UNOY:4 is only to be used for UTF-8 without BOM encodings.
This segment is used to open, identify and describe the transferred file.
Example: UNH+0001+INVOIC:D:01B:UN:EAN011'
This segment is used to open a message, identify and specify a message.
Comments to DE 1001:
The document serves as a request for payment for goods delivered or services provided in accordance to
terms that were agreed between a Buyer and a Seller. The message is sent by a Supplier/Invoicing party to a
Buyer/Invoicee.
Example: BGM+380+8744256739+9'
The document number is 8744256739.
This segment serves to show the type and function of the message and to communicate the invoice number.
Example: DTM+137:20241001:102'
The message was created on 01.10.2024.
This segment is used for specification of the document or message date.
DE 2005 = 35, actual delivery date/time: date, on which the supplier has delivered the goods. The actual
delivery date corresponds for tax purposes to the date when the services were provided or goods were
delivered.
Example: DTM+35:20240915:102'
Delivery took place on 15.09.2024.
Example: FTX+ZZZ+++Text:Text2:Text3:Text4:Text5'
This segment serves for specification of text information concerning the whole invoice.
Example: FTX+REG+1+RCH'
For line items in this invoice sent with a tax rate of 0.00%, the tax liability is transferred to the
receiver of the goods or services.
Example: FTX+REG+1+IGL'
Tax free intracommunity delivery.
Example: FTX+REG+1+IGD'
Intra-Community triangular transaction
Example: FTX+REG+1+SE00::246'
The tax exempt amount is 246.
This segment serves for specification of text information concerning the whole invoice.
Note: The legal form MUST be transmitted for Austria and the Netherlands.
Example: FTX+REG+1++GmbH:Musterstadt'
The legal form of the supplier is GmbH and the headquarters are located in Musterstadt.
This segment serves for specification of text information concerning the whole invoice.
Example: RFF+ON:1012345678'
The message refers to the customer’s order 3678201546.
This segment refers to the customer’s order.
Example: DTM+171:20240815:102'
The customer’s order is from 15.08.2024
This segment is used to specify a date in relation to/in context of the preceding RFF segment.
This segment holds the delivery note number associated with the invoice.
Example: RFF+DQ:4715'
The message refers to the delivery note 4715.
This message allows referring to the deliver note.
Example: DTM+171:20240815:102'
The delivery note is from 15.08.2024
This segment is used to specify a date in relation to/in context of the preceding RFF segment.
Example: NAD+SU+4000000000000::9++MUSTERLIEFERANT+MUSTERSTRASSE+MUSTERORT++54321+DE'
The supplier has GLN 4000000000000 and the address as stated in the example line.
This segment is used for identification of the supplier and specification of its address.
Example: FII+RB+SI56111122223333444:ABCDEFG+:25::9::Bank'
The amount should be transferred to the bank with the IBAN: SI56111122223333444.
This segment is used to identify an account and a related financial institution.
Example: RFF+YC1:128717'
The supplier’s number by the customer is 128717.
The RFF segment that comes after a NAD segment can contain mutually agreed additional identification.
Example: RFF+TRB:1264::Musterstadt'
The commercial register entry number is 1264 in Musterstadt.
In the RFF segment that follows a NAD segment the commercial register entry and the place of jurisdiction
must be stated.
Example: RFF+VA:AT101010'
The VAT registration number is AT101010.
In the RFF segment that follows a NAD segment the VAT registration number must be stated.
Segment notes:
Segment status: Mandatory, if supplier is located in Slovenia.
Example: RFF+AHP:123456789'
The official license number/ Matična številka is 123456789.
In the RFF segment behind the NAD segment, the official license number must be specified.
Example: RFF+FC:07/408/123'
The fiscal number is 07/408/123.
In the RFF segment that follows a NAD segment the fiscal number must be specified.
Note: The wood certificate is only required if the invoice includes a wood certified item.
Example: RFF+XA:SGSCH-COC-050256'
The FSC certificate number is SGSCH-COC-050256.
RFF+XA:PEFC/04-04-0067'
The PEFC certificate number is PEFC/04-04-0067.
RFF+XA:WEEE DE51021519'
The WEEE certificate number is DE51021519.
In the RFF segment that follows a NAD segment the certification of the supplier must be specified.
Regulierenring 2G = Buyer’s
street and number (NL)
This segment serves for the identification of the buyer and for specification of its address.
In the RFF segment that follows a NAD segment the VAT registration number of the buyer should be stated
Segment notes:
Segment status: Conditional
In the RFF segment that follows a NAD segment can be given the fiscal number.
Note: For drop shipment orders in Germany (online store), the GLN 4024506005006 is expected.
Note: For drop shipment orders in Austria (online store) the GLN 9006713000222 is expected.
Note: For drop shipment orders in the Netherlands (online store), the GLN 8714252031300 is expected.
Example: NAD+DP+9006713000000::9++MUSTERLAGER+MUSTERSTRASSE+MUSTERORT++5432+AT'
The delivery party GLN is 9006713000000 and it has an address as in the example above.
This segment always identifies the first delivery place.
Note: If the supplier is not the direct provider of goods or services, this segment is mandatory.
Example: NAD+SF+4000000000000::9++MUSTERLAGER+MUSTERSTRASSE+MUSTERORT++54321+DE'
The provider of goods and of the service GLN is 4000000000000 and its address is as in the
example.
This segment identifies the provider of goods.
Note: The VAT identification number of the service provider must be specified here.
Example: RFF+VA:DE901010'
The VAT registration number of the buyer is DE901010
In the RFF segment that follows a NAD segment should be stated the VAT registration number.
The applicable tax rate of the document is specified here in the header of the message. Possible deviating
tax rates are displayed on the line item level.
Example: TAX+7+VAT+++:::19+S'
If there is not at least one tax-exempt line item in SG34, the applicable tax rate for the invoice is
19%.
This segment is used to specify the type of tax, its category and its rate for the whole invoice
Note: The currency transmitted for the invoice must correspond to the order currency. Usually these are
Euro (EUR).
Example: CUX+2:EUR:4'
The bill is invoiced in Euro.
This segment is used to specify the currency details for the whole invoice.
Example: PAT+3'
This segment is used by sender for the specification the payment terms that are applicable to the whole
document.
The date (Code 13), at which the payment is due, must be provided in the message.
Example: DTM+13:20241114:102'
The payment is due on 14.11.2024
This segment is used to provide the terms net due date.
Example: PAT+22++5:3:D:14'
This segment is used to specify the time period in which the discount is applicable.
The date (Code 12), at which the payment with a trade discount is due, must be provided in the message.
Example: DTM+12:20240530:102'
The payment is due on 30.05.2024.
This segment is used to specify the date by which the payment should be made so that the payment
discount can be applied.
A payment or trade discount is a discount that is granted when the payment id done within a certain time
period or until a specified date.
Example: PCD+12:3'
There is a trade discount of 3%.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+8:6.38:EUR'
The monetary amount is 6,38 EURO.
This segment is used to represent monetary allowances or charges, if the invoicee pays (or does not) on
time.
Example: PAT+22++66:::12'
This segment is used to specify the number of value days.
Example: DTM+209:20240530:102'
The value date is 30.05.2024
This segment is used to provide date details in context of the payment terms that are specified in the
invoice.
EXW = Ex Works
FCA = Free Carrier
FAS = Free alongside ship
FOB = Free on Board
CFR = Cost and Freight
CIF = Cost, Insurance and
Freight
DAT = Delivered at Terms
DAP = Delivered at Place
CPT = Carriage paid to
CIP = Carriage and
Insurance Paid to
DDP = Delivered Duty Paid
1131 Codelist, Code C an..3 N
4052 Delivery or transport terms C an..70 C an..70 Delivery or transport terms
description description
4052 Delivery or transport terms C an..70 C an..70 Delivery or transport terms
description description
Segment notes:
Segment status: Conditional
etc…
DI = Discount
FC = Freight charge
IN = Insurance
PC = Packing
MAC = Small-quantity surcharge
CRS = Waste disposal costs
AEO = Surcharge for recycling
Example: PCD+3:3'
This segment is used to specify allowance / charge percentages in the ALC group in question.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+8:2.97:EUR'
Allowance or charge is 2,97 EURO.
This segment is used to specify the monetary amounts of allowances or charges in the ALC group in
question.
This segment indicates with which tax rate allowances or charges are associated.
Example: TAX+7+VAT+++:::19+S'
The invoice discount refers to the part of the invoice that is subject to 19% VAT.
Example: LIN+1++4000000000000:SRV'
The invoiced item is identified with GTIN 4000000000000.
This segment indicates the beginning of the line item section of the invoice. The line item section is formed
by repeating segment groups that start with a LIN segment.
Example: PIA+1+AB123456:SA'
The internal article number of the supplier is AB123456.
This segment is used to specify additional or substitutional item identification, e.g. item number of the buyer
or of the supplier.
Example: PIA+1+12345678:IN'
The internal article number of the buyer is 12345678.
This segment is used to specify additional or substitutional item identification, e.g. item number of the buyer
or of the supplier.
Example: PIA+1+84539123456CD:HS'
The harmonized system number is 84539123456CD.
This segment is used to specify additional or substitutional item identification, e.g. item number of the buyer
or of the supplier.
Example: IMD+A++:::Text1:Text2'
The line has long article description: Text 1 and Text 2.
This segment is used to describe the current line item.
Example: IMD+C++SG::9'
According to the item description, there is a stand up display, described within the main line
item, to which the current line item refers.
Example: IMD+C++CU::9'
According to the article description there is a container, so that every line item refers to the main
line item.
Example: QTY+47:17:PCE'
17 pieces are invoiced.
This segment is used to indicate the invoiced quantity of the current line item.
Example: ALI+DE'
The country of origin is Germany.
This segment indicates that special conditions apply depending on the origin, customs preference and fiscal
or economic factors.
Example: FTX+LIN+++Text:Text2:Text3:Text4:Text5'
This segment is used to provide text information concerning the current position.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
The price that is given in the PRI segment is a net price and it is used to calulate the line item amount as
follows:
Line item amount = (Quantity * Price)
Example: MOA+203:212.5:EUR'
The net value of the goods is 212,50 EURO.
This segment is used to specify all monetary amounts concerning the current line item.
This segment must be used to indicate the prices used for the calculation of the value of the goods.
In an invoice only one calculation method is allowed to be used to determine the value of the goods.
Example: PRI+AAA:12.50:::1:PCE'
The net price per piece is 12,50 EURO.
This segment is used to provide price details for the current line item.
Note: The wood certificate class must be specified here. Alternatively, the wood certificate and class can be
specified here if it is not possible to specify the wood certificate at header level.
This segment is used to specify the certificate number for the current position.
Example: RFF+ACD:9c917f84-d5da-f39b-5414-12d14040ab10'
The configuration id is 9c917f84-d5da-f39b-5414-12d14040ab10.
This segment is used to specify the configuration id for the current position.
The tax rate of the article must be displayed on the line item level.
Example: TAX+7+VAT+++:::19+S'
The line item is subject to a tax rate of 19%.
This segment is used to provide the type of tax, it´s category and rate for the current line item.
If there is at least one tax-exempt line item, the tax exemption also has to be displayed in the head section
(SG6).
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+124:2.38:EUR'
The value added tax amount for this line item is 2,38 EURO.
This segment is used to provide monetary amounts related to the current line item.
etc.
For each line item its own segment group 39 is created, when applicable.
The allowances / charges in the head section of the invoice are independent of those in the line item
section, i.e. ALC in the line item section does not override ALC in the head section.
Example: ALC+A+++1+DI:::Discount
There is a discount on the line item level.
This segment is used to specify all allowances / charges related to the current line item. Please note to only
send discounts on position level. Freight charge, Packing and Insurance need to be send in the head
section.
Example: PCD+3:3'
This segment is used to specify percentages of allowances or charges for the calculated position.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+8:2.97:EUR'
Allowance or charge is 2,97 EURO.
This segment is used to specify the monetary amounts of allowances or charges in the ALC group in
question.
Example: UNS+S'
Separation of the line item and Summary sections
This segment is used to separate the line item and Summary sections of the message.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+77:249.34:EUR'
The invoice amount is 249,34 EURO.
This segment is used to specify advance payments or aggregate amounts for the entire invoice.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+79:212.5:EUR'
The sum of all net values is 212,50 EURO.
This segment is used to specify advance payments or aggregate amounts for the entire invoice. Tolerance 3
cents.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+124:39.81:EUR'
The tax amount is 39,81 EURO.
This segment is used to specify advance payments or aggregate amounts for the entire invoice.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+125:209.53:EUR'
The taxable amount of the invoice is 209,53 EURO.
This segment is used to specify advance payments or aggregate amounts for the entire invoice.
This MOA segment contains the sum of the allowances / charges of the bill document on the invoice level.
Note DE 5004: The amount must be communicated with the correct sign.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+131:-2.79:EUR'
This sum of invoice discounts is 2,79 EURO.
This segment is used to specify advance payments or aggregate amounts for the entire invoice.
If the invoice contains multiple VAT rates then this group must be repeated for each tax rate. If the invoice
has only one VAT rate then SG52 must NOT be transmitted.
Example: TAX+7+VAT+++:::19+S'
VAT rate of 19% applies to this part of the invoice.
This segment is used to provide the type of tax, its category and rate for the current line item.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+124:20.00:EUR'
The tax amount for the given VAT rate is 20,00 EURO.
This segment is used to specify advance payments or aggregate amounts per tax rate for the entire invoice.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+125:115.97:EUR'
The taxable amount of the invoice for the given tax rate is 115,97 EURO.
This segment is used to specify advance payments or aggregate amounts per tax rate for the entire invoice.
This MOA segment contains the sum of the allowances / charges on document level.
Note DE 5004: The amount must be communicated with the correct sign.
Note:
Transferring a currency in the MOA segments is optional. If a currency is transferred in the MOA segments, it
must accord to the reference currency from the CUX segment.
Example: MOA+131:-5.00:EUR'
The sum of the discounts in the invoice for a tax rate is 5,00 EURO.
This segment is used to specify advance payments or aggregate amounts per tax rate for the entire invoice
Example: UNT+123+0001'
Number of segments in the message is 123.
The UNT segment is a mandatory segment in UN / EDIFACT. It must always be the last segment in the
message.
Example: UNZ+1+4321'
This segment is used to end the data interchange and to check its completeness.
UNB+UNOC:3+4000000000000:14+4024506000001:14+130606:1234+4321++++++1'
UNH+0001+INVOIC:D:01B:UN:EAN011'
BGM+380+8744256739+9'
DTM+137:20121001:102'
DTM+35:20120915:102'
FTX+ZZZ+++Text:Text2:Text3:Text4:Text5'
FTX+AAK+1+ST1+Hinweis auf Entgeltminderungen'
FTX+REG+1++GmbH:Musterstadt'
RFF+ON:1012345678'
DTM+171:20120815:102'
RFF+DQ:4715'
DTM+171:20120815:102'
NAD+SU+4000000000000::9++MUSTERLIEFERANT+MUSTERSTRASSE+MUSTERORT++54321+DE'
RFF+YC1:128717'
RFF+TRB:1264::Musterstadt'
RFF+VA:DE101010'
RFF+FC:07/408/123'
RFF+XA:325656'
NAD+BY+4024506000001::9++BAHAG Baus Handelsgesellschaft AG+Gutenbergstr. 21+Mannheim++68167+DE'
RFF+VA:DE143872368'
RFF+FC:37007/05224'
NAD+DP+4000000000000::9++MUSTERLAGER+MUSTERSTRASSE+MUSTERORT++68809+DE'
NAD+IV+4024506000001::9 '
TAX+7+VAT+++:::19+S'
CUX+2:EUR:4+3'
PAT+3'
DTM+13:20131114:102'
PAT+22++5:3:D:14'
DTM+12:20130530:102'
PCD+12:3'
MOA+8:6.38'
PAT+22++66:::12'
DTM+209:20130530:102'
TOD+6++CIF:::frei Haus'
ALC+A+++1+FC:::Frachtkosten'
PCD+3:3'
MOA+8:10.00'
TAX+7+VAT+++:::19+S'
LIN+1++4000000000000:SRV'
PIA+1+AB123456:SA'
PIA+1+12345678:IN'
PIA+1+84539123456CD:HS'
IMD+A++:::Text1:Text2'
IMD+C++SG::9'
QTY+47:17:PCE'
ALI+DE'
FTX+LIN+++Text:Text2:Text3:Text4:Text5'
MOA+203:212.50'