Understanding NFE and DANFe Generation

The system uses Oracle's BI Publisher (Business Intelligence Publisher) to produce all required NFe XMLs, printed forms, and DANFe documents for all different contingencies cycles. The system has ten versions of the extractor process which are related to different report definition templates to manage the data formatting process of the basic information.

The BI Publisher creates the XML files in a two phase process:

  1. Information generation and the data formatting processes.

  2. Xsl transformation.

    An xsl transformation is a xsl script that maps a xml schema to another xsl schema. The NF-e Info Generation UBE extracts the required information and the NF-e Info Generation by Lot UBE and produces an XML schema that is mapped to one of the NFe schemas. To deliver the proper enviNFe_v2.00 schema, a Xsl transformation maps each field from the UBE schema to the legal schema.

Although you cannot review the errors generated during the extraction process, the system uses a NF-e Info Generation Error Report BIP template to display the errors. When an error occurs, the NF-e Info Generation UBE populates errors fields in the internal XML with the error data dictionary item for user reference, such as the item or address book number that produce the error and an error description. The system does not run this error report automatically; you must republish the XML in error to the NF-e Info Generation Errors Report template. You can also use the work center to verify the error instead of regenerating this report.

DANFe is an auxiliary report that contains all the information in the NFe XML file. This report must be printed and included with the merchandise. The system offers several DANFe report BIP templates; one for the normal process and one for each of the different contingency processes (SVC-AN, SVC-RS, FS and FS-DA, Offline NFC-e, and EPEC/DPEC). The type of DANFe that the system prints depends on the NFe extraction UBE version.