Quantcast
Channel: SAP Transportation Management (SAP TM)
Viewing all 91 articles
Browse latest View live

Monday Knowledge Snippet (MKS) - 45 TM 9.1 Bring Container Unit into Transportation Cockpit

$
0
0

Long awaited feature: Use the Container Units in the Transportation Cockpit for planning. Since SAP TM 9.1 this is possible and today I would like to explain how to first get the Container Units into the Transportation Cockpit.

 

Since the Transportation Cockpit is a highly flexible user interface with lots of adjustment capabilities covered by the page layouts, it is required to create or adjust an existing page layout to make the new Container Unit screen areas visible. Under the Transportation Units Area you can find 3 new Container Unit specific views (flat list, flat list stage based, and hierarchy). Which one to choose depends on the user task. Try it out.

 

MKS45_01_PageLayout.jpg

 

Now already  the Transportation Cockpit can be filled with the data using the Selection Criteria entry screen. Enter the just created page layout and pick the Container Units by entering the Transportation Unit Category and a criteria fitting to the CUs in your system.

 

MKS45_05_TC_SelectionCriteria.jpg

 

As result the Transportation Cockpit displays the CUs in the selected lists or hierarchy. Of course those CU specific screen areas can be combined with all other already existing screens.

 

MKS45_06_TC.jpg

 

When not using the selection criteria, but planning and selection profiles, it is also possible to integrate the CUs. First create a selection profile for additional attributes. Here you can pick the field TU_CAT of /SCMTMS/TO and select Container Units. Of course this can be combined with other available attributes.

 

MKS45_02_SelProfile_AddAttributes.jpg

 

Add this additional attribute selection to a selection profile:

 

MKS45_03_SelProfile.jpg

 

Enter this selection profile in your planning profile for Transportation Units:

 

MKS45_04_PlanningProfile.jpg

 

When entering the Transportation Cockpit using the profile screen using this planning profile, the selection will be applied.


Effective optimization: Enhancement - create your own world for optimization

$
0
0

As you may know we use Meta-Heuristic for our VSR-optimization. We call it evolutionary local search. One important part in such an approach are the local steps to check every possibility in a neighborhood and some random steps to get new aspects into your plans. But beside of that it is very important we have very efficient steps to construct the transportation plans. That means we have to exploit all the information of our data and to concentrate on that kind of plans which are usual rated as good or very good.


Because of that our algorithms inside VSR are highly sophisticated. They are created and adapted to the feature-set of TM and what we learned from our customers about good transportation plans.

If you now want to change that behavior of it, to support new features, constraints or cost functions, it would be no good idea, to just do a minimal change and add this feature or constraint. As long as you don’t adapt the constructions step, so that your kind of wanted plan becomes possible, the optimizer would not work efficiently. Without deeper changes the algorithms would still try to construct the same plans like before. Adding new cost functions to express what is expected are required, that the engine can decide, when a plan is better than another. But much more painful: All the algorithms for construction have to be adapted. Otherwise they would destroy the new wanted feature of the plan directly in the next step after they have found it.

That means enhancing the algorithms to get a new behavior can be cumbersome and expensive. But there is another possibility, which helps in a lot of requirements: We change the data instead of the algorithm


Let’s look what’s happening, if we call the optimizer: The application is reading all data which is required for the optimization run. It collects all this data and sends it in one large package to the optimizer. After the optimizer has found its solution, we have the same into the other direction: The optimizer sends back the transportation plan und explanations to the TM system, which is saving these results during the post-processing.

 

badi1.jpg

As the data are transferred from the application server to the optimizer and back, we have a copy of the data.  A copy implies, that we can change the copied data without changing the TM-system itself. For example you can delete objects in the optimizer data set, without deleting these objects inside TM.

We introduced the BADI /SCMTMS/PLN_OPT to allow such manipulations to the data, which are send to or from the optimizer engine. The BAdI is running on the application server. It is a usual ABAP-BAdI, whereas the optimizer itself is written in C++.
The BAdI has two methods: After the pre-processing you can manipulate the input data for the optimization engine. After optimization you can manipulate the results of the optimizer, before saving it into the TM system.

badi2.jpg

Like you can see in the drawing above, the BAdII call for transforming the input data and manipulating the result, are inside the calls of the explanation tool. This means

 

  • If you manipulate the input data, you see the original input data in the explanation tool. You don’t see your manipulation
  • In upload stop you can write additional information into the explanation, to write details about your changes to the objects.
  • In general you can see the BAdI as part of the optimization process. Whereas the explanation tool describes the state before and after optimization and BAdI.


Let’s have a look, on what you can do with the BAdI: The simplest usage is the deletion of some constraints. There are already several parameters in the planning profile, which you can use to disable some constraints. But these switches work on a general level. If you want to ignore or modify some but not all constraints of one type you can do it with the BAdI.

 

  • Ignoring or modifying of you dates, acceptable or requested dates on Freight Units
  • Capacities of trucks, trailers, compartments bookings or schedules.
  • Changing of distances or durations to overwrite the general geo information


Whereas the examples above manipulate the input data for the optimizer, it is also valid to change the results:

 

  • You can delete specific Freight Orders or Bookings, if they don’t satisfy your expectations, for example if the utilization is too low.

 

One of the most important data to the optimizer is the transportation network. Especially if you want to keep it simple for the maintenance and manual planning, but you want to have some more complex effect inside your automatic planning you can do that in the BAdI, too:

  • In the blog about simple networks I introduced a modelling to enforce that some locations are the first delivery locations on tours. Instead of a persistent modelling like in the blog you can transform your network on the fly when calling the optimizer.

 

  • So far the optimizer cannot handle via-locations. You can add them in the BAdI, if you add the additional duration, distance and cost in the distance table. This guides the optimizer engine too consider the additional effort to go via the via-location.
    In the result of the optimizer you add this via-location whenever such a distance is selected.

 

One very common usage of the engine is to add data which are not yet maintainable inside TM into the optimization process. In some special areas we have the situation, that the optimizer already supports functionality, which is not supported in TM application:

 

  • Ship-With-Groups
    The optimizer can respect groups of FU-stages which should be planned together in one common Freight Order. You can find Details in this note.
  • Cost-Model
    The optimizer has a sophisticated model for cost on bookings and schedules. Currently only very basic cost rates are transferred to the optimization engine.
  • Sustainability
    The engine has features to reduce the carbon emissions. The can be handled like additional costs.

 

You see, there a lot of different possibilities to adapt the engine via the data to your scenarios. In principal we can see, this is quite simple, as long as you only change some values, or delete some constraints in the input data.
As soon as you introduce new objects into the input of the optimizer, these new objects may become part of the solution. Then you have to do the mapping into the objects of your TM system after the optimization,too.

In some cases the required new behavior, cannot be implemented vie the BAdI. You might need to change the behavior of the optimization engine itself. For example, to create somehow different transportation plans or to add a new cost function to evaluate plans. In these cases it’s often not enough to change only the data. We have to adapt the logic and the coding of the optimizer.
If you expect to need such a change inside the optimizer engine, you should contact our expert consulting first. They can give you hints how other users solved similar requirements or if there was a similar enhancement done already. If there is no such mitigation, you have to think about a customer development project. There are experts in our department for customer developments, which are specialized to the optimizer, to find fast and eff

Maintain currency on each rate line items

$
0
0


Normally, the currency is maintained in rate table validity level. All the rates use the same currency.

 

But i find that there is one flag "Scale Rel. for Crcy Maint" in rate table scales. It can achieve that maintain the currency on each rate line items.  So the blog summarize the testing results.


System : TM9.1


1. Maintain the “Scale Rel. for Crcy Maint” flag in one scale.

1.png

2. The currency which in validity level still need to maintained. It would be bringed to rate line items automatically.

 

2.png

3. Then the currency can be maintained in rate table lines.

3.png

4. Testing the rate lines currency in charge. The system gets the rate line currency “CNY”.

4.png

5. The rate lines for same scales can only maintain one currency. Eg: The rate table already has currency “CNY” from “CNSGP” to “BEANR”.Then maintain the other record which is “USD”. The result is that the new record would overwrite the old record.

5.png

6.png

Effective optimization: Different tasks, different optimizers

$
0
0

During the last years SUV’s became very popular in Europe. SUV stands for “Sport Utility Vehicle”. It is a kind of cars. Usually they are large, have a strong motor and look like they could drive off-road. You could get the impression this kind of car is perfect, you can do anything you want. But in reality there are still a lot of other cars. In cities you drive smaller and more agile cars, families often drive vans, because the need more space than SUV’s could offer. And if you really want to drive off-road you need a much more specialized car than a SUV.

With optimization it is somehow similar: If you look on general approaches like Genetic Algorithms or Mixed-Integer-Programming, you may have the impression, that you can solve every problem with such a general approach. And somehow you are right; in general you can do that. But there are the important questions, if you can do it efficiently. For our business it’s the questions, if you find good transportation plans in an acceptable duration with a general all-fits-one-approach.


If you would try to solve all transportation problems with on general optimizer, you would get into large performance problems. There are mainly two reasons:

  • Dependent on the kind of problem the one or other algorithm behaves more efficient.
  • You need to exploit the business  knowledge about different tasks and to integrate it into your solution approach to become efficient

 

In TM we currently use two kinds of general algorithms. One is Mixed-Integer-Programming. Here you map your business problem into a mathematical formulation. In contains continuous, binary and discrete variables and linear constraints. Very efficient solvers exist for this kind of formulations. After such a solver computed the solution, you finally re-map the solution into your business scenario.
One great behavior of Mixed-Inter-Programming is that, it can tell you if it found the optimal solution or not, and if how far you are away (more concrete: how much potential improvement of the objective function may be possible).


Not a strong point for Mixed-Integer-Programming is the optimization of permutations and sequences. For special cases like a pure Traveling-Salesman-Problem(TSP) exist great solutions. But our usual TM planning problems have much more Features than a pure TSP: not one but multiple resources with different capacities, different kinds of time windows, a lot of additional objective functions and much more. If you map all these features into a linear constraints like needed for Mixed-Integer-Programming you end up in a large amount of variables and constraints. A usual VSR scenario would not be solved in appropriate time frame. Because of that we use a Meta-Heuristic  for VSR. “Heuristic” means that we work with more or less simple construction steps to build plans. “Meta” means, that we build a lot of such plans and control where we search for these plans. Therefore we add a logic to enforce that we concentrate on good plans and in parallel try very different plans. For VSR we use as Meta-Heuristic an iterative locale search combined with evolutionary concepts like populations, we call it Evolutionary-local-Search. Some details of it are described in the blog about run-time.

For Load Planning we use a Meta-Heuristic too. Here we use a concept similar to Genetic-Algorithms.

Meta-Heuristics often have two important advantages:

  • Performance: They find the first solution very fast
  • Extensibility: Often the Meta Heuristic works on an object model, which can be enhanced by new features much easier, then linear models of mixed integer approaches.

 

In the are of Meta-Heuristics there are a lot of Genetic approaches, biological concepts like ant-colonization, physical approaches like simulated annealing and much more. Usually we in SAP development look for new optimizers, which approach of a Meta-Heuristic is common and successful in this area. Then we enhance and adapt it to our scenarios.
Much more important than the concrete type of Meta-Heuristic, are the right operators to construct, manipulate and mix solutions and the right mix of these operators. That needs a lot of work, fine-tuning, experience and real-world-data of our customers.

 

We have different planning tasks in Transportation Management. What kind of optimizers do we have?
If you look onto TM, you find optimization in the following optimization modules:

  • Vehicle Scheduling and Routing (TVSR)
    Planning from Freight Units to Freight-Orders and Bookings

 

  • Proposal (TVRG)
    Find alternatives to transport a Freight unit through the network

 

  • Carrier/Service-Provider selection (TSPS)
    Select Carriers for your Freight orders considering cost, allocations and business-shares

 

 

  • Strategic Freight Management (TSFM)
    Combine the right bids of your Carriers for balances plans with low costs

 

 

  • Load Optimization (TVSO)
    Load Pallets into trucks, trailers or containers considering rules like maximal weights or stackabillity.

If and how these services are offered to your TM system, can be checked in the transaction rcc_cust. Here you see the different types of optimization services and how they are connected to different RFC-connection. (If you wonder about the surprising ‘T’s in the acronyms, it is an additional prefix for Services in TM, to avoid clashes with other installations like APO.)

rcc-connections.jpg     
Beside the already mentioned services, there you see two additional entries: The MILP-Entry offers a general Mixed-Integer-Solver. It is not used in standard TM, but can be helpful in customer projects.  The Scheduling Engine has not really to do with optimization: For manual planning you find the connection to the scheduler in this table behind the VSS entry. It is internally re-using functionality of the VSR-optimizer and connected in the same way.

To drill down an additional step you can check the RFC-connection.  There you will find that some of the services use common destinations.  Sometimes different business scenarios are so close togehter, that we use internally the same solution approach, for example Carrier-Selection and Strategic-Freight-Management have an internally the same Mixed-Integer-Formulation.
In other cases the services have different logics, but share such a lot of libraries, that we combine them in one executable, too. For example VSR can also service for the proposal and the manual scheduling.

sm59-tvsr.jpgsm59-tvrg.jpg

 

For a running TM installation you should see the following executables in the connections for the following applications:

 

vsropsvr.exeTVSR, TVRG, TVSS
csopsvr.exeTSPS, TSFM
vsoopsvr.exeTVSO

 

 

It is important not to mix the connections or the executables. This would result in not running applications. Wrong entries in the RFC-connections are one of the most frequent problems, if after an installation or an update one of the applications is not working at all. The transaction rcc_version can help with an overview and has a test for the type integrated in later versions of TM.

 

rcc-version.jpg

That several applications like Carrier Selection and Strategic-Freight-Management point via their RFC-connections to the same executable, has one effect: If you update one, you automatically change both applications. We recommend this behavior, as it avoids you to find the same bug two times. You directly benefit from the corrections and from performance improvements in all applications working on this executable. This is similar to corrections in ABAP-stacks: All calling applications for a function call are effected if you change this function call.


If you – nevertheless - want to change that behavior, you can install the executable in different folders for the different applications. Then you adapt the RFC-Connection to the different destinations. This allows you update complete engines without side-effects to other applications.

Event base charges adventure

$
0
0

In SAP TM 9.1, we can now apply charge types dependent on events. The blog include the function and technical two parts. The function part introduces the process. The technical part would analysis how the function has been achieved in the code.


The “adventure” would be a series to record my research about the new features of TM.

 

Function:

  1. Create an event profile and map charge types to events

1.png

3.png

 

  2.   Assign the event profile to the order type

2.png

 

3.   The forwarding order has two items. Report an event to the one item in the freight order accordingly. The event id and reason code should be the same as the event which assigned in the event profile.

4.png

4.   Calculation charge in forwarding order. The event charge type “DEMMURAGE” would charge in the container which has “DELAYED” event.

5.png

 

Technical:

 

  1. Get the execution information from freight order, then maintain them in the communication structure.

7.png

   2.  When resolve TCCS, compare the charge types in TCCS to the event profile.

8.png

   3.  If the charge type is valid, change the resolution base to “EVENT”. Then apply the charge type by the events.

 

9.png

   4.  In the case we use the “ITEM” calculation level, so the logic would use the events in item to apply charge type. The “<ls_comm_item>-event_assgn” is the communication structure which we maintain before.

 

11.png

   5.  Finally, the logic would adjust the result of resolve by the event's id, reason and status.

12.png

SAP Transportation Management 9.1 Boot Camp

$
0
0

SAP Transportation Management 9.1 Boot Camp – WNATM1

 

Attend this comprehensive 10 day boot camp to learn the processes and configuration of SAP Transportation Management 9.1.  This event will be delivered by TM experts from SAP Germany and will be the only event offered in 2014.

Register today as seats are limited for this special event.

 

Content:

  • SAP TM Overview
  • ERP Logistics Integration
  • Planning Basics & Optimizer Planning
  • Subcontracting
  • Transportation Execution
  • Charge Management & Freight Settlement
  • Advanced Charge Calculation
  • LSP business (Forwarding Order Management & Customer Settlement)

 

When:  November 3-14, 2014

 

Where: Miami, FL

 

Who:  Consultants and Project Team Members

 

To register: Click the link above or dial the following number
1-888-777-1727

SMC³ Integration topics

$
0
0

This is the place where we want to collect all relevant postings and other links for those interested in using SMC³ webservices Rateware XL, Carrier Connect XL and future services in SAP Transportation management.

 

Integration Guides:

  • Integration guide for TM 8.0 integration can be found here
  • Integration guide for TM 8.1 and higher for the integrated service with no proxy generation required can be found here

 

 

Examples

  • An example(!) for the consumer proxy settings to be done in transaction SOAMANAGER can be found here

 

 

Collaterals

 

  • Here is a nice article which helps a lot when you want to create a consumer proxy on the SAP side based on SMC³ wsdl files, specifically the error handling section helped us a lot

Example for an consumer proxy for RatewareXL

$
0
0


Here is an example for an consumer proxy for SMC3 RatewareXL Webservice.

Be carefull, this is only example data and points to the test environment of SMC3, it can not be used for productive usage!

 

 

Capture.PNG

Capture.PNG

Capture.PNG


SAP TM Cookbook for SMC³ Integration

$
0
0

For SAP TM Cookbook for SMC³ Integration click here

Partner Determination Profile In SAP TM.

$
0
0

Partner Determination Profile.

It is used to determine the business partners that you use in different business document types. You can also enable the system to automatically determine business partners for forwarding orders with specific Incoterms. This allows you easily and efficiently enter business partners in a business document.

Customization for Partner determination profile.


  1. Run transaction SPRO and go to following path.

 

partner.jpg

 

Create a new profile

 

partner.jpg.png

 

3.  Assign party Roles

 

partner.jpg

 

Debugging and Code Part.

 

1) /SCMTMS/CL_UIH_CMN_BUPA->_INITIALIZE (/SCMTMS/CL_UIH_CMN_BUPA)

 

partner.jpg

/SCMTMS/CL_UIH_CMN_BUPA->_GET_STDPARTY_DATA


partner.jpg


Deleted the TSP_ID based on DISPL_EMPTY flag which is set to false in initialize method.



partner.jpg


The Partner Profile can be assigned to these Business Documents.


You can use the following Customizing activities to assign the profile to a business document type:


  • Define Forwarding Order Types

 

partner.jpg

 

In FWO UI, You can see these roles in Business Partner Tab.


partner.jpg

  • Define Forwarding Quotation Types
  • Define Forwarding Settlement Document Types
  • Define Freight Order Types
  • Define Freight Booking Types
  • Define Freight Settlement Document Types

Internship in Transportation Management Development in Walldorf

$
0
0

Currently we have an interesting job offer for students: 6 month internship in the TM development in Walldorf, here it is.

Don´t take the required ABAP skills too serious,  generic development experience should be ok.

So far all our interns found a nice place in the TM community...

 

Attached the job description.

Effective Optimization: Incremental planning (TM 9.1)

$
0
0

The VSR optimizer is mainly driven by Freight Units. As long as there are not planned Freight Units it is searching for capacity to transport these Freight Units. As result the optimizer is creating Freight Orders or Bookings to describe how and when the transport is planned.

In this blog I want to explain what’s happening if we do not start with new Freight Units only, but also with an existing plan containing planned Freight Units, Freight Orders and Bookings. The described features are available since SAP Transportation Management 9.1.

For the first step let’s concentrate on usual road scenarios with a lane based planning and routing approach. So let’s imagine that there are already some Freight Units and Freight Orders existing and we call the optimizer with some additional new and unplanned Freight Units.

 

Freeze parts of existing plans

 

In a first step we have to check, if the optimizer is allowed to change the existing Freight Orders. For several reasons, it might happen that the optimizer must keep the Freight Order unchanged. The most recent reasons are:

  • The Freight Order is explicitly fixed by its status.
  • The Freight Order is not completely inside the planning horizon.
  • There are dependencies between fixed and not fixed objects, which enforce the optimizer to fix also dependent object to keep consistency. For example Trailer-Units cannot be changed, if the passive resource is not in the selection. Then the optimizer cannot change the Trailer Unit and indirectly not the coupled Fright Order. For the optimization run the Freight Order is fixed, too.

 

Copying existing plan and improving it

 

If the Freight Order is not fixed, we can change it during the optimization per default. Internally the optimizer always starts with an empty plan to guarantee, that there are no alerts or violated constraints. To benefit from the previous plan it tries to rebuild the existing Freight Orders. I describe it as ”tries” because in some cases the optimizer cannot succeed in rebuilding the plan. For example, if Freight Orders are overloaded or several Freight Orders overlap, then the optimizer engine cannot rebuild such Freight Orders, because internally the solution must be consistent in each and every planning step. So it is not possible to just copy such a Freight Order, if you want to keep a state free of alerts. Therefore the optimizer analyzes the sequence on the different resources and is rebuilding these sequences by adding Freight Unit by Freight Unit as long as it can be planned and it is satisfying all constraints.  If this is not possible for certain Freight Units, they are skipped and the optimizer continues with the other Freight Units.

The result of this step is a plan inside the optimizer which is very similar to the plan before the call of the optimizer. We have still have most of our Freight Orders, we have our new Freight Units, and we have perhaps some Freight Units which we removed from the original plan to get rid of alerts.
Now the optimizer is starting its usual work. It is adding unplanned Freight Units to the plan and changing the plan again and again. As a result after the optimization it might be, that there are Freight Orders which are very similar to Freight Orders before the optimization call and there are other Freight Orders completely different from all Freight Orders in the original call.
All the Freight Orders have one common attribute: they don’t know if they are a result of a previous existing Freight Order or not. There is no link between the input and the result.
Before sending the result back into the TM system the optimizer tries to find some similarities between input and output. Sometimes it can judge, that the Freight Orders are similar enough , so that the new Freight Order should reuse the Id of the old Freight Order. But in most cases, we delete the old Freight Orders and create new ones.

 

This behavior of the engine to generate completely new Freight Orders is very bad for at least two scenarios:

 

  • If you want to publish your Freight orders to Carriers or into Tendering before you have all Freight Units. Planning the new Freight Units with the optimizer would delete the published Freight Order.
  • If you want to add Freight Units to Freight Orders which are already in execution, we must somehow avoid that they are completely fixed and we have to specify, what we can change in such a Freight Order.

 

 

 

Incremental planning

If we want to keep existing Freight Orders, we have to tell it to the optimizer. We must specify which Freight Orders must survive and how they can be changed. We call such a Freight Order Incremental Freight Order. Let’s use the acronym IFOR for these incremental Freight Orders.

We enhanced the optimizer, so that you can specify, which Freight Orders must survive. For these IFORs

 

  • The optimizer keeps the resource (truck or trailer)
  • The optimizer keeps all stops of an IFOR.
  • The optimizer keeps all Freight Units of such an IFOR.
  • You can specify if you can add new stops to IFOR or not.
  • We allow adding new Freight Units to the IFOR. Dependent on a parameter, we control if we can add new locations or if we only add new Freight Units at the existing locations.
  • We reschedule the Freight Order with its potentially new stops and Freight Units to get consistent dates inside the Freight Order but also to other documents, like other stages of the Freight Units or the subsequent Freight Order on the same resource.

 

We decided that we don’t do other changes to an IFOR as we don’t want to destroy any manual decision made before. So we don’t change the resource. We don’t’ change the assignment of a trailer to a truck and we don’t remove Freight Units from an IFOR.  All these actions need an approval by a user and shouldn’t be done automatically by a mass run like the optimizer. If you want to do even this decision by the optimizer in an automatic manner, you still have the possibility to use the usual handling of the Freight Order inside the optimizer.

To the things we don’t want to destroy inside an incremental Freight Order belongs the sequence of the existing stops.  If we add new stops, we can do that at the beginning, between any existing stops, or at the end of the IFOR, whatever has the best result. But we don’t try new sequences of the existing stops. in most cases this stillr esults in very good routes, as the oroginal stops are usually already in a good sequence. But it might be that some Freight unitd cannot be added in the case of thight time windows, which would require a new sequencing.

In Transportation Management you can control the incremental planning by a parameter in the planning profile. You can decide if you want incremental planning and if new stops are allowed or not. This parameter is relevant for all Freight Orders.  Currently you are not able to control each Freight Order separately by some settings.

 

If you want to have more control about the incremental planning you can use the BAdI before the optimization call. Here you can flag each Freight Order separately.  Additionally you have the following possibilities

  • You can define time frames, how much change is allowed in the rescheduling
  • You can define if it is allowed to add stops as first or last stop or only between.
  • You can define which locations are potentially allowed to insert and which ones not.

 

How incremental planning can be controlled is described in the note 1866364 .

Now to the ugly restrictions: Unfortunately the optimizer cannot handle really all Freight Orders as incremental: Inside the engine we handle it like any other Freight Order which is generated by the engine. We apply all the consistency constraints like for any other Freight Order:

  • There must be a resource assigned to the Freight Order
  • If it is a Trailer Unit, there must be one or several Freight Orders with active resources assigned.

 

If such a consistency check is failing, we handle the Freight Order or Trailer Unit as fixed for the optimizer, so it is not changed at all and no Freight Units are added. Above I mentioned the use case of Freight Orders in Execution. Such Freight Orders often have already information from execution, which are not totally consistent to the planning and they often start before the planning horizon. We check such IFORs and select that part of the IFOR, which is inside the horizon and without alerts. For this part we allow incremental planning. The part before is fixed for the optimization run.

 

The following drawing gives the simplified overview, how the engine decides in which way a Freight Order or Trailer Unit is handled inside the engine:

incrementalDecisionTree.jpg

Schedules and Bookings

 

So far I wrote about Freight Orders, which are based on lane information. Now let’s have a look onto bookings and schedules. They have already their complete stop sequence, so the optimizer has no need to add stops. Because of that the behavior is not controlled via the incremental flag in the optimizer settings of the planning profile.


The optimizer does not delete bookings. That means a booking in the input data of the optimizer is always incremental in the sense, that new FU’s can be added. If you don’t select Freight Units already existing on the Booking, they automatically stay on the Booking. If you select them for the optimization run and they are not fixed, the engine is allowed to re-plan them on any other document.

If we have a Freight Order which is based on a schedule in the input data of the engine, there is the possibility that the optimizer can delete it like other Freight Orders. It can be avoided via the fixation of such a Freight Order. For the Freight Units, we have the same behavior like on Bookings.

 

What's next?

 

This blog is a first overview about incremental planning. You see that the incremental planning is working on complete Freight Orders and offers new features for scenarios like planning on IFORs in tendering or execution. Because of that I am interested, which other scenarios you would like to handle with incremental planning and which features would be important for it. For example: Should we search for a resource for IFORs, should we change the sequence of stops inside a IFOR or what else? If we add such additional flexibility, how would you like to control it?

Strategic Freight Procurement

$
0
0

Business Case Scenario:


John is a transportation manager and is responsible for transportation at XYZ Ltd in Europe, a manufacturer of Chemical Products. The manufactured products are shipped regularly to the various dealer locations in US. John has to identify the logistics service providers or carriers with whom he could have a long term contract, to carry out the regular transportation. So he needs to send out a global tender to 6 – 8 carriers for his transportation requirement.

The current process is manual and tedious, with data exchange taking place in the form of MS-Excel from multiple sources starting from collecting the transportation requirement to inviting carriers, collecting responses, comparing and analyzing responses (sometimes which are non-homogeneous) and finally awarding contracts to a few carriers Since transportation costs for a company have a significant impact on the overall profitability of the company, he needs better support and Strategic Freight Procurement is probably what he needs.

 

Business Process:

SFP.jpg

STEP 1:


The process starts out with John analyzing all his historical capacities, costs, trade lanes, carriers he has done business with. All this information can be obtained from the Order History present in SAP BW system.

Here, a lot of what – if analysis, forecasting and simulation can be performed. Now from the forecast values, John is aware of the various logistical parameters that will form input to the Freight Agreement RFQ.

 

Key Benefits:


    1) Lane/Carrier prioritization based on business rules.

    2) Insights into historical spend categories e.g. LTL v/s FTL, MOT which helps in planning future procurement.



STEP 2:


The Freight Agreement RFQ Master can be created using multiple options

  1. From Scratch
  2. From an RFQ template
  3. From an existing expiring Agreement
  4. From Historical Data using Work list

The RFQ document is similar in structure to the Freight Agreement. The header having the most important information like your Response deadline dates,RFQ validity dates etc.

Using the Business Context Viewer side panel, the contextual information regarding the carriers John can invite carriers for his RFQ process. The carrier performance ( KPIs )  at the trade lane level can be configured based on parameters like invoice discrepancy , on time delivery , pick – up etc.

Modelling of John’s bidding requirement can be done using RFQ items where each item can represent different trade lanes, mode of transport, stage types, capacities, priority, charges and rate tables etc.

Now John can publish the RFQ to various carriers. There is also a configurable workflow process for approval here.

 

Key Benefits:


     1) Re-use TM master data,TCM master data and templates and objects thus simplifying the effort of implementation.

     2) Selection of carriers based on their historical performance.

     3) Output Management Integration.

 

STEP 3:

 

The published RFQ goes out to the carriers through multiple ways: email, B2B or the collaboration portal.

In case of an email or collaboration portal the carrier can respond to the RFQ using an excel provided to him.

Upon submission, the responses undergo basic validations and integrity checks before entering the TM system. After the response deadline date John can compare all the responses.

The comparison cockpit is the place where John can compare responses for individual or several RFQ items.

 

                      Compare_resp.jpg                                        

This is called manual comparison which assumes infinite capacity (comparison is only based on rates). Manual comparison can be used when the data set is small and when there are no logistical constraints. The system gives the carrier ranking based on cost. There is also a possibility to have a graphical representation of rates across carriers and view/download rate comparison using an excel.

 

Key Benefits:


   1) Carrier ranking based on Response rates.

   2) Graphical Representation of Data helps in better understanding.


STEP 4:


For bigger data sets (when the number of RFQ items/location pairs and carriers are very large), there would be more logistical constraints (cost, capacity, risk) based on which carrier selection/assignment of target shares needs to be performed.  This can be performed using the automated comparison.

John can choose the carriers’ responses; configure strategies and conditions (Maximum/Minimum target share for incumbent carriers, new carriers). These constraints are taken and the Cost Minimization Carrier Selection Optimizer is invoked. The optimizer proposes the ideal target share for the most optimal solution. He can also evaluate the estimated spend for the target share distribution by calling the charge calculation engine. The estimated solution spend is the approximate cost XYZ Company would incur if John were to create freight agreements with the proposed target shares. There is also a graphical representation of the estimated spend distribution across carriers. John can now create multiple spend simulations or versions by varying the constraints and invoking the optimizer.

He can finally accept the most optimal version as the preferred scenario. Alternatively he can also override the system proposed target share values.

 

This step could be performed per RFQ item or across RFQ items

Optimizer.jpg

Key Benefits


   1) Automated comparison of responses via optimizer improves Value (Cost, Service, and Risk) assessment.

   2) Insights into Projected Spend.


STEP 5:


Award Summary: Prior to creating a freight agreement, the system provides a graphical summary of the capacity and cost distribution across carriers and trade lanes. This helps John to get insights on the capacity and spend distribution on the critical trade lanes/carriers etc.. The summary of the accepted responses for the transportation requirement is graphically represented here in three different views Award by Trade Lane, Carrier and RFQ item.

 

Award summ1.jpg


                                   The above figure depicts a comparison among the budget, estimated spend, historical spend for a given trade lane.


For a given trade lane we can represent an RFQ item and its responses, also what we see here is the estimate spend across carriers.

award summ 2.jpg

 

In the below depiction we can see the target share across carriers for the RFQ item.

award summ 3.jpg.png

 

Key Benefits


   1) Capacity/cost distribution across carriers for a trade lane.

   2) Capacity/cost distribution across trade lanes for a carrier.

   3) Easy insights from graphical data depicting management summary.


STEP 6:


After John reads through the summary, he could decide either to create a freight agreement or to go to the next negotiation round.

agreement creation.jpg.png

 

To create the freight agreement: If the estimated solution spend is within the acceptable range of the shipper and the carriers also have agreed to comply with the terms and conditions. You can accept the preferred strategy, on doing so the confirmed capacities are calculated for the carriers based on the proposed business shares.

 

John can now proceed to the one-click freight agreement creation process. All the data from the carriers’ responses are replicated to the agreement.

 

agreement creation 2.jpg

 

agreement creation 3.jpg

 

The Freight Agreements are created and would be consumed by the Freight Order which is the Execution Document in Transportation Management.

 

Key Benefits:


  1) One-click Agreement Creation / Extension.

  2) Reuse Existing Agreements.


The entire SFP process is a closed loop where both the shipper and the carrier work mutually with one another.

 

The SFM module is available from TM 9.1.

 

Overall Benefits of SFP:


   1) One system with an open interface for all related processes without modification.

   2) Insight to action based on process flow (Historical Data, RFQ Preparation, Spend analysis, Award).

   3) Simple modeling of complex scenarios/packages.

   4) Powerful Simulations/What-If.

   5) Efficient information exchange with carriers/LSP.

 

 

I would be happy to receive feedback and provide any detailed information for any of the steps from 1 to 6.

 

Do check out the podcast session on Strategic Freight Procurement .

 

http://podcast.tm-podcast.com/tmp027-strategic-freight-procurement/

Break-Weight and Clipping Calculation Method Types

$
0
0

Break-Weight and Clipping Calculation Method Types


The calculation methods are used in SAP TM to calculate transportation charges based on specific logic. It helps to calculate charges as standard, Break-Weight or Clipping.


The Calculation methods are defined in TM system in SPRO as.


Transportation Managementunder Basic FunctionsCharge CalculationEnhancements of Charge Calculation EngineDefine Calculation Methods.



auction.png


 

You specify a calculation method for each charge type when defining a calculation sheet. If you do not choose the type of calculation method, the system uses the standard calculation method.

 

 

Break-Weight


The system calculates the transportation charges by comparing and selecting the lower rate from either the actual rate range or the lower end of the next rate range. Break-weight is the weight from which it is cheaper to calculate the rate as opposed to the actual weight of the goods to be transported. One of the scales in the rate must be weight.


Example


You are shipping 490 kg and are using the following break-weights and rates:

Weight Scale

Rate

>= 100 kg

USD 10 per kg

>= 500 kg

USD 8 per kg

>= 1000 kg

USD 6 per kg


Using the standard calculation method, the system calculates the transportation charges as USD 4900 (490 kg * USD 10).


Using the break-weight calculation method, the system checks if it is cheaper to use the rate for the original rate range (USD 10 per kg for >=100 kg) or the next rate range (USD 8 per kg for >=500 kg). Since the next rate range is cheaper, the system considers the 490 kg as being >= 500 kg and calculates the transportation charges as USD 4000 (500 kg * USD 8).

 

 

Clipping


The system calculates the transportation charges by working through all scales level-by-level, even if the value lies outside the scale. The system then totals up the calculation results from each scale level to produce the overall result. For clipping, one scale item must have a relative calculation type.


Example


The scale levels are defined with the following values:

  • Up to 5 tons: USD 50 absolute
  • Up to 7 tons: USD 14 per ton
  • Up to 10 tons: USD 13 per ton
  • Up to 15 tons: USD 12 per ton


Using the clipping calculation method for a load weighing 12 tons, the system calculates the transportation charges as follows:

  • 5 tons at USD 50 = USD 50 (first scale level)
  • 2 tons at USD 14 per ton = USD 28 (up to the second scale level)
  • 3 tons at USD 13 per ton = USD 39 (up to the third scale level)
  • 2 tons at USD 12 per ton = USD 24 (remainder in the fourth scale level)


This results in a charge of USD 141. If you do not use the clipping calculation method, the 12 tons fall into the "up to 15 tons" scale level and the transportation charge is USD 12 per ton, resulting in a charge of USD 144.



SAP TM Collaboration Portal --- Adding Custom Fields on Tendering Quotation Table

$
0
0

SAP TM Collaboration Portal --- Adding Custom Fields on Table


SAP TM collaboration portal for collaboration between you and your business partners.


This document from Jan Rumig provides an overview of which extensions are possible and how to create them.

 

SAP TM Collaboration Portal - Customer Extensions


I have tried the option to provide customer-specific fields for existing functionality.

Capture.PNG

These are steps which can be  followed to achieved this. I have tried with Tendering --- Quotation View


Step 1:--


Add a new field in include <CI_QUOTATION>  for Structure /SCMTMS/S_GW_TEND_QUOTATION.

Capture.PNG


The fields must start with ZZ or YY.

Capture.PNG



Step 2:--  Activate the structure.


Step 3 :--Open the Enhancement Spot /SCMTMS/ES_GW_CUST_ENH.


Capture.PNG


 

Step 4:--  Provide a BAdI implementation for BAdI /SCMTMS/BADI_GW_CUST_ENH which is contained in enhancement spot

/SCMTMS/ES_GW_CUST_ENH. The BAdI has to implement the interface /SCMTMS/IF_GW_CUST_ENH.

 

These are the five methods which we have to implement.

Capture.PNG



Step 5:-  In method /SCMTMS/IF_GW_CUST_ENH~ADD_PROPERTIES


This method is used to add new Properties to gateway entity.


DATA:

       lo_property    TYPE REF TO /iwbep/if_mgw_odata_property,

       lo_entity_type TYPE REF TO /iwbep/if_mgw_odata_entity_typ.


CASE iv_service_name.

       WHEN '/SCMTMS/TENDERING'.


lo_entity_type = io_model->get_entity_type( iv_entity_name = 'Quotation').

              lo_property = lo_entity_type->create_property( iv_property_name = 'ZZCustomerBoolean' iv_abap_fieldname = 'ZZBOOLE' ).

               lo_property->set_type_edm_boolean( ).

               lo_property->set_creatable( abap_false ).

               lo_property->set_updatable( abap_false ).

               lo_property->set_nullable( abap_true ).

               lo_property->set_filterable( abap_false ).

 

               lo_property = lo_entity_type->create_property( iv_property_name = 'YYCustomerText' iv_abap_fieldname = 'YYTEST' ).

               lo_property->set_type_edm_string( ).

               lo_property->set_maxlength( iv_max_length = 20 ).

               lo_property->set_creatable( abap_false ).

               lo_property->set_updatable( abap_false ).

               lo_property->set_nullable( abap_true ).

               lo_property->set_filterable( abap_true ).

     ENDCASE.

 

 

Step 6:-- In method /SCMTMS/IF_GW_CUST_ENH~MAP_DATA_TO_PROPERTIES

 

This method is used to add new data to the added property entities.



DATA:

       lv_boolean TYPE boolean,

       lv_text    TYPE char10.

     FIELD-SYMBOLS:

       <ls_data>    TYPE any,

       <lv_boolean> TYPE boolean,

       <lv_text>    TYPE char20.

 

CASE iv_service_name.

       WHEN '/SCMTMS/TENDERING'.

     LOOP AT ct_result ASSIGNING <ls_data>.

               ASSIGN COMPONENT 'ZZBOOLE'  OF STRUCTURE <ls_data> TO <lv_boolean>.

               ASSIGN COMPONENT 'YYTEST'   OF STRUCTURE <ls_data> TO <lv_text>.

                lv_boolean = abap_true.

              <lv_boolean> = lv_boolean.

               lv_text = sy-tabix.

               CONCATENATE 'TEXT' lv_text INTO <lv_text> SEPARATED BY space.

               CONDENSE <lv_text>.

     ENDLOOP.

ENDCASE.



Step 7:- In the method  /SCMTMS/IF_GW_CUST_ENH~SET_LAST_MODIFIED


Sets the last modified time for gateway service.


rv_last_modified = '20141031120025'.


Step 8: -- Activate the class


Step 9: --- Lunch the portal application.

Capture_1.PNG


IN the end of table once you scroll, you will see these added columns.


Capture.PNG


Best regards,

Rohit


SAP TM Troubleshooting tips

$
0
0

In this blog series, I would like to describe the various troubleshooting/debugging tips while we come across with a known/unknown behavior of the system.

 

During my tenure working in Transportation Management, I got to learn and explore many things both technically and functionally. But from technical side It is quite different experience I have had when compared to my earlier experiences in SAP GUI and Web Dynpro environment. Probably this is because of various new frameworks i.e FPM, FBI and BOPF used in SAP TM. Since TM is evolving rapidly with new concepts and enhanced applications in every release, it is understood that at times consultants would face challenges to understand the system behavior. Therefore consultant has to take the help of technical resource or start himself debug and analyze further.

 

Below are the various concepts and tools that I have followed to resolve the issue or to understand the system behavior.


  1. Message handling & Message Determination.
  2. Finding a ABAP code – easy ways
  3. Performance analysis
  4. Update Debugging
  5. Layer Aware debugging
  6. Use of Application log
  7. Change documents
  8. XML Message processing while integration between TM to SAP and TM to Non-SAP systems
  9. Production System monitoring

 

 

 

Each of the above concept is decribed more detailed and step by step in sub-posts.

 

I hope my troubleshooting tips will help both functional and technical people who are working in SAP TM and any other SCM modules in which these frameworks are reused.

 

There may be a different way or better way of doing it, but I shared my thought and approach.

 

Please feel free to add if any comments.

 

Thanks,

Bharath.K

TM Troubleshooting tip - Message handling & Message Determination

$
0
0

In real time world, we come across with different messages of different types while working on the TM applications. Sometimes they may be expected or unexpected. There may be various reasons why messages are thrown by system. May be Master data / customizing is missing or data incorrectly maintained or coding is wrong.

 

These messages are of different types –

 

Error – Icon Appear in red color in front of the message

Warning – Icon Appear in yellow color in front of the message

Success/Information – Icon Appear in green color in front of the message

 

In this blog we will see various techniques’ to find out the code when such expected/unexpected messages have appeared in the application screen. Therefore it is easier to understand what went wrong after a thorough technical analysis and further corrections can be done in order to fix the problem.

 

Note that we can find out the message class and message number by putting the cursor on top of the message as soon as it is appeared on screen.

 

1.     Using Where used list

 

Whenever we come across with a message, first thing that comes in to mind is doing where used list on the message class and message number. Go to SE91 transaction -> enter the Message class and Message number -> Click on where used list.

 

Sometimes this works and sometimes not. This is because of the various ways of message handling done in the underlying ABAP code. If the ABAP Objects are displayed upon doing the where used list, put a breakpoint at the code where this message is raised and start debugging for further analysis.

 

Where used list works if coding done in the following manner.

  MESSAGE E504(/SCMTMS/UI_MESSAGES) INTO LS_MESSAGE_ERROR-PLAINTEXT WITH MV_ID.

 

At times you will find MESSAGE statement is used but it is not caught when where used list is done. This is because of written MESSAGE statement is for generic purpose. In such cases we may use the Watch-point technique.

 

 

2.     Using Breakpoint technique

 

When where used list approach did not work to find the ABAP code, then we can use the Break-point technique.

 

You can put a dynamic break-point while in debugging mode by clicking on ‘Create breakpoint’ button -> Then Popup is displayed with multiple Tabs. Here we can choose either of the below options.

 

  1. You can put a breakpoint on ABAP
    command – Message
  2. You can put a breakpoint on class - /SCMTMS/CL_COMMON_HELPER
    and method - MSG_HELPER_ADD_SYMSG
  3. You can put a breakpoint on Message by
    entering the Message ID, Message Number and Message Type.

  

 

3.     Using Watch-point technique

 

When where used list approach did not work to find the ABAP code , then we can also use the Watch point technique.

But if you are not aware where to keep a breakpoint to launch debugging, keep a breakpoint in FPM relevant class. Since TM applications are developed using Floor Plan Manager (FPM) as the frontend framework, relevant classes must be executed upon launching the application.

 

Class – CL_FPM_EVENT or any other class which you think gets executed.

Method – CONSTRUCTOR

Please note that, above class and method is executed for every action/event performed in the TM Web applications.

 

Watch-point can be created after debugging is launched.

 

After debugging session is open, start creating a watch-point on SY-MSGID andSY_MSGNO system variables. You can very well place the additional conditions to arrive at the exact place of code.

 

4.     via Class based approach

 

Sometimes it happens that we will not be able to find the exact place of code where messages are raised using both the Break-point and Watchpoint techniques. This is especially when framework (PPF / BOPF level) messages are thrown by system.

 

Then you can put a breakpoint in below class and method to debug and identify how and where messages are coming from.

Class - /SCMTMS/CL_COMMON_HELPER and Method - MSG_HELPER_ADD_SYMSG


Below example code is to display a info message from message class /SCMTMS/UI_MESSAGES and puts it into the BOPF message object EO_MESSAGE.  When you execute this code the issued message will also be shown on the User Interface.

 

       DATA: LV_TEMP TYPE C.

       MESSAGE I008 (/SCMTMS/UI_MESSAGES) INTO LV_TEMP.

 

        CALL METHOD  /SCMTMS/CL_COMMON_HELPER=>MSG_HELPER_ADD_SYMSG

    EXPORTING

      IV_KEY = /SCMTMS/IF_TOR_C=>SC_BO_KEY “INSTANCE KEY

      IV_NODE_KEY = /SCMTMS/IF_TOR_C=>SC_NODE-ROOT “BO KEY

   CHANGING

     CO_MESSAGE = EO_MESSAGE. “CURRENT MESSAGE

 

 

Some other important Message handling related classes are:

 

Class - /BOBF/CL_FRW_FACTORY

Method - GET_MESSAGE

Use: Return a Message Object. This method will return the instance of message class. This method is called for Message handling in BOPF

 

Class - /SCMTMS/CL_MSG_HELPER

Method - MSG_HELPER_ADD_SYMSG

Use - BOBF Message handling helper: Add SY-message. This method is called to add BOPF specific messages

 

Class- CL_FPM_MESSAGE_MANAGER.

Use - Whenever messages are coming in FPM application (SAP TM), if we do not know how they are coming or where they are coming from, then keep a breakpoint in Methods of this class.

 

Additional tips:

/BOFU/IF_FBI_VIEW_EXITINTF_RUN – You will find this interface implemented in all VIEWEXIT classes in TM.

Method ADAPT_MESSAGES: Modify the returned messages from the Modify and DO_ACTION service calls.

 

 

UI: Determining the names of the relevant repository objects

$
0
0

One of the most common problems when dealing with SAP TM UIs is how to determine which is coding that runs behind a certain screen or screen area (here the famous /h from Dynpro is dearly missed).

 

SAP TM UIs are built using Floorplan Manager (FPM), a WebDynpro (WD) based framework. I am not going to explain here in detail what FPM is, how it works and how can it be adjusted to fit customer needs - there is plenty of information (documentation, cookbooks, guides etc.) posted by FPM development team on their SCN space.

 

For the purpose of this text it is enough to mention that an FPM-based screen is made up of one or more UI Building Blocks (UIBBs). In SAP TM we use configurable, generic UIBBs, which are as the name says generically programmed WD components, whose behaviour is controlled by (1) a suitable feeder class and (2) a configuration, persisted as WD Component Configuration (WDCC) object.

 

In SAP TM, we use also a generic feeder engine, called FPM-BOPF Integration (FBI). The generic feeders themselves are controlled by a collection of settings, called FBI Views, saved as well as WDCC objects (this persistence has the advantage that it can be visualised, modified or enhanced using the same techniques as the UIBB configurations).

 

Let's see how we can find our way in this jungle of perhaps confusing objects.

 

Note: The procedure depicted below is valid for NW releases starting with 7.31 (TM 9.0 and later).

 

First step is to start the screen normally and go to the intended screen area. In my example, I am going to the list of stages in the Freight Order UI. Right click anywhere inside the table, then chosse Technical Help... from the contextual menu:

02.png

 

A dialog appears.

03.png

As you can see, if already offers a lot of information:

  • the WD application name
  • the WD application configuration name - a clikable hyperlink that allows us to jump directly in the corresponding editor
  • the application component (relevant for creating support tickets for SAP)
  • the starting component - all TM screens use the OVP (Overview Page) floorplan, therefore you'll always see FPM_OVP_COMPONENT there
  • the floorplan configuration - a clikable hyperlink to the corresponding editor (called FLUID)
  • if existing, the customer-specific customizing of the floorplan (it can be edited in FLUID as well)
  • an indication whether user personalization exists for the floorplan (e.g. rearranged assignment blocks, last visited assignment block). Unlike the other two entries, the hyperlink does not point to an editor, but allows us to navigate to a special WD application, where the personalization of one or more users can be deleted
  • on the right side, you see the component name of the "right-cklicked" screen area. In most TM cases, you'll see there one of the main FPM GUIBBs - the form, the list and the tree, as well as the two composites (composite UIBB and tabbed UIBB) - components that do not have own data, but are used for layouting purposes
  • if the component is a GUIBB, then the dialog contains - similar to the floorplan - the name of the UIBB configuration and customizing (as hyperlink to FLUID) and the indication whetehr user-personalization exists.

 

In this case, the list of stages in a generic UIBB, a list. By clicking on the configuration name, we navigate to the editor.

04.png

By clicking on Feeder Parameters we can see both the feeder class name and the parameters that are passed to the feeder:

04a.png

In this case, we see the generic feeder class from FBI engine, responsible for all List UIBBs, whose behaviour is controlled by a certain FBI View - for the next step I copy its name into clipboard.

 

To display the settings from the FBI view, create a new editor window:

05.png

In the newly appeared window, paste or type the name of FBI View into the field Configuration ID, then click on Continue in Display Mode

06.png

07.png

The FBI View configuration reveals important settings used to control the behaviour of the feeder:

  • the underlying Business Object and Node
  • the DDIC structure for the field catalogue
  • The conversion class used to convert some data from backend representation (e.g. UUID and Timestamp) into the UI representation (like respectively: readable ID and the combination of date, time and timezone)
    • All TM classes inherit from the central class /SCMTMS/CL_UI_CONVERSION and are usually responsible of merely defining the mapping rules (by redefining the method BUILD_MAP_TABLE). The actual conversion is done generically in the superclass.
  • The FBI View Exit class, which is used to fine-tune the results of the generic processing of the FBI feeder (you can see it as the FBI counterpart of the BAdI technique).

TM UI Enhancement: disabling data edit in some parts of a document screen

$
0
0

The authorization check in SAP TM is modeled by default to the document level. If a certain user is authorized to modify a certain document, all data can be modified.

 

Sometimes there are requirements for an even more granular approach. For instance, one set of users is allowed to see and change a certain document in its entirety, some other set of users can see all data from the document, but modify only a part of it, while other set of users is allowed to see only a part of document.

 

There are more possible alternatives to fulfil such requirements. I am concentrating today on the UI-based approaches. Even here, depending on the exact use-case, there are more possibilities.

 

I am presenting today on one specific use case: some users are allowed to see all data from the document (exactly as it’s displayed in UI), but is allowed to change only parts of it. By “part” I mean a complete UI assignment block, like “General Data”, “Business Partners”, or at least a complete UI Building Block (UIBB) - a certain form, a certain list etc. The criteria used to determine whether the users can change the document are static (do not depend on the document itself).

 

The requirement to disable or hide partial data from a UIBB is more complex and needs to be covered differently then presented here.

 

For such a simple use-case, there is also a simple solution. Actually, the hardest part is to identify the required repository objects (WD application, application configuration, UIBB configuration, feeder class) – I assume here that you’re familiarized with Floorplan Manager (FPM) concepts. If not, I recommend you to visit the FPM space on SCN; there is ample documentation, examples and how-to-s posted there.

 

Luckily, someone has already blogged about a simple way to determine the names of the involved repository objects in SAP TM screens (okay, I know that the illeism can sometimes hint to developmental disorder...).

 

Now let’s go back to the solution for our requirement. It’s really simple and involves three steps.

 

Step 1: Locate the method GET_DEFINITION of the affected feeder class (the complete method name includes also the interface name, different for various FPM components – we have one for form, one for list and one for tree). Create (or reuse) an enhancement in this class and add a POST implementation exit to this method. Then add coding like depicted below

01.png

Of course, ZCL_MYCLASS is the class a customer needs to create, and the actual coding of the method IS_UIBB_WRITEPROTECTED depends on the exact definition of “a subset of users”. For the purpose of this enhancement, it suffices to know that the method returns a boolean which indicates whether the given user is forbidden to modify data from the given UIBB from the given application configuration of the given WD application.

If the UIBB must be “write-protected”, we disable the reference field for “read-only” functionality, to simplify setting the property later in step 2.

 

Make sure to create the member attribute in the enhancement class as highlighted in the screenshot.

 

Note: As you can I am using some ABAP language constructs (like inline data declaration) which are available in NW 7.4 only )so TM 9.1 and later). In older releases you'll need to use the compatible alternative, like in this case declaring the reference and field symbol separately.

 

Step 2: Locate the method GET_DATA of the affected feeder class (again, the complete method name includes the interface name). Reuse the enhancement from step 1 and add a PRE implementation exit to the method. In it, add the following coding:

02.png

Not much to explain here, we’re just “remembering” the field and action properties as they are before the standard GET_DATA of feeder class runs. We’ll need it later for performance reasons. Make sure to create the member attribute in the implementation class as highlighted in the screenshot.

 

Step 3: Add now a POST implementation exit to the method. In it, add the following coding:

03.png

I think the coding is pretty straightforward – we are setting all fields of this UIBB to “read only”, and all actions to “disabled”.

 

The indicator whether the UIBB should be write-protected can be reused from Step 1.  Since GET_DEFINITION runs only once in the lifetime of a screen, the reuse helps avoiding potential expensive calls to the check method.

 

The cache created in Step 2 helps us to determine whether or not an actual change occurred compared to the values already known by FPM framework. It’s better to avoid setting the flags *USAGES_CHANGED unnecessarily, since this would lead to an rather expensive re-rendering of the UIBB.

 

---

That’s it. In my example, the coding of method IS_UIBB_WRITEPROTECTED is rather trivial. For my user name, I am write-protecting the list of business partners in the freight order screen.

05.png

As a result, you can see that even if the freight order screen is in "edit" mode, and I can modify data in the list of stages, the business partners are read-only.

04.png

Navigation from SAP TM screens (a.k.a. what is this pesky "Failed to resolve Object Based Navigation target" error?)

$
0
0

Once in a while I receive questions about an error message "Failed to resolve Object Based Navigation target" that appears when when the user clicks on hyperlinks in SAP TM screns.

 

Let's have a look at why this error message appears and how to fix it.

 

First, by TM screens I mean the Web-Dynpro based applications that are delievered in software component SAPTM. In the product "SAP Transportation Management" there are UIs from various other software layers (like master data from SCM Basis), and usually those are built using SAP GUI - and the concepts described below do not apply to them.

 

In such a "TM screen", the source application does not explicitly call an application (it does not even know which). Instead, the source application calls an abstract entity, that corresponds to the navigation to freight unit. This virtual entity is modelled using Enterprise Portal concepts - namely as an "operation" of a "portal business object" (do not confuse it with the BOPF-based business objects that are the foundation of SAP TM). This navigation object, with name SCMTMS_OBN of type /SCMTMS/ON can be visualized in transaction SWO1. However, you won't find in this transaction any information about which application is actually executed when an operation is triggered.

 

So how the system knows where to navigate?

 

The rather counter-intuitive answer is: one of the PFCG roles attached to the user is responsible for it! Each entry in the role menu offers the possibility to attach a reference to an OBN operation (one needs to click on Other Node Details beforehand...)

pfcg.png

Let's summarize:

  • the user clicks e.g. on the forwarding order hyperlink in the freight unit UI
  • the coding corresponding to the freight unit calls the operation FWD_ORDER of the navigation object SCMTMS_OBN
  • the webdynpro runtime inspects the role with which the user loggod on to NWBC (or all of them, if the user did not log on with an explicit role).
  • as soon as a matching entry is found, it is executed; in the example above, the Web Dynpro application /SCMTMS/FWD_ORDER is launched

 

This approach opens the door to role-specific navigation targets. For instance you may have a set of users for which the navigation to the operation FWD_ORDER is resolved to the standard WD dynpro application, and another set of users for which the navigation is resolved to other application (or a separated application configuration), displaying for instance less information than the normal screen.

 

Troubleshooting navigation issues should therefore start with inspecting the roles attached to the user experiencing the problem.

 

Whenever the infamous "Failed to resolve Object Based Navigation target XYZ" message appears, none of the roles attached to the user contain the menu entry with the necessary link to the operation XYZ.

 

A quick way to solve this is to modify the role menu and copy (using button Copy Menus > From SAP Menu > Local) the folder called "OBN-Targets" from any SAP-delivered roles, e.g. from /SCMTMS/TRANSPORTATION_MGR_V2. This folder contains "invisible" entries, which therefore are not displayed in NWBC menu, but contain all necessary OBN assignments required to have the TM navigation working.

 


Viewing all 91 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>