Skip to Content
Author's profile photo Marcus Zahn

Monday Knowledge Snippet (MKS) – 12 Transportation Network Shadows

Today its going to get technical with the topic TM specific storages for Transportation Network objects Location and Transportation Zone. This concept exists since TM 8.0.

Background: A TM specific storage for master data objects is required due to a very important reason – its all about speed! In detail, there are 2 points making it necessary to bring the basis master data into a format fitting for SAP TM: First of all, when for example displaying location information (description, address info, and so on) on the user interface or using it for business document selection, the relevant data is spread over many different objects / database tables making it slow to process. The second performance block is the dynamic Location assignment to Transportation Zones (check also my MKS04 – Flexible Transportation Zones). For customers having hundreds of thousands locations (including one-time locations – see MKS10) in the system, a selection via zones using an address validation during runtime can take some time. Remember, the system needs to check for each location using its address, if it is covered by the zone definitions (region or postal code).

To avoid such unkind performance blocks, there are two database tables storing exactly the information required for a high performance access in SAP TM. Table /SCMTMS/D_SHLOC holds all locations including relevant address fields, while table /SCMTMS/D_SHZON stores Location – Zone assignments.

What do I need to do? Well, actually nothing. This works out of the box and is updated whenever a location is created, changed, or deleted. Or a zone is created, changed and deleted. For the automatic update the so-called Change Notification Framework is used (class /SCMTMS/CL_CNA_TM). This of course includes the deletion of obsolete entries.

Why then care? Well, live is not always perfect. Whenever you run into the situation that a selection criteria using zones does not work correctly, or any location specific UI fields appear empty, it might be worth checking the shadow tables.

How do I check? You can use report /SCMTMS/SHDB_FILL_MD_TABLES. It enables checking and check&correct. I will come up in the next few weeks with a Location specific check option as the runtime for a complete check can be quite long.

Very important to mention is here that it is not recommended at all to steer any processes by manipulating the content of these tables. In case you want to exclude locations from zones, use the standard features.

Interesting notes:
1747657 – Location Shadow table does not respect location exclusion
1744237 – Location Shadow table misses address information
1704860 – Report for shadow location table: High memory consumption
1693959 – Dump in Shadow Location Fill Report due to memory shortage

In case you encounter any issues in this area, the right component is TM-MD-TN.

Cheers,
Marcus

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Marcus Zahn
      Marcus Zahn
      Blog Post Author
      Author's profile photo Former Member
      Former Member

      Hi Marcus,

      Please, I'd like to check if could we get in touch to check some doubts about SAP TM in general.

      For example, we're implementing some enhancements in SAP TM 9.0 to set the system to define transportation routes considering the geographical locations of each delivey point. We set the geographic coordinates for each unity, but the system is not considering the righ orientation for each stage.

      Could you mail me to start some conversation about it?

      Thanks a lot and congrats for your posts.

      Regards,

      Domênico (Brazil)

      Author's profile photo Marcus Zahn
      Marcus Zahn
      Blog Post Author

      Hello,

      I don't do e-mail consulting. In case you have a concrete question you can post it in the community and it is likely that somebody (maybe me) answers. All other solutions do not scale for me.

      Regards,

      Marcus

      Author's profile photo Former Member
      Former Member

      Ok. Understood.

      Thanks,

      DM

      Author's profile photo Former Member
      Former Member

      Hi Marcus,

      can you please let me know how I can delete a location that has been cifed from ERP to TM?. I have tried by adding the deletion flag and then running the job, both many times and it has not worked. I have also tried by deleting the entry in the table you mention above, and it did not work either. What could be the reason for this?

      Thanks,
      Andres.