Skip to Content

How to Manage UUID field in Existing Purchasing Documents for Mexico (Electronic Accounting Statement Feature)

To comply with the new legal regulations regarding the Electronic Accounting Statements in Mexico, among other changes new Journal Entry report (JE report further) has to be submitted on monthly period effective from January 2015. It includes obligation to report via JE report also documents created within transition period July – December 2014, retrospectively including new information about electronic number UUID.

The UUID information is a 36 characters unique electronic number (CFDI and CFD) available in generated XML which represents electronic invoice in Mexico and it is provided by the SAT authority. UUID information is currently not available for created Purchasing documents (AP side) in SAP Business One application, Sales documents (AR side) already contains this information. All Purchasing invoice type documents created in transition period due to this legal change therefore must contain UUID information in order to be reported via new JE report.

In order to automate process of importing UUID information for existing Purchasing documents from XML into SAP Business One application Tool was developed and is available via link below. Purpose of the Tool is to track and identify appropriate document existing in DB, based on specific parameters and create bridge/reference between XML and document that enables to transfer UUID information from XML into a document, in a batch run. In order to transfer UUID information recommended is to create new UDF for Purchasing documents where this information will be stored.


  • The How To Guide document available via Note 2048577 describes in step by step scenario process of importing UUID information for relevant documents
  • For all further details please see SAP Business One Note 2048577
  • Please notice, link to short recorded video for UUID solution is attached for your convenience here, and also in Note 2048577. Please follow the process according to steps in HTG in order to automate transfer of UUID information into the DB
  • Tool XMLReader is available HERE

Important notice on 27.11.2014

Since 27th of November 2014 updated HTG, version 2 is available. It contains updates of queries providing import of UUID information. HTG v2 can be found as an attachment in Note 2048577, very soon it will be also directly available from this blog.

HTG v2 includes:

  • Additional step added in order to indentify XML files not matching with an existing A/P documents of Invoice type
  • Queries include also Credit memo and Debit memo
  • No change on XML Reader Tool side

In case of any question or comments please do not hesitate to contact me here or via

You must be Logged on to comment or reply to a post.
  • Dear Partners

    Important notice!

    Since 27th of November 2014 updated HTG, version 2 is available. It contains updates of queries providing import of UUID information.

    HTG v2 can be found as an attachment in Note 2048577, and also here above in section Reference.

    Should you have any further questions, feel free to contact me.

    Thank you.



  • Hi  Martin Pavlinsky

    I inserted the sentence indicated by the manual How to Manage Existing UUID field in

    Purchasing Documents (Electronic Accounting Statement Feature ) and the only thing I get are these errors


    Excepción no controlada: System.Xml.XmlException: Los datos del nivel de raíz no son válidos. línea 1, posición 1.
       en System.Xml.XmlTextReaderImpl.Throw(Exception e)
       en System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
       en System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
       en System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       en System.Xml.XmlTextReaderImpl.Read()
       en System.Xml.XmlTextReader.Read()
       en ConsoleApplication1.Module1.Main()

    I've also tried XMLRead6.0 and has shown me the same result. There are some other additional step that needed?

    • Hi Adrian, you should review this issue with your partner, they must be able to solve it.

      Otherwise, as it says, the poblems is with the XML, have you tried with with another document? or it happens always????