SAP TR_DELETE_COMM Function Module for
TR_DELETE_COMM is a standard tr delete comm SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for tr delete comm FM, simply by entering the name TR_DELETE_COMM into the relevant SAP transaction such as SE37 or SE38.
Function Group: STRJ
Program Name: SAPLSTRJ
Main Program: SAPLSTRJ
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TR_DELETE_COMM pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'TR_DELETE_COMM'".
EXPORTING
* WI_DIALOG = 'X' "Interactive processing = 'X'
WI_TRKORR = "Corr. number of corre. request/transfer order
IMPORTING
ET_DELETED_TASKS = "Table of Request Numbers
EXCEPTIONS
FILE_ACCESS_ERROR = 1 TR_ENQUEUE_FAILED = 10 OBJECTS_FREE_BUT_STILL_LOCKS = 11 ORDER_LOCK_FAILED = 12 NO_AUTHORIZATION = 13 WRONG_CLIENT = 14 PROJECT_STILL_REFERENCED = 15 SUCCESSORS_ALREADY_RELEASED = 16 ORDER_ALREADY_RELEASED = 2 ORDER_CONTAINS_C_MEMBER = 3 ORDER_CONTAINS_LOCKED_ENTRIES = 4 ORDER_IS_REFERED = 5 REPAIR_ORDER = 6 USER_NOT_OWNER = 7 DELETE_WAS_CANCELLED = 8 ORDERNUMBER_EMPTY = 9
IMPORTING Parameters details for TR_DELETE_COMM
WI_DIALOG - Interactive processing = 'X'
Data type: TRBOOLEANDefault: 'X'
Optional: No
Call by Reference: No ( called with pass by value option)
WI_TRKORR - Corr. number of corre. request/transfer order
Data type: TRKORROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TR_DELETE_COMM
ET_DELETED_TASKS - Table of Request Numbers
Data type: CTS_TRKORRSOptional: No
Call by Reference: Yes
EXCEPTIONS details
FILE_ACCESS_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TR_ENQUEUE_FAILED - Request couldnot be locked (SM12)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECTS_FREE_BUT_STILL_LOCKS - No object locked, nevertheless TLOCK entries
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ORDER_LOCK_FAILED - SM12 lock on corresp. request rejected
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORIZATION - No authorization to carry out the function
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_CLIENT - Editing in invalid client
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROJECT_STILL_REFERENCED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SUCCESSORS_ALREADY_RELEASED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ORDER_ALREADY_RELEASED - Request/task already released
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ORDER_CONTAINS_C_MEMBER - Request/task contains C-member
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ORDER_CONTAINS_LOCKED_ENTRIES - Request/task contains blocked entries
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ORDER_IS_REFERED - Request is referenced
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
REPAIR_ORDER - Repair task (not deletable)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
USER_NOT_OWNER - Request/task not changeable by owner
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DELETE_WAS_CANCELLED - Deletion by user terminated in popup
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ORDERNUMBER_EMPTY - Request/task number is empty (space)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TR_DELETE_COMM Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_wi_dialog | TYPE TRBOOLEAN, " 'X' | |||
| lv_et_deleted_tasks | TYPE CTS_TRKORRS, " | |||
| lv_file_access_error | TYPE CTS_TRKORRS, " | |||
| lv_tr_enqueue_failed | TYPE CTS_TRKORRS, " | |||
| lv_objects_free_but_still_locks | TYPE CTS_TRKORRS, " | |||
| lv_order_lock_failed | TYPE CTS_TRKORRS, " | |||
| lv_no_authorization | TYPE CTS_TRKORRS, " | |||
| lv_wrong_client | TYPE CTS_TRKORRS, " | |||
| lv_project_still_referenced | TYPE CTS_TRKORRS, " | |||
| lv_successors_already_released | TYPE CTS_TRKORRS, " | |||
| lv_wi_trkorr | TYPE TRKORR, " | |||
| lv_order_already_released | TYPE TRKORR, " | |||
| lv_order_contains_c_member | TYPE TRKORR, " | |||
| lv_order_contains_locked_entries | TYPE TRKORR, " | |||
| lv_order_is_refered | TYPE TRKORR, " | |||
| lv_repair_order | TYPE TRKORR, " | |||
| lv_user_not_owner | TYPE TRKORR, " | |||
| lv_delete_was_cancelled | TYPE TRKORR, " | |||
| lv_ordernumber_empty | TYPE TRKORR. " |
|   CALL FUNCTION 'TR_DELETE_COMM' " |
| EXPORTING | ||
| WI_DIALOG | = lv_wi_dialog | |
| WI_TRKORR | = lv_wi_trkorr | |
| IMPORTING | ||
| ET_DELETED_TASKS | = lv_et_deleted_tasks | |
| EXCEPTIONS | ||
| FILE_ACCESS_ERROR = 1 | ||
| TR_ENQUEUE_FAILED = 10 | ||
| OBJECTS_FREE_BUT_STILL_LOCKS = 11 | ||
| ORDER_LOCK_FAILED = 12 | ||
| NO_AUTHORIZATION = 13 | ||
| WRONG_CLIENT = 14 | ||
| PROJECT_STILL_REFERENCED = 15 | ||
| SUCCESSORS_ALREADY_RELEASED = 16 | ||
| ORDER_ALREADY_RELEASED = 2 | ||
| ORDER_CONTAINS_C_MEMBER = 3 | ||
| ORDER_CONTAINS_LOCKED_ENTRIES = 4 | ||
| ORDER_IS_REFERED = 5 | ||
| REPAIR_ORDER = 6 | ||
| USER_NOT_OWNER = 7 | ||
| DELETE_WAS_CANCELLED = 8 | ||
| ORDERNUMBER_EMPTY = 9 | ||
| . " TR_DELETE_COMM | ||
ABAP code using 7.40 inline data declarations to call FM TR_DELETE_COMM
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| DATA(ld_wi_dialog) | = 'X'. | |||
Search for further information about these or an SAP related objects