Skip to Content
User Experience Insights
Author's profile photo Alberto Sirianni

Electronic invoice for Italy with SAP Business ByDesign

This blog will describe how to configure the transformation settings to enable the system to send an electronic invoice in Italy.

In Italy it is legally required to provide an electronic invoice when dealing with any Italian company.

The Government has created a specific layout for the XML format that must be complied with.

Then, using the standard functionality of e-invoicing with SAP Business ByDesign, see the blog, we created the two needed XSLT files for transformation, one to automatically create the Italian e-invoice for customer

and other one to correctly acquire the supplier invoice in the same format.

For customer Invoices, once the transformation has been correctly assigned to the output channel selection

system will automatically create the final XML file in the output history, once the customer invoice has been posted

For Vendor Inovices, you have to upload the vendor XML file and select the XSLT Transformation ID to use.

The system processes the XML input file and create the vendor invoice entry in ByD.

How to create XSTL files?

Using existing tools like Altova XMLSpy, Oxigen XSLT Editor, EDITIX, Liquid Studio, you can develop XSLT file needed for the transformation.

For Customer Invoices, Byd produce an XML file containing all invoice information. Using the XSLT for Customer Invoices you can obtain a “custom” XML output.

For Vendor invoice you need to transform the supplier XML file  into XML defined into webservice “Manage Supplier Invoice”.

We conclude, that we have covered in this blog post the configuration of the transformation settings to be able to send and receive the electronic invoice according to the Government directives.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Josip Spajic
      Josip Spajic

      Im having so much trouble with the xslt file, I dont have experience working with it before so thats the main issue, but whatever file I put as the .xslt it results in an error when trying to see the output XML from a released customer invoice. Did you have the same issue ?

      I tried using the first part of an example in this sap blog post:

      <xsl:transform xmlns:xsl="" version="1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
      	<xsl:output encoding="UTF-8" indent="yes" method="xml" />
      	<xsl:strip-space elements="*" />
      	<xsl:template match="/">
      		<b1i-xs1:Invoice xmlns:b1i-xs1="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:n0="" xmlns:prx="">
      				<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/ID" />
      				<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/Date" />
      						<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/BuyerParty/InternalID" />
      						<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/BuyerParty/FormattedName" />
      				<cbc:LineExtensionAmount currencyCode="USD">
      					<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/PriceAndTax/NetAmount" />
      				<cbc:TaxExclusiveAmount currencyCode="USD">
      					<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/PriceAndTax/TaxAmount" />
      				<cbc:TaxInclusiveAmount currencyCode="USD">
      					<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/PriceAndTax/GrossAmount" />
      				<xsl:for-each select="/n0:FormInvoiceRequest/CustomerInvoice/Item">
      							<xsl:value-of select="ID" />
      							<xsl:value-of select="Description" />

      Ive tried it out on an online transformer and it should generate at least some kind of an XML but all I get is errors in byd.


      One more question, do you just send the generated XML to an endpoint or do you have another step in between where you generate the propper request. Im asking because I have to send username, password and the xml in the body of my POST request but I think this way it just sends the generated XML ?

      Best regards.

      Author's profile photo Gareth Eade
      Gareth Eade

      Have you spaces in the file name of the XSLT file? It must not have any, spaces result in uncaught errors in the system.

      Best Regards,

      Author's profile photo Siim-Joonas Räim
      Siim-Joonas Räim

      Hi Josip!


      Please vote for the e-invoice improvement request, so it would be easier to send out e-invoices:
      Thank You!
      Kind regards,
      Siim-Joonas Räim
      Author's profile photo Alastair Mackintosh
      Alastair Mackintosh

      Does anyone know what version of xslt this process works with?