Skip to Content
Product Information
Author's profile photo Elemar Scherer

Tax Service – Using Tax Service on Purchase Processes for Brazil

MODERATOR’S NOTE: This blog post, originally published in 2020, contains information related to an older version of this product. For information about the latest version, please see Integration with External Tax Calculation Engines – New Concept for SAP S/4HANA Cloud and SAP S/4HANA.

Tax Service is your solution for Brazilian tax calculation when you are using the SAP S/4HANA and SAP S/4HANA (on-premise).

It is well known how complex the Brazilian rules are for taxes calculation. So, we joined the expertise of partners with the powerful SAP S/4HANA (Cloud and on-premise) to reduce your effort for tax calculation and reduce the Total Cost of Ownership (TCO). Using the tax service, you will not maintain rates or make changes in your system when rates or law change. Remember, laws can change in federal level, state level or even in municipality level.

In this blog post we will share a purchase process for Brazil using the tax service.

Setup Pre-Delivered by SAP

When using the tax service, all tax rules will be maintained by an SAP tax partner.

The data got from vendor, purchase organization and material (goods or services) and of course purchase operation itself, will be used for determining which taxes shall be applied and its rates. The address of involved parts in the transaction will be used for determining if the purchase occurs across states or not or even across cities, in case of services. So, it’s very important that all data is precisely informed. In truth, maintained in your SAP S/4HANA (Cloud or on-premise) system. Also, codes like NCM, CNAE and some others will contribute for the accuracy of tax calculation. All you need is maintain this data up to date.

The most important characteristic of using SAP S/4HANA (Cloud or on-premise) with the tax service is that now, as the consumer of a service, you can focus on the process instead of the its legal rules. The returned values will be mapped automatically to S/4 HANA (Cloud or on-premise) structures and the system will take care of the process finalization for you. For that, SAP will pre-deliver the necessary content.

In this way, when you create a purchase order, naturally, you specify the usage characteristics and the system will suppose the purchase finality: resale, consumption, industrialization or fixed assets of goods or purchase of service(s), reducing the complexity for selecting the right tax code where no tax knowledge is needed.

The tax service will use a series of information from customer/vendor, plant and material (goods or services) for the correct tax determination such as customer/vendor/plant CNAE codes, goods NCM code or service city codes, and addresses information like IBGE codes. Therefore, it is very important to maintain correctly all master data for those parties. Details about each data to be maintained can be found in the official documentation in SAP Help Portal, under Integrating the Service.

SAP pre-delivers a new tax procedure ABRX01 that connects automatically to the tax service.

When using the tax service, the Materials Management (MM) tax codes now represent a business process and not the expected resulting taxes. The formula 279 is used to activate the tax service interface.

In the picture bellow you can see some differences of configurations from the standard purchase of service and the standard purchase of goods:

For Service, the tax selected are: PIS, COFINS, ISS, etc. For Goods, the taxes selected are ICMS, IPI, etc.

In other words, using the tax service, you only need to specify the tax code, according to what the finality of your transaction is.

After net price and tax code is defined the TXSC condition type is placed with condition value formula 279. This condition type is the trigger of the tax service and it will basically perform three steps:

  1. Extract all needed data from the current sales process
  2. Build a JSON payload in the tax service API format
  3. Open an HTTPs connection and call the tax service endpoint configured by the customer

Details about how to setup the tax service endpoint on S/4HANA Cloud and S/4HANA products can be found under Integrating the Service.

Purchase Order Execution

Now let’s create a purchase order in Brazil and check the ease in using the tax service.

When using the tax service, the Código Fiscal de Operações e Prestações (CFOP) and the tax law texts are set to “Display Only” because they are filled automatically by the tax service. Also, the tax law codes are set to “TXS” by default for the entire sales process. So, when we enter the MM tax code and hit enter, pricing calculation will be called, which will trigger the tax service call and mapping of tax results back to the sales order.

See, in the picture below, the selection of the MM tax code 00, representing a standard purchase of goods.

In the picture below we can see the tax amount and some taxes calculated by an SAP tax partner for the purchase order depicted above:

Also, the CFOP was already determined by the SAP tax partner.

Creating a Nota Fiscal

After entering an incoming invoice and creating a goods receipt purchase just informing the Nota Fiscal type, you can see the result with the CFOP, taxes and messages generated by the tax partner in the pictures below:

Benefits of use Tax Service

As we try to show, using the tax service in MM transactions brings simplicity to your purchase process. You can focus in your business instead of dealing with a large number of Brazilian tax laws and rules.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Raul Maximo Ortega
      Raul Maximo Ortega

      Dear Elemar,

      It's very interesting your blog.

      I have a current project to do this connection to SAP Localization Hub, tax service, and using an external servicer, but I have a doubt about new tax procedure you mention:

      "SAP pre-delivers a new tax procedure ABRX01 that connects automatically to the tax service."

      But could you explain better how SAP pre-delivers this ABRX01 procedure?

      • Activating it via a BC Set.
      • Copying from current TAX schema (TAXBRA/TAXBRJ)
      • Installing a patch from External Tax Servicer (Vertex, Taxweb, etc.)
      • Installing o applying a note from Launchpad
      • ...

      Any comment will be welcome.

      Best regards,

      Raúl Máximo.

      Author's profile photo Elemar Scherer
      Elemar Scherer
      Blog Post Author

      The ABRX01is delivered by an IMG activity in the Building Block 2BA.

      Any Scope Item that contains this building block will activate the pricing procedure.

      Author's profile photo Raul Maximo Ortega
      Raul Maximo Ortega

      Dear Elemar,

      A lot of thanks, so I have to install a Best Practice as indicated on SAP Note "2775531-SAP Best Practices for SAP S/4HANA (on premise) (Brazil) (BRV6)"

      Best regards,

      Raúl Máximo

      Author's profile photo Elemar Scherer
      Elemar Scherer
      Blog Post Author

      Hi Raul,


      Do you need any additional information?

      Thanks a lot for the contact.




      Author's profile photo sushmita SINGH
      sushmita SINGH

      Hi Elemar,


      Could please tell how SAP Tax service is better or different than other engines like Vertex in general (not specific to Brazil, as for Brazil vertex already has solution now).

      Thanks in Advance!

      Author's profile photo Elemar Scherer
      Elemar Scherer
      Blog Post Author

      Hi Singh,

      Tax Service is a tool that can work stand alone or in straight collaboration with other engines. In other words, it is not a necessarily replacement of this engines.

      What Tax Service can do is itself calculate taxes for several countries or be the interface with the partners engines like that you mentioned.

      Let me explain a little bit more.

      In Brazil, because the complexity of tax rules, we need a specialized partner and Tax Service will build the data needed to several business scenarios. In S4HANA OP or ONE S4HANA Cloud you can easily create extensions to improve your own solution. In any case, Tax Service will prepare the data for API interface (request and response) and do the link with the partner.

      For another countries, where the tax calculation is not so hard, you can choose the use of the internal engine or a partner connection. For example, in Canada we have a link with Vertex and our customers can freely choose the best solution (if you choose to use a partner, you must have a contract with the partner).

      Best regards,


      Author's profile photo sushmita SINGH
      sushmita SINGH

      Hi Elemar,


      Thank you so much for your reply!.

      In order to begin with SAP tax Service and understand its product maturity I found, it still developing to cover all scenarios for different regions.

      But the basic ques is how SAP is licensing this, since we have limited information on help portal also. Does license contains

      • account on SAP Cloud platform
      • per country
      • per user
      • or special packages

      Also, if other erp can also be integrated with SAP tax service, apart from S/4HANA and S/4HANA Cloud, i believe YES but they never mention specific compatible market ERPs/software.


      Author's profile photo Elemar Scherer
      Elemar Scherer
      Blog Post Author


      have you seen this SAP Help:


      Author's profile photo Sebastián Rodríguez
      Sebastián Rodríguez

      Hi Elemar, very good post, thanks for the insights.

      I have noticed that S/4 HANA new releases (1809, 1909) with its Best Practices  packages only brings the Procedure ABRX01. The old TAXBRA is not there anymore.

      As Brasil Tax Services has no SAP standard calculation engine delivered, Basic or Advanced Scope.

      What are the options now?

      • Is is still possible to deploy the TAXBRA? If yes is there a 1909 Building Block for that?
      • Is it possible during implementation to customize a simple and Quick Tax Service Calculation?
      • Or the only option is to hire and use a SAP Partner calculation engine.

      Best Regards,


      Author's profile photo Elemar Scherer
      Elemar Scherer
      Blog Post Author

      Only for S/4 HANA Cloud Essentials you must hire and use a SAP Partner for tax calculation. For  S/4 HANA Best Practice you can use the TAXBRA as your choice (project issue).

      For do a simple test of Tax Service Calculation you will need a partner and the best way is follow the Best Practice Explorer, for instance the scope item 43D and master data script JD0.