Maybe after Note 2132905 – Special character in SEFAZ XML from Distribution Web Service being implemented, the error /XNFE/APP152 continued to happen and program /XNFE/COLLECT_DOCUMENTS continued to be aborted. The reason for that happens because the program itself has two different stages. It first stores the XML and then it processes it.
Before this note, the XMLs with special characters were stored incorrectly (not escaped), and therefore the transformation doesn’t work. So, as I have mentioned above, the first step was to store the XML and only afterwards process it and before this note, if the XML had any special character, it was stored incorrectly and it is still waiting to be processed, which leads to the transformation error to continue..
We have updated Note 2132905 – Special character in SEFAZ XML from Distribution Web Service with two Z programs and to solve. So, please pay attention to the Manual Post-Implemetations:
‘Caution: You have to perform this manual post-implementation step manually and separately in each system after you have imported the Note to implement.
After implementing note 2132905 it can be that still some entries with invalid special characters in your system. To clean up them you need to implement two reports:
- 1. Dowload attachment Z_CLEAN_UP_PROC_NFEDIST.txt to a local folder. Implement report Z_CLEAN_UP_PROC_NFEDIST and run it. This can – depending on the amount of data that have to be processed (db table /xnfe/nfedistxml field to_process with value ‘X’) – take some time.
- 2. After report Z_CLEAN_UP_PROC_NFEDIST finished successfully all problematic entries are identified and marked for a special treatment, all other stucked entries are processed.
- 3. Download attachment Z_RELOAD_XML_BY_NSU.txt to a local folder. Implement report Z_RELOAD_XML_BY_NSU and run it. This can – depending on the amount of data that have to be processed (db table /xnfe/nfedistxml field to_process with value ‘E’) – take some time.
After completing both reports all lines of table /xnfe/nfedistxml are processed regularly. Both reports are only used for this correction and can be deleted afterwards.’
Please note that after the implementation of Note 2132905 – Special character in SEFAZ XML from Distribution Web Service the XML will be stored correctly, so you shouldn’t have this problem anymore.