How To Manage UUID For Existing Documents
How To Manage UUID For Existing Documents
How To Manage UUID For Existing Documents
PUBLIC
Typographic Conventions
Type Style
Description
Example
Words or characters quoted from the screen. These include field names, screen titles,
pushbuttons labels, menu names, menu paths, and menu options.
Textual cross-references to other documents.
Example
EXAMPLE
Technical names of system objects. These include report names, program names,
transaction codes, table names, and key concepts of a programming language when they
are surrounded by body text, for example, SELECT and INCLUDE.
Example
Output on the screen. This includes file and directory names and their paths, messages,
names of variables and parameters, source text, and names of installation, upgrade and
database tools.
Example
Exact user entry. These are words or characters that you enter in the system exactly as they
appear in the documentation.
<Example>
Variable user entry. Angle brackets indicate that you replace these words and characters
with appropriate entries to make entries in the system.
EXAMPLE
PUBLIC
2014 SAP SE. All rights reserved.
Table of Contents
Introduction ................................................................................................................................................... 4
Overview of the Process of Updating UUID Field in Existing Invoice Type Documents on
the A/P Side ....................................................................................................................................................6
Process Visualization .............................................................................................................................................. 7
PUBLIC
2014 SAP SE. All rights reserved.
Introduction
To comply with the regulations regarding the Electronic Accounting Statement in Mexico, a UDF has to be created
manually for the purpose of managing the UUID information (for more information, see SAP Note 2048577). This
document describes the process of managing the UUID field for the invoice type documents on the purchasing
side, which are created within the transition period (from July to December 2014). All such documents must be
reported in the journal entry report (JE report). The UUID field is part of every invoice (in xml file structure); it
contains 36 characters provided by SAT authority.
For SDN information, refer to 2 SDN Information.
PUBLIC
2014 SAP SE. All rights reserved.
SDN Information
Summary
Hereby provided Tool is designed for managing electronic document numbering information (UUID) provided by
SAT Authority. Tool is relevant for electronic document communication in Mexico (herein referred to as Tool) is
delivered within the SDN license structure and therefore no support is provided. This guide helps you run the
application easily (no installation is needed).
This Tool is a freeware application provided by SAP SE to SAP Business One customers in Mexico in order to
provide automated way of managing UUID information from XML into existing documents created within the
transitional period.
Tool shall provide automated way of associating UUID information from XML representing electronic form of
document for documents existing in the database. During its run, temporary data are created to provide a
mapping bridge between the documents and XML files in order to correctly update UUID information in the
relevant existing documents in the database.
Feedback on Tool should be provided through SDN forum or through your official SAP Local Product expert.
Authors:
Pawel Kostorz, Martin Slavik, Martin Pavlinsky
Company:
SAP Slovensko, s.r.o.
Created on: July 10, 2014
Author Bio
SAP Busines One Solution Management created this application to fulfill a business gap which emerged due to a
recent legal requirement effective from January 2015.
Note
Find the relevant how-to guide attached to this document.
You can download Tool here.
PUBLIC
2014 SAP SE. All rights reserved.
The XML files representing electronic documents are generated by SAP authority.
Note
o As a prerequisite, users must have all XML files for relevant documents existing in the database.
o Each XML file represents one document.
2.
Using a prepared query the XML data are extracted and placed into a temporary table.
Note
o The purpose of the temporary table is to identify each relevant document existing in the database in
order to update the UUID information.
o Each table line represents one document.
3.
The A/P documents created during the transition period are identified and compared to the data in the
temporary table as follows:
o If the XML file matches the document created in the database, then the document type and the document
number are assigned to the relevant table line (the yellow column in the example below).
o This identification and comparison between the XML files and the relevant documents in the database are
based on unique parameters.
o If more documents in the database match one XML file, then the used has to identify which document is
valid manually.
4.
A bridge between the XML files and the documents in the database is created and the system can identify
which UUID belongs to which document. Then, through the Data Transfer Workbench (DTW) add-on, users
can update the UUID information in each relevant document in the database in a batch run.
PUBLIC
2014 SAP SE. All rights reserved.
Process Visualization
PUBLIC
2014 SAP SE. All rights reserved.
ON [PRIMARY]
GO
ALTER TABLE dbo.TTST SET (LOCK_ESCALATION = TABLE)
GO
COMMIT
Note
This query creates a temporary TTST table which you can delete after you complete the whole procedure.
6.
7.
Open the path where XMLRead.exe is located and then type in the following parameters:
FILE;[path where the xml files are stored] SERVER; [name and alias of the server]
DATABASE; [name of the database where TTST table from Step 1 was created]
Note
"FILE", "SERVER, and "DATABASE" are fixed string expressions.
PUBLIC
2014 SAP SE. All rights reserved.
Example
Following is an example of the entered parameters:
XMLRead.exe FILE;C:\temp\ SERVER;BTSN60264814A\b1 DATABASE;PKO_MX_TEST
8.
Press E N T E R .
9.
SQL Enterprise Managerreports that the process has been finished successfully.
10. Go to Enterprise Manager and run the following query to select all invoices that match at least one record
from the xml files:
select
DocEntry,
DocNum,
T1.CardName as xmlCarName,
T0.Cardname,
convert(varchar(10),cast(replace(T1.DocDate, 'T',' ') as datetime),10) as
xmlDate,
convert(varchar(10),T0.DocDate,10) as DocDate,
T1.DocTotal as xmlDocTotal,
T0.DocTotal,
T1.RFC,
T0.LicTradNum,
T1.UUID
from
OPCH T0 right join
TTST T1 on T0.CardName = T1.CardName and T0.LicTradNum = T1.RFC
where
T0.CardName = T1.CardName
and T0.LicTradNum = T1.RFC
and T1.DocTotal = T0.DocTotal
and convert(varchar(10),cast(replace(T1.DocDate, 'T',' ') as
datetime),10) = convert(varchar(10),T0.DocDate,10)
11. Copy the results to an Excel sheet and update the UDF_UUID field in existing A/P invoices either manually or
through the DTW add-on (Data Transfer Workbench). For more information, refer to the documentation
provided with the DTW add-on.
PUBLIC
2014 SAP SE. All rights reserved.
www.sap.com/contactsap
Material Number
2014 SAP SE. All rights reserved.
No part of this publication may be reproduced or transmitted in any
form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior
notice.
Some software products marketed by SAP AG and its distributors
contain proprietary software components of other software
vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered
trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System ads, System i5, System
p, System p5, System x, System z, System z10, System z9, z10, z9,
iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS,
S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise
Server, PowerVM, Power Architecture, POWER6+, POWER6,
POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes,
BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2
Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX,
Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are
trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and
other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either
trademarks or registered trademarks of Adobe Systems
Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the
Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame,
VideoFrame, and MultiWin are trademarks or registered trademarks
of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered
trademarks of W3C, World Wide Web Consortium, Massachusetts
Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc.,
used under license for technology invented and implemented by
Netscape.
SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, PartnerEdge,
ByDesign, SAP Business ByDesign, and other SAP products and
services mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP AG in Germany and in
several other countries all over the world. All other product and
service names mentioned are the trademarks of their respective
companies. Data contained in this document serves informational
purposes only. National product specifications may vary.
These materials are subject to change without notice. These
materials are provided by SAP AG and its affiliated companies ("SAP
Group") for informational purposes only, without representation or
warranty of any kind, and SAP Group shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP
Group products and services are those that are set forth in the
express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting
an additional warranty.