This blog is to explain the steps for uploading route determination without weight group via LSMW.
During several rollouts or redefinition of routes we need to upload new route determination in the system. If the amount of records are not that many, best approach is to do it manual. However with a lot of records, we can use the LSMW tool for this activity.
Prerequisites:
- Routes must be available.
- Shipping conditions must be available.
- Transportation groups must be available.
- A basic knowledge of using LSMW tool.
Generic route determination:
In this post, I also load entries with a generic route determination. Refer to notes 386105, 414250, 656444 for this functionality. For the route determination maintenance in the Customizing, it is possible to generate entries for which shipping condition, transportation group, weight group are initial (generic). When entering a generic key, it will take the generic route entered in that key. So you only need to maintain the exceptions with an actual key. This can save a huge amount of records to be loaded.
2 step approach:
The route determination is contained in 2 tables:
- TROIZ (keys for country from/to and departure zone from/to)
- TROLZ (keys for shipping condition, transportation group, weight group (not used in this blog) and actual route)
To make it easy for the LSMW we load the records for each table so we need to have 2 LSMW's.
Note: Before starting, go to transaction 0VRF and change/update one entry in the route determination table so a transport request is created. This transport request is used in the LSMW's.
TROIZ upload
Goto transaction LSMW.
Create new project/subproject/object
Here we create a new load for the route determination load of the TROIZ table.
Maintain Object Attributes
This is the most important step of the LSMW, we create a recording for the TROIZ table. Using a batch input recording.
Next popup needs a transaction code. Enter transaction 0VRF
Next screen appears and press button "New Entries".
Enter one key that does not exist in the route determination table. Else you get error message and have to start over.
Press the SAVE button. The transport request we created before starting comes up.
Confirm and go back with green arrow a couple of times so that the recording screen is shown.
Now double click on the fields ALAND, AZONE, LLAND, LZONE and TRKORR one by one and give the following names. I normally delete the default value and only keep the field name + description. The transport request number do not change.
SAVE the recording and enter the recording name in the previous screen (object attributes).
Then go to menu option source structure. Enter something similar below.
Then enter Maintain Source Fields.
Then enter Maintain Structure Relations.
Then enter Maintain Field Mapping and Conversion Rules.
Note: In the menu --> Extra's --> Auto-fieldmapping will do the mapping more quickly. Else select the fields one by one and pressing button source field to assign the source fields manually.
Then goto Specify Files
You need to create your input file first. In Excel the source looks like this:
I normally save the Excel as a .CSV file (comma separated) for usage in the LSMW.
Note: always check if the keys are the same as in the Excel file. Sometimes the leading zero's get lost in the conversion.
Then goto Specify Files select Legacy Data and double click on that node.
Enter:
- File name on your computer
- Description (any)
- Delimiter as Comma (we use .CSV)
- Field names at start of file checked.
- Field order matches source structure definition checked.
SAVE the entries.
Then goto Assign Files:
Then goto Read Data
Execute this transaction (F8) and you get overview of loaded entries. When it shows read = written it's ok. When not written there is something wrong. You should check your file or mapping when this is the case.
Then goto Convert Data
Press Execute (F8). The transactions read - written should be the same.
Then goto Create Batch Input Session
Screen should show the following, I always select 'keep batch input'.
Execute this transaction (F8)
Then goto Run Batch Input Session
Select the line and press button "Process". Select Background and press button "Process".
This will result that the from/to route determination is loaded in your system. In transaction 0VRF all records are now loaded.
This is the end of the first LSMW load.
TROLZ upload
Please refer to next link for the upload of the TROLZ entries.