63
White Paper Using Geographical Services with SAP SCM 7.0 Integration of Geographical Services into SAP SCM 7.0 Applications Marcus Zahn Project Architect SCM Transportation Network Stefan Merkel SCM Business Processes Consultant Target Audience Project Consultants Master Data / System Administrators Public Document Version 1.2 – 2013–03–20

White Paper Gis Integration

Embed Size (px)

Citation preview

  • White Paper Using Geographical Services with SAP SCM 7.0

    Integration of Geographical Services into SAP SCM 7.0 Applications Marcus Zahn Project Architect SCM Transportation Network Stefan Merkel SCM Business Processes Consultant

    Target Audience Project Consultants Master Data / System Administrators

    Public Document Version 1.2 20130320

  • Copyright 2010 SAP AG. 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 i, 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. Disclaimer Some components of this product are based on Java. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java Source Code delivered with this product is only to be used by SAPs Support Services and may not be modified or altered in any way.

    SAP AG Dietmar-Hopp-Allee 16 69190 Walldorf Germany T +49/18 05/34 34 34 F +49/18 05/34 34 20 www.sap.com

  • Typographic Conventions Type Style Represents

    Example Text Words or characters that appear on the screen. These include field names, screen titles, pushbuttons as well as menu names, paths and options. Cross-references to other documentation

    Example text Emphasized words or phrases in body text, titles of graphics and tables

    EXAMPLE TEXT Names of elements in the system. These include report names, program names, transaction codes, table names, and individual key words of a programming language, when surrounded by body text, for example, SELECT and INCLUDE.

    Example text Screen output. This includes file and directory names and their paths, messages, names of variables and parameters, source code as well as names of installation, upgrade and database tools.

    Example text Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.

    Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.

    EXAMPLE TEXT Keys on the keyboard, for example, function keys (such as F2) or the ENTER key.

    Icons

    Icon Meaning

    Caution

    Example

    Note

    Recommendation

    Syntax

  • Copyright SAP AG 2013 Page 4 of 63

    Contents 1 Getting Started ...................................................................................... 9 1.1 About This Document ................................................................................ 9 1.2 History of Changes .................................................................................. 10 1.3 GIS Document Structure .......................................................................... 10

    2 Process Overview ............................................................................... 11 2.1 Geographical Services in SCM 7.0 .......................................................... 11 2.1.1 Geo-Coding ..................................................................................................... 12 2.1.2 Geo-Routing .................................................................................................... 13 2.1.3 Map Display .................................................................................................... 14

    2.2 Geographical Services with SCM 7.0 EHP1 ............................................ 16 2.2.1 Enhancements to Geo-Coding ......................................................................... 16 2.2.2 Enhancements to Geo-Routing ........................................................................ 17 2.2.3 Performance Improvement Example ................................................................ 18

    3 Implementation Guide ........................................................................ 21 3.1 Geo-Coding .............................................................................................. 21 3.1.1 Geo-Coding with SAP SCM 7.0 ....................................................................... 21 3.1.2 Enhancement of Geo-Coding with SAP SCM 7.0 EHP 1 .................................. 25

    3.2 Geo-Routing ............................................................................................. 30 3.2.1 Geo-Routing with SAP SCM 7.0 ...................................................................... 30 3.2.2 Enhancement of Geo-Routing with SAP SCM 7.0 EHP 1 ................................. 32

    3.3 Map Display with SAP TM 8.0 .................................................................. 38

    4 Use Cases and Solution Description ................................................ 39 4.1 UC1: Customer Specific Geo-Coding ..................................................... 39 4.2 UC2: Complex Geo-Coding ..................................................................... 40 4.3 UC3: Complex Distance and Duration Determination ........................... 42 4.4 UC4: Process specific Distance and Duration Determination............... 44 4.5 UC5: Performance Scenario .................................................................... 46 4.6 UC5: Cross System Distance and Duration Determination ................... 47

    5 References .......................................................................................... 48 6 Appendix ............................................................................................. 50 6.1 Transactions and Reports ....................................................................... 50 6.2 Process Controller ................................................................................... 51 6.2.1 Process Controller Setup ................................................................................. 51 6.2.2 Process Controller Interface ............................................................................ 53 6.2.3 Process Controller Request Structures ............................................................ 55

    6.3 Internet Graphics Service (IGS)............................................................... 63

  • Copyright SAP AG 2013 Page 5 of 63

  • Copyright SAP AG 2013 Page 6 of 63

    List of Figures Figure 1: Address Maintenance of a Location ...................................................................... 12 Figure 2: Geographical Coordinates of a Location ............................................................... 13 Figure 3: Distance and Duration Calculation during Lane Creation....................................... 14 Figure 4: Concept of Geo-Coding Levels ............................................................................. 17 Figure 5: Distance and Duration Determination Using Geo-coding Level 1........................... 19 Figure 6: Distance and Duration Determination Using Geo-coding Level 2........................... 20 Figure 7: Distance and Duration Determination Using Geo-coding Level 3........................... 20 Figure 8: SAP SCM 7.0 Geo-Coding Architecture ................................................................ 21 Figure 9: General Geo-Coding Customizing ........................................................................ 22 Figure 10: Geo-Coder Registration ...................................................................................... 22 Figure 11: Assignment of Countries to Specific Geo-Coding Services .................................. 23 Figure 12: Maintenance Table of Address Fields That Trigger a Geo-Coding Call ................ 23 Figure 13: Standard Geo-Coordinates for Country Level...................................................... 24 Figure 14: Standard Geo-Coordinates for Regions .............................................................. 24 Figure 15: Mass Geo-Coding Report ................................................................................... 25 Figure 16: New Geo-Coding Architecture of SAP SCM 7.0 EHP 1 ....................................... 25 Figure 17: Customizing of Geo-Coding Levels ..................................................................... 27 Figure 18: Geo-Coding based on different grouping levels ................................................... 27 Figure 19: Mass Geo-Coding .............................................................................................. 28 Figure 20: Geo-Coding Simulation with Test Report ............................................................ 29 Figure 21: Deletion Report for Obsolete Geo-coding Level Reports ..................................... 29 Figure 22: Geo-Routing Architecture of SAP SCM 7.0 ......................................................... 30 Figure 23: General GIS Customizing Within SAP NetWeaver .............................................. 30 Figure 24: Set Usage of GIS Tool for DDD .......................................................................... 31 Figure 25: Means of Transport Maintenance........................................................................ 31 Figure 26: Enhanced Geo-Routing architecture within SAP SCM 7.0 EHP 1 ........................ 32 Figure 27: Enhanced DDD Customizing Within SAP SCM EHP 1 ........................................ 33 Figure 28: GIS Zone maintenance ....................................................................................... 35 Figure 29: Assign Country to GIS Zone ............................................................................... 35 Figure 30: Define DDD Strategy .......................................................................................... 35 Figure 31: Enhanced Geo-Routing Customizing Within SAP TM 8.0 .................................... 36 Figure 32: Map Customizing ................................................................................................ 38 Figure 33: Activation of the Map .......................................................................................... 38 Figure 34: Process Controller Customizing .......................................................................... 51 Figure 35: Definition of Process Controller Service for Geo-Coding ..................................... 51 Figure 36: Definition of Process Controller Strategies for Geo-Coding ................................. 52 Figure 37: Definition of Process Controller Method for Geo-Coding ..................................... 52 Figure 38: Link Between Process Controller Strategy and Geo-Coding Method .............. 52 Figure 39: Example Activity Diagram for the Process Controller Method .............................. 54 Figure 40: Overview of the /SCMB/CL_GEOCODING_REQUEST ....................................... 56 Figure 41: Overview of the /SCMB/CL_DDD_REQUEST ..................................................... 61 Figure 42: IGS Interface ...................................................................................................... 63

  • Copyright SAP AG 2013 Page 7 of 63

  • Copyright SAP AG 2013 Page 8 of 63

    List of Abbreviations DDD Distance & Duration Determination EHP Enhancement Package EWM Extended Warehouse Management GC Geo-Coding GIS Geographical Information System IGS Internet Graphics Server IMG Implementation Guide MTR Means of Transport RFC Remote Function Call SCM Supply Chain Management TM Transportation Management TPVS Transportation Planning and Vehicle Scheduling UI User Interface

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 9 of 63

    1 Getting Started

    1.1 About This Document Purpose The white paper at hand is the starting point for integrating external Geo Services into SAP

    Supply Chain Management (SCM) 7.0 applications. This includes enhanced functions

    encapsulated in the business function Enhanced Services for Transportation Network,

    which is available with SCM 7.0 Enhancement Package (EHP) 1. The document purpose is

    to give an overview about GIS services in general and explain the concept, how these

    services can be consumed within SCM applications.

    After reading this white paper, it should be possible to decide whether GIS services are

    relevant for a certain business scenario. In addition, it shall be possible to evaluate if the

    business function Enhanced Services for Transportation Network provides benefit for this

    business scenario.

    Relevant Applications This white paper is relevant for all SCM 7.0 applications such as APO Transportation

    Planning and Vehicle Scheduling (SAP APO TPVS), Extended Warehouse Management

    (SAP EWM), and Transportation Management (SAP TM), which use SCM locations and/or

    transportation lanes in a business process. These SCM master data objects contain

    information such as geographical coordinates or distances, which can be determined by

    specialized external Geo Services. An external Geo Service is also required to use a

    geographical map within an SCM application.

    Constraints This document does not:

    x Describe application specific process integrations of geo services (see relevant application documentation)

    x Describe a technical connection to an external Geo Service provider (see technical integration cookbooks)

    x Give any recommendations on using a specific Geo Service provider x Describe the required setup for a geographical map

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 10 of 63

    1.2 History of Changes The following table provides an overview of the most important changes that have occurred in

    the latest versions.

    White Paper Version

    Release Date

    Important Changes

    1.00 2010/12/21 Initial version

    1.10 2012/02/16 Release version for Note 1685381

    1.20 2013/03/20 Update GIS document structure

    1.3 GIS Document Structure The following GIS documents are available:

    White Paper for GIS Integration The White Paper Using Geographical Services with SAP SCM 7.0 explains the GIS concept

    of SCM applications, generally required settings and integration strategies (including

    available data structures).

    Integration Cookbook for GIS Web Services The Cookbook GIS Integration Cookbook for Web Services explains, how external GIS

    Services can be integrated into SCM applications using Web Services. It is a generally valid

    technical documentation based on the GIS concepts described within the White Paper for

    GIS Integration.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 11 of 63

    2 Process Overview The following chapter describes how Geographical Services are relevant for SAP SCM 7.0

    applications. It also outlines the additional functions delivered with business function

    Enhanced Services for Transportation Network.

    Abstract Geographical information plays an important role in SAP SCM applications as almost all

    business processes relate to it. High quality geo data helps to improve these processes.

    The SCM Transportation Network is the foundation of SCM processes. Its basic elements are

    Locations, which represent spots where business takes place, actions occur and activities

    need to be executed. Locations can be connected with Transportation Lanes expressing the

    opportunity to transport goods and defining constraints to do so.

    Specialized external Geo Services can enhance the geo data and functionality provided by

    SAP as they can consider real world up-to-date information like street conditions. Since the

    GIS market contains numerous vendors offering solutions of varying qualities (depending on

    the continent, for example), there is a high demand to have geo services coming from

    different sources depending on geographical or process requirements.

    Geo Services are mutually dependent and closely related. To make the integration as easy

    as possible, all connections need to be handled consistently and in a similar manner from a

    technical perspective.

    2.1 Geographical Services in SCM 7.0 A geographic information system (GIS) integrates hardware, software, and data for capturing,

    managing, analyzing, and displaying all forms of geographically referenced information to

    enable informed decision-making.

    The following GIS services are supported within SAP SCM 7.0:

    x Geo-Coding x Geo-Routing (including Distance and Duration determination) x Map display

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 12 of 63

    2.1.1 Geo-Coding General Information A location is a specific point on the Earth`s surface that is defined by the geographical

    coordinates longitude, latitude, and altitude. These coordinates can be determined from the

    address data of a location, which describes this very same point on Earth in a different

    manner. An address can contain a country, region, postal code, city, district, street, and

    house number, as well as additional fields. Determining geographical coordinates from

    address data is called geo-coding.

    SCM Geo-Coding In SAP SCM, the Location master data object describes the geographical setup of the

    transportation network underlying business processes. An SCM Location can store an

    address and geographical coordinates that define its position along with other business-

    relevant data. The accuracy of the geo-coordinates depends on the address data provided

    and on which service is used to determine them. In standard, SAP SCM applications can

    determine a geo-coordinate on region level automatically when creating or changing the

    location address data. This is sufficient for processes not depending on distances, times or

    map display, or working with static information. Because geo-coordinates are the basis for

    distance / duration determination and map display, they must have high quality in case those

    functions are required.

    Figure 1: Address Maintenance of a Location

    Geo-coordinates are displayed in degrees, minutes, and seconds in the Geographical Data

    area of the Location user interface (UI) and can be overwritten manually by the user.

    Furthermore, the precision field indicates the granularity of the geo-coding result.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 13 of 63

    Figure 2: Geographical Coordinates of a Location The Geo-Coding of SCM 7.0 allows different GIS sources based on customizing settings.

    See implementation guide within this document.

    For more information about the display and maintenance of geographical data within the

    Location User Interface, see documentation link.

    2.1.2 Geo-Routing General Information

    Almost all vehicle-supported business processes such as Transportation Planning require a

    way of delivering their services within the shortest possible time-period and in the most cost-

    effective manner. Reliable routing information supports Transportation Planning by providing

    the shortest driving distance between a start and destination location, taking into account

    hard constrains such as height or weight restrictions of the vehicle used and real street

    conditions. The distance between locations is influenced by the geographical position of the

    involved locations and the area in-between. In the event that a business process is defined

    based on this path, duration information may also be required for scheduling. It can be

    calculated based on the distance and speed parameters of the deployed means of transport.

    Possible results of a Routing Service:

    x Distance and Duration (specific for Means of Transport)

    x Actual points (geo-coordinates) of real-street route

    x Driving directions

    SCM Geo-Routing In SAP SCM, the Transportation Lane master data object links two locations. The

    transportation lane stores distance and duration information for each means of transport

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 14 of 63

    assignment. This information can be determined in standard by calculating a straight-line

    distance, taking into account the spherical shape of the Earth, and a deviation factor specific

    to the means of transport. The actual area in-between is ignored. If this type of abstraction

    level does not fulfill business process requirements regarding accuracy, it is possible to

    determine distances and durations using an external GIS.

    Distances and durations between two SCM Locations are calculated when the transportation

    lane is created. In addition, the user can trigger a re-determination manually or overwrite the

    values. The values of external determinations are buffered for each location pair.

    Figure 3: Distance and Duration Calculation during Lane Creation

    For more information about the display and maintenance of geographical data within the

    Transportation Lane User Interface, see documentation link.

    The actual points of a geo-route can be used to display it on a geographical map. This

    information is not buffered within SCM applications.

    2.1.3 Map Display General Information A visual representation of geographical related objects can significantly support business

    processes. It gives the user a quick overview, enables efficient identification of erroneous

    master data and supports decision-making.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 15 of 63

    SCM Map Display A geographical map within SCM applications such as the Transportation Management

    system improves and simplifies the planning process. A transportation planner requires a

    visual representation to obtain an overview of transportation requests, transportation orders,

    freight units, and resources.

    While Geo-Coding and Geo-Routing is general valid functionality, Map Display is application

    specific and can be handled differently. This will not be explained within this document.

    An opportunity to integrate geographical maps into SAP SCM is SAP Visual Business. See

    detailed information here.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 16 of 63

    2.2 Geographical Services with SCM 7.0 EHP1 Purpose With SCM Basis 7.0 Enhancement Package 1, the business function Enhanced Services for

    Transportation Network enables SCM applications to benefit from increased flexibility

    regarding the GIS integration and improved performance of the Transportation Network.

    The business function delivers the following features: x Unified and open integration framework for Geo-Coding and Geo-Routing

    o Generic process controller integration interface o Flexibility in terms of the Geo Service provider to be used

    x Enabling of process-specific geographical data

    x Enhancement of Geo-Coding for Locations

    x Performance Improvement for Transportation Network

    For more information about the business function Enhanced Services for Transportation

    Network, see the following link.

    Note that all functions, customizing settings and technical integration options in SCM 7.0

    for geo services are still available and can be used as before even after activating the

    business function. It is also possible to combine standard with enhanced features.

    2.2.1 Enhancements to Geo-Coding As part of EHP 1 for SAP SCM 7.0, Geo-Coding has been enhanced with the following

    features:

    x Usage of Process Controller x Introduction of Geo-Coding levels as Location grouping x Altitude as additional coordinate for Location available

    Geo-Coding with Process Controller It is possible to create different Process Controller Geo-Coding strategies linking to different

    GIS vendor products enabling flexible connections. See implementation part of this document

    for details.

    For more information about the SAP SCM Basis Process Controller, see the following link.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 17 of 63

    Geo-Coding Level Concept With the introduction of Geo-Coding Levels, it is possible to store multiple geo-coordinates for

    an SCM Location. It enables to represent SCM Locations with different levels of accuracy (for

    example, at the level of the house number, postal code, region, and so on). On a higher geo-

    coding level multiple locations can share the same geo-coordinate and are hereby grouped

    together.

    With SCM 7.0 EHP 1, there are two purposes to use Geo-Coding levels:

    x Enable customer specific Geo-Coding x Reduction of required distance and duration determinations during a business

    process

    Figure 4: Concept of Geo-Coding Levels

    Note that Geo-Coding levels shall only be created for the above mentioned purposes. Any

    additional Geo-Coding level has an influence on performance and data consistency. Geo-

    Coding levels are optional and it is not necessary to for example create an Geo-Coding level

    for each delivered strategy. For more information on how to use Geo-Coding levels, see the

    Use Cases in chapter 4.

    A low GC-level number represents a high level of detail.

    For example, GC level 0001 represents geo-coordinates determined based on the house

    number of an address and GC level 0002 geo-coordinates based on the postal code of the

    same address.

    2.2.2 Enhancements to Geo-Routing

    GC-level 3

    GC-level 2

    GC-level 1

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 18 of 63

    As part of EHP 1 for SAP SCM 7.0, Geo-Routing has been enhanced with the following

    features:

    x Usage of Process Controller x Process specific Distance and Duration Determination x Performance improvements for Distance and Duration Determination

    Process Controller for Geo-Routing It is possible to create different Process Controller Routing strategies linking to different GIS

    vendor products enabling flexible connections. Distance and Duration Determination is

    handled separately with own strategies. See implementation part of this document for details.

    For more information about the SAP SCM Basis Process Controller, see the following link.

    The created Process Controller strategies for DDD can be used to fulfill different

    requirements of business processes. For example, in case a certain Means of Transport

    requires a different DDD, this can be defined in customizing.

    Performance Improvement With SCM 7.0, the distance between two locations was determined based on the most

    accurate geo-coordinates even if this accuracy was not required. When running mass

    processes, this concept leads to a high number of determinations without bringing additional

    value for the result. To support large-scale scenarios, it is possible with EHP1 to optionally

    configure the DDD to use coordinates based on Geo-Coding levels to balance accuracy and

    performance. To support this new concept, distances and durations are now buffered based

    on coordinates.

    2.2.3 Performance Improvement Example The following example describes how the GC-level concept can be used in order to

    improve the performance of the distance and duration determination.

    Involved Locations: Walldorf, Nuremberg, Munich1, Munich2, Munich3

    Transportation Lane A: Walldorf Nuremberg

    Transportation Lane B: Walldorf Munich1

    Transportation Lane C: Walldorf Munich2

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 19 of 63

    Transportation Lane D: Walldorf Munich3

    DDD Based on GC-level 1 (Precision: House Number) The geo-coordinates for start and destination locations are stored on house number level.

    The system determines the distance and duration for all transportation lanes individually as

    the geo-coordinates of all destination locations are unique. The system therefore needs to

    call the DDD service four times.

    Figure 5: Distance and Duration Determination Using Geo-coding Level 1

    DDD Based on GC-level 2 (Precision: Postal Code) The geo-coordinates for start and destination locations are stored on postal code level. As

    transportation lanes B, C and D end within the same postal code district of Munich, the

    system needs to determine the distance and duration between Walldorf and Munich only

    once and can reuse the data, which is stored in the buffering table. The system therefore

    needs to call the DDD service only twice.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 20 of 63

    Figure 6: Distance and Duration Determination Using Geo-coding Level 2

    DDD Based on GC-level 3 (Precision: Region) The geo-coordinates for the start and destination locations are stored on region level. As

    transportation lanes A, B, C and D have the same start and destination region, the system

    needs to determine the distance and duration only once and can reuse the data, which is

    stored in the buffering table. The system therefore needs to call the DDD service only once.

    Figure 7: Distance and Duration Determination Using Geo-coding Level 3

    Note that the above scenario is just an example to show the reduction of DDD

    determination and does not give a recommendation how to setup Geo-Coding levels. See the

    documentation of the DDD and the Transportation Network Performance Guide for further

    information.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 21 of 63

    3 Implementation Guide The following chapter describes the Customizing settings required to use Geo Services within

    SAP SCM 7.0 and SAP SCM 7.0 EHP 1. It also outlines the differences in the GIS

    architecture.

    Before starting the GIS setup, it must be decided whether the EHP 1 functionality shall be

    used. Some of the SCM 7.0 activities are not required in this case.

    3.1 Geo-Coding

    3.1.1 Geo-Coding with SAP SCM 7.0 The following figure shows the Geo-Coding architecture of SAP SCM 7.0. The architecture

    has a standard interface to the IGS, which is capable to connect to different GIS. See IGS

    chapter for more information.

    Figure 8: SAP SCM 7.0 Geo-Coding Architecture

    3.1.1.1 Geo-Coding Setup The geo-coding functions in SAP SCM applications are encapsulated in an SCMB function

    module, which calls SAP NetWeaver basis functions. These use standard customizing

    settings, which can be configured under SAP NetWeaver-> General Settings Set Geocoding.

    Location Maintenance

    SCM Application (TM, EWM, )

    cl_address_enhancer & cl_geocoder (package SZGEOCODING)

    External GIS:

    PTV e/xLocate

    SCM

    SCM Basis

    SAP Basis

    external

    /SCMB/ADDR_GEOCOORD_GET (package /SCMB/SCE_ORG_MANAGEMENT)

    Mass Location Geocoding Report/SAPAPO/MASS_GEOCODE_LOC

    Supply Chain Unit

    IGS SAP0 custom

    External GIS

    Customizing setting determine the service that is called

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 22 of 63

    Figure 9: General Geo-Coding Customizing

    The following subchapters explain the Customizing settings that are necessary to use geo-

    coding functions within SAP SCM 7.0.

    3.1.1.1.1 Register Geo-Coding Program Before external geo-coding functions can be used, at least one geo-coder service must be

    registered in the system. By default, the customizing table contains the services SAP0 and

    IGS/IGS2. SAP0 is an internal service and uses fixed geo-coordinates. See IGS chapter for

    more information related to the services IGS/IGS2.

    Figure 10: Geo-Coder Registration

    In case the IGS connection shall be used, no additional settings are required here.

    3.1.1.1.2 Assign Geo-Coding Program to Countries A Geo-Coder can be assigned for each standard SAP country meaning, that each Location

    created for this country will use this service. The internal service SAP0 is registered by

    default for each country.

    It is possible to assign multiple Geo-Coders to a country. The sequence for calling up the

    geo-coding programs is defined using a value set in the Sequence column. The geo-coding

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 23 of 63

    program with the smallest value is called up first. If several geo-coder programs have been

    assigned to a country, the Excl. (Exclusive) checkbox specifies that the system will not

    continue to search in other programs if the geo-coordinate determination was successful. For

    example, it is possible to use an external service first and in case it fails to determine a geo-

    coordinate, use the internal service SAP0 as fallback.

    Figure 11: Assignment of Countries to Specific Geo-Coding Services

    3.1.1.1.3 Assign Relevant Address Fields for Geo-Coding

    To restrict the geo-coding service calls and improve the performance of Geo-Coding, the user

    can maintain the address fields that trigger Geo-Coding.

    Figure 12: Maintenance Table of Address Fields That Trigger a Geo-Coding Call

    3.1.1.2 SAP Standard Geo-Coding SAP SCM applications are shipped with fixed geo-coordinates for standard SAP countries

    and regions. These coordinates are basis for the internal geo-coding service SAP0.

    Geo-Coordinates for Countries

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 24 of 63

    The delivered geo-coordinates are based on the geographical mid-point of the respective

    country. These values can be modified in the General Settings Customizing activity for SAP

    NetWeaver. The table GEOT005 containing the country geo-coordinates can be extended.

    Figure 13: Standard Geo-Coordinates for Country Level

    Since the Country field is mandatory for Locations, it can be granted that every location in the

    system at least has coordinates based on country level.

    Geo-Coordinates for Regions The delivered geo-coordinates are based on the geographical mid-point of the respective

    region (assigned to a country). These values can be modified in the General Settings

    Customizing activity for SAP NetWeaver. The table GEOT005s containing the country geo-

    coordinates can be extended.

    Figure 14: Standard Geo-Coordinates for Regions

    3.1.1.3 Mass Geo-Coding It is possible to determine geo-coordinates for multiple locations with a mass processing

    report. This report can in addition simulate geo-coding and compare the existing location geo-

    coordinates with proposed geo-coordinates of any connected GIS.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 25 of 63

    Figure 15: Mass Geo-Coding Report

    3.1.2 Enhancement of Geo-Coding with SAP SCM 7.0 EHP 1 The following figure shows the geo-coding architecture of SAP SCM 7.0 EHP 1. Besides the

    standard interface to the IGS, the architecture enables to connect to different external Geo

    Service providers. Customizing settings for the process controller strategy enable to use

    customer specific connections (including Web Services) within the Geo-Coding framework.

    Figure 16: New Geo-Coding Architecture of SAP SCM 7.0 EHP 1

    For more information about the Geo-Coding concept within SAP SCM 7.0 EHP 1, see

    documentation.

    Location Maintenance

    SCM Application (TM, EWM, )

    cl_address_enhancer & cl_geocoder (package SZGEOCODING)

    PTV e/xLocate

    SCM

    SCM Basis

    SAP Basis

    external

    /SCMB/ADDR_GEOCOORD_GET (package /SCMB/SCE_ORG_MANAGEMENT)

    Mass Location Geocoding ReportSCU Maintenance

    IGS SAP0 custom

    External GIS

    Customizing settings determine the service that is called

    Reuse Component DDD

    Geo Coding Determination Framework

    Strategy customizing Define Strategy including its methodsStandard Geocoding

    Connector

    Customer Geocoding Connector

    Customer namespace

    External GIS

    Strategy execution

    single address Geo Coding multi address Geo Coding

    Location Customizing

    Strategy per Geocoding level

    DB / Excel

    Reuse Component DDD

    Geocoding Determination Framework

    Strategy customizing Define strategy including its methodsStandard Geocoding

    Connector

    Strategy execution

    multi address Geo Coding

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 26 of 63

    3.1.2.1 Process Controller Settings for Geo-Coding The following chapter outlines the Geo-Coding settings within the Process Controller

    Framework delivered by business function Enhanced Services for Transportation Network.

    For checking or setup of a customer specific Process Controller strategy, see solution

    description.

    Geo-Coding Service Service GEO_DET is registered by default for the enhanced geo-coding functions. When

    implementing a customer specific Geo-Coding, this service must be used. No new value

    needs to be created.

    Geo-Coding Strategy The following process controller strategies are available:

    GC_STD The GC_STD strategy uses the IGS interface to connect to an external Geo Service and

    encapsulates the standard SCM 7.0 Geo-Coding functionality including all available

    NetWeaver customizing settings.

    GC_PCODE The GC_PCODE strategy uses also the IGS interface, but passes only country and postal

    code information. The strategy can be used for a Geo-Coding level.

    GC_REGION The GC_REGION strategy uses also the IGS interface, but passes only country and region

    information. The strategy can be used for a Geo-Coding level.

    Geo-Coding Methods The following process controller method is available:

    GEO_STD The GEO_STD method is the actual implementation of the standard Geo-Coding.

    Geo-Coding Method Assignment to Strategies In this Customizing activity, the defined geo-coding method is assigned to a specific geo-

    coding strategy. In standard, the delivered method GEO_STD is assigned to all available

    Geo-Coding strategies.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 27 of 63

    3.1.2.2 Geo-Coding Levels

    3.1.2.2.1 Define Geo-Coding Levels To deviate from the standard Geo-Coding logic, it is required to use one or multiple Geo-

    Coding levels. Settings for Geo-Coding can be configured in Customizing for SCM Basis

    under Mater Data Location Geocoding.

    Figure 17: Customizing of Geo-Coding Levels

    Geo-Coding levels are not automatically assigned when the business function Enhanced

    Services for Transportation Network is activated.

    The definition of a Geo-Coding level includes an identifier, an assigned Geo-Coding process

    controller strategy and a level description.

    Figure 18: Geo-Coding based on different grouping levels

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 28 of 63

    Note that the figure above only represents an example, how the Geo-Coding levels could be

    set up. It is not required to maintain the values this way. In general a single Geo-Coding level

    is sufficient and an additional level should just be added in case of a specific performance

    requirement.

    The following rules apply:

    x The lowest Geo-Coding level must represent the highest accuracy x All defined Geo-Coding level coordinates are determined when creating or changing

    the address of one or multiple locations

    See solution description for further information.

    3.1.2.2.2 Mass Geo-Coding for Geo-Coding Levels If business function Enhanced Services for Transportation Network is activated, mass geo-

    coding report has additional functions such as those that enable geo-coordinates to be

    simulated only for a specific geo-coding level.

    Figure 19: Mass Geo-Coding

    For more information about the functions of the mass geo-coding report, see documentation.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 29 of 63

    3.1.2.2.3 Geo-Coding Simulation The test report enables you to simulate geo-coordinates for a specific process controller

    strategy without saving them on the database. It can also be used to test customer specific

    implementations fulfilling the required interface.

    Figure 20: Geo-Coding Simulation with Test Report

    3.1.2.2.4 Deletion of Geo-Coding Levels When deleting a Geo-Coding level, all stored geo-coordinates become obsolete. They must

    be deleted with a report.

    Figure 21: Deletion Report for Obsolete Geo-coding Level Reports

    For more information about deleting obsolete Geo-Coding level coordinates, see

    documentation.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 30 of 63

    3.2 Geo-Routing

    3.2.1 Geo-Routing with SAP SCM 7.0 The following figure shows the geo-routing architecture of SAP SCM 7.0. The architecture

    has a standard interface to the SAP IGS.

    Figure 22: Geo-Routing Architecture of SAP SCM 7.0

    3.2.1.1 Geo-Routing Setup The Geo-Routing functions in SAP SCM applications are encapsulated in an SCMB function

    module, which can be customized under SCM Basis -> Master Data Transportation Lane Set Usage of GIS Tool.

    Figure 23: General GIS Customizing Within SAP NetWeaver

    Transportation Lane maintenance

    SCM Application (TM, EWM, )

    IGS: cl_gis_route_igs (package SGIS)

    External GIS: PTV eRoute

    SCM

    SCM Basis

    SAP Basis

    external

    /SAPAPO/TR_IGS_GET_DIDU_PREC (package /SAPAPO/OO_TR)

    Customizing setting sDetermine which service is called IGS: cl_gis_route_igs (package SGIS)

    Lane Determination RC LDDD

    RC DDD

    /SAPAPO/TR_IGS_READ_PRESEL

    Mass DDD Report

    /SAPAPO/TR_IGS_BATCHPRESEL /SAPAPO/TR_IGS_TRM_UPD_DIUPS

    /SAPAPO/TR_CALC_DURAT

    /SAPAPO/TR_TL_TRANSFER

    /SAPAPO/TR_MAINTAIN_COPY

    /SAPAPO/TR_TRMH_GET

    Transportation Lane BAPI

    APO

    /SAPAPO/TR_CALC_DIST

    /SAPAPO/TR_MCALC_DIST

    Several callers

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 31 of 63

    3.2.1.1.1 Set Usage of GIS Tool In this Customizing activity, the external Distance and Duration Determination can be

    activated. If the Use GIS Tool checkbox is selected, the specified RFC destination is used for

    DDD. Otherwise, DDD is automatically based on Straight Line distance.

    In SAP SCM standard, the RFC destination specifies the respective IGS connection. See IGS

    chapter for more information.

    Figure 24: Set Usage of GIS Tool for DDD

    3.2.1.1.2 Maintain Means of Transport In addition to the specified Geo Service, the determination of distance and duration depends

    on the speeds allocated to a means of transport (MTR). In order to use a GIS-supported DDD

    for the respective MTR, the GIS Quality checkbox must be select.

    Figure 25: Means of Transport Maintenance

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 32 of 63

    3.2.2 Enhancement of Geo-Routing with SAP SCM 7.0 EHP 1 The following figure shows the Geo-Routing architecture of SAP SCM 7.0 EHP 1. In addition

    to the standard interface to the IGS, the architecture enables the customer to connect to

    different external Geo Service providers. This concept is aligned with the enhanced Geo-

    Coding functions within SAP SCM 7.0 EHP 1 and can be implemented using process

    controller strategies.

    Figure 26: Enhanced Geo-Routing architecture within SAP SCM 7.0 EHP 1

    3.2.2.1 Distance and Duration Determination Customizing for the enhanced Distance and Duration Determination functions within SAP

    SCM 7.0 EHP 1 is encapsulated and can be maintained under Master Data Transportation Lane Distance and Duration Determination.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 33 of 63

    Figure 27: Enhanced DDD Customizing Within SAP SCM EHP 1

    For more information about distance and duration determination within SAP SCM 7.0 EHP 1,

    see documentation.

    3.2.2.1.1 Process Controller Settings for Distance and Duration Determination The following chapter outlines the Distance and Duration Determination settings within the

    Process Controller Framework delivered by business function Enhanced Services for

    Transportation Network.

    For checking or setup of a customer specific Process Controller strategy, see solution

    description.

    Distance and Duration Determination Service Service DDD_DET is registered by default for the enhanced DDD functions. When

    implementing a customer specific DDD, this service must be used. No new value needs to be

    created.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 34 of 63

    Distance and Duration Determination Strategies The following process controller strategies are available:

    DDD_STD

    The DDD_STD strategy uses the IGS interface to connect to an external GIS and

    encapsulates the SCM 7.0 functionality.

    DDD_STRAI

    The DDD_STRAI strategy is the DDD mode that uses Straight Line distance.

    Distance and Duration Determination Methods The following process controller method is available:

    DDD_BU_CHK The DDD_BU_CHK method checks if results are already buffered and can be reused. It can

    be re-used also in customer specific implementations.

    DDD_BU_UPD The DDD_BU_CHK method updates the distance and duration buffer. It can be re-used also

    in customer specific implementations.

    DDD_IGS The DDD_BU_CHK method is the actual implementation of the standard Distance and

    Duration Determination using the IGS.

    DDD_STRAI The DDD_BU_CHK method is the implementation of the Straight Line logic.

    Distance and Duration Determination Method Assignment to Strategies In this Customizing activity, the defined DDD methods are assigned to a specific DDD

    strategy.

    3.2.2.1.2 Define GIS Zone The GIS Zone concept enables the user to group a set of countries that are all covered by a

    specific GIS provider.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 35 of 63

    Figure 28: GIS Zone maintenance

    3.2.2.1.3 Assign Country to GIS Zone In this Customizing activity, you assign one or more countries to the GIS zone created in the

    previous activity.

    Figure 29: Assign Country to GIS Zone

    3.2.2.1.4 Define Strategy for Distance and Duration Determination This customizing activity enables the setup for the distance and duration determination. Here

    it is possible to assign the standard or customer specific determination strategies to

    geographical or logical selections. See strategy setup documentation.

    Figure 30: Define DDD Strategy

    3.2.2.1.5 Pre-Calculation of Distances and Durations You can pre-calculate distances and durations for the buffering table to improve performance

    by using a report.

    For more information about pre-calculation of distances and durations for DDD buffer table,

    see documentation.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 36 of 63

    You can use the Deletion of Buffered Distances and Durations report to delete obsolete

    entries from the distance and duration determination buffer table. For more information about

    deletion of distances and durations for DDD buffer table, see documentation.

    3.2.2.2 Geo-Routing As Geo-Routing is used application specific, it is not generally available in SCM customizing.

    Customizing for the enhanced Geo-Routing functions within SAP TM 8.0 can be maintained

    in Customizing for SAP Transportation Management under Transportation Management Basic Functions Geographical Map

    Figure 31: Enhanced Geo-Routing Customizing Within SAP TM 8.0

    3.2.2.2.1 Process Controller Settings for Geo-Routing The following chapter outlines the Geo-Routing settings within the Process Controller

    Framework delivered by business function Enhanced Services for Transportation Network.

    For checking or setup of a customer specific Process Controller strategy, see solution

    description.

    Geo-Routing Service Service GEO_ROUTE is registered by default for the enhanced Geo-Routing functions.

    When implementing a customer specific Geo-Routing, this service must be used. No new

    value needs to be created.

    Geo-Routing Strategies The following process controller strategies are available:

    GR_STD

    The GR_STD strategy uses the IGS interface to connect to an external GIS.

    Geo-Routing Methods The following process controller method is available:

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 37 of 63

    GR_STD The GR_STD method is the actual implementation of the standard Geo-Routing using the IGS.

    Geo-Routing Method Assignment to Strategies In this Customizing activity, the defined Geo-Routing method is assigned to a specific Geo-

    Routing strategy. In standard, method GR_STD is assigned to strategy GR_STD.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 38 of 63

    3.3 Map Display with SAP TM 8.0 Within SAP TM 8.0, a new geographical map is integrated in order to improve and simplify

    the planning process. Customizing for the geographical map within SAP TM 8.0 can be

    maintained in Customizing for SAP Transportation Management under Transportation

    Management Basic Functions Geographical Map Define Settings for Geographical Map

    Figure 32: Map Customizing

    If the Activate Map checkbox is selected, the map can be used within SAP TM 8.0.

    Figure 33: Activation of the Map

    Note that for the map functionality an external GIS is required. See application

    documentation for more details.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 39 of 63

    4 Use Cases and Solution Description The following chapter describes GIS use cases and provides a solution description for each use case.

    Note that each solution description needs to be evaluated considering customer

    requirements.

    4.1 UC1: Customer Specific Geo-Coding Use Case Description A company has a contract with GIS vendor X for a Geo-Coding service accessible via a Web-

    Service and wants to use this service in its SAP SCM application as standard Geo-Coding.

    Solution Description

    1. Create Implementation Class ZGEOCODING x Create Method EXECUTE_GEOCODING x Implement data access to Web-Service of vendor X x See Process Controller example for more details

    2. Create Geo-Coding Strategy

    x Strategy GC_CUST x Service GEO_DET x Description Customer specific Geo-Coding

    3. Create Geo-Coding Method

    x Method GC_CUST x Service GEO_DET x Description Customer specific Geo-Coding x Method Type B Basic Method x Class/Interface ZGEOCODING x Interface Component EXECUTE_GEOCODING

    4. Assign Geo-Coding method to strategy

    x Assign method GC_CUST to strategy GC_CUST (sequence 1)

    5. Create Geo-Coding level and assign strategy x Create Geo-Coding level 0001 and assign strategy GC_CUST

    6. Re-run Geo-Coding for with Mass Geo-Coding report

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 40 of 63

    4.2 UC2: Complex Geo-Coding Use Case Description A global company wants to calculate the most accurate geo-coordinates possible for its

    locations. After analyzing the GIS market, it becomes clear that:

    x GIS provider GIS1 offers the best accuracy for Europe x GIS provider GIS2 offers the best accuracy for the rest of the world except counties A

    and B

    x GIS provider GIS3 is the only service available for country A x Only hard-coded coordinates in a Microsoft Excel file can be used for country B

    The company owns licenses for all of the GIS providers and the Excel data for country B. The

    GIS providers offer Web Service connections for their Geo-Coding.

    Solution Description

    1. Create Implementation Class ZGEOCODING x Create Method EXECUTE_GC_GIS3 x Implement data access to Web-Service GIS3 x Process only request having country A within the address

    x Create Method EXECUTE_GC_EXCEL x Implement data access to the excel file x Process only request having country B within the address

    x Create Method EXECUTE_GC_GIS1 x Implement data access to Web-Service GIS1 x Process only request having a European country within the address

    x Create Method EXECUTE_GC_GIS2 x Implement data access to Web-Service GIS2 x Process all requests without a result

    x See Process Controller example for more details

    2. Create Geo-Coding Strategy in Process Controller customizing

    x Strategy GC_CUST x Service GEO_DET x Description Customer specific Geo-Coding

    3. Create Geo-Coding Methods in Process Controller customizing

    Method Service Description Method Type

    Class/Interface Interface Component

    GC_CUST1 GEO_DET Geo-Coding with vendor

    B Basic Method

    ZGEOCODING EXECUTE_GC_GIS3

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 41 of 63

    GIS3

    GC_CUST2 GEO_DET Geo-Coding with excel

    B Basic Method

    ZGEOCODING EXECUTE_GC_EXCEL

    GC_CUST3 GEO_DET Geo-Coding with vendor GIS1

    B Basic Method

    ZGEOCODING EXECUTE_GC_GIS1

    GC_CUST4 GEO_DET Geo-Coding with vendor GIS2

    B Basic Method

    ZGEOCODING EXECUTE_GC_GIS2

    4. Assign Geo-Coding methods to strategy in Process Controller customizing

    x Create the following assignments

    Strategy Method Sequence

    GC_CUST GC_CUST1 10

    GC_CUST GC_CUST2 20

    GC_CUST GC_CUST3 30

    GC_CUST GC_CUST4 40

    5. Create Geo-Coding level and assign strategy x Create Geo-Coding level 0001 and assign strategy GC_CUST

    6. Re-run Geo-Coding for with Mass report As a result, all Locations will be passed through the Geo-Coding framework to each of the 4

    different methods. Each method can pick the requests it is capable to answer best.

    Alternative Solution: As an alternative, it would also be possible to implement the complete

    logic within a single method of class ZGEOCODING and have only a single process

    controller method.

    It is NOT an alternative to create multiple Geo-Coding levels as they are valid for all

    locations and would heavily impact performance and complexity of the system. Do only use

    multiple Geo-Coding levels for performance scenarios.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 42 of 63

    4.3 UC3: Complex Distance and Duration Determination

    Use Case Description A company wants to calculate distances and durations using:

    x GIS provider GIS1 in Europe x GIS provider GIS2 in the rest of the world except counties A and B x GIS provider GIS 3 for country A x Using hard distances and durations from a Microsoft Excel file for country B

    The company owns licenses for all of the GIS providers and the Excel data for country B. The

    GIS providers offer Web Service connections for their distance and duration determination.

    Solution Description

    1. Create Implementation Class ZDISTANCE x Create Method EXECUTE_DDD_GIS3 x Implement data access to Web-Service GIS3

    x Create Method EXECUTE_DDD_EXCEL x Implement data access to the excel file

    x Create Method EXECUTE_DDD_GIS1 x Implement data access to Web-Service GIS1

    x Create Method EXECUTE_DDD_GIS2 x Implement data access to Web-Service GIS2

    x See Process Controller example for more details

    2. Create DDD Strategy

    Strategy Service Description

    DDD_CUST1 DDD_DET DDD with vendor GIS3

    DDD_CUST2 DDD_DET DDD with excel

    DDD_CUST3 DDD_DET DDD with vendor GIS1

    DDD_CUST4 DDD_DET DDD with vendor GIS2

    3. Create DDD Methods

    Method Service Description

    Method Type

    Class / Interface

    Interface Component

    DDD_CUST1 DDD_DET DDD with vendor

    B Basic ZDISTANCE EXECUTE_

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 43 of 63

    GIS3 Method DDD_GIS3

    DDD_CUST2 DDD_DET DDD with excel

    B Basic Method

    ZDISTANCE EXECUTE_DDD_EXCEL

    DDD_CUST3 DDD_DET DDD with vendor GIS1

    B Basic Method

    ZDISTANCE EXECUTE_DDD_GIS1

    DDD_CUST4 DDD_DET DDD with vendor GIS2

    B Basic Method

    ZDISTANCE EXECUTE_DDD_GIS2

    4. Assign DDD methods to strategy x Create the following assignments

    Strategy Method Sequence

    DDD_CUST1 DDD_CUST1 10

    DDD_CUST2 DDD_CUST2 10

    DDD_CUST3 DDD_CUST3 10

    DDD_CUST4 DDD_CUST4 10

    x It is also possible to re-use the standard buffering by creating the following assignments (example for strategy DDD_CUST1):

    Strategy Method Sequence

    DDD_CUST1 DDD_BU_CHK 5

    DDD_CUST1 DDD_CUST1 10

    DDD_CUST1 DDD_BU_UPD 15

    5. Create GIS Zones matching the described business logic

    x Create GIS Zone EUROPE and assign all European countries x Create GIS Zone GIS_A and assign country A x Create GIS Zone GIS_B and assign country B

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 44 of 63

    6. Assign DDD strategy to GIS Zones

    x EUROPE - DDD_CUST1 x GIS_A - DDD_CUST3 x GIS_B - DDD_CUST2 x For the rest just assign strategy DDD_CUST4

    7. Re-run Distance and Duration Determination Pre-Calculation report Alternative Solution: As an alternative, it would also be possible to implement the complete

    logic within a single method of class ZDISTANCE and have only a single process controller

    method.

    4.4 UC4: Process specific Distance and Duration Determination

    Use Case Description A company wants to plan its transportation activities based on real street distances and

    durations as determined by GIS provider GIS1 and calculate transportation charges based on

    distances determined by GIS provider GIS2.

    Solution Description 1. Create Implementation Class ZDISTANCE

    x Create Method EXECUTE_DDD_GIS1 x Implement data access to Web-Service GIS1

    x Create Method EXECUTE_DDD_GIS2 x Implement data access to Web-Service GIS2

    x See Process Controller example for more details

    2. Create DDD Strategies

    Strategy Service Description

    DDD_CUST1 DDD_DET DDD with vendor GIS1

    DDD_CUST2 DDD_DET DDD with vendor GIS2

    3. Create DDD Methods

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 45 of 63

    Method Service Description

    Method Type

    Class / Interface

    Interface Component

    DDD_CUST1 DDD_DET DDD with vendor GIS1

    B Basic Method

    ZDISTANCE EXECUTE_DDD_GIS1

    DDD_CUST2 DDD_DET DDD with vendor GIS2

    B Basic Method

    ZDISTANCE EXECUTE_DDD_GIS2

    4. Assign DDD methods to strategy x Create the following assignments

    Strategy Method Sequence

    DDD_CUST1 DDD_CUST1 10

    DDD_CUST2 DDD_CUST2 10

    x It is also possible to re-use the standard buffering by creating the following assignments (example for strategy DDD_CUST1):

    Strategy Method Sequence

    DDD_CUST1 DDD_BU_CHK 5

    DDD_CUST1 GC_CUST1 10

    DDD_CUST1 DDD_BU_UPD 15

    5. Maintain DDD strategy customizing

    x Assign strategy DDD_CUST1 as valid for all determinations

    6. Enter a DDD strategy DDD_CUST2 for GIS provider GIS2 in the charge calculation

    profile

    7. Re-run Distance and Duration Determination Pre-Calculation report

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 46 of 63

    4.5 UC5: Performance Scenario Use Case Description Company A runs a large volume transportation-planning scenario and needs to improve the

    performance of the planning. Both Geo-Coding (on house number level) and Distance and

    Duration Determination are executed with GIS vendor GIS1. The GIS is already accessed

    with the GIS integration framework using the process controller.

    Solution Description To improve the planning performance, it first needs to be evaluated which accuracy for

    distance and duration is required.

    x 0200 km Straight Line distance: External Distance / Duration based on most accurate geo-coordinates required

    x Above 200 km Straight Line distance: External Distance / Duration based on postal code geo-coordinates sufficient

    Prepare Locations

    1. Create geo-coding determination strategy / method GC_HIGH for the GIS1 using complete address (reuse already existing connection)

    2. Create geo-coding determination strategy / method GC_PCODE for the GIS1 using country and postal code

    3. Create Geo-Coding Level 0001 and assign strategy GC_HIGH 4. Create Geo-Coding Level 0002 and assign strategy GC_PCODE 5. Re-run Geo-Coding for all Locations

    Adjust Distance and Duration Determination

    6. Maintain DDD strategy x Straight Line distance range 0-200 km x GC Level GC_HIGH x DDD strategy DDD_CUST

    x Straight Line distance range 200- km x GC Level GC_PCODE x DDD strategy DDD_CUST

    7. Re-run Distance and Duration Pre-calculation to fill buffer

    The above-described example is not a generally valid standard recommendation to

    improve system performance. The settings depend heavily on the business decision of the

    required distance and duration accuracy.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 47 of 63

    4.6 UC5: Cross System Distance and Duration Determination

    Use Case Description Company A runs a large volume transportation-planning scenario and has a high demand in

    accurate distance and duration information from external GIS. As the external determination

    can be time consuming and the productive system A shall not be blocked, it is possible to run

    the coordinate based determination in another system B and transfer the result into the

    productive system A to update the buffer.

    Solution Description To solve the described use case, it is required to work on the same set of coordinates in both

    systems. This can be achieved by having the same locations master data objects in both

    systems or defining a set of locations for which the re-determination is relevant. Especially

    when working with reference coordinates (geo-coding levels), the pre-defined set of

    coordinates can stay stable.

    1. Define set of locations / coordinates relevant for re-determination

    2. Execute external distance determination in system B

    3. Use report /SCMB/DDD_BUFFER_TRANSFER to transfer results from system B into

    system A

    To support this use case, it is helpful to setup both systems in a similar manner regarding the

    geo-coding of locations.

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 48 of 63

    5 References

    List of Documentations The following table lists all documentations mentioned in this White Paper.

    Title Where to Find

    Location Geo-Coding http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?IWB_INDUSTRY=SCMTM&RELEASE=800&_CLASS=BCO_COMMON&_LOIO=733A04DFEE3D497EB5BBAA4729F3A85C&TMP_IWB_TASK=DISPLAY&_SLOIO=F78A77375E87D33AE10000009B38F8CF&LANGUAGE=EN&_SEQNUM=6&_SCLASS=IWB_STRUCT

    Enhanced Location Geo-Coding

    http://aiokeh.wdf.sap.corp:1080/SAPIKS2/navTreeOpen.sap?_SCLASS=IWB_STRUCT&_SLOIO=F78A77375E87D33AE10000009B38F8CF&IWB_INDUSTRY=SCMTM&TMP_IWB_TASK=DISPLAY&RELEASE=800&LANGUAGE=EN&_SEQNUM=6&_LOIO=4B08AE2EB5152475E10000000A421937&_CLASS=BCO_COMMON

    Mass Geo-Coding http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?_SCLASS=IWB_STRUCT&_SLOIO=F78A77375E87D33AE10000009B38F8CF&IWB_INDUSTRY=SCMTM&TMP_IWB_TASK=DISPLAY&RELEASE=800&LANGUAGE=EN&_SEQNUM=8&_LOIO=667FC4282A224CC0BBC0AC4088AFFB65&_CLASS=BCO_COMMON

    Geo-Coding level deletion http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?_SCLASS=IWB_STRUCT&_SLOIO=F78A77375E87D33AE10000009B38F8CF&IWB_INDUSTRY=SCMTM&TMP_IWB_TASK=DISPLAY&RELEASE=800&LANGUAGE=EN&_SEQNUM=9&_LOIO=F6547DF5EF5D4F08B82C36D4643FB5C9&_CLASS=BCO_COMMON

    Distance and Duration Determination

    http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?IWB_INDUSTRY=SCMTM&RELEASE=800&_CLASS=BCO_COMMON&_LOIO=ACB6A18897BA493E9AB32974853D403F&TMP_IWB_TASK=DISPLAY&_SLOIO=F78A77375E87D33AE10000009B38F8CF&LANGUAGE=EN&_SEQNUM=6&_SCLASS=IWB_STRUCT

    Distance and Duration Pre-calculation

    http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?IWB_INDUSTRY=SCMTM&RELEASE=800&_CLASS=BCO_COMMON&_LOIO=72C2B133F0FE4E109E6B1D40E475F13A&TMP_IWB_TASK=DISPLAY&_SLOIO=F78A77375E87D33AE10000009B38F8CF&LANGUAGE=EN&_SEQNUM=6&_SCLASS=IWB_STRUCT

    Distance and Duration buffer clearance

    http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?IWB_INDUSTRY=SCMTM&RELEASE=800&_CLASS=BCO_COMMON&_LOIO=996F562D5257415CBB7F44D58A972A7D&TMP_IWB_TASK=DISPLAY&_SLOIO=F78A77375E87D33AE10000009B38F8CF&LANGUAGE=EN&_SEQNUM=3&_SCLASS=IWB_STRUCT

    Business Function Enhanced Services for

    http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?IWB_INDUSTRY=SCMTM&RELEASE=800&_CLASS=BCO_COM

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 49 of 63

    Transportation Network MON&_LOIO=54956933C52B48BE9E98DC7C506077DB&TMP_IWB_TASK=DISPLAY&_SLOIO=F78A77375E87D33AE10000009B38F8CF&LANGUAGE=EN&_SEQNUM=6&_SCLASS=IWB_STRUCT

    Process Controller http://aiokeh.wdf.sap.corp:1080/SAPIKS2/navTreeOpen.sap?_SCLASS=IWB_STRUCT&_SLOIO=6CB897A6A4896244BAC1693F429CE5B3&IWB_INDUSTRY=SCMTM&TMP_IWB_TASK=DISPLAY&RELEASE=800&LANGUAGE=EN&_SEQNUM=7&_LOIO=FF73B4E1E6434EAABB175419E192ED53&_CLASS=XDP_STRUCT

    Visual Business Documentation

    Not yet available

    List of Documents The following table lists all documents mentioned in this White Paper.

    Title Where to Find

    GIS Integration Cookbook for Web Services

    See Note 1685381

    Transportation Network Performance Guide

    Not yet available

    List of SAP Notes Use the following SAP Notes to implement the additional functions. You can access the SAP

    Notes on SAP Service Marketplace at http://service.sap.com/notes.

    SAP Note Number Description

    1685381 Central note for all required information regarding GIS services

    1461968 Recalculation of geo-coordinates fails

    1467634 Mass Geo-Coding: Simulation function & Precision Level storage

    1461615 Deletion of obsolete GC-Levels does not work correctly

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 50 of 63

    6 Appendix 6.1 Transactions and Reports Transactions

    Transaction Code Description

    /SAPAPO/LOC3 Location maintenance

    /SAPAPO/TR3 Transportation Lane maintenance

    Report

    Report Description

    /SAPAPO/MASS_GEOCODE_LOC Mass Geo-Coding

    /SCMB/TEST_GEO_CODING Geo-Coding Test

    /SAPAPO/DEL_OBSOLETE_GCODE_LVL Geo-Coding level coordinate deletion

    /SCMB/DDD_PRECALC Distance and Duration Pre-calculation

    /SCMB/DDD_BUFFER_TRANSFER Buffer transfer report for cross system

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 51 of 63

    6.2 Process Controller The following chapter explains the required setup of the Process Controller and technical

    implementation details.

    6.2.1 Process Controller Setup The following customizing settings for the SCM Basis process controller are required for a

    customer specific implementation. The settings for the process controller can be configured in

    Customizing under SCM Basis Process Controller.

    Figure 34: Process Controller Customizing

    6.2.1.1 Geo-Coding Example The following chapter explains all required Process Controller settings with the Geo-Coding standard.

    Geo-coding Service Service GEO_DET is registered by default for the enhanced geo-coding functions.

    Figure 35: Definition of Process Controller Service for Geo-Coding

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 52 of 63

    Geo-Coding Strategies

    Figure 36: Definition of Process Controller Strategies for Geo-Coding

    Geo-Coding Methods

    Figure 37: Definition of Process Controller Method for Geo-Coding

    Assignment of Geo-Coding Methods to a Strategy

    Figure 38: Link Between Process Controller Strategy and Geo-Coding Method

    Geo-Coding Parameters It is possible to adjust certain strategies and methods by using method parameter

    customizable with the remaining process controller activities. Parameters allow reusing

    methods in case just small deviations in the implementation logic exist. For the Geo-Coding,

    this is used to connect to the IGS. All delivered standard strategies reuse this connection, but

    pass different fields to the IGS.

    The parameter concept is not required to implement a customer specific logic, but can reduce

    implementation effort in case of more complex scenarios. See Process Controller

    documentation for a detailed description.

    6.2.1.2 Implementation Example When implementing a customer specific Process Controller method, the following steps are

    required:

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 53 of 63

    1. Create Class ZCUSTOM (example name; not fixed)

    2. Create Method EXECUTE_XXX (example name; not fixed)

    x Implement data access x See Process Controller Interface

    3. Create additional methods in case required

    x e.g. different connections required, internal buffering etc.

    For the data access implementations, see technical cookbooks.

    6.2.2 Process Controller Interface All process controller methods must have the following standardized input parameters:

    Parameter Description

    IO_METHPAR Object providing customizable method parameters

    IT_REQUESTS Requests of type /SCTM/CL_REQUEST

    Process Controller Method Structure The /SCTM/CL_REQUEST instances are the basis for the determination inside the process

    controller method. In principle, the method consists of the following blocks:

    1. Preparation

    a. Cast of the /SCTM/CL_REQUEST instances into required request format

    b. Prepare required data access

    2. Determination

    a. Data access

    3. Update of the Request Object

    a. Add results to the result attribute of the Request Object

    The process described above is depicted in the following figure using the example of a

    Distance and Duration Determination via Web service:

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 54 of 63

    1. Preparation

    3. Update of the DDD Request Object

    2. Distance & Duration Determination

    Create Proxy Instance

    Cast Request Object

    Asynchronous MatrixRouting Call

    Job done?

    Query Job Status

    Retrieve Results

    Result filled?

    Add Results

    Yes

    Yes

    Wait

    No

    Wait

    No

    Delete Requests

    Prepare Requests

    Figure 39: Example Activity Diagram for the Process Controller Method

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 55 of 63

    Message Handling in a Process Controller Method From within a process controller method it is possible to propagate messages to the caller of

    the process controller framework. This is especially useful for reporting errors if a request

    could not be processed properly.

    To log messages during processing, you simply add the message content to the

    MT_MESSAGES table of the request object. This table uses the

    /SCMB/S_LDDD_MESSAGE structure and provides, for example, details on the message

    text and the message type.

    6.2.3 Process Controller Request Structures The following chapter explains the request structures (including request and result) for the

    available usages:

    x Geo-Coding x Geo-Routing x Distance and Duration Determination

    All requests inherit from class /SCTM/CL_REQUEST.

    6.2.3.1 Geo-Coding Request Structure For every process controller method used in the context of Geo-Coding, the IT_REQUESTS

    table contains instances of the class /SCMB/CL_GEOCODING_REQUEST. This class

    contains:

    x Requests for single Locations with address information and an included result area for geo-coordinates of successfully processed requests

    Listing: Standard Geo Coding method METHOD execute_geocoding. DATA: lo_request TYPE REF TO /sctm/cl_request, lo_gc_request TYPE REF TO /scmb/cl_geocoding_request. FIELD-SYMBOLS: TYPE /scmb/s_geocoding_request_int. LOOP AT it_request INTO lo_request. lo_gc_request = /scmb/cl_geocoding_connector=>cast_request( lo_request ). CHECK lo_gc_request IS BOUND. LOOP AT lo_gc_request->mt_requests ASSIGNING . * ------------------------------------------------------------------* Implement determination logic here * ------------------------------------------------------------------

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 56 of 63

    * Update Request Object here * -xpos = . * -ypos = . ENDLOOP. ENDLOOP. ENDMETHOD. The following figure shows the semantic structure of the request object attributes.

    Figure 40: Overview of the /SCMB/CL_GEOCODING_REQUEST

    /SCMB/S_GEOCODING_REQUEST_STD

    Loc_ID

    GC _Level

    ADRC_STRUC

    /SCMB/S_GEOCODING_RESULT

    House_Num1

    Street

    Post_Code1

    City1

    City2

    Region

    Country

    Request_ID

    Loc_ID

    GC_Level

    XPOS

    Request_ID

    YPOS

    ZPOS

    GEO_PRECISION

    SRCID

    /SCMB/CL_GEOCODING_REQUEST

    ...

    ...

    /SCMB/S_GEOCODING_REQUEST_STD

    Loc_ID

    GC _Level

    ADRC_STRUC

    /SCMB/S_GEOCODING_RESULT

    House_Num1

    Street

    Post_Code1

    City1

    City2

    Region

    Country

    Request_ID

    Loc_ID

    GC_Level

    XPOS

    Request_ID

    YPOS

    ZPOS

    GEO_PRECISION

    SRCID

    /SCMB/CL_GEOCODING_REQUEST

    ...

    ...

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 57 of 63

    The following table shows the attributes of the request object.

    Attribute Description

    MV_ID Request ID

    MV_WAIT If true, stop the processing of further requests

    MV_INTERRUPT If true, stop the processing of further strategy methods

    MV_STRATEGY Control Strategy

    MT_REQUESTS Geocoding requests of type /SCMB/S_GEOCODING_REQUEST_STD

    MT_RESULTS Results of the geocoding determination

    MO_MESSAGE_HANDLER Messages

    MV_DETAIL_MESSAGES If true, return detailed messages

    The following table shows the components of the /SCMB/S_GEOCODING_REQUEST_STD structure.

    Component Description

    REQUEST_ID Request ID

    LOC_ID Location ID

    GC_LEVEL Geo-Coding Level

    ADRC_STRUC Includes address structure

    The following table shows the components of the ADRC_STRUC structure.

    Component Description

    NAME_CO c/o name

    CITY1 City

    CITY2 District

    CITY_CODE City code for city/street file

    CITYP_CODE District code for City and Street file

    HOME_CITY City (different from postal city)

    CITYH_CODE Different city for city/street file

    CHCKSTATUS City file test status

    REGIOGROUP Regional structure grouping

    POST_CODE1 City postal code

    POST_CODE2 PO Box postal code

    POST_CODE3 Company postal code (for large customers)

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 58 of 63

    PCODE1_EXT (Not Supported)City Postal Code Extension, e.g. ZIP+4+2 Code

    PCODE2_EXT (Not Supported) PO Box Postal Code Extension

    PCODE3_EXT (Not Supported) Major Customer Postal Code Extension

    PO_BOX PO Box

    DONT_USE_P PO Box Address Undeliverable Flag

    PO_BOX_NUM Flag: PO Box without number

    PO_BOX_LOC PO Box city

    CITY_CODE2 City PO box code (City file)

    PO_BOX_REG Region for PO Box (Country, State, Province, ...)

    PO_BOX_CTY PO box country

    POSTALAREA (Not Supported) Post Delivery District

    TRANSPZONE Transportation zone to or from which the goods are delivered

    STREET Street

    DONT_USE_S Street Address Undeliverable Flag

    STREETCODE Street Number for City/Street File

    STREETABBR (Not Supported) Abbreviation of Street Name

    HOUSE_NUM1 House Number

    HOUSE_NUM2 House number supplement

    HOUSE_NUM3 (Not supported) House Number Range

    STR_SUPPL1 Street 2

    STR_SUPPL2 Street 3

    STR_SUPPL3 Street 4

    LOCATION Street 5

    BUILDING Building (Number or Code)

    FLOOR Floor in building

    ROOMNUMBER Room or Appartment Number

    COUNTRY Country Key

    LANGU Language Key

    REGION Region (State, Province, County)

    SORT1 Search Term 1

    SORT2 Search Term 2

    SORT_PHN (Not Supported) Phonetic Search Sort Field

    ADDRORIGIN (Not Supported) Address Data Source (Key)

    EXTENSION1 Extension (only for data conversion) (e.g. data line)

    EXTENSION2 Extension (only for data conversion) (e.g. telebox)

    TIME_ZONE Address time zone

  • White Paper Using Geographical Services with SAP SCM 7.0

    Copyright SAP AG 2013 Page 59 of 63

    TAXJURCODE Tax Jurisdiction

    ADDRESS_ID (Not supported) Physical address ID

    REMARK Address notes

    LANGU_CREA Address record creation original language

    PO_BOX_LOBBY PO Box Lobby

    DELI_SERV_TYPE Type of Delivery Service

    DELI_SERV_NUMBER Number of Delivery Service

    The following table shows the components of the /SCMB/S_GEOCODING_RESULT structure.

    Component Description

    REQUEST_ID Request ID

    LOC_ID Location ID

    GC_LEVEL Geo-Coding Level

    XPOS Geo location latitude

    YPOS Geo location longitude

    ZPOS Geo location height

    GEO_PRECISION Precision level of a geocoded location (e.g. street, postal code, city...)

    SRCID Geo location data source ID/Geocoder ID

    6.2.3.2 Geo-Routing Request Structure For every process controller method used in the context of G