Understanding XML Statuses

After the system generates the NFe (nota fiscal electronica), it creates the XML file to be sent to SEFAZ. Use the EnterpriseOne Localizations transmission process or third-party software to retrieve information and send the XML file to SEFAZ. When the transmission software receives an answer from SEFAZ, you must evaluate the answer and the determine how to change the emission type and XML status for the NFe.

The system provides two methods to update the answer received from SEFAZ:

  1. Interactive

    The system enables you to manually enter the resulting status of the NFe in the NF-e Response Process and Contingencies program (P76B12TE).

  2. Batch

    The system enables the transmission software to insert a new record for each response in the NF-e Status Log Z File (F76B12TZ). When you run the NF-e Response Process Batch Input report (R76B12TZ), the system accesses the F76B12TZ table, retrieves each non-processed record, inserts it in the NF-e Status Log table (F76B12TE), and executes the corresponding actions related to that status code. You can review and revise batch input transactions in the NF-e Response Process Batch Input Revisions program (P76B12TZ).

The system uses the following fields to define each NFe status:

  • Emission Type: Enter a value that identifies the transmission type that the system uses for the XML file. Values are:

    • 0: Undefined

    • 1: Normal

    • 2: FS Contingency

    • 4: DPEC/EPEC Contingency

    • 5: FS-DA Contingency

    • 6: SVC-AN Contingency

    • 7: SVC-RS Contingency

    • 9: Offline NFC-e Contingency

  • XML Status: Enter a value that specifies the status code of the NFe XML. For each status change, the system adds a new record in NF-e Status Log table (F76B12TE) and the corresponding next status in the Nota Fiscal Details table (F7611B) and the Sales Order Detail table (F4211). Values are:

    • I: Initial

      In the initial status, the system generates an initial record in the NF-e Status Log table (F76B12TE) when you run the Generate Nota Fiscal program (R76558B) for records with 0 in the Emission Type field. The system changes the emission type from 0 to 1, 2, 3, 4, 5, 6, 7, or 9 depending on user selection and the NFe type. If you are working with National NFes, you can use the emission types 1, 2, 3, 4, 5, 6, and 7; and if you are working with an XML for NFC-e, you can use the emission types 2, 4, 5, and 9. You also have the option of generating a normal XML and then changing the emission type to normal or to a contingency. When you run the NFe Info Generation program (R76B561), the system generates a second record in the F76B12TE table.

    • G: Generated

    • D: DPEC Summary Accepted

    • A: Accepted

      If you receive this status code from SEFAZ, the system updates the corresponding next status of the sales order and nota fiscal and submits the DANFe using the NFe Info Generation program (R76B561). You can also submit the DANFe by manually selecting notas fiscais to print.

    • E: Error

      This status is a temporary status until the error is fixed. You must correct the error and then generate the XML file again to continue the process.

    • C: Cancelled

      You can cancel an existing NFe in the NF-e Response Process and Contingencies program (P76B12TE). If you receive an approval from SEFAZ, the system has to generate an XML file with the cancelled NFe number. Otherwise, the system marks this NFe number as unused so the system can generate the corresponding XML file with that unused NFe number.

    • R: Rejected

      If you receive this status code from SEFAZ, the system inserts a new record in NF-e Status Log table (F76B12TE) and the corresponding next status value in the Nota Fiscal Details table (F7611B) and the Sales Order Detail table (F4211). This is a final status and you will not be able to continue the transaction.