Understanding the NF-e Response Process and Contingencies Program (P76B12TE)

Use the NF-e Response Process and Contingencies program (P76B12TE) to change the NFe status or emission type. The system uses the next status code from the NF-e Next Status Setup table (F76B090) and validates the next status using the activity rules functionality. If no errors occur, the system updates the nota fiscal status in the Nota Fiscal Details table (F7611B) and the sales order in the Sales Order Detail table (F4211).

Use the NF-e Response Process and Contingencies program to manually cancel an NFe. If the NFe was accepted and DANFe was printed, the system does not allow you to cancel the NFe. You must void or reverse the NFe, accordingly. If NFe was accepted but not printed, you can cancel NFe. If the XML was not approved yet, the system marks this number as unused by inserting a new record in the NF-e Legal Numbers Unused/Cancelled - BRA table (F76B22TE) with the NFe legal number.

For example, review how the system works with cancelled NFe numbers. If you change the emission type from Normal to SVC-AN Contingency and receive SVC-AN Contingency XML approval from SEFAZ, the system marks the NFe legal number generated in the Normal emission type as Unused by inserting a new record in the NF-e Legal Numbers Unused/Cancelled - BRA table (F76B22TE) with the NFe legal number. However, if you receive the Normal XML approval and the NFe was already changed to SVC-AN Contingency, the system cancels the NFe legal number generated by Normal emission type and waits for SVC-AN XML response.

You can also use the use the NF-e Response Process and Contingencies program to generate the XML and DANFe files.