Wir wachsen stetig und suchen neue Kollegen (m/w/d)! Schauen Sie sich unsere offenen Position an, um eine passende Herausforderung zu finden!
This function module is used to read and create means of transport entries for transportation lanes within the location hierarchy. For this, TRM entries are generated from templates; both entries that exist in the database and those that were generated at runtime are returned.
The function module is called using the model, a hierarchy assigned to the model, and start and destination location. TRM entries are then read for the start and destinations specified. Suitable entries that exist in the database are selected or TRM entries are generated according to the hierarchy. The TRM entries that come directly from the database or that are generated by the function module are returned in table e_trm_tab. In addition, the start and destination location of the transportation lane and the start and end location of the template in table e_trmparent_tab are returned (that is, the inheritance relationship from template and returned entry).
This function module is currently used mainly by TP/VS to generate means of transport entries for customers within tranportation zones and to create corresponding entries between distribtion centers and customers in a transportation zone.
The hierarchy must be in the model.
Restriction: Only one hierarchy can be used.
Read logic of function module:
For the start and destination locations given in the call, all superoridinate locations are read for the hierarchy specified (using function module /sapapo/modelrelh_get_parent.). The TRM entries for the model specified are them read from the database from the total amount of locations (these entries are stored in table l_trm_tab).
Then, means of transport entries are generated for each combination of the original start and destination location, according to the following logic:
Representation of the sequence in which TRM entries are searched for and selected. The hierarchy assignments are represented by dotted lines.
Location A <---- Location C <---- Location E
Location B <---- Location D <---- Location F
(1),,Location A --> Location B
(2),,Location A --> Location D
(3),,Location A --> Location F
(4),,Location C --> Location B
(5),,Location E --> Location B
(6),,Location C --> Location D
(7),,Location C --> Location F
(8),,Location E --> Location D
(9),,Location E --> Location F
TRM entries are to be read from start location A to destination location B:
Calculation of transportation distances and durations for inherited TRM entries:
For inherited TRM entries, the transportation distance (field DIST) and the transportation duration DURAT) are not adopted directly. Instead, they are adjusted for the new locatiosn. This happens if the distance or duration is not fixed. For example, a means of transport entry is searched for between start location A and destination location B and a TRM entry is found as a template between locations C and D. The duration and distance generated for entries A and B from the entries for C and D are calculated from the maintained value of the template and the relationship of the (estimated) geographic distance.