Skip to Content
Product Information
Author's profile photo Michal Pandoscak

Utilities and Tax Payments in Brazil

In Brazil, collections and payment information are exchanged among banks and companies using electronic bank files in the format FEBRABAN CNAB240.

With SAP S/4HANA OnPremise 2020 and SAP S/4HANA Cloud 2005 there are two new possibilities for tax and utilities payments:

  • With a bar code
  • Without a bar code where all the information must be informed manually (each tax has a specific payment form)

There are two specific segments N and O used as follows:

  • N, O for remittance
  • N, O, and Z for return

Segment N is exclusive for payments without bar code and segment O is exclusive for payments with bar code, including payments of services for the public concessionaire. In the return file, segment Z is optional and currently not supported by the program logic.

 

Bar Code for Tax and Utilities Payments

The most common payment format is “boleto”, which contains data from both companies, financial information, and a bar code printed in 2 different forms: bar code and bar code numeric representation.

Bar code in the taxes and utilities bills has a specific structure with 48 digits. It contains 4 blocks and each block has a check digit at the last position.

Once the bar code is informed in a proper field (size of 48 characters) in the accounting document and the specific payment form is assigned, this document can be processed for payment. The bank-specific format for taxes and utilities with bar code file is then generated and sent to the bank.

Note: The bar code for the tax invoices always starts with number 8.

 

Tax Forms

The tax form is a 2-digit ID that identifies the payment form for each tax type. You can use the ID of a tax/payment form when no bar code exists for the given tax payment. During the payment media creation, tax form ID is identified, and the payment data is added into the payment file (in BR_FEBRABAN_A payment medium format), in a new segment, called segment N.

Supported Tax Forms:

Tax Form ID Description of Tax Form ID
16 DARF
18 DARF Simples
21 DARJ
22 GARE – SP ICMS
23 GARE – SP DR
24 GARE – SP ITCMD

 

Processing Tax and Utilities Invoices with Bar Code

  1. Create the tax invoice in the Create Incoming Invoices.
  2. In the Manage Journal Entries app, open the tax invoice you created using the Create Incoming Invoices app, click the journal entry, and choose Manage Journal Entries.
  3. To enter the bar code manually, open the line item in Edit mode.
  4. After entering a correct bar code, select Back to Journal Entry and Save your changes.
  5. Execute the payment run using the Manage Automatic Payments.

The app groups the payment data according to the grouping rules and eventually generates the payment file using the BR_FEBRABAN_A payment medium format. The payment file contains a new segment, called segment O.

 

Processing Tax Invoices Without Bar Code

 

  1. Create the tax invoice in the Create Incoming Invoices.

Enter data as required and ensure also that you specify the tax form as well in the Tax Form field.

Note: You can enter only one tax form in the field at a time. Please note that if you use a tax form, you cannot enter a bar code for the tax invoice.

  1. Open the tax invoice you created using the Create Incoming Invoices app, click the journal entry, and choose Manage Additional Payment Attributes.
  2. Choose Edit so that you can enter the necessary complementary information. The data you can enter differs for each tax form. Save the changes.
  3. Execute the payment run using the Manage Automatic Payments.

The app generates the payment file using the BR_FEBRABAN_A payment medium format. The payment file contains a new segment, called segment N.

 


Do you have any further comments regarding this topic? Do not hesitate to share them in the comment section below. You are also welcome to ask any questions about SAP S4/HANA Finance in the Community Q&A section.

Assigned tags

      14 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Roshan Jha
      Roshan Jha

      Hi Michal,

      Thanks for the wonderful post, although we are currently using the latest version for our client but the structure doesn’t contain the Segments N & O as you mentioned.Is there any specific step we need to perform to enable these segments.

      Also since these segments will be used to perform the tax payment to authorities, what is the source value being used for identifying the different type of tax payments or forms. (Assuming you are not creating different payment methods for each type of tax forms)

      One approach could be creating a tax authority as vendor and do one to one mapping with for these forms, but what if we different types of form being used and paid to single authority, just like GARE scenarios for Brazil. How we will handling those. Because Tax form field is not available currently in the system.

      Waiting for your response on this interesting thread you started.

      Thanks & Regards,

      RJ

       

      Author's profile photo Michal Pandoscak
      Michal Pandoscak
      Blog Post Author

      Hello RJ,

      Currently there is no need of additional payment method as the tax form selection is done on the document header level during the document creation. (see Processing Tax Invoices Without Bar Code section above)

      This also covers the possibility to have different forms with one tax authority/vendor.

      Best regards,

      Michal

       

      Author's profile photo Roshan Jha
      Roshan Jha

      Thx Michal for the response.

      Is there any way we can enable these fields in SAP 1909 version with the help of sap note or some other alternative.

      Thanks & Regards,

      RJ

      Author's profile photo Alexandre Damaceno
      Alexandre Damaceno

      Hi Michal, thanks for the news.

      This is very required in Brazil, will be very helpfull.
      I'm looking foward to see this new functionality

      Best Regards

      Damaceno

      Author's profile photo Paulo Cesar Alves Rosa
      Paulo Cesar Alves Rosa

      Hi Michal,

      Thank you for this post, I'll try to generate in my implementation.

      Best regards!

      Author's profile photo Manuel Robalinho
      Manuel Robalinho

      Thanks. Excellent information!

      Author's profile photo Claudio Serpa
      Claudio Serpa

      Boa tarde.

      Realmente muito interessante esse texto. Fiquei com uma dúvida: o campo BAR CODE (BRCDE) foi ampliado para 48 posições? Pois na versão 1809 ele ainda possui apenas 47 posições.

      BRCDE%20vers%E3o%201809

      Obrigado!

       

      BRCDE versão 1809

      Author's profile photo Michal Pandoscak
      Michal Pandoscak
      Blog Post Author

      Boa tarde,

      Yes we extended the bar code to 48 characters.

      The delivery of the new functionality starts with releases

      • SAP S/4HANA OnPremise 2020 and
      • SAP S/4HANA Cloud 2005

      Best regards,

      Michal

      Author's profile photo Rodrigo Andre Marques
      Rodrigo Andre Marques

      This is really a very useful post as it is one of the common requirements for Brazil's projects.

      Author's profile photo Dawilson Cisterna
      Dawilson Cisterna

      Great posting but from now keping view at PIX for utilities and táx payment for.

      Author's profile photo Michal Pandoscak
      Michal Pandoscak
      Blog Post Author

      Dear Dawilson,

      I am glad that you mention PIX payments.

      Yes, we would like to start the development for the PIX payments but as of now, we are in the phase of understanding the concept.

      In case you have more information regarding the PIX payments we would be glad if you could share them with us.

      Best regards,

      Michal

       

      Author's profile photo Wilson Santos
      Wilson Santos

      Hi Michal, good afternoon !

      I found this blog post searching for SAP news about PIX also, the Brazil´s Central Bank released a documentation about QRCode formats and JSON messages to be used by PIX, which you can find at the following address:

      https://www.bcb.gov.br/content/estabilidadefinanceira/pix/Regulamento_Pix/II_ManualdePadroesparaIniciacaodoPix-versao1.pdf

      The Central Bank will not provide any kind of services to end customers, they developed the patterns and will host the service operation, which will be used by brazilian banks, which will provide to customers ways to use the service, to pay and/or receive through this new payment mode, so from SAP point of view, the integration will be done with APIs published by brazilian bank institutions, which I believe will not be so different between them, as they must follow the patterns developed by the Central Bank.

      You can find more information at:

      https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos

      And in this address you will find also a link to a API functional specification, which url is:

      https://github.com/bacen/pix-api

      I hope this helps.
      Best regards,

      Wilson

      Author's profile photo Luiz Feliponi
      Luiz Feliponi

      Very nice post! This is really common here in Brazil!

      Author's profile photo Stephen Haniu
      Stephen Haniu

      Hi Michal!

       

      First of all, thank you very much for this post! It´s really useful for us in Brazil.

       

      If I need to create a new Tax Form, is it possible? Because here in Brazil we have another tax payments, like GPS for example.

       

      Once again, thank you very much!