cancel
Showing results for 
Search instead for 
Did you mean: 

mass release of transports

Former Member
0 Kudos

I have a large list of transport requests, i.e. hundreds of them, most of which do not have nothing in common (like user, object etc.)

I need to release them and import to QAS system afterwards. I have no problem with the method of the import, but I am searching a feasible solution how to release/export them from development.

The easiest way would be doing that via UNIX script taking the requests names from text file and release them using tp export command as a first step. However, by the description of the tp export command, SAP help states folowing:

"Only use this command in exceptional cases. The SAP System uses the command expwbo to release requests from CTS transactions."

Does this mean that I should use the "expwbo" option of tp, instead of export one? Is this method safe at all?

Or do you any other ideas how to mass release the transport requests?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Greger,

Do you have any 3rd party tool configured for Transport management in your landscape. (Eg. Transport Express).

If not, then i guess you can try out the UNIX script as you mentioned below.

The below mentioned message from SAP should not be a problem.

Regards,

Hari Kishan

Answers (2)

Answers (2)

Former Member
0 Kudos

Try the below code:

&----


*& Report ZTEST_RELEASE_REQUEST

*&

&----


*&

*&

&----


REPORT ZTEST_RELEASE_REQUEST LINE-SIZE 400.

TABLES: E070,T100.

data: begin of itab OCCURS 0,

request(20),

SEL,

END OF itab.

data: i_tasks like e070 occurs 0 WITH HEADER LINE.

DATA: L_MSTRING(400).

select-OPTIONS: request for e070-trkorr .

start-of-selection.

*perform upload(zTESTI1) tables itab USING 'E070'.

LOOP AT REQUEST.

SHIFT REQUEST-LOW LEFT DELETING LEADING ''.

SHIFT REQUEST-LOW LEFT DELETING LEADING '0'.

TRANSLATE REQUEST-LOW TO UPPER CASE.

SELECT SINGLE * FROM E070 WHERE TRKORR = REQUEST-LOW AND STRKORR = ''.

CHECK SY-SUBRC = 0.

ITAB-REQUEST = REQUEST-LOW.

ITAB-SEL = 'X'.

APPEND ITAB.

ENDLOOP.

DELETE ITAB WHERE SEL = ''.

CHECK ITAB[] IS NOT INITIAL.

SELECT * FROM E070

INTO TABLE I_TASKS

FOR ALL ENTRIES IN ITAB

WHERE STRKORR = ITAB-REQUEST.

LOOP AT ITAB.

LOOP AT I_TASKS WHERE STRKORR = ITAB-REQUEST.

PERFORM REQUEST_RELEASE USING I_TASKS-TRKORR

SY-SUBRC

SY-MSGID

SY-MSGTY

SY-MSGNO

SY-MSGV1

SY-MSGV2

SY-MSGV3

SY-MSGV4.

select single * from t100 into t100 where sprsl = SY-LANGU

and arbgb = SY-msgid

and msgnr = SY-msgnO.

if sy-subrc = 0.

l_mstring = t100-text.

if l_mstring cs '&1'.

replace '&1' with SY-msgv1 into l_mstring.

replace '&2' with SY-msgv2 into l_mstring.

replace '&3' with SY-msgv3 into l_mstring.

replace '&4' with SY-msgv4 into l_mstring.

else.

replace '&' with SY-msgv1 into l_mstring.

replace '&' with SY-msgv2 into l_mstring.

replace '&' with SY-msgv3 into l_mstring.

replace '&' with SY-msgv4 into l_mstring.

endif.

condense l_mstring.

WRITE: / L_MSTRING.

ELSE.

WRITE:/ SY-MSGID , ' ',

SY-MSGTY , ' ',

SY-MSGNO , ' ',

SY-MSGV1 , ' ',

SY-MSGV2 , ' ',

SY-MSGV3 , ' ',

SY-MSGV4.

ENDIF.

ENDLOOP.

PERFORM REQUEST_RELEASE USING ITAB-REQUEST

SY-SUBRC

SY-MSGID

SY-MSGTY

SY-MSGNO

SY-MSGV1

SY-MSGV2

SY-MSGV3

SY-MSGV4.

select single * from t100 into t100 where sprsl = SY-LANGU

and arbgb = SY-msgid

and msgnr = SY-msgnO.

if sy-subrc = 0.

l_mstring = t100-text.

if l_mstring cs '&1'.

replace '&1' with SY-msgv1 into l_mstring.

replace '&2' with SY-msgv2 into l_mstring.

replace '&3' with SY-msgv3 into l_mstring.

replace '&4' with SY-msgv4 into l_mstring.

else.

replace '&' with SY-msgv1 into l_mstring.

replace '&' with SY-msgv2 into l_mstring.

replace '&' with SY-msgv3 into l_mstring.

replace '&' with SY-msgv4 into l_mstring.

endif.

condense l_mstring.

WRITE: / L_MSTRING.

ELSE.

WRITE:/ SY-MSGID , ' ',

SY-MSGTY , ' ',

SY-MSGNO , ' ',

SY-MSGV1 , ' ',

SY-MSGV2 , ' ',

SY-MSGV3 , ' ',

SY-MSGV4.

ENDIF.

SKIP 1.

ENDLOOP.

&----


*& Form REQUEST_RELEASE

&----


  • text

----


  • -->P_ITAB_REQUEST text

  • -->P_SY_SUBRC text

  • -->P_SY_MSGID text

  • -->P_SY_MSGTY text

  • -->P_SY_MSGNO text

  • -->P_SY_MSGV1 text

  • -->P_SY_MSGV2 text

  • -->P_SY_MSGV3 text

  • -->P_SY_MSGV4 text

----


form REQUEST_RELEASE using request

sy_subrc

sy_msgid

sy_msgty

sy_msgno

sy_msgv1

sy_msgv2

sy_msgv3

sy_msgv4.

CALL FUNCTION 'TRINT_RELEASE_REQUEST'

EXPORTING

iv_trkorr = REQUEST

IV_DIALOG = ''

  • IV_AS_BACKGROUND_JOB = ' '

  • IV_SUCCESS_MESSAGE = 'X'

  • IV_WITHOUT_OBJECTS_CHECK = ' '

  • IV_CALLED_BY_PERFORCE = ' '

  • IV_WITHOUT_DOCU = ' '

  • IV_WITHOUT_LOCKING = ' '

  • IV_DISPLAY_EXPORT_LOG = 'X'

  • IMPORTING

  • ES_REQUEST =

  • ET_DELETED_TASKS =

  • ET_MESSAGES =

EXCEPTIONS

CTS_INITIALIZATION_FAILURE = 1

ENQUEUE_FAILED = 2

NO_AUTHORIZATION = 3

INVALID_REQUEST = 4

REQUEST_ALREADY_RELEASED = 5

REPEAT_TOO_EARLY = 6

OBJECT_LOCK_ERROR = 7

OBJECT_CHECK_ERROR = 8

DOCU_MISSING = 9

DB_ACCESS_ERROR = 10

ACTION_ABORTED_BY_USER = 11

EXPORT_FAILED = 12

EXECUTE_OBJECTS_CHECK = 13

RELEASE_IN_BG_MODE = 14

RELEASE_IN_BG_MODE_W_OBJCHK = 15

ERROR_IN_EXPORT_METHODS = 16

OBJECT_LANG_ERROR = 17

OTHERS = 18

.

IF SY-SUBRC NE 0.

ENDIF.

endform. " REQUEST_RELEASE

Edited by: AMIT SHARMA on Dec 13, 2011 8:06 AM

antonio_nunes1
Participant
0 Kudos

Use program:

&----


*& Report ZTSTAN001

*&

&----


*& Mass release of tasks/transport orders

*&

&----


REPORT ZTSTAN001.

tables e070.

select-options strkorr for E070-TRKORR.

data: wakorr like e070-trkorr,

tabkorr like standard table of wakorr.

select trkorr from e070 into table tabkorr where trkorr in strkorr.

loop at tabkorr into wakorr.

CALL FUNCTION 'TR_RELEASE_REQUEST'

EXPORTING

IV_TRKORR = wakorr

IV_DIALOG = ' '

IV_AS_BACKGROUND_JOB = ' '

IV_SUCCESS_MESSAGE = ' '

IV_DISPLAY_EXPORT_LOG = ' '

EXCEPTIONS

CTS_INITIALIZATION_FAILURE = 1

ENQUEUE_FAILED = 2

NO_AUTHORIZATION = 3

INVALID_REQUEST = 4

REQUEST_ALREADY_RELEASED = 5

REPEAT_TOO_EARLY = 6

ERROR_IN_EXPORT_METHODS = 7

OBJECT_CHECK_ERROR = 8

DOCU_MISSING = 9

DB_ACCESS_ERROR = 10

ACTION_ABORTED_BY_USER = 11

EXPORT_FAILED = 12

OTHERS = 13.

endloop.

tomas_black
Employee
Employee
0 Kudos

Hello Greg and Antonio,

this Z report will likely do what Greg needs, just please be informed that function module TR_RELEASE_REQUEST is only released internally and SAP Support does not support direct calls of this FM via custom code.

So any problems you might face, you'll have to fix it by your own.

Best regards,

Tomas Black