Sub topic 10
Requests, tasks and their contents
A transport request is the container that carries a change from one system to the next. This chapter covers the structure of a request, the role of its tasks, and what a request holds. It also shows how to read that content in the Transport Organizer and in the database.
This chapter assumes you know SAP GUI navigation and transaction codes. It also assumes you know that Customizing and Workbench changes are recorded separately, and that you have read how client settings in SCC4 switch recording on.
Requests and tasks
A request has an owner and a target system. It holds one or more tasks, and each task belongs to one user.
- A request is the unit you release and import. It has a number, a short text, an owner, a type and a target.
- A task is a personal work list inside a request. Each developer or consultant who changes something gets their own task in that request.
When you save the first change, the system asks for a request. If you pick an existing request that someone else owns, the system creates a task for you inside it. If you create a new request, it creates your task automatically.
The number has the form <SID>K<6 digits>. In DEVK900123, DEV is the system ID of the system that created the request. Its first task might be DEVK900124.
Tasks matter because they record who changed what. Objects belong to a task first. When the owner of a task releases it, its objects move into the request. Only after all tasks are released can the request itself be released. Releasing a task does not export anything. Releasing the request does.
Request types
The type is fixed when the request is created. It decides which kind of change the request accepts.
| Type | Table code (`TRFUNCTION`) | Content | Typical use |
|---|---|---|---|
| Workbench request | K | Repository objects such as programs and tables | Development |
| Customizing request | W | Client-dependent configuration entries | IMG changes |
| Transport of copies | T | Copies of objects, made on demand | Moving objects without releasing the original |
| Task (development) | S | Objects changed by one user | Inside a Workbench request |
| Task (Customizing) | Q | Entries changed by one user | Inside a Customizing request |
The type of a Customizing request is why SCC4 matters. If the client allows no automatic recording, no Customizing request is offered and the change is not recorded for transport.
What a request contains
A request holds object entries. Each entry is made of three parts:
- A program ID:
R3TRfor a complete object, orLIMUfor a part of an object, such as one function module within a function group. - An object type, such as
TABUfor table entries,VDATfor view contents,CDATfor view cluster contents, orPROGfor a program. - An object name, such as
T001orV_T001.
Here is the typical content of a Customizing request:
Request: DEVK900123 (Customizing request)
Owner: CONSULTANT1
Task: DEVK900124
R3TR VDAT V_T001 (view contents, maintained via SM30 or the IMG)
R3TR TABU T001 (table entries, selected by key)Customizing differs from Workbench here. A Workbench entry refers to a whole object, and the import replaces it. A TABU or VDAT entry does not carry the entire table. It carries only the keys of the rows you changed, and the import copies those rows from the source system's current data.
The keys are stored separately from the object entry. Each entry has key lines, with the full table key in the field TABKEY. If you changed two company codes, T001 has two key lines, one for each code.
This design has three consequences:
- The import writes the rows as they are at export time, not at the time of your change. If you changed a row twice, only the latest content moves.
- Rows are moved, not deleted. Deleting a row in Customizing is recorded as a key, and the import deletes the row in the target.
- A
VDATentry expands into the underlying table entries. It is a view-level shortcut, so you do not need to know which tables the view covers.
Locks and the one-request rule
An object can sit in only one open request at a time. If a colleague already has T001 entry 1000 in an open task, you cannot record a change to the same entry in another request. The system offers the existing request instead.
For Customizing, the lock applies at the level of the entry key. Two consultants can change different company codes in different requests. They cannot change the same code at once. The lock ends when the request is released.
Reading requests in the Transport Organizer
Use SE09 to see your own requests and tasks, or SE10 for the same view with a selection screen. The Request/Task view shows the hierarchy. Expand a task to see its entries.
The main actions are these:
- Create a request with the type that fits your change. Give it a text that says what business change it covers.
- Move an entry from one request to another with Include object or Change request.
- Merge two requests into one when they belong together. The tasks and entries move to the target request.
- Release a task, then the request.
A released request is read-only. If you forgot an entry, you must put it in a new request. You cannot reopen the old one.
Reading requests from the database
The Transport Organizer stores everything in a few tables. The header is in E070, the entries are in E071, and the key lines are in E071K. The text is in E07T. A task points to its request through the field STRKORR, and the field is empty for a request. The status D means modifiable.
This report lists your open requests with their text:
REPORT zdemo_open_requests.
PARAMETERS p_user TYPE e070-as4user DEFAULT sy-uname.
SELECT h~trkorr, h~trfunction, h~trstatus, t~as4text
FROM e070 AS h
LEFT OUTER JOIN e07t AS t
ON t~trkorr = h~trkorr
AND t~langu = @sy-langu
WHERE h~strkorr = ''
AND h~trstatus = 'D'
AND h~as4user = @p_user
ORDER BY h~trkorr
INTO TABLE @DATA(requests).
LOOP AT requests INTO DATA(req).
WRITE: / req-trkorr, req-trfunction, req-as4text.
ENDLOOP.This second report lists the object entries of one request and of all of its tasks:
REPORT zdemo_request_objects.
PARAMETERS p_req TYPE e070-trkorr OBLIGATORY.
SELECT trkorr, pgmid, object, obj_name
FROM e071
WHERE trkorr IN ( SELECT trkorr FROM e070
WHERE trkorr = @p_req
OR strkorr = @p_req )
ORDER BY trkorr, pgmid, object, obj_name
INTO TABLE @DATA(entries).
LOOP AT entries INTO DATA(entry).
WRITE: / entry-trkorr, entry-pgmid, entry-object, entry-obj_name.
ENDLOOP.Both tables are client-independent. Requests are not tied to a client, so these reports show requests from every client of the system.
What happens at release
When you release a request, the system writes two files into the transport directory, normally /usr/sap/trans. For DEVK900123 they are:
- A cofile named
K900123.DEVincofiles, which holds control information and the log. - A data file named
R900123.DEVindata, which holds the exported objects.
The import later reads both files. The export of Customizing entries reads the current table rows at release time. This explains why late changes to a row, made after you saved but before you released, still go with the request.
Common errors
- Wrong request type. A Workbench request cannot take Customizing entries. Create the request with the right type, or move the entries.
- Entry locked by another request. Find the owner in
SE09and ask for the task to be released, or ask them to move the entry. - Forgotten entries. If a change is missing in the target, look for the entry in a task you did not release into the same request.
- Mixed content. Put one business change into one request. A request with unrelated changes cannot be imported in part.
Exercise
Consultant A and consultant B both change company code 1000 in table T001 on the same day, in the same Customizing request. Where do the entries sit, and can the request be released as soon as A releases their own task?
Show answer
Each consultant has their own task inside the request, and the entry for T001 sits in the task of whoever recorded the change first. The key lock allows only one open task to hold that key, so B's change goes into the same task or request only if the system offers it. The request cannot be released until B's task is released as well. Releasing a task only moves its entries into the request. Releasing the request exports them.