What is E-Invoicing
According to the European Commission eInvoicing is the electronic exchange of an invoice document between a supplier and a buyer. An eInvoice is an invoice that has been issued, transmitted, and received in a structured data format which allows for its automatic and electronic processing, as defined in ‘Directive 2014/55/EU’.
Further details the respective country-specific regulations can be found here:
eInvoicing Country Factsheets for each Member State and other countries (europa.eu)
For Germany as an example the following information is currently available:
(…) as of 1 January 2025, eInvoicing becomes the default method to issue invoices in Germany, but they will not be mandated yet for everyone. Businesses must be prepared to receive eInvoice with the EN 16931. However, the supplier is still allowed to issue paper invoices for invoices in unstructured format and non-EN-compliant EDI invoices, as long as buyer’s consent is provided (…).
What is E-Invoicing in the context of SAP Business ByDesign:
SAP Business ByDesign already now supports the exchange of electronic customer invoices and supplier invoices.
In this blog we will focus on the receiving of eInvoices (supplier invoices). We will provide an overview of the existing capabilities, and how to leverage these. In addition, we will outline plans for future releases to better support multiple different eInvoice formats per country.
More details on the sending of eInvoices (customer invoices) can be found in E-Invoicing with SAP Business ByDesign - SAP Community and Integrating SAP Business ByDesign to Peppol Networ... - SAP Community.
How to receive e-invoices in SAP Business ByDesign (supplier invoices):
There are mainly three different options on how to process e-invoices in SAP Business ByDesign:
DISCLAIMER : The blog primarily is a direction for the partners/customers on how to achieve e-invoicing. Request partner/customer user to adopt their XMLs as needed, by referring to this blog as just an example.
In the following we will have a deeper look into these options:
Option 1: Use the Manage Supplier Invoice In inbound SOAP service. In this approach an external or partner solution needs to do the processing of the eInvoicing XML as well as content mapping from the respective eInvoicing format into the format / payload requested by the SOAP service.
Mainly the operation Maintain_Bundle operation of the Manage Supplier Invoice In inbound service interface is relevant. For more details please refer to the service “Manage Supplier Invoice In” SAP help documentation .
*******
Option 2: Manual upload of SIV into SAP Business ByDesign leveraging transformation IDs.
Note: Sample XML files of Supplier invoice & transformation files are provided at the end of this blog.
Detailed Steps:
(1) First you need to enhance your scope to allow the creation of supplier invoices via file upload. This can be done in the ‘Questions’ section in business configuration under
(2) In addition, you must assign the ‘Invoice File Upload’ view of the ‘Supplier Invoicing’ work center to the respective users.
(3) Next, go to the ‘Supplier Invoicing’ – view ‘Invoice File Upload’ and execute the ‘Upload’ action.
(4) In the popup specify the country of the invoice, the transformation data, as well as the transformation ID. Once this is provided, by executing the action ‘Start Process’ immediately supplier invoices will be created from the uploaded files (action ‘+ Browse’).
In the following we will describe in detail how to define a transformation ID. (if you already have transformation ID, then please proceed to point (5))
First, we need to give some background on transformations. E-Invoices are provided in a certain XML format provided by the government. A transformation now uses a so-called ‘Extensible Stylesheet Language Transformations (XSLT)’ file to convert the original XML format into the SAP Business ByDesign specific XML format.
That means, in case a transformation is available, the system can then automatically process the uploaded XML and create a supplier invoice in SAP Business ByDesign. SAP will not provide these transformations out-of-the-box, however customers or partners can easily create and upload their transformations. In the next section we will therefore provide the detailed steps on how to create the transformation together with examples that you can use as a starting point.
Steps to create a transformation ID:
Note: currently we support only one transformation sub-type (NO-SUBTYPE). Consequently, only one transformation can be maintained per country to process supplier eInvoice XML files. Nevertheless, we currently investigate in allowing multiple sub-types. Once we have more clarity on that we will update this blog post accordingly. This would allow us to process multiple different eInvoice formats per country in parallel.
(5) Now that the transformation ID got created, we can continue in the work center ‘Supplier Invoicing’, view ‘Invoice File Upload’, action ‘Upload’. Here we now find our newly created ‘Transformation ID’ in the popup value help.
(6) By executing ‘+ Browse..’ you can add eInvoice files.
(7) Execute the action ‘Start Process’ to finally uploading the selected files, transform them using the selected transformation ID, and to create supplier invoices in SAP Business ByDesign.
*******
Option 3: Automated upload of SIV into SAP ByD leveraging transformation IDs.
To do so first you have to follow all the steps as shown in Option 2, except the last step of manually uploading the SIV eInvoicing XML through workcenter “Invoice File Upload”. The manual step of SIV upload is automated through the call of the Odata service “scannedinvoicestagingodata”.
Note: the sample Postman Collection and postman environment can be found in public git repository Supplier E-Invoicing Postman Collection :
Detailed steps to automate SIV upload through Odata service “scannedinvoicestagingodata”:
{
"FileName": "{{SIV-Einvoice-FileName}}",
"TransformationDate": "{{SIV-XSLT-TransformationDate}}",
"TypeCode": "02",
"CountryCode": "DE"
}
{
"ParentObjectID": "{{ScannedSIVObjectID}}",
"Name": "{{SIV-Einvoice-FileName}}",
"MimeType": "application/xml",
"TypeCode": "10001",
"CategoryCode": "2",
"Binary": "{{SIV-Einvoice-BLOB}}"
}
Note : you have to create an BLOB (Binary Large Object) using the external tools like https://onlinexmltools.com/convert-xml-to-base64 and remove the new lines using the tools https://www.textfixer.com/tools/remove-line-breaks.php , copy the resultant BLOB as input to "Binary": {{ input SIV XML BLOB }} to make the above POST odata service call.
Note: please use any open source tools to create BLOB , above mentioned tools are just an example.
Please find below the sample Supplier eInvoice XML:
<?xml version="1.0" encoding="UTF-8"?>
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>EXTPOREF1963</cbc:ID>
<cbc:IssueDate>2024-10-21</cbc:IssueDate>
<cbc:DueDate>2024-10-22</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>99000000-01514-29</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>1963</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="EM">seller@seller.com</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>S200100</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>Eichbaumer Consulting</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Geibelstraße 3</cbc:StreetName>
<cbc:CityName>Celle</cbc:CityName>
<cbc:PostalZone>29223</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>DE123456789</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Eichbaumer Consulting</cbc:RegistrationName>
<cbc:CompanyID>123/456/7890</cbc:CompanyID>
<cbc:CompanyLegalForm>123/456/7890, HRA-Eintrag in Celle</cbc:CompanyLegalForm>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>Gerd Lieferant</cbc:Name>
<cbc:Telephone>+49 1234-5678</cbc:Telephone>
<cbc:ElectronicMail>gerd.lieferant@seller.com</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="EM">byd@buyer.com</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>1000</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>Almika</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Rechnungssstrasse 191</cbc:StreetName>
<cbc:CityName>Hannover</cbc:CityName>
<cbc:PostalZone>30451</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Almika</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
<cac:PayeeFinancialAccount>
<cbc:ID>DE75512108001245126199</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Zahlbar sofort ohne Abzug.</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">42.18</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">222.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">42.18</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">222.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">222.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">264.18</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="EUR">264.18</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:Note>Junior Consulting</cbc:Note>
<cbc:InvoicedQuantity unitCode="h">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">222.00</cbc:LineExtensionAmount>
<cac:OrderLineReference>
<cbc:LineID>1</cbc:LineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Description>Junior Consulting</cbc:Description>
<cbc:Name>Junior Consulting</cbc:Name>
<cac:BuyersItemIdentification>
<cbc:ID>S200102</cbc:ID>
</cac:BuyersItemIdentification>
<cac:SellersItemIdentification>
<cbc:ID>S200102</cbc:ID>
</cac:SellersItemIdentification>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">222.00</cbc:PriceAmount>
<cbc:BaseQuantity unitCode="h">1</cbc:BaseQuantity>
</cac:Price>
</cac:InvoiceLine>
</ubl:Invoice>
Please find below the Sample XML transformation (XSLT):
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" version="1.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<n0:SupplierInvoiceBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TASCBE832EAAD015B6BD1A8:804">
<BasicMessageHeader>
</BasicMessageHeader>
<SupplierInvoice>
<BusinessTransactionDocumentTypeCode>004</BusinessTransactionDocumentTypeCode>
<CustomerInvoiceReference actionCode="01">
<BusinessTransactionDocumentReference>
<ID>
<xsl:value-of select="/ubl:Invoice/cbc:ID"/>
</ID>
<TypeCode>28</TypeCode>
</BusinessTransactionDocumentReference>
</CustomerInvoiceReference>
<DocumentItemGrossAmountIndicator>false</DocumentItemGrossAmountIndicator>
<GrossAmount>
<xsl:value-of select="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount"/>
</GrossAmount>
<Date>
<xsl:value-of select="/ubl:Invoice/cbc:IssueDate"/>
</Date>
<BuyerParty actionCode="01">
<PartyKey>
<PartyTypeCode>200</PartyTypeCode>
<PartyID>
<xsl:value-of select="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID"/>
</PartyID>
</PartyKey>
</BuyerParty>
<SellerParty actionCode="01">
<PartyKey>
<PartyTypeCode>147</PartyTypeCode>
<PartyID>
<xsl:value-of select="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID"/>
</PartyID>
</PartyKey>
</SellerParty>
<Item actionCode="01">
<ObjectNodePartyTechnicalID>15</ObjectNodePartyTechnicalID>
<BusinessTransactionDocumentItemTypeCode>002</BusinessTransactionDocumentItemTypeCode>
<Quantity>
<xsl:value-of select="/ubl:Invoice/cac:InvoiceLine/cbc:InvoicedQuantity"/>
</Quantity>
<QuantityTypeCode>
<xsl:value-of select="/ubl:Invoice/cac:InvoiceLine/cbc:InvoicedQuantity/@unitCode"/>
</QuantityTypeCode>
<Item_Description>
<xsl:value-of select="/ubl:Invoice/cac:InvoiceLine/cac:Item/cbc:Name"/>
</Item_Description>
<NetAmount>
<xsl:value-of select="/ubl:Invoice/cac:InvoiceLine/cbc:LineExtensionAmount"/>
</NetAmount>
<NetUnitPrice>
<Amount>
<xsl:value-of select="/ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:PriceAmount"/>
</Amount>
<BaseQuantity>
<xsl:value-of select="/ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:BaseQuantity"/>
</BaseQuantity>
<BaseQuantityTypeCode>
<xsl:value-of select="/ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:BaseQuantity/@unitCode"/>
</BaseQuantityTypeCode>
</NetUnitPrice>
<Product actionCode="01">
<ObjectNodeSendertechnicalID></ObjectNodeSendertechnicalID>
<CashDiscountDeductibleIndicator>true</CashDiscountDeductibleIndicator>
<ProductKey>
<ProductTypeCode>1</ProductTypeCode>
<ProductIdentifierTypeCode>1</ProductIdentifierTypeCode>
<ProductID>
<xsl:value-of select="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:SellersItemIdentification/cbc:ID"/>
</ProductID>
</ProductKey>
</Product>
</Item>
</SupplierInvoice>
</n0:SupplierInvoiceBundleMaintainRequest_sync>
</xsl:template>
</xsl:transform>
For a template file, which has the mapping for majority of key fields, pls refer to this blog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
3 | |
2 | |
2 | |
2 |