The purpose of this page is to provide useful information on Geocoding (BC-SRV-GEO). There are several Geolocation related tools, different solutions exist in SAP Systems, this page can help with the standard solutions of Business Partner Geocoding, SCM and TM system geocoding, with standard engines (SAP0 and IGS).
The attached document contains detailed information and useful hints on Geocoding Services within the SAP context.
Geocoding is the process of finding associated geographic coordinates (often expressed as latitude and longitude) from other geographic data, such as street addresses, or zip codes (postal codes). It is a function what is used eg. for CRM Business Partners, SAP APO Locations, and other Business Addresses.
There are basically two different methods to obtain geocoordinates.
1. You can use the SAP built-in geocoding ''engine'' which is based on pre-defined coordinates in customizing tables (see: Geocoding Tables). It provides Geo-coordinates for different countries and regions. The vast majority of the countries and their regions are included in SAP provided default tables but there can be some missing data in the Country or Geocoding tables due to missing ISO standard or other reasons. The geo information displayed are Altitude, Longitude, Latitude, Precision, Source, Time Zone and more. Region coordinates can be empty, but country coordinates (even if zeroes) must exist. The SAP0 engine delivers 1 coordinate per country or region that has limited business value compared to GPS level coordinates.
2. You can assign an external geocoding server which can return way more precise (GPS level) geocoordinates to your addresses. For such a function you can use an IGS/PTV server (BC-FES-IGS). Installation and troubleshooting: Installing and Troubleshooting IGS and Internet Graphics Server-IGS Related Notes. However there are other solutions eg. DQM (Data Quality Management EIM-DQM-SAP) that are capable of precise geo-coding. It is important in these cases to set up the server connection (eg. SM59 - TCP/IP connection) and the coding/classes correctly. Also the selected countries must be assigned to the respective geocoding tool.
These settings can be performed in SPRO:
- Gecoding Maintenance / Customizing: SPRO / SAP Netweaver / General Settings / Set Geocoding (and Set Countries)
- Register Geocoding Program in the System
- Assign Geocoding Program to Countries
- Assign Relevant Address Fields for Geocoding
- Process Geographical Data for Countries
- Process Geographical Data for Countries and Regions
- Geocoding can be switched off or on in a SAP system with report:from transaction SE38 - GEOCODING_SET_GEOFLAG
After running, there is a Check-box where Geocoding function can be adjusted.
- The Data Tables GEOLOC and GEOOBJR (VGEOOBJLOC) are not to be cleared off by SAP standard (there is no standard tool for deletion). If the belonging Business Partner is deleted, then the GUIDLOC will be registered in the GEOLDELREQ (marked for deletion) table. This is however happening one-by-one.
When switching off Geocoders the Address related geocoding Data is not recorded in the background to the GEOLOC and GEOOBJR tables. When switching back the data is recorded again. Locations made up the interim time will simply not have Geo-coordinates.
- Geocoding Test report: It can be used to check addresses and their coordinates generated by their assigned geocoding engine.
SE38 - GEOCODING_FIRST
SAP provides default entries to most of these tables but in many cases manual update is required for these tables due to eg. actual-political reasons. Database tables can be browsed in SE11 or SE16 transaction:
- T005 - Countries
- T005S - Taxes: Region (Province) Key
- T005T - Country Names
- T005U - Taxes: Region Key: Texts
- View: V_T005S – (Regions - customizing) (Join view of: T005S, T005U)
- View: V_GEOT005 – country level Geo coordinates – as for customizing (Join view of: T005, GEOT005, T005T)
- View: V_GEOT005S – region level Geo coordinates – as for customizing (Join view of: T005S, GEOT005S, T005U, T005, T005T)
- GEOT005 - Table Containing Geocoordinates at Country Level (Every country should be assigned where geocoding is desired)
- GEOT005S - Table Containing Geocoordinates at Country- and Region Level
- GEOCODERS Geocoders Maintenance - SRCID - Source ID is SAP0 by default. this is the geocoding engine what gives the result for a location (every country should be assigned where geocoding is desired). Geocoding Program Assignment is possible here you can choose SAP0 as internal SAP geocoding engine or IGS (Internet Graphic Server) / PTV server for assigning IGS as a Geocoder program. Available with T-code: SZGEOCD_GEOCODERS
- TTZ5 – Assign Time Zones to Countries - V_TTZ5 to view mode (Join view of: TTZ5, T005, T005T)
- GEOLOC - Table where geo-coordinates are defined to a Business Partner's address. ADDRNUMBER links BP's to adresses. The ADDRNUMBER receives a unique GUIDLOC in this table. The BP number and ADDRNUMBER are together existing in BUT020 table. ADRC table stores Business Address data.
- GEOOBJR - Table that stores the references for Business Objects.
- ADRC - Business Address Services (ADDRNUMBER)
Troubleshooting and usage:
- If you proceed with eg. CIF integration between more systems you need to make sure that the above tables are synchronized/having the same entries in the interconnecting systems. By this you can avoid errors regarding Location or Business partner creation/change integration during a Core Interface transfer.
Missing entries can be manually maintained in Customizing (see above) or in SM30 (Table View Maintenance).
- The originally delivered content of these tables can be restored/copied (after eg. your data was deleted accidentally) from other similar systems/clients.
- Transport request SAP Help Page - Transport entries from another system - Test Case
- For BP creation issues and errors please see the brand new form follow the steps of the decision tree.
- For Troubleshooting geocoding (eg. incorrect/unprecise geocoordinates are returned): First make sure which ''engine'' returns the coordinates (eg. SAP0, SAP1, IGS). It is advised to start debugging in the engine's related class (check in SPRO - Gecoding Maintenance / Customizing: SPRO / SAP Netweaver / General Settings / Set Geocoding - Register Geocoding Program in the System). Another general hint is CL_GEOCODER class / INTERACTIVE_GEOCODING method to start with.
- For IGS class: CL_GEOCODER_IGS
- For SAP0 class: CL_GEOCODER_SAP0
- For DQM the class is /FLDQ/CL_GEOCODER_GENERIC_RFC
- Transportation Duration and Distance calculation in Transportation Management / SCM systems: (Set Usage of GIS Tool)
In SCM there is an option to use IGS server for Transportation Lanes - Means of Transport - Transportation Duration and Distance calculation. The corresponding SPRO path is like: SPRO - SAP Customizing Implementation Guide - SAP Transportation Management - SCM Basis - Master Data - Transportation Lane - Distance and Duration Determination - Set Usage of GIS Tool. Make sure to define the correct RFC Destination as it is indicated in between the RFC connections in TCP/IP connections in SM59 transaction eg. ''IGS_RFC_DEST''. Otherwise - in case of wrongly maintained customizing - you might receive an RFC connection dump pointing to a specific Function Module: ''PIGFARMDATA'' (DUMP: CALL_FUNCTION_NOT_FOUND)
- Geocoding addition (advanced development) in ERP standard plants and retail sites: 2080368 - Geolocation Data in Site Master
Related SAP Notes/KBAs
2617754 - Changes in Geo-coding.
1561501 - GETWA_NOT_ASSIGNED in CL_GEOCODER
1595770 - Business Partner Creation error Messsage no. GEOCODING004
1598329 - Geocoding002: Geocoder SAP0: Country specification is incomplete (Customizing)
2042612 - Replication of GEOLOC Data
1042341 - Location: Geocoding data
613647 - SAP BP: Deactivation of geocoding for BP addresses
511523 - Deactivating geocoding in the location user exit
631319 - Consulting note: Geocoding SCM 4.0
1402070- Geocoding-Survival guide
820841 - Taking deactivation of geocoding for BW into account
934412 - Consulting note geocoding
561418 - Problem with geocoding different cities
454042 - IGS: Installing and Configuring the IGS
1042341- Location: Geocoding data
553073 - Error in the geocoding when you create a business
204693 - Missing countries in Customizing (table T005)
593699 - Creating a business partner fails
728563 - Error in external geocoding tool
443402 - Performance problems accessing view VGEOOBJLOC
455980 - Performance with DB operations in the GEOLOCATION
687061 - Performance improvement during access to the GEOOBJR table
422610 - Error reading from table GEOLOC/GEOOBJR