Pular para o conteúdo
Specialty · Tax ABAP and customization

ABAP development and tax customization in SAP: tax scope only, inside Clean Core

ABAP is SAP's programming language, and it is how Brazilian tax rules reach places the standard does not cover. DFSpro builds tax-scope extensions, always with Clean Core review and end-to-end traceability.

Versão em português
What we do

What DFSpro builds

Four ABAP development areas, always in the tax scope and inside Clean Core. The scope table shows the extension point and the risk of each one.

Field validations

Block or warn when a tax data item is not in the expected format or rule.

Tax calculation and determination adjustments

Change how the tax base, rate or tax status is determined in one specific case.

Tax programs and reports

Check, reconcile, reprocess or compute, with output for the tax analyst.

SPED and DF-e (electronic tax document) checks

Compare what was issued or booked with what the ERP holds, before or after submission.

Index

Choose your entry point by role

Four entries, one per role, straight to the block that answers your question.

01Tax and accounting

Who defines the rule the code will run: when to customize, how tax is determined and how to check SPED (Brazil's digital tax reporting system) and electronic tax documents.

Go to section

02IT and SAP integrator

Who receives, transports and maintains the code: ABAP and Clean Core, ATC, tests and transport.

Go to section

03Management and decision

Who decides scope and risk: what DFSpro builds, the direct answer, the roadmap of an extension and the mistakes that cost a lot.

Go to section

04ABAP developer

Where tax code touches the system: the invoice and the J_1BNF family, data validation and the illustrative example.

Go to section
Quick links
Direct answer

What tax ABAP is and what it is not

In one sentence

Tax ABAP is code written in SAP's language whose purpose is a tax rule: validating a data item before it creates a document, adjusting how a tax is determined or calculated, completing an invoice with a field the standard does not fill, or building a report that checks what was issued against what was booked.

It is not a factory for generic programs, it is not infrastructure integration, and it is not a way to redo what setup already solves.

The practical boundary is this.

When the rule fits in tax setup or in a certified tax product such as GUEPARDO Tax, it should stay there, because setup and product are maintained by whoever delivers them and they carry through updates at lower cost. When the rule belongs to the company, depends on data only the company has, or needs a decision point the standard does not expose, ABAP comes in, and it comes in small, at a published extension point and with a test.

DFSpro does this development in the tax scope and runs it within the Clean Corerules. That does not put DFSpro in the integrator's place: the overall architecture, the infrastructure interfaces and the platform stay with whoever is responsible for them.

What DFSpro adds is the tax side of the extension: confidence that the rule implemented is the right tax rule, that the input data is complete and that the calculated value matches the real scenario.

The principle behind this page

SAP describes its current development model, ABAP Cloud, as the model for building applications, services and extensions that stay stable across the life cycle and are ready for the cloud, with a clear separation between customer code and SAP code, achieved by using only released objects and interfaces (Source: SAP Help Portal, ABAP Cloud). This principle, keeping what is yours apart from what belongs to the vendor, supports everything else on this page.

Decision

When to customize and when not to customize

The decision to customize has the largest consequence in a tax project, because every line of customer code is a line that must be tested, transported, documented and reviewed at each SAP Note and layout update. That is why the criteria below work by exclusion: ABAP comes in only after the cheaper-to-maintain alternatives have been ruled out, in the order they appear.

01

Does the SAP standard solve it?

Before any design, confirm whether the behavior already exists in the standard and is only switched off, badly set up or fed by incomplete master data. A good share of tax customization requests come from a wrong master record, not from a missing function. The path is a review of tax master data and of tax setup.

02

Does a tax product solve it?

If the rule belongs to a family that a certified product already covers, such as the determination and computation handled by GUEPARDO Tax, reimplementing it in custom ABAP creates a second source of truth and a second maintenance burden. The decision to buy or build must be explicit and recorded.

03

Is there a published extension point?

If the standard does not solve it and the product does not cover it, look for the extension point SAP offers for that need: a BAdI, a key-user field extension, a released API. Customizing outside a published point is what creates update risk.

04

Is the development small and testable?

Does the rule fit in a short method, with clear inputs and outputs, that an automated test can cover? If the answer is no, the scope is probably too large or the rule is still poorly defined by the tax team.

05

Who will maintain it?

Every extension needs a tax owner (who answers for the rule) and a technical owner (who answers for the code). Without both names, do not customize.

When ABAP is the right answer

When the rule is specific to the company and is not in the standard or in a product, when it depends on data only the company's ERP holds, when the extension point exists and is stable, and when a tax owner exists for the rule. In that case, a small and well-tested development usually costs less than a parallel spreadsheet that someone updates by hand.

When ABAP is the wrong answer

When the need is for corrected master data, when the rule changes every month by decision of a city or a state and only a product keeps that pace, when the extension point does not exist and the alternative would be to change an SAP object, or when nobody can explain the tax rule in one sentence. Code does not fix a badly defined rule, it only runs it faster.

Two signals help calibrate. The first is how often the rule changes: a rule that changes every time a technical note is released calls for a product or setup, not code. The second is closeness to the core: the closer the code must get to an SAP table or program, the higher the risk, and the stronger the reason to customize must be.

Scope

What belongs in the tax scope

Tax scope means the extension exists for a tax reason and is validated against a tax rule. The categories below cover most of what is requested in a Brazilian SAP environment. Each has a typical extension point, a typical risk and a way to test it.

Extension typeWhat it is forTypical extension pointTypical risk
Enhancement and BAdIInsert a rule or complete a data item at a planned point of the process, without changing the SAP program.BAdIs published by SAP for the document or the invoice; enhancement implementations at explicit points.Choosing an unpublished or implicit point, which can change in an update.
User exitOlder exit points, still present in many environments, used to complete a field or a rule.Module exits and user exits, depending on the process.No documentation of what is already implemented there.
Field validationBlock or warn when a tax data item is not in the expected format or rule.Validation point of the document, the master record or the invoice.Unclear message for the user and rejection only at SEFAZ (the tax authority).
Calculation and determination adjustmentChange how the base, the rate or the tax status is determined in one specific case.Determination rule, decision table or calculation extension point.Rule duplicated with setup or with a tax product.
Tax program and reportCheck, reconcile, reprocess or compute, with output for the tax analyst.Custom program, class and report on released APIs.Direct reading of an SAP table, whose structure can change.
SPED and DF-e checkCompare what was issued or booked with what the ERP holds, before or after submission.Check report and data extraction.Checking against the same source, with no independence.
User fields and layoutAdd a field the layout requires and the standard does not fill, or fill it with a custom rule.Key-user field extension and the tax document BAdI.Field created with no owner and no filling rule.

Outside the scope are the overall project architecture, infrastructure interfaces, the platform and generic development with no tax purpose. For the tax integration layer with SAP's integration platform, the page on tax integration with BTP and APIs covers what fits there and what stays with the integrator.

Invoice

The invoice in SAP and the J_1BNF

In SAP with the Brazil localization, the invoice is its own data object, with header and item tables and a set of transactions to create, read and correct the document.

The family of names that starts with J_1BNF groups these structures. For tax development, three practical facts matter.

  1. 01

    First, the layout of electronic invoices evolves through technical notes, and SAP follows it by adding fields to the existing structures.

    Anyone with code that reads or writes these structures needs to know they change this way.

  2. 02

    Second, SAP offers extension points specific to the invoice.

    An SAP knowledge base article on filling the AFRMM field (a freight surcharge for merchant marine renewal) in transaction J1B1N mentions two BAdI options: CL_NFE_PRINT and J_1BNF_ADD_DATA (Source: SAP KBA 2730030). The article refers to SAP ERP systems, so in each environment the existence and behavior of the point must be confirmed before design.

  3. 03

    Third, reading and writing the invoice directly in the tables is the most fragile path.

    The most stable path is to use the interfaces SAP publishes for the object, and to check that they are released for your SAP edition. The same release logic appears in the section on Clean Core below.

Example: NT 2023.004

An example documented by SAP itself is Technical Note 2023.004 version 1.10: it added new fields to the invoice item tables (J_1BNFLIN), the payment information table (J_1BNFEPAYMENT) and the import document table (J_1BNFIMPORT_DI), and SAP published the matching SAP Notes (Source: SAP Community, NT 2023.004).

  • Complete invoice data. Fill an extra field the layout requires and the standard does not fill, with the rule defined by the tax team and a documented source value.
  • Fix a specific behavior. Adjust a case the standard treats in a generic way, such as a specific nature of operation, as long as the extension point is published.
  • Read the invoice for checking. Build a report that crosses the invoice, the posting and the tax ledger, reading through a stable interface and not through a copied table.
  • Reprocess with a trail. Reopen a rejected document, correct the source data and resubmit, with a record of who did it and why.

Note on SAP ECC and S/4HANA

The objects and extension points cited in SAP articles vary by product and by version. A point that exists in SAP ECC may have another name, another form or another release status in S/4HANA, and reviewing the existing code is part of the S/4HANA migration. The page on electronic tax documents covers the document life cycle itself.

Calculation

Tax calculation and determination: where to be careful

  1. 01

    Determining a tax means deciding, for each item of each document, what the tax status is, what the base is, what the rate is and what special treatment applies.

    In SAP this happens in layers: master data, setup, determination rules and, when necessary, code. Each layer above setup raises the cost of maintenance.

  2. 02

    The rule of thumb is to push the decision to the lowest and most readable layer.

    A decision table that the tax analyst can read and fix is worth more than a condition hidden in a method. SAP has BRFplus (Business Rule Framework plus) for this, defined in the official documentation as a programming and user interface to specify and process business rules, which lets you model rules in an intuitive way and reuse them in different applications (Source: SAP Help Portal, BRFplus). The same documentation describes functions, expressions, inputs (context) and outputs (result), and features such as simulation, tracing, transport and export.

  3. 03

    The consequence for the tax team is concrete.

    With a rule modeled in BRFplus, the auditor's question, why did this item come out with this tax status, can be answered by tracing and simulation instead of reading code. This is an advantage only if the rule is in fact modeled, and if BRFplus is part of the tax solution in your environment, which must be confirmed case by case.

LayerWho maintains itRule changeWhen to use
Master dataTax and master data teamFixes the record, applies to the next documentsAlways first: NCM, CFOP, material category, partner type
SetupConsulting and tax teamChanges a configuration table, with transportA rule common to several cases and provided in the standard
Tax productProduct vendorProduct updateA rule of a family covered by the product
Decision table or BRFplusTax team with technical supportEdits the modeled rule, with simulationA company rule that is readable and frequent
ABAP codeTechnical teamChanges the program, tests and transportsA rule the previous layers cannot express

The tax reform strengthens this caution. With new taxes and new document fields arriving, determination rules that are simple today tend to gain new dimensions, and in that setting a badly placed extension becomes a maintenance problem. The page on the tax reform with CBS and IBS explains the calendar and what changes; here the point is that every calculation adjustment in code needs an owner and a review plan for each new act.

Validation

Field and data validation: stopping errors early costs less

A document rejection by SEFAZ arrives after issuing, with a technical message and lost time. A field validation done earlier avoids that return. It is one of the healthiest uses of tax ABAP, because the code is short, the rule is objective and the benefit is visible.

  • Format. Length, composition and check digit of identifiers such as CNPJ (the Brazilian company tax ID), state registration and NCM, checked before the document is saved.
  • Consistency between fields. Combinations that cannot coexist, such as a nature of operation that does not fit the partner type, or a tax status code without the matching base.
  • Completeness for the layout. Fields that the current layout requires under a given condition and that the source process tends to leave blank.
  • Match with master data. A difference between what the document carries and what the material or partner record states, which points to an error on one side.

Three precautions make the difference.

  1. 01

    First, the message must tell the user what to fix, in clear language, and not repeat the technical code.

  2. 02

    Second, the validation must tell an error that blocks from a warning that informs, because blocking too much creates the habit of working around it.

  3. 03

    Third, the rule must be written in one sentence that the tax team signs: if the tax team does not recognize the sentence, the code is validating something else.

Validations that depend on master records rely on the quality of tax master data. A well-designed validation sometimes shows that the problem is not in the document but in the master record, which is a good result: ABAP worked as a sensor and the fix goes to the right layer.

Checking

SPED and DF-e checks: the report the analyst uses

Check programs are the category of tax ABAP closest to the analyst's daily work. They do not issue or book anything: they read what the ERP holds, compare it and show the difference. The page on SPED details each ancillary obligation, and the one on electronic tax documents details the document life cycle. The check sits between the two.

CheckWhat it comparesWhen it runsUseful output
Issued invoice against posted invoiceAuthorized documents against accounting and inventory postingsDaily or at closeList of documents without a posting and of postings without a document
Received invoice against purchase orderInbound documents against what was bought and receivedAt each receiptDifferences in quantity, price and tax
Computation against bookkeepingComputed taxes against values in the obligation fileBefore submissionDifferences by tax, by period and by establishment
File against sourceRecords of the generated file against the documents that originated themBefore submissionRecords without a source and documents without a record
Master record against documentMaster data against what the invoice actually carriedPeriodicMaster records that generate inconsistent documents

Two traits tell a good check report from a weak one.

Independence

The first is independence: it cannot read the data from the same table the file was generated from and declare that it matches, because that only proves the reading is the same.

Trail

The second is the trail: each difference points to the source document, with date, user and status, so the analyst can act without opening another transaction.

When the environment uses SAP Document and Reporting Compliance (DRC) or the SAP Tax Declaration Framework (TDF) to generate the EFD ICMS IPI, SAP keeps a diagnostic guide for frequent problems, with sections on solution overview, basic setup, shadow and complementary tables and common problems, and it names the support components for opening a ticket (FI-LOC-FI-BR-ACR for DRC Brazil and FIN-TMF-BR for TDF) (Source: SAP KBA 2924049). Before any custom program that touches this flow, consult that guide: many customization requests are solved there.

Checking is not fixing

The report shows the difference and the source. Correcting the document, the master record or the bookkeeping follows the company's tax process, with approval from whoever answers for it. A program that fixes tax data on its own, without a trail and without approval, is a risk, not a saving.

Clean Core

ABAP and Clean Core: what SAP publishes

Clean Core is the practice of keeping the ERP core standard and stable and placing the company's differences in decoupled extensions.

The page on Clean Core covers the topic as a whole; here the focus is what it means for whoever writes tax ABAP. The statements below come from material published by SAP. SAP describes two ways to extend S/4HANA Cloud: side-by-side extensibility, on SAP BTP (SAP Business Technology Platform), with scalable applications decoupled from the core, and in-system (on-stack) extensibility, with ABAP Cloud, in integrated extensions that stay stable across updates. The choice between them should consider the use case, applying a strategy that gives priority to BTP (Source: SAP News Center).

ABAP Cloud, according to SAP documentation, has these main elements:

Core Data Services (CDS) for data models and analytics; the ABAP RESTful Application Programming Model (RAP) for transactional applications; an ABAP language optimized for the cloud, for business logic; public interfaces and mandatory SAP extension points; and the ABAP Development Tools (ADT) as the development environment (Source: SAP Help Portal, ABAP Cloud). The guarantee of stability comes from a release model for interfaces with a public life cycle: customer code uses only what SAP has released for that purpose.

  1. 01

    Key user (in-app)

    For simple needs, such as adding a field, SAP points to the key-user tools. More complex needs should use the ABAP development tools (Source: ABAP Cloud FAQ).

  2. 02

    On-stack with ABAP Cloud

    Customer code inside S/4HANA, tied to the process, using only released objects. SAP recommends it for tightly coupled scenarios (Source: ABAP Cloud FAQ).

  3. 03

    Side-by-side on BTP

    A separate application that talks to the ERP through an interface. Suited to cases where the extension's life cycle should not depend on the core's cycle (Source: SAP News Center).

  4. 04

    Classic ABAP with governance

    In the Private Edition and on-premise editions, it is also possible to build Clean Core compatible extensions using classic ABAP, within the level rules and ATC checks (Source: ABAP Cloud FAQ).

Two version notes avoid surprises.

ABAP Cloud is available in all S/4HANA editions and is recommended, but not mandatory, in the Private Edition and on-premise, and the technical content, such as the released interfaces, is available from S/4HANA version 2022 (Source: ABAP Cloud FAQ). In an earlier environment, the same principle holds as good practice, but the checking tools are different.

What to do when a released interface is missing?

SAP's answer for the Private Edition is to create a wrapper in classic ABAP over a recommended classic interface and release the wrapper for ABAP Cloud, using ATC to govern that development (Source: SAP Community, Classic APIs). For non-public CDS views, the SAP FAQ says they must be wrapped and released by the customer (Source: ABAP Cloud FAQ). Well-made tax ABAP usually has one or two of these wrappers, well documented, and nothing beyond that.

Levels

Levels A to D applied to tax

SAP evolved its three-layer model into a concept of Clean Core levels, with four levels (A, B, C and D) based on architectural integrity, stability across updates and alignment with Clean Core principles (Source: SAP News Center). The cards below summarize SAP's definition and add DFSpro's tax reading.

A

Level A

SAP definition: fully compatible extensions, using only public and stable interfaces, side-by-side on BTP or on-stack with ABAP Cloud.

Tax reading: the desired destination for every new rule, which calls for a released interface for the data and for the extension point.
B

Level B

SAP definition: compatible, also using SAP's classic interfaces and technologies, which are documented and generally stable.

Tax reading: realistic for many cases in the Private Edition, with a wrapper and ATC.
C

Level C

SAP definition: partly compatible, but already touching internal SAP objects.

Tax reading: acceptable as a transition, with the reason recorded, an owner and an exit plan.
D

Level D

SAP definition: not recommended, with explicitly not recommended objects, modifications, writes to SAP tables or implicit enhancements.

Tax reading: avoid, with direct writing to an SAP tax table being the most dangerous example.

The use of this classification for the tax team is vocabulary. Instead of arguing whether an extension is good or bad, the team says which level it is at and what it would take to move up. An inventory of the tax extensions in the environment, each with a level, an owner and a review date, is a simple and very useful governance document, and it can start from an SAP Tax Diagnostic.

Testing

ATC and tests: what prevents regression

What ATC is

The ABAP Test Cockpit (ATC) is SAP's checking framework, integrated into the development environment. According to SAP documentation, it simplifies the handling of tests during development and lets you run checks such as the extended program check, static performance tests, module tests with ABAP Unit, usability tests and security checks (Source: SAP Help Portal, ABAP Test Cockpit).

The release rule

The rule in the ABAP programming guidelines is direct: if ATC is available, a check must run on all development objects involved and there must be no open messages before objects are released for transport, and the check must be built into the transport release (Source: SAP Help Portal, ABAP Test Cockpit). In practice, this turns ATC from an optional tool into a gate of the process.

ATC and Clean Core governance

For Clean Core, SAP names ATC as the governance tool at code level (Source: SAP News Center). SAP describes checks aimed at this purpose: use of released interfaces and permitted extension technologies, and it documents support notes to enable the checks with the classic interfaces concept (SAP Notes 3449860 and 3565942) (Source: SAP Community, Classic APIs). The SAP FAQ adds that Clean Core checks should be scheduled regularly and that authorizations should be set so developers use the ABAP language version for cloud development (Source: ABAP Cloud FAQ).

Test layerWhat it provesWho supports it
ATC with a Clean Core variantThe code uses only permitted objects and technologiesTechnical team
Unit test (ABAP Unit)The method's rule returns the expected result for known inputsTechnical team and tax team define the cases
Test with real, anonymized documentsThe extension behaves well in real scenarios, with the company's dataTax team and technical team
Check in the issuing environment's test systemThe resulting document is accepted by the issuing channelIntegrator and tax team
Regression after an updateNothing changed in the approved cases after an SAP Note or a new versionTechnical team

The test case is a sentence from the tax team

Each unit test should start as a sentence written by the tax team: for an item with this nature and this partner, the expected result is this. When the case comes from the tax team, the test proves the rule, not just the code. When it comes from the developer, the test proves that the code does what the developer understood.

Transport

Transport and traceability

A tax extension can be trusted only if you can say, for any date, which version of the code was active in production and who approved it. SAP's transport flow allows this when used with discipline.

  • One transport order per change with tax meaning, complete, with a description that cites the rule and the source ticket, and never a generic order that mixes subjects.
  • Transport released only after ATC with no open messages and a test approval by the tax team.
  • A record in the ticket of who requested, who defined the rule, who developed, who tested and who approved, with dates.
  • Test evidence attached to the ticket: cases, results and screenshots of what was checked.
  • Production transport window aligned with the tax calendar, avoiding a rule change in the middle of a close.
  • A rollback plan described before the change: how to revert and what to do with the documents generated in between.

Traceability serves a purpose beyond the technical audit. When an assessment or a discrepancy asks why a tax was calculated a certain way in a certain month, the answer must appear in minutes, with the rule, the version and the approval. This is what turns a customization into a defensible asset, and not a hidden risk.

Documentation

Documentation that outlives the team

The documentation of a tax extension has three readers: the tax person who needs to understand the rule, the technical person who needs to maintain it and the auditor who needs to trust it. One short document, with fixed sections, serves all three.

  • Rule in one sentence. What the extension does, in tax language, signed by the rule owner.
  • Legal basis. The act, the article or the technical note that supports the rule, with a link and the date of the last check.
  • Extension point and level. Where the code is plugged in, which Clean Core level it fits and why.
  • Inputs, outputs and exceptions. What data it reads, what it returns, what happens when the data is missing.
  • Test cases. The list of cases approved by the tax team, with the expected result of each.
  • Owner and review. Who answers for the tax side, who answers for the technical side and when the rule is reviewed again.

Documentation that lives outside the system ages without warning.

Ideally the extension identifier appears in the code, in the ticket and in the document, so the three meet.

And the document should be reviewed whenever the code changes, as part of the same transport.

Maintenance

Maintenance for SAP Notes and layout changes

A tax extension is not a project that ends. The environment it lives in changes in at least three ways, and each needs a routine.

01

SAP Notes and packages

SAP publishes corrections and legal adaptations as SAP Notes, as in the NF-e technical notes where new fields appear in the invoice structures (Source: SAP Community, NT 2023.004). Each Note applied should go through an impact check on the extensions that touch the same object.

02

Layout and rule change

A new technical note, an ordinance or a law such as the tax reform changes the rule the extension implements. The routine is to monitor the act, open a review ticket and test against the approved cases.

03

Version update

With each S/4HANA or tax product version, the set of released interfaces changes. ATC shows what is no longer allowed, and regression shows what stopped working.

04

Master data change

Master data that changes in volume, such as an NCM reclassification, changes the extension's behavior without the code changing. It is worth running a sanity test after large loads.

A continuous operating model helps keep this routine from being left for the eve of the problem. The page on AMS Fiscal describes how this advisory follow-up can be organized, and the page on S/4HANA migration covers the moment when the inventory of extensions is decisive.

Example

Illustrative example of code and test

The snippets below are short, fictional examples, written only to show the format of a small validation and the test case that goes with it. They do not represent any customer's code, are not meant for production use and do not replace the analysis of the extension point in your environment.

METHOD validar_ncm.
  " ILLUSTRATIVE EXAMPLE (EXEMPLO ILUSTRATIVO E FICTÍCIO). Do not use in production.
  rejeitado = abap_false.
  IF strlen( ncm ) <> 8 OR ncm CN '0123456789'.
    rejeitado = abap_true.
    mensagem  = |NCM { ncm } is not in the 8-digit format|.
  ENDIF.
ENDMETHOD.

Note what the example does and what it avoids. It does one thing, with clear input and output. It does not read an SAP table, does not write anything and does not depend on a global variable. The message says what is wrong. The method fits on one screen and can be covered by an automated test, and the extension point where it would be called is a separate decision, which depends on the environment.

Item: material with NCM 12345678, nature of operation X
Rule signed by the tax team: "for nature X, the NCM must exist in table Z"
Expected: accepts
Item: material with NCM 1234
Expected: rejects with the message "NCM 1234 is not in the 8-digit format"

The test case above came from the rule, written in plain language by the tax team, and not from the code. This is the format we want: the tax team's sentence becomes the test, and the test becomes the criterion for accepting the code.

Method

Roadmap of a tax extension

The roadmap below summarizes how a tax extension should be run, from request to operation. It serves whoever hires and whoever delivers, and it is the reference DFSpro uses in the tax scope.

  1. 01

    Request and rule

    The request is described in tax terms, with the scenario, the document and the expected result. The tax team writes the rule in one sentence and points to the legal basis.

  2. 02

    Alternatives

    The team goes through the criteria for when not to customize: master data, setup, product, published extension point. The result is recorded.

  3. 03

    Design

    The extension point, the target Clean Core level and the interface design are chosen. The tax owner and the technical owner are defined.

  4. 04

    Test cases

    The cases are written before the code, with the tax team, including edge cases and cases where the rule must not act.

  5. 05

    Development

    The code is written at the smallest possible size, with ATC and unit tests running during the work.

  6. 06

    Acceptance testing

    The tax team tests in a test system with representative documents, and the acceptance is recorded.

  7. 07

    Transport and operation

    The transport order is released with the evidence attached, in a window that fits the tax calendar.

  8. 08

    Periodic review

    The extension enters the inventory, with a level, an owner and a review date, and is reviewed at each new act or each update.

Mistakes

Mistakes that cost a lot in tax ABAP

MistakeWhy it happensConsequenceHow to avoid it
Customizing before fixing the master recordThe symptom shows up in the documentCode that masks wrong dataReview master data first
Rule with no tax ownerThe request comes from ITNobody knows if the rule is still validRequire a rule in one signed sentence
Unpublished extension pointIt is the fastest wayBreaks at a version updateUse only published and released points
Reading and writing directly to a tableIt looks simplerThe structure changes and the code breaks or corrupts dataUse a stable interface and wrap it
Duplicating the tax productThe rule looked smallTwo sources of truthA recorded buy-or-build decision
No regression testShort deadlineThe regression shows up in productionApproved cases and ATC as the release gate
No documentation of the point and the levelThe developer moves onNobody dares to touch itA short document versioned with the transport
Changing a rule in the middle of a closeUrgencyThe month's numbers change midwayTransport window aligned with the tax calendar

Most of these mistakes share the same root: treating customization as a technical decision when it is, first of all, a tax decision. When the tax team is at the table from the request, most of them disappear.

DFSpro

How DFSpro works

DFSpro is a SAP tax governance consultancy based in Curitiba, founded in 2018, and works in the tax layer of the project.

What DFSpro does

  • Builds tax-scope ABAP extensions, in the four areas at the start of the page, with enhancements, BAdIs and exits.
  • Runs the development within Clean Core rules, with ATC, tests, transport and documentation.
  • Checks, with the tax team, that the rule implemented is the right one and that the calculated value matches the real scenario.

What DFSpro does not do

  • Does not replace the project integrator in the overall architecture, the infrastructure interfaces or the platform.
  • Does not do generic development with no tax purpose.
  • Does not decide the tax interpretation for the company: the company's tax team and accountant answer for the rule.

For what belongs to setup and standardized determination, DFSpro is also an Authorized Channel for GUEPARDO Tax, a product of NTT DATA, and the choice between product and code is part of the criteria for when to customize. If the question is the current state of your extensions, the SAP Tax Diagnostic is the starting point.

Frequently asked questions

Frequently asked questions about ABAP and tax customization

01Does DFSpro develop ABAP?+

Yes, in the tax scope: enhancements, BAdIs, exits, tax programs and reports, validations, tax calculation and determination adjustments, and SPED and electronic document checks. DFSpro does not take the integrator's place in the overall project architecture.

02When is customizing not worth it?+

When the standard already solves it and only setup or a master data fix is missing, when a certified tax product covers the rule, when the extension point is not published, or when nobody can explain the tax rule in one sentence.

03Is tax customization compatible with Clean Core?+

It can be. SAP describes compatible extensions, in four levels, and points to released interfaces and ATC as governance (sources in the list below). Compatibility depends on how the extension is built, not on whether it exists.

04What is ABAP Cloud and do I need it?+

It is SAP's development model that uses only released objects and interfaces. According to the SAP FAQ, in the Private Edition and on-premise editions it is recommended but not mandatory, and the technical content is available from S/4HANA version 2022.

05When should I use a key-user extension instead of ABAP?+

For simple needs, such as adding a field, SAP points to the key-user tools. More complex scenarios call for the ABAP development tools.

06What is a side-by-side extension?+

It is an application separate from the ERP, usually on SAP BTP, that talks to it through an interface. SAP advises choosing between side-by-side and on-stack by use case, giving priority to BTP.

07What to do when a released interface is missing?+

For the Private Edition, SAP describes creating a wrapper in classic ABAP over a recommended classic interface and releasing it for ABAP Cloud, governed by ATC. Non-public CDS views must be wrapped and released by the customer.

08What does ATC check?+

According to SAP, a variety of tests, such as the extended check, static performance, ABAP Unit, usability and security, and checks aimed at Clean Core, such as the use of released interfaces. SAP's guidelines call for ATC with no open messages before transport release.

09Can I read and write directly to the invoice tables?+

It is the most fragile path. Invoice structures change with technical notes, as SAP showed in NT 2023.004 v1.10, and direct writing to SAP tables appears, in the level model, among the not recommended practices (level D).

10How do layout changes affect extensions?+

SAP delivers new fields through SAP Notes. Each Note applied requires an impact check on the extensions that touch the same object, and each new act requires a review of the rule implemented.

11Is BRFplus part of my tax solution?+

It depends on the environment and the product. BRFplus is an SAP rules framework, with simulation and tracing, and it is a good way to keep rules readable, but its presence in the solution must be confirmed case by case.

12How is customization tested and traced?+

With ATC, unit tests written from the tax team's sentences, acceptance testing with representative documents, a described transport order, evidence attached to the ticket and a recorded approval.

13Who owns a tax extension?+

Two owners: the tax owner, who answers for the rule, and the technical owner, who answers for the code. An extension without both should not go into production.

14Is customizing cheaper than using GUEPARDO Tax?+

There is no general answer. Reimplementing in custom code a rule that a product covers creates a second source of truth and a second maintenance burden. The decision should compare the cost of maintaining, not only of building, and should be recorded.

15Does DFSpro review all the code in my environment?+

DFSpro's work is the tax scope, and general code quality review of the technical team's work is not part of it. An SAP Tax Diagnostic can map the tax-relevant extensions and the level of each one.

16Where to start?+

With the list of tax extensions that already exist and the list of those requested, each with the rule in one sentence. Then apply the criteria for when not to customize. A conversation through our contact page leads to that.

Next steps

Start with the rule in one sentence

If you have a tax extension requested, or a set of old extensions that nobody dares to touch, the starting point is the same: write, in one sentence, the tax rule the code runs. A conversation through our contact page is the channel to do this together with DFSpro.