Skip to Content
Author's profile photo Tobias Berger

SAP TM Optimizer – Context Determination

When running the optimizer, a lot of data are read automatically for additional selection or context information. This blog post should give you insides which data are read when and why.

If the optimization takes a very long time a reason could be that the context determination is determining (and reading) a very lot of data. Also, locking issues can occur if you aren’t aware which data are read.

Network Determination

Transportation Network

For all involved locations and means of transports the transportation network is determined. The depth of network analysis for transshipment locations starting at each requirement source and destination location is controlled by the “Search Depth for Transshipment Locations” maintained in the optimizer settings.

Schedule Departures

For a selected schedule, all the schedule departures in the planning horizon are determined.

 

Automatic Selection

Some data are always automatically selected by the TM system. This means those objects are treated like a direct selection from the user. This means that the optimizer can discard those freight orders, change dates or change freight unit assignments like the user had selected them. Therefore, those data will also get locked by the optimizer run.

Capacity Documents

For a selected capacity document, all assigned requirement documents are automatically selected.  If a selected capacity document is already assigned to a resource also the resource is selected.

“One-Order” Schedules

For “One-Order” Schedules also the existing freight orders for all the departures in the planning horizon are selected. This means also all requirements planned on them are selected.

Automatic Connection Determination

In the optimizer settings, you can activate another type of additional selection, the “Automatic Connection Determination” (be aware that the setting is hidden in the “Advanced Settings”). This context determination determines matching freight orders, schedules and freight bookings along the network. Those are added to the selection to plan on them.

The automatic connection determination is only running when you are plan with “optimizer planning ->all” or using the batch report for VSR planning.

 

Context Determination

TM always determines a lot of context data on basis of the selection which are necessary for the optimizer run but not changeable. Those aren’t locked. This includes the following information:

Requirement Document Stages

For each selected requirement document stage all other stages of the same requirement document are determined. If those are planned also the corresponding capacity documents are determined.

Single Resources (or Multi Resources With Limit)

For non-multi resources all other documents on the same resource in the planning horizon are determined to ensure that the optimizer does not plan the same resource at the same time twice.

 

 

 

 

Differences Between the Buttons

Optimizer Planning -> All

The optimizer processing is called with all the data which are loaded in the cockpit session. All above mentioned context determinations are running.

Optimizer Planning -> Selected Entries with All Resources

The optimizer is called with all selected documents. Additionally, all resources and schedules in the cockpit session are selected automatically. The above-mentioned context determinations are running but “Automatic Connection Determination” is never used.

Optimizer Planning -> Selected Entries Only

The optimizer processing is called with only the selected data. The above-mentioned context determinations are running but “Automatic Connection Determination” is never used.

 

 

More

More about performance you can find here.

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

       

      Hi Tobias,

      Thank you. It is nice post to understand context determination.

      Upgrade from 9.1 to 9.4 is in progress in our system.

      In planning profile->optimizer settings->Automatic connection determination is enabled and it is considered even for Optimizer planning->selected entries only.

      We could see locking issue, when one user performing optimizer planning and at the same time other logged into different cockpit ,select FU/resources(which are not used by first user) and do selected entries planning system gives an error due to lock objects exists. When I checked in log input file all the freight orders are passed to optimizer.

      We could not see this issue in 9.1 system where as in 9.4 we could see.

      If I remove automatic connection determination then I don’t see any locking issue.

      Could you please help me in understanding is there any change in Automatic connection determination in 9.4 ? and  its working for Optimizer planning->selected entries only as well in 9.4.

      Regards,

      Naresh Viswanatham

      Author's profile photo Tobias Berger
      Tobias Berger
      Blog Post Author

      Hi Naresh,

      Sorry for the late answer. I'm not directly aware of bigger changes between 9.1 and 9.4 in regards of the context determination.

      Maybe you can check in which context determination the data are read.

      Automatic connection determination: see  /SCMTMS/CL_PLN_OL_MAIN =>  vsr_pre_connection_cashe

      Resource/Order Context: see  /scmtms/cl_pln_cd=>determine_context

       

      BR

      Tobi