How to Manage UUID for Existing Documents

download How to Manage UUID for Existing Documents

of 10

Transcript of How to Manage UUID for Existing Documents

  • 8/19/2019 How to Manage UUID for Existing Documents

    1/10

     

    How-to Guide

    SAP Business One 8.82

    SAP Business One 9.0 and SAP Business One 9.0, version

    for SAP HANA

    SAP Business One 9.1 and SAP Business One 9.1, version

    for SAP HANA

    Document Version: 1.0 – 2012-04-18

    PUBLIC

    How to Manage UUID field in Existing PurchasingDocuments (Electronic Accounting StatementFeature)Mexico

  • 8/19/2019 How to Manage UUID for Existing Documents

    2/10

     

    2

    PUBLIC

    © 2014 SAP SE. All rights reserved.

    How to Manage UUID Field in Existing Purchasing Documents

    Typographic Conventions

    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 Emphasized words or expressions.

    EXAMPLE  Technical names of system objects. These include report names, program names,

    transaction codes, table names, and key concepts of a programming language when theyare 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.

      Variable user entry. Angle brackets indicate that you replace these words and characters

    with appropriate entries to make entries in the system.

    EXAMPLE Keys on the keyboard, for example, F2  or ENTER .

  • 8/19/2019 How to Manage UUID for Existing Documents

    3/10

     

    How to Manage UUID Field in Existing Purchasing Documents

    Table of Contents

    PUBLIC

    © 2014 SAP SE. All rights reserved. 3

    Table of Contents

    1  Introduction ................................................................................................................................................... 4 

    2  SDN Information ............................................................................................................................................. 5 

    3  Overview of the Process of Updating UUID Field in Existing Invoice Type Documents on

    the A/P Side .................................................................................................................................................... 6 

    Process Visualization .............................................................................................................................................. 7 

    4  Updating UUID in Existing Documents ........................................................................................................ 8 

  • 8/19/2019 How to Manage UUID for Existing Documents

    4/10

     

    4

    PUBLIC

    © 2014 SAP SE. All rights reserved.

    How to Manage UUID Field in Existing Purchasing Documents

    Introduction

    1  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. 

    https://i7p.wdf.sap.corp/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3230343835373726https://i7p.wdf.sap.corp/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3230343835373726https://i7p.wdf.sap.corp/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3230343835373726https://i7p.wdf.sap.corp/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3230343835373726

  • 8/19/2019 How to Manage UUID for Existing Documents

    5/10

     

    How to Manage UUID Field in Existing Purchasing Documents

    SDN Information

    PUBLIC

    © 2014 SAP SE. All rights reserved. 5

    2  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. 

    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00332e4a-8146-3210-34bf-e359f57e7cc1http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00332e4a-8146-3210-34bf-e359f57e7cc1http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00332e4a-8146-3210-34bf-e359f57e7cc1http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00332e4a-8146-3210-34bf-e359f57e7cc1

  • 8/19/2019 How to Manage UUID for Existing Documents

    6/10

     

    6

    PUBLIC

    © 2014 SAP SE. All rights reserved.

    How to Manage UUID Field in Existing Purchasing Documents

    Overview of the Process of Updating UUID Field in Existing Invoice Type Documents on the A/P Side

    3  Overview of the Process of Updating UUID

    Field in Existing Invoice Type Documentson the A/P Side

    The process of updating the UUID field is as follows:

    1. 

    The XML files representing electronic documents are generated by SAP authority.

    Note

    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

    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:

    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.

  • 8/19/2019 How to Manage UUID for Existing Documents

    7/10

     

    How to Manage UUID Field in Existing Purchasing Documents

    Overview of the Process of Updating UUID Field in Existing Invoice Type Documents on the A/P Side

    PUBLIC

    © 2014 SAP SE. All rights reserved. 7

    Process Visualization

  • 8/19/2019 How to Manage UUID for Existing Documents

    8/10

     

    8

    PUBLIC

    © 2014 SAP SE. All rights reserved.

    How to Manage UUID Field in Existing Purchasing Documents

    Updating UUID in Existing Documents

    4  Updating UUID in Existing Documents

    To update the UUID field in existing relevant documents, proceed as follows:

    5. 

    Open SQL Enterprise Manager and run the following query:

    BEGIN TRANSACTION

    SET QUOTED_IDENTIFIER ON

    SET ARITHABORT ON

    SET NUMERIC_ROUNDABORT OFF

    SET CONCAT_NULL_YIELDS_NULL ON

    SET ANSI_NULLS ON

    SET ANSI_PADDING ON

    SET ANSI_WARNINGS ON

    COMMIT

    BEGIN TRANSACTION

    GO

    CREATE TABLE dbo.TTST

    (

    CardName nvarchar(50) NULL,

    RFC nvarchar(50) NULL,

    DocTotal numeric(19, 6) NULL,

    DocDate nvarchar(50) NULL,

    UUID nvarchar(50) NULL

    ) 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.  From the Start menu, choose Run and enter "cmd ".

    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.

  • 8/19/2019 How to Manage UUID for Existing Documents

    9/10

     

    How to Manage UUID Field in Existing Purchasing Documents

    Updating UUID in Existing Documents

    PUBLIC

    © 2014 SAP SE. All rights reserved. 9

    Example

    Following is an example of the entered parameters:

    XMLRead.exe FILE;C:\temp\ SERVER;BTSN60264814A\b1 DATABASE;PKO_MX_TEST

    8. 

    Press ENTER .

    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',' ') asdatetime),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.

  • 8/19/2019 How to Manage UUID for Existing Documents

    10/10

     

    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 ch anged 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 do cument 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 orwarranty of any kind, and SAP Group shall not be liable fo r errors or

    omissions with respect to the materials. The only warranties for SAP

    Group products and services are those that are set fo rth in the

    express warranty statements accompanying such products and

    services, if any. Nothing herein should be construed as c onstituting

    an additional warranty.