Tagarchief: transport request

How to transport a locked ABAP object

Sometimes you need to have an ABAP Workbench object transported to another environment, but it is locked with other objects in transport requests that you do not want to release, yet. How could this be solved?

  1.  Release the tasks that contain the object that you want to transport, but do not release the transport request.
  2. Create a new transport request with the object you want to transport to the other environment. This could be done by creating a new transport request with e.g. SE01, but it could also be done from within the editor, editing the object concerning. Make sure any changes you do not want to go with this transport request are set to comment.
  3. Release the newly created task and transport request, and import it into the desired environment / system. Check the log; if any errors come up, go to step 2, and correct the mistakes.
  4. Unrelease the tasks that have been released in step 1. This could be done using SE16(N), or with a ’tool’, like described here below. Pick up your development work; do not forget to uncomment the lines you possibly have set to comment at step 2.

Here is the essential part of the ’tool’. Indentation is not picked up by WordPress, so you have to redo that (at least partially, Pretty Printer will take care of that). And, of course, you have to write the code piece with the parameter that should be transferred to IV_TRKORR.


*&———————————————————————*
*&      Form  UNRELEASE_TASK
*&———————————————————————*
FORM unrelease_task
USING    iv_trkor           TYPE e070trkorr.

DATA:
ls_e070 TYPE e070.

CONSTANTS:
lc_trfunction_cust TYPE e070trfunction VALUE ‘Q’,
lc_trfunction_dev  TYPE e070trfunction VALUE ‘S’,
lc_trfunction_rep  TYPE e070trfunction VALUE ‘R’,
lc_trstatus_mod    TYPE e070trstatus   VALUE ‘D’,
lc_trstatus_rel    TYPE e070trstatus   VALUE ‘R’.

* Processing
* ==========

SELECT SINGLE *
FROM e070
WHERE trkorr EQ @pa_trkor
AND   trfunction EQ @lc_trfunction_cust OR
trfunction EQ @lc_trfunction_rep  OR
trfunction EQ @lc_trfunction_dev )
AND   trstatus EQ @lc_trstatus_rel
INTO @ls_e070.
IF sysubrc NE 0.

WRITE‘Task’(002),
pa_trkor,
‘not found.’(001).

RETURN.
ENDIF.

ls_e070trstatus :lc_trstatus_mod.

UPDATE e070
FROM ls_e070.
IF sysubrc EQ 0.

WRITE‘Task’(002),
pa_trkor,
‘has been reset to Modifiable.’(003).
ELSE.
WRITE‘Task’(002),
pa_trkor,
‘could not be reset to Modifiable.’(004).
ENDIF.

ENDFORM.                    ” UNRELEASE_TASK