Logo Passei Direto
Buscar
Material
páginas com resultados encontrados.
páginas com resultados encontrados.
left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

left-side-bubbles-backgroundright-side-bubbles-background

Experimente o Premium!star struck emoji

Acesse conteúdos dessa e de diversas outras disciplinas.

Libere conteúdos
sem pagar

Ajude estudantes e ganhe conteúdos liberados!

Prévia do material em texto

SAP Library Updates for CT-e 
 
SAP Note 1661137 
H
E
L
P
.
C
A
I
N
T
B
R
 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 2 
Copyright 
 
© Copyright 2012 SAP AG. All rights reserved. 
 
SAP Library document classification: PUBLIC 
 
No part of this publication may be reproduced or transmitted in any form or for any purpose 
without the express permission of SAP AG. The information contained herein may be 
changed without prior notice. 
 
Some software products marketed by SAP AG and its distributors contain proprietary 
software components of other software vendors. 
 
Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered 
trademarks of Microsoft Corporation 
 
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, 
System z, System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, 
Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, 
BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, 
Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli, Informix, and Smarter Planet are 
trademarks or registered trademarks of IBM Corporation. 
 
Linux is the registered trademark of Linus Torvalds in the United States and other countries. 
 
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered 
trademarks of Adobe Systems Incorporated in the United States and other countries. 
 
Oracle and Java are registered trademarks of Oracle and its affiliates. 
 
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. 
 
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are 
trademarks or registered trademarks of Citrix Systems Inc. 
 
HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, World 
Wide Web Consortium, Massachusetts Institute of Technology. 
 
Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, 
Retina, Safari, Siri, and Xcode are trademarks or registered trademarks of Apple Inc. 
 
IOS is a registered trademark of Cisco Systems Inc. 
 
RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry 
Torch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App 
World are trademarks or registered trademarks of Research in Motion Limited. 
 
Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, 
Google Mobile Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync, 
Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are 
trademarks or registered trademarks of Google Inc. 
 
INTERMEC is a registered trademark of Intermec Technologies Corporation. 
 
Wi-Fi is a registered trademark of Wi-Fi Alliance. 
 
Bluetooth is a registered trademark of Bluetooth SIG Inc. 
 
Motorola is a registered trademark of Motorola Trademark Holdings LLC. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 3 
 
Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH. 
 
 
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, 
StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as 
their respective logos are trademarks or registered trademarks of SAP AG in Germany and 
other countries. 
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal 
Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services 
mentioned herein as well as their respective logos are trademarks or registered trademarks of 
Business Objects Software Ltd. Business Objects is an 
SAP company. 
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase 
products and services mentioned herein as well as their respective logos are trademarks or 
registered trademarks of Sybase Inc. Sybase is an SAP company. 
 
Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of 
Crossgate AG in Germany and other countries. Crossgate is an SAP company. 
 
All other product and service names mentioned are the trademarks of their respective 
companies. Data contained in this document serves informational purposes only. National 
product specifications may vary. 
These materials are subject to change without notice. These materials are provided by SAP 
AG and its affiliated companies ("SAP Group") for informational purposes only, without 
representation or warranty of any kind, and SAP Group shall not be liable for errors or 
omissions with respect to the materials. The only warranties for SAP Group products and 
services are those that are set forth in the express warranty statements accompanying such 
products and services, if any. Nothing herein should be construed as constituting an 
additional warranty. 
 
 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 4 
Icons in Body Text 
 
Icon Meaning 
 Caution 
 Example 
 Note 
 Recommendation 
 Syntax 
 
Additional icons are used in SAP Library documentation to help you identify different types of 
information at a glance. For more information, see Help on Help  General Information 
Classes and Information Classes for Business Information Warehouse on the first page of any 
version of SAP Library. 
 
Typographic Conventions 
 
Type Style Description 
Example text Words or characters quoted from the screen. These include field 
names, screen titles, pushbuttons labels, menu names, menu paths, 
and menu options. 
Cross-references to other documentation. 
Example text Emphasized words or phrases in body text, graphic titles, and table 
titles. 
EXAMPLE TEXT Technical names of system objects. These include report names, 
program names, transaction codes, table names, and key concepts of a 
programming language when they are surrounded by body text, for 
example, SELECT and INCLUDE. 
Example text Output on the screen. This includes file and directory names and their 
paths, messages, names of variables and parameters, source text, and 
names of installation, upgrade and database tools. 
Example text Exact user entry. These are words or characters that you enter in the 
system exactly as they appear in the documentation. 
<Example text> Variable user entry. Angle brackets indicate that you replace these 
words and characters with appropriate entries to make entries in the 
system. 
EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 5 
Document Relevant for CT-e in this PDF 
This table shows the documents in this PDF that have been initially updated or created for the 
release of SAP Note 1661137 CT-e: Legal Change. 
The other documentation in the PDF, especially most documents related to NF-e, will be 
updated in the future to reflect changes on the UIs that are delivered as part of this legal 
change with the corresponding Support Packages. The updated documentation will be 
published on the SAP Help Portal (http://help.sap.com) latest in October 2012 and attached to 
this Note. 
 
Type of 
Change 
Document Name Reason for Change 
New 
document 
Electronic Fiscal Documents 
[Page 8] 
Documentation takes into account the 
different types of electronic fiscal 
documents supported: NF-e and CT-e 
Document 
changed 
Activating SAP 
BusinessObjects Nota Fiscal 
Eletrônica [Page 35] 
Documentation updated to take into 
account changes to UI texts 
Document 
changed 
Log for Electronic Fiscal 
Documents [Page 49], 
formerly NF-e Log 
Documentation now takes into account 
the different types of electronic fiscal 
documents supported: NF-e and CT-e 
Document(s) 
changed 
 Central Contingency 
Processing [Page 
62], formerly NF-e 
Processing under 
Central Contingency 
 Activating 
Contingency 
Processing for 
Region [Page 63] 
 Activating 
Contingency 
Processing for 
Business Place 
[Page64] 
Documentation updated to take into 
account the changes made to the 
respective Customizing views 
New 
document 
Conhecimento de Transporte 
Eletrônico [Page 97] 
Document introduces the functions and 
features for CT-e that are delivered with 
this legal change 
New 
document 
Customizing for CT-e [Page 
101] 
Document explains Customizing 
settings that have to be made for CT-e 
 
http://help.sap.com/
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 6 
Table of Contents 
 
Electronic Fiscal Documents (DF-e) ...................................................................................... 8 
Electronic Nota Fiscal (NF-e) ............................................................................................. 9 
Customizing for NF-e .................................................................................................... 10 
Mandatory Settings ................................................................................................... 12 
Customizing Nota Fiscal Types ............................................................................. 13 
Maintaining Number Ranges ................................................................................. 14 
Customizing Numbering and Sending NF-e to the Messaging System ................ 15 
Assigning Authorizations Related to NF-e............................................................. 16 
Customizing XML Layout Version ......................................................................... 17 
Maintaining Default Values for the NF-e XML File ................................................ 18 
Customizing for Contingency Processing.............................................................. 19 
Customizing for Printing Contingency NF on Security Paper ........................ 20 
Customizing Cancellation Reasons ....................................................................... 21 
Customizing Tax Jurisdiction Codes ..................................................................... 22 
Optional Settings ....................................................................................................... 23 
Customizing Official Status Codes for NF-e .......................................................... 24 
Customizing Automatic Printing of Authorized NF-e ............................................. 25 
Customizing for Automatic Cancellation of Source Documents ............................ 26 
Customizing Tax Situations for NF-e ..................................................................... 27 
Customizing NF Type Redetermination in SD....................................................... 28 
Customizing NF Type Determination for Mixed Scenarios ................................... 29 
Customizing BCB Country Codes ......................................................................... 30 
Customizing for SCAN........................................................................................... 31 
Customizing for ICMS Exemption Reasons .......................................................... 32 
Business Add-Ins (BAdIs) for NF-e ....................................................................... 33 
Interfaces for Communicating with Messaging System ............................................ 34 
Activating SAP BusinessObjects Nota Fiscal Eletrônica ....................................... 35 
Interface for Outbound Messages ......................................................................... 36 
Interfaces for Inbound Messages .......................................................................... 37 
Interfaces for Messaging-System Actions ............................................................. 39 
Business Transactions .................................................................................................. 41 
Outgoing Electronic Notas Fiscais ............................................................................ 42 
Requesting NF-e Authorization ............................................................................. 43 
NF-e Monitor ............................................................................................................. 45 
Checking NF-e Status ........................................................................................... 47 
Log for Electronic Fiscal Documents ............................................................. 49 
NF-e Data ...................................................................................................... 50 
NF-e Access Key ........................................................................................... 54 
User Actions for Individual NF-e ............................................................................ 55 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 7 
NF-e Cancellation .................................................................................................. 57 
Contingency Processing of NF-e Posted in Non-Contingency Mode ................... 59 
Central Contingency Processing ........................................................................... 62 
Activating Contingency Processing for Regions............................................ 63 
Activating Contingency Processing for Business Places .............................. 64 
NF-e Processing with SCAN ................................................................................. 66 
Statuses in NF-e Monitor ....................................................................................... 68 
NF-e Monitor Statuses: NF-e Authorization .................................................. 69 
NF-e Monitor Statuses: Authorization with Subsequent Cancellation ........... 70 
NF-e Monitor Statuses: Rejection and Subsequent Skipping ....................... 72 
NF-e Monitor Statuses: Authorization with Validation Error .......................... 74 
NF-e Monitor Statuses: NF-e Switched to Contingency ................................ 76 
NF-e Monitor Statuses: NF-e Posted under Contingency ............................. 78 
NF-e Monitor Statuses: Cancellation Prior to Authorization .......................... 79 
Incoming Electronic Notas Fiscais ............................................................................ 81 
Changing Posting Date for Manually-Created Incoming NF-e .............................. 83 
User Decision in Creation of Incoming NF in Mixed Scenarios............................. 84 
Reports ......................................................................................................................... 85 
Check NF-e Number Range Gaps (Gap Report) ...................................................... 86 
NF-e Events .................................................................................................................. 87 
Electronic Correction Letters (CC-e) ......................................................................... 88 
Customizing for Electronic Correction Letters (CC-e) ........................................... 89 
Interfaces for Electronic Correction Letters (CC-e) ............................................... 90 
Interface for Outbound CC-e Messages ........................................................ 91 
Interface for Inbound NF-e Event Messages................................................. 92 
Process Flow for Electronic Corrections Letters (CC-e) ....................................... 93 
Creating Electronic Correction Letters (CC-e)............................................... 95 
Archiving NF-Event Data ............................................................................... 96 
Conhecimento de Transporte Eletrônico (CT-e) .............................................................. 97 
Customizing for CT-e .................................................................................................. 101 
 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 8 
 ElectronicFiscal Documents (DF-e) 
In your SAP ERP system, you can create and process the following types of electronic fiscal 
documents: 
 Electronic Nota Fiscal (NF-e) [Page 9] 
 Conhecimento de Transporte Eletrônico (CT-e) [Page 97] 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 9 
 Electronic Nota Fiscal (NF-e) 
As of 2007, the Brazilian government introduced electronic notas fiscais (NF-e) to replace the 
conventional, hard-copy notas fiscais. Before NF-e are printed and sent with goods, the state 
tax authority (SEFAZ) of the state of origin of the NF-e (or, in certain cases, the federal 
authority) must grant authorization. 
Integration 
You enable communication between the tax authority systems and your SAP ERP system 
with a messaging system. You can choose your own messaging system or an SAP product: 
SAP BusinessObjects Nota Fiscal Eletrônica. SAP BusinessObjects Nota Fiscal Eletrônica 
can be integrated into your existing system landscape, so that your SAP ERP system 
provides the data required by the authorities and SAP BusinessObjects Nota Fiscal Eletrônica 
communicates with the authorities and your customers and suppliers. When connecting SAP 
ERP to SAP BusinessObjects Nota Fiscal Eletrônica, all necessary interface implementation 
is part of the standard delivery. However, you must make certain Customizing settings in SAP 
ERP and SAP BusinessObjects Nota Fiscal Eletrônica. 
For more information about SAP BusinessObjects Nota Fiscal Eletronica and the 
communication with your SAP ERP system, see http://help.sap.com/grc SAP 
BusinessObjects Nota Fiscal Eletrônica System Administrator's Guide . 
If you choose to use a different messaging system for communication with the tax authorities, 
you must also make certain Customizing settings to enable this communication. For more 
information about these settings, see Customizing for NF-e [Page 10]. 
Prerequisites 
To process NF-e, you have made the necessary settings in Customizing. This includes 
Customizing activities that are specific to NF-e. For more information, see Customizing for 
NF-e [Page 10]. 
Features 
The system generates the required NF-e in processes that are subject to NF-e processing. 
Activities 
You monitor your NF-e – from its initial posting through its authorization by the tax authorities 
– using the NF-e Monitor, described in the following documentation. You use the NF-e 
monitor to perform activities such as: 
 Switching to contingency 
 Canceling NF-e and source documents (with authorization request) 
 Skipping NF-e (with authorization request) 
 Running reports about number gaps 
 Checking logs for NF-e 
The functions that enable these activities are described in more detail in the following 
documentation. 
http://help.sap.com/grc
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 10 
 Customizing for NF-e 
You need to make a number of Customizing settings to process electronic notas fiscais (NF-
e). The Customizing activities for these settings are located in different parts of the SAP 
Implementation Guide (IMG): Some of the settings are made in the general activities for nota 
fiscal processing and are located in the Customizing for Cross-Application Functions under 
 General Application Functions Nota fiscal . Others are specific to processing NF-e and 
are located in the Customizing for Nota fiscal under Electronic Notas Fiscais (NF-e). 
 Mandatory 
 Optional 
 Related to the configuration of the messaging system you use for communication with 
the tax authorities 
 Related to electronic correction letters (CC-e). The information about these 
Customizing settings is included in Customizing for Electronic Correction Letters (CC-
e) [Page 89]. 
Features 
These settings are explained in the following sections in this documentation: 
 Mandatory Settings 
o Customize Nota Fiscal Types 
o Maintain Number Ranges 
o Customize Numbering and Sending NF-e to the Messaging System 
o Assign Authorizations for User Actions Related to NF-e 
o Customize XML Layout Version 
o Maintain Default Values for the NF-e XML File 
o Customize Printing for Contingency NF 
o Customize Cancellation Reasons 
o Customize Contingency Reasons 
o Customize Tax Jurisdiction Codes 
 Optional Settings 
o Customize SEFAZ Status Codes 
o Customize Automatic Printing of Authorized NF-e 
o Enable the automatic cancellation of source documents 
o Customize NF Type Redetermination in SD 
o Customize NF Type Determination for Mixed Scenarios 
o Customize BCB Country Codes 
o Customize for SCAN 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 11 
o Customize ICMS Exemption Reasons 
o Create implementations of the General Enhancements for NF-e and Check 
Period of Notas Fiscais Business Add-Ins (BAdIs) 
SAP BusinessObjects Nota Fiscal Eletrônica as Messaging System 
If you use SAP BusinessObjects Nota Fiscal Eletrônica as your messaging system, you must 
make Customizing settings in both your ERP system and the SAP BusinessObjects Nota 
Fiscal Eletrônica system. In your ERP System, these include the following: 
 Activating SAP BusinessObjects Nota Fiscal Eletrônica as your messaging system 
 Enabling functions related to the automation of the processing of incoming NF-e 
For more information about the Customizing in SAP BusinessObjects Nota Fiscal Eletrônica, 
see http://help.sap.com/grc SAP BusinessObjects Nota Fiscal Eletrônica System 
Administrator's Guide . 
Other Messaging Systems 
If you do not use SAP BusinessObjects Nota Fiscal Eletrônica, you must enable your 
messaging system to pass the communication between your SAP ERP system and the tax 
authorities. Information about the function modules in SAP ERP that act as interfaces to your 
messaging system is provided in the following documentation. The following interfaces are 
explained: 
 Interfaces for Outbound Messages 
 Interfaces for Inbound Messages 
 Interfaces for Messaging-System Actions 
NF-e Events 
For information about the Customizing for electronic correction letters (CC-e), see 
Customizing for Electronic Correction Letters (CC-e) [Page 89]. 
http://help.sap.com/grc
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 12 
 Mandatory Settings 
The following documentation describes the settings you must make to process electronic 
notas fiscais (NF-e). 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 13 
 Customizing Nota Fiscal Types 
The system identifies a process that is relevant for electronic nota fiscal (NF-e) processing 
based on the nota fiscal (NF) type assigned to the corresponding nota fiscal. 
Activities 
In Customizing for Cross-Application Components, choose General Application Functions 
Nota Fiscal Define Nota Fiscal Types . 
In the details of those NF types that are used for NF-e, do the following: 
 In the Indicators group box, select Electronic NF. 
 In the Other group box, choose Nota Fiscal - Model 55 as the Nota Fiscal 
model. 
 For outgoing NF types or NF types that require authorization from the tax authorities, 
enter a nota fiscal form, which you must configure for NF-e numbering. 
 
You can create new electronic NF types by copying existing NF types, specifying a new 
name, and setting the Electronic NF indicator. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 14 
 Maintaining Number Ranges 
You need to define number ranges that the system uses for assigning the nine-digit NF-e 
number to an electronic nota fiscal. This number is also known as the external document 
number and is part of the access key. 
You do so in Customizing for Cross-Application Components, by choosing General 
Application Functions Nota Fiscal Electronic Notas Fiscais (NF-e) Maintain Number 
Ranges for NF-e . 
Each number range belongs to a number range group. You must assign a unique number 
range group to each business place. This enables the system to identify which business place 
generateda particular NF-e number. 
You make this assignment in Customizing for Cross-Application Components, by choosing 
 General Application Functions Nota Fiscal Output Assign Numbering and Printing 
Parameters . 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 15 
 Customizing Numbering and Sending NF-e to the 
Messaging System 
When you create electronic notas fiscais (NF-e), you need to number and send them to be 
authorized by the tax authorities. 
You can choose among four different ways of numbering and sending the NF-e to the 
messaging system: 
 You create an NF-e, and the numbering and sending is done automatically in 
processes in Materials Management (MM) and Sales and Distribution (SD) and 
stand-alone creation using the Nota Fiscal Writer. 
 
SAP does not recommend this method of numbering and sending, because it can 
lead to inconsistencies of the status of the NF-e, between the back-end system, 
the messaging system and the tax authorities’ database. 
 You number and send the NF-e manually in the NF-e Monitor [Page 45], by selecting 
the Set NF-e Number button. 
 You number the NF-e manually in the NF-e Monitor, by selecting the Set NF-e 
number menu. The NF-e is then sent automatically in the batch process. 
 You schedule a periodic execution of the Send NF-es in Batch to the Messaging 
System (J_BNFECALLRFC) report, and the numbering and sending of the NF-e are 
done automatically. 
Activities 
1. In Customizing for Cross-Application Components, choose General Application 
Functions Nota fiscal Output Assign Numbering and Printing Parameters . 
2. Select one of the entries in the General Printing Parameters list or create a new one. 
3. In the Key-Specific Printing Parameters view, define the numbering and sending 
option in theRFC Exec. field. 
 
For SCAN forms, you cannot select 2 - Numbering in Monitor Report - 
RFC via batch report for this field. This value is not allowed, because the 
scheduling of the batch run may cause the NF-e to be sent at a time when the 
SEFAZ or SCAN server, respectively, is no longer active. 
4. If you use the batch process to send the NF-es to the messaging system, define the 
periodic execution of the report. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 16 
 Assigning Authorizations Related to NF-e 
Many of the user actions that are possible from the NF-e Monitor are subject to authorization 
checks. You make the settings described below to enable the appropriate users to carry out 
these tasks. 
 
The NF-e Monitor does not carry out authorization checks when users check the 
connection to the messaging system, check an NF-e log, or display an NF-e in the Nota 
Fiscal Writer. 
Activities 
From the SAP Easy Access menu, choose Tools Administration User Maintenance 
Role Administration Roles , and assign the following activities of the F_NFBA 
authorization object to the role you use for Financial Accounting (FI) functions: 
Assign 
Activity 
To Enable User Actions in the NF-e Monitor 
85 (reverse) 
 Request an authorization to cancel an authorized NF-e 
 Set contingency per region or per business place 
 Request an authorization to cancel a rejected NF-e 
 Synchronize cancellation, that is, cancel both NF-e and source 
document 
 Cancel NF-e prior to receiving authorization from tax authorities 
35 (output) 
 Send NF-e with system communication status blank (not sent) 
 Set contingency per NF-e 
 Reset contingency per NF-e 
 Delete NF-e log entries 
 Resend an NF-e 
 Request cancellation again for an NF-e 
02 (change) Create electronic correction letters (CC-e) for NF-e 
03 (display) Display notas fiscais in the NF-e Monitor 
 
You must also enable appropriate users to cancel a contingency NF-e by canceling the 
related material or invoice document in Materials Management (MM) or Sales and 
Distribution (SD) without prior cancellation authorization from the tax authorities. To do 
so, assign activity 85 (reverse). 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 17 
 Customizing XML Layout Version 
To be able to create and send an XML file to the tax authorities, you must enter the correct 
XML layout version in Customizing. You assign the XML layout version that is currently valid 
for the state of origin of your goods or services per business place. 
Activities 
Assign the XML layout version as follows: 
1. In Customizing for Cross-Application Components, choose General Application 
Functions Nota Fiscal CNPJ Business Places Define Business Places . 
2. For the relevant company code and business place, choose NFe Configuration. 
3. Enter Nota Fiscal - Model 55 in the NF model field and the date from which it 
is valid. 
4. Enter the version in the XML Version field. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 18 
 Maintaining Default Values for the NF-e XML File 
You use this function to maintain default values that must be included in the NF-e XML file 
that the system sends to the tax authorities. 
In Customizing for Cross-Application Components, choose General Application Functions 
Nota Fiscal CNPJ Business Places Define Business Places . For the relevant 
company code and business place, choose NFe Configuration and specify default values for 
the following: 
 NF-e application version 
 Value for the NF-e issuing type. You enter a value to indicate which NF-e are 
processed normally and which are processed under contingency 
 Value for the NF-e issuing process. 
 Special values related to the region and city for foreign business partners 
 Values to identify how the NF-e processing was switched to contingency or SCAN 
For more information, refer to the respective field help in the system. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 19 
 Customizing for Contingency Processing 
To be able to process an electronic nota fiscal (NF-e) under contingency – either as one 
switched from normal processing to contingency processing, or as one posted under central 
contingency – you must make the following settings: 
 Enter contingency reasons to be sent to the tax authorities 
 Determine how NF-e processed under contingency should be printed 
Contingency Reasons 
You enter internal codes for the contingency reasons and descriptive texts that must meet the 
requirements of the tax authorities in Customizing for Cross-Application Components, under 
 General Application Functions Nota Fiscal Electronic Notas Fiscais (NF-e) Define 
Contingency Reasons . The descriptive text, along with the contingency date and time, is 
sent in the XML file to the tax authorities for NF-e posted in contingency. The text is also 
displayed in the NF-e Monitor. 
Printing Under Contingency 
Your SAP ERP system determines which number range and printer to use, based on how you 
set up printing in Customizing. For more information about printing contingency notas fiscais, 
see Customizing for Printing Contingency NF on Security Paper [Page 20]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 20 
 Customizing for Printing Contingency NF on 
Security Paper 
To configure printing a contingency nota fiscal on security paper, make the following settings 
in Customizing for Cross-Application Components, under General Application Functions 
Nota Fiscal Output Assign Numbering and Printing Parameters : 
 For number-range determination in Sales and Distribution (SD) and Materials 
Management (MM), set the Numbering Contin. indicator in the NF-e group box. 
 For printing in MM, maintain the contingency printer (must be a laser printer) in the 
Output Device field in the NF-e group box. 
 For printing in SD, you can maintain the contingency printer in one of the following 
ways: 
o Maintain the contingency printer (must be a laser printer) in the Output 
Device field in the NF-e group box 
o Configure the contingency printer using the classical printer configuration: Donot enter a printer in the Output Device field in the NF-e box. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 21 
 Customizing Cancellation Reasons 
When you request authorization from the tax authorities to cancel or skip an electronic nota 
fiscal (NF-e), you must specify a reason. 
Activities 
In Customizing for Cross-Application Components, choose General Application Functions 
Nota Fiscal Electronic Notas Fiscais (NF-e) Define Cancellation Reasons and make 
settings as required. 
In the Cancel Reason field, specify a technical key for the reason to cancel or skip the NF-e. 
In the column Description, specify the reason, which will be sent in the XML file. You may 
assign pre-defined reversal reasons from logistics invoice verification and/or goods 
movements in the columns Reason LIV and Reason GM respectively. 
 
If the cancellation of an NF-e occurs automatically in the background upon receipt of an 
authorization to cancel/skip, the system uses the reversal reason for Logistics Invoice 
Verification (LIV) or the goods movement as defined in this activity to cancel the related 
invoice or material document. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 22 
 Customizing Tax Jurisdiction Codes 
Your SAP ERP system derives the region in the NF-e access key from the tax jurisdiction 
code of the NF-e issuer. The city codes in the NF-e are also derived from the tax jurisdiction 
code of the corresponding address. Therefore a tax jurisdiction code is composed as follows: 
 The first 3 digits of the jurisdiction code are the region code followed by a space. For 
example, “SP ” is the tax region for Sao Paulo. 
 The last 7 digits of the key are for the municipal code: The first two digits define the 
state and the next five digits define the municipio as listed in the IBGE table. For 
example, “3550308” is the municipal code for the city of Sao Paulo. 
In the example, the tax jurisdiction code for the city of Sao Paulo is then “SP 3550308”. “35” is 
used as the region/state in the NF-e access key, and “3550308” is used as the city code. 
To enable your system to determine tax jurisdiction codes to create NF-e access keys, you 
must enter the tax jurisdiction codes for the different tax regions in Customizing and then 
assign them to postal codes. 
Activities 
1. In Customizing for Financial Accounting choose Financial Accounting Global 
Settings Tax on Sales/Purchases Basic Settings Brazil . 
2. In the Define Tax Jurisdiction Codes Customizing activity, you enter tax jurisdiction 
codes. 
3. In the Assign Postal Codes to Tax Jurisdiction Codes Customizing activity, you 
assign a range of postal codes to each tax jurisdiction code. 
For more information about the settings to be made, see the system documentation for the 
Customizing activities. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 23 
 Optional Settings 
The following documentation describes the optional settings you can make to process 
electronic notas fiscais (NF-e). 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 24 
 Customizing Official Status Codes for NF-e 
The NF-e Monitor displays the official status codes issued by the tax authorities. An example 
of such a code is 100 for an authorized NF-e. If you enter a description for the codes in 
Customizing, the NF-e Monitor additionally displays the description in the Single NF-e History 
section. For example, next to the 100 code, it can display Authorized as the description. 
Activities 
Enter the official status codes as defined by the tax authorities and descriptions as required in 
Customizing for Cross-Application Components, by choosing General Application 
Functions Nota Fiscal Electronic Notas Fiscais (NF-e) Define Official Status Codes for 
NF-e . 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 25 
 Customizing Automatic Printing of Authorized NF-
e 
You must first wait for authorization from the tax authorities to print an electronic nota fiscal 
(NF-e). Once the tax authorities approve your NF-e and return a corresponding protocol 
number, the system does not print the NF-e automatically. You can configure automatic 
printing by implementing a Business Add-In. 
Activities 
In Customizing for Cross-Application Components, choose General Application Functions 
Nota Fiscal Electronic Notas Fiscais BAdI: General Enhancements for NF-e , and 
create an implementation for the Call Print Program (CALL_RSNAST00) method. 
 
If you want to ensure that this method is called after the database has been updated with 
the authorization message from the tax authorities, you can use the Set Indicator for 
Commit Call (SET_COMMIT) method. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 26 
 Customizing for Automatic Cancellation of Source 
Documents 
When the server at the tax authorities (SEFAZ or SCAN) is having performance problems, 
you can react by doing one of the following: 
 Cancel the NF-e prior to receiving authorization from the tax authorities (in the NF-e 
Monitor, choose NF-e Cancel Prior to Author ) 
 Switch the NF-e to contingency mode (in the NF-e Monitor, choose the Contingency 
pushbutton) 
The NF-e then has the value 2 – Cancel Source Document as the required process step 
in the NF-e Monitor. The source document (that is, for example, the material document) must 
be canceled next. In Customizing you can enable the system to perform this cancellation 
automatically. 
Activities 
You make the corresponding setting in Customizing for Cross-Application Components, under 
 General Application Functions Nota fiscal CNPJ Business Places Define Business 
Places . On the NFe Configuration screen for the relevant branches, select the Automatic 
Cancellation After Conting./Cancel Prior to Auth. checkbox. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 27 
 Customizing Tax Situations for NF-e 
Tax situations for incoming and outgoing notas fiscais may differ for the following tax types: 
 IPI 
 PIS 
 COFINS 
NF-e use the “outgoing” tax situations if they exist. Otherwise, the “incoming” tax situation is 
used. 
Activities 
You must enter the tax situation for these tax types in Customizing for Financial Accounting 
under Financial Accounting Global Settings Tax on Sales/Purchases Basic Settings 
Brazil . The relevant Customizing activities are the following: 
 Define IPI Tax Laws 
 Define PIS Tax Laws 
 Define COFINS Tax Laws 
You only need to enter an outgoing tax situation if it differs from the incoming value. You do 
so in the Details for the respective tax law. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 28 
 Customizing NF Type Redetermination in SD 
Use 
In Sales and Distribution (SD), the system checks if a nota fiscal type is assigned to the sales 
document type you specify in the sales order. This is how the system determines which type 
of nota fiscal should be generated for the given sales process. 
Activities 
For the system to recognize that a sales process is subject to electronic nota fiscal (NF-e) 
processing, you need to assign an electronic NF type, based on your requirements, in one of 
the following activities in Customizing for Cross-Application Components, under General 
Application Functions  Nota Fiscal  Sales and Distribution – Billing Documents  
 Assign Nota Fiscal Type to Sales Document Types 
 Define NF Type Redetermination per Business Place 
 Define NF Type Redetermination per Region 
If required, you can also redetermine the NF type at line-item level by implementing the 
Business Add-In in the activity BAdI: Redetermination of Nota Fiscal Type per Line Item 
(under same path as above). 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 29 
 Customizing NF Type Determination for Mixed 
Scenarios 
You need to make the settings described below if your company handles scenarios with 
mixed nota fiscal(NF) types. The settings below enable you to specify whether the user can 
decide what type of NF should be created – conventional NF or NF-e – when you enter an 
incoming NF for which a reference NF already exists, during goods movement transactions. 
For more information, see User Decision in Creation of Incoming NF in Mixed Scenarios 
[Page 84]. 
Activities 
Make settings related to NF type determination as follows: 
 NF type redetermination for goods movements 
You assign an NF type for processing of NF-e to a combination of plant and 
movement type. To do so, in Customizing for Cross-Application Components, choose 
 General Application Functions Nota Fiscal Electronic Notas Fiscais (NF-e) 
Define NF Type Redetermination for Goods Movements and maintain entries for 
plant, movement type, and NF type, and select the User Decision checkbox. 
 
You have assigned NF types to movement types for normal NF processing in the 
Customizing activity Assign Nota Fiscal Category to Sales Document Types. 
When both activities are maintained, the system uses the following logic: 
1. User Decision checkbox is selected: A dialog box appears in which you 
specify which NF type to use (for a specific movement type). 
2. User Decision checkbox is not selected: The settings in the Customizing 
activity Define NF Type Redetermination for Goods Movements overrule 
the settings made in the Customizing activity Assign Nota Fiscal 
Category to Sales Document Types. 
 NF type determination for vendors 
You assign an NF type for processing of NF-e to a combination of vendor, plant, and 
movement type. You only need to maintain this activity if, in the case of mixed 
scenarios, users should be able to decide on the type of NF to be created based on 
the vendor. If this is not required, only maintain the activity Define NF Type 
Redetermination for Goods Movements. 
In Customizing for Cross-Application Components, choose General Application 
Functions Nota Fiscal Electronic Notas Fiscais (NF-e) Define NF Type 
Determination for Vendors and maintain the entries for plant, movement type, 
vendor, and NF type, and select the User Decision checkbox. 
You can also maintain this activity generically by only specifying movement type and 
vendor without specifying the plant. 
 
If the system finds an entry in vendor, plant, and movement type in the activity 
Define NF Type Determination for Vendors, these values overrule any entries 
made in the activities Assign Nota Fiscal Category to Sales Document Types and 
Define NF Type Redetermination for Goods Movements. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 30 
 Customizing BCB Country Codes 
You need to map the BCB country codes defined by the Central Bank of Brazil (BCB) to the 
ISO country codes used by your SAP system, so that your system can determine the correct 
country code and set it for XML files. 
Activities 
Make the necessary settings in Customizing for Financial Accounting (New) under General 
Ledger Accounting Periodic Processing Report Statutory Reporting: Brazil SPED 
Reporting Assign BCB Country Codes to ISO Country Codes . 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 31 
 Customizing for SCAN 
When there are technical problems with the SEFAZ server in your region (state) and the 
government activates SCAN, you can send your NF-e to the SCAN server for authorization. 
To enable this switch to the alternative SCAN server, you must make the following settings in 
Customizing. 
Activities 
 You have activated automatic server determination for NF-e processing at the 
business-place level. 
To do so, in Customizing for Cross-Application Components, choose General 
Application Functions Nota fiscal CNPJ Business Place Define Business Places 
. For the relevant company code and business place, on the NFe Configuration 
screen, select the Activate Automatic Server Determination for NF-e Processing 
checkbox. 
 
If you do not use the SAP BusinessObjects Nota Fiscal Eletrônica or want to 
overwrite the setting for server availability, you can do so by implementing a 
Business Add-In. 
To do so, in Customizing for Cross-Application Components, choose General 
Application Functions Nota fiscal Electronic Notas Fiscais (NF-e) Business 
Add-Ins BAdI: General Enhancements for NF-e . Create an implementation 
for the Get Availability of Server (get_server) method. 
 You have defined NF-e forms for SCAN processing. The series in these forms must 
be in the number range from 900 to 999. 
To do so, in Customizing for Cross-Application Components, choose General 
Application Functions Nota fiscal Output Define Forms . 
 You have maintained the form for SCAN in the nota fiscal type. 
To do so, in Customizing for Cross-Application Components, choose General 
Application Functions Nota fiscal Define Nota Fiscal Types . Open the Details 
for the relevant nota fiscal type. In the Other group box, enter the NF-e SCAN form. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 32 
 Customizing for ICMS Exemption Reasons 
If items in an NF-e have a tax situation that is exempted from ICMS, Brazilian law requires 
that the reason for the ICMS exemption is included in the XML of the NF-e. To enable the 
system to include the correct ICMS exemption reason for each item in the XML, you must 
map the possible reasons to the relevant CFOPs in Customizing. 
Activities 
In Customizing for Cross-Application Components, choose General Application Functions 
Nota Fiscal CFOP Codes Define CFOP Codes and Assign Version , and make 
settings as required. For more information, see the field help of the Reason for ICMS 
Exemption field in the system. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 33 
 Business Add-Ins (BAdIs) for NF-e 
You can enhance the standard electronic nota fiscal (NF-e) process by implementing the 
following Business Add-Ins (BAdIs): 
 BAdI: General Enhancements for NF-e (CL_NFE_PRINT). 
This BAdI allows you to implement, for example, the following additional functions: 
o Allow printing of contingency NF-e 
o Block the sending of cancellation requests for certain NF-e 
o Fill header and item data that is not provided by SAP in the XML file 
o Trigger the automatic printing of the NF-e upon receipt of authorization from 
the authorities 
o Check which server, SEFAZ or SCAN, is available 
o Exclude certain NF-e from batch processing 
o Sort NF-e for batch processing 
o Change cancellation date for NF-e from material documents 
 BAdI: Check Period of Notas Fiscais (J_1BNF_CHECK_PERIOD). 
This BAdI allows you to check if the posting period for an NF-e has been closed. 
For more information about the functions offered by these BAdIs, see the system 
documentation. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 34 
 Interfaces for Communicating with Messaging 
System 
If you use the SAP BusinessObjects Nota Fiscal Eletrônica solution for your communication 
with the tax authorities, the integration between the back-end system and the messaging 
system in the SAP BusinessObjects Nota Fiscal Eletrônica solution is largely automatic. If you 
choose to use SAP BusinessObjects Nota Fiscal Eletrônica, you must activate it in your SAP 
ERP system. For more information, see Activating SAP BusinessObjects Nota Fiscal 
Eletrônica. For more information about the solution itself, see http://help.sap.com/grc 
SAP BusinessObjects Nota Fiscal Eletrônica System Administrator's Guide . 
The following documentation also describes aspects of SAP back-end functions that are 
relevant for communication between the back-end and other messaging systems. If you 
choose to use a messaging system other than SAP BusinessObjects Nota Fiscal Eletrônica, 
your messaging system must be set up to take these aspects into account. 
More Information 
For information about interfaces that are specific to electronic correction letters (CC-e), see 
Interfaces forElectronic Correction Letters (CC-e) [Page 90]. 
http://help.sap.com/grc
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 35 
 Activating SAP BusinessObjects Nota Fiscal 
Eletrônica 
Procedure 
Using SAP BusinessObjects Nota Fiscal Eletrônica as your messaging system to 
communicate with tax authorities provides you with a high level of automation for processing 
both incoming and outgoing electronic fiscal documents, such as NF-e and CT-e. To activate 
this SAP solution as your messaging system for your SAP ERP system, proceed as follows: 
1. In your SAP ERP system, in Customizing for Cross-Application Components, choose 
 General Application Functions Nota fiscal CNPJ Business Places Define 
Business Places . 
2. For the relevant company code and business place, choose Electronic Fiscal 
Document Configuration. 
3. Select the SAP Mess. Systm (SAP Messaging System Active) checkbox. 
More Information 
For more information about SAP BusinessObjects Nota Fiscal Eletrônica, see 
 http://help.sap.com/grc SAP BusinessObjects Nota Fiscal Eletrônica System 
Administrator's Guide . 
http://help.sap.com/grc
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 36 
 Interface for Outbound Messages 
The SAP back-end system asynchronously sends messages via the outbound interface RFC 
call to XI for Nota Fiscal Electronica (J_1B_NFE_XML_OUT) function module. This interface 
provides the NF-e data as required by the authorities according to the XML layout that is 
currently valid, together with the NF-e document status, NF-e system communication status, 
and contingency indicator. 
Then, in the messaging system, the NF-e data must be mapped to the layout structure of the 
XML file. 
The NF-e document status and the NF-e system communication status contain information 
about the type of outbound message, which could be one of the following: 
1. Request for authorization 
2. Submission of a contingency NF-e 
3. Request to authorize the cancellation of an authorized NF-e 
4. Request to skip the number of a rejected NF-e 
The different types of outbound messages are identified by the value of the following interface 
fields as listed in the table below: 
 XML_IN-DOCSTAT 
 XML_IN-SCSSTAT 
 XML_IN-CONTING 
Message 
DOCSTA
T 
SCSSTA
T 
CONTIN
G 
(1) Request for authorization initial 0 initial 
(2) Submission of a contingency NF-e initial 0 X 
(3) Request to authorize the cancellation of an 
authorized NF-e 
1 1 initial 
(4) Request to skip the number of a rejected NF-e 2 3 initial 
More Information 
For information about the outbound interface specific to electronic correction letters (CC-e), 
see Interface for Outbound CC-e Messages [Page 91]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 37 
 Interfaces for Inbound Messages 
Your SAP ERP back-end system can receive messages via the following inbound interfaces 
(function modules): 
 Inbound XML - NFe (J_1B_NFE_XML_IN) – for single NF-e processing 
 Process XML inbound for multiple items (J_1B_NFE_XML_IN_TAB) – for batch NF-e 
processing 
 Inbound XML - NF-e Gap Skipping Request Status Update 
(J_1BNFENUMGAP_STATUS_RFC) – for batch NF-e processing (see Check NF-e 
Number Range Gaps [Page 86]) 
The SAP back-end system requires a unique code that identifies the type of inbound 
message. These codes are defined in the back end. The inbound interfaces can process any 
of the following message types: 
Message Code Message Type 
1 Authorization of NF-e 
2 Rejection of NF-e 
3 Denial of NF-e 
4 Authorization to Cancel an Authorized NF-e 
5 Authorization to Cancel a Rejected NF-e (Skipping) 
6 Rejection of a Request for Cancellation 
7 Rejection of a Request for Skipping 
8 Authorization to Skip an NF-e with Validation Error 
9 Rejection of a Request for Skipping an NF-e with Validation Error 
Mandatory importing parameters are: 
 Protocol number 
 SEFAZ status code 
 Message type 
In addition, the access key of the NF-e (the number that uniquely identifies an NF-e Brazil-
wide) must be passed to the back end. Alternatively the SAP internal NF-e document number 
can be passed (if the NF-e was created by the SAP back-end system, the internal document 
number is stored in the random-number field of the access key). 
 
If the NF-e has an error in the messaging system, it is possible to display the reason for 
such an error in the NF-e Monitor. For more information on how to handle errors in the 
messaging system, see Requesting NF-e Authorization [Page 43]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 38 
More Information 
For information about the inbound interface specific to NF-e events, see Interface for Inbound 
NF-e Event Messages [Page 92]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 39 
 Interfaces for Messaging-System Actions 
The messaging system can perform the following actions in the SAP back-end system, which 
are described below: 
 Activate and deactivate contingency on business-place level 
 Set the messaging-system status in the NF-e Monitor 
 Request NF-e data 
 
The SAP back-end system assumes an NF-e message reaches the authorities once it 
has successfully been sent to the messaging system. The messaging system must not 
change the content of the message or switch an NF-e received from the back end to 
contingency, as this would lead to an inconsistency of data between the back end and the 
tax authorities. 
Activate/Deactivate Contingency 
The messaging system can activate and deactivate contingency in the SAP back-end system 
on business-place level. This is possible via the remote-enabled NF-e: Switch Contingency 
Mode On (J_1B_NFE_CONTINGENCY_SET) function module. 
In the interface, the messaging system must specify the fields LAND1, BUKRS, and 
BRANCH. The field REGIO must remain initial. The messaging system may select or deselect 
the indicator AS_OUT. The back end interprets this indicator. If it is set, the back end 
switches to contingency for any subsequent NF-e posting. The indicator can be automatically 
deactivated through the messaging system or manually by a user with the required 
authorization profile (see Activating Contingency Processing for Business Place [Page 64]). 
If the messaging system remotely calls the function module J_1B_NFE_CONTINGENCY_SET, 
note that the importing parameter IV_FIRE_COMMIT must be set to X. 
Set the Messaging-System Status 
The NF-e Monitor displays a messaging-system status. The messaging system can set the 
following status values in the back end by means of the xNFe sets NF-e Status in Back End 
(J_1B_NFE_SET_STATUS_IN_BACKEND) function module: 
Message Type Status Description 
A Request for authorization received by MS 
B Cancellation request received by MS 
C Skipping request received by MS 
G Error from MS: Request cannot be sent to authorities 
V Internal validation error returned from MS 
D Error from MS: Data inconsistency between ERP and MS 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 40 
 
Once the messaging-system status has been set for a message, this means that the 
message has arrived at the messaging system. From this moment on, the processor can 
no longer resend the respective message requesting authorization, cancellation, or 
skipping. The processor can only request cancellation again for an NF-e that has been 
rejected by the tax authorities and accepted in the NF-e Monitor (the system 
communication status in the NF-e Monitor is 8). 
Request NF-e Data 
The messaging system can request NF-e data from the back end using the NF-e: Messaging 
System Requests Data (J_1B_NFE_MS_REQUESTS_DATA) function module. The following 
request type is supported: 
Request Type Request Description 
1 Send complete NF-e data 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 41 
 Business Transactions 
You need to follow special procedures when handling incoming and outgoing electronicnotas 
fiscais (NF-e). These are described in the following documentation. 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 42 
 Outgoing Electronic Notas Fiscais 
If your system is configured accordingly (mainly, the nota fiscal types are set as electronic), 
the system generates an electronic nota fiscal (NF-e) in processes in Materials Management 
(MM) and Sales and Distribution (SD) and stand-alone creation using the NF Writer. 
Before you can print and send the NF-e, you need to request and receive authorization from 
the tax authorities (see Requesting NF-e Authorization [Page 43]). 
The government allows for a special contingency processing in case you cannot wait for 
authorization and you must continue with your operations: you can switch an individual NF-e 
[Page 59] already posted under normal conditions to contingency, or activate central 
contingency processing [Page 62] for your entire region or business place. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 43 
 Requesting NF-e Authorization 
Before you can print and send the printed version of the electronic nota fiscal (called a 
DANFE) along with the goods, you need authorization from the tax authorities. 
Prerequisites 
You have made the required Cusotmizing settings. 
Process 
1. An electronic nota fiscal (NF-e) is created in one of the following ways: 
1. The system automatically generates an NF-e from applications in Materials 
Management (MM) and Sales and Distribution (SD) as described in Nota 
Fiscal. 
2. You create an NF-e manually using the Nota Fiscal Writer. 
When the NF-e is created, the system makes an entry in the NF-e database. You can 
monitor the status of the NF-e using the NF-e Monitor (see step 4). 
2. The system sends the NF-e to the messaging system (see Customizing for 
Numbering and Sending NF-es to the Messaging System [Page 15] for different 
options) that runs a validation check on the NF-e. If the messaging system finds an 
error in the NF-e, it returns the corresponding status (see Interfaces for Messaging-
System Actions [Page 39] for possible statuses) to the back-end system 
In case of a validation error (MSS = V), check the log of the NF-e in the monitor and 
decide on one of the following options: 
o Reset the status of the NF-e by choosing NF-e Reset NF-e Status in 
the NF-e Monitor; correct the NF-e data; and resend the NF-e by choosing 
 NF-e Resend . 
o Send a skip request to the authorities to cancel the NF-e. 
In case of another message system error (MSS = G or D), have your system 
administrator check the error in the messaging system. 
3. If no error is found in the file, the messaging system sends an outbound message to 
the tax authorities to request authorization for the NF-e. 
4. You check the status of NF-e using the NF-e Monitor. 
5. The tax authorities send one of the following responses (to the initial request for 
authorization) via an inbound message: 
0. Authorized 
The tax authorities send the authorization in form of a 15-digit numeric code, 
which the system updates in the NF-e database. You can see it in the 
Protocol Number field, via the NF-e Monitor or via the Nota Fiscal Writer 
(under NF-e Data). The system also updates the corresponding document 
status, system communication status, and official status code (and status 
code description, if maintained). 
1. Rejected 
conv.sap.45F8518CE1E304A9E10000000A114A6B.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 44 
This status indicates an inconsistency in the NF-e data, which you must 
correct in the NF database. You have two options: You can reset the status 
of the NF-e by choosing NF-e Reset NF-e Status in the NF-e Monitor; 
correct the NF-e data; and resend the NF-e by choosing NF-e Resend 
. Alternatively, you can send a skip request to the authorities to cancel the 
NF-e, as follows: 
1. Request cancellation of the original NF-e (see User Actions for 
Individual NF-e [Page 55]). 
2. Wait for a response from the tax authorities. 
3. If the tax authorities authorize your request to cancel the NF-e, the 
system cancels the source document (and automatically cancels the 
corresponding NF-e) or the standalone NF-e created in the Nota 
Fiscal Writer. 
It is unlikely that the tax authorities would reject your request to 
cancel the NF-e, but if this does occur, repeat your skipping request. 
4. Create a new source document or standalone NF-e, which has to go 
through the normal authorization process. 
5. After you receive authorization for the new NF-e, you can print the 
new NF-e. 
2. Denied 
This status indicates a serious problem (for example, taxes have not been 
paid), and you need to contact the tax authorities to find out why they denied 
the authorization. In this case, you must also cancel the original NF-e (see 
User Actions for Individual NF-e [Page 55]), but you do not need to request 
authorization to cancel. You cancel the source document or standalone NF-e. 
 
Note that it is possible that you do not receive a timely response from the 
tax authorities because, for example, the connection to your messaging 
system or the authorities’ server is down, and you cannot wait for 
authorization or it would interrupt your business. In such cases, the 
government allows you to continue your business process by processing 
in contingency mode. You are allowed to: 1) switch individual NF-e 
already posted under normal conditions to contingency, or 2) activate 
contingency centrally for your whole business place or region, after which 
all newly posted NF-e are posted directly under contingency. 
6. After the NF-e is authorized, you can print and send it with the goods. 
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 45 
 NF-e Monitor 
You use the NF-e Monitor to check the status of your electronic notas fiscais (NF-e). Based 
on the current status of a given NF-e, you can carry out several actions, which are described 
in the following documentation. 
Integration 
When you post the relevant document that triggers the automatic creation of the nota fiscal, 
the system checks your configuration settings (nota fiscal type) and creates either a 
conventional nota fiscal or an NF-e. If the system creates an NF-e, it stores all NF-e-specific 
data in the J_1BNFE_ACTIVE table, and makes this information available to you via the NF-e 
Monitor. The NF-e Monitor also shows the data of NF-e created manually with the Nota Fiscal 
Writer. 
Prerequisites 
You have appropriate authorization for carrying out the various user actions in the NF-e 
Monitor. 
Features 
The NF-e Monitor: 
 Shows the status [Page 47] at a glance – whether you must take action 
 Shows all relevant data for an NF-e [Page 50] (current data as well as NF-e history) 
 Offers user actions possible for each NF-e [Page 55], depending on its status 
 Allows you to activate or deactivate central contingency processing [Page 62] for 
entire regions or business places 
 Enables you to check the status of the messaging system, by choosing 
 Contingency Check MS Connection 
 Enables you to create and view NF-e events, for example, electronic correction letters 
(CC-e) for authorized NF-e. For more information, see Electronic Correction Letters 
(CC-e) [Page 88]. 
Activities 
On the SAP Easy Access screen, choose Logistics Central Functions Country-Specific 
Functions Brazil Nota Fiscal NF-e Monitor and select NF-e by specifying selection 
criteria on the selection screen. Enter, for example, the following kinds of selection criteria: 
 NF-e data, such as the date of NF-e creation or the document status 
 Access key fields, such as the CNPJ or posting year 
 Company data, such as the company code or business place 
 NF-e event data, such as the internal event code or the document status of the NF-e 
event 
The outputscreen displays all NF-e that have been created fitting your selection criteria. From 
there, you monitor the NF-e as required. 
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
conv.sap.465D582EDCA70DB7E10000000A1553F6.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 46 
More Information 
For an overview of the most common processes and how the process steps are reflected in 
the NF-e Monitor, see Statuses in NF-e Monitor [Page 68]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 47 
 Checking NF-e Status 
The NF-e Monitor enables you to see at a glance the current status for each NF-e entry by 
means of the action status icon in the first column. Together with the entry in the second 
column, Required Process Step, these values guide you through any necessary steps that 
are required for the NF-e to be processed. 
Activities 
Check the status of your NF-e as follows: 
Action Status Icon/Meaning Required Process Step 
(In Process) 
Blank = No manual action required 
A = Numbering will be done via batch report – no action 
required 
B = Sending will be done via batch report – no action 
required 
(Completed) C = Completed 
(In Process; User Action 
Required). User must trigger 
the next step. 
2 = Cancel Source Document 
When the server at the tax authorities (SEFAZ or SCAN) is 
having performance problems, you can react by doing one 
of the following. 
 Cancel the NF-e prior to receiving authorization 
from the tax authorities (in the NF-e Monitor, choose 
 NF-e Cancel Prior to Author ) 
 Switch the NF-e to contingency mode (in the NF-e 
Monitor, choose the Contingency pushbutton) 
The NF-e then has the value 2 – Cancel Source 
Document as the required process step in the NF-e 
Monitor. The source document (that is, for example, the 
material document) must be canceled next. It is also 
possible to configure your system so that it automatically 
cancels source documents. For more information, see 
Customizing for Automatic Cancellation of Source 
Documents [Page 26]. 
3 = Send NF-e to the tax authorities 
For example, if you posted NF-e under central contingency 
(see Central Contingency Processing [Page 62]). 
6 = Enter protocol number (see Incoming Electronic Notas 
Fiscais [Page 81]) 
7 = Request authorization from the authorities to cancel/skip 
the NF-e 
8 = Internal validation error in messaging system. Send 
again! 
conv.sap.468BDEB8336F71BDE10000000A1553F6.IWB_EXTHLP
conv.sap.468BDEB8336F71BDE10000000A1553F6.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 48 
Action Status Icon/Meaning Required Process Step 
9 = Set NF-e number and send to the Tax Authorities 
0 = Set NF-e number and send to the Tax Authorities via 
Batch report 
(Error/Inconsistency; User 
Action Required) . User must 
trigger the next step. 
1 = Cancel NF-e and post new one/Reset NF-e and send 
again 
This is for the case that the request for authorization was 
rejected or denied (see Requesting NF-e Authorization 
[Page 43]). 
4 = Request to cancel rejected; check the reason 
5 = Request to skip rejected; check the reason 
 
Check to see if a log [Page 49] exists, which may provide additional information about the 
status. 
You can also check the history of the individual NF-e by clicking on the document number. 
The monitor displays the history at the bottom of the screen. 
Note that although you perform the required action, the status does not change to C 
(Completed) until the entire process is completed, as illustrated in the example below. 
Example 
You switch an individual NF-e to contingency processing. You manually cancel the NF-e by 
canceling the corresponding Sales and Distribution (SD) document. The system displays a 
yellow exclamation mark in the Action Status column and 2 (Cancel NF-e) as the required 
process step. Although you cancel the corresponding SD document in the back-end system, 
the process step remains as 2 and the corresponding action status icon remains a yellow 
exclamation point until you receive the necessary cancellation authorization from the tax 
authorities. After you receive this authorization, the process is completed. The system 
updates the process step to C and changes the action status to the flag icon. 
conv.sap.465AD8D8ACC851EAE10000000A114A6B.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 49 
 Log for Electronic Fiscal Documents 
A collection of error or warning messages that the system issues automatically for actions 
related to an electronic fiscal document (such as an NF-e or CT-e), for example, when the 
system identifies an invalid user action. 
The Monitor displays the log status in the third column of the upper section of the output 
screen. A red flag icon means that there are log entries for this document. Click on the flag 
and you branch to the log entries. 
Once you have completed the required actions, you can delete the log entries by choosing 
 Fiscal Document Delete Log Entries . 
Example 
The system records an error entry in an NF-e log in the following cases: 
 If you try to carry out an inconsistent action, for example, switch to contingency when 
you have already switched to contingency processing 
 If you get an inbound message that is inconsistent, for example, if you receive two 
authorization messages for the same NF-e, or if you receive cancellation 
authorization and you did not request it 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 50 
 NF-e Data 
The NF-e Monitor displays the data of electronic notas fiscais (NF-e) on the output screen, as 
listed below. The upper list provides an overview of all NF-e you have selected, with the 
current status of each NF-e. In the lower list you can view one of the following: 
 History of an individual NF-e (see the Single NF-e History section) 
 History of NF-e events for individual NF-e (see Event History for Single NF-e 
section) 
You can personalize both of these lists using the standard functions of the SAP List Viewer. 
 
You can branch to the NF-e itself by selecting an entry from the NF-e Overview with 
Current Status list and choosing NF-e Display , or by clicking on the NF-e number 
from this list. 
In the following table, you find an explanation of the columns that can be displayed in the NF-
e Overview with Current NF-e Status: Columns list of the NF-e Monitor: 
Column Meaning 
Action Status 
Graphically displays if action is required (see Checking NF-e 
Status [Page 47]) 
NF-e: Required 
Process Step 
Describes what action must be taken (see Checking NF-e Status 
[Page 47]) 
Log 
Shows if there are log entries for an NF-e (see Log for Electronic 
Fiscal Documents [Page 49]) 
Document Number Displays the internal nota fiscal document number 
NF-e Events 
Graphically displays if NF-e events have been created for this NF-
e. By clicking on the icon in this column, you can view the NF-e 
event history for this NF-e in the lower list. 
NF-e: Document Status 
Displays the current document status, which is relevant for 
statutory reporting. Values can be, for example, authorized, 
rejected, or denied. 
NF-e: System 
Communication Status 
Displays the system communication status (such as blank (not 
sent) or 6 (request to cancel rejected)); this value is not relevant 
for statutory reporting 
NF-e: Messaging 
System Status 
After an NF-e has been sent for authorization from your SAP ERP 
system to the messaging system, shows the status sent back by 
your messaging system (such as A - Request for 
authorization received by MS) 
NF-e Switched to 
Contingency 
If set to X, the NF-e was posted normally and later switched 
manually to contingency (see Contingency Processing of NF-e 
Posted in Non-Contingency Mode [Page 59]) 
NF-e Posted under If set to X, the NF-e was posted under central contingency (see 
conv.sap.46259D780C2C4252E10000000A1553F6.IWB_EXTHLP
conv.sap.46259D780C2C4252E10000000A1553F6.IWB_EXTHLPconv.sap.46259D780C2C4252E10000000A1553F6.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 51 
Column Meaning 
Contingency NF-e Processing under Central Contingency [Page 62]) 
Canceled 
If set to X, the NF-e was canceled (either automatically after 
canceling the source document, or manually using the NF Writer) 
Canceled Prior to 
Authorization 
If set to X, a user has set this NF-e for cancellation after an 
authorization request was sent to the tax authorities. The NF-e 
must be cancelled by canceling the source document (see the 
information about process step 2 in Checking NF-e Status [Page 
47]). 
Cancellation 
Synchronization 
If set to X, the NF-e was canceled and the system determined that 
the source document for the NF-e cannot be canceled 
automatically. The source document has to be canceled manually 
(see the information about process step 2 in Checking NF-e 
Status [Page 47]). 
NF-e: Status Code 
Shows the official status code used by the tax authorities. This 
corresponds to the type of NF-e response message received from 
the tax authorities (such as Authorization). 
Printed If set to X, the NF-e was printed 
Direction Movement 
Shows the direction of the goods movement, such as incoming or 
outgoing returns of stock transfers 
Nota Fiscal Form 
Shows the NF-e form, which defines the model and series used to 
print the NF-e (such as NF55) 
Region of NF-e Issuer 
Shows the region of the NF-e issuer, as contained in the NF-e 
access key 
Year of NF-e Document 
Date 
Shows the year when the NF-e is posted, as contained in the NF-e 
access key 
Month of NF-e 
Document Date 
Shows the month when the NF-e is posted, as contained in the 
NF-e access key 
CNPJ Number of NF-e 
Issuer 
Shows the CNPJ number of the NF-e issuer, as contained in the 
NF-e access key 
Nota Fiscal Model Shows the model used for printing the NF-e (model 55) 
Series 
Shows the series, which groups notas fiscais for sequential 
numbering (a company can use different series or just one) 
Nine-Digit NF-e 
Number 
Shows the nine-digit NF-e number, as contained in the NF-e 
access key 
Random Number of 
NF-e Access Key 
For outgoing NF-e, contains the internal document number 
created by the SAP back-end system; for incoming NF-e, shows a 
randomly created number filled by the issuing party 
Check Digit for NF-e 
Access Key 
Shows the last digit of the NF-e access key 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 52 
Column Meaning 
Protocol Number 
Shows the code (protocol number) that the authorities issue with 
each response message. 
Note that the upper list stores the protocol number that was issued 
for the initial response, and the lower list shows the protocol 
number that was received with each message. 
Processing Date 
Shows the date element of the timestamp that the relevant tax 
authority (such as SEFAZ) issues with each response message. 
Processing Time 
Shows the time element of the timestamp that the relevant tax 
authority (such as SEFAZ) issues with each response message. 
Created On Shows the date the NF-e was created 
Changed On Shows the date that the status of the NF-e changed 
Changed At Shows the time that the status of the NF-e changed 
Changed By 
Shows the user who performed an NF-e action that leads to a 
status change in the NF-e document status, system 
communication status, or the canceled indicator 
Company Code Shows the company code in which the NF-e was created 
Business Place Shows the business place in which the NF-e was created 
Shipping 
Point/Receiving Point 
Shows the physical location from which the related item was 
shipped 
Partner ID 
Identifies the partner related to the NF-e, such as the customer or 
vendor number 
NF-e Reason for 
Cancellation/Skipping 
Shows the technical key for the reason to cancel or skip an NF-e 
(see Customizing Cancellation Reasons [Page 21]) 
NF-e: Canc/Skip 
Description 
Shows the reason for cancelling or skipping an NF-e 
Created By Identifies the user who first created the NF-e 
RFC Execution 
Shows how the NF-e numbering and the RFC execution for the 
creation of the XML file are carried out 
Type of Environment 
Identifies the type of system used by the tax authorities for the 
response message. The two scenarios are production and 
homologation (test). 
SEFAZ Server Active 
Shows that the SEFAZ server was active when the tax authorities 
processed the NF-e 
SCAN Server Active 
Shows that the SCAN server was active when the tax authorities 
processed the NF-e 
Time Stamp Shows the Universal Time Coordinated (UTC) time stamp for the 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 53 
Column Meaning 
response message from the tax authorities. The processing time 
and processing date are derived from this time stamp. 
NF-e Issuing Type 
Indicates how the NF-e was issued: with or without contingency 
processing (normal processing) 
NF-e Contingency 
Reason 
Shows the two-character internal code for the contingency reason 
that you entered in Customizing. For more information, see 
Customizing for Contingency Processing [Page 19]. 
NF-e Contingency 
Description 
Shows the descriptive text for the contingency reason that is 
specified by the tax authorities. The NF-e Monitor displays the 
description in up to four consecutive description fields, 
corresponding to the four lines of text that can be entered in the 
contingency reason description in Customizing. For more 
information, see Customizing for Contingency Processing [Page 
19]. 
Contingency Date 
Shows the date when the processing mode was switched to 
contingency, converted to local date of the NF-e issuer 
Contingency Time 
Shows the time when the processing mode was switched to 
contingency, converted to local time of the NF-e issuer 
Time Zone 
Shows the time zone of the issuing company’s business place, 
which was used to convert the contingency date and time to the 
local date and time of the NF-e issuer 
Single NF-e History 
When you click on the document number for an NF-e, the lower table displays selected fields 
from the upper table, plus descriptions of the document status, system communication status, 
and the status code (if configured). 
Note that the lower list stores the protocol number that was received with each message, 
while the upper list stores the protocol number that was issued for the initial response. 
Event History for Single NF-e 
If an icon is displayed in the NF-e Events column for an NF-e, NF-e events have been created 
for this NF-e. When you click on the icon, the lower table displays the data for all NF-e events 
that have been created for this NF-e. This data includes the official NF-e event code (which 
indicates the type of NF-e event) and the status of the NF-e event. You can view the actual 
text of the NF-e event by clicking on the document icon in the Details column. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 54 
 NF-e Access Key 
Definition 
A 44-digit key that uniquely identifies an electronic nota fiscal (NF-e). 
Use 
When an NF-e is posted – incoming [Page 81] or outgoing [Page 42], created manually by 
you or automatically by the system – the system generates the access key and displays it in 
the Nota Fiscal Writer, on the NF-e Data tab. 
You can use the access key when you communicate to the tax authorities about a particular 
NF-e. 
Structure 
The access key comprises the following elements: 
 Region of the NF-e issuer 
 Year of NF-e posting date 
 Month of NF-e posting date 
 CNPJ number of NF-e issuer 
 NF model 
 NF series 
 Nine-digit NF-e number 
 Random number 
 Check digit 
The system displays the individual elements of the access key in the corresponding fields in 
the NF-e Monitor. For more information, see NF-e Data [Page 50]. 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 55 
 User Actions for Individual NF-e 
The NF-e Monitor allowsusers to carry out the following actions for individual electronic notas 
fiscais (NF-e), based on the current status of the NF-e. 
Prerequisites 
You have assigned the appropriate authorizations. 
Activities 
Select a line from the NF-e Overview with Current NF-e Status table and choose the actions 
as follows: 
In the NF-e menu, 
choose this entry 
When you want to perform this action 
Display 
Display the NF-e document in the Nota Fiscal Writer. 
You can also branch to the Nota Fiscal Writer by choosing the NF-e 
Document pushbutton. 
Switch to Conting. 
Switch an NF-e posted under normal conditions to contingency 
processing. 
See Contingency Processing of NF-e Posted in non-Contingency Mode 
[Page 59]. 
Reverse 
Contg/CnclPA 
Reverse the contingency processing for an NF-e or the cancellation of 
an NF-e prior to authorization. Note the following conditions for using 
this option: 
 You can only reverse the contingency processing for NF-e that 
you have manually switched to contingency by choosing 
Switch to Conting. 
 You can only reverse cancellation prior to authorization if the 
source document has not been canceled. 
The system performs checks to ensure that status-relevant actions 
have not occurred that prevent reversal. When you reverse 
contingency or cancellation prior to authorization, the system resets the 
status of the NF-e to its previous status. 
Request 
Cancellation 
Request authorization from the tax authorities to cancel the NF-e. 
See NF-e Cancellation [Page 57]. 
Request Canc. 
Again 
Request cancellation of an NF-e again, if you received a prior rejection. 
Reset NF-e Status 
Reset the status of an NF-e that received a rejection or a validation 
error. 
Set NF-e Number 
Set the number for individual NF-es. 
See Customizing Numbering and Sending NF-e to the Messaging 
System [Page 15]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 56 
In the NF-e menu, 
choose this entry 
When you want to perform this action 
Send 
Send NF-e to the tax authorities in the case it has not been sent yet 
If the system communication status is not sent (for example, if the 
connection to the messaging server is down), you need to send it. A 
typical example is when an NF-e is posted under central contingency 
(see NF-e Processing under Central Contingency [Page 62]). 
Resend 
Resend an NF-e. 
You can resend an NF-e request for authorization if all of the following 
conditions are met: 
 The system communication status is Sent. 
 The messaging system status is not A(receipt of request 
confirmed). 
 The document status is initial (no response from the tax 
authorities yet). 
Delete Log Entries 
Delete the log entries for the NF-e 
See Log for Electronic Fiscal Documents [Page 49]. 
Cancel Source 
Doc. 
Cancel the source document for an NF-e after you have received 
authorization for cancellation from the tax authorities or when you 
switch an NF-e to contingency. For more information, see NF-e 
Cancellation [Page 57]. 
Accept Canc. 
Reject. 
Accept the rejection (by the tax authorities) of a request to cancel or 
skip an NF-e 
See NF-e Cancellation [Page 57]. 
Cancel Prior to 
Auth 
Cancel an NF-e after sending an authorization request but before 
receiving the response. For more information, see NF-e Cancellation 
[Page 57]. 
 
conv.sap.465D582EDCA70DB7E10000000A1553F6.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 57 
 NF-e Cancellation 
You cancel an electronic nota fiscal (NF-e) in the following cases, for which you need to 
request authorization from the tax authorities (except as noted): 
 You want to cancel an NF-e that has already been authorized by the tax authorities. 
 You have received the Rejected response from the tax authorities (see step 5b of 
Requesting NF-e Authorization [Page 43]), and you therefore need to cancel the 
original NF-e. 
In the case of a rejection, you must cancel the original NF-e and create another NF-e. 
The tax authorities refer to this processing as “skipping”, since an NF-e number, 
which is normally sequential and without gaps, is being skipped. 
 You have received the Denied response from the tax authorities (see step 5c of 
Requesting NF-e Authorization [Page 43]), and you therefore need to cancel the 
original NF-e. 
In the case of a denial, you do not need to request cancellation. 
 You cancel the normal NF-e as part of contingency processing for individual NF-e 
(see Contingency Processing of NF-e Posted in non-Contingency Mode [Page 59]). 
 You cancel a contingency NF-e (either the contingency NF-e that is part of the 
switching process, or a contingency NF-e that was created under central 
contingency). 
 You have sent a request for NF-e authorization but want to cancel the NF-e before 
you receive the response. For more information, see the Cancellation Prior to 
Authorization section in this document. 
Activities 
 
For a table overview of the steps involved in canceling an NF-e and the corresponding 
statuses set in the NF-e Monitor, see NF-e Monitor Statuses: Authorization with 
Subsequent Cancellation [Page 70] and NF-e Monitor Statuses: Rejection and 
Subsequent Skipping [Page 72]. 
You request cancellation of the NF-e in the NF-e Monitor (see User Actions for Individual NF-
e [Page 55]). On the subsequent screen, you must specify a reason for canceling the NF-e. 
The tax authorities respond to your request for authorization to cancel (or skip) an NF-e in 
one of the following ways: 
 Authorizes your cancellation request 
The system tries to cancel the NF-e and checks if the source document for the NF-e 
has also been canceled. 
o If the source document has been canceled, the system updates the NF-e 
status to Canceled and the process step is set to Completed. It is possible 
to configure your system so that it automatically cancels the source 
document in such situations. For more information, see Customizing for 
Automatic Cancellation of Source Documents [Page 26]. 
conv.sap.465AD8D8ACC851EAE10000000A114A6B.IWB_EXTHLP
conv.sap.465AD8D8ACC851EAE10000000A114A6B.IWB_EXTHLP
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 58 
o If the source document has not been canceled, the system indicates that the 
statuses of the NF-e have to be synchronized (action status is Synchronize 
Cancellation). After you synchronize the cancellation (for more 
information, see User Actions for Individual NF-e [Page 55]), the system 
updates the NF-e status to Canceled and the process step is set to 
Completed. 
 Rejects your cancellation request 
The system updates the NF-e status as follows: 
o System communication status: 6 (Request to Cancel Rejected) or 7 
(Request to Skip Rejected) 
o Required process step: 4 (Request to cancel rejected; check the 
reason) or 5 (Request to skip rejected; check the reason) 
o Action status: Error; user must trigger next step 
In this case, you must explicitly accept the cancellation rejection in the system (see 
User Actions for Individual NF-e [Page 55]). After you do so, the system updates the 
NF-e status to Completed, with system communication status 8 (Rejection to 
Cancel/Skip Accepted by User). 
If you do not agree with the rejection, contact the tax authorities. (Until you accept the 
rejection in the system, the NF-e has an error status and is not complete.) 
 
The following are exceptions for NF-e cancellation related to contingency cases: 
 A normal NF-e that was switched to contingency 
You can cancel such an NF-e in the system directly without having received an 
authorization from the tax authorities to cancel first. 
 A contingency NF-e 
You can cancel such an NF-e without prior authorization – by canceling the 
related billing document or material document in the respective transaction. To do 
this, you must have the 85 activity from the F_NFBAauthorization object 
assigned to you (see Assigning Authorizations for User Actions in NF-e Monitor 
[Page 16]). 
Cancellation Prior to Authorization 
It is also possible to cancel an NF-e after you request authorization but before you receive the 
response from the tax authorities. You might do this, for example, because you want to switch 
processing from the SEFAZ to the SCAN server to speed up authorization. You do so in the 
NF-e Monitor by selecting the NF-e and choosing NF-e Cancel Prior to Auth . For more 
information, see Checking NF-e Status [Page 47]. 
You can reverse a request for cancellation prior to authorization for an individual NF-e. The 
reversal is only possible if no status changes that would prevent the reversal have occurred in 
the meantime. See the relevant menu option in User Actions for Individual NF-e [Page 55]. 
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 59 
 Contingency Processing of NF-e Posted in Non-
Contingency Mode 
You have posted an electronic nota fiscal (NF-e) under normal conditions (non-contingency 
mode), but you have not received authorization from the tax authorities (for example, the 
authorities’ server is down), and you cannot send your goods with the required NF-e. The 
system enables you to switch such an NF-e posted under normal conditions to contingency 
processing, which allows you to print a contingency NF-e to send with your goods. 
The SAP back-end system allows you to switch to contingency processing if you have the 
appropriate authorization; there is no check for the reason of the switch. 
To ensure correct processing, you must follow the procedure described below. 
 
You can also reverse contingency processing for an individual NF-e that you manually 
switched to contingency processing. See the relevant menu option in User Actions for 
Individual NF-e [Page 55]. The reversal is only possible if no status changes that would 
prevent the reversal have occurred in the meantime. 
Prerequisites 
You can only switch an NF-e to contingency processing if the request for authorization has 
not been sent, or it was sent with no response received yet from the tax authorities. You can 
see this by checking the system communication status of the NF-e in the NF-e Monitor [Page 
45]; it must have the value blank (not sent) or 0 (sent). 
You have also made the required settings for printing configuration. 
Process 
 
For a table overview of the steps involved in this process and the corresponding statuses 
set in the NF-e Monitor, see Process Flow for NF-e Switched to Contingency [Page 76]. 
1. An NF-e is created, either automatically or manually. 
2. A request for authorization has either been a) not sent or b) sent with no response, 
either automatically or manually. 
3. You switch the NF-e to contingency processing (see User Actions for Individual NF-e 
[Page 55]). 
The system marks an X in the NF-e Switched to Contingency column and updates 
the system communication status to 5 (processing switched to contingency mode). 
4. You cancel one of the following documents as applicable: 
o The source document from the application (for example, the billing document 
in Sales and Distribution (SD)) 
The system automatically cancels the corresponding NF-e. 
o The source document is canceled automatically by the system. This triggers 
the automatic cancellation of the NF-e. For more information, see 
Customizing for Automatic Cancellation of Source Documents [Page 26]. 
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
conv.sap.4611BF38F2EA4F08E10000000A114A6B.IWB_EXTHLP
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 60 
o The standalone NF-e you created manually in the Nota Fiscal Writer 
In both cases, the system sets an X in the Canceled column in the NF-e Monitor after 
the corresponding NF-e is canceled. 
5. You create a document as follows: 
1. A new source document in the application, after which the system 
automatically generates the corresponding nota fiscal 
The printer determination controls whether an NF-e (model 55) or 
conventional NF (model 1/1A) is created and later printed. Note that to 
process a contingency nota fiscal as an NF-e, you must print the NF-e on 
security paper. 
If your configuration is set up that you print the contingency NF as a 
conventional NF, then you print it with the NF Writer as model 1/1A, and 
continue with step 8 below. 
2. A new NF-e manually in the Nota Fiscal Writer 
Create a new contingency NF-e as a copy from the NF-e switched to 
contingency by selecting the menu Nota Fiscal Contingency Copy 
Switched NF-e in the Nota Fiscal Writer and entering the document number 
to be used as a reference to the new contingency NF-e. 
 
You can also manually create a standalone NF-e in the Nota Fiscal 
Writer. You must then set the Posted Cont. indicator on the NF-e Data 
tab. 
6. In the NF-e Monitor, the newly created NF-e is identified as a contingency NF-e by an 
X in the NF-e Posted under Contingency column. 
7. You check the system communication status of the contingency NF-e in the NF-e 
Monitor. If the status is blank, then you need to send the request for authorization 
manually (see User Actions for Individual NF-e). 
8. You print the contingency NF-e from the NF Writer. 
9. Depending on the tax authorities’ response to the initial request of the original NF-e 
(from step 2, in the case that a request was sent), which you check in the NF-e 
Monitor, proceed as follows: 
0. If the tax authorities send the response Authorized or Rejected, then you 
must request cancellation or skipping of the original NF-e (see User Actions 
for Individual NF-e). 
If the tax authorities approve the cancellation request, then you do not need 
to take any further action. Note that for the process to be completed, the 
system communication status must be either 2 (Authorized & Cancellation 
Authorized) or 4 (Rejected & Skipping (Cancel) Authorized), and an X must 
be entered in the Canceled column (from step 4). 
1. If the tax authorities send the response Denied, then you do not need to 
request cancellation of the original NF-e. All that is required is to cancel the 
source document or standalone NF-e, which you already did in step 4. 
If no initial request for authorization was made to the tax authorities, either 
automatically or manually, then you do not have to wait for the response from the tax 
authorities as described in 9 1-2 above. In this case, you directly request cancellation 
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 61 
from the tax authorities. When they authorize this cancellation, they call it “skipping”, 
since an NF-e number, which is normally sequential and without gaps, is being 
skipped. But from the SAP side, you cancel the NF-e, as described in step 4 above. 
Result 
You can continue your business process for an individual NF-e by switching it to contingency 
processing. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 62 
 Central Contingency Processing 
You can activate central contingency if you need to print and send electronic fiscal documents 
(such as NF-e or CT-e) without waiting for authorization from the tax authorities. 
After you activate contingency for your entire business place or region, all electronic fiscal 
documents are processed in contingency mode – both those generated automatically by the 
system from the corresponding application and those you create manually in the Nota Fiscal 
Writer. 
The system checks and considers the contingency settings at the moment that a document is 
numbered. For more information about the numbering of documents, seeCustomizingfor 
Numbering and Sending of NF-e to the Messaging System [Page 15]. 
The system allows you to activate central contingency processing if you have the appropriate 
authorization; there is no check for the reason of the activation. 
Prerequisites 
 You have been assigned the appropriate authorizations. 
 The required settings for printing configuration have been made. 
Process 
1. You set a region or business place to contingency in the Monitor (J1BNFE 
transaction). For more information, see: 
o Activate contingency processing for region [Page 63] 
o Activate contingency processing for business place [Page 64] 
2. When a document is posted (automatically or manually), the system checks the 
printer determination to determine whether to print it as 1/1A (conventional) or 55 
(NF-e). 
The system indicates that the document was processed under contingency by 
marking the Posted under Contingency column in the Monitor. 
3. You can print the contingency document without the authorization from the tax 
authorities. 
4. You send the document to the tax authorities (even though you do not actually 
require authorization) (see User Actions for Individual NF-e [Page 55]). 
 
For a table overview of the steps involved in this process and the corresponding statuses 
set in the Monitor, see Process Flow for NF-e Posted under Contingency [Page 78]. 
Result 
The system continues to post the electronic fiscal documents under central contingency until 
you deactivate the settings as follows: 
 Manually for the region 
 Manually or automatically for the business place depending on your activation 
settings 
conv.sap.465E980B202802F9E10000000A1553F6.IWB_EXTHLP
conv.sap.465E9C1D202802F9E10000000A1553F6.IWB_EXTHLP
conv.sap.465BE995E16301E0E10000000A114A6B.IWB_EXTHLP
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 63 
 Activating Contingency Processing for Regions 
You can activate central contingency if you need to print and send electronic fiscal documents 
without waiting for authorization from the tax authorities. It is possible to activate contingency 
processing for a region so that all electronic fiscal documents issued for processes within that 
region are processed under contingency. 
Procedure 
1. On the output screen of the Monitor (J1BNFE transaction), choose Contingency 
Contingency: Region . 
2. In the Contingency per Region Customizing view, enter BR and select the relevant 
region. 
3. Enter the model of the electronic fiscal document: 
o (blank): Settings are valid for all possible models of electronic fiscal 
documents issued in this region 
o 55: Settings are valid for NF-e only 
o 57: Settings are valid for CT-e only 
4. Enter the reason for posting under contingency. 
5. Make settings for other regions as needed and then save your settings. 
More Information 
It is also possible to activate contingency centrally for a business place. For more information, 
see Activating Contingency Processing for Business Places [Page 64]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 64 
 Activating Contingency Processing for Business 
Places 
You can activate central contingency if you need to print and send electronic fiscal documents 
without waiting for authorization from the tax authorities. It is possible to activate contingency 
processing for a business place so that all electronic fiscal documents issued for processes 
within that business place are processed under contingency. 
Procedure 
1. On the output screen of the Monitor (J1BNFE transaction), choose Contingency 
Contingency: Bus.Pl . 
2. In the Contingency for Business Places Customizing view, enter BR as the country. 
Select the company code and relevant business place. 
3. Enter the model of the electronic fiscal document: 
o (blank): Settings are valid for all possible models of electronic fiscal 
documents issued from this business place 
o 55: Settings are valid for NF-e only 
o 57: Settings are valid for CT-e only 
4. Select one of the following check boxes and, if needed, make the follow-on settings: 
o Select MS Down (Contingency (Manual/Messaging System Down)) if there is 
a problem with the communication between your SAP ERP system and your 
messaging system. 
You can set this indicator manually at any time. If you want your SAP ERP 
system to set the MS Down indicator automatically when the connection to 
the messaging system is down, select Act. Cont. Aut. (Activate Contingency 
Automatically). 
The Deact. Cont. ( Deactivate Contingency Manually) indicator controls how 
processing is switched from contingency to normal processing when your 
messaging system is back up. If you want to manually control the switch back 
to normal processing, you select Deact. Cont.. If you want your SAP ERP 
system to automatically deactivate contingency as soon as the messaging 
system becomes available again, do not select Deact. Cont.. 
o Select AS Down (Contingency (Authorities’ Server Down)) if you identify a 
problem with the tax authorities’ server 
Note that you have to manually deselect this indicator; your SAP ERP system 
cannot select or deselect this indicator automatically. 
It is possible to configure your messaging system to automatically react to the 
selection of the AS Down indicator in this Customizing view, that is, if AS 
Down is selected for this business place, your messaging system 
automatically activates contingency when the tax authorities’ system is down. 
5. Enter the reason for posting under contingency. 
6. Make settings for other business places as needed and then save your settings. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 65 
More Information 
It is also possible to activate contingency centrally for a region. For more information, see 
Activating Contingency Processing for Regions [Page 63]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 66 
 NF-e Processing with SCAN 
When there are technical problems with the SEFAZ server in your region (state) and the 
government activates SCAN, you can send your NF-e to the SCAN server for authorization. 
The server determination is done automatically by the messaging system. 
Process 
The following figure illustrates how your SAP ERP system and your messaging system 
interact with government servers when there is a switch between SEFAZ and SCAN. The 
figure is explained in more detail in the following documentation. 
Print DANFE 
on A4 Paper
SAP ERP 
Backend System
Messaging System Tax 
Authorities
Check Server 
Availability
Send Request 
to Authorities
Authorize NF-e
SCANSEFAZ 
SCAN Server 
Available
Number NF-e
Update NF-e 
Status 
Update NF-e 
Status in NF-e 
Monitor
Trigger 
Creation of 
NF-e
Processor
Send 
Authorization 
Request
 
Process Flow for SCAN 
1. A processor triggers the creation of an outgoing NF-e, either automatically through 
the NF-e integration with Materials Management or Logistics Execution or manually 
using the NF-e Writer. 
2. The SAP ERP System automatically sends an authorization request to the messaging 
system. 
3. The messaging system checks periodically which server is currently available, either 
SEFAZ or SCAN. When the authorization request reaches the messaging system, it 
informs SAP ERP which server is available. 
4. Based on server availability, the SAP ERP system numbers the NF-e. If the SCAN 
server is available, an NF-e number is assigned that contains a series number from 
the number range 900-999. 
5. The SAP ERP system passes the information about the NF-e number to the 
messaging system, which then sends the authorization request to the tax authorities. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 67 
6. The tax authorities authorize the NF-e and return the information to the messaging 
system. If the tax authorities reject or deny the NF-e, the process follows the process 
flow described in other parts of the documentation. See More Information.7. The SAP ERP system updates the document status of the NF-e in the NF-e Monitor. 
The following values are displayed in the NF-e Monitor: 
NF-e: Required Action 
Step 
NF-e Document 
Status 
SEFAZ Server 
Active 
SCAN Server 
Active 
C – Completed 1 – Authorized <blank> X 
Result 
The processor prints the DANFE on A4 paper and sends it with the goods. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 68 
 Statuses in NF-e Monitor 
In this section, you find an overview of the statuses displayed in the NF-e Monitor during the 
communication flow for the following processes: 
 NF-e authorization [Page 69] 
 Cancellation of authorized NF-e [Page 70] 
 Authorization process with rejection and subsequent skipping [Page 72] 
 Authorization process with validation error [Page 74] 
 NF-e switched to contingency [Page 76] 
 NF-e posted under contingency [Page 78] 
 Cancellation prior to authorization [Page 79] 
These process descriptions begin with the creation of an NF-e, which is then numbered and 
sent to the tax authorities in the NF-e Monitor. 
In the following documents, the relevant columns in the NF-e Monitor are shown in tables and 
abbreviated as follows: 
Column in NF-e Monitor Abbreviated Column Name in Documentation 
NF-e: Required Action Step ACTION 
NF-e: Document Status DOC STA 
NF-e: System Communication Status SCS 
NF-e: Messaging System Status MSS 
NF-e Switched to Contingency Swt. C. 
NF-e Posted under Contingency Post C. 
Canceled Can. 
Cancel Prior to Authorization Cncl Prior 
For more information on the NF-e Monitor status fields, see NF-e Data [Page 50]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 69 
 NF-e Monitor Statuses: NF-e Authorization 
The following table shows the possible steps involved in sending an NF-e for authorization 
and subsequently canceling the authorized NF-e. For a legend explaining the columns in this 
table, see Statuses in NF-e Monitor [Page 68]. 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You create NF-e, 
for example, in 
NF Writer. 
9 – Set NF-e 
number and send to 
tax authorities 
 
NF-e sent to 
messaging 
system. 
“ “ – IN PROCESS 0 
Messaging 
system confirms 
receipt. 
“ “ – IN PROCESS 0 A 
Tax authorities 
authorize 
request. 
C – COMPLETED 1 0 A 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 70 
 NF-e Monitor Statuses: Authorization with 
Subsequent Cancellation 
The following table shows the possible steps involved in sending an NF-e for authorization 
and subsequently canceling the authorized NF-e. For a legend explaining the columns in this 
table, see Statuses in NF-e Monitor [Page 68]. 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You create NF-e, for 
example, in NF 
Writer. 
9 – Set NF-e 
number and send 
to tax authorities 
 
NF-e sent to 
messaging system. 
“ “ – IN 
PROCESS 
 0 
Messaging system 
confirms receipt. 
“ “ – IN 
PROCESS 
 0 A 
Tax authorities 
authorize request. 
C – COMPLETED 1 0 A 
You send 
cancellation request. 
“ “ – IN 
PROCESS 
1 1 A 
Messaging system 
confirms receipt. 
“ “– IN 
PROCESS 
1 1 B 
Tax authorities 
authorize 
cancellation; 
cancellation is 
performed 
automatically. 
C – COMPLETED 1 2 B X 
At this point the authorization process is complete; you can print the DANFE and send it with 
the goods. 
Rejected Cancellation Request 
If the tax authorities reject the request to cancel, the NF-e Monitor shows the following 
statuses: 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
Tax authorities 
reject cancellation 
request. 
4 – Request to 
cancel rejected; 
check the reason 
1 6 B 
You can best determine the cause of the rejection by checking the status code sent back by 
the government. You can then accept the rejection if you agree with it and no longer intend to 
cancel the NF-e: 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 71 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You accept 
rejection. 
C – 
COMPLETED 
0 8 A 
Alternatively, you analyze the rejection reason and send a cancellation request again: 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You send cancellation 
request again. 
“ “ – IN 
PROCESS 
1 1 B 
Tax authorities 
authorize cancellation; 
cancellation is 
performed 
automatically. 
C – 
COMPLETED 
1 2 B X 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 72 
 NF-e Monitor Statuses: Rejection and Subsequent 
Skipping 
The following table shows the possible steps involved in sending an NF-e for authorization 
and skipping the NF-e number after the NF-e is rejected by the tax authorities. For a legend 
explaining the columns in this table, see Statuses in NF-e Monitor [Page 68]. 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You create NF-e, 
for example, in 
NF Writer. 
9 – Set NF-e 
number and send to 
tax authorities 
 
NF-e sent to 
messaging 
system. 
“ “ – IN PROCESS 0 
Messaging 
system confirms 
receipt. 
“ “ – IN PROCESS 0 A 
Tax authorities 
reject request. 
1 – NF-e contains 
errors; cancel NF-e 
and post corrected 
NF-e or reset NF-e 
and send the 
corrected version 
2 0 A 
You send 
skipping request. 
“ “ – IN PROCESS 2 3 A 
Messaging 
system confirms 
receipt. 
“ “ – IN PROCESS 2 3 C 
Tax authorities 
authorize 
skipping; 
cancellation is 
performed 
automatically. 
C – COMPLETED 2 4 C X 
Alternatively, if you can correct the error in the NF-e, you can reset the NF-e and resend it. 
This process is as follows: 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You create 
NF-e, for 
example, in 
NF Writer. 
9 – Set NF-e number 
and send to tax 
authorities 
 
NF-e sent to 
messaging 
“ “ – IN PROCESS 0 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 73 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
system. 
Messaging 
system 
confirms 
receipt. 
“ “ – IN PROCESS 0 A 
Tax 
authorities 
reject request. 
1 – NF-e contains 
errors; cancel NF-e and 
post corrected NF-e or 
reset NF-e and send the 
corrected version 
2 0 A 
You reset NF-
e. 
 
NF-e sent to 
messaging 
system. 
“ “ – IN PROCESS 0 
Messaging 
system 
confirms 
receipt. 
“ “ – IN PROCESS 0 A 
Tax 
authorities 
authorize 
request. 
C – COMPLETED 1 0 A 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 74 
 NF-e Monitor Statuses: Authorization with 
Validation Error 
The following table shows the steps involved in skipping an NF-e number after a validation 
error from the messaging system. For a legend explaining the columns in this table, see 
Statuses in NF-e Monitor [Page 68]. 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You create NF-e, 
for example, in NF 
Writer. 
9 – Set NF-e 
number and send 
to tax authorities 
 
Messaging system 
runs the validation 
tool and finds error. 
8 -Internal 
validation error in 
messaging 
system. Send 
again! 
 0 V 
You send skipping 
request. 
“ “ – IN PROCESS 9 V 
Messaging system 
confirms receipt. 
“ “ – IN PROCESS 9 C 
Tax authorities 
authorize skipping; 
cancellation is 
performed 
automatically. 
C – COMPLETED A C X 
If the validation error can be corrected, you can reset the NF-e: 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You create NF-e, 
for example, in 
NF Writer. 
9 – Set NF-e 
number and send to 
tax authorities 
 
Messaging 
system runs the 
validation tool 
and finds error. 
8 -Internal validation 
error in messaging 
system. Send again! 
 0 V 
You reset NF-e. 
3 -Send NF-e to the 
Tax Authorities 
 
NF-e sent to 
messaging 
system. 
“ “ – IN PROCESS 0 
Messaging 
system confirms 
“ “ – IN PROCESS 0 A 
SAP Library April 2012 
SAP Library CT-eSAP Note 1661137 75 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
receipt. 
Tax authorities 
authorize 
request. 
C – COMPLETED 1 0 A 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 76 
 NF-e Monitor Statuses: NF-e Switched to 
Contingency 
The following tables show the possible steps involved in switching an NF-e to contingency. 
For a legend explaining the columns in this table, see Statuses in NF-e Monitor [Page 68]. 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You create NF-e, 
for example, in NF 
Writer. 
9 – Set NF-e 
number and send 
to tax authorities 
 
NF-e sent to 
messaging 
system. 
“ “ – IN PROCESS 0 
Messaging 
system confirms 
receipt. 
“ “ – IN PROCESS 0 A 
You can switch a normal NF-e to contingency-processing mode at any time, as long as the 
tax authorities have not responded to the initial request for authorization. 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You switch NF-e 
processingto contingency. 
2 – Cancel 
Source 
Document 
 5 A X 
You cancel NF-e by 
choosing NF-e Cancel 
Source Document or use 
the corresponding 
transaction in the 
application (for example, 
the billing document in 
Sales and Distribution 
(SD)) 
“ “ – IN 
PROCESS 
 5 A X X 
Note that in Customizing you can allow the system to perform this cancellation automatically. 
For more information, see Customizing for Automatic Cancellation of Source Documents 
[Page 26]. 
Even though the process for the NF-e switched to contingency still needs to be completed, 
you can post a new NF-e, which is then a contingency NF-e, to continue the business process 
without authorization from the tax authorities. The next steps are as follows: 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
Tax authorities 
authorize NF-e. 
7 – Send request 
to the tax 
authorities to 
cancel/skip NF-e 
1 5 A X X 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 77 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You send 
cancellation 
request. 
“ “ – IN PROCESS 1 1 A X X 
Messaging system 
confirms receipt. 
“ “ – IN PROCESS 1 1 B X X 
Tax authorities 
authorize 
cancellation; no 
automatic 
cancellation. 
C – COMPLETED 1 2 B X X 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 78 
 NF-e Monitor Statuses: NF-e Posted under 
Contingency 
The following table shows the possible steps involved in posting an NF-e under contingency. 
An NF-e posted under contingency can refer to either an NF-e posted under central 
contingency or an NF-e that is posted after you switch from normal processing to contingency 
processing. For a legend explaining the columns in this table, see Statuses in NF-e Monitor 
[Page 68]. 
Step ACTION 
DOC 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
You issue NF-e under 
contingency. 
This contingency NF-e 
can be printed 
immediately on 
security paper without 
authorization from the 
tax authorities. 
3 – Send NF-e 
to the tax 
authorities 
 X 
NF-e sent to 
messaging system. 
“ “ – IN 
PROCESS 
 0 X 
Messaging system 
confirms receipt. 
“ “ – IN 
PROCESS 
 0 A X 
Tax authorities 
authorize request. 
C – 
COMPLETED 
1 0 A X 
 
You can cancel a contingency NF-e without prior authorization from the tax authorities. 
However, you must send the request to cancel immediately thereafter. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 79 
 NF-e Monitor Statuses: Cancellation Prior to 
Authorization 
The following table shows the possible steps involved in canceling an NF-e before it is 
authorized by the tax authorities. This cancellation can take place after the NF-e is sent for 
authorization or when it is has been numbered but the authorization request has not been 
sent because of a validation error. For a legend explaining the columns in this table, see 
Statuses in NF-e Monitor [Page 68]. 
Step ACTION 
DO
C 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
Cncl 
Prio
r 
You create NF-
e, for example, 
in NF Writer. 
9 – Set NF-e 
number and 
send to tax 
authorities. 
 
NF-e sent to 
messaging 
system. 
“ “ – IN 
PROCESS 
 0 
Messaging 
system 
confirms 
receipt. 
“ “ – IN 
PROCESS 
 0 A 
You cancel the 
NF-e before 
authorization is 
received; no 
automatic 
cancellation of 
source 
document. 
2 – Cancel 
Source 
Documents 
 5 A X 
You cancel 
source 
document. 
“ “ – IN 
PROCESS 
 5 A X X 
Tax authorities 
authorize NF-e. 
7 – Request 
Author. To 
cancel/skip 
1 5 A X X 
You request 
authorization of 
cancellation 
from tax 
authorities. 
“ “– IN 
PROCESS 
1 1 B X X 
Tax authorities 
authorize 
request. 
C – 
COMPLETED 
1 2 B X X 
The following table shows the steps involved in canceling an NF-e that has been numbered 
but not sent for authorization. This means the NF-e was either rejected or received a 
validation error. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 80 
Step ACTION 
DO
C 
STA 
SC
S 
MS
S 
Swt.
C 
Post.
C 
Can
. 
Cncl 
Prio
r 
You reset NF-e. 
3 – Send NF-
e 
 
You cancel the 
NF-e before 
authorization is 
received; no 
automatic 
cancellation of 
source 
document. 
2 – Cancel 
Source 
Documents 
 5 X 
You cancel the 
source 
document. 
“ “ – IN 
PROCESS 
 5 X X 
You send the 
authorization 
request for the 
NF-e. 
“ “– IN 
PROCESS 
 0 A X X 
Tax authorities 
authorize NF-e. 
7 – Request 
Author. To 
cancel/skip 
1 0 A X X 
You request 
authorization of 
cancellation 
from tax 
authorities. 
“ “– IN 
PROCESS 
1 1 B X X 
Tax authorities 
authorize 
request. 
C – 
COMPLETED 
1 2 B X X 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 81 
 Incoming Electronic Notas Fiscais 
When your goods are delivered, you must check the validity of the accompanying NF-e before 
you accept the goods. After you verify that the incoming NF-e is valid, you need to enter the 
following in the system: 
 Protocol number 
 Random number 
 Check digit 
 Issuing type, if needed 
The system supports the following incoming NF-e cases: 
 Logistics Invoice Verification (MM-LIV) 
For a normal NF-e, you receive the printed, authorized NF-e, called a DANFE. Enter 
the NF-e data as described under Activities below. 
For a contingency NF-e, the authorization is not yet available when the goods arrive. 
You later check the government system for the protocol number, and enter it as 
described below. For a contingency NF-e, note also that you must keep the incoming 
NF-e printed on security paper, as opposed to the DANFE for the normal, non-
contingency NF-e, which you do not need to keep. 
 Sales and Distribution (SD) for the return process (sales order type REB) 
In this case, you have issued the NF-e and sent it with the goods. Your customer 
accepts the goods and posts the NF-e in its system, but later returns the goods. Your 
customer generates a return NF-e, which is subject to authorization from the tax 
authorities. You enter the protocol number and random number of the return NF-e in 
the Nota Fiscal Writer as described below. 
 
You can use SAP BusinessObjects Nota Fiscal Eletrônica (starting with version 10.0) to 
automate the processing of incoming NF-e from your business partners – NF-e receipt, 
signature validation, and authorization check, to invoice creation in the back-end system. 
You can access this new capability through the NF-e Fiscal Workplace and the NF-e 
Logistics Workplace. You can find incoming NF-e, including NF-e and NF-e cancellation 
notices from suppliers, in these workplaces, where you can manually or automatically 
create and post documents in SAP ERP according to your business process. 
For more information about the features of incoming NF-e automation in SAP 
BusinessObjects Nota Fiscal Eletrônica, see http://help.sap.com/grc SAP 
BusinessObjects Nota Fiscal Eletrônica System Administrator'sGuide . 
Activities 
You compare the protocol number printed on the NF-e with the protocol number/authorization 
code of the NF-e stored on the authorities’ server. 
In the SAP system, enter the NF-e following the standard procedure. The system 
automatically sets the document status for the incoming NF-e as 1 (Authorized). 
Afterwards enter the protocol number and random number manually in the Nota Fiscal Writer, 
on the NF-e Data tab, in the corresponding fields (the system automatically derives all other 
http://help.sap.com/grc
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 82 
NF-e data from the NF-e posting). Until you complete this step, the NF-e Monitor displays 
required process step 6, Enter protocol number, for the NF-e, and processing is incomplete. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 83 
 Changing Posting Date for Manually-Created 
Incoming NF-e 
Your company received goods from abroad. They need to be transported by land to your 
plant, but they cannot be transported without a nota fiscal. Because the goods come from a 
foreigner company, your company must issue an incoming electronic nota fiscal (NF-e) to 
accompany the goods to your plant. 
You manually create an NF-e in the Nota Fiscal Wrtier and estimate a date for the arrival of 
the goods at your plant. Once the goods actually arrive at the plant, you may need to change 
the posting date of the incoming NF-e after the posting period has closed. 
Once you execute the Change Nota Fiscal transaction (J1B2N), the system calls the Nota 
Fiscal System - Check posting period in case of cancel (J_1B_NF_CANCEL_CHECK_PERIOD) 
function module to check the posting period. If the period is closed, the system will not allow 
you to change the posting date in the NF-e. 
You can change the behavior of the function module to be able to change the posting date in 
the Change Nota Fiscal transaction. 
Activities 
In Customizing for Cross-Application Components, choose General Application Functions 
Nota Fiscal Electronic Notas Fiscais BAdI: Check Period of Notas Fiscais , and 
create an implementation for the Set Flag to Check the Period method. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 84 
 User Decision in Creation of Incoming NF in Mixed 
Scenarios 
If your company handles scenarios with mixed nota fiscal (NF) types, you can allow users 
who enter the incoming NF to determine whether to post a conventional NF or an electronic 
nota fiscal (NF-e). 
 
Your company sends goods with an NF-e. Your customer needs to return the goods and 
sends a conventional NF. You enter the incoming NF from your customer in your system 
with reference to your NF-e. The system identifies the different types of NFs and creates 
references between them. 
Prerequisites 
You have made the settings as described in Customizing NF Type Determination for Mixed 
Scenarios [Page 29] to enable user decision. 
Activities 
When you enter the incoming NF following the standard procedure for the relevant goods 
movement transaction that is involved (such as return or third-party process), the system 
prompts you to specify conventional NF or NF-e. This dialog box appears after you choose 
the Nota Fiscal pushbutton. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 85 
 Reports 
The NF- Monitor provides several features that enable you to monitor the numbering of 
electronic notas fiscais (NF-e) and ensure that no gaps occur. The nine-digit electronic nota 
fiscal (NF-e) numbers included in NF-e access keys must be assigned to NF-e sequentially 
and without gaps. A gap can occur in NF-e number ranges when the system uses a number 
from a number range for NF-e numbers but no actual NF-e is created. If such a gap occurs, 
you must send a skipping request for the missing NF-e numbers to the tax authorities. 
The following reporting functions are available from the NF-e Monitor in the Goto menu: 
 Gap Monitor: You can use the NF-e Numbering Gaps Monitor report to see the gaps 
in the NF-e number ranges for a particular company code within a date range that 
you determine. You can further limit the search by business place and form. 
 Gap Report: You can use the Check NF-e Number Range Gaps report to identify 
gaps in NF-e numbering ranges (test mode) and send skipping requests to the tax 
authorities (productive mode). For more information, see Check NF-e Number Range 
Gaps (Gap Report) [Page 86]. 
 Last Checked Number Customizing view. Here you can enter the initial number for 
each NF-e number range that the Gap Monitor and Gap Report should use to start 
checking for gaps during a report run. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 86 
 Check NF-e Number Range Gaps (Gap Report) 
You can use this report to identify gaps in NF-e numbering ranges and send skipping 
requests for the missing NF-e numbers to the tax authorities. 
Prerequisites 
You have assigned the number range defined for an NF number group to the correct business 
place (see Maintaining Number Ranges [Page 14]). 
 
We recommend that the assignment of the number range group to the respective 
business place is unique. This means that the same number range group should not be 
assigned to more than one business place. This enables the system to identify which 
business place generated a particular external NF-e number, which must be included in 
the skipping request to the tax authorities. 
Activities 
1. Access this report, in the NF-e Monitor, by choosing Goto Gap Report . 
2. On the Check NF-e Number Range Gaps screen, enter the required selection criteria: 
company code, business place, NF model, and reason for skipping the NF-e. 
3. Before you send the skipping request to the tax authorities, you can run the report in 
test mode. 
To make a test, you can manually change the last checked number in the Maintain 
Last Checked Number for NF-e Number Range Customizing activity. To access the 
view, choose Goto Last Checked Number . Enter the last checked number. 
Run this report in test mode. 
 
After a test, ensure that you reset the correct last checked number before doing a 
productive run of the report. 
4. To locate the gaps and send the actual skipping requests for the gaps to the tax 
authorities, select the Execute RFC checkbox and specify the type of RFC 
communication. 
5. Execute the report. 
After a productive run of this report, the tax authorities send a response for the skipping 
requests. To view their response, run this report again. Alternatively, you can use the NF-e 
Numbering Gaps Monitor report ( Goto Gap Monitor ). The response from the tax 
authorities is displayed as the document status for the skipped NF-e numbers. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 87 
 NF-e Events 
An NF-e event is an action that is related to an electronic nota fiscal (NF-e). 
Such actions include authorization, denial, cancellation, and so on. SEFAZ defines what the 
actions are and who the NF-e event author and recipient are. In Portuguese, this is known as 
evento. 
SEFAZ has identified a wide range of NF-e events, but only some are tracked by the 
government. These include, for example, the following: 
 NF-e authorization 
 Denial of NF-e authorization 
 NF-e cancellation 
 Electronic correction letter (CC-e) for an NF-e. For more information about CC-e, see 
Electronic Correction Letter (CC-e) [Page 88]. 
Your SAP ERP system allows you to create and process NF-e events in the NF-e Monitor and 
track the history of NF-e and their corresponding NF-e events. 
Integration 
You enable communication between the tax authority systems and your SAP ERP system 
about NF-e events with a messaging system. You can choose your own messaging system or 
an SAP product: SAP BusinessObjects Nota Fiscal Eletrônica. SAP BusinessObjects Nota 
Fiscal Eletrônica can be integrated into your existing system landscape, so that your SAP 
ERP systemprovides the data required by the authorities and SAP BusinessObjects Nota 
Fiscal Eletrônica communicates with the authorities and your customers and suppliers. 
For more information about SAP BusinessObjects Nota Fiscal Eletrônica, see 
http://help.sap.com/grc Nota Fiscal Eletrônica SAP BusinessObjects Nota Fiscal 
Eletrônica System Administrator's Guide . 
http://help.sap.com/grc
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 88 
 Electronic Correction Letters (CC-e) 
An electronic correction letter (CC-e) is an NF-e event that informs the government and NF-e 
recipients about incorrect information contained in an NF-e already authorized by the 
government. 
The event author for an electronic correction letter is the NF-e issuer. In Portuguese, this NF-
e event is known as Carta de Correção eletrônica. 
To enable the processing of CC-e in your SAP ERP system, you must make certain settings 
in the Customizing for electronic notas fiscais (NF-e). For more information, see Customizing 
for Electronic Correction Letters (CC-e) [Page 89]. 
You use the NF-e Monitor to create, change and send CC-e for authorization. You can also 
track the statuses of CC-e in the NF-e Monitor. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 89 
 Customizing for Electronic Correction Letters (CC-
e) 
To allow you to create and process electronic correction letters, you must record and map the 
following two kinds of NF-e event codes in Customizing: 
 The official NF-e event code that is assigned to this NF-e event by SEFAZ 
 The internal NF-e event code that is used for backend processing in your SAP ERP 
system 
Activities 
You make the following settings: 
1. In the Enter Official NF-e Event Codes and Map to Internal Codes Customizing 
activity, you record the official NF-e event code from SEFAZ, enter a descriptive text 
for the event, and then map it to the respective internal NF-e event code that is 
delivered with your SAP ERP system. This Customizing activity is found in 
Customizing for Cross-Application Components under General Application 
Functions Nota Fiscal Electronic Notas Fiscais (NF-e) NF-e Events . 
2. In the Group Internal NF-e Event Codes Customizing activity, you create NF-e event 
groups and assign the internal NF-e event codes of those NF-e events that should be 
processed by a business place in the same way. This Customizing activity is found in 
Customizing for Cross-Application Components under General Application 
Functions Nota Fiscal Electronic Notas Fiscais (NF-e) NF-e Events . 
3. In the Define Business Places Customizing activity, you assign the corresponding 
NF-e event group to the relevant business places. This Customizing activity is found 
in Customizing for Cross-Application Components under General Application 
Functions Nota Fiscal CNPJ Business Places . 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 90 
 Interfaces for Electronic Correction Letters (CC-e) 
To communicate with the tax authorities about electronic correction letters (CC-e), you use 
the following function modules to establish the communication between your SAP ERP 
system and your messaging system: 
 RFC call to the messaging system for CCe (J_1BNFE_CCE_OUT) for outbound 
messages. For more information, see Interface for Outbound CC-e Messages. 
 Event Update From Messaging System (J_1BNFE_EVENT_IN) for inbound 
messages. For more information, see Interface for Inbound CC-e Messages. 
 
If you use SAP BusinessObjects Nota Fiscal Eletrônica as your messaging solution and 
have enabled the communication between this solution and your SAP ERP system, no 
further action is needed for supporting NF-e events. 
For more information about SAP BusinessObjects Nota Fiscal Eletrônica, see 
http://help.sap.com/grc Nota Fiscal Eletrônica SAP BusinessObjects Nota Fiscal 
Eletrônica System Administrator's Guide . 
http://help.sap.com/grc
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 91 
 Interface for Outbound CC-e Messages 
Your SAP ERP system asynchronously sends electronic correction letters (CC-e) using the 
outbound interface RFC call to the messaging system for CCe (J_1BNFE_CCE_OUT) function 
module. This interface provides the data required by the tax authorities for registering and 
processing CC-e issued for NF-e. The interface to the messaging system comprises the 
following parameters: 
 IV_NFE_ACCESS_KEY – NF-e: 44-digit access key 
 IV_EVENT_TYPE – Official NF-e event code 
 IV_INTERNAL_SEQUENCE_NUMBER – Event sequence number that is used internally 
in your SAP ERP system 
 IV_TIMESTAMP – NF-e event: Timestamp of creation 
(YYYYMMDDhhmmssmmmuuun) 
 IV_TIMEZONE – Time zone of the issuing business place 
 IV_CONTENT – Content of the CC-e as a text string 
 IV_RESEND – Flag that is used for resending in the messaging system after RFC 
communication fails during the previous call. This is an optional parameter. 
More Information 
For other information that is not specific to CC-e, see Interface for Outbound Messages [Page 
36]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 92 
 Interface for Inbound NF-e Event Messages 
Your SAP ERP system can receive messages about NF-e events using the inbound interface 
of the Event Update From Messaging System (J_1BNFE_EVENT_IN) function module. This 
interface is used for batch processing of NF-e events. 
The IT_EVENTS interface table contains single NF-e events. The interface structure 
comprises the following fields to be filled: 
 DOCNUM – NF-e document number that is used in your SAP ERP system 
 EXT_EVENT – Official NF-e event code 
 SEQNUM – Internal sequence number for the NF-e event, which is used in your SAP 
ERP system 
 EXT_SEQNUM – Official sequence number for the NF-e event. This is the sequence 
number for the NF-e event that is used by the tax authorities. This number is 
populated by the messaging system and should increase by one for an NF-e event if 
the previous one has been authorized. 
 ACCKEY – 44-digit access key for the NF-e 
 AUTHCODE – Protocol number of the NF-e event 
 REPLY_TMPL – Timestamp of reply to authorization request for NF-e. The format is 
as follows: YYYYMMDDhhmmssmmmuuun. 
 CODE – Status code that is related to the NF-e event 
 MSGTYP – Type of inbound message 
Your SAP ERP system requires a unique code that identifies the type of inbound message. 
These codes are defined in the backend. The inbound interfaces can process any of the 
following message types for NF-e events: 
Type of NF-e Event Message Code Message Type 
Electronic correction letter (CC-e) 1 Authorization 
Electronic correction letter (CC-e) 2 Rejection 
The CT_BAPIRET2 interface table contains the BAPI return information (type BAPIRETTAB) 
from your SAP ERP system. 
More Information 
For more information that is not specific to NF-e events, see Interfaces for Inbound Messages 
[Page 37]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 93 
 Process Flow for Electronic Corrections Letters 
(CC-e) 
An electronic correction letter (CC-e) issued to inform the tax authorities of changes to the 
information in an already authorized electronic nota fiscal (NF-e). This process up the 
response from the tax authorities is shown in the following figure and explained in more detail 
in the following documentation: 
S AP E R P 
S ys tem
Mes s ag ing S ys tem Tax A uthorities
Validation C heck 
of C C -e
Authorize 
R equest
C heck 
R equest
O KE rror
S end Authorization 
R equest
Update C C -e 
S tatus
R eject
C reate and 
S end C C -e
F ix Data
S end R esponse
E rrorO K
Deny
R esend 
C C -e
S end C C -e
P roc es s or
Update C C -e 
S tatus in NF -
e Monitor
E rror = RE rror = V
R esend 
C C -e
 
Creating and Sending a CC-e for Authorization 
Process 
1. A processor creates and sends a CC-e for an authorized NF-e on the NF-e Monitor 
screen. For more information,see Creating Electronic Correction Letters (CC-e) 
[Page 95]. 
2. Your SAP ERP system sends an authorization request to the messaging system. The 
system assigns 1 as the internal sequence number. 
One of the following error messages may be returned from the messaging system: 
o V: The CC-e did not pass the validation checks of the messaging system. 
You must fix the error and resend the CC-e. 
o R: The messaging system is unavailable. You must resend the CC-e later. 
o G: This message cannot be fixed by the processor in the SAP ERP system. It 
must be fixed in the messaging system before the process can continue. 
I 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 94 
3. The messaging system sends the authorization request to the tax authorities. 
4. The tax authorities respond to the authorization request in one of the following ways: 
o Authorize the CC-e 
o Reject the authorization request for the CC-e 
5. The messaging system passes the response to your SAP ERP system. 
6. Your SAP ERP system updates the status of the CC-e on the NF-e Monitor. 
The following figure shows how you can react to these different responses and is explained in 
more detail in the following documentation. 
S AP E R P 
S ys tem
Mes s ag ing S ys tem Tax A uthorities
C heck 
R equest
S end Authorization 
R equest
Update C C -e 
S tatus
S end R esponse
P roc es s or
C heck S tatus in NF -e 
Monitor
R ejectedAuthorized
Update C C -
e S tatus
E rror fixed
R esend 
C C -e
R esend C C -e
View Updated 
C C -e S tatus 
in NF -e 
Monitor
E rror cannot
be fixed
 
After Initial Response from Tax Authorities 
Authorization 
Your messaging system increases the official NF-e event sequence number to 1 and passes 
this to your SAP ERP system. On the NF-e Monitor, the status of the CC-e is displayed as 
Authorized in the NF-e event history for the NF-e. The process for this CC-e is complete. If 
needed, you can create new CC-e for this NF-e later. 
Rejection 
Your SAP ERP system displays the relevant status for the CC-e in the NF-e event history for 
the NF-e on the NF-e Monitor. If possible, the processor makes the necessary changes and 
resends the CC-e for authorization. The messaging system sends the CC-e to the tax 
authorities and returns their response to your SAP ERP system. The updated response is 
displayed on the NF-e Monitor. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 95 
 Creating Electronic Correction Letters (CC-e) 
Procedure 
1. Open the NF-e Monitor using the J1BNFE transaction. 
2. Select the NF-e that you want to change in the NF-e Monitor. 
3. Choose NF-e Events CC-e Create . 
4. Enter the text for the CC-e. The tax authorities have set a minimum limit of 15 
characters and a maximum of 1000 characters. If you enter a longer text, the SAP 
ERP system cuts the text at the limit. 
5. Send the CC-e to the tax authorities for authorization. 
Result 
After you create the CC-e, the system displays an icon in the NF-e Events column for this NF-
e. By clicking on the icon, you can display the NF-e Event History for this NF-e. The history 
shows the communication regarding all NF-e events for this NF-e between your SAP ERP 
system and the messaging system and the tax authorities. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 96 
 Archiving NF-Event Data 
When you archive notas fiscais using the J_1BNF archiving object, you also archive the data 
for the corresponding NF-e events. This NF-e event data is stored in the following tables: 
 J_1BNFE_EVENT: Table for storing data that is common to all NF-e event types 
 J_1BNFE_CCE: Table for storing data that is specific to electronic correction letters 
(CC-e) 
Procedure 
1. You archive notas fiscais by choosing, from the SAP Easy Access screen, Tools 
Administration Administration Data Archiving . 
2. Enter J_1BNF as the object name. 
 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 97 
 Conhecimento de Transporte Eletrônico (CT-e) 
The conhecimento de transporte eletrônico (CT-e) is an electronic invoice for billing freight 
costs and their associated taxes. Like the electronic nota fiscal (NF-e), a CT-e needs to first 
be authorized by the tax authorities before it can be used for shipment. It has also a printed 
version called the DACTE, which has to accompany the shipment. In your SAP ERP system, 
you can create and process outgoing CT-e in the required business processes and send the 
XML direct to the tax authorities for authorization. 
The processing of CT-e is similar to that for NF-e in the numbering, the statuses, 
authorization, and contingency processes. The CT-e differs from the NF-e in the following 
ways: 
 Model: The NF-e has 55 as the model. The CT-e has 57 as the model. In 
Customizing, the model plays an important role in determining which settings are 
used for NF-e and which are for CT-e. You can also use the model to filter the type of 
electronic fiscal document that is displayed in the NF-e/CT-e Monitor. 
 Mode of transport. A CT-e includes information about the mode of transport. The 
possible modes of transport are road, air, water, rail and pipeline. 
 Service types. A CT-e has the following service types: normal, subcontracting, 
redispatch, and intermediate redispatch. 
 Partners. The following partners are involved in processes that involve CT-e: 
o Goods sender. This data fills the <rem> tag in the XML of CT-e. 
o CT-e destination. This data fills the <dest> tag in the XML of CT-e. 
o Cargo dispatcher. This data fills the <exped> tag in the XML of CT-e. 
o Cargo receiver. This data fills the <receb> tag in the XML of CT-e. 
You must map these CT-e partners to NF partner functions in Customizing. 
 Service takers. The data for the service taker fills the <toma03> or <toma4> tag in the 
XML of the CT-e. The system derives the service taker from the NF main partner 
using the mapping of CT-e partners to NF partner functions that you do in 
Customizing. 
 Tax lines: A CT-e can only have one tax line per document. Your SAP ERP system 
checks during CT-e creation that the document only contains one line item to ensure 
that this requirement is fulfilled. 
 References: CT-e usually contain references to other fiscal documents (such as nota 
fiscal or NF-e) 
 CT-e types: In addition to normal CT-e, CT-e can be annulled, substituted or created 
with a complementary value. To enable the processing of these CT-e types in your 
SAP ERP system, you make must create special nota fiscal types for these CT-e 
types in Customizing. 
 Related documents: Electronic correction letters (CC-e) or other NF-e events are not 
applicable for CT-e. 
Integration 
You enable communication between the tax authorities’ systems and your SAP ERP system 
with a messaging system: SAP BusinessObjects Nota Fiscal Eletrônica. SAP 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 98 
BusinessObjects Nota Fiscal Eletrônica can be integrated into your existing system 
landscape, so that your SAP ERP system provides the data required by the authorities and 
SAP BusinessObjects Nota Fiscal Eletrônica communicates with the authorities and your 
customers and suppliers. When connecting SAP ERP to SAP BusinessObjects Nota Fiscal 
Eletrônica, all necessary interface implementation is part of the standard delivery. However, 
you must make certain Customizing settings in SAP ERP and SAP BusinessObjects Nota 
Fiscal Eletrônica. 
For more information about the Customizing in SAP ERP, see Activating SAP 
BusinessObjects Nota Fiscal Eletrônica [Page 35]. For more information about SAP 
BusinessObjects Nota Fiscal Eletrônica and the communication with your SAP ERP system, 
see http://help.sap.com/grc SAP BusinessObjects Nota Fiscal Eletrônica System 
Administrator's Guide . 
Prerequisites 
To process CT-e, you have made the necessary settings in Customizing. In addition to the 
generic settings for processingelectronic fiscal documents, this includes settings that are 
specific to CT-e. For more information, see Customizing for CT-e [Page 101]. 
Features 
Automatic Generation of CT-e 
The system can automatically generate a CT-e from Sales and Distribution (SD). This 
generation is possible for the following types of CT-e: 
 Normal: The system creates the CT-e with a sales order during billing. The sales 
document type has to be assigned to an NF type created for normal CT-e. 
 Value complementary: The system creates the CT-e with a debit memo request (with 
reference to a billing document that represents the original CT-e) during billing. The 
sales document type for the debit memo request has to be assigned to an NF type 
configured for CT-e value complementary. 
 Value annulment: There are two variants: 
o The service taker involved does not contribute ICMS. In this case, the system 
creates the CT-e with a credit memo request (with reference to a billing 
document that represents the original CT-e) during billing. The sales 
document type for the credit memo request has to be assigned to an NF type 
configured for CT-e value annulment. 
o The service taker involved contributes ICMS. In this case, the service taker 
issues an NF-e, NF, or even CT-e, as a CT-e value annulment, which needs 
to be entered in the system as an incoming NF document. This can be done 
as an SD credit memo type that has been configured for the NF document 
type return with incoming as the direction and with reference to the original 
CT-e. 
 Substitution: The system creates the CT-e with a new sales order during billing that 
has a reference to a billing document that represents the CT-e annulment or the 
incoming NF-e/NF/CT-e from the service taker that annuls the original CT-e. The 
sales document type has to be assigned to an NF type created for CT-e substitution. 
Manual Creation with NF Writer 
You can also create a CT-e manually using the NF Writer for these types of CT-e: 
 Normal: You create the CT-e using an NF type for normal CT-e. 
http://help.sap.com/grc
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 99 
 Value complementary: You create the CT-e using an NF-type configured for CT-e 
value complementary. The CT-e has to have a reference to another NF document 
that represents the original CT-e. 
 Value annulment: There are two variants: 
o The service taker involved does not contribute ICMS. In this case, you can 
create the CT-e using an NF type configured for CT-e value annulment. The 
CT-e has to have a reference to the NF document that represents the original 
CT-e. 
o The service taker involved contributes ICMS. In this case, the CT-e can be 
created using as an incoming NF using the appropriate NF-type (document 
type “return”, direction “Incoming”) and with reference to the original CT-e. 
 Substitution: You create the CT-e using an NF type configured for CT-e substitution. 
The CT-e has to have a reference to the NF document that represents CT-e value 
annulment or the incoming NF-e/NF/CT-e from the service taker that annuls the 
original CT-e. 
Activities 
You monitor your CT-e – from their initial posting through their authorization by the tax 
authorities – using the NF-e/CT-e Monitor. You can display both NF-e and CT-e in the NF-
e/CT-e Monitor or filter for one type by using the model (55 for NF-e or 57 for CT-e). 
Most functions in the NF-e/CT-e Monitor that are available for NF-e work in the same way for 
CT-e. You access the NF-e/CT-e Monitor from the SAP Easy Access Screen by choosing 
 Logistics Central Functions Country-Specific Functions Brazil Nota Fiscal . 
Alternatively, you use the J1BNFE transaction. 
In the NF-e/CT-e Monitor , you process electronic fiscal documents and monitor the status of 
these documents. The activities are similar for both NF-e and CT-e and are described in the 
documentation for NF-e linked below: 
 Requesting authorization from the tax authorities. Note, however, that CT-e can only 
be processed by the state tax authorities (SEFAZ). SCAN is not supported for CT-e. 
For more information about how to request authorization, see the explanation for NF-
e under Requesting NF-e Authorization [Page 43]. 
 Switching to contingency. As for NF-e, it is possible to switch an individual CT-e 
posted under normal conditions to contingency or to make the switch centrally for a 
business place or region. Note that, to comply with requirements from SEFAZ, you 
cannot switch CT-e value annulment and CT-e substitution to contingency or post 
such documents under contingency. 
For more information, see the explanation in the following documents: 
o Contingency Processing of NF-e Posted in Non-Contingency Mode [Page 59] 
o NF-e Processing under Central Contingency [Page 62] 
 Canceling CT-e and source documents (with authorization request). Note that the 
cancellation prior to authorization functions available for NF-e are not supported in 
your SAP ERP system for CT-e. 
For more information, see the explanation for NF-e in NF-e Cancellation [Page 57]. 
 Skipping CT-e (with authorization request) 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 100 
For more information, see the explanation for NF-e in Requesting NF-e Authorization 
[Page 43]. 
 Checking logs for CT-e 
For more information, see Log for Electronic Fiscal Documents [Page 49]. 
SAP Library April 2012 
SAP Library CT-e SAP Note 1661137 101 
 Customizing for CT-e 
To be able to process CT-e in your SAP ERP system, you must first make the Customizing 
settings that are needed normally for processing NF-e and then you must make additional 
settings specific to processing CT-e. 
You make the settings for NF-e in Customizing for Cross-Application Components under 
 General Application Functions Nota Fiscal . The NF-e settings to be made are 
explained in the system documentation for each Customizing activity. For more information, 
see Customizing for NF-e [Page 10]. 
Note that in the following Customizing activities in the Nota Fiscal IMG structure, the 
Customizing views have been enhanced with additional fields specific to CT-e: 
 Define Nota Fiscal Types (Customizing view: J_1BAAV) 
 Define Official Status Codes (Customizing view: J_1BSTSCODEV) 
 Define Contingency Reasons (Customizing view: J_1BNFE_CONTINRV) 
 Define Cancellation Reasons (Customizing view: J_1BNFE_CANCELRV) 
To make the settings in the Customizing view specific to CT-e, choose in Customizing for 
Cross-Application Components under General Application Functions Nota Fiscal 
Electronic Fiscal Documents CT-e Specifics Map CT-e Partners to NF Partner 
Functions . 
For more information about all of these Customizing settings, see the Customizing activity 
documentation and the field help for the columns in the Customizing view. 
CL_NFE_PRINT Business Add-In (BAdI) 
To allow you to implement your own logic to fill fields in the XML for a CT-e, the General 
Enhancements for Electronic Fiscal Documents (CL_NFE_PRINT) Business Add-In (BAdI), 
formerly called General Enhancements for NF-e, has a new BAdI method: Fill Additional CT-e 
Fields (FILL_CTE). You can access this BAdI by choosing in Customizing for Cross-
Application Components under General Application Functions Nota Fiscal Electronic 
Fiscal Documents Business Add-Ins BAdI: General Enhancements for Electronic Fiscal 
Documents .

Mais conteúdos dessa disciplina