Pular para o conteúdo
Specialty · Service invoice

Service invoice automation in SAP: NFTS, receipt, withholdings and delivery

A service invoice that comes into the company does not arrive like a goods invoice. It comes from the portals of different municipalities, carries withholdings of up to six taxes, sometimes does not exist at all and becomes an NFTS, the invoice the service recipient issues itself. Automation is the whole path: capture, validate, withhold, post, pay, record in the tax books and keep the proof.

It applies to both sides of the invoice: whoever hires the service and whoever delivers the invoice to the customer. Each fact comes with its official source.

Versão em português
Index

Choose the entry point for your role

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

01Tax and legal

When the NFTS is due, which documents look the same, and where the service invoice escapes the routine.

Go to the section

02Accounts payable

How the invoice arrives, goes through the withholdings and becomes a net amount, and how to deliver and keep the proof.

Go to the section

03IT and SAP

What the documentation confirms, where development comes in, and how to read each failure.

Go to the section

04Management and CFO

Automation readiness by area, where DFSpro comes in, the sources and the frequently asked questions.

Go to the section
Direct links
In one sentence

Automating the service invoice means closing the cycle, not just reading the XML

Reading the XML is the easy part. The hard work is what comes before and after it.

Working definition

Service invoice automation is the flow in which every service invoice, received or issued, reaches SAP complete, goes through master data and withholding validation, is posted with the right tax rule, feeds the tax bookkeeping and leaves archived proof. If the municipality requires the recipient to declare the service, as with the NFTS, issuing that document is part of the same flow. NFS-e is Brazil's electronic service invoice.

There are three layers and they must close together. The first is the document: the right invoice, from the right party, in the format the municipality or the national environment uses.

The second is the rule: municipality of taxation, withholding, service code, the provider's regime. The third is the proof: what was posted, paid, declared and kept, so that an inspection can retrace the path.

The national service invoice standard, the DPS (the electronic service declaration) and the ADN (the national NFS-e environment) are explained on the page national-standard NFS-e in SAP, which is not repeated here. The starting point is the invoice already issued, which the company has to handle.

Intake of goods and transport invoices (NF-e, Brazil's electronic invoice, and CT-e, the electronic transport document), with recipient confirmation, is covered in automatic NF-e and CT-e intake.

Document map

Eight documents that look the same and are not

The first decision in automation is knowing which document is in hand. Each one triggers a different rule at posting.

Official basis Facts with sources; the last column is the design DFSpro proposes.

DocumentWho issues itWhere it usually appearsWhat the ERP of the buyer needs to do
NFS-e from a municipal systemProvider, in the city hall's systemMunicipalities with their own issuer, which share the invoices with the national environment (LC 214, art. 62)Accept each municipality's layout and rules; SAP records that the NFS-e is a municipal document and that the rules change from one city to another (SAP Help).
National-standard NFS-eProvider, in the National IssuerParticipating municipalities; ME and EPP companies (micro and small) in Simples, the simplified tax regime, from 01/11/2026 (NFS-e questions and answers)Consume through the Distribution API or the portal; see the national-standard NFS-e page.
NFTSService recipient (or intermediary), in the municipality that requires itSão Paulo and Salvador (São Paulo manual, Salvador manual)Decide when to issue, calculate the deadline, generate the payment slip and link the NFTS to the posting.
Receipt from an exempt providerProvider excused from issuing a tax documentService from a person the local law excuses from issuing invoices (São Paulo manual)Keep the minimum receipt data; without it, the NFTS becomes due in São Paulo.
Invoice-bill, coupon, ticketProvider from another municipalityDocuments authorized by the provider's municipality, cited in the NFTS manual (manual)Accept as a supporting document and declare in the NFTS when the recipient is in São Paulo.
RPSProvider, before the NFS-eWhen the provider cannot yet issue the invoice (SAP Help)Treat as provisional: the NFS-e issued replaces it as the official document.
DANFSeGenerated from the XMLDownload from the national portal, as a PDF (questions and answers)Keep it with the XML; the XML is the basis for posting and tax bookkeeping.
Bill or bank slipProvider, for collectionCollection document that comes with the invoiceCheck against the invoice in MIRO (SAP invoice entry); a bill without an invoice is a payment without tax support.

Two points weigh in practice. The first: in São Paulo, an NFS-e received from a São Paulo provider is never declared by NFTS (city hall questions and answers). The second: the exempt provider's receipt protects the recipient only if it shows name, municipal registration, address, service description, recipient data and amount. Without that, the recipient answers as if there were no document.

The problem in practice

Where the service invoice escapes the routine

A goods invoice has had a single national channel for years. The service invoice still lives with several channels, and it shows in day-to-day work.

Many channels, little standardization

The municipality may use the national issuer or keep its own system and share the invoices with the ADN (NFS-e questions and answers). Whoever receives invoices from several municipalities deals with different portals, layouts and rules in the same week.

Four destinations for withholding

One invoice may withhold ISS (the municipal service tax) for the municipality, PIS, COFINS and CSLL (federal contributions) for the federal government, INSS (social security) and income tax. Each has its own base, deadline and bookkeeping.

An invoice that does not exist

A provider from another municipality may not issue a document or may issue a receipt. In São Paulo this creates the NFTS, the recipient's responsibility, with a fine if it is missing or has inaccurate data (NFTS manual).

A correction that does not come back

Rejection by the recipient does not cancel the invoice in the national standard, and the NFTS in the new layout does not accept replacement. Without a routine, the wrong invoice stays alive in the ERP (questions and answers).

What DFSpro sees in practice

What DFSpro often sees in SAP environments is the same pattern: the provider sends a PDF by email, someone types the bill into MIRO, the withholding is decided by habit, and the declaration to the municipality is done at the end of the month, by whoever remembers.

None of this is illegal in itself. The problem is that every step depends on memory, and an inspection asks for proof.

Some signs that automation does not exist yet:

  • the NFTS deadline lives in a spreadsheet
  • nobody can say how many service invoices from different municipalities came in during the month
  • the PIS, COFINS and CSLL withholding is calculated outside SAP
  • an invoice rejected by the supplier is still paid
  • the XML stays in the email of whoever received it
NFTS

The invoice the service recipient issues itself: São Paulo and Salvador

The NFTS is not the supplier's invoice. It is the declaration of the service received, made by whoever hires it, and so it must come from a rule and not from someone's goodwill.

The Electronic Invoice for Service Recipients and Intermediaries was regulated in São Paulo by Decree 52.610/2011, based on art. 10-A of Law 13.476/2002, and replaced the Electronic Service Declaration (Decree 52.610/2011). The city hall's current manual is version 3.1 (manual). Salvador also has an NFTS, integrated with the city's NFS-e system, accessed with a Web Password or certificate, with a maximum declaration deadline of 3 years beyond the current year (Salvador manual).

When the NFTS is due

CaseWhen the NFTS is dueSource
Service received from a provider outside the municipalityIn São Paulo, when the service was received or intermediated from a provider established outside the municipality, even if there is no ISS withholding.Decree 52.610/2011, art. 2, I, manual
São Paulo provider required to issue NFS-e that did not issue itThe recipient responsible for the tax issues the NFTS when the São Paulo provider does not issue an NFS-e, electronic tax coupon or other required document.Decree, art. 2, II
Exempt provider without a complete receiptA São Paulo provider exempt from issuing NFS-e that does not provide a receipt with the minimum required data.manual v3.1, item 1.2
Rejection of an NFS-e with ISS withheld in errorWhen the recipient rejects an NFS-e with ISS withheld in error in the amount, the deduction, the service code or the service date. This case appears in the city hall's questions and answers; manual v3.1 lists three cases.questions and answers

When the NFTS does not apply

  • Service received from a São Paulo provider that issued an NFS-e: never declared by NFTS (questions and answers).
  • MEI under SIMEI (individual microentrepreneur): exempt from issuing an NFTS as a recipient (decree).
  • Individual: does not declare by NFTS; when responsible for the ISS, issues the payment slip directly in the payment portal (manual).
  • Month with no service received: the absence is not declared; it is enough not to issue (questions and answers).

The obligation also applies to public bodies, immune or exempt legal entities and Simples Nacional companies that receive services (manual). For investment funds and clubs, the NFTS is issued by the administrator.

Rules the automation must carry

TopicWhat the source saysSource
DeadlineThe text of the decree sets the 5th day of the month after the service. Manual v3.1 and the city hall's questions and answers set the 10th when the recipient withholds and pays, and the 30th in other cases; for public bodies, until the expense is settled. Both sources are official and they differ: the deadline to program is the one in the city hall's current manual, checked before fixing the rule.Decree, art. 2, § 1, manual
Payment slipThe ISS on the NFTS is paid with a payment slip issued only by the NFTS system, by the 10th of the following month. The slip can group issued NFS-e, received NFS-e where the recipient is responsible, and NFTS. Without issuing the NFTS first, there is no way to generate the slip.manual, item 8, questions and answers
FineUnder art. 14, V, items e and f, of Law 13.476/2002, the fine is 50% of the tax, with minimums reproduced by the city hall of BRL 1,075.08 and BRL 1,870.57 per document, depending on whether or not the recipient is required to withhold, and 100% if the recipient knew the provider was faking an establishment outside the municipality. The amounts are subject to the adjustment in § 1.questions and answers, manual, item 1.2.3
AccessWeb Password or digital certificate; the certificate is mandatory for whoever also issues NFS-e, except Simples Nacional companies. It is type A1, A3 or A4 of ICP-Brasil and one per CNPJ root (the company tax ID root).questions and answers
One invoice per serviceEach NFTS covers one service and one service code; an NFTS that covers more than one code is forbidden.questions and answers
CPOMFor services received from 27/11/2021, the São Paulo recipient is no longer required to withhold ISS only because the outside provider is not in the CPOM. Before that date, the NFTS checked the registry.questions and answers
CancellationIt is irreversible. Before the ISS is paid and within 180 days of issue (manual) or 6 months (questions and answers); with a payment slip issued, the slip is cancelled first; after payment, only through an administrative process.manual, item 7.1, questions and answers
ReplacementIn layout 1, up to 6 months from the taxable event; it cancels the original and issues the replacement; it does not work with an unpaid slip, an invoice already cancelled or replaced, or a change in the provider's CNPJ root or service date. It was not implemented for layout 2.manual, item 5
Layout 2Created because of the tax reform, it applies only to imported services with a taxable event from 01/01/2026 and carries IBS and CBS fields. The other types use layout 1. In layout 2 there is no batch issuing or replacement: an error is fixed by cancelling and issuing again.manual, item 1 and items 5 and 9
BatchISO-8859-1 text file of up to 10 MB, one per municipal registration, with records 1, 4, 6 and 9; an error rejects the whole batch, a warning requires analysis. Layout 1 only.manual, item 9

Watch the deadline

Whoever programs the issue day from the decree will get the calendar wrong for those who withhold ISS. Whoever programs from the manual must check the current version at every change, because the manual itself warns that it is being updated because of the tax reform.

Link to SAP

Guidance Link to SAP: SAP documentation describes the outbound NFS-e and the RPS (SAP Help) and does not describe the NFTS. Generating the NFTS, the batch and the payment slip, and linking the invoice to the payment, are project design, usually with fiscal ABAP or integration, which the section SAP and fiscal ABAP details.

Other municipalities

What about other cities? The recipient's invoice may exist in other municipalities under another name or in another format. The practical rule is to ask the municipality where the service is received, before assuming it does not exist.

Issuing by the recipient

For the national standard, topic 7.8 of the questions and answers says that in the current version of the National Public Issuer only the provider issues (tpEmit = 1), while topic 6.6 allows issuing by the recipient with tpEmit = 2 when municipal law requires it.

Sources that differ

The two passages are in the same official document and they differ; issuing by the recipient in the national environment must be checked municipality by municipality (questions and answers).

End-to-end flow

From the invoice that arrives to the proof that stays, in seven stops

The track shows the order. What matters at each stop is who decides and what evidence is left.

Guidance Process design proposed by DFSpro, with no force of law.

1

Capture

API, portal, email, file

2

Validate master data

Provider, municipality, service code

3

Validate withholding

ISS, PIS, COFINS, CSLL, INSS, IR

4

Approve

Order, service and expense owner

5

Post and pay

MIRO, withholding, due date

6

Record in tax books

Reinf, DCTFWeb, municipal payment slip

7

Keep the proof

XML, event, payment slip, proof of payment

Control point 1: arrival

Every invoice received gets a record with origin, date, channel and access key when there is one. An invoice that arrives by email and by API at the same time must be recognized as the same one.

Control point 2: the rule

Before posting, the flow compares the municipality of taxation, the provider's regime and the withholding reported. A mismatch becomes a pending item with an owner and a deadline, not a posting.

Control point 3: the proof

Payment is released only with the valid document archived. A later event, such as cancellation or replacement, goes back into the flow and reopens the posting.

Two stops deserve an explanation. At stop 2, the provider's master data decides more than it seems: Simples Nacional, MEI, professional partnerships and self-employed professionals change what can be withheld and how (questions and answers). At stop 6, the tax bookkeeping of a service received is not a single file. The withheld INSS goes to the EFD-Reinf (a digital return in Brazil's SPED system) through event R-2010, the federal taxes withheld on payments to legal entities through event R-4020, and the ISS goes to the municipality, by payment slip or by invoice, depending on the case. The result of the events feeds the DCTFWeb.

Capture and receipt

Four channels and one rule: a single destination

Whatever the channel, the invoice goes into the same record, with the same identity.

  1. 1

    Query by NSU

    The national channel is the ADN Distribution API. The ADN API manual for taxpayers describes two queries: GET /DFe/{NSU}, which returns the document for the NSU given, and GET /NFSe/{ChaveAcesso}/Eventos, which returns the events linked to a key.

    They serve whoever is the issuer, recipient or intermediary (ADN API manual). The query can use a certificate with the same CNPJ root as the taxpayer, and there is a restricted production environment for testing.

  2. 2

    Three official warnings

    The official questions and answers give three warnings that change the design (NFS-e questions and answers). First, for recurring consumption the correct route is the Distribution API, not repeated manual queries. Second, the invoice only reaches whoever queries, giving the last NSU: there is no automatic delivery to the recipient.

    Third, if the query finds no new document, the API requires 1 hour before a new attempt. On the municipality side, each send call accepts at most 50 documents or 1 MB, and the ADN processes the queue in chronological order, so a stuck document holds back the ones after it. That is why an invoice can take time to appear even though it was issued.

  3. 3

    National portal

    The national portal is the complement. In Received NFS-e, the recipient sees the invoices in which it is a party, filters by period, provider and status, sees the linked events, confirms or rejects, and downloads the XML and DANFSe.

    Login by CPF or CNPJ and password, digital certificate or GOV.BR account, the last only for MEI (questions and answers). What the municipality publishes on its own portal varies, and the ERP must not assume that one channel replaces the other.

What works

  • Query by NSU as a routine, with control of the sequence and of the last NSU stored.
  • Read failures handled by access key: if the imported invoice appears blank, recovery is by the key, not by the sequential NSU.
  • The Received NFS-e portal as plan B and as a source for checking, with XML and DANFSe to download.
  • A single record per invoice, whatever the channel.

What tends to fail

  • Depending on the provider's email and typing the posting.
  • Downloading the invoice only when someone complains about a payment.
  • Querying with no defined frequency, leaving the invoice waiting in the ADN.
  • Treating the invoice received by email and the one from the API as different invoices.

To go deeper

For an invoice that arrives already replaced or cancelled, the event cycle is described in the events section of the page on national-standard NFS-e. The parallel for the goods invoice, with the NSU sequence and recipient confirmation, is in automatic NF-e and CT-e intake.

Validation and withholdings

Before posting, the invoice goes through five questions

Withholding is where the most money and proof are lost. Automation must check what the provider reported, not just copy it.

Official basis Text from the official sources; the five questions below are DFSpro guidance.

WithholdingWhen it arisesWhere it appears on the invoice and in the tax bookkeepingSource
ISSThe municipality may assign to the recipient the responsibility for the credit; the responsible party pays the full tax even if it did not withhold. The recipient is responsible, even if immune or exempt, under items 3.05, 7.02, 11.02, 17.05 and 17.10, among others, and for services from abroad.Field tpRetISSQN. On the national invoice, withholding by the recipient (tpRetISSQN = 2) is not reported when the municipality of taxation is not the recipient's own (rule E0031).LC 116/2003, art. 6, questions and answers, topic 7.9
PIS, COFINS and CSLLPayments from one legal entity to another for services such as cleaning, upkeep, maintenance, security, surveillance, labor leasing and professional services; rate of 4.65% (1%, 3% and 0.65%). Simples companies are not required to withhold.On the national invoice, the three withheld amounts are added in vRetCSLL, with tpRetPisCofins = 3 and vPis and vCofins at zero. Tax bookkeeping through EFD-Reinf, event R-4020 or R-4080.Law 10.833/2003, arts. 30 and 31, topic 13.1, Reinf questions and answers
INSSService performed under labor assignment or contracted work, in the situations in the EFD-Reinf service table.Event R-2010, by the 15th of the month after the invoice is issued or before R-2099, whichever comes first.EFD-Reinf manual
Income taxPayments to a legal entity in the cases the legislation provides; R-4020 reports the payment even with no income tax withheld in the cases provided.Event R-4020, which also feeds the DCTFWeb and the tax matching; deadline on the 15th of the following month or before R-4099.EFD-Reinf manual

The five validation questions

  1. Is the provider where it says it is? Active CNPJ, regime, municipality of taxation and whether the service falls under the exceptions in art. 3 of LC 116 (the tax is owed to the provider's establishment, except in the listed cases, such as the recipient's establishment in the case of § 1 of art. 1) (LC 116/2003, art. 3).
  2. Does the ISS withholding make sense? If the municipality of taxation is not the recipient's, the national invoice cannot carry withholding by the recipient.
  3. Are the federal contributions in the right field? Withheld PIS and COFINS added in vRetCSLL, not in vPis and vCofins, which are the provider's own debit and do not enter the net amount.
  4. Does the net amount close? vLiq = vServ minus unconditional and conditional discounts minus vTotalRet, which adds social security withholding, IRRF, withheld CSLL and withheld ISSQN (topic 13.2).
  5. Is there a floor and an exception? Withholding of PIS and COFINS depends on a specific legal provision (example cited: item 04.03 of LC 116) and on the floor of BRL 10.00, according to the questions and answers; the BRL 10.00 floor for social security withholding looks at the total of the DARF, not each invoice (Reinf questions and answers and topic 13.3).

Rule for Simples and for individuals

A provider under Simples Nacional, as a rule of art. 30, § 2, of Law 10.833/2003, does not suffer PIS, COFINS and CSLL withholding. When the issuer is an individual, the federal tax fields of the national NFS-e are blocked, for technical impossibility (topic 13.4). Do not try to force the field: handle the withholding at posting, under the applicable legislation.

The practical reading is that no validation needs artificial intelligence to exist. It needs a decision table, clean master data and an owner. Tables by service, by municipality and by regime live in the tax master data; see the page on tax master data. The tax reform changes the service invoice, with IBS and CBS, and the calendar is in tax reform, CBS and IBS.

Delivery and archive

Deliver the invoice to the recipient and keep the proof

Whoever issues must make the invoice arrive. Whoever receives must keep it. Both ends are part of the same automation.

If the company issues the invoice

The authorized NFS-e is delivered to the recipient by the environment that authorizes it: on the national portal the recipient finds it in Received NFS-e, with XML and DANFSe, and can query it through the Distribution API (questions and answers). SAP records, in the outbound NFS-e documentation, that sending the invoice by email is not supported because the city hall does it (SAP Help). The ERP, then, must not promise a delivery that the municipality makes.

If the company receives the invoice

The XML is the base document. The DANFSe is the PDF representation. The archive keeps both, plus the linked events, the municipal payment slip and the proof of payment. An invoice without XML in the archive is an invoice without proof.

Confirm or reject

On the national portal, the recipient confirms or rejects the invoice. If it does not respond within the municipality's deadline, tacit confirmation is generated. After confirmation, even tacit, the system may block replacement (questions and answers, topics 25.1 and 25.5). Whoever rejects needs to know that rejection only warns: cancelling is up to the provider or the municipality.

Event after payment

Cancellation or replacement can arrive after posting and payment. The flow must reopen the posting, warn accounts payable and, if ISS was paid by payment slip, open the handling of the tax, which in São Paulo requires an administrative process after the NFTS is paid.

SAP and fiscal ABAP

What the documentation confirms and where development comes in

Part of the service invoice automation is documented by SAP; the rest depends on a project.

What the SAP documentation describes

SAP's documentation for S/4HANA on-premise describes the NFS-e as a municipal document, whose rule changes from city to city, and states that the standard outbound NFS-e solution supports the rules of Rio de Janeiro and São Paulo, with Partner Enablement for the other cities.

Among the listed functions are creating RPS, authorizing, cancelling and replacing outbound NFS-e (SAP Help NFS-e).

The SAP ERP 6.0 EHP8 help lists NF-e and CT-e as inbound documents of the eDocument Cockpit, and NF-e, NFS-e and CT-e as outputs (SAP Help for DRC, EHP8 version).

The DRC inbound configuration covers NF-e and CT-e (SAP Help for DRC inbound). An SAP expert blog from 2020 describes the same division by cities (SAP Community).

What the list of new features brings

The S/4HANA on-premise list of new features has items titled Enablement of NFS-e Access Key for Purchasing Scenarios and Access Key Data for Inbound Electronic Nota Fiscal for Services (SAP Help).

The titles point to features around the NFS-e access key in purchasing and inbound. The detail of each feature depends on the version and on the applicable SAP notes, which require SAP access.

Another version or a partner solution

In another version or with a partner solution, the path for NFS-e inbound may be different. For the architecture of the DRC and of the integration environment, see tax integration in SAP BTP.

Where fiscal ABAP comes in

Fiscal ABAP and customization in this layer are DFSpro's: enhancements, BAdIs and exits, plus reports, under tax governance and in Clean Core. On the service invoice, this work usually shows up in five places, which are DFSpro guidance:

  • Withholding and municipality-of-taxation rules at inbound, where the project standard does not cover the case.
  • A checking report between the invoice, the MIRO bill and the withholdings, before the close.
  • A program that generates the batch NFTS file, in the city hall's layout, and controls the deadline and the payment slip.
  • Handling of a later event (cancellation and replacement) that reopens the posting.
  • Extraction of data for the EFD-Reinf with the correct withholding by provider and by nature.

DFSpro's role

  • DFSpro does not replace the integrator in the general architecture or in choosing the capture or issuing tool.
  • It works in the tax layer: what the rule must do, how development implements it and how to prove that it did.
  • For those who use GUEPARDO Tax, DFSpro sells the license as an Authorized Channel of NTT DATA, and the conversation about what the tool covers should start from the product's official sources.
  • The Clean Core is the integration layer, when the design calls for services outside the core.
Scenarios

Three invoices, three paths and one routine

Fictional examples, only to show how the flow decides. The names, municipalities and amounts are made up for the example.

Scenario A Maintenance in Curitiba

An industrial company in São Paulo hires maintenance from a provider in Curitiba, which issues an NFS-e. The invoice comes in through the API and the flow checks the municipality of taxation: the general rule is the provider's, and the ISS withholding comes as not withheld. Even so, because the provider is from outside the municipality, the São Paulo company declares the service received by NFTS, with no withholding, and the flow generates the NFTS within the manual's deadline.

Scenario B Surveillance with withholding

A company outside Simples hires surveillance. The flow identifies a service subject to PIS, COFINS and CSLL withholding, adds the three in one field, checks the net amount and issues event R-4020. INSS follows through R-2010 if it is a labor assignment.

Scenario C Provider with no invoice

A self-employed provider in São Paulo, excused from issuing invoices, hands over a receipt without a municipal registration. The flow refuses the receipt as support, opens a pending item and, if the provider does not correct it, generates the NFTS under the incomplete receipt case, before the deadline.

Scenario A shows a subtle point: in São Paulo, the recipient of a provider from outside the municipality declares by NFTS even with no withholding (Decree 52.610/2011, art. 2, I). Whoever designs the rule as 'if there is an invoice, no NFTS is needed' gets it wrong exactly here. The right rule depends on the provider's origin.

Errors and fixes

Ten failures that show up and the shortest fix

Each row links the sign to the probable cause and to the action. The actions cited as rules come from the sources; the others are guidance.

SignProbable causeFix
Net amount of the invoice higher than expectedWithheld PIS and COFINS posted in vPis and vCofins, which do not reduce the net amount.Add the three withheld amounts in vRetCSLL, use tpRetPisCofins = 3 and replace the invoice if already issued (topic 13.1).
ISS withholding refused on the invoicetpRetISSQN = 2 with a municipality of taxation different from the recipient's municipality (rule E0031).Correct to not withheld or change the municipality of taxation when the exception in art. 3 applies; if already issued, replace (topic 7.9).
Invoice imported blankFailure reading the XML or saving locally, not from the ADN.Recover by access key and check the integration log (topic 19.4).
Invoice takes time to appearThe municipality shares in batches, the ADN queue is chronological, or the recipient's query is infrequent.Run the query as a routine, respecting the wait hour when there is no new document (topics 6.6 and 6.7).
Rejected by the recipient and still paidRejection only warns; the invoice stays in the pre-calculation until a cancellation or replacement is accepted.Follow the cancellation or replacement, with reason 05 (topics 25.4 and 10.4).
NFTS past the deadlineDeadline programmed from the decree (5th) instead of the manual (10th or 30th).Check the current manual and fix the rule from the current version (manual v3.1).
NFTS issued for an invoice that already has a São Paulo NFS-eOrigin rule missing.Cancel the NFTS, watching the deadline and the payment slip; an NFS-e from a São Paulo provider is never declared by NFTS (questions and answers).
Error in an NFTS in layout 2Replacement and batch do not exist in this layout.Cancel and issue again (manual, items 5 and 9).
Payment to a legal entity missing from ReinfPayment reported only when there is withholding.Send the payment even with no withholding in the cases provided (Reinf manual).
Invoice cancelled after paymentThe event arrived and nobody reopened the posting.An event flow that reopens the posting and warns accounts payable.
Checklist

Automation readiness by area

Mark what already exists. What is left unanswered is the work list.

Tax

  • A table by municipality and by service that says whether there is ISS withholding.
  • A rule for when the NFTS is due and the deadline checked in the current manual.
  • A table of federal withholdings by nature of the service and by the provider's regime.
  • A defined owner for the cancellation and replacement event.

Accounts payable

  • An invoice without a valid XML does not release payment.
  • Net amount checked against the invoice formula.
  • ISS payment slip linked to the invoice that originated it.
  • Alert for an invoice rejected or cancelled after posting.

IT and SAP

  • Query to the Distribution API as a routine, with control of the last NSU.
  • Digital certificate and expiry monitored.
  • A single record per invoice, whatever the channel.
  • Test in restricted production before each layout change.

Purchasing and accounting

  • Service order and confirmation of execution linked to the invoice.
  • Tax bookkeeping of INSS, income tax and withheld contributions checked against the events sent.
  • Proof archived by tax period: XML, DANFSe, payment slip, proof of payment.
How DFSpro works

DFSpro handles the tax layer of the service invoice alongside the integrator

A consultancy from Curitiba, founded in 2018, focused on SAP Tax Governance and on the tax layer of the project.

What DFSpro does

  • Defines the tax rule for the service invoice: origin, withholding, NFTS, event.
  • Develops in ABAP what the rule asks for in the tax layer, within the Clean Core rules.
  • Checks the posting, the withholdings and the tax bookkeeping against what the invoice says.
  • Organizes the proof for inspection and audit.

What stays with others

  • The general SAP architecture and the integration environment.
  • The choice and operation of the capture or issuing tool.
  • The municipality's decision on how the city hall runs its system.
  • The company's decision on what to do with each pending item.

The method starts from a sample of the company's real invoices: from each document type and each relevant municipality, the check follows the invoice to the posting, the withholding and the tax bookkeeping, and records where the rule failed. The SAP Tax Diagnostic organizes this check; the SAP Tax Governance program provides the cadence.

Frequently asked questions

Frequently asked questions about the service invoice and the NFTS

01Is the NFTS mandatory for every company?+

No. It is a document of the municipalities that created it. In São Paulo, legal entities and condominiums that receive services issue the NFTS in the cases in the decree and the city hall's manual. Salvador also has the NFTS. The company needs to check, municipality by municipality, whether there is an equivalent. The channel and rules of each city hall are in NFS-e by municipality in SAP.

02Who issues the NFTS and in what situation?+

The service recipient, or the intermediary in the cases provided. In São Paulo, it is due when the service is received from a provider outside the municipality, when a São Paulo provider required to issue NFS-e does not issue it, when an exempt provider does not give a complete receipt and, according to the city hall's questions and answers, when the recipient rejects an NFS-e with ISS withheld in error in amount, deduction, code or date.

03What is the NFTS deadline in São Paulo?+

The decree says the 5th of the following month and manual v3.1 says the 10th when the recipient withholds ISS and the 30th in other cases. The official sources differ. The rule to program is the one in the city hall's current manual, checked at each update.

04If the São Paulo provider issued an NFS-e, do I need to issue an NFTS?+

No. An NFS-e from a provider established in São Paulo is never declared by NFTS. Received NFS-e follow the normal posting flow and, when there is withholding, the system's payment slip.

05What is the fine for not issuing the NFTS?+

Law 13.476/2002, art. 14, V, items e and f, provides 50% of the tax, with minimums reproduced by the city hall of BRL 1,075.08 and BRL 1,870.57 per document, depending on whether or not the recipient is required to withhold, and 100% if the recipient knew about the faked establishment outside the municipality. The amounts are subject to the adjustment in § 1.

06How does a company consume the NFS-e in which it is the recipient?+

Through the ADN Distribution API, with a digital certificate, querying the last NSU, or through the Received NFS-e portal, for checking. For recurring consumption, the correct route is the API. The invoice only reaches whoever queries; if there is no new document, the API requires an hour of waiting before a new query.

07Why does an issued invoice not show up for me?+

Because the municipality may share in batches, the ADN queue is chronological and the recipient's query may be infrequent. None of this is a fault of the ADN itself. The query routine should have a defined frequency and close gaps.

08Does rejecting the invoice cancel the invoice?+

No. Rejection only records disagreement and the invoice stays in the pre-calculation of the national calculation module. Cancellation depends on the provider or the municipality. Whoever rejects should follow the next event, which may be a cancellation or a replacement with the recipient's rejection as the reason.

09How is PIS, COFINS and CSLL withholding handled on the national invoice?+

The three withheld amounts are added in vRetCSLL, with tpRetPisCofins equal to 3 and vPis and vCofins at zero. vPis and vCofins are the provider's own debit and do not reduce the net amount. Withholding depends on a legal provision and on a floor of BRL 10.00, according to the NFS-e questions and answers.

10Where are the withheld INSS and income tax reported?+

In the EFD-Reinf. INSS on a service with labor assignment or contracted work goes in event R-2010, by the 15th of the month after the invoice is issued. Payments to legal entities, with or without withholding in the cases provided, go in R-4020, also by the 15th of the following month. The result feeds the DCTFWeb.

11Does SAP receive the NFS-e automatically?+

SAP's documentation describes the outbound NFS-e, with São Paulo and Rio de Janeiro rules and Partner Enablement for other cities, and lists NF-e and CT-e as inbound documents in the DRC inbound. SAP lists S/4HANA new features about the NFS-e access key in purchasing and inbound. The answer for your environment depends on the version, the SAP notes and the tool chosen.

12Does SAP send the invoice to the recipient by email?+

According to the S/4HANA on-premise outbound NFS-e documentation, sending the NFS-e by email is not supported, because the city hall does it. In the national standard, the recipient finds the invoice on the portal, with XML and DANFSe, and through the Distribution API.

13Can the NFTS be replaced or issued in batch?+

In layout 1, yes: replacement is valid up to 6 months from the taxable event and there is batch issuing by text file. In layout 2, which carries IBS and CBS and applies to imported services with a taxable event from 01/01/2026, there is no replacement or batch: the error is fixed by cancelling and issuing again.

14Does DFSpro do the ABAP development for this automation?+

Yes, in the tax layer: enhancements, BAdIs and exits, plus reports, under tax governance and in Clean Core. DFSpro does not replace the integrator in the general architecture or in choosing the capture or issuing tool.

15Where to start?+

With the inventory: how many service invoices came in last month, from how many municipalities and through which channels; which had withholding; which became NFTS; and which events arrived after payment. For your case, use the contact page; the SAP Tax Diagnostic organizes the check.

Next steps

Find out how many service invoices your environment receives, withholds and records

The first step is to measure: invoices by municipality, withholdings by type and events after payment. Use the contact page to discuss your case.

To read more first: national-standard NFS-e, automatic NF-e and CT-e intake, electronic tax documents, ancillary obligations and SPED and tax setup.