Saphelp Nfe10 en
Saphelp Nfe10 en
FOR BRAZIL)
PDF download from SAP Help Portal:
http://help.sap.com
Created on March 07, 2014
The documentation may have changed since you downloaded the PDF. You can always find the latest information on SAP Help Portal.
Note
This PDF document contains the selected topic and its subtopics (max. 150) in the selected structure.
Subtopics from other structures are not included.
The selected structure has more than 150 subtopics. This download contains only the first 150 subtopics. You
can manually download the missing subtopics.
2014 SAP AG or an SAP affiliate company. All rights reserved. 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. National product specifications may vary. 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 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. Please see www.sap.com/corporateen/legal/copyright/index.epx#trademark for additional trademark information and notices.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 1 of 174
TABLE OF CONTENT
1 SAP Nota Fiscal Eletrnica (SAP Electronic Invoicing for Brazil)
1.1 Overview of SAP Nota Fiscal Eletrnica
1.2 Architecture of SAP Nota Fiscal Eletrnica
1.3 Configure SAP Nota Fiscal Eletrnica
1.3.1 General Settings for SAP Nota Fiscal Eletrnica
1.3.2 Configuration of NF-e Outbound
1.3.2.1 Configuration of NF-e (Outbound)
1.3.2.1.1 Technical Settings for NF-e Outbound
1.3.2.1.2 Digital Signature Configuration for NF-e Outbound
1.3.2.1.3 Setup of System Communication from and to SAP NFE for NF-es
1.3.2.1.4 Activating Services for UI Display of NF-e Monitors (Outbound)
1.3.2.1.5 Process Settings and Customizing (Outbound)
1.3.2.1.6 Settings for NF-e Batch Processing (Outbound)
1.3.2.1.7 NF-e Batch Job Planning (Outbound)
1.3.2.1.8 User Roles and Authorizations for NF-e (Outbound)
1.3.2.2 SAP NetWeaver PI Configuration for NF-e (Outbound)
1.3.2.2.1 Creating NF-e Configuration Scenarios from Integration Scenarios
1.3.2.2.1.1 Integration Scenarios for NF-e Configuration (Outbound)
1.3.2.2.2 Configuration Object Definition for NF-e Configuration Scenarios
1.3.2.2.2.1 NF-e Communication with Authority Systems (Outbound)
1.3.2.2.2.2 Communicating with NF-e B2B Partners
1.3.2.2.3 Completing NF-e Configuration Scenario Settings (Outbound)
1.3.2.2.4 Configuration for NFE on AEX (Java-only PI)
1.3.2.2.5 NF-e Alert Configuration
1.3.3 Configuration of CT-e Outbound
1.3.3.1 Process Settings and Customizing for CT-e Outbound
1.3.3.2 Digital Signature Configuration for CT-e Outbound
1.3.3.3 Setup of System Communication from and to SAP NFE for CT-es
1.3.3.4 Activating Services for UI Display of CT-e Monitors (Outbound)
1.3.3.5 CT-e Batch Processing in Core Application (Outbound)
1.3.3.6 CT-e Batch Job Planning (Outbound)
1.3.3.7 User Roles and Authorizations for CT-e (Outbound)
1.3.3.8 CT-e Configuration
1.3.3.9 SAP NW PI Configuration for CT-e (Outbound)
1.3.3.9.1 Creating CT-e Configuration Scenarios from Integration Scenarios
1.3.3.9.1.1 Integration Scenarios for CT-e Configuration (Outbound)
1.3.3.9.2 Configuration Object Definition for CT-e Configuration Scenarios
1.3.3.9.2.1 CT-e Communication with Authority Systems (Outbound)
1.3.3.9.2.2 Communicating with CT-e B2B Partners
1.3.3.9.3 Completing CT-e Configuration Scenario Settings (Outbound)
1.3.3.9.4 Configuration for NFE on AEX (Java-only PI)
1.3.4 Configuration of NF-e/CT-e Inbound
1.3.4.1 Configuring SAP Nota Fiscal Eletrnica (Inbound)
1.3.4.1.1 Technical Settings for NF-e/CT-e Inbound
1.3.4.1.2 Configuration for Digital Signature Validation
1.3.4.1.3 Activating Services for UI Display of Monitors (Inbound)
1.3.4.1.4 Configuring and Personalizing Workplaces (Inbound)
1.3.4.1.5 Process Settings and Customizing (Inbound)
1.3.4.1.6 Vendor Notification
1.3.4.1.6.1 NF-e Rejection Notification
1.3.4.1.6.2 CT-e Rejection Notification
1.3.4.1.6.3 NF-e Acceptance Notification
1.3.4.1.6.4 CT-e Acceptance Notification
1.3.4.1.7 NF-e from National Environment: Batch Job Planning
1.3.4.1.8 User Roles and Authorizations (Inbound)
1.3.4.2 SAP NetWeaver PI Configuration for SAP NF-e/CT-e (Inbound)
1.3.4.2.1 Creating Configuration Scenarios from Integration Scenarios (Inb
1.3.4.2.1.1 Integration Scenarios for Configuration (Inbound)
1.3.4.2.2 Configuration Object Definition for Configuration Scenarios (Inb
1.3.4.2.2.1 Communication with Authority Systems (Inbound)
1.3.4.2.3 Completing Configuration Scenario Settings (Inbound)
1.3.4.2.4 Configuration for NFE on AEX (Java-only PI)
1.3.4.2.5 Additional Workplace Configuration (Inbound)
1.3.4.2.6 NF-e Alert Configuration
1.3.5 Configuration of Events
1.3.5.1 Event Batch Job Planning
1.3.5.2 Activating Services for UI Display of Event Monitors
1.3.5.3 User Roles and Authorizations for Events
1.3.5.4 Configuration for Digital Signature Validation
1.3.6 Related Configuration in SAP ERP
1.4 Outbound
1.4.1 NF-e Outbound for XML Layout 2.00
1.4.1.1 Communication Flow for Sending NF-es with Layout 2.00
1.4.1.2 NF-e Outbound Monitoring
1.4.1.2.1 Document Monitoring in SAP ERP
1.4.1.2.2 NF-e Communication Process Monitoring (Outbound) for Layout 2.00
1.4.1.2.2.1 NF-e Monitor (Outbound) for Layout 2.00
1.4.1.2.2.2 NF-e Batch Monitor (Outbound) for Layout 2.00
1.4.1.2.2.3 Stop NF-e Batch Processing
1.4.1.2.2.4 NF-e Service Status Monitor (Outbound) for Layout 2.00
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 2 of 174
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 3 of 174
Release
10.0 SP16
Based on
Documentation published
February 2014
SAP Nota Fiscal Eletrnica (SAP NFE; SAP Electronic Invoicing for Brazil) helps companies comply with the Brazilian legal requirements
for electronic invoicing.
Companies selling products in Brazil must send each invoice electronically to the government for validation before shipping their
goods.
Companies purchasing goods in Brazil must check the electronic invoice at the government before receiving the goods.
The brazilian government wants to be sure that all due tax revenue is collected. Companies need to handle these activities with an
automated solution that can scale to high volumes of invoices and meet their business process requirements: SAP Nota Fiscal
Eletrnica (SAP NFE; SAP Electronic Invoicing for Brazil) is that solution.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 4 of 174
validation, and authorization check, to invoice creation in the back-end system. You can access this capability through the NF-e Fiscal
Workplace and the NF-e Logistics Workplace. You can find incoming NF-es, including NF-es 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.
Due to the fact that it relies on an integrated approach, SAP NFE is a centralized data store for all messages communicated between
your company and the government system, as well as for messages between your company and other companies' systems in B2B
scenarios. It also is the central platform for storing the exchanged files as required by law and provides interfaces for easy access to
these documents.
Integration
To raise revenue principally in the form of taxes on goods movements, the Brazilian government has implemented an XML-based
electronic billing system known as Nota Fiscal Eletrnica, which comprises both business-to-government (B2G) communication as well
as business-to-business (B2B) communication. The government provides the forms and stipulates the rules for electronic
communication that the majority of companies must use and follow in order to do business in Brazil.
SAPs solution is composed of two deployment units: NFE and the ERP core component. Each of the parts is an independent solution.
Both parts complement each other for automation of the integrated end-to-end scenarios. An overview of the NF-e processing is shown
in the following diagram:
Overview
More Information
For more information about NFE business processes and functions in SAP ERP, see Electronic Nota Fiscal (NF-e) in the SAP Library
under SAP Solutions SAP ERP SAP ERP Central Component <Release> SAP ERP Central Component Logistics Country
Versions Americas Brazil Cross-Application Components Nota Fiscal .
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 5 of 174
Integration
Inbound and Outbound Integration
Based on your existing system landscape, you can connect one or several logistics systems as back-end systems to send and receive
NF-es for SAP NFE, and to use SAP NFE as the central communication platform for your NF-e processes. The back-end systems can
be either SAP ERP or any legacy system that provides the billing data and tax-related information that the authorities require. The
interface implementation necessary to connect SAP ERP to NFE is part of the standard delivery.
More Information
For information about the message flow between the different instances of NFE and the authorities, see
Communication Flow for Sending NF-es
Communication Flow for Sending NF-es with Layout 3.10+
Communication Flow for Sending CT-es
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 6 of 174
This section describes the settings for the NFE application in SAP NetWeaver PI. These settings ensure, for example, that you
address the correct authority system and that you use the correct file format.
Integration
For more information about Customizing settings that have to be made in your SAP ERP, see Related Configuration in SAP ERP.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 7 of 174
Process
You define basic technical settings such as the following (see Technical Settings for NF-e (Outbound)):
System environments and storage locations for digital-signature certificates
Service status settings, for example, request a frequency or status check for the system environment of a certain region in Brazil
Status codes of the authorities, based on which the system controls follow-up activities
Business partners taking part in the electronic exchange of notas fiscais (NF-es)
Number ranges for batches that group notas fiscais eletrnicas (NF-es)
Services for user interface displays
2. You define the following process-related settings (see Settings for NF-e Batch Processing in Core Application (Outbound)) according
to your requirements:
Batch settings, for example, maximum size and time between batch creation
Monitoring settings for optimized process observation
3. You plan batch jobs (see NF-e Batch Job Planning) for regular tasks.
4. You define user roles and authorizations (see User Roles and Authorizations for NF-e (Outbound)) by tax number.
1.
Features
Number Range for Batches
Batches that package NF-es require a number range both to identify and to monitor the batches in process. In the batch monitor of the
core application, you can use this number range to access all NF-es that the system has combined into one batch.
Use transaction code SNUM to create the number range for the object /XNFE/BAID, and create interval 01 with a length of 15 digits.
You must activate the screen display for the monitors by activating the respective services.
For more information, see Activating Services for UI Display of NF-e Monitors (Outbound).
Page 8 of 174
The communication process with SAP Nota Fiscal Eletronica (SAP NFE) is triggered by the feeder system SAP ERP. It is then
processed in SAP NFE, and uses SAP NetWeaver Process Integration (SAP NetWeaver PI) as the communication engine to
communicate with the authorities and business partners through specific Process Integration (PI) content for SAP NFE. To set up the
communication process, you must define the system connection between the different instances.
Note
The setup of the system connection from SAP NetWeaver PI to the necessary systems is part of the configuration process in SAP
NetWeaver PI. For more information, see the specific descriptions in SAP NetWeaver PI Configuration for NF-e (Outbound).
Prerequisites
You have defined and assigned the logical systems in SAP ERP and the core application of SAP NFE. For more information, see
Setting Up Logical Systems in SAP NetWeaver Library under Functional View SAP NetWeaver by Key Capability Security
Identity Management .
The communication between the feeder system and the SAP NFE application is based on Remote Function Call (RFC) technology.
You have defined an RFC user in SAP NFE, each relevant feeder system that you must assign in the system connection setup, and
SAP NetWeaver PI.
Features
The following system connections are necessary for the communication process:
From SAP ERP to the core application of SAP NFE
The business process for invoicing in SAP ERP triggers the electronic communication to the authorities by sending the data for
electronic notas fiscais (NF-es) to the core application of SAP NFE. There the system processes the messages according to the legal
requirements. For the transfer of the document data, you must set up the system connection from SAP ERP to the core application of
SAP NFE. Based on your existing system landscape, you can connect one or several logistics systems as feeder systems to the
core application of SAP NFE.
Note
The feeder systems provide the billing data and tax-related information that the authorities require, and can either be SAP ERP or
any other legacy system.
From the core application of SAP NFE to SAP ERP
You need to connect SAP NFE to SAP ERP to synchronize the status information you receive from the government. This status
information influences the invoicing and follow-on processes, for example, continuing the logistics process based on authorized NFes, or initiating the contingency process for notas fiscais in SAP ERP. You must set up a connection to each of the feeder systems in
your system landscape that requires status updates after electronic communication with the authorities.
From the core application of SAP NFE to SAP NetWeaver PI
You define this system connection to transfer messages between the SAP NFE core application and SAP NetWeaver PI for further
processing. This is a prerequisite for routing the messages to their respective destinations, such as to the authorities' systems, to the
Web service for a digital signature, or to a business partner in business-to-business scenarios.
Activities
Perform the following Customizing activities found under Nota Fiscal Eletrnica Communication to ERP Backend System :
From SAP ERP to core application of SAP NFE
You must define the RFC destination for SAP NFE by using transaction code SM59 in the feeder system. This requires the ABAP
Connection connection type.
In addition to the technical data for the system location, you must enter the logon data for the RFC user that you created in the core
application of SAP NFE on the tab page Logon/Security.
From the core application of SAP NFE to SAP ERP
You must define the RFC destination for SAP NFE by using transaction code SM59 in the feeder system. This requires the ABAP
Connection connection type.
In addition to the technical data for the system location, you must enter the logon data for the RFC user that you created in the
relevant SAP ERP system on the tab page Logon/Security.
You must also maintain the relationship between the RFC destination and the logical system. You can do this by using transaction
code BD97. Under Standard BAPI destination assign the RFC destination to the logical system.
You can access the Communication to ERP Backend System Customizing activity and respective description by entering SPRO and
executing the appropriate activity after choosing Nota Fiscal Eletrnica Communication to ERP Backend System .
From the core application of SAP NFE to SAP NetWeaver PI
You must define the RFC destination for SAP NFE by using transaction code SM59 in the feeder system. This needs the connection
type HTTP Connection to ABAP System.
In addition to the technical data for the system location, you must enter the logon data for the RFC user that you created in SAP
NetWeaver PI on tab page Logon/Security.
Page 9 of 174
Procedure
Enter transaction code SICF and choose Execute.
Select the following entries in the navigation tree for the Virtual Hosts/Services under default_host sap bc webdynpro xnfe .
3. Activate the service for displaying the user interfaces for each of the following entries by using the context menu and selecting
Activate Service.
NF-e Layout 2.00
1. nfe_monitor_new for NF-e Monitor
2. batch_monitor_new for NF-e Batch Monitor
3. master_batch for Batch Processing Settings
4. status_monitor_new for Service Status Monitor
5. nfe_monitor_arch for NF-e Monitor for Archived NF-es
6. incoming_monitor for Incoming B2B NF-es
7. ssf maintenance for SSF maintenance
NF-e Layout 3.10 and Higher
1. nfe_outb_monitor for NF-e Monitor
2. nfe_batch_monitor for NF-e Batch Monitor
3. nfe_servsta_monitor for Service Status Monitor
4. nfe_outb_monitor_arch for NF-e Monitor for Archived NF-es
5. ssf maintenance for SSF maintenance
4. In addition, you must activate the following basic services in the navigation tree for the Virtual Hosts/Services under default_host
sap public bc :
1. ur for Unified Rendering
2. icons for SAP Icons
3. icons_rtl for Icons RTL
4. pictograms for Pictograms
5. webdynpro for Web Dynpro MIME Handling
1.
2.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 10 of 174
In this Customizing activity, you configure the settings that the system needs for the automatic query of system availability for the
SEFAZ and SCAN systems. You are required to query this status and can control the status query dependent on your batch planning
or document volume.
Settings for NF-e Layout 3.10+
The following settings must be executed if you want to send NF-es with layout 3.10 or higher.
NF-e: Maintain Connected Government Systems
In this Customizing activity, you configure the settings that the system needs for deciding to which government system your messages
are to be sent.
NF-e: Maintain Version of Message Types
In this Customizing activity, you determine which XML version is used for individual message types when communicating with
authorities. In Customizing activity NF-e: Define Connected Government Systems, you have defined the government system you
want to communicate with.
NF-e: Define Query for Service Status for Authority (SEFAZ)
In this Customizing activity, you configure the settings that the system needs for the automatic query of system availability for NF-e of
the SEFAZ system and the responsible contingency system. You are required to query this status and can control the status query
dependent on your batch planning or document volume.
NF-e: Maintain Batch Parameters
In this Customizing activity, you define the parameters for collecting NF-es in batches and perform the batch request for each region
used in your company.
Note
These parameters have a high influence on the CPU usage, disk usage, and overall performance of SAP NFE. Therefore, change
the parameters according to your business needs and try to create the batches with the highest NF-e number in an acceptable
time. Be aware that using small values for Max. Collecting Time, Max. Batch Size or Max. Number of NF-es increases the number
of batches. This can provoke processing performance problems. The creation of NF-e batches is also influenced by the way you
scheduled the job for the batch report. For more information about batch jobs, see NF-e Batch Job Planning (Outbound).
Recommendation
In Customizing, define the period values for your batch job according to the region with the shortest time interval requirement for
status requests.
Sending NF-e Batch and NF-e Batch Status Request (technical name: /XNFE/PROCESS_REPORTS)
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 11 of 174
Caution
This report never stops, and therefore blocks one batch process.
Even though this report is programmed to run continuously, we recommend to schedule the background job in intervals of 30 minutes.
In case of a system shutdown, restart, or system dump, the program restarts automatically. You can stop the batch job by using
transaction code SM50 only.
This report starts the following processes:
Sending the batch with packaged NF-es
Sending the batch status request for the NF-e statuses that the authorities set for each NF-e.
Optional: Collecting acknowledgments from SAP NetWeaver Process Integration (SAP NetWeaver Process Integration)
The NFE application collects the technical processing information from SAP NetWeaver Process Integration that allows you to use
the NFE application as a single point of entry for monitoring the communication process with the authorities.
Caution
For the best possible performance, we strongly recommend to collect the acknowledgments from SAP NetWeaver Process
Integration by scheduling the report /XNFE/GET_ACKNOWLEDGMENT in a separate background job. In this case, you can
deactivate the Note Acknowledgements checkbox.
Collecting acknowledgments from SAP NetWeaver Process Integration (technical name: /XNFE/GET_ACKNOWLEDGMENT)
The NFE application collects the technical processing information from SAP NetWeaver Process Integration that allows you to use the
NFE application as a single point of entry for monitoring the communication process with the authorities.
Automatic Status Retransmission to ERP (technical name: /XNFE/UPDATE_ERP_STATUS)
If SAP ERP cannot process an NF-e status from SAP NFE due to a temporary error such as a locked document the NF-e status
will be sent again according to your scheduling of this job.
NF-e Layout 3.10+
You must define batch jobs for communication processes in SAP Nota Fiscal Eletrnica (SAP NFE) that require regular processing. You
need batch jobs for the following periodic tasks:
To collect and send NF-e batches to the authorities (technical name /XNFE/NFE_BATCH_PROCESS,
/XNFE/NFE_BATCH_CREATE, /XNFE/NFE_BATCH_REQUEST): Report XNFE/NFE_BATCH_CREATE creates batches and
sends these batches to authorities. Report /XNFE/NFE_BATCH_REQUEST requests the batch status at the authorities. Report
/XNFE/NFE_BATCH_PROCESS perform all 3 steps together.
There are two ways to schedule the jobs for sending batches to authorities. One is to just schedule report
/XNFE/NFE_BATCH_PROCESS. The other is to schedule report /XNFE/NFE_BATCH_CREATE and
/XNFE/NFE_BATCH_REQUEST in parallel. This can speed up batch processing for scenarios where many NF-es created in a
very short time period.
All three reports provide the selection parameter to run the report in an endless loop. When using this parameter, you can set the
waiting time between each loop via parameter Wait Time Until Next Call
Caution
If you schedule the reports for collecting NF-es into batches and sending batches and for requesting batches to run continuously
they use one batch process each.
Even if you decided to run the reports continuously, you can schedule these reports to run periodically. In case of a system
shutdown, restart, or system dump, the reports restart automatically.
If you schedule the reports to run continuously you can stop the batch jobs by using transaction code SM50.
Send Skipping requests to the authorities (technical name: /XNFE/NFE_SKIP_SEND): this report collects all skipping requests, which
are ready for sending and send them to authority. It can be scheduled for different selection parameters (Code of Brazilian State
(CUF), CNPJ of Issuer, System Environment and Issuing Type). If you use the provided selection parameters, make sure that you
schedule a job for all combinations that can occur in your company.
Send NF-es to B2B Partner (technical name: /XNFE/NFE_B2B_SEND): this report collects all NF-es, which are ready for sending
and send them to B2B Partner. It can be scheduled for different selection parameters (CNPJ of Recipient, CNPJ of Transporter). If you
use the provided selection parameters, make sure that you schedule a job for all combinations that can occur in your company.
Service Status Check (technical name: /XNFE/NFE_CHECK_SRV_STATUS): you are required to periodically check the availability
of the government systems that host the Web services for filing your NF-es or related messages. It is possible to schedule the
Service Status Check job for all regions at once, or for various regions (one or several regions). In order to check different regions,
you create variants for the existing regions and schedule them separately in different time intervals. No overlapping of intervals of
regions is allowed. Overlapping intervals could lead to a cancellation of the current job run.
You are required to periodically check the availability of the government systems that host the web services for filing your NF-es or
related messages. You have defined the time intervals for sending the status requests to the authorities in Customizing under Nota
Fiscal Eletrnica General Settings Maintain Own Tax Numbers (CNPJ) . (For more information, see Technical Settings for NF-e
Outbound). It is possible to schedule the Service Status Check job for all regions at once, or for various regions (one or several
regions). In order to check different regions, you create variants for the existing regions and schedule them separately in different time
intervals. No overlapping of intervals of regions is allowed. Overlapping intervals could lead to a cancellation of the current job run.
During this job, the system sends the service status requests to the relevant regional systems based on the interval you set in
Customizing and during job scheduling.
Recommendation
In Customizing, define the period values for your batch job according to the region with the shortest time interval requirement for
status requests.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 12 of 174
Restart all failed NF-es (technical name: /XNFE/NFE_CONTINUE_PROCESS): this report collects all failed NF-es with a temporary
error and tries resend them. This situation can occur during transferring the status information to the backend system, then
automatically resend is needed.
Collecting acknowledgments from SAP NetWeaver Process Integration (technical name: /XNFE/GET_ACKNOWLEDGMENT): the
NFE application collects the technical processing information from SAP NetWeaver Process Integration that allows you to use the
NFE application as a single point of entry for monitoring the communication process with the authorities.
Caution
In case sending NF-e Batch and NF-e Batch Status Request still occurs via the report /XNFE/PROCESS_REPORTS. We strongly
recommend collecting the acknowledgments from SAP NetWeaver Process Integration by scheduling the report
/XNFE/GET_ACKNOWLEDGMENT in a separate background job. In this case, you can deactivate the Note Acknowledgements
checkbox.
Activities
For creating a batch job, use transaction code SM36. Define the parameters for the period. To schedule the tasks separately use the
following reports:
/XNFE/NFE_BATCH_PROCESS (or XNFE/NFE_BATCH_CREATE and /XNFE/NFE_BATCH_REQUEST)
/XNFE/NFE_SKIP_SEND
/XNFE/NFE_B2B_SEND
/XNFE/NFE_CHECK_SRV_STATUS
/XNFE/NFE_CONTINUE_PROCESS
/XNFE/GET_ACKNOWLEDGMENT
Prerequisites
You must maintain the system and component information in the system landscape directory (SLD).
You must install Java Web Start before you can use the Integration Builder for configuration activities in SAP NetWeaver PI.
Note
The settings below are described to assist a trained SAP NetWeaver PI consultant with the necessary configuration activities.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 13 of 174
Process
For configuring SAP NetWeaver PI for SAP NFE, you can use the following general steps for an inside-out approach. This will allow you
to easily complete your configuration scenarios based on pre-defined configuration objects.
1. Create configuration scenarios in the Integration Directory based on the integration scenarios from theIIntegration Repository. The
integration scenarios group all possible entities for a specific communication situation based on government requirements. (See
Creating NF-e Configuration Scenarios from Integration Scenarios (Outbound))
2. Define configuration objects that can be reused across different integration scenarios. (See Configuration Object Definition for NF-e
Configuration Scenarios (Outbound)).
Configuration objects include communication partners and communication channels to those partners. By defining these objects at
the beginning, you can increase the efficiency of the scenario configuration.
3. Complete the scenario configuration by assigning centrally-defined settings and defining specific parameters. (See Completing NF-e
Configuration Scenario Settings (Outbound).
4. Configure the alerts that SAP NetWeaver PI provides if you want the system to notify responsible persons about communication
failures. (See NF-e Alert Configuration).
Recommendation
You should obtain a copy of the Brazilian authorities Taxpayers' Integration Guide, which contains the official technical standards
and requirements for electronic communication. The guide also lists the URLs of the Web services for the individual regions to which
you need to connect using SAP NetWeaver PI.
More Information
Each outbound message needs to be signed using a government-issued certificate with a private key. SAP NFE includes the signature
service in the message handling of SAP NetWeaver PI. For more information, see Digital Signature Configuration for NF-e Outbound.
Note
Creating the configuration scenarios first helps familiarize you with the NF-e naming conventions that you can use when you create
configuration objects. This ensures that naming is consistent.
Procedure
In your SAP NetWeaver Process Integration (SAP NetWeaver PI) system, enter SXMB_IFR to start the Exchange Infrastructure tools
to set up configuration scenarios.
2. Open Integration Builder: Configuration by choosing Integration Directory.
3. In the menu bar, choose Tools Transfer Integration Scenario from the Integration Repository . Taking into account the software
component version of SAP NFE that you have installed, create a configuration scenario for each integration scenario.
1. The input help for the integration scenario names lists all available scenarios from that you can select. After making the selection,
choose Ok.
2. Choose Continue to create the configuration scenario based on the delivered integration scenario and adapt the name to your
needs.
1.
Recommendation
Use a prefix when copying the integration scenarios as templates for your configuration project. Although the system sorts the
integration scenarios in the Integration Builder design environment by software component, it sorts the configuration scenarios
alphabetically. You can group all SAP NFE configuration scenarios in the configuration environment by using the same prefix.
4.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 14 of 174
Caution
Be aware that you have to configure every integration scenario individually for every NF-e layout version that you need. For
example, if you use the BATCH_WebAS_Outbound_Batch integration to send NF-e batches in layout 2.00 and now want to send
NF-e batches in layout 3.10 or higher, you also have to configure the BATCH_WebAS_Outbound_Batch integration scenario for
NF-e layout 3.10 or higher.
Note
The technical names in SAP NetWeaver PI for SAP Nota Fiscal Eletrnica refer to the core application as WebAS.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 15 of 174
This integration scenario contains all objects relevant to configuring the batch sending of signed NF-es to the authorities.
BATSR_WebAS_Outbound_BatchStatusRequest
This integration scenario contains all objects relevant to configuring the collection of NF-e statuses from the authorities This occurs
after the expiration of the time period that you received from the authorities in the above integration scenario. The logistics process
can only continue after receiving this message with an authorizing status code from the authorities.
NFESC_WebAS_Outbound_NFeStatusCheck
This integration scenario contains the objects relevant to configuring the retrieval of status information about a NF-e from the
authorities. This scenario is necessary for checking the status of all NF-es sent to the authorities in batches for which you cannot
retrieve the status information with the batch status check. The government is required to keep NF-e statuses only for a specific
period. If you cannot collect the status due to system downtime, you must request the NF-e status for each NF-e individually by using
this integration scenario. You also need this scenario to check the status of NF-es that you receive from your business partners.
NTB2B_WebAS_Outbound_B2B_NFe
This integration scenario contains the objects relevant to configuring the sending of NF-es to defined business partners. There are two
views available in the integration scenario:
NTB2B_WebAS_Outbound_B2B_NFe_NamespaceEnhanced
NTB2B_WebAS_Outbound_B2B_NFe
We recommend to use NTB2B_WebAS_Outbound_B2B_NFe_NamespaceEnhanced. The view
NTB2B_WebAS_Outbound_B2B_NFe should no longer be used.
SKIPR_WebAS_Outbound_SkippingRequest
Brazilian authorities require that NF-es be numbered in consecutive order. After an NF-e is rejected, the number of this NF-e is used
up and cannot be used again. Whenever an NF-e is rejected, you must inform the authorities about the gap in the sequence by
sending a request to skip the used number. This integration scenario contains all objects relevant to configuring the sending a skipping
request to the authorities and the receipt of the authorities response.
SRVSC_WebAS_Outbound_ServiceStatusCheck
This integration scenario contains all objects relevant to configuring the checking of the availability of the authorities' system at a
specific interval. Every company is required to regularly check government system availability.
ETB2B_WebAS_Outbound_B2B_Event
This integration scenario contains all objects relevant to configuring the sending of authorized events to B2B partners.
EFB2B_WebAS_Inbound_B2B_Event
This integration scenario contains all objects relevant to configuring the receiving of events from B2B partners.
EVENT_WebAS_Outbound_EventReceipt
This integration scenario contains all objects relevant for configuring the sending of events to the authorities and the receipt of the
authorities response for these requests. Examples for NF-e events are the cancellation request or the correction letter.
Scenarios in the Communication Process for Sending NF-es to the Authorities
Structure
You can identify the dependent objects of an integration scenario by checking the first five digits in the technical name. If you use the
integration scenarios as templates for your configuration scenarios, the objects are already grouped. Adhere to the naming conventions
when creating objects to keep consistent object names.
The list below contains examples of the naming conventions:
BATCH, BATSR
Objects starting with BAT always belong to scenarios for communicating with the authorities about batched NF-es.
BATCH: The objects with the BATCH prefix are for sending NF-es to the authorities in batches.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 16 of 174
BATSR: The characters SR stand for status request, in which your system collects the status from the authorities' system for all NFe sent with a certain batch.
CANCR, CTB2B: All objects starting with C are used in cancellation scenarios.
CANCR: Without any further identification in the name, this is a cancellation request for a regular NF-e to the authorities
CTB2B: The additional specification within the name refers to a B2B scenario. This is a cancellation sent to a business partner..
NTB2B
Similar to the explanations above, objects starting with these prefixes are also used in the B2B scenarios. NTB2B is for sending a NFe to the business partner.
NFESC
Objects that begin with this prefix are necessary in specific NF-e communication processes.
You need these objects to check the status of all NF-es sent to the authorities in batches for which you cannot retrieve the status
information with the batch status check. You also need these objects in a B2B scenario to check the current status in the authorities'
system of a NF-e or a cancellation that you received from a business partner before. The last two characters SC stand for status
check.
SKIPR
Objects with this prefix depend on the skipping scenario, represented by SKIP for skipping and R for request.
SRVSC
This prefix stands for service (SRV) status (S) check (C) and combines all objects that the system needs to check the authorities'
system availability.
EVENT
The prefix E is used in Event scenarios, the main scenario using the word EVENT itself.
ETB2B
The prefix E is used in Event scenarios, T stands for TO, B2B means B2B partner.
Example
The integration scenario BATSR_WebAS_Outbound_BatchStatusRequest for the batch status request, represented by the
prefix BATSR, contains the following dependent objects:
Integration Scenario: BATSR_WebAS_Outbound_BatchStatusRequest
Integration Process: BATSR_BatchStatusRequestProcess
Interface: BATSR_nfeRetRecepcao_SYNC
Action: BATSR_SendBatchStatusRequest
Features
You can centrally define the following generic objects (grouped by object type):
Communication Partners
A wizard leads you through the process of creating communication partners as configuration objects. You must specify the connection
parameters, such as target URLs. Required entries include:
Your company as internal party
For your own company, you must define a business service without a communication channel. This entry is mandatory, although it
remains empty.
Government systems
You must create a separate partner entry for each regional authority because of their distributed responsibilities and associated
system information. You can define the conditions for determining the recipient within a specific configuration scenario, SAP
NetWeaver Process Integration (SAP NetWeaver PI) then determines the correct recipient by analyzing the payload in the XMLs sent
by the NFE core application.
If the authorities of a region provide communication with different system environments that you want to use, you must create two
different Business Services: one for the productive system environment and the other for the homologation (test) environment for
the communication partner representing that regional authority.
For each configuration scenario representing an interface to the authorities in a specific process, the authorities use a special Web
service to respond to requests. Web services can differ between different regions. For each available Web service, you must
create a Communication Channel as a SOAP receiver channel within a business service for a region.
Business partners for business-to-business (B2B) scenarios
You must create a partner entry for each business partner with which you agree to exchange NF-es and NF-e cancellation notices.
You must create separate Business Services if you want to send NF-es to a business partner.
You must create separate Communication Channels for sending NF-es and for sending cancellation notices.
The adapter type for your communication channels depends on the agreement with your business partners, for example, FTP or
other file adapter.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 17 of 174
Activities
To open the Integration Directory in the Integration Builder for Configuration, follow the instructions under Creating NF-e Configuration
Scenarios from Integration Scenarios (Outbound).
In the navigation section, you can choose the Objects tab page to assign or create the required objects and use the wizards
provided.
Note
You should import the certificate, including the CA chain, as one single PFX file as described in SAP Note 1524196.
Enable certificate-based authentication and select your relevant certificate (Keystore View / Keystore Entry). For more information
about the import of certificates into the keystore, refer to NF-e/CT-e Administrator.
4. The entries in SOAP action field must correspond to the release version of the authorities' Web services.
5. Enable Do Not Use SOAP Envelope under Conversion Parameters due to the fact that the SOAP Envelope is created during the
mapping process.
6. In the tabstrip of the module of the communication channels add the following Local Enterprise Bean for all SOAP communication
channels connected to SEFAZ systems twice: localejbs/AF_Modules/MessageTransformBean
This bean has to be the first and the last entry in your processing sequence. Please choose a self-defined module key for each entry.
Set the first module key to:
Parameter Name: Transform.ContentType
Parameter Value: application/soap+xml; charset=utf-8
Set the last module key to:
Parameter Name: Transform.ContentType
Parameter Value: text/xml; charset=utf-8
A template called GOV_006_SOAP_RCV_TMPL is provided with the PI content of this release for your reference.
3.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 18 of 174
SAP NetWeaver PI offers an array of possibilities for communicating with B2B partners. A new, more flexible configuration approach for
the NTB2B_WebAS_Outbound_B2B_NFe and the CTB2B_WebAS_Outbound_B2B_Cancellation integration scenarios has
been implemented.
The NTB2B_WebAS_Outbound_B2B_NFe scenario offers two options to configure your partner communication:
Option 1 (recommended): This scenario verifies that the government namespace will be used on the NF-e tag level.
Option 2 (for customer-specific developments): This scenario is for customer-specific developments. The government namespace will
not be verified on the NFe tag level.
The SAP NFE system populates the receiver service in the XI message header with the CNPJ code (pattern CNPJ <cnpjcode> ) of
your business partner (buyer or carrier). This additional information gives you several options to configure the receiver determination in
your PI system:
You can use the predefined Service as Identifier: This straightforward approach uses the Integration Scenario Configurator. Create
one generic party or a several parties for your B2B partners and use their respective CNPJs to determine the receiver service. In the
receiver determination, set Service to Receiver Service.
Caution
In the generated receiver determinations, the Party and Service fields under Receiver must be set as * (asterisk).
The receiver determination now contains your own defined Party object, but also accepts the Receiver Service already populated
from the SAP NFE WebAS. Create the interface determinations and corresponding Receiver Agreements for each receiver to
determine the communication direction within the relevant communication channel.
You can use extended receiver determination to translate the receiver-service-CNPJ into specific partners: If you already created
your B2B partners in XI and want to re-use them, message mapping reads the Receiver parameter from the message headers. You
can then use a value mapping of your choice to match the CNPJ numbers with your target B2B partners. Receiver determinations are
no longer necessary, and you can re-use existing Interface Determinations and Receiver Agreements. The approach described in
SAP Note 1525562 (with minor enhancements) can be applied to this scenario.
You can use generic receivers: You can use the receiver-service-CNPJs to determine the mail address by using the SAP PI Lookup
API and the Dynamic Adapter Configuration. ,
You can also implement the Business Add-In /XNFE/EMAIL_B2B to add the e-mail address in SAP NFE as an attachment to the XI
message. You can extract this e-mail address in your PI system via adapter module (PI 7.0) or Message/Java mapping (PI 7.1 and
higher).
Prerequisites
You must have already created configuration scenarios (see Creating NF-e Configuration Scenarios from Integration Scenarios
(Outbound)) and defined configuration objects (see Configuration Object Definition for NF-e Configuration Scenarios (Outbound)).
Procedure
Note
To use the Integration Builder for configuration, follow the instructions for Creating NF-e Configuration Scenarios from Integration
Scenarios (Outbound)
Select a configuration scenario in the navigation structure for scenarios.
For the selected configuration scenario, choose the icon with the quick info Integration Scenario Configurator from the function menu.
3. The system opens a wizard that contains all objects for this scenario. The settings that you defined in a previous step have already
been applied. Follow the instructions of the Integration Scenario Configurator, which leads you through the configuration process.
The component view for each configuration scenario provides an overview of the involved business partners and objects that you
must consider in the configuration steps.
1. Choose Assign Services.
You can navigate between the different settings by switching between the relevant parties. To do so, use the forward and back
arrows with the quick info links Next Role or Previous Role.
You can use the different tab pages for each object assigned to one role. If you need to involve a business partner, the authorities,
or a particular Web service for the digital signature, for example, you can assign the services that you defined in a previous step.
2. Choose Configure Connections and define or assign the relevant settings by navigating between the relevant parties and objects
using the arrows or the tab pages.
1.
2.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 19 of 174
Note
Because of government requirements for electronic messages, SAP NetWeaver PI content for SAP NFE uses the authorities
XML schema names for the message interfaces, and adds only control data.
Choose Generate. The system creates all dependent entries for the configuration scenario based on the template information in
the integration scenario.
4. To ensure that messages are routed to the correct target, you must configure content-based routing for all Receiver Determinations
in government processes, for example, in the configuration scenario NFE_NFESC_WebAS_Outbound_NFeStatusCheck. You
configure this routing by defining conditions (the values in specific XML fields) for each recipient government system.
tpAmb = 2 indicates a homologation system
tpAmb = 1 indicates a productive system
The cUF field in the XML payload contains the state number. The tpEmis field determines the issuing type to indicate if a
contingency environment is used. For SVC, check technical note 2013/007 to find the relevant SVC server for your state:
tpEmis
Authorization
3.
SEFAZ (DPEC)
Using the combination of the cUF entry and tpAmb and tpEmis, the system can identify the correct receiving government system
and your routing rules have to ensure that, for example, the following targets are reached:
tpEmis
cUF
tpAmb
Target
1
43
RS Production
35
SP Homologation
any
SCAN Homologation
any
SVC-AN Production
any
SVC-RS Homologation
Remember that the contingency event service for the cancellation event is always available for the NF-e authorized in the
contingency system. However, other events, such as CC-e, are not available.
The configuration of SVC is not possible for the SKIPR_WebAS_Outbound_SkippingRequest scenario. The skipping
request of an unused NF-e has to be transferred to a SEFAZ system.
5. You can check your settings for a configuration scenario by choosing Tools Test Configuration in the menu bar.
Note
For a more detailed overview, see SAP Note 1743455.
Process
NWA Destination Configuration in PI
Open NWA ( http://<host>:<port>/nwa Configuration Infrastructure Destinations ) and maintain the HTTP destination
GRC_NFE_WAS with the following URL:
http://<host>:<port>//sap/xi/engine?type=entry&sap-client=<client>&sap-language=EN
Replace host, port and client values with the values of your SAP NFE backend. For the event that you have multiple SAP NFE
backends, you need to define separate destinations (destination name is arbitrary) for every individual backend.
2. Communication Channels in PI
When the integration scenarios are generated as an Integrated Configuration it is necessary to use the delivered Communication
Channel templates. These templates contain the adapter modules in the correct order. The adapter modules replace the ccBPM
logic.
In the SOAP Sender Channel that receives messages from your SAP NFE system populate the HTTP Destination field of the
Acknowledgement Handling Tab with your created Destination in point 1.
3. Post-generation Step in PI
1.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 20 of 174
After generating the objects, copy the generated Integrated Configuration for the Response message from the authorities (SEFAZ is
sender) to the SAP NFE sender system of the request message as a virtual receiver of the response message. Delete the
generated Integrated Configuration without the Virtual Receiver.
The B2B scenarios from the SAP NFE system to your B2B partner (NTB2B, ETB2B for NF-e and CTB2B, CancCTB2B for CT-e)
have to have a virtual receiver with the asterisk (*), because the receiver is already populated with the CNPJ number in the SAP NFE
system.
Note
A detailed explanation and examples are provided in SAP Note 1743455.
4.
Process
Activities
To configure alerts, use transaction code ALRTCATDEF and create the alert category NFE_ALRT_CAT.
Define your alert rules according to the alert configuration descriptions in SAP Library for SAP NetWeaver PI.
Process
You define basic technical settings such as the following (see Process Settings and Customizing for CT-e Outbound:
System environments and storage locations for digital-signature certificates
Status codes of the authorities, based on which the system controls follow-up activities
Number ranges for batches that group CT-es
Services for user interface displays
2. You define the following process-related settings (see CT-e Batch Processing in Core Application (Outbound) according to your
requirements:
Monitoring settings for optimized process observation
3. You plan batch jobs (see CT-e Batch Job Planning (Outbound)) for regular tasks.
4. You define user roles and authorizations (see User Roles and Authorizations for CT-e (Outbound) by tax number.
1.
More Information
Digital Signature Configuration for CT-e Outbound
Setup of System Communication from and to Core Application for CT-e
Activating Services for UI Display of CT-e Monitors (Outbound)
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 21 of 174
CT-e Configuration
SAP NW PI Configuration for CT-e (Outbound)
Creating CT-e Configuration Scenarios from Integration Scenarios
Integration Scenarios for CT-e Configuration (Outbound)
Configuration Object Definition for CT-e Configuration Scenarios
CT-e Communication with Authority Systems (Outbound)
Completing CT-e Configuration Scenario Settings (Outbound)
Configuration for NFE on AEX (Java-only PI)
Features
The following settings are found in Customizing under Nota Fiscal Eletrnica Outbound .
Maintain System Response for Own Tax Numbers (CNPJ)
You use the tax number of your company to define the storage location of the certificate that you must use for digital signatures.
Note
Depending on the responsible regions ability to support electronic communication, the government can require companies or
industry branches to operate electronic communication in their productive environment. Companies for which the electronic
communication of notas fiscais is still optional can prepare their infrastructure and processes in an offline test environment to
facilitate switching to electronic communication later on.
CT-e: Maintain Connected Government Systems
In this Customizing activity, you configure the settings that the system needs for deciding to which government system your
messages are to be sent.
Activities
Select the desired logical system and enter your tax number (CNPJ). Then select the region of the government system you want to
communicate with, and determine whether you want to use the live system or the test system.
CT-e: Maintain Version of Message Types
In this Customizing activity, you determine which XML version is used for individual message types when communicating with
authorities.
Requirements
In Customizing activity "CT-e: Define Connected Government Systems", you have defined the government system you want to
communicate with.
Activities
Enter your logical system and your tax number. A blank tax number is also permitted. To achieve this, you can either delete the tax
number after selecting the default values, or you can manually enter the logical system. Then select the document type, the
message type, and the desired XML version. To determine the XML version, the system first searches an entry for the respective
tax number. If no such entry is found, the system uses the entry with a blank tax number. If no such entry can be determined, the
system stops the process and returns the error ("D" - discrepancy; resend from ERP) to the ERP system. The following document
types must be defined for each tax number you use:
CTE for CT-e
EV2 for CT-e event
Document Type CT-e
Sending of CT-es requires an XML version for the generic layout (attribute 'versao' in tag "infCte") as well as another version for the
transport mode-dependent layout that was used (attribute 'versaoModal' in tag "infModal". For example, if you want to use the new
layout 2.00 for sending CT-es with transport mode 'rodo', you need to maintain two entries: one for message type 'CTE' and one for
message type 'RODOCTE'.
CTE --> Generic layout
AEREOCTE --> CT-e: Transport mode Air (only relevant from version 2.00 and higher)
AQUAVCTE --> CT-e: Transport mode Ship (only relevant from version 2.00 and higher)
DUTOCTE --> CT-e: Transport mode Pipeline (only relevant from version 2.00 and higher)
FERROVCTE --> CT-e: Transport mode Rail (only relevant from version 2.00 and higher)
RODOCTE --> CT-e: Transport mode Road (only relevant from version 2.00 and higher)
MULTMODCTE --> CT-e: Transport mode Multimodal (only relevant from version 2.00 and higher)
To send other messages for a CT-e, maintain the XML versions for the following message types:
INUTCTE --> Skipping
SITCTE --> CT-e status query
STASERVCTE --> Service status query
Document type CT-e Event
Sending of CT-e events requires an XML version for the generic layout (attribute 'versao' in tag "eventoCte") as well as another
version for the event type-dependent layout that was used (attribute 'versaoEvento' in tag detEvento"). For example, if you want to
use the new layout 2.00 for sending CT-e events with type 'cancellation', you need to maintain two entries: one for messsage type
'EVENTO' and one for message type '110111'.
EVENTO --> Issue Event (only relevant from version 2.00 and higher)
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 22 of 174
110110 --> Correction Letter (only relevant from version 2.00 and higher)
110160 --> CT-e Multimodal (only relevant from version 2.00 and higher)
110111 --> Cancellation (only relevant from version 2.00 and higher)
110113 --> EPEC (only relevant from version 2.00 and higher)
CT-e: Define Query for Service Status for Authority (SEFAZ)
In this Customizing activity, you configure the settings that the system needs for the automatic query of system availability for CT-e
of the SEFAZ system and the responsible contingency (SVC) system. You are required to query this status and can control the
status query dependent on your batch planning or document volume. To do so, you can use the following parameters for each
combination of Brazilian region and system environment: :
Frequency of status query in seconds
Version for XML data for the CT-e
Time zone
Testing of the SVC system: The following options are available here ->
SEFAZ has priority, contingency system is also checked: The system availability of the SEFAZ system is tested first; if SEFAZ
is unavailable, the responsible SVC system is tested. If both systems are available, the CT-es are sent to SEFAZ.
SEFAZ has priority, contingency system is not checked: The system availability of the SEFAZ system is tested first; the
responsible SVC system is not tested. If the SEFAZ system is unavailable, the CT-es cannot be sent to the SVC system.
Contingency system has priority, SEFAZ is also checked: The system availability of the SVC system is tested first; if the SVC
system is unavailable, SEFAZ is tested. If both systems are available, the CT-es are sent to the SVC system.
If the status query reports that the system is available, SAP Nota Fiscal Eletronica (SAP NFE) continues the electronic
communication process. If the system is unavailable, you can continue the process manually in the application monitor.
Definition of the responsible SVC system:
43 Rio Grande do Sul (RS, tpemis = 7)
35 Sao Paulo (SP, tpemis = 8)
You can access the Customizing activities and their descriptions by entering SPRO and executing the appropriate activity after
choosing Nota Fiscal Eletrnica Outbound .
Other Activities
Batches that package CT-es require a number range both to identify and to monitor the batches in process. In the batch monitor of the
core application, you can use this number range to access all CT-es that the system has combined into one batch.
Use transaction code SNUM to create the number range for the object /XNFE/CTBT, and create interval 01 with a length of 15 digits.
You must activate the screen display for the monitors by activating the respective services.
For more information, see Activating Services for UI Display of CT-e Monitors (Outbound).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 23 of 174
communicate with the authorities and business partners through specific Process Integration (PI) content for SAP NFE. To set up the
communication process, you must define the system connection between the different instances.
Note
The setup of the system connection from SAP NetWeaver PI to the necessary systems is part of the configuration process in SAP
NetWeaver PI. For more information, see the specific descriptions in SAP NW PI Configuration for CT-e (Outbound).
Prerequisites
You have defined and assigned the logical systems in SAP ERP and the core application of SAP NFE. For more information, see
Setting Up Logical Systems in SAP NetWeaver Library under Functional View SAP NetWeaver by Key Capability Security
Identity Management .
The communication between the feeder system and the SAP NFE application is based on Remote Function Call (RFC) technology.
You have defined an RFC user in SAP NFE, each relevant feeder system that you must assign in the system connection setup, and
SAP NetWeaver PI.
Features
The following system connections are necessary for the communication process:
From SAP ERP to the core application of SAP NFE
The business process for invoicing in SAP ERP triggers the electronic communication to the authorities by sending the data for the
electronic fiscal documents (CT-es) to the core application of SAP NFE. There the system processes the messages according to the
legal requirements. For the transfer of the document data, you must set up the system connection from SAP ERP to the core
application of SAP NFE. Based on your existing system landscape, you can connect one or several logistics systems as feeder
systems to the core application of SAP NFE.
Note
The feeder systems provide the billing data and tax-related information that the authorities require, and can either be SAP ERP or
any other legacy system.
From the core application of SAP NFE to SAP ERP
You need to connect SAP NFE to SAP ERP to synchronize the status information you receive from the government. This status
information influences the invoicing and follow-on processes, for example, continuing the logistics process based on authorized CTes, or initiating the contingency process for electronic fiscal documents in SAP ERP. You must set up a connection to each of the
feeder systems in your system landscape that requires status updates after electronic communication with the authorities.
From the core application of SAP NFE to SAP NetWeaver PI
You define this system connection to transfer messages between the SAP NFE core application and SAP NetWeaver PI for further
processing. This is a prerequisite for routing the messages to their respective destinations, such as to the authorities' systems, to the
Web service for a digital signature, or to a business partner in business-to-business scenarios.
Activities
Perform the following Customizing activities found under Nota Fiscal Eletrnica Communication to ERP Backend System :
From SAP ERP to core application of SAP NFE
You must define the RFC destination for SAP NFE by using transaction code SM59 in the feeder system. This requires the ABAP
Connection connection type.
In addition to the technical data for the system location, you must enter the logon data for the RFC user that you created in the core
application of SAP NFE on the tab page Logon/Security.
From the core application of SAP NFE to SAP ERP
You must define the RFC destination for SAP NFE by using transaction code SM59 in the feeder system. This requires the ABAP
Connection connection type.
In addition to the technical data for the system location, you must enter the logon data for the RFC user that you created in the
relevant SAP ERP system on the tab page Logon/Security.
You must also maintain the relationship between the RFC destination and the logical system. You can do this by using transaction
code BD97. Under Standard BAPI destination assign the RFC destination to the logical system.
You can access the Communication to ERP Backend System Customizing activity and respective description by entering SPRO and
executing the appropriate activity after choosing Nota Fiscal Eletrnica Communication to ERP Backend System .
From the core application of SAP NFE to SAP NetWeaver PI
You must define the RFC destination for SAP NFE by using transaction code SM59 in the feeder system. This needs the connection
type HTTP Connection to ABAP System.
In addition to the technical data for the system location, you must enter the logon data for the RFC user that you created in SAP
NetWeaver PI on tab page Logon/Security.
Page 24 of 174
You must activate the relevant UI services for master data maintenance and for monitoring of central messaging.
Procedure
Enter transaction code SICF and choose Execute.
Select the following entries in the navigation tree for the Virtual Hosts/Services under default_host sap bc webdynpro xnfe .
3. Activate the service for displaying the user interfaces for each of the following entries by using the context menu and selecting
Activate Service:
cte_monitor for CT-e Monitor
cte_monitor_arch for CT-e Monitor for Archived CT-es
cte_batch_monitor for CT-e Batch Monitor
cte_servsta_monitor for CT-e Service Status Monitor
ssf maintenance for SSF maintenance
4. In addition, you must activate the following basic services in the navigation tree for the Virtual Hosts/Services under default_host
sap public bc :
ur for Unified Rendering
icons for SAP Icons
icons_rtl for Icons RTL
pictograms for Pictograms
webdynpro for Web Dynpro MIME Handling
1.
2.
Features
You need batch jobs for the following periodic tasks:
Collect CT-es into batches
Send batches to the authorities
Send batch status requests to the authorities
Send Cancellation requests to the authorities
Send Skipping requests to the authorities
Service Status Check: You are required to periodically check the availability of the government systems that host the Web services
for filing your CT-es or related messages.
Retransmit all failed communications to ERP.
Every task presents one report that can be scheduled separately. There are two ways to schedule these tasks.
1. Schedule one periodic batch job that calls all listed tasks one after another
2. Schedule each task (respectively report) separately. For all reports (except report for creating batches), you have the opportunity to
schedule the report for different selection parameters (for example, region, CNPJ code)
Caution
If the reports for collecting CT-es into batches, for sending batches and for requesting batches, are scheduled separately, then they
run continuously and use one batch process each.
Even though these reports are programmed to run continuously, You can schedule these reports to run in intervals. In case of a
system shutdown, restart, or system dump, the reports restart automatically.
You can stop the batch jobs by using transaction code SM50.
Activities
For creating a batch job, use transaction code SM36.
Define the parameters for the period.
If you want to create a periodic batch job that calls all listed tasks one after another use program /XNFE/CTE_PROCESS
If you want to schedule the tasks separately use the following reports:
/XNFE/CTE_BATCH_CREATE
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 25 of 174
/XNFE/CTE_BATCH_SEND
/XNFE/CTE_BATCH_REQUEST
/XNFE/CTE_CANCEL_SEND
/XNFE/CTE_SKIP_SEND
/XNFE/CTE_CHECK_SRV_STATUS
/XNFE/UPDATE_ERP_STATUS
Note
In report /XNFE/CTE_BATCH_CREATE you can define the maximum collection time per batch via parameter.
All reports (except /XNFE/CTE_BATCH_CREATE) can be scheduled for different regions or a different CNPJ code. If you use the
provided selection parameters, make sure that you schedule a job for all combinations that can occur in your company.
Note
You can run the Batch Send and the Batch Request report in parallel. That means you can schedule several jobs for report
/XNFE/CTE_BATCH_SEND and /XNFE/CTE_BATCH_REQUEST with the same selection parameters (region and CNPJ code).
This can speed up batch processing for scenarios where many CT-es for the same region and with same CNPJ code are created in
a very short time period.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 26 of 174
is 0001 and is valid for XML version 1.04b. This value of the version correlates not necessarily with an XML version. Interface version
0001 is possibly valid for several XML versions (for example 1.04b and 1.05a).)
DOCNUM (CT-e document number)
ACCESSKEY (44-digit access key
LOGSYS (Logical system)
Prerequisites
You must maintain the system and component information in the system landscape directory (SLD).
You must install Java Web Start before you can use the Integration Builder for configuration activities in SAP NetWeaver PI.
Note
The settings below are described to assist a trained SAP NetWeaver PI consultant with the necessary configuration activities.
Process
For configuring SAP NetWeaver PI for SAP NFE, you can use the following general steps for an inside-out approach. This enables you to
easily complete your configuration scenarios based on predefined configuration objects.
1. Create configuration scenarios in the Integration Directory based on the integration scenarios from theIntegration Repository. The
integration scenarios group all possible entities for a specific communication situation based on government requirements. (See
Creating CT-e Configuration Scenarios from Integration Scenarios )
2. Define configuration objects that can be reused across different integration scenarios. (See Configuration Object Definition for CT-e
Configuration Scenarios).
Configuration objects include communication partners and communication channels to those partners. By defining these objects at
the beginning, you can increase the efficiency of the scenario configuration.
3. Complete the scenario configuration by assigning centrally-defined settings and defining specific parameters. (See Completing CT-e
Configuration Scenario Settings (Outbound).
Recommendation
You should obtain a copy of the Brazilian authorities Taxpayers' Integration Guide, which contains the official technical standards
and requirements for electronic communication. The guide also lists the URLs of the Web services for the individual regions to which
you need to connect using SAP NetWeaver PI.
More Information
Each outbound message needs to be signed using a government-issued certificate with a private key. SAP NFE includes the signature
service in the message handling of SAP NetWeaver PI. For more information, see Digital Signature Configuration for CT-e Outbound.
Note
Creating the configuration scenarios first helps familiarize you with the NF-e naming conventions that you can use when you create
configuration objects. This ensures that naming is consistent.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 27 of 174
Procedure
In your SAP NetWeaver Process Integration (SAP NetWeaver PI) system, enter SXMB_IFR to start the Exchange Infrastructure tools
to set up configuration scenarios.
2. Open Integration Builder: Configuration by choosing Integration Directory.
3. In the menu bar, choose Tools Transfer Integration Scenario from the Integration Repository . Taking into account the software
component version of SAP NFE that you have installed, create a configuration scenario for each integration scenario.
1. The input help for the integration scenario names lists all available scenarios from that you can select. After making the selection,
choose Ok.
2. Choose Continue to create the configuration scenario based on the delivered integration scenario and adapt the name to your
needs.
1.
Recommendation
Use a prefix when copying the integration scenarios as templates for your configuration project. Although the system sorts the
integration scenarios in the Integration Builder design environment by software component, it sorts the configuration scenarios
alphabetically. You can group all SAP NFE configuration scenarios in the configuration environment by using the same prefix.
4.
Note
The technical names in SAP NetWeaver PI for SAP Nota Fiscal Eletrnica refer to the core application as WebAS.
CTEBATCH_WebAS_Outbound_CTeBatch_SYNC
This integration scenario contains all objects relevant to configuring the batch sending of signed CT-es to the authorities.
CTEBATSR_WebAS_Outbound_CTeBatchStatusRequest_SYNC
This integration scenario contains all objects relevant to configuring the collection of CT-e statuses from the authorities. This occurs
after the expiration of the time period that you received from the authorities in the above integration scenario. The logistics process
can only continue after receiving this message with an authorizing status code from the authorities.
CTECANCR_WebAS_Outbound_CTeCancellationRequest_SYNC
This integration scenario contains all objects relevant to configuring the sending of cancellation requests to the authorities and the
receipt of the authorities response to those requests.
Caution
This scenario is only relevant for CT-e release 1.04. From CT-e release 2.00, the Cancellation Event has to be used.
CTESKIPR_WebAS_Outbound_CTeSkippingRequest_SYNC
Brazilian authorities require that CT-es are numbered in consecutive order. After a CT-e is rejected, the number of this CT-e is used up
and cannot be used again. Whenever a CT-e is rejected, you must inform the authorities about the gap in the sequence by sending a
request to skip the used number. This integration scenario contains all objects relevant to configuring the sending a skipping request to
the authorities and the receipt of the authorities response.
CTESC_WebAS_Outbound_CTeStatusCheck
The CT-e status check is executed asynchronously. Ensure that the configuration is based on the integration scenario
CTESC_WebAS_Outbound_CTeStatusCheck from namespace http://sap.com/xi/CTE/104.
CancCTB2B_WebAS_Outbound_B2B_Cancellation (Cancellation (relevant for CT-release 1.04 only))
This integration scenario contains the objects relevant for configuring the sending of cancellation messages to a business partner after
previously sending a CT-e to the partner.
CTB2B_WebAS_Outbound_B2B_Cte (relevant for CT-e release 1.4 and 2.00)
This integration scenario contains the objects relevant for configuring the sending of CT-es to defined business partners.
Improvements in CT-e Version 2.00
The CT-e release 2.00 ships with an event that is contained in the PI content from SP15 onwards. It is necessary to configure the
following scenario for events:
CTEEV_WebAS_Outbound_CTeEvent_SYNC
This integration scenario contains all objects relevant for configuring the sending of events to the authorities and the receipt of the
authorities response for these requests. Examples for CT-e events are the cancellation request or the correction letter. This scenario
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 28 of 174
Structure
You can identify the dependent objects of an integration scenario by checking the first characters in the technical name. If you use the
integration scenarios as templates for your configuration scenarios, the objects are already grouped. Adhere to the naming conventions
when creating objects to keep consistent object names.
The list below contains examples of the naming conventions:
CTEBATCH, CTEBATSR
Objects starting with CTEBAT always belong to scenarios for communicating with the authorities about batched CT-es.
CTEBATCH: The objects with the CTEBATCH prefix are for sending CT-es to the authorities in batches.
CTEBATSR: The characters SR stand for status request, in which your system collects the status from the authorities' system for all
CT-e sent with a certain batch.
CTECANCR
All objects that contain CANCR are used in cancellation scenarios.
CTECANCR: This is a cancellation request for a regular CT-e to the authorities
CTESKIPR
Objects with this prefix depend on the CT-e skipping scenario, represented by SKIP for skipping and R for request.
CTEEV
Objects with this prefix are used in event scenarios.
Example
The integration scenario CTEBATSR_WebAS_Outbound_CTeBatchStatusRequest_SYNC for the batch status request,
represented by the prefix CTEBATSR, contains the following dependent objects:
Integration Scenario: CTEBATSR_WebAS_Outbound_CTeBatchStatusRequest_SYNC
Interfaces: CTEBATSR_cteRetRecepcaocte_SYNC_OB and CTEBATSR_cteRetRecepcaocteSoapIn_SYNC_IB
Actions: CTEBATSR_SendBatchStatusRequest_SYNC and CTEBATSR_ReceiveBatchStatusRequest
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 29 of 174
Features
You can centrally define the following generic objects (grouped by object type):
Communication Partners
A wizard leads you through the process of creating communication partners as configuration objects. You must specify the connection
parameters, such as target URLs. Required entries include:
Your company as internal party
For your own company, you must define a business service without a communication channel. This entry is mandatory, although it
remains empty.
Government systems
You must create a separate partner entry for each regional authority because of their distributed responsibilities and associated
system information. You can define the conditions for determining the recipient within a specific configuration scenario, SAP
NetWeaver Process Integration (SAP NetWeaver PI) then determines the correct recipient by analyzing the payload in the XMLs sent
by the NFE core application.
If the authorities of a region provide communication with different system environments that you want to use, you must create two
different Business Services: one for the productive system environment and the other for the homologation (test) environment for
the communication partner representing that regional authority.
For each configuration scenario representing an interface to the authorities in a specific process, the authorities use a special Web
service to respond to requests. Web services can differ between different regions. For each available Web service, you must
create a Communication Channel as a SOAP receiver channel within a business service for a region.
Services Without Parties
You must define a service for internal communication with each component within the delivery of SAP NFE so that SAP NetWeaver PI
can connect to these components in the communication process. This involves the following::
Assignment of Business System to NFE core application
You must assign the system on which your core application runs. The system administrator for SAP NetWeaver PI maintains the
system information in the system landscape directory (SLD) at the beginning of your configuration project.
You must create a receiver Communication Channel for the adapter type PI adapter that uses the ABAP proxies.
The communication channel of the PI adapter type for the sender is implicitly defined, and thus requires no configuration action.
Activities
To open the Integration Directory in the Integration Builder for Configuration, follow the instructions under Creating CT-e Configuration
Scenarios from Integration Scenarios.
In the navigation section, you can choose the Objects tab page to assign or create the required objects and use the wizards
provided.
Note
You should import the certificate, including the CA chain, as one single PFX file as described in SAP Note 1524196.
Enable certificate-based authentication and select your relevant certificate (Keystore View / Keystore Entry). For more information
about the import of certificates into the keystore, refer to NF-e/CT-e Administrator.
4. The entries in SOAP action field must correspond to the release version of the authorities' Web services.
5. Enable Do Not Use SOAP Envelope under Conversion Parameters due to the fact that the SOAP Envelope is created during the
mapping process.
6. In the tabstrip of the module of the communication channels add the following Local Enterprise Bean for all SOAP communication
channels connected to SEFAZ systems twice: localejbs/AF_Modules/MessageTransformBean
This bean has to be the first and the last entry in your processing sequence. Choose a self-defined module key for each entry.
Set the first module key to:
Parameter Name: Transform.ContentType
Parameter Value: application/soap+xml; charset=utf-8
Set the last module key to:
Parameter Name: Transform.ContentType
Parameter Value: text/xml; charset=utf-8
3.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 30 of 174
A template called GOV_104_SOAP_RCV_TMPL is provided with the PI content of this release for your reference.
Caution
In the generated receiver determinations, the Party and Service fields under Receiver must be set as * (asterisk).
The receiver determination now contains your own defined Party object, but also accepts the Receiver Service already populated
from the SAP NFE WebAS. Create the interface determinations and corresponding Receiver Agreements for each receiver to
determine the communication direction within the relevant communication channel.
You can use extended receiver determination to translate the receiver-service-CNPJ into specific partners: If you already created
your B2B partners in XI and want to re-use them, message mapping reads the Receiver parameter from the message headers. You
can then use a value mapping of your choice to match the CNPJ numbers with your target B2B partners. Receiver determinations are
no longer necessary, and you can re-use existing Interface Determinations and Receiver Agreements. The approach described in
SAP Note 1525562 (with minor enhancements) can be applied to this scenario.
You can use generic receivers: You can use the receiver-service-CNPJs to determine the mail address by using the SAP PI Lookup
API and the Dynamic Adapter Configuration. ,
You can also implement the Business Add-In /XNFE/EMAIL_B2B to add the e-mail address in SAP NFE as an attachment to the XI
message. You can extract this e-mail address in your PI system via adapter module (PI 7.0) or Message/Java mapping (PI 7.1 and
higher).
Prerequisites
You must have already created configuration scenarios (see Creating CT-e Configuration Scenarios from Integration Scenarios) and
defined configuration objects (see Configuration Object Definition for CT-e Configuration Scenarios).
Procedure
Note
To use the Integration Builder for configuration, follow the instructions for Creating CT-e Configuration Scenarios from Integration
Scenarios
1.
2.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 31 of 174
3.
The system opens a wizard that contains all objects for this scenario. The settings that you defined in a previous step have already
been applied. Follow the instructions of the Integration Scenario Configurator, which leads you through the configuration process.
The component view for each configuration scenario provides an overview of the involved business partners and objects that you
must consider in the configuration steps.
1. Choose Assign Services.
You can navigate between the different settings by switching between the relevant parties. To do so, use the forward and back
arrows with the quick info links Next Role or Previous Role.
You can use the different tab pages for each object assigned to one role. If you need to involve a business partner, the authorities,
or a particular Web service for the digital signature, for example, you can assign the services that you defined in a previous step.
2. Choose Configure Connections and define or assign the relevant settings by navigating between the relevant parties and objects
using the arrows or the tab pages.
Note
Due to government requirements for electronic messages, SAP NetWeaver PI content for SAP NFE uses the authorities XML
schema names for the message interfaces, and adds only control data.
Choose Generate. The system creates all dependent entries for the configuration scenario based on the template information in
the integration scenario.
4. To ensure that messages are routed to the correct target, you must configure content-based routing for all Receiver Determinations
in government processes, for example, in the configuration scenario CTEBATCH_WebAS_Outbound_CTeBatch_SYNC. You
configure this routing by defining conditions (the values in specific XML fields) for each recipient government system
tpAmb = 2 indicates a homologation system
tpAmb = 1 indicates a productive system
The cUF field in the XML payload contains the state number.
The tpEmis field determines if a contingency environment is used.
3.
Note
To use SEFAZ VIRTUAL DE CONTINGNCIA (SVC) set tpEmis = 7 for SVRS or tpEmis = 8 for SVSP and for normal
operation: tpEmis 7 or 8, depending on the used SVC system. All CT-es with tpEmis = 1 and tpEmis = 5 have to be
transferred to the standard (non-contingency) SEFAZ system. Check technical note 2012/003 to find the relevant SVC region.
The configuration of SVC is not possible for the CTESKIPR_WebAS_Outbound_CTeSkippingRequest_SYNC scenario.
The skipping request of an unused CT-e has to be transferred to a SEFAZ system.
5.
Using the combination of the cUF entry and tpAmb and tpEmis, the system can identify the correct recipient government system.
You can check your settings for a configuration scenario by choosing Tools Test Configuration in the menu bar.
Note
From Support Package 12 onwards, the CT-e status check is executed asynchronously. Ensure that the configuration is based on the
integration scenario CTESC_WebAS_Outbound_CTeStatusCheck from namespace http://sap.com/xi/CTE/104.
Note
For a more detailed overview, see SAP Note 1743455.
Process
NWA Destination Configuration in PI
Open NWA ( http://<host>:<port>/nwa Configuration Infrastructure Destinations ) and maintain the HTTP destination
GRC_NFE_WAS with the following URL:
http://<host>:<port>//sap/xi/engine?type=entry&sap-client=<client>&sap-language=EN
Replace host, port and client values with the values of your SAP NFE backend. For the event that you have multiple SAP NFE
backends, you need to define separate destinations (destination name is arbitrary) for every individual backend.
2. Communication Channels in PI
When the integration scenarios are generated as an Integrated Configuration it is necessary to use the delivered Communication
Channel templates. These templates contain the adapter modules in the correct order. The adapter modules replace the ccBPM
logic.
1.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 32 of 174
In the SOAP Sender Channel that receives messages from your SAP NFE system populate the HTTP Destination field of the
Acknowledgement Handling Tab with your created Destination in point 1.
3. Post-generation Step in PI
After generating the objects, copy the generated Integrated Configuration for the Response message from the authorities (SEFAZ is
sender) to the SAP NFE sender system of the request message as a virtual receiver of the response message. Delete the
generated Integrated Configuration without the Virtual Receiver.
The B2B scenarios from the SAP NFE system to your B2B partner (NTB2B, ETB2B for NF-e and CTB2B, CancCTB2B for CT-e)
have to have a virtual receiver with the asterisk (*), because the receiver is already populated with the CNPJ number in the SAP NFE
system.
Note
A detailed explanation and examples are provided in SAP Note 1743455.
4.
Process
Process
1.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 33 of 174
Note
You cannot assign RFC destinations to your own logical system because it is called without an RFC destination.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 34 of 174
Procedure
Enter transaction code SICF and choose Execute.
Select the following entries in the navigation tree for the Virtual Hosts/Services under default_host sap bc webdynpro xnfe .
3. Activate the service for displaying the user interfaces for each of the following entries by using the context menu and selecting
Activate Service:
General/cross-document applications
ssf maintenance for SSF maintenance
download_mass_xml for Download XML of NF-es / CT-es
gatekeeper_workplace for DF-e Gate Monitor
NF-e specific services
nfe_fiscal_workplace for Fiscal Workplace for NF-e
nfe_fisc_workplace_arch for NF-e Fiscal Workplace for Archived NF-es
nfe_log_workplace for Logistics Workplace for NF-e
nfe_receiver_ack_wp for NF-e Receiver Acknowledgment Workplace
nfe_list_monitor for NF-e List and Download Monitor
nfe_liststa_monitor for Status Monitor for NF-e List
nfe_analytics for Reports for NF-e Senders
innfe_dab for Graphical Overview for Incoming NF-es
CT-e specific services
cte_fisc_workplace for CT-e Inbound Fiscal Workplace
cte_fisc_workplace_arch for CT-e Inbound Fiscal Workplace for Archived CT-es
4. In addition, you must activate the following basic services in the navigation tree for the Virtual Hosts/Services under default_host
sap public bc :
ur for Unified Rendering
icons for SAP Icons
icons_rtl for Icons RTL
pictograms for Pictograms
webdynpro for Web Dynpro MIME Handling
1.
2.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 35 of 174
You have maintained a logical system for each ERP system (see the corresponding Customizing activity).
Activities
Define the assignment of the recipients CNPJ number to the corresponding ERP system.
Example
Recipient's CNPJ
1234567890
Logical System
ABCCLNT400
If an NF-e is received for CNPJ number 1234567890, system ABCCLNT400 is determined.
NF-e: Maintain Business Process Determination for Inbound NF-es
Use
In this Customizing activity, you assign specific business processes to incoming NF-es for further processing. The business processes
are determined based on the CFOP codes that are assigned to the NF-e items. If the CFOP code does not enable identification of a
unique business process, the NF-e is not assigned.
Requirements
Every CFOP code that is to be used must be assigned a business process. Wildcard entries are not supported. This means if a value
such as * or blank is entered for the CFOP code, the business process is not determined.
Activities
Enter the CFOP codes you want to use to determine business processes and assign the corresponding business processes to them.
For more information, see the documentation in Customizing under Nota Fiscal Eletronica Inbound Maintain Business Process
Determination for Incoming NF-es .
Maintain Control Parameter for Process Flow
Use
In this Customizing activity, you perform certain steps to further process an incoming document (NF-e, CT-e, or Event). These process
steps are determined from the business process to which the NF-e was assigned based on the CFOP codes of its items (This is only
true for NF-es; for CT-es and events, the CFOP code is not used for business process determination). The process flow for this
business process is contained in table /XNFE/PROCFLOW. You can determine how the process flow is handled, dependent upon
the sender's and/or recipient's CNPJ number in the incoming document. The Control Settings field lets you control the
processing of a process step. It has the following options:
Manual = The process step is not processed automatically during the process. The automatic process stops at this process step.
The user performs this step manually.
Automatic = The process step is performed automatically during the process - that is, without user interaction. If processing is
successful, the step status is set to OK and the process is continued.
You can use the following options in the Inactive field to deactivate a process step:
" " = The process step is active and can be executed automatically or manually, depending on the settings in the Control Settings
field.
"X" = The process step is deactivated: The process step is not carried out, but the status of this step is set to OK and the
process continues to the next step.
Requirements
You can maintain a blank entry for CNPJ codes. The system uses the following search sequence to determine the valid entry:
Search with both CNPJ numbers to find an entry
Search with the recipient's CNPJ number to find an entry
Search with the sender's CNPJ number to find an entry
Search with two blank CNPJ numbers to find an entry
Make sure that at least the generic entry (blank CNPJ field) is present for each process step.
Standard settings
Steps that are essential to the process flow cannot be deactivated.
Activities
Define the process type and process step that you want to influence. Enter the CNPJ numbers in accordance with the criteria listed
before, taking the search sequence into account. Define the suitable control options.
NF-e: Maintain Assignment of Item Category to CFOP Code
Use
In this Customizing activity, you can maintain the assignment of item categories to CFOP codes. This assignment is relevant for
determining the correct business process. The item categories represent the meanings of the CFOP codes. They have different
priorities in the determination of the business processes. If an NF-e contains both main items and other item categories, then only the
main items are used to determine the business process.
Activities
Maintain the assignment of item categories to CFOP codes. If no entry is created for a CFOP code, then the item category for that
CFOP code is Blank, which means it is a main item.
Example
In subcontracting cases, the NF-e can contain a final product (= main item) and the subcontracting components (= symbolic return). To
determine the correct business process, the entries must be maintained for the final product and the subcontracting components, to
enable assignment of the corresponding item categories:
CFOP
Item Category
5124
Main Item
5902
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 36 of 174
The Activity field describes the available activity that is assigned to the feasible process steps in the table /XNFE/PROCACT. The
Value field can have various values and meanings, depending on which activity is chosen.
Requirements
If no activity is defined in table /XNFE/PROCCTRL for your own tax number or for a process step, the system automatically uses the
standard value for the respective process step.
Likewise, the system also uses the standard settings when the Value field is blank for a given activity.
Activities
Define the process type and process step that you want to influence. Reduce your selection by the tax number (CNPJ).
Example
In this way, for example, three variants for entering goods receipt quantities are available:
Include Default Values (the fields for the received quantity and unit are filled with the quantities and units from the NF-e)
Exclude Default Values (the fields for the received quantity and unit are not filled)
Exclude Default Values, quantities from the NF-e are not displayed
CT-e: Maintain Business Process Determination for Inbound CT-es
Use
In this Customizing activity, you assign specific business processes to incoming CT-es for further processing. Determination of the
business process is carried out using the CNPJ of the service taker (Field CNPJ_DERIVED_TOM in table /XNFE/INCTEHD) and
the indicator for the service taker (Field TOMA in table/XNFE/INCTEHD).
Activities
Assign a process type to the combination of CNPJ (number of the service taker) plus indicator of the service taker. Permitted values for
the indicator of the service taker are:
'0' = goods sender
'3' = goods receiver
You can also use a blank entry for the CNPJ number. During business process determination, a matching entry for the relevant CNPJ
number is searched first. If no matching entry is found, then the blank entry is used.
Example
CNPJ (service taker)
TOMA (indicator for service taker)
Process Type
Blank
74.544.297/0004-35
If the service taker with CNPJ 74.544.297/0004-35 acts as goods sender (TOMA = 0), then process type B is determined for the
incoming CT-e. If a service taker with a differing CNPJ acts as goods receiver (TOMA = 3), then process type A is determined for the
incoming CT-e.
Control Parameters for process-independent Actions
Use
In this Customizing activity, you can define parameters for process-independent actions. You can define the parameters depending
on your own tax number (CNPJ). The available action can be selected with the corresponding parameter. Various values are
available for the parameter.
Requirements
If no value is defined for an own tax number and an action, the system automatically uses a default value. Likewise, the system also
uses the standard settings when the Value field is blank for a given activity.
Activities
Define the action you want to influence. You can limit your selection by the tax number (CNPJ). You can define a blank entry for the
CNPJ codes. The system always searches an entry with the CNPJ number first. If none is found, the system searches an entry with a
blank CNPJ number.
Example
If an NF-e or CT-e is received more than once, you can choose the following values:
Exception; Visible as an application error in PI
This is the default setting. The corresponding XML message is displayed in the PI message monitor with an application error.
Ignore; Entry in history table.
The corresponding XML message is displayed in the PI message monitor as successfully processed. Only an entry in the document
history indicates that the document was received several times.
If an NF-e is received with a receiver-CNPJ that is not maintained in Customizing as an own CNPJ, you can choose the following values:
Book in NF-e without assigning a business process
Exception; Visible as an application error in PI
NF-e: Define Reasons for Rejection; Assign to Events
Use
In this Customizing activity, you specify the reasons for rejecting processing for incoming NF-es. Only the texts defined in this activity
can be selected as reasons for rejection. If vendor notification is active (in the rejection case), the selected rejection text can be sent
to the business partner as part of an e-mail.
Activities
Enter the abbreviation for a rejection and enter a descriptive text.
Example
Rejection
Rejection Text
AUTHORIZ
SIGNATUR
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 37 of 174
Example
Rejection
Rejection Text
AUTHORIZ
SIGNATUR
NFE_REJECTION_TEXT
NFE_ACCEPTANCE_TEXT
34274233026675
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 38 of 174
Note
You must enter values for this table if you want to be able to reject NF-es in the NF-e Fiscal Workplace.
Enter E-Mail Parameters of Sender for Own Tax Number
You can define a SAP standard text (via transaction code SO10) for the e-mail body of the rejection. If you do not enter a text, a
default text is used.
Refer to the documentation of this activity for more information. You find this activity under Nota Fiscal Eletrnica Inbound
Communication to Business Partner Maintain Mail Sender Parameters for own Tax Numbers .
Maintain Communication Parameters for Partner Tax Numbers
You can assign an e-mail address of a business partner to the tax number of the same business partner. Optionally, you can enter
your own tax number.
Refer to the documentation of this activity for more information. You find this activity under Nota Fiscal Eletrnica Inbound
Communication to Business Partner Maintain Communication Parameters for Partner Tax Numbers .
Note
The vendor notification via e-mail is only possible if you assign the vendor's e-mail to the vendor's tax number.
Note
You must enter values for this table if you want to be able to reject CT-es in the CT-e Fiscal Workplace.
Enter E-Mail Parameters of Sender for Own Tax Number
You can define a SAP standard text (via transaction code SO10) for the e-mail body of the rejection. If you do not enter a text, a
default text is used.
Refer to the documentation of this activity for more information. You find this activity under Nota Fiscal Eletrnica Inbound
Communication to Business Partner Maintain Mail Sender Parameters for own Tax Numbers .
Maintain Communication Parameters for Partner Tax Numbers
You can assign an e-mail address of a business partner to the tax number of the same business partner. Optionally, you can enter
your own tax number.
Refer to the documentation of this activity for more information. You find this activity under Nota Fiscal Eletrnica Inbound
Communication to Business Partner Maintain Communication Parameters for Partner Tax Numbers .
Note
The vendor notification via e-mail is only possible if you assign the vendor's e-mail to the vendor's tax number.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 39 of 174
Note
Vendor notification via e-mail is only possible if the vendor's e-mail address is assigned to the vendor's tax number.
Note
Vendor notification via e-mail is only possible if the vendor's e-mail address is assigned to the vendor's tax number.
Note
Make sure to use the program /XNFE/INNFELIST_UPDATE_STATUS for updating the status and not the program
/XNFE/COLLECT_DOCUMENTS. Therefore, the status update should be executed more regularly than the request for new
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 40 of 174
documents.
Download XML Documents from the Authorities
The download is executed in batches of up to 10 NF-e access keys.
Create a number range interval via transaction SNUM for the object /XNFE/NFDL. Create interval 01 with a length of 15 digits.
Note
You must maintain the system and component information in the system landscape directory (SLD).
You must install Java Web Start before you can use the Integration Builder for configuration activities in SAP NetWeaver PI.
Process
Note
The settings below are described to assist a trained SAP NetWeaver PI consultant with the necessary configuration.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 41 of 174
To configure SAP NetWeaver PI for SAP NFE, you can use the following general steps for an inside-out approach, which allows you to
easily complete your configuration scenarios based on pre-defined configuration objects.
1. Create configuration scenarios in the Integration Directory based on the integration scenarios from the Integration Repository. These
integration scenarios group all possible entities for a specific communication situation based on government requirements. For more
information, see Creating Configuration Scenarios from Integration Scenario (Inbound).
2. Define configuration objects that can be reused across different integration scenarios. Configuration objects include communication
partners and communication channels to those partners. By defining these objects at the beginning, you can increase the efficiency of
the scenario configuration. For more information, see Configuration Object Definition for Configuration Scenarios (Inbound).
3. Complete the scenario configuration by assigning the centrally defined settings and define the specific parameters. For more
information, see Completing Configuration Scenario Settings (Inbound).
4. Configure the alerts that SAP NetWeaver PI provides if you want the system to notify responsible persons about communication
failures. (See NF-e Alert Configuration).
Recommendation
You should obtain a copy of the Brazilian authorities Taxpayers' Integration Guide, which contains the official technical standards
and requirements for electronic communication. The guide also lists the URLs of the Web services for the individual regions to which
you need to connect using SAP NetWeaver PI.
Note
Creating the configuration scenarios first helps familiarize you with the NF-e naming conventions that you can use when you create
configuration objects. This ensures that naming is consistent.
Procedure
In your SAP NetWeaver PI system, enter SXMB_IFR to acess the SAP NetWeaver Exchange Infrastructure tools to set up
configuration scenarios.
2. Open Integration Builder: Configuration by choosing Integration Directory.
3. In the menu bar, choose Tools Transfer Integration Scenario from the Integration Repository . Taking into account the software
component version of SAP NFE that you have installed, create a configuration scenario for each integration scenario.
1. The input help for the integration scenario lists all the available scenarios that you can select. After making a selection, choose Ok.
2. Choose Continue to create the configuration scenario based on the delivered integration scenario you selected, and adapt the
name to your needs.
1.
Recommendation
Use a prefix when copying the integration scenarios as templates for your configuration project. Although the system sorts the
integration scenarios in the Integration Builder design environment by software component, it sorts the configuration scenarios
alphabetically. You can group all SAP NFE configuration scenarios in the configuration environment by using the same prefix.
4.
Note
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 42 of 174
The technical names in SAP NetWeaver PI for SAP NFE refer to the core application as WebAS.
Caution
Be aware that you have to configure every integration scenario individually for every NF-e layout version that you need. For
example, if you use the NFB2B_WebAS_Inbound_B2B_NFe integration to receive NF-es in layout 2.00 and now you need to
receive NF-es in layout 3.10 or higher, you also have to configure the NFB2B_WebAS_Inbound_B2B_NFe integration scenario
for NF-e layout 3.10 or higher.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 43 of 174
CT-e Scenarios
CancCFB2B_WebAS_Inbound_B2B_Cancellation (relevant for CT-release 1.04 only)
This integration scenario contains the objects relevant to configuring the reception of cancellation messages from a business partner
after previously having received a CT-e from the partner.
CFB2B_WebAS_Inbound_B2B_CTe (relevant for CT-e 1.4 and 2.00 releases)
This integration scenario contains the objects relevant to configuring the reception of CT-es from defined business partners.
EFB2B_WebAS_Inbound_B2B_CTe (relevant for CT-e release 2.00 only)
This integration scenario contains the objects relevant for configuring the reception of CT-es from defined business partners.
CTESC_WebAS_Outbound_CTeStatusCheck (relevant for CT-e 1.4 and 2.00 releases)
This integration scenario contains the objects relevant to configuring the reception of status information from the authorities about a
CT-e that you received from a business partner.
NF-e Structure
You can identify the dependent objects of an integration scenario by checking the first five digits in the technical name. If you use the
integration scenarios as templates for your configuration scenarios, the objects are already grouped. Adhere to the naming conventions
when creating objects to keep consistent object names.
CFB2B
Objects beginning with a C are used in cancellation scenarios. The F stands for from, and the B2B refers to a B2B scenario. Objects
starting with this prefix belong to a cancellation from a business partner.
NFB2B
Similar to the explanations above, objects starting with these prefixes are also used in the B2B scenarios. NFB2B is for receiving a
NF-e from the business partner.
NFESC
You need these objects in a B2B scenario to check the current status in the authorities' system of a NF-e or a cancellation that you
received from a business partner before. The last two characters SC stand for status check.
EFB2B
The prefix E is used in Event scenarios, F stands for FROM, B2B means B2B partner.
CT-e Structure
CancCFB2B
In CT-e scenarios, the prefix Canc is used to identify objects that belong to the cancellation scenario. The C stands for CT-e, the F for
from, and the B2B refers to a B2B scenario. Objects starting with this prefix belong to a cancellation from a business partner.
CFB2B
Similar to the explanations above, objects starting with these prefixes are also used in the B2B scenarios. CFB2B is for receiving a
CT-e from the business partner.
CTESC
You need these objects in a B2B scenario to check the current status in the authorities' system of a CT-e or a cancellation that you
received from a business partner before. The last two characters SC stand for status check.
Example
The integration scenario NFESC_WebAS_Outbound_NFeStatusCheck for the NF-e status check, represented by the prefix
NFESC, contains, among others, the following dependent objects:
Integration Scenario: NFESC_WebAS_Outbound_NFeStatusCheck
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 44 of 174
Features
You can centrally define the following generic objects (grouped by object type):
Communication Partners
A wizard leads you through the creation of communication partners as configuration objects. You must specify the connection
parameters, such as target URLs. Required entries include:
Your company as internal party
For your own company, you must define a business service without a communication channel. This entry is mandatory, although it
remains empty.
Government systems
You must create a separate partner entry for each regional authority because of their distributed responsibilities and associated
system information. You can define conditions for determining the recipient within a specific configuration scenario. SAP NetWeaver
Process Integration (SAP Net Weaver PI) then determines the correct receiver by analyzing the payload in the XMLs sent by the NFE
core application.
If the regional authorities provide communication with different system environments that you want to use, you must create two
different Business Services: one for the productive system environment and the other for the homologation (test) environment for
the communication partner representing the regional authority.
For each configuration scenario, the authorities use a special Web service to respond to sent requests. Web services can differ
between different regions. For each available regional Web service, you must create a Communication Channel as the SOAP
receiver channel within a business service.
Business partners for business-to-business (B2B) scenarios
You must create a partner entry for each business partner with which you agree to exchange NF-es and cancellation notices.
You must create separate Business Services if you want to receive NF-es from a business partner.
You must create separate Communication Channels for receiving NF-es, and for receiving cancellation notices.
The adapter type for your communication channels depends on the agreement with your business partners, for example, FTP or
other file adapter.
Services Without Parties
You must define a service for internal communication with each component within SAP NFE so that SAP NetWeaver PI can connect to
these components in the communication process. This involves the following processes:
Assignment of Business System of core application
You must assign the system on which your core application runs. The system administrator for SAP NetWeaver PI maintains the
system information in the system landscape directory (SLD) at the beginning of your configuration project.
You must create a receiver Communication Channel for the PI adapter type that uses ABAP proxies.
The communication channel of the PI adapter type for the sender is implicitly defined, and thus requires no configuration action.
Activities
To open the Integration Directory in the Integration Builder for Configuration, follow the instructions in Creating Configuration
Scenarios from Integration Scenarios (Inbound).
In the navigation section, you can choose the Objects tab page to assign or create the required objects using the wizards provided.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 45 of 174
Prerequisites
You must already have created configuration scenarios (see Creating Configuration Scenarios from Integration Scenarios (Inbound))
and defined configuration objects (see Configuration Object Definition for Configuration Scenarios (Inbound)).
Procedure
Note
To use the Integration Builder for configuration, follow the instructions for Creating Configuration Scenarios from Integration Scenarios
(Inbound)
Select a configuration scenario in the navigation structure for scenarios.
For the selected configuration scenario, choose the icon with the quick info Integration Scenario Configurator from the function menu.
3. The system opens a wizard that contains all objects for this scenario. The settings that you defined in a previous step have already
been applied. Follow the instructions of the Integration Scenario Configurator, which leads you through the configuration process.
The component view for each configuration scenario provides an overview of the relevant business partners and objects that you
must consider in the configuration steps.
1. Choose Assign Services
You can navigate between the different settings by switching between the relevant parties. To do so, use the forward and back
arrows with the quick info links Next Role or Previous Role.
You can use the different tab pages for each object assigned to one role. If you need to involve a business partner, the authorities,
or a particular Web service for the digital signature, for example, you can assign the services that you defined in a previous step.
2. Choose Configure Connections and define or assign the relevant settings by navigating between the involved parties and objects
using the arrows or the tab pages.
1.
2.
Note
Because of government requirements for electronic messages, SAP NetWeaver PI content for SAP NFE uses the authorities
XML schema names for the message interfaces, and adds only control data.
Choose Generate. The system creates all dependent entries for the configuration scenario based on the template information in
the integration scenario.
4. To ensure that messages are routed to the correct target, you must configure content-based routing for all Receiver Determinations
in government processes, for example, in the configuration scenario NFE_NFESC_WebAS_Outbound_NFeStatusCheck. You
configure this routing by defining conditions (the values in specific XML fields) for each recipient government system.
tpAmb = 2 indicates a homologation system
tpAmb = 1 indicates a productive system
The cUF field in the XML payload contains the state number. The tpEmis field determines the issuing type to indicate if a
contingency environment is used. For SVC, refer to technical note 2013/007 to find the relevant SVC server for your state.
3.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 46 of 174
tpEmis
Authorization
SEFAZ (DPEC)
Using the combination of the cUF entry and tpAmb and tpEmis, the system can identify the correct receiving government system
and your routing rules must ensure that, for example, the following targets are reached:
tpEmis
cUF
tpAmb
Target
5.
43
RS Production
35
SP Homologation
any
SCAN Homologation
any
SVC-AN Production
any
SVC-RS Homologation
The contingency event service for the inbound scenario is not available in the SVC system.
You can check your settings for a configuration scenario by choosing Tools Test Configuration
Note
For a more detailed overview, see SAP Note 1743455.
Process
NWA Destination Configuration in PI
Open NWA ( http://<host>:<port>/nwa Configuration Infrastructure Destinations ) and maintain the HTTP destination
GRC_NFE_WAS with the following URL:
http://<host>:<port>//sap/xi/engine?type=entry&sap-client=<client>&sap-language=EN
Replace host, port and client values with the values of your SAP NFE backend. For the event that you have multiple SAP NFE
backends, you need to define separate destinations (destination name is arbitrary) for every individual backend.
2. Communication Channels in PI
When the integration scenarios are generated as an Integrated Configuration it is necessary to use the delivered Communication
Channel templates. These templates contain the adapter modules in the correct order. The adapter modules replace the ccBPM
logic.
In the SOAP Sender Channel that receives messages from your SAP NFE system populate the HTTP Destination field of the
Acknowledgement Handling Tab with your created Destination in point 1.
3. Post-generation Step in PI
After generating the objects, copy the generated Integrated Configuration for the Response message from the authorities (SEFAZ is
sender) to the SAP NFE sender system of the request message as a virtual receiver of the response message. Delete the
generated Integrated Configuration without the Virtual Receiver.
The B2B scenarios from the SAP NFE system to your B2B partner (NTB2B, ETB2B for NF-e and CTB2B, CancCTB2B for CT-e)
have to have a virtual receiver with the asterisk (*), because the receiver is already populated with the CNPJ number in the SAP NFE
system.
1.
Note
A detailed explanation and examples are provided in SAP Note 1743455.
4.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Process
Page 47 of 174
Caution
The integration scenarios for the list download and the XML download can be found in namespace
http://sap.com/xi/NFE/006. These scenarios support download of NF-es for layout 2.00 and 3.10+.
NFEDL_WebAS_Outbound_NFeDownloadRequest
This integration scenario contains the objects relevant to configuring the download of NF-e XML issued by business partners from the
authorities.
NFELI_WebAS_Outbound_NFeList
This integration scenario contains the objects relevant to configuring the service to query issued NF-es from your business partners.
Structure
NFEDL
You need these objects in to download NF-es issued by business partners from the authorities' system. The last two characters DL
stand for download.
NFELI
You need these objects to check NF-es issued by your business partners at the authorities system. The last two characters LI
stand for list.
Note
NF-e List and NF-e Download requests have to be configured using the national authorities system (Ambiente Nacional - AN / cUF
= 91) only. In the content-based routing, you only need to differentiate between the two environments (tpAmb).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 48 of 174
For more information about configuring alerts in SAP NetWeaver PI, see Alert Configuration in the SAP Library under Functional View
SAP NetWeaver by Key Capability Process Integration by Key Capability SAP NetWeaver Exchange Infrastructure Runtime
Central Monitoring .
Activities
To configure alerts, use transaction code ALRTCATDEF and create the alert category NFE_ALRT_CAT.
Define your alert rules according to the alert configuration descriptions in SAP Library for SAP NetWeaver PI.
Procedure
Enter transaction code SICF and choose Execute.
Select the following entries in the navigation tree for the Virtual Hosts/Services under default_host sap bc webdynpro xnfe .
3. Activate the service for displaying the user interfaces for each of the following entries by using the context menu and selecting
Activate Service:
event_monitor for Event Monitor Outbound
event_monitor_IB for Event Monitor Inbound
event_batch_monitor for Event Batch Monitor
ssf maintenance for SSF maintenance
4. In addition, you must activate the following basic services in the navigation tree for the Virtual Hosts/Services under default_host
sap public bc :
ur for Unified Rendering
icons for SAP Icons
icons_rtl for Icons RTL
pictograms for Pictograms
webdynpro for Web Dynpro MIME Handling
1.
2.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 49 of 174
Activities
General Settings
In the IMG of your SAP ERP system, make the necessary settings in Customizing for Cross-Application Components under General
Application Functions Nota Fiscal . For details about the settings to be made, see the documentation for each Customizing activity in
the system.
You can find an overview of the necessary Customizing settings in the Application Help for the SAP ERP solution for Brazil on the SAP
Help Portal under http://help.sap.com/ SAP Business Suite SAP ERP SAP ERP Central Component SAP ERP Central
Component SAP Library SAP ERP Central Component Logistics Country Versions Americas Brazil Cross-Application
Components Nota Fiscal Electronic Fiscal Documents .
Settings Specific to Incoming Automation
If you use the automated functions for processing incoming NF-e, you must make the corresponding Customizing settings in the IMG of
your SAP ERP system under Cross-Application Components General Application Functions Nota Fiscal Electronic Fiscal
Documents Incoming NF-e Automation . For details about the settings to be made, see the documentation for each Customizing
activity in the system.
If you use the automated functions for processing incoming CT-e, you must make the corresponding Customizing settings in the IMG of
your SAP ERP system under Cross-Application Components General Application Functions Nota Fiscal Electronic Fiscal
Documents Incoming CT-e Automation . For details about the settings to be made, see the documentation for each Customizing
activity in the system.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 50 of 174
1.4 Outbound
The Outbound of SAP Nota Fiscal Eletrnica has the scope to automate and monitor the authorization with government systems and to
issue NF-es, CT-es and Events to business partners.
The Outbound of SAP Nota Fiscal Eletrnica consists of the following:
NF-e Outbound for XML Layout 2.00
NF-e Outbound for XML-Layout 3.10+
CT-e Outbound
Process
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 51 of 174
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Note
Authorities can reject NF-es due to technical problems or other reasons. You can solve this issue if you initiate the skipping
process by canceling the rejected NF-e in the SAP ERP feeder system. If the authorities return the NF-e with status Denied, that
means that a severe credibility problem has occurred.
Request status information from authorities
After the time set by the authorities for collecting status data has elapsed, the SAP NFE core application uses the standard PI
adapter to send the status request to SAP NetWeaver PI. SAP NetWeaver PI then routes the request via the SOAP adapter to the
authorities.
12. Receive authority status in SAP NFE core application
The SAP NFE system receives the government status for the NF-es via SAP NetWeaver PI and updates the status information
accordingly.
13. Forward NF-e status to SAP ERP
11.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 52 of 174
The SAP NFE core application sends the government-issued status to SAP ERP.
Update status of billing document in SAP ERP
The billing process is terminated and changes to goods movement processing.
15. Send NF-es to SAP NetWeaver PI
The SAP NFE system uses the standard PI adapter to send the NF-es to SAP NetWeaver PI.
16. Send NF-es from SAP NetWeaver PI to B2B receiver
SAP NetWeaver PI routes the NF-es to the correct B2B addressee. An HTTPs connection is required to communicate with the B2B
receiver.
14.
Note
The authorities require the receiving and issuing companies to keep the records of exchanged NF-es and of cancellation requests
that the authorities authorized or denied. SAP NFE provides business-to-business (B2B) scenarios to automatically transfer and
store XML files. If your company decides to exchange NF-es with its business partners, you must activate this electronic
communication for the B2B scenarios via Customizing in the SAP NFE core application. The core application then sends the NF-es
and routes them to SAP NetWeaver PI for further processing.
The adapter you use to send NF-es in SAP NetWeaver PI for B2B scenarios depends on your agreements with the business
partners. All adapters available with SAP NetWeaver PI are possible.
More Information
Setting up and configuring the individual components required to enable the communication process is described in Configure SAP
Nota Fiscal Eletrnica.
Monitoring the communication process is described in NF-e Outbound Monitoring.
Features
You can use transaction J1BNFE to access the NF-e monitor in the SAP ERP feeder system.
You can open each NF-e to display its details, including the history of document status changes.
You can cancel NF-es or start the contingency process for NF-es from this monitor.
More Information
For more information about processes and process monitoring, see the topic Electronic Nota Fiscal (NF-e) in the SAP Library under
SAP Solutions SAP ERP SAP ERP Central Component <Release> SAP ERP Central Component Logistics Country Versions
Americas Brazil Cross-Application Components Nota Fiscal .
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 53 of 174
tracking the communication statuses of NF-es (both individual and batched), and the communication process between the NFE
application and the authorities' system. In case of communication failures, the NFE core application monitors allow you to trigger
resending and rechecking of NF-es, batches, and related messages.
Process
The following monitors are available:
The XI Message Monitoring displays processed XML messages.
The NF-e Monitor displays an overview list of all NF-es sent individually to government systems and to business partners, along with
all NF-e-related messages. You can also resend certain messages from the filtered lists in this monitor.
The NF-e Batch Monitor displays the messages you send to and receive from government systems about the status of NF-e batches.
The NF-e Service Status Monitor displays the messages you send to and receive from government systems about government Web
service availability.
The B2B Monitor displays the NF-es that you receive from business partners in a B2B scenario (see B2B Monitoring of Inbound
Messages).
NF-e Technical Monitoring: You can use the monitoring functions in SAP NetWeaver to identify technical problems in the
communication process on a detailed level.
Features
Based on your selection criteria, the monitor by default displays the NF-e Overview tab page, and gives you access to other tab pages.
NF-e Overview
The tab page Overview lists successfully processed NF-es and NF-e sending failures with their main header data and the status
information. This includes the overall document status and the status code from the authorities, as well as possible error messages
from the authorities.
You can display the invoice details by choosing an NF-e's Access Key column for one list entry or by selecting its line and choosing
NF-e Details. The detail view lists both header and item data relevant for the authorities.
By choosing a Batch Number , you can navigate to the details display of the NF-e Batch Monitor for the selected NF-e batch.
You can continue the process for erroneous NF-es (only for NF-es with the icon ) by selecting one or several lines and choosing
Continue Process.
Note
The process does not continue for NF-es with B2B errors or NF-es ready for status check. To restart NF-es with B2B errors, use
the Outbound B2B Errors tab. For the NF-e status check, navigate to the details view or the Status Check tab.
Query Events
Trigger the status update for the selected NF-e to receive all known events from the authorities.
Signature Errors
The tab page Signature Errors lists all messages from the overview page that encountered a signature error. This could be caused by
the unavailable Web service for signing NF-es, cancellations, or skipping requests.
The error details are specified in the Error Status column.
You can restart the signing process by selecting a signature error line and choosing Restart.
Cancellation Errors
The Cancellation Errors tab page displays all NF-es that the system failed to cancel.
The reason for each error is specified in the Error Status column. You can continue to research the problem or solve it based on the
status information.
You can resend a cancellation request by selecting its line and choosing Restart.
Skipping Errors
The Skipping Errors tab page displays all NF-es that the system failed to send. The authorities require consecutive numbers for the NFes in your records. When the authorities reject a NF-e, it uses up a number that cannot be reused again. To inform the authorities about
the gap in the consecutive numbering, you must request the skipping of the used number. The skipping request process is initiated by
canceling the NF-e in the ERP feeder system.
The reason for the failed skipping is specified in the Error Status column. You can continue to research or solve the problem based on
the status information.
You can resend a skipping request by selecting its line and choosing Restart.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 54 of 174
Note
Only the ERP error is deleted and not the NF-e. Check the ERP and NFE systems manually to avoid inconsistencies before you
delete an ERP error.
Caution
After you manually delete an ERP error, it is no longer possible to update the NF-e status in ERP.
Other Errors
On the Other Errors tab page, all NF-es with errors are listed that do not belong in the above categories and cannot be processed in the
NF-e Monitor. These remaining errors can either be processed in the NF-e Batch Monitor, or they are sent back to the ERP system.
Error Status
Description
10
Validation Error
3146
Batch Errors
5758
Gap Errors
7175
Status Checks
On the Status Checks tab page, you can check the SEFAZ status of up to 49 NF-es at once. For individual NF-es, also check Status
Request in the NF-e Overview above.
NF-e Details
The detail view lists both header and item data relevant for the authorities, for example:
Status information such as process status, error status, and status code.
Information about the NF-e sender and recipient, including their respective tax identifications
Invoice item data in SAP ERP, including values and quantities on which the tax calculation is based
You can also choose the following functions in the application toolbar
History
You can track the overall statuses and error statuses that the system or the authorities have set for an individual NF-e, including the
time that each status was set.
XML Download
You are required to keep each NF-e and related skipping or cancellation requests in your records. You can also download the XML
for these messages to save offline.
B2B Status History
You can display all statuses and their timestamps for each NF-e or cancellation message that you sent to your business partner.
Status Query
If the system fails to retrieve the status information for NF-es, cancellations, or skipping requests because of technical reasons, you
can manually send a status request to the authorities. The government is required to keep batch-based NF-e statuses only for a
specific period. If you cannot collect the status of NF-es on a batch level, you must request the NF-e status for each NF-e individually.
Sending a status request for individual documents is possible only after the time period that you defined in the Customizing has
elapsed.
As a new function, you can select several NF-es from a list and carry out status checks in the Details of the NFE Monitor. You can
also check the status of individual NF-es with this function.
Note
On the Status Query tab page, you can select up to 49 NF-es and receive the SEFAZ status for several NF-es at once.
Log Display
Exit Skipping
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 55 of 174
If you receive a 256 or 563 rejection from the authorities (SEFAZ), it means that you are requesting a 'second' skip for this ID-number
of this NF-e. This problem happens only if the SKIP request was delivered to SEFAZ and the response from SEFAZ invalid, such as a
999 status or communication error.
To clarify the SEFAZ status (102) you must set the ERP/NFE status manually. Choose finish skipping in the details view of the
skipped NFE and a popup will appear with input fields for the data from the SEFAZ web site:
Protocol number
Date/time of authorization
The protocol number proves that the skipping was successful at SEFAZ. Further, the following entry about the skipping is archived:
The protocol data (skip NF-e) was entered manually by the user due to communication
problems with SEFAZ..
Send XML File
You have the option to send an XML using the Send XML File pushbutton. This button is active if the NF-e or cancellation is authorized
and the B2B scenario for the business partner is activated. You can either choose the normal NF-e or the Cancel NF-e/Cancellation
event to be sent to your business partner (NF-e Recipient or NF-e Carrier). The following situations are supported:
The XML file was not yet sent due to the fact that the B2B scenario for the business partner was not activated. After activation of the
B2B scenario and sending, the Process Status , the History, and the B2B Status History will be updated accordingly.
The XML file was already sent. After sending, the Process Status, the History , and the B2B Status History remain unchanged.
However, the protocol is visible in the Log Display.
If the cancellation was sent as an event (NF-e Events: Cancellation Event), then this event is sent to the business partner. Only a
history entry for the cancellation event is added.
The cancellation event can only be sent if the event was authorized during the event processing.
Note
Errors during the initial B2B sending process must be solved in the Outgoing B2B Error tab or in the Event Outbound Monitor (for
Cancellation Events) and cannot be solved using the Send XML File function.
Note
Errors during the initial B2B sending process must be solved in the Event Outbound Monitor and cannot be solved using the Send
XML File function.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 56 of 174
Features
Based on your selection criteria, the batch monitor displays the following:
The Overview tab page displays the main header data and status information for all batches you have sent (successful or not).
You can display the details of a specific batch by choosing its Batch Number or by selecting its line and choosing Batch Details.
The details view displays:
Batch header data
A list of the individual NF-es in the batch
The processing status of the batch in both your system and the authorities' system.
You can access the details of a specific NF-e in a batch by choosing the corresponding access key or by selecting the
corresponding row and choosing NF-e Details.
You can restart erroneous batches by selecting one ore several rows and choosing Restart.
The Batch Send Incorrect tab page displays all the batches for which the sending process failed.
Error details are specified in the Error Status column.
You can restart the batch sending process by selecting a line and choosing Restart.
The Batch Status Query Incorrect tab page displays all failed batch status requests.
Error details are specified in the Error Status column.
You can restart the batch sending process by selecting a line and choosing Restart.
Restart for NF-e Batches with Errors
You can select an NF-e batch with an error from the Overview or one of the other tab pages and then check the problem description.
After correcting the problem, you can restart the process using the Restart button.
Ending NF-e Batch processing
You can select an NF-e batch with an error from the Overview or one of the other tab pages and then check the problem description via
the Batch Details button. If you cannot correct the problem and a restart is not applicable, for example due to technical problems with
the Sefaz system (status code 999), you can end the batch process using the End the Batch Process button on the Overview or one of
the other tab pages. This finishes the batch process and sets the status of every NF-e withouit SEFAZ status code in the batch to Error.
The new status for every individual NF-e of the batch allows you to continue the NF-e process in the error tab of the NF-e monitor. To
receive a valid status from Sefaz, the NF-e status check requests a status for every individual NF-e.
Abandoning the batch process is possible, if the Sefaz status code of the batch is filled and is not 104 (Batch Processed) and an error
status of the batch exists, but not 73 (temporary error on the government side, batch is still in process) and not 70 (Error on the
government side, NF-es received the status from the batch).
Caution
By ending the batch processing, an NF-e status request is only possible via NF-e status check. The NF-e will be set to error and
needs to be manually started in the NF-e Monitor. Resending the NF-e to SEFAZ is no longer possible in the NFE system!
Details
This function is intended to enable the user to decide to stop the batch processing. The process continues with an NF-e status check
and the result of the status check is then sent to ERP.
The End function is the same as for CT-e and event processing.
The following scenario applies: Batch send did reach SEFAZ (batch statcode filled), but the NF-es have no status yet
New error status: batch was manually ended
wasstat remains unchanged
Status code is empty (not from batch). This is due to the fact that a status check is required anyway.
The batch history pop-up illustrates the details
New status for manually ended batch process is created to illustrate the special situation in the overview and detail tab
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 57 of 174
Activities
You can access the NF-e batch monitor in the core application of SAP Nota Fiscal Eletrnica (SAP NFE) by using one of the following
options:
Call up the specific menu NF-e Batch Monitor from the user role /XNFE/USERMENU (NF-e User Menu).
Navigate to the menu option in the navigation structure of the NF-e Main Menu in the SAP NFE core application. You can access it
from the user role by choosing Monitor Batch .
Process
Abandoning the batch process is NOT possible, if
1. The status code is
empty
104 (Batch processed)
2. The error status is
empty
73 (temporary error on the government side, batch is still in process)
70 (Error on the government side, NF-es received the status from the batch)
Caution
You can only use the NF-e Service Status Monitor (Outbound) for Layout 2.00 if you use SCAN as contingency system. If you use
SVC as contingency system, you have to use the NF-e Service Status Monitor (Outbound) for Layout 3.10+.
Activities
You can access the NF-e service status monitor in the SAP NFE core application by using one of the following options:
Call up the Service Status menu from the user role /XNFE/USERMENU (NF-e User Menu).
Navigate to the menu option in the navigation structure of the NF-e Main Menu, which you can access from the user role by choosing
Monitor Service Status .
Status Monitor
You can display the result of the batch job run in the status monitor. For more information how to plan a batch job, see the batch job
Service Status Check in NF-e Batch Job Planning (Outbound).
Status Check
For more information, see NF-e/CT-e Administrator.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 58 of 174
Features
Message Monitor
System communication between the SAP NFE core application and SAP NetWeaver Process Integration (SAP NetWeaver PI) uses
proxies. In addition to checking for any communication issues via the process monitors of the SAP NFE core application, you can use
transaction SXMB_MONI to access the technical monitors that include the details of all messages sent to and from SAP NetWeaver
PI.
If the core application receives a message from SAP NetWeaver PI with a red flag, you can start the message again.
If the SAP NFE system sends a message to SAP NetWeaver PI you can look for the error code within the message.
Monitor for Remote Function Calls (RFCs)
The system communication between the SAP ERP logistics feeder system and the SAP NFE core application uses synchronous
RFCs. You can monitor the result of the RFCs in both the feeder system and in the core application by using transaction RSRFCTRC.
To monitor RFCs in the SAP ERP system, look for functions whose technical names begin with /XNFE/.
To monitor RFCs in the NFE core application, look for functions whose technical names begin with J_1BNFE.
Monitor PI Queues
SAP NetWeaver PI uses RFCs to communicate between the integration engine (SAP NFE core application) and the integration server
(PI). You can monitor the PI queues and their statuses on both systems or clients.
To track the outbound queue, use transaction SMQ1
To track the inbound queue, use transaction SMQ2
Application Log
The system logs all system activities related to the NF-e batch processing for the object /XNFE/BATCH. This includes sending NF-es
to the authorities in batches as well as the status information that the authorities set for these NF-es. You can use transaction SLG1 to
access the application logs for log object /XNFE/BATCH. You can limit the search results by using the batch ID.
The application log is integrated with the batch monitor, where you can access the application log by selecting Job Log.
Note
SAP Nota Fiscal Eletrnica 10.0 introduces two work centers for the B2B inbound scenario: the NF-e Fiscal Workplace and the NF-e
Logistics Workplace. This means that B2B Monitoring for Inbound Messages is relevant only for the maintenance of older B2B
records after a version upgrade, such from SAP Nota Fiscal Eletrnica 1.0 to 10.0.
Features
Based on your selection criteria, the monitor displays an overview of all incoming messages from the business partner. You can display
and download, for example, NF-e identification and status data.
Note
The status data from your business partner is shown in the Status Code column, and the status data from the authorities is shown in
the Checked Status column.
Activities
You can access the B2B monitor in the SAP NFE core application by using one of the following options:
Call up the specific menu B2B Incoming from the user role /XNFE/USERMENU (NF-e User Menu).
Navigate to the menu option in the navigation structure of the NF-e Main Menu, which you can access from the user role by choosing
Monitor B2B Incoming
.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 59 of 174
Features
You can use transaction code SXMB_IFR to access the following Java-based monitors in the SAP PI Runtime Workbench of the
Integration Builder to track communication process steps in SAP NetWeaver PI:
The Component Monitor can help you identify problems in the different components that SAP NetWeaver PI uses during the
communication process. This includes, for example, monitoring the proxies sent to the core application of SAP Nota Fiscal
Eletrnica, as well as the Integration Engine or the Adapter Engine of the Integration Server.
The Message Monitoris the main entry point for retrieving detailed information about individual messages.
Recommendation
For this monitor, use a specific communication process (integration scenario) as the selection criterion.
The Adapter Monitor can help you detect problems in the message flow from the SAP NFE core application to SAP NetWeaver PI
caused by the adapter.
Monitoring the adapter is critical if you are trying to find the reason why expected messages from the government are still missing
even when the authorities state that the communication was completed successfully from their side.
An additional monitor is available via transaction SXMB_MONI for tracking individual messages that SAP NetWeaver PI receives or
sends to communication partners.
If you have configured alerts for SAP Nota Fiscal Eletrnica in SAP NetWeaver PI, the system sends an e-mail notification to the
specified responsible user when it detects a problem in the communication process steps.
You can also access the alert monitor in the SAP PI Runtime Workbench of the Integration Builder. For more information, see NF-e
Alert Configuration.
More Information
For more information about the monitoring options in SAP NetWeaver PI, see the topic Central Monitoring in the SAP Library under
Functional View SAP NetWeaver by Key Capability Process Integration by Key Capability SAP NetWeaver Exchange
Infrastructure Runtime .
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 60 of 174
Note
For more information, see the documentation for the BAdIs in Customizing under
Add-Ins for Outbound NF-es .
Process
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 61 of 174
Communication Flow
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Note
Authorities can reject NF-es due to technical problems or other reasons. You can solve this issue if you initiate the skipping
process by canceling the rejected NF-e in the SAP ERP feeder system. If the authorities return the NF-e with status Denied, that
means that a severe credibility problem has occurred.
Request status information from authorities
After the time set by the authorities for collecting status data has elapsed, the SAP NFE core application uses the standard PI
adapter to send the status request to SAP NetWeaver PI. SAP NetWeaver PI then routes the request via the SOAP adapter to the
authorities.
12. Receive authority status in SAP NFE core application
The SAP NFE system receives the government status for the NF-es via SAP NetWeaver PI and updates the status information
accordingly.
13. Triggering of B2B process (if configured) in SAP NFE core application
If configured in Customizing, the SAP NFE system triggers the B2B process and sends the XML file to the business partner.
11.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 62 of 174
Note
The authorities require the receiving and issuing companies to keep the records of exchanged NF-es and of cancellation requests
that the authorities authorized or denied. You can download XML files and send them to your business partners.
More Information
Setting up and configuring the individual components required to enable the communication process is described in Configuration of
NF-e Outbound.
Monitoring the communication process is described in Monitor NF-e Outbound for Layout 3.10+.
Process
Issue of NF-e with Batch
The process (Technical name: NFEISSU1) consists of the following steps:
1. Create NF-e (technical name NFOCREAT)
The NF-e data is validated and transformed into XML.
Note
If the validation or transformation fails, the NF-e data can be corrected and send again from the feeder system (ERP). The error
reason can be displayed by clicking the Application Log field in the Status Overview tab of the NF-e Monitor.
Sign NF-e (technical name NFOSIGNA)
The NF-e is signed with the certificate of the NF-e issuer CNPJ (Maintain the SSF settings in Customizing activity Maintain System
Response for Own Tax Numbers.
3. Authorize NF-e (technical name NFOTOBAT)
The NF-es are collected in batches and then send to the government system for authorization. Sending the batches is a separate
process described in NF-e Batch Processing for Layout 3.10+.
The status code can be authorized (for example: 100, 101, 102), or not authorized. For details about the error codes, see the current
SEFAZ NF-e manual on the SEFAZ website.
4. Trigger B2B Process (optional) (technical name NFOTRB2B)
The B2B process is created as a separate process, for more information see the description of the Send NF-e to Business Partner
(technical name NFEB2BSD) process below.
2.
Note
This step is only relevant if the NF-e was authorized.
Notify Feeder System (technical name NFOUPDFS)
The status code is transferred to the feeder system (ERP).
After the successful execution of these steps, the process of issuing an NF-e is complete. However, the process can continue if a
cancellation or skipping is triggered in the ERP system.
5.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 63 of 174
Note
If the validation or transformation fails, the skip NF-e data can be corrected and send again from the feeder system (ERP). The
error reason can be displayed by clicking the Application Log field in the Status Overview tab of the NF-e Monitor.
Sign NF-e (technical name NFOSIGNA)
The skip NF-e is signed with the certificate of the NF-e issuer CNPJ (Maintain the SSF settings in Customizing activity Maintain
System Response for Own Tax Numbers.
3. Authorize Skipping (technical name NFOSKAUT)
The skip NF-es are collected and then send to the government system for authorization. The status code can be authorized (102), or
not authorized. For details about the error codes, see the current SEFAZ NF-e manual on the SEFAZ website.
2.
Note
The report /XNFE/NFE_SKIP_SEND (must be scheduled as a background job) collects all skipping requests ready for sending
to the government system and processes them. For more information, see description of report in NF-e Batch Job Planning
(Outbound).
4.
Note
The report /XNFE/NFE_B2B_SEND (must be scheduled as a background job) collects all NF-es ready for sending to the B2B
partner and processes them. For more information, see description of report in NF-e Batch Job Planning (Outbound).
Send NF-e to Transporter (technical name NFOB2BCA)
This process step is only relevant if the customizing setting for the transporter CNPJ is activated (For more information, see
customizing activity Activate B2B Scenarios for Business Partners)
3. Send NF-e to Buyer (technical name NFOB2BBU)
This process step is only relevant if the customizing setting for the receiver CNPJ is activated (For more information, see customizing
activity Activate B2B Scenarios for Business Partners)
2.
Note
If the validation or transformation fails, the skip NF-e data can be corrected and send again from the feeder system (ERP). The
error reason can be displayed by clicking the Application Log field in the Status Overview tab of the NF-e Monitor.
Sign NF-e (technical name NFOSIGNA)
The skip NF-e is signed with the certificate of the NF-e issuer CNPJ (Maintain the SSF settings in Customizing activity Maintain
System Response for Own Tax Numbers.
3. Authorize Skipping (technical name NFOSKAUT)
The skip NF-es are collected and then send to the government system for authorization. The status code can be authorized (102), or
not authorized. For details about the error codes, see the current SEFAZ NF-e manual on the SEFAZ website.
2.
Note
The report /XNFE/NFE_SKIP_SEND (must be scheduled as a background job) collects all skipping requests ready for sending
to the government system and sends them. For more information, see description of report in NF-e Batch Job Planning
(Outbound).
4.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 64 of 174
Process
Send NF-e Batch
The process (Technical name: NFEBATSD) consists of the following steps:
1. Create NF-e Batch (technical name NFBATCRE)
During batch creation the NF-es are separated according to:
System Environment (Test or Production)
Issuing Type
Code of Brazilian State (CUF)
CNPJ of Issuer
XML Version
Model of Nota Fiscal
Batches are created according to different criteria (batch size, No. of NF-es inside the batch). In Customizing activity NF-e: Maintain
Batch Parameters, you can set this criteria for your region.
2. Send NF-e Batch (technical name NFBATSND)
The batch is sent to authorities asking for authorization of the included NF-es. Before the batch is sent, the system checks the current
service status. For more Information about the service status check, see Process Settings and Customizing (Outbound). The
authorities answers with an average time that it took to set the NF-e status.
3. Request NF-e Batch (technical name NFBATREQ)
Based on the settings in Customizing activity NF-e: Maintain Batch Parameters, the batch request is sent to authorities and returns
the status of the included NF-es. If the status is missing the first time, the system automatically resends the batch status request. The
received status for each NF-e included in the batch is transferred to the NF-e Process.
Note
If the batch request is not successful due to a technical error, the batch process can be terminated in the NF-e Batch Monitor and
an NF-e status check on NF-e level can be carried out manually in the NF-e Monitor.
Note
Reports are available for the processing of NF-e Batches that must be scheduled as background jobs. For details please refer to
NF-e Batch Job Planning (Outbound).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 65 of 174
Note
This skip access key only has 39 digits.
Overview of Errors in Number Gap Skipping
The Overview of Errors in Number Gap Skipping query lists NF-es with errors in process number gap skipping.
List
Based on your selection criteria, the NF-e monitor displays a list of NF-es and their processing status.
The following status icons are used:
Process Completed; NF-e processed successfully
Depending on the NF-e type, this means:
NF-e authorized (Status Code 100)
NF-e Cancellation authorized (Status Code 101)
NF-e Number Skipping authorized (Status Code 102)
Process completed; NF-e denied
The NF-e processing is finished with no option to continue processing.
Process completed; NF-e rejected
Depending on the NF-e type, this means:
NF-e rejected. The processing is finished and you can either send the NF-e again with corrected data, or skip the NF-e number.
NF-e Number Skipping rejected. The processing is finished and can request to skip the NF-e number again.
Process stopped; NF-e cannot be created due to validation error
You have to correct this error in your ERP system and resend your NF-e.
Process waiting for asynchronous answer
Example: The batch containing the NF-e has not been sent to the authorities.
Error in last process step
You can correct this error in your NFE system. Go to the status overview and check the problem description in the last activity. After
correcting the problem, you can continue the process using the Continue Process button on the Error Overview tab.
Process waiting for user action
Process stopped; Carry out the necessary actions in your ERP system.
Additional Information
Once you select a line in the displayed table, you receive additional information about this NF-e at the bottom of the screen:
Status Overview
This is a description of the process with the corresponding Status, Activity, Status Description, Info Text and Application Log fields.
History
This is a description of the history of this NF-e containing the Status, Activity, Status Description, Info Text, Executed on, and the User
fields.
B2B Status Overview
This is a description of the B2B process with the corresponding Status, Activity, Status Description, Info Text and Application Log
fields.
B2B History
This is a description of the history of the B2B activities of this NF-e containing the Status, Activity, Status Description, Info Text,
Executed on, and the User fields.
Events
Caution
The Events tab is only visible if there is at least 1 event for an NF-e.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 66 of 174
The main purpose is to provide information to the user about events. The outbound user must decide how running processes are
affected, and therefore a list of the current authorized and pending events (both self-issued and others) is displayed. The outbound
user can display all events per event type in a dialog box. In the Events tray, the following buttons are enabled after selecting one line
of the events list:
By selecting one event, you can display its content (if available) depending on its type. Select Details Event Details .
By choosing Select Details Display Event XML , you can open or save the XML document.
By choosing Event Status , you can display the current and former process steps with status icon, activity, process type, status
description, and info text.
By choosing Event History , you can display the history of an event with status icon, activity, process type, status description,
info text, execution date and time, and user.
In a dialog box, you can see all other available versions of the selected event by choosing Display Versions .
Send XML File
You have the option to send an event XML using the Send XML File pushbutton. This button is active if the event is authorized and
the B2B scenario for the business partner is activated. You can choose to send the event XML to the Tomador. The following
situations are supported:
The XML file was not yet sent because the B2B scenario for the business partner was not activated. After activation of the B2B
scenario and sending, the Process Status of the event process will not be changed. However, a history entry is added.
The event XML file was already sent. After sending, the Process Status of the event process will not be changed. However, a
history entry is added.
Note
Errors during the initial B2B sending process must be solved in the Event Outbound Monitor and cannot be solved using the
Send XML File function.
By choosing
Actions
Select Details:
Display Details
This action displays the entire XML content in multiple sub-screens. You can also access the NF-e details by clicking on the access
key in the list.
Display XML
This action allows you to download/display the NF-e XML file (if existing).
Cancellation XML
This action allows you to download/display the cancellation event XML file (if existing).
Skipping XML
This action allows you to download/display the skipped XML file (if existing).
Display DANFE
This action displays parts of the XML content in a DANFE preview (if existing).
Continue Process
You can select an NF-e with an error in the NF-e process and then check the problem description in the last activity. After correcting
the problem, you can continue the process using the Continue Process button.
Note
If the step Check NF-e Authorization finished with an error, you can trigger the NF-e status check by clicking the Continue Process
button. After that, the process will wait for an asynchronous answer.
Continue B2B Process
You can select an NF-e with an error in the B2B process and then check the problem description in the last activity. After correcting the
problem, you can continue the process using the Continue B2B Process button.
Additional Functions:
Send XML File
This action allows you to send an authorized NF-e XML to your business partner depending on the B2B Customizing for the partner
CNPJ.
Query Events
This action triggers an asynchronous NF-e status check to receive Events from your business partner through the authorities.
NF-e Details
You can display the invoice details by choosing an NF-e's Access Key, or by selecting the corresponding line and choosing Display
Details. The details view displays:
The processing status of the NF-e in both your system and the authorities' system
The entire content of the XML in several tabs and grouped according to the tags in the XML
Navigation
You can access the NF-e monitor in SAP NFE via one of the following options:
You can call up the specific menu NF-e Monitor from the user role /XNFE/WP_NFE_OUT_MONITOR (Outgoing User Menu).
You can navigate to the menu option in the navigation structure of Message Monitor in SAP NFE. You can access this option from the
user role by choosing Monitor Outbound NF-es/Events NF-e Monitor .
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 67 of 174
Caution
By ending the batch processing, an NF-e status request is only possible via NF-e Status Check. The NF-e process step Check
Authorization is set to Error and has to be restarted manually in the NF-e Monitor. It is no longer possible to transmit such an
NF-e to the government system. If the NF-e is unknown to the government system, the NFE system will update the SEFAZ status to
the feeder system (ERP) which has to issue the NF-e again. It is no longer possible to send the NF-e to the government system from
the NFE system.
Batch Details
You can display the details of a specific batch by choosing the Batch Number or by selecting its line and choosing Details. The details
view displays:
The processing status of the batch in both your system and the authorities' system
Batch header data
A list of the individual NF-es in the batch with their most important header data
Navigation
You can access the NF-e batch monitor in SAP Nota Fiscal Eletrnica (SAP NFE) by using one of the following options:
Call up the specific menu NF-e Batch Monitor from the user role /XNFE/WP_NFE_OUT_MONITOR (Outgoing User Menu).
You can navigate to the menu option in the navigation structure of Message Monitor in SAP NFE. You can access this option from the
user role by choosing Monitor Outbound NF-es/Events NF-e Batch Monitor .
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 68 of 174
Features
You can use transaction code SXMB_IFR to access the following Java-based monitors in the SAP PI Runtime Workbench of the
Integration Builder to track communication process steps in SAP NetWeaver PI:
The Component Monitor can help you identify problems in the different components that SAP NetWeaver PI uses during the
communication process. This includes, for example, monitoring the proxies sent to the core application of SAP Nota Fiscal
Eletrnica, as well as the Integration Engine or the Adapter Engine of the Integration Server.
The Message Monitor is the main entry point for retrieving detailed information about individual messages.
Recommendation
For this monitor, use a specific communication process (integration scenario) as the selection criterion.
The Adapter Monitor can help you detect problems in the message flow from the SAP NFE core application to SAP NetWeaver PI
caused by the adapter.
Monitoring the adapter is critical if you are trying to find the reason why expected messages from the government are still missing
even when the authorities state that the communication was completed successfully from their side.
An additional monitor is available via transaction SXMB_MONI for tracking individual messages that SAP NetWeaver PI receives or
sends to communication partners.
More Information
For more information about the monitoring options in SAP NetWeaver PI, see the topic Central Monitoring in the SAP Library under
Functional View SAP NetWeaver by Key Capability Process Integration by Key Capability SAP NetWeaver Exchange
Infrastructure Runtime .
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 69 of 174
Two function modules are used to call non-SAP systems, one to report the status of NF-es, and one for events. The implementation of
the BAdI determines if the standard or the non-SAP function modules are called. Function module /XNFE/XML_IN_TAB reports the
status of NF-es to non-SAP systems. Tables parameter CH_XMLTAB includes the following important fields:
I_DOCNUM (NF-e document number)
I_AUTHCODE (Protocol number from SEFAZ)
I_CODE (Status code from SEFAZ)
I_ID (44-character access key)
I_MSGTYP (A code that determines if the NF-e is authorized or not: 1: NF-e authorized, 2: NF-e rejected, 3: NF-e denied, 4:
Cancellation authorized, 5: Skipping authorized, 6: Cancellation rejected, 7: Skipping rejected)
I_AUTHDATE (NF-e Processing Time Date from SEFAZ)
I_AUTHTIME (NF-e Processing Time Time from SEFAZ)
Tables parameter CT_BAPIRET2: If an error occurs in the target system, the error status with one or more error texts can be
returned with the help of a BAPIRET2 table.
Function module /XNFE/NFE_EVENT_IN reports the status of Events to non-SAP systems. Tables parameter IT_EVENTS includes
the following important fields:
DOCNUM (NF-e document number)
EXT_EVENT (Type of Event)
SEQNUM (Internal Sequence Number)
EXT_SEQNUM (SEFAZ Sequence Number)
ACCKEY (44-character NF-e access key)
AUTHCODE (Protocol Number from SEFAZ)
REPLY_TMPL (Events: Registration Timestamp)
CODE (Status code from SEFAZ)
MSGTYP (A code that determines if the event is authorized or not 1: Event authorized, 2: Event rejected)
EXT_REPLY_TMPL (Events: Registration Date/Time)
Tables parameter CT_BAPIRET2: If an error occurs in the target system, the error status with one or more error texts can be
returned with the help of a BAPIRET2 table.
BAdI: Sign Outgoing NF-es
The BAdI enables a synchronous proxy call of an external signature service (through external signature hardware, for example, or an
external Web service), to circumvent the standard signature implementation in ABAP.
BAdI: Extend B2B Message with Attachment
You use this BAdI to control the creation of attachments when sending the NF-e to a business partner (consignee or carrier).
Note
For more information, see the documentation for the BAdIs in Customizing under
Add-Ins for Outbound NF-es .
Note
Batch creation and processing are specific only to sending CT-es to the authorities.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 70 of 174
Process
Communication Flow
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Note
Authorities can reject CT-es due to technical problems or other reasons. You can solve this issue if you initiate the skipping
process by canceling the rejected CT-e in the SAP ERP feeder system. If the authorities return the CT-e with status Denied, that
means that a severe credibility problem has occurred.
Request status information from authorities
After the time set by the authorities for collecting status data has elapsed, the SAP NFE core application uses the standard PI
adapter to send the status request to SAP NetWeaver PI. SAP NetWeaver PI then routes the request via the SOAP adapter to the
authorities.
12. Receive authority status in SAP NFE core application
11.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 71 of 174
13.
14.
15.
16.
17.
The SAP NFE system receives the government status for the CT-es via SAP NetWeaver PI and updates the status information
accordingly.
Triggering of B2B process (if configured) in SAP NFE core application
If configured in Customizing, the SAP NFE system triggers the B2B process and sends the XML file to the business partner.
Forward CT-e status to SAP ERP
The SAP NFE core application sends the government-issued status to SAP ERP.
Update status of electronic fiscal document in SAP ERP
The process is terminated and changes to goods movement processing.
Send CF-es to SAP NetWeaver PI
The SAP NFE system uses the standard PI adapter to send the CT-es to SAP NetWeaver PI.
Send CT-es from SAP NetWeaver PI to B2B receiver
SAP NetWeaver PI routes the CT-es to the correct B2B addressee. An HTTPs connection is required to communicate with the B2B
receiver.
Note
The authorities require both the consignor and the consignee companies to keep the records of exchanged CT-es and of
cancellation requests that the authorities authorized or denied. You can download XML files and send them to your business
partners.
More Information
Setting up and configuring the individual components required to enable the communication process is described in Configuration of
CT-e (Outbound).
Monitoring the communication process is described in Monitor CT-e Outbound.
Process
The following monitors are available:
XI: Message Monitoring
This monitor displays processed XML messages.
The CT-e Monitor displays an overview list of all CT-es sent individually to government systems and to business partners, along with
all CT-e-related messages. You can also resend certain messages from the filtered lists in this monitor.
The CT-e Batch Monitor displays the messages you send to and receive from government systems about the status of CT-e batches.
Note
The Personal Object Work List (POWL) provides central, personalized, and easy-to-use access to all your relevant worklist items,
including business objects and documents. Choose Personalize, for example in the CT-e Monitor, to select or deselect the following
optional query categories:
Overview
Overview Error
Recommendation
We recommend maintaining Quick Criteria due to performance reasons. For example, if a user works only with a certain CNPJ, then
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 72 of 174
Note
If the validation or transformation fails, the CT-e data can be corrected and send again from the backend system. The error
reason can be displayed by clicking the Application Log field in the Status Overview tab of the CT-e Monitor.
Sign CT-e
CT-e signed with SSF.
3. Check CT-e Authorization
The authorization is carried out as follows:
The batch request returns the status of the CT-es of the batch.
If the batch request is not successful due to a technical error, the batch process can be terminated in the CT-e Batch Monitor and
a CT-e status check on CT-e level can be carried out manually in the CT-e Monitor.
The status code can be authorized (for example: 100, 101, 102), or not authorized. For details about the error codes, see the current
SEFAZ CT-e manual on the SEFAZ website.
4. Trigger B2B Communication (optional)
B2B process started.
5. ERP Update
Status code is transferred to ERP
After the successful execution of these four steps, the process of issuing a CT-e is complete. However, the process can continue if a
cancellation or skipping is triggered in the ERP system. Here are the additional steps for the cancellation and skipping scenario:
Cancellation: Is possible if the CT-e was authorized:
1. Create Cancellation
2. Sign Cancellation
3. Send Cancellation
4. Trigger B2B Communication (optional)
5. ERP Update
Skipping: Is possible if the CT-e was rejected
1. Create Number Skipping Request
2. Sign Number Skipping Request
3. Send Number Skipping Request
4. ERP Update
Number Gap Skipping for CT-es
The numbering scheme of SEFAZ demands that all CT-es use subsequent numbers. However, there are situations when a number
must be omitted. The process to skip a number is carried out in the following steps:
1. Create Number Skipping Request
CT-e number skipping successfully transformed
2. Sign Number Skipping Request
CT-e successfully signed with SSF application NFESIG
3. Send Number Skipping Request
CT-e cancellation successfully sent; status code received
4. ERP Update
Status code successfully transferred to ERP
2.
Note
You can display and control the number gap skipping status of your CT-es in the CT-e Monitor (Outbound).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 73 of 174
(CT-e), as well as for monitoring communication with government systems and with business partners in business-to-business (B2B)
scenarios. It allows you to download the XML files for CT-es, along with all authorization, cancellation, and skipping messages that you
are legally required to keep as records. You can also resend messages from this monitor that your system was unable to send due to
technical reasons.
Features
Based on your selection criteria (the layout described here is the Tab Strip design; this can be set via the Personalize link in the right top
corner of your screen), the CT-e monitor displays the following:
CT-e Overview
The tab page Overview lists successfully processed CT-es and CT-e sending failures with their main header data and the status
information. This includes the overall document status and the status code from the authorities, as well as possible error messages
from the authorities.
You can display the invoice details by choosing a CT-e's Access Key column for one list entry or by selecting its line and choosing
Select Details. The detail view lists both header and item data relevant for the authorities, for example:
Status information such as process status, error status, and status code.
Information about the CT-e sender and recipient, including their respective tax identifications
Invoice item data in SAP ERP, including values and quantities on which the tax calculation is based
Once you selected a line in the list of available CT-es, two new additional information tabs open at the bottom of your screen:
Status Overview
This is a description of the process with the corresponding Status, Activity, Status Description, Info Text and Application Log fields.
History
This is a description of the history of this CT-e batch containing the Status, Activity, Status Description, Info Text, Executed on, and
the User fields.
Events
Caution
The Events tab is only visible if there is at least 1 event for a CT-e.
The main purpose is to provide information to the user about events. The outbound user must decide how running processes are
affected, and therefore a list of the current authorized and pending events (both self-issued and others) is displayed. The outbound
user can display all events per event type in a dialog box. In the Events tray, the following buttons are enabled after selecting one
line of the events list:
By selecting one event, you can display its content (if available) depending on its type. Select Details Event Details .
By choosing Select Details Display Event XML , you can open or save the XML document.
By choosing Event Status , you can display the current and former process steps with status icon, activity, process type,
status description, and info text.
By choosing Event History , you can display the history of an event with status icon, activity, process type, status description,
info text, execution date and time, and user.
In a dialog box, you can see all other available versions of the selected event by choosing Display Versions .
Send XML File
You have the option to send an event XML using the Send XML File pushbutton. This button is active if the event is authorized
and the B2B scenario for the business partner is activated. You can choose to send the event XML to the Tomador. The following
situations are supported:
The XML file was not yet sent because the B2B scenario for the business partner was not activated. After activation of the B2B
scenario and sending, the Process Status of the event process will not be changed. However, a history entry is added.
The event XML file was already sent. After sending, the Process Status of the event process will not be changed. However, a
history entry is added.
Note
Errors during the initial B2B sending process must be solved in the Event Outbound Monitor and cannot be solved using the
Send XML File function.
By choosing Refresh , the event list is updated to the latest version.
The available tabs are as follows:
CT-e Identification
This tab display header data of the CT-e. The main categories are:
Output
CT-e Transport Data
Other Data
Issuer
This tab displays details about the issuer name and issuer address data.
Service Taker
This tab displays details about the service taker name and address data.
Goods Sender
This tab displays details about the name of the goods sender and address data of the goods sender. In addition, Other
References are displayed in a table.
CT-e Destination
This tab displays details about the name of the CT-e destination and address of the CT-e destination.
Service Rendering Value
This tab displays details about the total value of goods/services and the tax situation regarding ICMS taxes.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 74 of 174
Freight Information
This tab displays details about the freight:
Goods Value
Main Product
Goods Property
Freight Quantity
The freight quantity information is displayed in a table.
Note
In every tab, a status area is visible displaying the Status, Activity, Status Description and Status Code.
The overall status displays the current situation of the issuing process and is displayed as an icon. The following icons are used:
Process Completed; CT-e processed successfully
Depending on the CT-e type, this means:
CT-e authorized (Status Code 100)
CT-e Cancellation authorized (Status Code 101)
CT-e Number Skipping authorized (Status Code 102)
Process completed; CT-e denied
The CT-e processing is finished with no option to continue processing.
Process stopped; CT-e cannot be created due to validation error
You have to correct this error in your ERP system and resend your CT-e.
Process waiting for asynchronous answer
Example: The batch containing the CT-e has not been sent to the authorities.
Error in last process step
You can correct this error in your NFE system. Go to the status overview and check the problem description in the last activity. After
correcting the problem, you can continue the process using the Continue Process button on the Error Overview tab.
Process waiting for user action
Process stopped; Carry out the necessary actions in your ERP system.
Error Overview
The tab page Error Overview lists CT-es and CT-e with errors with their main header data and the status information. This includes the
overall document status and the status code from the authorities, as well as possible error messages from the authorities.
You can display the invoice details by choosing a CT-e's Access Key column for one list entry or by selecting its line and choosing
Select Details. The detail view lists both header and item data relevant for the authorities.
Once you selected a line with a batch number, two new additional information tabs open at the bottom of your screen:
Status Overview
This is a description of the process with the corresponding Status, Activity, Status Description, Info Text and Application Log fields.
History
This is a description of the history of this CT-e batch containing the Status, Activity, Status Description, Info Text, Executed on, and
the User fields.
The details view displays:
Status information such as process status, error status, and status code.
Information about the CT-e sender and recipient, including their respective tax identifications
Invoice item data in SAP ERP, including values and quantities on which the tax calculation is based
The available tabs are as follows:
CT-e Identification
This tab display header data of the CT-e. The main categories are:
Output
CT-e Transport Data
Other Data
Issuer
This tab displays details about the issuer name and issuer address data.
Goods Sender
This tab displays details about the name of the goods sender and address data of the goods sender. In addition, Other
References are displayed in a table.
CT-e Destination
This tab displays details about the name of the CT-e destination and address of the CT-e destination.
Service Rendering Value
This tab displays details about the total value of goods/services and the tax situation regarding ICMS taxes.
Freight Information
This tab displays details about the freight:
Goods Value
Main Product
Goods Property
Freight Quantity
The freight quantity information is displayed in a table.
Note
In every tab, a status area is visible displaying the Status, Activity, Status Description and Status Code.
The overall status is displayed as an icon. The used icons are the same as in the list before.
Continue Process for CT-es with Errors
You can select a CT-e with an error from the Error Overview tab page and then check the problem description in the last activity. After
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 75 of 174
correcting the problem, you can continue the process using the Continue Process button on the Error Overview tab.
Note
If the step Check CT-e Authorization finished with an error, you can trigger the CT-e status check by clicking the Continue Process
button on the Error Overview tab. After that, the overall status will change to Process waiting for asynchronous answer. After a while,
the overall status of the CT-e will change again according to the asynchronous answer from SEFAZ. Therefore, it is important that
you refresh the current query repeatedly (using the refresh link at the bottom right of the screen).
Overview of B2B Errors
The tab page Overview of B2B Errors lists CT-es with B2B errors with their main header data and the status information. This includes
the following columns:
Overall Status
Status Code
CT-e Number
CT-e Series
Access Key
CT-e Document No.
Creation Date
Creation Time
CT-e Type
Batch Number
CT-e Type (XML)
Issue Date/Type
Transport Mode
Service Type
Service Taker (Tomador)
CNPJ of Issuer
CT-e Issuer
Recipient CNPJ
Taker Name
Overview Number Gap Skipping
The tab page Overview Number Gap Skipping lists CT-es with number gap skipping errors. This includes the following columns:
Overall Status
Status Code
CT-e Number
CT-e Series
Access Key
This skip access key has only 39 digits.
Creation Date
Creation Time
CNPJ of Issuer
CT-e Issuer
Once you selected a line with a CT-e number, two new additional information tabs open at the bottom of your screen:
Status Overview
This is a description of the process with the corresponding Status, Activity, Status Description, Info Text and Application Log fields.
History
This is a description of the history of this CT-e containing the Status, Activity, Status Description, Info Text, Executed on, and the User
fields.
The only action that can be carried out in the Overview Number Gap Skipping area is as follows:
1. Select one number gap skipping CT-e
2. Press the pushbutton Select Details
3. Select Skipping XML
Overview of Errors in Number Gap Skipping
The tab page Overview of Errors in Number Gap Skipping lists CT-es with an error during the number gap skipping. This includes the
following columns:
Overall Status
Status Code
CT-e Number
CT-e Series
Access Key
Creation Date
Creation Time
CNPJ of Issuer
CT-e Issuer
Once you selected a line with a batch number, two new additional information tabs open at the bottom of your screen:
Status Overview
This is a description of the process with the corresponding Status, Activity, Status Description, Info Text and Application Log fields.
History
This is a description of the history of this CT-e containing the Status, Activity, Status Description, Info Text, Executed on, and the User
fields.
The only actions that can be carried out in the Overview of Errors in Number Gap Skipping area is as follows:
1. Select one number gap skipping CT-e
2. Press the pushbutton Select Details and then select Skipping XML
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 76 of 174
3.
You can also continue the processing after manual corrections (see error status description) by pressing the Continue Process
pushbutton.
Note
For more information about the number gap skipping process, see the relevant section Number Gap Skipping in CT-e Processing
(Outbound).
Features
Based on your selection criteria (the layout described here is the Tab Strip design; this can be set via the Personalize link in the right top
corner of your screen), the CT-e batch monitor displays the following:
Overview
The Overview tab page displays the main header data and status information for all batches you have sent.
You can display the details of a specific batch by choosing the Batch Number or by selecting its line and choosing Details. The details
view displays:
Batch header data
A list of the individual CT-es in the batch
The processing status of the batch in both your system and the authorities' system.
Once you selected a line with a batch number, two new additional information tabs open at the bottom of your screen:
Status Overview
This is a description of the process with the corresponding Status, Activity, Status Description, Info Text and Application Log fields.
History
This is a description of the history of this CT-e batch containing the Status, Activity, Status Description, Info Text, Executed on, and
the User fields.
The overall status is displayed as an icon. The following icons are used:
Process waiting for asynchronous answer
Error in last process step
You can correct this error in your NFE system. Go to the status overview and check the problem description in the last activity. After
correcting the problem, you can continue the process using the Continue Process button on the Error Overview tab.
Batch Processing Completed
Error Overview
The Error Overview tab page displays the main header data and status information for all batches with errors.
The overall status is displayed as an icon. The used icons are the same as in the above list.
You can display the details of a specific batch by choosing the Batch Number or by selecting its line and choosing Details. The details
view displays:
Batch header data
A list of the individual CT-es in the batch
The processing status of the batch in both your system and the authorities' system.
Once you selected a line with a batch number, two new additional information tabs open at the bottom of your screen:
Status Overview
This is a description of the process with the corresponding Status, Activity, Status Description, Info Text and Application Log fields.
History
This is a description of the history of this CT-e batch containing the Status, Activity, Status Description, Info Text, Executed on, and
the User fields.
Restart for CT-e Batches with Errors
You can select a CT-e Batch with an error from the Overview or Error Overview tab page and then check the problem description in the
last activity. After correcting the problem, you can restart the process using the Restart button on the Overview or Error Overview tab.
Ending the CT-e Batch processing
You can select a CT-e Batch with an error from the Overview or Error Overview tab page and then check the problem description in the
last activity. If you cannot correct the problem, for example due to technical problems with the Sefaz system, you can end the batch
process using the End CT-e Batch Process button on the Overview or Error Overview tab. This finishes the batch process and sets the
status of the Check Authorization step of every CT-e in the batch to Error. The new status for every individual CT-e of the batch
allows you to continue the CT-e process in the error tab of the CT-e monitor. To receive a valid status from Sefaz, the CT-e status check
requests a status for every individual CT-e.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 77 of 174
Caution
By ending the batch processing, a CT-e status request is only possible via CT-e Status Check. The CT-e process step Check
Authorization is set to Error and has to be restarted manually in the CT-e Monitor. It is no longer possible to transmit such a CTe to the government system. If the CT-e is unknown to the government system, the NFE system will update the Sefaz status to the
ERP system and ERP will have to issue the CT-e again. It is no longer possible to send the CT-e to the government system from the
NFE system.
Activities
You can access the CT-e batch monitor in the core application of SAP Nota Fiscal Eletrnica (SAP NFE) by using one of the following
options:
Call up the specific menu CT-e Batch Monitor from the user role /XNFE/WP_NFE_OUT_MONITOR (Outgoing User Menu).
Navigate to the menu option in the navigation structure of the Monitor Outgoing Messages in the SAP NFE core application. You can
access it from the user role by choosing CT-e Batch Monitor .
Activities
You can access the CT-e service status monitor in the SAP NFE core application by using one of the following options:
Call up the CT-e Service Status Monitor in Message Monitor menu under Monitor Outgoing Messages.
Status Monitor
You can display the result of the batch job run in the CT-e Service Status Monitor. For more information how to plan a batch job, see the
batch job Service Status Check in CT-e Batch Job Planning (Outbound).
Status Check
For more information, see NF-e/CT-e Administrator.
Features
You can use transaction code SXMB_IFR to access the following Java-based monitors in the SAP PI Runtime Workbench of the
Integration Builder to track communication process steps in SAP NetWeaver PI:
The Component Monitor can help you identify problems in the different components that SAP NetWeaver PI uses during the
communication process. This includes, for example, monitoring the proxies sent to the core application of SAP Nota Fiscal
Eletrnica, as well as the Integration Engine or the Adapter Engine of the Integration Server.
The Message Monitoris the main entry point for retrieving detailed information about individual messages.
Recommendation
For this monitor, use a specific communication process (integration scenario) as the selection criterion.
The Adapter Monitor can help you detect problems in the message flow from the SAP NFE core application to SAP NetWeaver PI
caused by the adapter.
Monitoring the adapter is critical if you are trying to find the reason why expected messages from the government are still missing
even when the authorities state that the communication was completed successfully from their side.
An additional monitor is available via transaction SXMB_MONI for tracking individual messages that SAP NetWeaver PI receives or
sends to communication partners.
More Information
For more information about the monitoring options in SAP NetWeaver PI, see the topic Central Monitoring in the SAP Library under
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 78 of 174
Functional View SAP NetWeaver by Key Capability Process Integration by Key Capability SAP NetWeaver Exchange
Infrastructure Runtime .
Note
For more information, see the documentation for the BAdIs in Customizing under
Add-Ins for Outbound CT-es .
1.5 Inbound
The Inbound of SAP Nota Fiscal Eletrnica has the following scope:
To automate and monitor the receipt of NF-e, CT-e and Events, to check the authorization against government systems, and trigger
posting of documents in ERP.
The Inbound of SAP Nota Fiscal Eletrnica consists of the following:
Business Roles
NF-e Inbound
CT-e Inbound
DF-e Gate Monitor
Note
The fiscal clerk and the logistics clerk user roles should have separate authorizations. However, certain fiscal authorizations may
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 79 of 174
encompass existing logistics authorizations (and the other way around), as when, for example, the fiscal clerk also works as a
logistics invoice verifier, or when the logistics clerk also works as a logistics execution or inventory manager.
NF-e Administrator
The NF-e administrator is a user with administration rights. This role has access to all features of the NFE solution and is able to
manage authorizations, profiles, and users. The NF-e administrator works in the Administration workplace, and normally also has at
least display authorization for the NF-e Fiscal Workplace, the CT-e Fiscal Workplace, and the NF-e Logistics Workplace.
Note
The NF-e Administrator should at least have display authority for the intended workplace.
DF-e Gate Control
DF-e gate control is carried out by a user who is responsible for the entrance check of a shipment (multiple NF-es and CT-es) at the
company gate. Depending on the multiple statuses of the NF-es/CT-es, the user decides if a shipment can enter the company
grounds.
The DF-e Gate Control user works in the DF-e Gate Monitor to check incoming shipments.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 80 of 174
Note
Also see:
NF-e/CT-e Administrator
1101
When an NF-e in which all items have CFOP 5101 or 5102 is processed, the "NF-e for Standard" process is executed. When an NF-e
whose CFOPs do not lead to a unique process type (such as 5101 or 1101) is processed, an error occurs. You have to correct this
inconsistency in Customizing, after which you can determine the business process again with menu path Administration Incoming NFes Redetermine Business Process . When an NF-e that contains only CFOPs that are not defined here in its items is processed, then
a predefined process is executed that consists of the steps Check Business Partner's Signature and Check Authorization after NF-e
Receipt. If you do not want this to happen, the administrator can also start redetermination through the report in this case after adjusting
the Customizing settings.
Position Types
The introduction of more and more processes made position types necessary. The position types are stored in domain
/XNFE/ITEMTYPE as fixed values.
The system table /XNFE/ITEMCAT categorizes the position types according to their relevance in the business process determination.
If several position types exist in an NF-e, then only the position types with the lowest number are considered during the business
process determination.
Position Type
Description
Priority
<Blank>
Main Position
RTP
Returnable Packaging
SRE
PRE
Determination of the position type of an incoming NF-e is controlled in Customizing under Nota Fiscal Eletronica Inbound Maintain
Assignment of Position Type to CFOP Code . Table /XNFE/CFOPCAT contains the assignment of CFOP codes to position types. If
no entry exists in the table, then the NF-e position receives the position type blank and is therefore seen as a main position.
System table /XNFE/PROCITEM: Assignment of process type to allowed position type: This table stores the position types allowed for a
process type. If the NF-e contains a combination that is not allowed, then the NF-e reports an error.
Process Determination Considering the Position Types
The business process determination considering position types is carried out in four steps:
1. Defining of the position types, which represents the meaning of the CFOP code, such as main position, or symbolic return of
subcontracting components
2. Prioritizing the position types for the business process determination.
3. Defining the allowed combinations for process type and position type.
4. Creating a customizing table to assign the CFOP codes to the position types.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 81 of 174
Example
In subcontracting cases, the NF-e can contain a final product (= main item) and the subcontracting components (= symbolic return). To
determine the correct business process, the entries must be maintained for the final product and the subcontracting components, to
enable assignment of the corresponding item categories:
CFOP
Position Type
5124
Main Item
5902
If an NF-e contains 5124 and 5902, then 5124 receives the higher priority. Therefore, the process NF-e for Subcontracting is
determined. For an NF-e that only contains 5902, the process Symbolic Return is determined.
Example
Process Step
PROCSTEPIMPL
ACCNOTIF
Notification XML
accepted
Flag MANUAL
Flag AUTO
x
AUTHORIZ
Check Authorization
After NF-e Receipt
POASSIGN
Assign Purchase
Order Items
RECDANFE
Goods Arrived,
Enter DANFE
SIGNATUR
Check Business
Partner's Signature
Flag ERP
Flag MANDATORY
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 82 of 174
Note
If you decide not to process an NF-e, you can reject it in the NF-e Fiscal Workplace using the Additional Functions pushbutton. After
rejecting an NF-e, you can send a notification to the issuer via e-mail. For more information, see NF-e Rejection. Vendor notification is
not triggered automatically upon rejection; you must do this manually.
Process
NF-e for Normal Purchasing (NORMPRCH)
This process consists of the following steps:
1. SIGNATUR (Auto)
Check Business Partner's Signature
2. AUTHORIZ (Auto)
Check Authorization After NF-e Receipt
3. NPURVALD (Auto)
Validation for Normal Purchasing
4. POASSIGN (Auto)
Assign PO
5. NFESIMUL
Simulate Invoice
6. DELCREAT (Auto)
Normal Purchasing Inbound Delivery create
7. ACCNOTIF (Auto)
Notification XML accepted
8. RECDANFE
Enter DANFE
9. AUTHGRPT (Auto)
Check Authorization After DANFE Receipt
10. GRCONFQU
Enter Goods Receipt Quantities
11. GRFICHCK
Check Goods Receipt Quantities
12. GRMMCHCK
Prepare Goods Receipt Posting
13. GRPOSTNG (Auto)
Goods Receipt posting
14. IVPOSTNG (Auto)
Post Invoice and NF-e
15. SENDOPCO (Auto, deactivated)
Send Operation Confirmation
Process Steps 12: Check Business Partner's Signature, Check Authorization after NF-e Receipt
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 83 of 174
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 84 of 174
system.
In addition to the validation in the ERP system, there is also a validation of the XML regarding the RTP positions. The intention is to check
that the RTP positions do not contain any taxes.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
The validation in the ERP system comprises checks of units of measurements (UoM), conversions, and purchase orders (if existing).
The validation of the XML file within the NFE system checks that the data adheres to defined rules.
Note
You can use a BAdI in this step to implement customer-specific validation checks. For more information about the available BAdIs,
see BAdIs for Incoming NF-e.
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
The validation steps require the assignment information to be able to carry out the validation and for when returnable packaging is
involved to compare the units of measure of the returnable packaging items with the ERP system. The assignments are not stored in
the validation steps. Instead, the assignments are stored in the subsequent steps for the purchase order assignments.
Step 4: Assign Purchase Order Items
You must assign a PO number and item to all NF-e items. in addition, the following requirements must be fulfilled to complete this step:
The PO number and item must exist in the ERP system.
The ERP system has validated the unit of measure of the NF-e item:
If the unit of measure for the assigned PO is different than the unit of measure for the corresponding NF-e item, then a conversion
must be defined in the ERP system.
Both units of measure must be defined in the NFE and ERP system.
The corresponding ISO code is required to determine the internal language-independent unit of measurement.
These requirements ensure that the following process steps, including communication with an ERP system, are carried out correctly.
Note
This process can be performed manually if the automatic process fails.
Assignment of PO is complete: The NF-e can proceed to the next step
Assignment of items to PO is not complete: The fiscal clerk must search for a PO in the ERP system. If the clerk finds a correct PO
number and item, then the fiscal clerk can manually assign the PO.
Note
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 85 of 174
Note
All parameters must be saved before the status can be changed.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
NF-e Simulation with PO data
No data is sent to the ERP system. There are no simulation results for RTP.
NF-e Simulation with XML data
No data is sent to the ERP system. There are no simulation results for RTP.
Note
You can implement a BAdI that fills extension parameters that are handed over to the ERP system in a simulation/booking of the
invoice. For more information, see BAdIs for Incoming NF-e.
Step 67: Generate Inbound Delivery, Notification XML Accepted
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 86 of 174
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
Inbound Delivery Creation
RTP data is sent to the ERP system
The ERP system creates additional lines for RTP
The ERP system returns the inbound delivery number and position to the NFE system
Actions in Step 7: Notification XML Accepted (technical name: ACCNOTIF)
The fiscal clerk notifies the vendor that the XML has been accepted.
The fiscal clerk sets this process step to OK or Not OK. If the status is OK, the system automatically continues with the next step.
Step 89: Enter DANFE, Check Authorization After DANFE Receipt
The vendor sends the goods, together with the DANFE, to the company, and the goods arrive at the company.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 87 of 174
Actions in Step 10: Enter Goods Receipt Quantities (technical name: GRCONFQU)
The logistics clerk counts the quantities. By default, the quantities in the NF-e are used as the reference point.
If counted quantities deviate from the default values, the logistics clerk can overwrite and enter other quantities.
Once all quantities are entered and checked, the logistics clerk saves all quantities and sets the status to OK.
Actions in Step 11: Check Goods Receipt Quantities (technical name: GRFICHCK)
The fiscal clerk compares the quantities from the NF-e with the received quantities (see step 8).
The fiscal clerk confirms and sets the status of this step to OK.
Actions in Step 12: Prepare Goods Receipt Posting (technical name: GRMMCHCK)
The logistics clerk confirms that all preparations are complete and that the goods receipt can be posted.
The logistics clerk sets the status of this step to OK.
Steps 1314: Post Goods Receipt and Post Invoice and NF-e
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 88 of 174
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
Goods Receipt for Inbound Delivery
The RTP data is sent to the ERP system together with the references of the inbound delivery number and position
The ERP posts the goods receipt with the RTP data.
The ERP system checks that the RTP positions in the inbound delivery are still consistent
Actions in Step 14: Post Invoice and NF-e (technical name: IVPOSTNG)
The invoice receipt is posted to the ERP system.
The NFE system receives the result of the invoice receipt from the ERP system:
1. Invoice receipt successful: In this case, the status of the step is set to OK. The NFE process is completed.
2. Invoice receipt failed and no invoice is created: In this case, the step is set to Not OK and you must carry out manual corrections in
the ERP system.
3. Invoice receipt failed and a parked invoice is created: In this case, the status of the step is set to OK, but you still must carry out
manual corrections in the ERP system. Nevertheless, the NFE process is completed.
The NF-e is created and posted in the ERP system together with the invoice receipt.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
RTP data is not required. The RTP lines in the NF-e are created automatically based on the lines in the material document
Note
You can implement a BAdI that fills extension parameters that are handed over to the ERP system in a simulation/booking of the
invoice. For more information, see BAdIs for Incoming NF-e.
Step 15: Operation Confirmation Event
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 89 of 174
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Prerequisites
You have set up the RFC connection between SAP Nota Fiscal Eletrnica and your SAP ERP system. For more information, see
Technical Settings in Core Application (Inbound).
You have completed the necessary Customizing settings in your SAP ERP system. For more information, see Related Configuration
in SAP ERP.
Features
Assign Purchase Order Items
At several points during this process step, the two systems exchange information as follows:
Find Purchase Order Items
If the XML for the incoming NF-e does not contain any purchase order details, you can trigger a search to find the corresponding
purchase order items in your SAP ERP system.
Item-Based Search
Find purchase order: You can enter a purchase order number (required) and the purchase order item number (optional) to trigger a
specific search.
Extended search: Your SAP ERP system uses the CNPJ numbers and material numbers from the incoming XML to find possible
purchase orders with the equivalent material number in your SAP ERP system. You can limit this search by entering a range for the
date on which the purchase order was created or the date of the corresponding inbound delivery. The system then uses the value
for the NCM code to filter the list of possible matches (if any).
Note
A fuzzy search is only available for the ERP Mat. No. and the Vendor Prod/Serv Code fields. If you make (or change) an entry in
any of the other search fields, you must enter the entire value. Do not enter * or a partial value.
Global Search
Find purchase order item by purchase number: You can enter a purchase order number directly to receive all related purchase
order items.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 90 of 174
Find purchase order: You can use the input help to receive a list of purchase order numbers. Select one entry to receive all related
purchase order items. Your SAP ERP system uses the CNPJ numbers from the incoming XML to find possible purchase orders in
your SAP ERP system. You can limit this search by entering a range for the date on which the purchase order was created or the
date of the corresponding inbound delivery.
If your SAP ERP system finds a possible match, it sends the relevant data to SAP Nota Fiscal Eletrnica for purchase order items that
have not been delivered or deleted. You can then select the correct items.
Validate Purchase Orders
After the items in the XML are assigned to purchase order items, SAP Nota Fiscal Eletrnica needs to validate this information by
comparing it with the purchase order data in your SAP ERP system. Your SAP ERP system searches for the purchase order number in
its database and when it finds a match, checks the quantities as follows:
1. Confirms that the unit of measurement (UoM) in the incoming NF-e exists in the SAP ERP system
2. Converts the UoM of the quantity in the incoming XML according to the settings you made in your SAP ERP system
3. Provides SAP Nota Fiscal Eletrnica with the ISO code mapped to the UoM
In addition, the system checks whether the recipients CNPJ in XML is the same as the CNPJ of the business place that is linked to the
purchase order.
Note
The system supports the assignment of multiple NF-e items to the same purchase order item. This feature is not supported if the
purchase order item has multiple accounts assignment.
Simulate PO Items
Once the assignment to the purchase order items is made and validated, you can trigger a simulation using the price from the purchase
order and the quantity from the incoming XML data. Your SAP ERP system simulates the NF-e posting and returns the simulation results
for you to check.
If needed, you can overwrite the tax codes or CFOP codes proposed by the system and run the simulation with different selections.
Your SAP ERP system selects the tax codes and CFOP codes as follows:
Select tax codes: To create the simulation, your SAP ERP system uses the tax codes for each purchase order item in the purchase
order as the default values for tax codes in the NF-e. However, you can overwrite these default values using a list of possible tax
codes that are proposed by your SAP ERP system. The SAP ERP system proposes the allowed tax codes based on a check of the
material usage and tax type (input/output tax) for each purchase item.
Select CFOP codes: To create the simulation, your SAP ERP system uses the CFOP codes defined in Customizing as the default
values in the NF-e. However, you can overwrite these default values using a list of all possible CFOP codes for the region and date
that are proposed by your SAP ERP system and filtered by SAP Nota Fiscal Eletrnica.
Simulate Invoice and NF-e
To check if the invoice and NF-e can be posted once the goods arrive, you can run a simulation of the invoice and NF-e posting in your
SAP ERP system. Your SAP ERP system uses the prices and NF-e data from the incoming XML and the assigned purchase order
items to simulate the prices and taxes.
During the simulation, the system makes several checks:
Standard checks that are also made when such a posting is made using the MIRO transaction. These include, for example, tolerance
checks and a balance check.
NF-e Issuers CNPJ checks between the data in the XML and the master data of vendor or of the invoicing party in the purchase
order.
Tax comparison checks between the data in the XML and the tax codes and Customizing settings in your SAP ERP system. The
following is checked:
ICMS rate
IPI rate
ICST rate
Note that there is no tax comparison for PIS and COFINS, because incoming PIS and COFINS are posted according to the settings in
SAP ERP, which can differ from the values in XML.
Note
You can add your own checks by implementing the Check XML for Invoice (CHECK_INVOICE) method in the Conversions for
Incoming NF-e Automation (J_1BNFE_IN) Business Add-In (BAdI) in your SAP ERP system. The system runs your checks after the
standard validation checks. For more information, see the BAdI method documentation in the system.
The simulation results show errors and warnings that may occur. If the tax comparison checks result in an error, the cause may be one
or more of the following:
XML content is not correct
Tax code is not correct
Customizing in your SAP ERP system (for example, related to tax rates) is not up-to-date
If needed, you can overwrite the tax codes or CFOP codes proposed by the system and run the simulation with different selections.
Generate Inbound Delivery
When the status of the invoice and NF-e posting simulation is set to okay, SAP Nota Fiscal Eletrnica informs your SAP ERP system.
Your SAP ERP system uses the delivery quantities and UoM from the incoming XML to create the actual inbound delivery automatically.
The system checks that there will be only one inbound delivery created for one nota fiscal. If the settings in PO cause a delivery split
(e.g. different incoterms), the system will not create the inbound delivery.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 91 of 174
Note
You can implement your own logic in the Search for Inbound Delivery (INBOUND_DELIV_SEARCH) method in the Conversions for
Incoming NF-e Automation (J_1BNFE_IN) Business Add-In (BAdI) method to add a search for existing inbound deliveries in your
SAP ERP system during this process step.
Your SAP ERP system saves the NF-e number and the series in the header of the delivery document and sends the delivery document
number to SAP Nota Fiscal Eletrnica. If your SAP ERP system cannot create the inbound delivery, the system sends a corresponding
message to SAP Nota Fiscal Eletrnica.
Batch Split
It is possible to manually split the inbound delivery into batches in your SAP ERP system using the VL32n transaction. If you create
batches, your SAP ERP system posts the corresponding goods receipt with the same number of line items as in the split inbound
delivery. However, since an NF-e can have only one line item for the <det nItem> tag in the XML, your SAP ERP system posts the
NF-e with one line item, using the quantity from the XML. The invoice is posted with the line items as in the split inbound delivery and
goods receipt.
Post Goods Receipt
After the goods arrive and you complete all logistics-relevant activities, you can trigger the goods receipt posting from SAP Nota Fiscal
Eletrnica. Your SAP ERP system then automatically posts the goods receipt for the corresponding inbound delivery and sends the
resulting material document number to SAP Nota Fiscal Eletrnica.
Post Invoice and NF-e
Using the data from SAP Nota Fiscal Eletrnica, your SAP ERP system compares the quantities in the goods receipt with the quantities
in the incoming XML to ensure that they are still the same. If they are not the same, the processing cannot continue. If the values are
correct, your SAP ERP system automatically posts the invoice and corresponding NF-e using the prices from the XML. Your SAP ERP
system sends the resulting invoice number and the fiscal year to SAP Nota Fiscal Eletrnica. Note that the invoice is always posted
using the local currency, even when the value of the items in purchase order is in a foreign currency.
If an invoice cannot be posted, your SAP ERP system sends an error message to SAP Nota Fiscal Eletrnica. If the error can be fixed,
the user can then repeat the posting step in SAP Nota Fiscal Eletrnica. If not, the user can set the NF-e to complete in SAP Nota Fiscal
Eletrnica and then post the invoice and NF-e in SAP ERP manually.
More Information
This document describes the communication and document flow for the normal purchasing process. For information about the specifics
related to other purchasing processes, see the corresponding documentation:
Processing in SAP ERP: Contingency
Processing in SAP ERP: Cancellation
Processing in SAP ERP: Stock Transfer
Processing in SAP ERP: NF-e for Subcontracting (SUBCON1A)
Processing in SAP ERP: NF-e for Symbolic Returns (SUBCON2C)
Processing in SAP ERP: NF-e for Return of Components (SUBCON2D)
Processing in SAP ERP: Future Delivery Invoice
Processing in SAP ERP: Future Delivery Goods Receipt
Processing in SAP ERP: Consignment Goods Receipt
Processing in SAP ERP: Consignment Invoice
Processing in SAP ERP: Returnable Packaging with Purchased Goods
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 92 of 174
Process
This process is used if a DANFE arrives before the XML
When entering the DANFE (44digit access key), the system checks if the XML is available. If no XML is available, you have the
option to store the DANFE with all data that can be retrieved from the access key.
If you accept the DANFE, the DANWOXML process is assigned. This means you must out the logistics processing actions manually.
Note
The arrival of the XML does not change the process type: no new process determination occurs.
This process is valid if this is an NF-e in contingency.
The process is carried out as follows:
Authorization is checked at SEFAZ
You must analyze the results of the authorization check because there may be a contingency NF-e that does not exist at SEFAZ, The
following options exist:
NF-e does not exist at SEFAZ and there is no contingency NF-e. Result: Error
NF-e does not exist at SEFAZ and contingency NF-e. Result: Process continues
NF-e exists at SEFAZ, but is not authorized. Result: Error
NF-e exists at SEFAZ and is authorized: Process continues
If the process can be continued, the system waits for the arrival of the corresponding XML in the next step.
If the XML arrives, then the step is set to OK and another authorization check is carried out at SEFAZ.
If the authorization is validated, then the step is set to OK and the system checks if a corresponding NF-e was posted in the ERP
system.
Now the validation step DWOXVALD is executed.
Note
This validation step contains a BAdI that can be used to carry out a customer specific validation of the incoming XML document.
For more information, see BAdIs for Incoming NF-e.
If the corresponding NF-e is found, the system checks if certain values match, for example, the total value and the ICMS total value. If
these values match, then the step is set to OK and the NF-e is set to status completed.
If no corresponding NF-e can be found, then the step is set to Not OK. However, this step can be repeated.
If no corresponding NF-e is posted in the ERP system, then the process can be manually set to completed after carrying out checks in
the ERP system.
Note
If you decide that you do not want to process an NF-e, you can reject it in the NF-e Fiscal Workplace by choosing Additional
Functions. For more information, see NF-e Rejection. Note that the vendor notification is not triggered automatically, it must be
triggered via a user action (see Vendor Notification).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 93 of 174
Note
An additional step has been added after Check Existence of NF-e in ERP.
Step: Operation Confirmation Event
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Features
Contingency Mode
If the issuer is running under contingency, the goods and DANFE may arrive at your site before the XML for the incoming NF-e. If the
DANFE arrives before the XML, you can create the inbound delivery manually and create a corresponding incoming NF-e in your SAP
ERP system.
When the XML for the incoming NF-e arrives, SAP Nota Fiscal Eletrnica sends the NF-e access key to your SAP ERP system, which
then checks if the incoming NF-e has already been created manually. If an incoming NF-e was created, SAP Nota Fiscal Eletrnica
sends the following data about the NF-e from the incoming XML to your SAP ERP system:
Protocol number
Authorization date and time
XML version
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 94 of 174
Your SAP ERP system updates this information in the posted NF-e and sends the amounts that have been posted for the NF-e to SAP
Nota Fiscal Eletrnica for further processing. If the incoming NF-e does not exist in your SAP ERP system, the system sends a
corresponding message to SAP Nota Fiscal Eletrnica.
Note
The automated deletion of inbound deliveries is only possible for inbound deliveries that are created using the incoming NF-e
automation functions in SAP Nota Fiscal Eletrnica.
You use one of three cancellation processes to cancel an NF-e:
1. CANCEL00
2. CANCEL01
3. CANCEL02 (for the special case if a cancellation event arrives before the appropriate NF-e has arrived in the system)
Every process type has a fixed cancel process assigned to it. The table below lists the processes that can be canceled, along with their
assigned cancellation process type:
NF-e for Normal Purchasing
The process type is NF-e for Normal Purchasing (technical name: NORMPRCH), the corresponding cancel process type is
Cancellation of NF-e (technical name: CANCEL00).
NF-e for other processes without DANFE
The process type is NF-e for other processes without DANFE (technical name: SIGNAUTH), the corresponding cancel process type
is Cancellation of NF-e, general process (technical name: CANCEL01).
NF-e for other processes with DANFE
The process type is NF-e for other processes with DANFE (technical name: SIGNAUT2), the corresponding cancel process type is
Cancellation of NF-e, general process (technical name: CANCEL01)..
NF-e without business process assignment
The process type is NF-e without business process assignment (technical name: BUPRODET), the corresponding cancel process
type is Cancellation of NF-e, general process (technical name: CANCEL01).
NF-e for Stock Transfer
The process type is NF-e for Stock Transfer (technical name: STOCKTRF), the corresponding cancel process type is Cancellation of
NF-e, general process (technical name: CANCEL01).
NF-e for subcontracting
The process type is NF-e for subcontracting (technical name: SUBCON1A), the corresponding cancel process type is Cancellation
of NF-e (technical name: CANCEL00).
Symbolic return of subcontracting components
The process type is Symbolic return of subcontracting components (technical name: SUBCON2C), the corresponding cancel
process type is Cancellation of NF-e, general process (technical name: CANCEL01).
Return of subcontracting components
The process type is Return of subcontracting components (technical name: SUBCON2D), the corresponding cancel process type is
Cancellation of NF-e, general process (technical name: CANCEL01).
Future Delivery - Invoice Receipt
The process type is Future Delivery - Invoice Receipt (technical name: FUTDELIV), the corresponding cancel process type is
Cancellation of NF-e, general process (technical name: CANCEL01).
Future Delivery - Goods Receipt
The process type is Future Delivery - Goods Receipt (technical name: FUTDELGR), the corresponding cancel process type is
Cancellation of NF-e (technical name: CANCEL00).
Custumer specific Business Process with DANFE
The process type is Custumer specific Business Process with DANFE (technical name: FLEXPRO01), the corresponding cancel
process type is Cancellation of NF-e, general process (technical name: CANCEL01).
DANFE arrives before XML
The process type is DANFE arrives before XML (technical name: DANWOXML), the corresponding cancel process type is
Cancellation of NF-e (technical name: CANCEL00).
Consignment - Invoice Receipt
The process type is Consignment - Invoice Receipt (technical name: CONSIGIV), the corresponding cancel process type is
Cancellation of NF-e, general process (technical name: CANCEL01).
Consignment - Goods Receipt
The process type is Consignment - Goods Receipt (technical name: CONSIGGR), the corresponding cancel process type is
Cancellation of NF-e (technical name: CANCEL00).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 95 of 174
Example
Process
If a canceled NF-e arrives, the system carries out the following steps. If the automatic process fails, then the user can manually carry out
individual follow-on actions in the workplace.
Assign Business Process Cancellation of NF-e (technical name: CANCEL00
Step: Check Business Partner's Signature (technical name: SIGNATUR)
Check if this step was carried out correctly:
If yes, proceed to the next check.
If No, then the step is not OK and either the user or the system can decide what happens with this NF-e:
Cancellation rejected: Go back to original process and continue there.
Cancellation accepted: The NF-e is canceled and the processing finished.
Step: Check Authorization after Cancellation XML (technical name: AUTHCANC)
Check if this step was carried out correctly:
If yes, proceed to the next check.
If No, then the step is not OK and either the user or the system can decide what happens with this NF-e:
Cancellation rejected: Go back to original process and continue there.
Cancellation accepted: The NF-e is canceled and the processing finished.
Step: XML Arrives when DANFE Already Exists (technical name: XMLARRIV)
Check if this step was carried out correctly:
If yes, proceed to the next check.
If No, then the step is not OK and either the user or the system can decide what happens with this NF-e:
Cancellation rejected: Go back to original process and continue there.
Cancellation accepted: The NF-e is canceled and the processing finished.
Step: Delete a Delivery IN ERP (technical name: DELDELET)
Check if this step was carried out correctly:
If yes, proceed to the next check.
If No, then the step is not OK and either the user or the system can decide what happens with this NF-e:
Cancellation rejected: Go back to original process and continue there.
Cancellation accepted: The NF-e is canceled and the processing finished.
Step: Check Manual Activities in ERP (technical name: ERPTASKS)
Check if this step was carried out correctly:
If yes, proceed to the next check.
If No, then the step is not OK and either the user or the system can decide what happens with this NF-e:
Cancellation rejected: Go back to original process and continue there.
Cancellation accepted: The NF-e is canceled and the processing finished.
NF-e complete
If all these steps have been checked, then the processing of the NF-e is finished. The NF-e is either canceled or sent back to the
original processing.
Note
If you decide that you do not want to process an NF-e, you can reject it in the Fiscal Workplace by choosing Additional Functions.
After a rejection, you can notify the vendor via e-mail. For more information see NF-e Rejection. Note that the vendor notification is
not triggered automatically, it must be triggered via a user action (see Vendor Notification).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 96 of 174
Caution
The special case [cancellation event arrives before the corresponding NF-e exists in the system] requires an additional cancel
process. In this special case, an entry for a cancellation NF-e is created in the tables for incoming NF-es, and the new cancel
process CANCEL02 is assigned:
Name of the additional cancel process: Cancellation of NF-e
Technical name of the cancel process: CANCEL02
Steps of the cancellation process CANCEL02:
1. Arrival of XML (technical name: XMLARRIV)
2. Check manual activities in ERP (technical name: ERPTASKS)
The new cancellation process is used if the cancellation event arrives in the system before the NF-e has arrived.
Note
The automated deletion of inbound deliveries is only possible for inbound deliveries that are created using the Incoming NF-e
Automation functions in SAP Nota Fiscal Eletrnica.
If the goods receipt process has been started, the inbound delivery can not be deleted, and your SAP ERP system informs SAP Nota
Fiscal Eletrnica accordingly. If you do not want your SAP ERP system to automatically delete inbound deliveries, you can implement
your own logic in the Check if Deletion of Inbound Delivery Possible (INBOUND_DELIV_ DELETE_CHECK) method in the
Conversions for Incoming NF-e Automation (J_1BNFE_IN) Business Add-In (BAdI).
More Information
For information about the standard communication and processing of incoming NF-e, see Processing in SAP ERP: Normal Purchasing.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 97 of 174
completed.
After you have carried out all required manual actions, you can set the ERPTASKS step to OK; the NF-e is then completed.
After you have changed the customizing for the business process determination, you can start a new business process determination
for this NF-e.
NF-e for Other Processes with DANFE
(Technical name: SIGNAUT2)
You can select this process manually via the customizing of the business process determination.
1. Check Business Partner's Signature (technical name: SIGNATUR)
2. Check Authorization after NF-e Receipt (technical name: AUTHORIZ)
3. Validate XML (technical name: SIG2VALD)
This validation step contains a BAdI that can be used to carry out a customer-specific validation of the incoming XML document.
4. Manual Step before Notification: (technical name: ACCPTNFE)
5. Notification XML accepted (technical name: ACCNOTIF
6. Goods Arrived, Enter DANFE (technical name: RECDANFE)
7. Check Manual Activities in ERP (technical name: ERPTASKS)
8. Send Operation Confirmation (technical name: SENDOPCO
(Auto, deactivated))
Note
The Goods Arrived, Enter DANFE step comprises several manual actions. You must decide which actions you need to carry out.
After you have carried out all necessary actions, you can set this step to OK so that the NF-e can continue to be processed and
eventually completed.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 98 of 174
GRMMCHCK
Prepare Goods Receipt Posting
10. GRSTOPST (Auto)
Post Goods Receipt Future Delivery
11. SENDOPCO (Auto, deactivated)
Send Operation Confirmation
9.
Process
Process Steps 12: Check Business Partner's Signature; Check Authorization after NF-e Receipt
Note
Vendor notification is not triggered automatically; you must trigger it manually. For more information, see Vendor Notification.
Note
Vendor notification is not triggered automatically; you must trigger it manually. For more information, see Vendor Notification.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Page 99 of 174
Note
You can use a BAdI in this step to implement customer-specific validation checks. For more information about the available BAdIs,
see BAdIs for Incoming NF-e.
Steps 46: Notification XML Accepted; Enter DANFE; Check Authorization after DANFE Receipt
The vendor sends the goods together with the DANFE to your company, and the goods and DANFE arrive.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
If you do not want to process a NF-e, you can reject it in the NF-e Fiscal Workplace by choosing Additional Functions. For more
information, see NF-e Rejection.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Features
Post Goods Receipt for Stock Transfer
After a stock transfer is authorized, you can view the corresponding NF-e in the NF-e Fiscal Workplace.
After the goods receipt is confirmed in the NF-e Logistics Workplace, SAP Nota Fiscal Eletrnica sends the access key from the NF-e
to your SAP ERP system for checking and to be used in the posting of necessary follow-on documents. Your SAP ERP system does the
following:
1. Based on the information in the access key, the SAP ERP system tries to locate a reference document by searching for documents
in the following order:
1. The system tries to find the inbound delivery.
2. If the system cannot find the inbound delivery, the system looks for the outbound delivery.
3. If the system cannot find the outbound delivery, the system looks for a corresponding goods reference.
2. The system automatically posts the good receipt, using an inbound delivery number, or an outbound delivery number, or a material
document number as the reference.
3. The system creates the corresponding inbound NF-e using the tax code and other relevant data, such as the access key or XML
version, from the outgoing NF-e.
4. The system sends the material document number from the goods receipt to SAP Nota Fiscal Eletrnica. If NF-e processing cannot
be completed, the system sends an error message.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
Vendor notification is not triggered automatically; you must trigger it manually. For more information, see Vendor Notification.
Note
Vendor notification is not triggered automatically; you must trigger it manually. For more information, see Vendor Notification.
Note
This validation step contains a BAdI that can be used to carry out a customer specific validation of the incoming XML document. For
more information, see BAdIs for Incoming NF-e.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Process
Prerequisites
You have activated the Outsourced Manufacturing in ERP Operations (LOG_MM_OM_1) Business Function in your
SAP ERP system, which is available as of SAP Enhancement Package 4 for SAP ERP 6.0. With this business function, you can enter
subcontracting components in the inbound delivery, or you can fill the subcontracting components using a shipping notification from
the supplier.
You have set up the RFC connection between SAP Nota Fiscal Eletrnica and your SAP ERP system. For more information, see
Technical Settings in SAP NFE Core Application (Inbound).
You have completed the necessary Customizing settings in your SAP ERP system. For more information, see Related Configuration
in SAP ERP.
Features
The following documents explain the communication between your SAP ERP system and SAP Nota Fiscal Eletrnica in the steps for
processing the NF-e related to the components. These steps are as follows for the respective process:
Process Name
Technical Name
Steps
NF-e for Subcontracting
SUBCON1A
SUBCON2C
SUBCON2D
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
The validation checks if the Symbolic Returns contain taxes: If they contain taxes, the process stops with an error.
If there are RTP positions, then a check of the unit of measurement (UoM) and conversion (if necessary) is carried out in the ERP
system.
In addition to the validation in the ERP system, there is also a validation of the XML regarding the RTP positions. The intention is to check
that the RTP positions do not contain any taxes.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
The validation in the ERP system comprises checks of units of measurements (UoM), conversions, and purchase orders (if existing).
The validation of the XML file within the NFE system checks that the data adheres to defined rules.
Note
You can use a BAdI in this step to implement customer-specific validation checks. For more information about the available BAdIs,
see BAdIs for Incoming NF-e.
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
The validation steps require the assignment information to be able to carry out the validation and for when returnable packaging is
involved to compare the units of measure of the returnable packaging items with the ERP system. The assignments are not stored in
the validation steps. Instead, the assignments are stored in the subsequent steps for the purchase order assignments.
Process Step 4: Assignment of Items with Components
A PO number and item must be assigned to all NF-e items. This happens either automatically, or by manual assignment if errors
occurred. In addition, the following requirements must be fulfilled to complete this step:
The PO number and item must exist in the ERP system.
The ERP system has validated the unit of measure of the NF-e item:
If the unit of measure for the assigned PO is different than the unit of measure for the corresponding NF-e item, then a conversion
must be defined in the ERP system.
Both units of measure must be defined in the NFE and ERP system.
The corresponding ISO code is required to determine the internal language-independent unit of measurement.
These requirements ensure that the following process steps, including communication with an ERP system, are carried out correctly.
Actions in Step 4: Assignment of Items with Components (technical name: SCASSIGN). In this step you have to assign all finished
products and components to purchase order items.
An NF-e item is automatically assigned to the PO if the XML provides this information. The ERP and NFE systems check if the
assignment is complete.
Note
This process can be performed manually if the automatic process fails.
Assignment of PO is complete: The NF-e can proceed to the next step
Assignment of items with components to PO is not complete: The fiscal clerk must search for a PO in the ERP system. If the clerk
finds a correct PO number and item, then the fiscal clerk can manually assign the PO.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
Additional Check and Functions
If the item is a component of item type symbolic return and there is a PO number and item assigned, check if this PO number and
item exists in one of the main items. If not, raise an error as this is not allowed.
If there is only one main item and the component contains no assigned PO number and item, then assign the main item PO
number and item to the components that have no assignment so far.
Note
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
Step 5: Simulate Invoice and NF-e
Note
All parameters must be saved before the status can be changed.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
NF-e Simulation with PO data
No data is sent to the ERP system. There are no simulation results for RTP.
NF-e Simulation with XML data
No data is sent to the ERP system. There are no simulation results for RTP.
Note
You can implement a BAdI that fills extension parameters that are handed over to the ERP system in a simulation/booking of the
invoice. For more information, see BAdIs for Incoming NF-e.
Step 6: Sub Contracting Inbound Delivery create
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 6: Sub Contracting Inbound Delivery create (technical name: SCDELCRE)
If the simulation is OK, then the system triggers the subcontracting inbound delivery creation:
The ERP system uses the PO, the PO item, and the XML quantity data to create an inbound delivery.
The ERP system sends the created inbound delivery number back to the NFE system.
The NFE system assigns the inbound delivery. The subcontracting NF-e can proceed to the next processing step.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
Inbound Delivery Creation
RTP data is sent to the ERP system
The ERP system creates additional lines for RTP
The ERP system returns the inbound delivery number and position to the NFE system
Step 7: Notification XML Accepted
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
The vendor sends the goods, together with the DANFE, to the company, and the goods arrive at the company.
Actions in Step 9: Check Authorization After DANFE Receipt (technical name: AUTHGRPT)
The system checks if the NF-e is still authorized.
Step 10: Enter Goods Receipt Quantities
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 10: Enter Goods Receipt Quantities (technical name: GRCONFQU)
The logistics clerk counts the quantities. By default, the quantities in the NF-e are used as the reference point.
If counted quantities deviate from the default values, the logistics clerk can overwrite and enter other quantities.
Once all quantities are entered and checked, the logistics clerk saves all quantities and sets the status to OK.
Step 11: Check Goods Receipt Quantities
Actions in Step 11: Check Goods Receipt Quantities (technical name: GRFICHCK)
The fiscal clerk compares the quantities from the NF-e with the received quantities (see step 8).
The fiscal clerk confirms and sets the status of this step to OK.
Step 12: Prepare Goods Receipt Posting
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 12: Prepare Goods Receipt Posting (technical name: GRMMCHCK)
The logistics clerk confirms that all preparations are complete and that the goods receipt can be posted.
The logistics clerk sets the status of this step to OK.
Step 13: Goods Receipt Subcontracting mixed
Actions in Step 13: Goods Receipt Subcontracting mixed (technical name: GRSCON1A)
The goods receipt is automatically posted to the ERP system if the preceding step was set to OK (If the preceding step was not OK,
the fiscal clerk can repeat the step..
The inbound delivery number is sent to the ERP system and the goods receipt for the inbound delivery is posted.
The NFE system receives the goods receipt report from the ERP system:
1. Goods receipt successful: In this case, the system sets the status of the step to OK.
2. Goods receipt failed: In this case, the system sets the step to Not OK. The fiscal clerk can carry out manual corrections in the ERP
system and repeat the step.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
Goods Receipt for Inbound Delivery
The RTP data is sent to the ERP system together with the references of the inbound delivery number and position
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
The ERP posts the goods receipt with the RTP data.
The ERP system checks that the RTP positions in the inbound delivery are still consistent
Step 14: Post Invoice and NF-e Subcontracting mixed
Actions in Step 14: Post Invoice and NF-e Subcontracting mixed (technical name: IVSCON1A)
The invoice receipt is posted to the ERP system.
The NFE system receives the result of the invoice receipt from the ERP system:
1. Invoice receipt successful: In this case, the status of the step is set to OK. The NFE process is completed.
2. Invoice receipt failed and no invoice is created: In this case, the step is set to Not OK and you must carry out manual corrections in
the ERP system.
3. Invoice receipt failed and a parked invoice is created: In this case, the status of the step is set to OK, but you still must carry out
manual corrections in the ERP system. Nevertheless, the NFE process is completed.
The NF-e is created and posted in the ERP system together with the invoice receipt.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
RTP data is not required. The RTP lines in the NF-e are created automatically based on the lines in the material document
Note
You can implement a BAdI that fills extension parameters that are handed over to the ERP system in a simulation/booking of the
invoice. For more information, see BAdIs for Incoming NF-e.
Step 15: Operation Confirmation Event
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Features
Assign Purchase Order Items
SAP Nota Fiscal Eletrnica sends the XML data to your SAP ERP system and indicates that the purchase order was created for a
subcontracting order.
If the XML contains the purchase order information for the components, your SAP ERP system maps the XML materials to the ERP
materials. By default, the mapping is done using vendor info records. Alternatively, you can implement your own logic to do this mapping
in the Convert Material from XML into ERP Material(MATERIAL_CONVERSION) method of the Conversions for
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Incoming NF-e Automation (J_1BNFE_IN) Business Add-In (BAdI). Your SAP ERP system checks that the ERP
material in the XML is included in the component list for the purchase order. The system then converts the UoM (unit of measurement) in
the XML to the UoM in SAP ERP.
If the XML does not contain the purchase order item information, your SAP ERP system uses the purchase order for the end product to
search for the possible purchase order items for the used components. The purchase order data for the components, if any, is returned
to SAP Nota Fiscal Eletrnica. After the purchase order items are assigned to the components, your SAP ERP system then coverts the
UoM in the XML to the UoM in SAP ERP.
Note
When you save the purchase order assignment in SAP Nota Fiscal Eletrnica, it is essential for the rest of the automation to run
correctly that the assignment of the NF-e item to the purchase order item or purchase order item component is unique.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
In the event of an error, the process step validation can be set to OK manually. This can influence the later simulation or actions in
the ERP system.
Note
You can use a BAdI in this step to implement customer-specific validation checks. For more information about the available BAdIs,
see BAdIs for Incoming NF-e.
Process Step 4: Assignment of Items with Components
A PO number and item must be assigned to all NF-e items. This happens either automatically, or by manual assignment if errors
occurred. In addition, the following requirements must be fulfilled to complete this step:
The PO number and item must exist in the ERP system.
The ERP system has validated the unit of measure of the NF-e item:
If the unit of measure for the assigned PO is different than the unit of measure for the corresponding NF-e item, then a conversion
must be defined in the ERP system.
Both units of measure must be defined in the NFE and ERP system.
The corresponding ISO code is required to determine the internal language-independent unit of measurement.
These requirements ensure that the following process steps, including communication with an ERP system, are carried out correctly.
Actions in Step 4: Assignment of Items with Components (technical name: SCASSIGN). In this step you have to assign all finished
products and components to purchase order items.
An NF-e item is automatically assigned to the PO if the XML provides this information. The ERP and NFE systems check if the
assignment is complete.
Note
This process can be performed manually if the automatic process fails.
Assignment of PO is complete: The NF-e can proceed to the next step
Assignment of items with components to PO is not complete: The fiscal clerk must search for a PO in the ERP system. If the clerk
finds a correct PO number and item, then the fiscal clerk can manually assign the PO.
Note
Additional Check and Functions
If the item is a component of item type symbolic return and there is a PO number and item assigned, check if this PO number and
item exists in one of the main items. If not, raise an error as this is not allowed.
If there is only one main item and the component contains no assigned PO number and item, then assign the main item PO
number and item to the components that have no assignment so far.
Note
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
Step 5: Simulate Invoice and NF-e Subcontracting
Actions in Step 5: Simulate Goods Movement and NF-e (technical name: NFESIMSA)
After the PO items with components are assigned, the fiscal clerk can trigger a simulation using XML data, tax code, and CFOP. This
simulation serves as check on the ERP side to verify if a later goods receipt can be posted. The fiscal clerk can visualize the
simulation and comparison results with the data of the incoming NF-e. The fiscal clerk can change tax codes and CFOP codes.
If the simulation was correct, then the NF-e Subcontracting can proceed to the next processing phase.
If the simulation is not correct, then the NF-e Subcontracting receives the result Simulation Not OK. In this case, the fiscal clerk can
either:
1. Reject the NF-e Subcontracting and notify the vendor. (Vendor notification is not triggered automatically upon rejection; the fiscal
clerk must notify the vendor manually.)
2. Manually adjust incorrectly assigned items as described in step 4, and then continue with step 5.
Note
All parameters must be saved before the status can be changed.
Step 6: Goods Issue Subcontracting Symbolic Return
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 6: Goods Issue Subcontracting Symbolic Return (technical name: GISCON2C)
If the simulation is OK, then the system triggers the subcontracting goods issue symbolic return creation. The Goods Issue
Subcontracting Symbolic Return is processed.
Step 7: Operation Confirmation Event
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Features
Assign Purchase Order Items
SAP Nota Fiscal Eletrnica sends the XML data to your SAP ERP system. Your SAP ERP system searches for subcontracting
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
purchase orders that have the XML materials in the component list for the purchase order items.
Your SAP ERP system then maps the XML materials to the ERP materials. By default, the mapping is done using vendor info records.
Alternatively, you can implement your own logic to do this mapping in the Convert Material from XML into ERP
Material(MATERIAL_CONVERSION) method of the Conversions for Incoming NF-e Automation (J_1BNFE_IN)
Business Add-In (BAdI). The system then converts the UoM (unit of measurement) in the XML to the UoM in SAP ERP.
The purchase order data for the components is returned to SAP Nota Fiscal Eletrnica.
Simulate Material Document and NF-e
Using the information from SAP Nota Fiscal Eletrnica, your SAP ERP system checks if the stock quantities at the vendor are sufficient
for a consumption posting for the components. If the posting is possible, the system checks if the goods receipt of the end product
related to this purchase order item has taken place. If this is not the case, your SAP ERP system returns an error message to SAP Nota
Fiscal Eletrnica. If the posting is possible, the system simulates the tax postings using the prices and other values from the XML sent
by SAP Nota Fiscal Eletrnica. The ICMS value should be 0. The tax base is calculated using the values from the XML.
Post Subsequent Adjustment and NF-e
Using the data from the XML sent by SAP Nota Fiscal Eletrnica, your SAP ERP posts the subsequent adjustments for the components
(movement type 543) and the corresponding NF-e. This NF-e has additional lines for the used components with the NF item type that is
mapped to the relevant movement type in your SAP ERP Customizing. In the Observation field of the NF-e, the system enters the NF
number series of the referred NF. If no reference is available, the system enters a hyphen (-). Your SAP ERP system then sends the
material number and material item numbers to SAP Nota Fiscal Eletrnica.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
The validation checks that no paper-based NF is assigned to Returns of Components: If yes, the process stops with an error
The validation checks if the Returns of Components contain taxes: If they contain taxes, the process stops with an error
Note
You can use a BAdI in this step to implement customer-specific validation checks. For more information about the available BAdIs,
see BAdIs for Incoming NF-e.
Process Step 4: Check and Assignment of Units
A PO number and item must be assigned to all NF-e items. This happens either automatically, or by manual assignment if errors
occurred. In addition, the following requirements must be fulfilled to complete this step:
The PO number and item must exist in the ERP system.
The ERP system has validated the unit of measure of the NF-e item:
If the unit of measure for the assigned PO is different than the unit of measure for the corresponding NF-e item, then a conversion
must be defined in the ERP system.
Both units of measure must be defined in the NFE and ERP system.
The corresponding ISO code is required to determine the internal language-independent unit of measurement.
Note
This step is carried out automatically. The NFE system calls the ERP system to check if the units of measure are known in the ERP
system and if a conversion can be carried out if required.
Step 5: Simulate Goods Receipt and NF-e Subcontracting
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 5: Simulate Goods Receipt and NF-e Subcontracting (technical name: NFESIMGR)
After the PO items with components are assigned, the fiscal clerk can trigger a simulation using XML data, tax code, and CFOP. This
simulation serves as check on the ERP side to verify if a later goods receipt can be posted. The fiscal clerk can visualize the
simulation and comparison results with the data of the incoming NF-e. The fiscal clerk can change tax codes and CFOP codes.
If the simulation was correct, then the NF-e Subcontracting can proceed to the next processing phase.
If the simulation is not correct, then the NF-e Subcontracting receives the result Simulation Not OK. In this case, the fiscal clerk can
either:
1. Reject the NF-e Subcontracting and notify the vendor. (Vendor notification is not triggered automatically upon rejection; the fiscal
clerk must notify the vendor manually.)
2. Manually adjust incorrectly assigned units as described in step 4, and then continue with step 5.
Note
All parameters must be saved before the status can be changed.
Step 6: Notification XML Accepted
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 8: Check Authorization After DANFE Receipt (technical name: AUTHGRPT)
The system automatically checks the authorization status of the XML via Web service with the SEFAZ tax authority.
Note
For the event that you receive is a contingency DANFE printed on security paper, see NF-e Contingency Process.
Step 9: Enter Goods Receipt Quantities
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 10: Check Goods Receipt Quantities (technical name: GRFICHCK)
The fiscal clerk compares the quantities from the NF-e with the received quantities (see step 8).
The fiscal clerk confirms and sets the status of this step to OK.
Step 11: Prepare Goods Receipt Posting
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 11: Prepare Goods Receipt Posting (technical name: GRMMCHCK)
The logistics clerk confirms that all preparations are complete and that the goods receipt can be posted.
The logistics clerk sets the status of this step to OK.
Step 12: Goods Receipt Subcontracting Components Return
Actions in Step 12: Goods Receipt Subcontracting mixed (technical name: GRSCON2D)
The system posts the goods receipt to the ERP system.
The inbound delivery number is sent to the ERP system and the goods receipt for the inbound delivery is posted.
Step 13: Operation Confirmation Event
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Features
Simulate Material Document and NF-e
In addition to the usual data needed for a simulation, SAP Nota Fiscal Eletrnica sends the number of the reference nota fiscal, that is
the NF that was used to send the components to the subcontractor, to your SAP ERP system.
Your SAP ERP system checks that the referred nota fiscal exists as an outgoing nota fiscal. If several notas fiscais are found, the
system checks that they all have the same sender and recipient. Using the recipient of the referred nota fiscal, the system tries to find
the vendor, plant, and storage location. If this is successful, the system then checks if the stock quantities at the vendor are sufficient for
a return of components posting. If this is not the case, your SAP ERP system returns an error message to SAP Nota Fiscal Eletrnica.
The system converts the UoM (unit of measurement) in the XML to the UoM in SAP ERP.
If a posting is possible, the system simulates the tax postings using the prices and other values passed from SAP Nota Fiscal
Eletrnica. The ICMS value should be 0. The tax base is calculated using the values in the XML.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Process
The following Future Delivery processes are offered:
NF-e Goods Receipt Future Delivery Process
NF-e Invoice Receipt Future Delivery Process
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
You can use a BAdI in this step to implement customer-specific validation checks. For more information about the available BAdIs,
see BAdIs for Incoming NF-e.
Process Step 4: Assign Purchase Order Items Future Delivery
You must assign a PO number and item to all NF-e Future Delivery items. In addition, the following requirements must be fulfilled to
complete this step:
The PO number and item must exist in the ERP system.
The ERP system has validated the unit of measure of the NF-e item:
If the unit of measure for the assigned PO is different than the unit of measure for the corresponding NF-e item, then a conversion
must be defined in the ERP system.
Both units of measure must be defined in the NFE and ERP system.
The corresponding ISO code is required to determine the internal language-independent unit of measurement.
These requirements ensure that the following process steps, including communication with an ERP system, are carried out correctly.
Actions in Step 4: Assign Purchase Order Items Future Delivery (technical name: FDASSIGN)
An NF-e item is automatically assigned to the PO from the received XML: The ERP and NFE systems check if the assignment is
complete.
Note
This process can be performed manually if the automatic process fails.
Assignment of PO is complete: The NF-e can proceed to the next step
Assignment of reference items to PO is not complete: The fiscal clerk must search for a PO in the ERP system. If the clerk finds a
correct PO number and item, then the fiscal clerk can manually assign the PO.
Note
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
Step 5: Simulate Invoice and NF-e Future Delivery
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 5: Simulate Invoice and NF-e Future Delivery (technical name: NFESIMFD)
After the reference PO items are assigned, the fiscal clerk can trigger a simulation using XML data, tax code, and CFOP. This
simulation serves as check on the ERP side to verify if a later invoice receipt can be posted. The fiscal clerk can visualize the
simulation and comparison results with the data of the incoming NF-e. The fiscal clerk can change tax codes and CFOP codes.
If the simulation was correct, then the NF-e Future Delivery can proceed to the next processing phase.
If the simulation is not correct, then the NF-e Future delivery receives the result Simulation Not OK. In this case, the fiscal clerk can
either:
1. Reject the NF-e Future Delivery and notify the vendor. (Vendor notification is not triggered automatically upon rejection; the fiscal
clerk must notify the vendor manually.)
2. Manually adjust incorrectly assigned items as described in step 4, and then continue with step 5.
Note
All parameters must be saved before the status can be changed.
Note
You can implement a BAdI that fills extension parameters that are handed over to the ERP system in a simulation/booking of the
invoice. For more information, see BAdIs for Incoming NF-e.
Step 6: Notification XML Accepted
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 8: Post Invoice and NF-e Future Delivery (technical name: FDIVPOST)
The invoice receipt is posted to the ERP system.
The NFE system receives the result of the invoice receipt from the ERP system:
1. Invoice receipt successful: In this case, the status of the step is set to OK. The NFE process is completed.
2. Invoice receipt failed and no invoice is created: In this case, the step is set to Not OK and you must carry out manual corrections in
the ERP system.
3. Invoice receipt failed and a parked invoice is created: In this case, the status of the step is set to OK, but you still must carry out
manual corrections in the ERP system. Nevertheless, the NFE process is completed.
The NF-e is created and posted in the ERP system together with the invoice receipt.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
You can implement a BAdI that fills extension parameters that are handed over to the ERP system in a simulation/booking of the
invoice. For more information, see BAdIs for Incoming NF-e.
Step 9: Operation Confirmation Event
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Features
Assign Purchase Order Items
In this process, the communication between SAP Nota Fiscal Eletrnica and your SAP ERP system is similar to the communication for
normal purchasing. However, when your SAP ERP validates the purchase order assignment, the system also checks that none of the
purchase order items in the assigned purchase order is set for goods-receipt-based invoice verification. If an item is marked as such in
the purchase order, your SAP ERP system returns an error message to SAP Nota Fiscal Eletrnica.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
The assignment of multiple NF-e items to the same purchase order item is not supported for future delivery invoices.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
Only RTP materials need to be converted as the unit of measurement (UoM) of other materials can be derived from the first NF-e.
The process Invoice with Future Delivery consists of two phases:
1. Invoice
The product to be delivered is assigned
2. Delivery and Goods Receipt
The RTP positions must be validated in processing step FDELVALD. The validation in the ERP system comprises checks of
units of measurements (UoM), conversions, and purchase orders (if existing).
Note
You can use a BAdI in this step to implement customer-specific validation checks. For more information about the available BAdIs,
see BAdIs for Incoming NF-e.
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
The validation steps require the assignment information to be able to carry out the validation and for when returnable packaging is
involved to compare the units of measure of the returnable packaging items with the ERP system. The assignments are not stored in
the validation steps. Instead, the assignments are stored in the subsequent steps for the purchase order assignments.
Process Step 4: Assign Reference Purchase Order Items
A PO number and item must be assigned to all NF-e items. This happens either automatically, or by manual assignment if errors
occurred. In addition, the following requirements must be fulfilled to complete this step:
The PO number and item must exist in the ERP system.
The ERP system has validated the unit of measure of the NF-e item:
If the unit of measure for the assigned PO is different than the unit of measure for the corresponding NF-e item, then a conversion
must be defined in the ERP system.
Both units of measure must be defined in the NFE and ERP system.
The corresponding ISO code is required to determine the internal language-independent unit of measurement.
These requirements ensure that the following process steps, including communication with an ERP system, are carried out correctly.
Actions in Step 4: Assign Reference Purchase Order Items (technical name: POASSREF)
An NF-e item is automatically assigned to the PO from the received XML: The ERP and NFE systems check if the assignment is
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
complete.
Note
This process can be performed manually if the automatic process fails.
Assignment of PO is complete: The NF-e can proceed to the next step
Assignment of reference items to PO is not complete: The fiscal clerk must search for a PO in the ERP system. If the clerk finds a
correct PO number and item, then the fiscal clerk can manually assign the PO.
The delivery relates to the relevant invoice that must already exist in the system. The invoice must be completely assigned to orders.
The delivery is assigned using the reference NF-e, that means the invoice NF-e. The system checks if the assignments from the
invoice-NF-e can be taken over to the delivery NF-e. If this is possible, the assignment is used and the delivery-NF-e is assigned.
Note
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
Step 5: Simulate Goods Receipt and NF-e Future Delivery
Actions in Step 5: Simulate Goods Receipt and NF-e Future Delivery (technical name: NFESIMFD)
After the reference PO items are assigned, the fiscal clerk can trigger a simulation using XML data, tax code, and CFOP. This
simulation serves as check on the ERP side to verify if a later goods receipt can be posted. The fiscal clerk can visualize the
simulation and comparison results with the data of the incoming NF-e. The fiscal clerk can change tax codes and CFOP codes.
If the simulation was correct, then the NF-e Future Delivery can proceed to the next processing phase.
If the simulation is not correct, then the NF-e Future delivery receives the result Simulation Not OK. In this case, the fiscal clerk can
either:
1. Reject the NF-e Future Delivery and notify the vendor. (Vendor notification is not triggered automatically upon rejection; the fiscal
clerk must notify the vendor manually.)
2. Manually adjust incorrectly assigned items as described in step 4, and then continue with step 5.
Note
All parameters must be saved before the status can be changed.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
NF-e Simulation with PO data
No data is sent to the ERP system. There are no simulation results for RTP.
NF-e Simulation with XML data
No data is sent to the ERP system. There are no simulation results for RTP.
Step 6: Generate Inbound Delivery
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
Inbound Delivery Creation
RTP data is sent to the ERP system
The ERP system creates additional lines for RTP
The ERP system returns the inbound delivery number and position to the NFE system
Step 7: Notification XML Accepted
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
The fiscal clerk sets this process step to OK or Not OK. If the status is OK, the system automatically continues with the next step.
Step 8: Enter DANFE
The vendor sends the goods, together with the DANFE, to the company, and the goods arrive at the company.
Actions in Step 9: Check Authorization After DANFE Receipt (technical name: AUTHGRPT)
The system automatically checks the authorization status of the XML via Web service with the SEFAZ tax authority.
Note
For the event that you receive is a contingency DANFE printed on security paper, see NF-e Contingency Process.
Step 10: Enter Goods Receipt Quantities
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 10: Enter Goods Receipt Quantities (technical name: GRCONFQU)
The logistics clerk counts the quantities. By default, the quantities in the NF-e are used as the reference point.
If counted quantities deviate from the default values, the logistics clerk can overwrite and enter other quantities.
Once all quantities are entered and checked, the logistics clerk saves all quantities and sets the status to OK.
Step 11: Check Goods Receipt Quantities
Actions in Step 11: Check Goods Receipt Quantities (technical name: GRFICHCK)
The fiscal clerk compares the quantities from the NF-e with the received quantities (see step 8).
The fiscal clerk confirms and sets the status of this step to OK.
Step 12: Prepare Goods Receipt Posting
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 12: Prepare Goods Receipt Posting (technical name: GRMMCHCK)
The logistics clerk confirms that all preparations are complete and that the goods receipt can be posted.
The logistics clerk sets the status of this step to OK.
Step 13: Post Goods Receipt Future Delivery
Actions in Step 13: Post Goods Receipt Future Delivery (technical name: FDGRPOST)
The fiscal clerk posts the goods receipt to the ERP system.
The inbound delivery number is sent to the ERP system and the goods receipt for the inbound delivery is posted.
The NFE system receives the goods receipt report from the ERP system:
1. Goods receipt successful: In this case, the fiscal clerk sets the status of the step to OK.
2. Goods receipt failed: In this case, the fiscal clerk sets the step to Not OK and carries out manual corrections in the ERP system.
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
Goods Receipt for Inbound Delivery
The RTP data is sent to the ERP system together with the references of the inbound delivery number and position
The ERP posts the goods receipt with the RTP data.
The ERP system checks that the RTP positions in the inbound delivery are still consistent
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Features
Simulate NF-e based on Goods Receipt
Using the data from SAP Nota Fiscal Eletrnica, your SAP ERP system checks if the referenced NF-e access key exists in the
database. If it does, the system simulates the goods receipt and its corresponding NF-e. The system derives the movement type from
the delivery type that was entered in your SAP ERP Customizing for the future delivery process. Your SAP ERP system derives the tax
codes from the mapping in your SAP ERP Customizing of the tax codes for the purchase order to the tax codes of the goods receipt.
The system checks the following tax information:
ICMS rate to be used in SAP ERP is the same as the rate in the XML
Incoming XML does not contain IPI
IPI, if any, is to be posted statistically
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
The assignment of multiple NF-e items to the same purchase order item is supported as of SAP Enhancement Package 5 for SAP
ERP 6.0 the. For lower releases, it is essential for the rest of the automation to run correctly that the assignment between NF-e item
and purchase order item is unique.
Process
Process Overview
Process Name
Technical Name
Steps
CONSIGGR
CONSIGIV
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
The system checks the authorization status of the received NF-e via the SEFAZ tax authoritys Web service. This communication is
carried out using an asynchronous call.
XML authorized: The authorization check was successful and the NF-e can proceed to the next processing step.
XML not authorized: The step is set to Not OK. You have the following options:
Retry the step after manual corrections.
Set the step to OK manually.
Reject NF-e (vendor notification is not triggered automatically upon rejection; you must notify the vendor manually).
Process Step 3: Validation for Process Goods Receipt for Consignment
Note
RTP
If you have RTP positions in your NF-e, then the following additional steps take place:
Only RTP materials need to be converted in this step. The unit of measurement (UoM) of other materials will be converted in Step
4.
Delivery and Goods Receipt
The RTP positions must be validated in processing step CSGRVALD. The validation in the ERP system comprises checks of units
of measurements (UoM), conversions, and purchase orders (if existing).
Note
You can use a BAdI in this step to implement customer-specific validation checks. For more information about the available BAdIs,
see BAdIs for Incoming NF-e.
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
The validation steps require the assignment information to be able to carry out the validation and for when returnable packaging is
involved to compare the units of measure of the returnable packaging items with the ERP system. The assignments are not stored in
the validation steps. Instead, the assignments are stored in the subsequent steps for the purchase order assignments.
Process Step 4: Assign Purchase Order Items
A PO number and item must be assigned to all NF-e items. This happens either automatically, or by manual assignment if errors
occurred. In addition, the following requirements must be fulfilled to complete this step:
The PO number and item must exist in the ERP system.
The ERP system has validated the unit of measure of the NF-e item:
If the unit of measure for the assigned PO is different than the unit of measure for the corresponding NF-e item, then a conversion
must be defined in the ERP system.
Both units of measure must be defined in the NFE and ERP system.
The corresponding ISO code is required to determine the internal language-independent unit of measurement.
These requirements ensure that the following process steps, including communication with an ERP system, are carried out correctly.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
This process can be performed manually if the automatic process fails.
Assignment of PO is complete: The NF-e can proceed to the next step
Assignment of items to PO is not complete: The fiscal clerk must search for a PO in the ERP system. If the clerk finds a correct PO
number and item, then the fiscal clerk can manually assign the PO.
Note
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
Step 5: Simulate NF-e Goods Receipt
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
After the PO items are assigned, the fiscal clerk can trigger a simulation using XML data, tax code, and CFOP. This simulation serves
as check on the ERP side to verify if a later goods receipt can be posted. The fiscal clerk can visualize the simulation and comparison
results with the data of the incoming NF-e. The fiscal clerk can change tax codes and CFOP codes.
If the simulation was correct, then the NF-e for Goods Receipt Consignment can proceed to the next processing phase.
If the simulation is not correct, then the NF-e for Goods Receipt Consignment receives the result Simulation Not OK. In this case, the
fiscal clerk can either:
1. Reject the NF-e for Goods Receipt Consignment and notify the vendor. (Vendor notification is not triggered automatically upon
rejection; the fiscal clerk must notify the vendor manually.)
2. Manually adjust incorrectly assigned items as described in step 4, and then continue with step 5.
Note
All parameters must be saved before the status can be changed.
Note
RTP
If you have RTP positions in your NF-e, the following takes place:
NF-e Simulation with PO data
No data is sent to the ERP system. There are no simulation results for RTP.
NF-e Simulation with XML data
No data is sent to the ERP system. There are no simulation results for RTP.
Step 6: Generate Inbound Delivery
Note
RTP
If you have RTP positions in your NF-e, then the following takes place:
Inbound Delivery Creation
RTP data is sent to the ERP system
The ERP system creates additional lines for RTP
The ERP system returns the inbound delivery number and position to the NFE system
Step 7: Notification XML Accepted
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 9: Check Authorization After DANFE Receipt (technical name: AUTHGRPT)
The system automatically checks the authorization status of the XML via Web service with the SEFAZ tax authority.
Note
For the event that you receive is a contingency DANFE printed on security paper, see NF-e Contingency Process.
Step 10: Enter Goods Receipt Quantities
Actions in Step 10: Enter Goods Receipt Quantities (technical name: GRCONFQU)
The logistics clerk counts the quantities. By default, the quantities in the NF-e are used as the reference point.
If counted quantities deviate from the default values, the logistics clerk can overwrite and enter other quantities.
Once all quantities are entered and checked, the logistics clerk saves all quantities and sets the status to OK.
Step 11: Check Goods Receipt Quantities
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 11: Check Goods Receipt Quantities (technical name: GRFICHCK)
The fiscal clerk compares the quantities from the NF-e with the received quantities (see step 8).
The fiscal clerk confirms and sets the status of this step to OK.
Step 12: Prepare Goods Receipt Posting
Actions in Step 12: Prepare Goods Receipt Posting (technical name: GRMMCHCK)
The logistics clerk confirms that all preparations are complete and that the goods receipt can be posted.
The logistics clerk sets the status of this step to OK.
Step 13: Post Goods Receipt Consignment
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 13: Post Goods Receipt Consignment (technical name: CSGRPOST)
The NFE system posts the goods receipt to the ERP system.
The inbound delivery number is sent to the ERP system and the goods receipt for the inbound delivery is posted.
The NFE system receives the goods receipt report from the ERP system:
1. Goods receipt successful: In this case, the NFE system sets the status of the step to OK.
2. Goods receipt failed: In this case, the NFE system sets the step to Not OK. The fiscal clerk can then carry out manual corrections in
the ERP system and trigger this step again.
Note
RTP
If you have RTP positions in your NF-e, then the following takes place:
Goods Receipt for Inbound Delivery
The RTP data is sent to the ERP system together with the references of the inbound delivery number and position
The ERP posts the goods receipt with the RTP data.
The ERP system checks that the RTP positions in the inbound delivery are still consistent
Step 14: Operation Confirmation Event
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
After the successful GR, the NFE system triggers the operation confirmation event.
The NFE system calls the event process.
The event process sends the operation confirmation event to the government system for authorization.
If the operation confirmation event is successfully created, the status of the step is set to OK. If the operation confirmation could not
be created, the status of the step is set to Not OK. For details about the operation confirmation event, see NF-e Events: Operation
Confirmation.
The NFE system completes the inbound process.
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Prerequisites
You have completed the necessary Customizing settings in your SAP ERP system. For more information, see Related Configuration in
SAP ERP. Note that in the Assign Delivery Type to Incoming NF-e Processes Customizing activity, you must enter a delivery type for
the Consignment Goods Receipt process.
Features
Assign Purchase Order Items
As in the Normal Purchasing process, if the XML for the incoming NF-e does not contain any purchase order details, you can trigger a
search to try to find the corresponding purchase order items in your SAP ERP system. After the items in the XML are assigned to
purchase order items, your SAP ERP system validates the quantities in the XML.
Once the assignment to the purchase order items is made and validated, you can trigger a simulation using the price from the purchase
order and the quantity from the incoming XML data. Your SAP ERP system simulates the NF-e posting and returns the simulation results
for you to check.
Note
The assignment of multiple NF-e items to the same purchase order item is supported as of SAP Enhancement Package 5 for SAP
ERP 6.0. In lower releases, it is essential for the rest of the automation to run correctly that the assignment between NF-e item and
purchase order item is unique.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
system creates the inbound delivery using the delivery type from your SAP ERP Customizing settings for the Consignment Goods
Receipt process.
Note that you can implement your own logic to determine a valuation type for the materials in the inbound delivery. You do this by
implementing the Change Storage Location and Valuation Type in Inbd Delivery (CHANGE_SLOC_AND_VALTYPE) method in the
Conversions for Incoming NF-e Automation (J_1BNFE_IN) Business Add-In (BAdI).
Post Goods Receipt and NF-e based on Inbound Delivery
Using the data from SAP Nota Fiscal Eletrnica, your SAP ERP system compares the quantities in the inbound delivery with the
quantities in the incoming XML to ensure that they are still the same. The system posts the goods receipt and NF-e, taking the tax rates,
values and bases for ICMS, ICST and IPI from the XML. The system sends the resulting goods receipt number to SAP Nota Fiscal
Eletrnica.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
You can use a BAdI in this step to implement customer-specific validation checks. For more information about the available BAdIs,
see BAdIs for Incoming NF-e.
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
The validation steps require the assignment information to be able to carry out the validation and for when returnable packaging is
involved to compare the units of measure of the returnable packaging items with the ERP system. The assignments are not stored in
the validation steps. Instead, the assignments are stored in the subsequent steps for the purchase order assignments.
Process Step 4: Assign Reference Purchase Order Items
A reference PO number and item must be assigned to all NF-e items. This happens either automatically, or by manual assignment if
errors occurred. In addition, the following requirements must be fulfilled to complete this step:
The PO number and item must exist in the ERP system.
The ERP system has validated the unit of measure of the NF-e item:
If the unit of measure for the assigned PO is different than the unit of measure for the corresponding NF-e item, then a conversion
must be defined in the ERP system.
Both units of measure must be defined in the NFE and ERP system.
The corresponding ISO code is required to determine the internal language-independent unit of measurement.
These requirements ensure that the following process steps, including communication with an ERP system, are carried out correctly.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Actions in Step 4: Assign Reference Purchase Order Items (technical name: CSASSREF)
An NF-e item is automatically assigned to the PO from the received XML: The ERP and NFE systems check if the assignment is
complete.
Note
This process can be performed manually if the automatic process fails.
Assignment of PO is complete: The NF-e can proceed to the next step
Assignment of reference items to PO is not complete: The fiscal clerk must search for a PO in the ERP system. If the clerk finds a
correct PO number and item, then the fiscal clerk can manually assign the PO.
The invoice relates to the relevant goods receipt that must already exist in the system. The goods receipt must be completely
assigned to orders. The invoice is assigned using the reference NF-e, that means the goods receipt NF-e. The system checks if the
assignments from the goods receipt NF-e can be taken over to the invoice NF-e. If this is possible, the assignment is used and the
invoice NF-e is assigned.
Note
You can use a BAdI to implement a customer-specific mapping of the purchase order number and item to the NF-e item. For more
information, see BAdIs for Incoming NF-e.
Step 5: Simulate Invoice Consignment
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
All parameters must be saved before the status can be changed.
Note
You can implement a BAdI that fills extension parameters that are handed over to the ERP system in a simulation/booking of the
invoice. For more information, see BAdIs for Incoming NF-e.
Step 6: Notification XML Accepted
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
The NF-e is created and posted in the ERP system together with the invoice receipt.
Note
You can implement a BAdI that fills extension parameters that are handed over to the ERP system in a simulation/booking of the
invoice. For more information, see BAdIs for Incoming NF-e.
Step 9: Operation Confirmation Event
Note
Events are collected in batches. The batch collection and sending is carried out via background jobs. For details about sending NF-e
events, see Sending NF-e Events.
Prerequisites
You have completed the necessary Customizing settings in your SAP ERP system. For more information, see Related Configuration in
SAP ERP. Note that in the Assign NF Type to Incoming NF-e Processes Customizing activity, you must enter an NF type for the
Consignment Invoice Receipt process that has a default item type for which ICMS and IPI are statistical.
Features
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
The assignment of multiple NF-e items to the same purchase order item is supported as of SAP Enhancement Package 5 for SAP
ERP 6.0. The prerequisite is that multiple assignment of NF-e items to purchase order item has been already used for the
consignment goods receipt process. For lower releases, it is essential for the rest of the automation to run correctly that the
assignment between NF-e item and purchase order item is unique.
Note
RTP items have different CFOPs than normally purchased goods.
RTP is not invoice relevant, but has special stock and unique movement types.
This offers two options:
1. The RTP positions are in the same NF-e as the product to be delivered. This is described as RTP same.
2. The RTP positions are in a separate NF-e. This is described as RTP single.
NFE offers only option 1. This means that the NF-es used in the processes are extended by RTP positions.
NFE Position Types
Abbreviation
Main Position
RTP
Returnable Packaging
SRE
PRE
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Process
Technical Name
Normal Purchasing
NORMPRCH
Subcontracting
SUBCON1A
Future Delivery
FUTDELGR
Features
Create Inbound Delivery
SAP Nota Fiscal Eletrnica sends the following additional data about the RTP items to your SAP ERP system:
ERP material number
Quantity
Unit of measurement (UoM)
When your SAP ERP system creates the inbound delivery, it does the following for the RTP items:
Creates delivery items for the RTP materials with the delivery type that is mapped to the movement type for the Purchased Goods
with RTP process (for example, 841) in your SAP ERP Customizing
Sets the special stock indication to M for the RTP delivery items
Uses the same plant for the RTP delivery items as the plant from the purchased goods if there is only one plant for the whole delivery.
If there is more than one plant for the purchased goods, the system uses the first plant listed for the purchased goods a the plant for
the RTP delivery items.
Uses the same storage location for the RTP delivery items from the purchased goods if there is only one storage location for the
whole delivery. If there is more than one, the system leaves the storage location for the RTP delivery items blank.
Note that it is also possible to implement your own logic for assigning the storage location in the inbound delivery in the Change
Storage Location and Valuation Type in Inbd Delivery (CHANGE_SLOC_AND_VALTYPE) method of the Conversions for Incoming
NF-e Automation (J_1BNFE_IN) Business Add-In (BAdI).
Post Goods Receipt
When your SAP ERP system posts the goods receipt, it does the following for the RTP items:
Checks that the inbound delivery still contains all RTP items in the XML and that their quantities have not been changed. If the RTP
items have changed, your SAP ERP system sends an error message to SAP Nota Fiscal Eletrnica.
Stores the final price for the RTP items from the XML (= price + freight + insurance + other expense discount) in the Alternate Base
Amount field on the Tax tab page of the goods receipt. This information is later included in the NF item details for the RTP items when
the NF-e is posted:
For normal purchasing and subcontracting, the system creates the NF-e with the invoice.
For future delivery goods receipt, it is created during goods receipt posting.
Your SAP ERP system sends the material document number and the year to SAP Nota Fiscal Eletrnica. If the goods receipt cannot be
posted, an error message is returned.
The following BAdIs (Incoming) are available for SAP Nota Fiscal Eletrnica (NFE):
BAdI: Step Implementation before/after DANFE
You can implement a BAdI that is used within the business process Customer-Specific Business Process with
DANFE (technical name: FLEXPR01) to trigger transactions in the integrated ERP system.
BAdI: Determine Business Process
You can implement a BAdI that carries out a customer-specific business process determination.
BAdI: Validation of Incoming XML Document
You can implement a BAdI that executes a customer-specific validation of an incoming XML document.
BAdI: Assignment of purchase order number and purchase order Item
You can implement a BAdI that executes a customer-specific assignment of the order number and order positions to an NF-e position.
BAdI: Determination of Variant for Delivery Quantity Entry
You can implement a BAdI that determines a customer-specific variant for the delivery quantity entry.
BAdI: Simulate/Post Filling of Extension Parameter for Invoice
You can implement a BAdI that fills extension parameters, which are handed over to the ERP system in a simulation/booking of
invoice.
BAdI: Determination of Logical System
You can implement a BAdI that determines the logical system for the ERP system.
BAdI: Calculation of Total Value
You can implement a BAdI that performs a customer-specific calculation of the total value. The BAdI returns the calculated total value
to the ERP system for the XML simulation and for posting the invoice. In the standard SAP NFE system, the total value of the XML
document is returned to the ERP system.
BAdI: Determination of Status for Gate Monitor
You can implement a BAdI that defines the DF-e status and corresponding text for the Gate Monitor. In addition, you can define a text
for the status of the traffic light that determines the entrance to the company premises.
Note
For more information, see the documentation for the BAdIs in Customizing under
Ins for Inbound NF-es .
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Recipient
Contains the consignee name, the recipients address, other tax data.
4. Items
Contains a table with information about specific items. In the lower portion of the screen, you can find NF-e product and service
information, along with data for such specific Brazilian tax categories as, ICMS, IPI, II, ISSQN, PIS, and COFINS.
5. Total Values
Contains an overview of all ICMS tax data, including the values for all tax categories.
6. Transport
Contains transport and transport identification data.
Creation Date
Displays the date of arrival of the NF-e in the NFE system.
Creation Time
Displays the time of arrival of the NF-e in the NFE system.
Process
Displays the assigned process of the NF-e.
Last Process Step
Displays the last executed process step.
Issuer's CNPJ
Displays the CNPJ of the issuer.
Recipient's CNPJ/CPF
Displays the CNPJ/CPF of the recipient.
Issuer Region
Displays the region of the issuer, 27 different regions are possible.
Issuing Type
Displays the issuing type.
Authority System Environment
Displays the authority environment.
ICMS Value
Displays the value of ICMS.
IPI Tax Value
Displays the tax value of IPI.
PIS Value
Displays the value of PIS.
COFINS Value
Displays the value of Cofins.
Total value
Displays the total value of included taxes.
Other Column Choices
3.
Note
You can use the Settings link to add or delete columns in the NF-e table. By default, the following columns are hidden:
Overall Status
Posted Conting[ency]
CUF
Issuers Name
Document Date
Send Date
Recipient Name
Purpose of Issuing
Logical System
NF Model
Protocol Number
Process
Operation Progress
Status Code
Carriers CNPJ
Authority System Env[ironment]
Issuing Type
Recipients UF
Issuers UF
Authority Vers[ion]
Process Steps
Choose Execute Process Step to manually execute a process step.
The process available process steps depend on the used NF-e process. For the Normal Purchasing process, you can manually
execute the following steps:
Assigning Purchase Orders
Simulating NF-es
Recording DANFEs
Checking Goods Receipt
There are other process steps that cannot be executed manually.
Select Details
Choose Details to display the following information about the selected NF-e:
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
NF-e Identification
Issuer
Recipient
Items
Total Values
Transport
Enter DANFE
Choose Enter DANFE to record a DANFE code manually or with a bar code reader.
Note
For the event that you receive a contingency DANFE printed on security paper, see NF-e Contingency Process.
Additional Functions
Choose Additional Functions to call up the following additional functions:
Continue Process
For attempting to restart the automatic processing of an NF-e. If NF-e processing stops, investigate the reason, and then choose
Continue Process to try to continue processing.
Set Process Step to OK Manually
For setting the current process step to OK, despite the fact that the process step was not carried out successfully.
Manually End NF-e
For ending NF-e processing in the NFE system without carrying out any further steps. The user has the option to issue a receiver
acknowledgement end event of type operation confirmation (See:Operation Confirmation).
Note
You must do necessary additional processing in the ERP system manually without linking to the NFE system.
Reject NF-e
For rejecting an NF-e and to stop further processing in the NFE system. The receiver acknowledgement end event of type operation
denial (See: Operation Denial), or operation termination (See: Operation Termination) will be sent depending on the customizing
settings for the rejection reasons. (See: Nota Fiscal Eletrnica Inbound Communication to Business Partner NF-e Reasons for
Rejection ). Note that the message to the vendor is not sent automatically. To send a message about the rejection, you have to
execute Send notification to vendor (This is active for a rejected NF-e).
Note
After rejecting an NF-e, you must do necessary additional processing in the ERP system manually without linking to the NFE
system.
For the case that the XML is incorrect you have the option to flag the NF-e as Enable New Receipt of NF-e. The NF-e receives a new
status (Status code 88 >Document rejected, Can be overwritten) and will be overwritten once the same NF-e (with the same
access key) arrives again in the NFE system. This is documented in the history table of the NF-e.
Caution
The previous XML is overwritten and the processing starts again. You cannot restore an overwritten NF-e.
Reject Cancellation NF-e
For rejecting the cancellation of an NF-e and to return to the original process.
Send notification to Vendor
You can use this pushbutton to send a notification about the rejection of an NF-e to the vendor. This can be done after the NF-e was
rejected.
Status Check for Events
Trigger the status update for the selected NF-e to receive all known events from the authorities.
Print Version
For printing out a list of NF-es.
Export
For exporting a list to Microsoft Excel.
Additional Information
Once you have selected an NF-e in the top table, tabs containing additional information about this NF-e appear at the bottom of the
screen:
Status Overview
This tab contains the following fields:
Status
Activity
Process Type
Status Description
Info Text
Application Log
History
Status
Process Type
Activity
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Status Description
Info Text
Executed on
User
Application Log
Assignments
In the Assignments tab, you can select the displayed fields by choosing the Settings link for this table. By default, the following fields
are displayed:
Item Number
This is the position in the XML.
Item Type
Describes the characteristics of the item. The following options are supported:
Main
Symbolic Return
Physical Return
Returnable Packages
NF-e Quantity
This is the NF-e quantity as in the XML
NF-e Quantity Unit
This is the NF-e Quantity Unit as in the XML
Converted NF-e Quantity Unit
The NF-e quantity unit converted to the internal quantity unit determined via the validation in the ERP system
NF-e Material Number
This is the code of the product/material as in the XML
NF-e Material Short Text
A description of the NF-e product/material as in the XML
Purchase Order Number
The PO number as in the XML or determined by manual/automatic assignment.
Purchase Order Item Number
The PO Item number as in the XML or determined by manual/automatic assignment.
Converted PO Quantity (from NF-e quantity)
The quantity of the NF-e in the unit of the ERP system (Either from material master record or PO)
ERP Quantity Unit
The quantity unit as determined in the ERP system
ERP Material Number
The code of the product/material as determined in the ERP system
ERP Material Short Text
A description of the product/material as determined in the ERP system
Delivery Number
The delivery number as created in the ERP system if the process creates a delivery. If no delivery is involved, the field is empty.
Delivery Item
The delivery number item as created in the ERP system if the process creates a delivery. If no delivery is involved, the field is
empty.
Received Quantity
The quantity that was actually delivered in NF-e quantity units.
CFOP
The CFOP code that is relevant for the simulation and posting in the ERP system. The CFOP code is determined automatically in
the ERP system or entered manually in the simulation steps.
Tax Code
The tax code that is relevant for the simulation and posting in the ERP system. The tax code is determined automatically in the ERP
system or entered manually in the simulation steps.
You can display the following additional fields:
Fiscal Year from Invoice Verification
The year in which the invoice was created in the ERP system
Invoice Number
The invoice number as created in the ERP system.
Number of Material Document
The number of the material document as created in the ERP system.
Invoice Document Status
The status of the invoice document. Available options are Invoice booked and Invoice parked.
ERP-internal Quantity Unit
The internal quantity unit used in the ERP system
References
The References tab is only displayed for NF-es where the XML contains electronic or paper-based references.
Reference NF-es/CT-es
The icon indicates whether the NF-e/CT-e is stored in the NFE system
Access Key
The access key comes in form of a direct link to the XML of the NF-e/CT-e. To open this link, you need the authorization to display
the NF-e/CT-e.
Events
Caution
The Events tab is only visible if there is at least 1 event for an NF-e.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
The main purpose is to provide information to the Fiscal Clerk about events. The Fiscal Clerk must decide how running processes are
affected, and therefore a list of the current authorized and pending events (both self-issued and others) is displayed. The Fiscal Clerk
can display all events per event type in a dialog box. In the Events tray, the following buttons are enabled after selecting one line of
the events list:
By selecting one event, you can display its content (if available) depending on its type. Select Details Event Details .
By choosing Select Details Display Event XML , you can open or save the XML document.
By choosing Event Status , you can display the current and former process steps with status icon, activity, process type, status
description, and info text.
By choosing Event History , you can display the history of an event with status icon, activity, process type, status description,
info text, execution date and time, and user.
In a dialog box, you can see all other available versions of the selected event by choosing Display Versions .
Send XML File
You have the option to send an event XML using the Send XML File pushbutton. This button is active if the event is authorized and
the B2B scenario for the business partner is activated. You can choose to send the event XML to one of your business partners,
either the event recipient or NF-e carrier (Outbound NF-e only). The following situations are supported:
The XML file was not yet sent due to the fact that the B2B scenario for the business partner was not activated. After activation of
the B2B scenario and sending, the Process Status of the event process will not be changed. However, a history entry is added.
The event XML file was already sent. After sending, the Process Status of the event process will not be changed. However, a
history entry is added.
Note
Errors during the initial B2B sending process must be solved in the Event Outbound Monitor and cannot be solved using the
Send XML File function.
By choosing Refresh , the event list is updated to the latest version.
Maintaining the Personal Object Work List (POWL)
The POWL (Personal Object Work List) offers central, personalized access to all relevant work lists. You can see the number of
business objects per work list on the overview screen and can therefore handle a great number of work lists, business objects, and
documents. Further, by choosing Personalize, you can select or deselect the following categories and queries:
Overview
Today
Recommendation
We recommend maintaining Quick Criteria due to performance reasons. For example, if a user is only working with a certain CNPJ,
then that CNPJ can be defined as limiting factor.
Under Layout, you can select Tab strip or Link Matrix to define the layout.
Procedure
You can choose Execute Process Step to manually execute the assignment of items. This step depends on the determined business
process. For Normal Purchasing, the process step isAssign Purchase Order Items.
To assign purchase order items, proceed as follows:
1. Select an NF-e and choose Execute Process Steps > Assign Purchase Order Items (for Normal Purchasing)
2. On the next screen, you see the following table entries:
Open NF-e Items
Item Number
Quantity
Unit of Measure
Material Number
PO Number
Purchase Order Item
Available Items (for example: PO items from a reference purchase Order)
PO Number
Purchase Order Item
PO Material Number
Purchase Order Material Short Text
PO Quantity
Purchase Order Unit
Note
Available PO items are determined in the ERP system with search criteria provided by the XML file. For more information, see
Communication with SAP ERP for Normal Purchasing (example for business process Normal Purchasing. All other business
processes also have a description of the ERP communication)
3.
Note
It is possible to assign multiple NF-e items to the same purchase order item for normal purchasing. For future delivery invoices,
the assignment must be unique. For more information see Processing Inbound NF-es.
Item-Based Search
Select an open NF-e item in the table Open NF-e Items. Select an available PO item in the table Available PO Items and assign it
to the open NF-e item by choosing Assign Purchase Order.
If no available PO item is displayed, choose Find Purchase Order Items to search for purchase orders using specific PO numbers
(Find Purchase Order) or other search criteria (Extended Search for the Item-based search).
Global Search
You can search for an existing individual purchase order by entering the purchase order number into the search field of the global
search. If you don't know the number, use the input help (F4) for a list of proposed purchase order numbers. You are free to assign
all open NF-e items to a purchase order item.
You have to assign the purchase order items using drag-and-drop.
To complete this step, you must assign all open NF-e items to a purchase order item.
4. All assigned NF-e items are now displayed in the Assigned NF-e Items table, along with the following information:
Assigned NF-e Items
Item Number
Quantity
Unit of Measure
Material Number
PO Number
Purchase Order Item
PO Quantity
Purchase Order Unit
PO Material Number
Purchase Order Material Short Text
Note
You can always reset assignments. Select the lines with the NF-e items to be reset, and then choose Reset Assignment.
5.
To check if your assigned NF-e items are correct, save your assignments.
Note
You can also check if your assigned NF-e items are correct by running a simulation (see NF-e Fiscal Workplace: NF-e Simulation).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
Available PO items are determined in the ERP system with search criteria provided by the XML file. For more information, see
Communication with SAP ERP for Normal Purchasing (example for business process Normal Purchasing. All other business
processes also have a description of the ERP communication)
Select an open NF-e item in the table Open NF-e Items. Select an available PO item in the table Available PO Items and assign it to
the open NF-e item by choosing Assign Purchase Order.
If no available PO item is displayed, choose Find Purchase Order Items to search for purchase orders using specific PO numbers
(Find Purchase Order) or other search criteria (Extended Search for the item-based search).
Alternatively, you can search for an existing individual purchase order by entering the purchase order number into the search field of
the global search. If you do not know the number, use the input help (F4) for a list of proposed purchase order numbers.
You have to assign the purchase order items using drag-and-drop.
To complete this step, you must assign a purchase order item to all open NF-e items.
4. All assigned NF-e items are now displayed in the Assigned NF-e Items table, along with the following information:
Assigned NF-e Items
Item Number
Quantity
Unit of Measure
Material Number
PO Number
Purchase Order Item
PO Quantity
Purchase Order Unit
PO Material Number
Purchase Order Material Short Text
3.
Note
You can always reset assignments. Select the lines with the NF-e items to be reset, and then choose Reset Assignment.
5.
To check if your assigned NF-e items are correct, save your assignments.
Note
You can also check if your assigned NF-e items are correct by running a simulation (see NF-e Fiscal Workplace: NF-e Simulation).
You can choose Execute Process Step to manually execute the assignment of items. This step depends on the determined business
process. For Normal Purchasing, the process step isAssign Purchase Order Items.
To assign purchase order items, proceed as follows:
1. Select an NF-e and choose Execute Process Steps > Assign Purchase Order Items (for Normal Purchasing)
2. On the next screen, you see the following table entries:
Open NF-e Items
Item Number
Quantity
Unit of Measure
Material Number
PO Number
Purchase Order Item
Available Items (for example: PO items from a reference NF-e
PO Number
Purchase Order Item
PO Material Number
Purchase Order Material Short Text
PO Quantity
Purchase Order Unit
Note
Available PO items are determined in the ERP system with search criteria provided by the XML file. For more information, see
Communication with SAP ERP for Normal Purchasing (example for business process Normal Purchasing. All other business
processes also have a description of the ERP communication)
Select an open NF-e item in the table Open NF-e Items. Select an available PO item in the table Available PO Items and assign it to
the open NF-e item by choosing Assign Purchase Order.
If no available PO item is displayed, choose Find Purchase Order Items to search for purchase orders using specific PO numbers
(Find Purchase Order) or other search criteria (Extended Search for the Item-based search).
Alternatively, you can search for an existing individual purchase order by entering the purchase order number into the search field of
the global search. If you do not know the number, use the input help (F4) for a list of proposed purchase order numbers.
You have to assign the purchase order items using drag-and-drop.
To complete this step, you must assign a purchase order item to all open NF-e items.
4. All assigned NF-e items are now displayed in the Assigned NF-e Items table, along with the following information:
Assigned NF-e Items
Item Number
Quantity
Unit of Measure
Material Number
PO Number
Purchase Order Item
PO Quantity
Purchase Order Unit
PO Material Number
Purchase Order Material Short Text
3.
Note
You can always reset assignments. Select the lines with the NF-e items to be reset, and then choose Reset Assignment.
5.
To check if your assigned NF-e items are correct, save your assignments.
Note
You can also check if your assigned NF-e items are correct by running a simulation (see NF-e Fiscal Workplace: NF-e Simulation).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Item Number
Quantity
Unit of Measure
Material Number
PO Number
Purchase Order Item
Available Items (for example: PO items from a reference NF-e
PO Number
Purchase Order Item
PO Material Number
Purchase Order Material Short Text
PO Quantity
Purchase Order Unit
Note
Available PO items are determined in the ERP system with search criteria provided by the XML file. For more information, see
Communication with SAP ERP for Normal Purchasing (example for business process Normal Purchasing. All other business
processes also have a description of the ERP communication)
Select an open NF-e item in the table Open NF-e Items. Select an available PO item in the table Available PO Items and assign it to
the open NF-e item by choosing Assign Purchase Order.
If no available PO item is displayed, choose Find Purchase Order Items to search for purchase orders using specific PO numbers
(Find Purchase Order) or other search criteria (Extended Search).
To complete this step, you must assign a purchase order item to all open NF-e items.
4. All assigned NF-e items are now displayed in the Assigned NF-e Items table, along with the following information:
Assigned NF-e Items
Item Number
Quantity
Unit of Measure
Material Number
PO Number
Purchase Order Item
PO Quantity
Purchase Order Unit
PO Material Number
Purchase Order Material Short Text
3.
Note
You can always reset assignments. Select the lines with the NF-e items to be reset, and then choose Reset Assignment.
5.
To check if your assigned NF-e items are correct, save your assignments.
Note
You can also check if your assigned NF-e items are correct by running a simulation (see NF-e Fiscal Workplace: NF-e Simulation).
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
Note
Exception: If you want to simulate a PO, it is not possible to set a status. The Back button leads to the assignment screen. The
additional button Back to Overview leads you back to the NF-e Fiscal Workplace.
5.
After setting a status, you return automatically to the NF-e Fiscal Workplace. If you do not want to set a status, use the Back button to
return to the NF-e Fiscal Workplace.
Note
To display the PDF file, you must have an ADS system running and connected to your environment.
4.
You can now set the status for this NF-e. You have two options:
Set Status to OK
You confirm that the goods have arrived and the entered DANFE is correct.
Set Status Not OK
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.
5.
PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.