Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delete Transport from Queue - ABAP Function Module?

Former Member
0 Likes
1,950

Hi All

I'm using function module TMS_TP_IMPORT in a utility program which work great.

Now I'd also like to add functionality to delete a selected transport from the Queue.

I've looked through function group TMST, but found none.

Do you perhaps know if there is such a function module?

Thank you and best regards,

Adrian Bruwer

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
747

You could try something like

* Check request in queue
CALL FUNCTION 'TMS_MGR_GREP_TRANSPORT_QUEUE'
   EXPORTING
     iv_system                = system
     iv_request               = p_trkorr
   IMPORTING
     ev_counter               = counter
   EXCEPTIONS
     read_config_failed       = 1
     read_import_queue_failed = 2
     OTHERS                   = 3.
* If found
IF sy-subrc EQ 0 AND counter IS NOT INITIAL.
* Remove request from queue
   CALL FUNCTION 'TMS_MGR_MAINTAIN_TR_QUEUE'
     EXPORTING
       iv_command                 = 'DELFROMBUFFER'
       iv_system                  = system
       iv_request                 = p_trkorr
     IMPORTING
       es_exception               = ls_alert
     EXCEPTIONS
       read_config_failed         = 1
       table_of_requests_is_empty = 2
       OTHERS                     = 3.

Regards,

Raymond

3 REPLIES 3
Read only

RaymondGiuseppi
Active Contributor
0 Likes
748

You could try something like

* Check request in queue
CALL FUNCTION 'TMS_MGR_GREP_TRANSPORT_QUEUE'
   EXPORTING
     iv_system                = system
     iv_request               = p_trkorr
   IMPORTING
     ev_counter               = counter
   EXCEPTIONS
     read_config_failed       = 1
     read_import_queue_failed = 2
     OTHERS                   = 3.
* If found
IF sy-subrc EQ 0 AND counter IS NOT INITIAL.
* Remove request from queue
   CALL FUNCTION 'TMS_MGR_MAINTAIN_TR_QUEUE'
     EXPORTING
       iv_command                 = 'DELFROMBUFFER'
       iv_system                  = system
       iv_request                 = p_trkorr
     IMPORTING
       es_exception               = ls_alert
     EXCEPTIONS
       read_config_failed         = 1
       table_of_requests_is_empty = 2
       OTHERS                     = 3.

Regards,

Raymond

Read only

0 Likes
747

Perfect Raymond. Works a lot faster than the transaction in dialog as well. Wow. Thanks for your answer! Adrian

Read only

0 Likes
747

Hi Raymond,

I was trying to execute this FM with following values.

IV_COMMAND            =          DELFROMBUFFER

IV_SYSTEM                 =          System(My system name)

IV_REQUEST              =          TR Number

I am getting the following warning as "Warning: (***K9A0SEF.   ) not found in buffer". Actually this TR is already there in the queue still is. Could anyone help me to understand why this warning is coming and the TR is not deleted?. I am trying to delete the TOC(Transport of Copies) from the queue which has the type T in E070 table. All helps are really appreciated.