Sub topic 13
When transports go wrong
This chapter assumes you can navigate SAP GUI, know the difference between Customizing and Workbench requests, and have released and imported at least one request with STMS. It covers how to read a failed import, the errors you will meet most often, and how to fix each one without making the landscape worse.
Start with the return code
Every import runs through tp, the transport control program. tp finishes with a return code that tells you how serious the outcome was. Check it before you read any log.
| Return code | Meaning | What to do |
|---|---|---|
| 0 | Import finished without messages | Nothing. Spot-check the result. |
| 4 | Finished with warnings | Read the warnings. Many are harmless, such as a table that was already active. |
| 6 | Finished with warnings that need attention | Treat as a warning with a follow-up. Common cause: objects that were skipped. |
| 8 | Finished with errors | Some objects were not imported correctly. Investigate before importing anything else. |
| 12 | A step failed | Usually a technical cause: a missing object, a failed activation, or a file problem. |
| 16 | `tp` itself failed | Check the transport directory, the profile and the operating system user. |
Return codes of 0 and 4 normally leave the request marked as imported. For codes of 8 or higher, read the logs first. Do not simply import the request again.
Where to read the evidence
In STMS, open the import queue of the target system, select the request and choose the logs. The same information is available in SE01 or SE09 (Transport Organizer) for the request, and in SLG1 or ST22 if a dump occurred.
- Open the action log. It lists each import step and its return code, so you can see which step failed.
- Open the import log. It lists each object and the message for it.
- Find the first error, not the last. Later errors often follow from it.
- Look at the step name. A failure in the main import step points to the data. A failure in the activation or generation step points to a dependent object.
Operating system files exist too. The transport directory (/usr/sap/trans) holds log, data and cofiles subdirectories. A request is made of a data file (R......) and a cofile (K......). If either is missing or damaged, the import cannot run.
# Inspect the files that make up request DEVK900123 in the transport directory
ls -l /usr/sap/trans/data/R900123.DEV /usr/sap/trans/cofiles/K900123.DEVHere the file names follow the pattern R plus the request number digits, then the source system ID. If the listing reports "No such file", the request was never exported or the file was removed.
Missing objects and wrong import order
The most frequent Customizing problem is an import that succeeds technically but leaves the system in an inconsistent state. This happens when requests arrive in the wrong order.
Suppose request A creates a new plant, and request B contains settings that refer to that plant. If B is imported first, the table entries are written, but the plant they refer to does not exist. Nothing fails at the database level, because Customizing tables rarely enforce foreign keys that strictly. The error surfaces later, when a user tries a posting and gets a message that the plant is not defined.
Typical symptoms:
- A message such as "Plant XYZ is not defined" in a test that worked in development.
- A configuration step that works in the development system and does nothing in quality.
- A request that imports with return code 0, but a business process fails.
To diagnose, compare the same table in both systems. Use SE16 or SM30 in each system and look for the missing key. For a whole set of tables, the Customizing comparison tool (SCMP, or SCU0 for cross-system comparison) reports differences between two systems.
The fix is to import the missing request, then re-import the dependent one if it was overwritten or skipped. Importing requests in release order prevents most of these cases. The import queue is sorted by release time for this reason.
Overwritten settings
Transports overwrite. When a Customizing request contains a table entry, the import replaces the entry with the same key in the target client. It does not merge.
This produces two common surprises:
- A consultant changes a setting directly in the quality system to test something. The next import from development replaces it. The direct change is lost with no warning.
- Two consultants change the same table in development, each in a different request. The request imported last wins.
A request can also contain a whole view or table with R3TR VDAT or R3TR TABU entries. If the entry is selected by a wide key range, the import can delete or replace more rows than the consultant meant to move.
Client and transport target problems
Customizing is client-dependent, so the import target must name the right client. If a request lands in the wrong client, the settings are in the system but invisible to users who log on elsewhere.
Check these points:
- The request's target in the Transport Organizer names the correct system and client.
- The import in STMS was started for the intended client. The
tp importform contains it:client100in the command above sets the target client. - Change recording is active in the source client, according to
SCC4. If recording is off, changes are never written to a request, so there is nothing to transport. - The target client allows the import. A production client set to "no changes allowed" still accepts transports, but a client that is locked for imports does not.
A related case is a cross-client change inside a Customizing request. If the source client's SCC4 settings permit cross-client changes, a consultant may alter a cross-client table and the change is recorded in a Workbench request instead. That request must be released and imported separately, or the target system will lack the change.
Locked objects and open tasks
You cannot release a request while a task is still open. Each user's task must be released first, then the request itself. If a colleague is on leave and holds an unreleased task, someone with the right authorization can release it for them, or the objects can be moved to another request.
An object can also be locked in another open request. SAP allows an object to be in only one open request of the same type at a time. Trying to record the same entry again produces a message that names the request holding the lock. Release that request first, or ask its owner to do so.
Failed activation and generation
Some imports write the data correctly but fail in the step that follows. Table structure changes, data elements and views must be activated after import. If a dependent object is missing, activation fails and the return code is 8 or 12.
Common causes:
- The request moved a view without the table underneath it.
- A data element was changed in a Workbench request that has not yet reached the target.
- A transport of copies was imported and left the system in a state the original request does not expect.
The remedy is to find the missing dependency in the log, import the request that holds it, and then run the activation again. Do this with SE14 (database utility) for tables, or by repeating the import with the activation option when the source error is gone.
What not to do
- Do not delete a request from the import queue to make the error disappear. The next request in the queue may depend on it.
- Do not use the "ignore" options for transport steps unless you know which check you are skipping. They exist for specific cases and hide errors.
- Do not re-import a failed request repeatedly. Each try can overwrite more data, and the logs of the first failure are lost.
- Do not change objects directly in a production client to repair a transport. Fix it in development and transport the fix, so that all systems stay in step.
A short troubleshooting path
Exercise
A request imported into quality with return code 0. A tester reports that a posting fails with "Plant 1200 is not defined", although it works in development. The plant was created in a separate request that is still waiting in the import queue. What is the most likely cause, how do you confirm it, and what do you do?
Show answer
The requests were imported in the wrong order, so settings that refer to plant 1200 arrived before the plant itself. Confirm it by checking the plant table (for example T001W) in both systems with SE16 and noting that the key is missing in quality, then look in the import queue for the request that creates it. Import that request, then re-import the dependent request if its entries were skipped or overwritten. Going forward, import in release order.
Exercise
An import ends with return code 8 and the action log shows the failure in the activation step. Why is deleting the request from the queue a bad response, and what should you do instead?
Show answer
Later requests in the queue may depend on the objects in this one, so deleting it creates gaps and hides the evidence. Read the import log to find the first error, identify the missing dependency (for example a table under a view), import the request that holds it, and run the activation again.