Sub topic 12
Releasing a Request and Importing It with STMS
This chapter covers the last part of a configuration change's journey: releasing the request in the source system and importing it into a target system with the Transport Management System (STMS). It assumes you can use SAP GUI and transaction codes. It also assumes you know what a Customizing request is and how a change gets recorded in one, and that you have a rough picture of a three-system landscape (development, quality, production).
Release and import are separate steps
A request does not travel by itself. Two different actions move it, and they happen in different places.
- Release happens in the source system, usually in transaction SE09 or SE10 (Transport Organizer). Releasing exports the request contents from the database into files in the transport directory.
- Import happens in the target system, through STMS or the
tpprogram. Importing reads those files and writes the contents into the target database.
Releasing does not change any other system. Until someone imports, the target system is unaffected.
Releasing a request
A Customizing request contains one or more tasks, one per user who recorded changes. You must release the tasks before you can release the request.
- Open SE09 (or SE10) and display your modifiable requests.
- Expand the request and check the object list of each task. For Customizing you expect entries such as
R3TR VDAT(view contents) orR3TR TABU(table entries). - Release each task first. A task needs to be released by its owner, and an empty task can be deleted instead.
- Release the request itself, typically with the truck icon or the key F9.
Releasing a task copies its objects into the request. Releasing the request writes two files to the transport directory, which is /usr/sap/trans by default:
- A data file in
data/, namedR<number>.<SID>. It holds the actual table entries. - A cofile in
cofile/, namedK<number>.<SID>. It holds control information and, later, the log of each step.
For example, request DEVK900123 produces K900123.DEV and R900123.DEV. The system ID in the file name is the source system, and the number comes from the request name.
On release, the system also adds the request to the import queue of the next system on the transport route. This happens automatically when the route is defined in the transport landscape. If no route exists from the source system, the request is released but nobody can import it anywhere.
The import queue in STMS
Open transaction STMS in the target system and choose Import Overview. Double-click the system to see its import queue.
The queue lists requests in the order they were released, with these useful columns:
| Column | Meaning |
|---|---|
| Request | Request number, such as `DEVK900123` |
| Owner | User who created the request |
| Short text | Description entered at creation |
| Type | Customizing or Workbench request |
| Status icon | Whether the request is waiting, imported with warnings, or imported with errors |
The queue is a list of requests that are ready, not a list of requests that have been imported. After an import, requests stay visible until you remove them or the queue is refreshed. The queue shows the import history through its status icons.
Importing a request
You have two common choices in the queue.
- Import Request (Ctrl+F11) imports a single selected request.
- Import All Requests (Ctrl+F11 on the whole queue, or the "Import all" button) imports everything waiting, in order.
For a single import, STMS asks for several options on the dialog.
- Target client. Customizing changes are client-dependent, so you must say which client receives them. Import into the wrong client and you may overwrite settings that someone else relies on.
- Date. Start immediately, or schedule the import for a later time.
- Execution. Synchronous means STMS waits for the result. Asynchronous (the default for large imports) runs in the background.
- Options. "Leave transport request in queue for later import" keeps the request in the queue after import so it can be imported into another client. "Overwrite originals" and "Overwrite objects in unconfirmed repairs" matter mainly for Workbench objects and rarely apply to pure Customizing.
- Ignore options. These bypass checks, for example ignoring a wrong transport type or a wrong import order. Use them only when you understand the reason, and document it.
The same import can be started from a command line. This is what STMS does for you:
tp import DEVK900123 PRD client100 pf=/usr/sap/trans/bin/TP_DOMAIN_DEV.PFLThe arguments are the request, the target system ID, the target client, and the transport profile. The profile contains the system definitions and routes that tp needs.
What happens during an import
The import is not one step. tp runs a sequence of phases and writes a return code for each into the cofile.
- Test import (
T). Checks that the request can be read and that the target system accepts it. - Import of the data (
I). Writes the entries into the tables. - Post-processing steps. After-import methods run, and generation or activation steps happen where relevant.
For a pure Customizing request, most of the work is writing rows into client-dependent tables, so the target system only changes the client you named.
Return codes
At the end the request shows a return code. Learn these four.
| Return code | Meaning | What to do |
|---|---|---|
| 0 | Successful | Nothing. |
| 4 | Warning | Read the log. Often harmless, such as an object that already had identical contents. |
| 8 | Error | The request imported only partly or failed in a step. Read the log and fix the cause. |
| 12 or higher | Serious error | The import was aborted. Usually a problem with the transport tools, the profile or the files. |
Treat return code 4 as "read the log", not "ignore". A return code 8 on a Customizing request often means that some table entries were not written, so the target system now differs from the source.
Checking the result
After an import, confirm that it worked instead of assuming it.
- In STMS, select the request and open its log. Each step shows its own return code.
- In the target system's Transport Organizer, check the request number and the import time.
- In the application, open the same IMG activity in the target client and compare the settings with the source.
You can also read the client settings table to make sure the target client accepts changes the way you expect. This report reads the SCC4 settings from table T000:
REPORT zdemo_client_settings.
SELECT SINGLE mandt, mtext, cccategory, cccoractiv, ccnocliind
FROM t000
WHERE mandt = @sy-mandt
INTO @DATA(client_settings).
IF sy-subrc = 0.
WRITE: / client_settings-mandt, client_settings-mtext,
/ 'Role:', client_settings-cccategory,
/ 'Change recording:', client_settings-cccoractiv,
/ 'Cross-client changes:', client_settings-ccnocliind.
ENDIF.A production client normally has the role "Production" and does not allow direct changes. That is why imports are the way settings get there.
Order matters
Requests are imported in the order they were released. If request B depends on request A, for example B adds entries for a company code that A created, importing B first fails or gives incomplete results.
- Import all requests in sequence when you can.
- Do not pick a single request from the middle of the queue unless you have checked what it depends on.
- If the import queue contains an older request that was never imported, find out why before you continue.
Common errors
- Wrong client. The request was imported into client 100 but the testing happens in client 200. The change appears to be missing. Check the target client in the import log.
- No route. The request does not appear in the queue of the next system because no route is defined from the source system.
- Queue not refreshed. A request was released a moment ago but is not visible. Refresh the queue, or check that the transport directory is shared between the systems.
- Import authorization. The user lacks the authorization to import into the system or client.
- Cross-client objects in a Customizing request. These change the whole system, not just one client. Review them before you import.
Exercise
A colleague released request DEVK900150 yesterday, but it does not appear in the import queue of the quality system. List two things you would check.
Show answer
First, check whether a transport route exists from the development system to the quality system in the transport landscape, because the request is only added to a queue when a route is defined. Second, check that the transport directory is shared between the systems and that the queue was refreshed, because the files in cofile/ and data/ must be visible to the target system. You could also check that the request was released as a request and not only as a task.
Exercise
An import of a Customizing request ends with return code 8. Why is it a problem to simply start testing, and what is the correct next step?
Show answer
Return code 8 means at least one step failed, so some entries may not have been written and the target client may differ from the source. The next step is to open the request log in STMS, find the step with the error, fix the cause, and then re-import or follow the agreed correction procedure.