SAP TR_INSERT_NEW_COMM Function Module for Create new request/new task
TR_INSERT_NEW_COMM is a standard tr insert new comm SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create new request/new task processing and below is the pattern details for this FM, 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 insert new comm FM, simply by entering the name TR_INSERT_NEW_COMM into the relevant SAP transaction such as SE37 or SE38.
Function Group: STRD
Program Name: SAPLSTRD
Main Program: SAPLSTRD
Appliation area: S
Release date: 06-Jul-2000
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TR_INSERT_NEW_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_INSERT_NEW_COMM'"Create new request/new task.
EXPORTING
WI_KURZTEXT = "Short text for task/request
* IV_TARLAYER = ' ' "Target transport layer of the request (type E only)
* WI_PROTECT = ' ' "Request is created with protection
* IV_SIMULATION = ' ' "X - in simulation mode (no update)
WI_TRFUNCTION = "Request type ('K', 'T', 'C',...)
* WI_STRKORR = ' ' "Corresponding request (for tasks only)
* WI_CATEGORY = ' ' "Request category ('CUST', 'SYST')
* IV_TARSYSTEM = ' ' "Target system for request
* WI_CLIENT = ' ' "Export client of request/task
* WI_TARGET_CLIENT = ' ' "Do not use
* IV_TARDEVCL = ' ' "Target package of the request (type O only)
* IV_DEVCLASS = ' ' "Package (type E only)
IMPORTING
WE_TRKORR = "Task number/request number
WE_E070 = "Output string for E070
WE_E07T = "Output string for E07T
WE_E070C = "Output string for E070C
ES_E070M = "Output string for E070M
EXCEPTIONS
CLIENT_RANGE_FULL = 1 SAP_RANGE_FULL = 10 UNALLOWED_TRFUNCTION = 11 UNALLOWED_USER = 12 ORDER_NOT_FOUND = 13 INVALID_TARGETSYSTEM = 14 INVALID_TARGET_DEVCLASS = 15 INVALID_DEVCLASS = 16 INVALID_TARGET_LAYER = 17 INVALID_STATUS = 18 NOT_AN_ORDER = 19 E070L_INSERT_ERROR = 2 ORDER_LOCK_FAILED = 20 NO_AUTHORIZATION = 21 WRONG_CLIENT = 22 FILE_ACCESS_ERROR = 23 WRONG_CATEGORY = 24 INTERNAL_ERROR = 25 E070L_UPDATE_ERROR = 3 E070_INSERT_ERROR = 4 E07T_INSERT_ERROR = 5 E070C_INSERT_ERROR = 6 E070M_INSERT_ERROR = 7 NO_SYSTEMNAME = 8 NO_SYSTEMTYPE = 9
IMPORTING Parameters details for TR_INSERT_NEW_COMM
WI_KURZTEXT - Short text for task/request
Data type: E07T-AS4TEXTOptional: No
Call by Reference: No ( called with pass by value option)
IV_TARLAYER - Target transport layer of the request (type E only)
Data type: E070M-TARLAYERDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WI_PROTECT - Request is created with protection
Data type: TRPARI-S_LOCKFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_SIMULATION - X - in simulation mode (no update)
Data type: TRPARI-W_SIMULATDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WI_TRFUNCTION - Request type ('K', 'T', 'C',...)
Data type: E070-TRFUNCTIONOptional: No
Call by Reference: No ( called with pass by value option)
WI_STRKORR - Corresponding request (for tasks only)
Data type: E070-STRKORRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WI_CATEGORY - Request category ('CUST', 'SYST')
Data type: E070-KORRDEVDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_TARSYSTEM - Target system for request
Data type: E070-TARSYSTEMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WI_CLIENT - Export client of request/task
Data type: E070C-CLIENTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WI_TARGET_CLIENT - Do not use
Data type: E070C-TARCLIENTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_TARDEVCL - Target package of the request (type O only)
Data type: E070M-TARDEVCLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_DEVCLASS - Package (type E only)
Data type: E070M-DEVCLASSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TR_INSERT_NEW_COMM
WE_TRKORR - Task number/request number
Data type: E070-TRKORROptional: No
Call by Reference: No ( called with pass by value option)
WE_E070 - Output string for E070
Data type: E070Optional: No
Call by Reference: No ( called with pass by value option)
WE_E07T - Output string for E07T
Data type: E07TOptional: No
Call by Reference: No ( called with pass by value option)
WE_E070C - Output string for E070C
Data type: E070COptional: No
Call by Reference: No ( called with pass by value option)
ES_E070M - Output string for E070M
Data type: E070MOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CLIENT_RANGE_FULL - Customer request number range full (sysK999999)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SAP_RANGE_FULL - SAP request number range full (sysK899999)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNALLOWED_TRFUNCTION - Unknown request type/task type (-> iRDDKORRI)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNALLOWED_USER - Invalid user name (contains '*')
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ORDER_NOT_FOUND - Request/task does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_TARGETSYSTEM - Invalid target system
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_TARGET_DEVCLASS - Invalid target package
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_DEVCLASS - Invalid package
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_TARGET_LAYER - Invalid target transport layer
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_STATUS - Request/task not in status 'DOCU'
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_AN_ORDER - Input parameter request is not a request
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E070L_INSERT_ERROR - Database error when inserting a new request/task
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ORDER_LOCK_FAILED - Lock on request rejected
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORIZATION - No authorization to execute function
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_CLIENT - Different clients (object request/task)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FILE_ACCESS_ERROR - Error when accessing file
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_CATEGORY - Different category (object request/task)
Data type:Optional: No
Call by Reference: Yes
INTERNAL_ERROR - Internal error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E070L_UPDATE_ERROR - Database error when inserting a new request/task
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E070_INSERT_ERROR - Database error when inserting a new request/task
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E07T_INSERT_ERROR - Database error when inserting a new request/task
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E070C_INSERT_ERROR - Database error when inserting a new request/task
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E070M_INSERT_ERROR - Database error when inserting a new request/task
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SYSTEMNAME - System name cannot be determined or invalid length
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SYSTEMTYPE - System type cannot be determined
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TR_INSERT_NEW_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_we_trkorr | TYPE E070-TRKORR, " | |||
| lv_wi_kurztext | TYPE E07T-AS4TEXT, " | |||
| lv_client_range_full | TYPE E07T, " | |||
| lv_iv_tarlayer | TYPE E070M-TARLAYER, " SPACE | |||
| lv_sap_range_full | TYPE E070M, " | |||
| lv_wi_protect | TYPE TRPARI-S_LOCKFLAG, " SPACE | |||
| lv_unallowed_trfunction | TYPE TRPARI, " | |||
| lv_iv_simulation | TYPE TRPARI-W_SIMULAT, " SPACE | |||
| lv_unallowed_user | TYPE TRPARI, " | |||
| lv_order_not_found | TYPE TRPARI, " | |||
| lv_invalid_targetsystem | TYPE TRPARI, " | |||
| lv_invalid_target_devclass | TYPE TRPARI, " | |||
| lv_invalid_devclass | TYPE TRPARI, " | |||
| lv_invalid_target_layer | TYPE TRPARI, " | |||
| lv_invalid_status | TYPE TRPARI, " | |||
| lv_not_an_order | TYPE TRPARI, " | |||
| lv_we_e070 | TYPE E070, " | |||
| lv_wi_trfunction | TYPE E070-TRFUNCTION, " | |||
| lv_e070l_insert_error | TYPE E070, " | |||
| lv_order_lock_failed | TYPE E070, " | |||
| lv_no_authorization | TYPE E070, " | |||
| lv_wrong_client | TYPE E070, " | |||
| lv_file_access_error | TYPE E070, " | |||
| lv_wrong_category | TYPE E070, " | |||
| lv_internal_error | TYPE E070, " | |||
| lv_we_e07t | TYPE E07T, " | |||
| lv_wi_strkorr | TYPE E070-STRKORR, " SPACE | |||
| lv_e070l_update_error | TYPE E070, " | |||
| lv_we_e070c | TYPE E070C, " | |||
| lv_wi_category | TYPE E070-KORRDEV, " SPACE | |||
| lv_e070_insert_error | TYPE E070, " | |||
| lv_es_e070m | TYPE E070M, " | |||
| lv_iv_tarsystem | TYPE E070-TARSYSTEM, " SPACE | |||
| lv_e07t_insert_error | TYPE E070, " | |||
| lv_wi_client | TYPE E070C-CLIENT, " SPACE | |||
| lv_e070c_insert_error | TYPE E070C, " | |||
| lv_wi_target_client | TYPE E070C-TARCLIENT, " SPACE | |||
| lv_e070m_insert_error | TYPE E070C, " | |||
| lv_iv_tardevcl | TYPE E070M-TARDEVCL, " SPACE | |||
| lv_no_systemname | TYPE E070M, " | |||
| lv_iv_devclass | TYPE E070M-DEVCLASS, " SPACE | |||
| lv_no_systemtype | TYPE E070M. " |
|   CALL FUNCTION 'TR_INSERT_NEW_COMM' "Create new request/new task |
| EXPORTING | ||
| WI_KURZTEXT | = lv_wi_kurztext | |
| IV_TARLAYER | = lv_iv_tarlayer | |
| WI_PROTECT | = lv_wi_protect | |
| IV_SIMULATION | = lv_iv_simulation | |
| WI_TRFUNCTION | = lv_wi_trfunction | |
| WI_STRKORR | = lv_wi_strkorr | |
| WI_CATEGORY | = lv_wi_category | |
| IV_TARSYSTEM | = lv_iv_tarsystem | |
| WI_CLIENT | = lv_wi_client | |
| WI_TARGET_CLIENT | = lv_wi_target_client | |
| IV_TARDEVCL | = lv_iv_tardevcl | |
| IV_DEVCLASS | = lv_iv_devclass | |
| IMPORTING | ||
| WE_TRKORR | = lv_we_trkorr | |
| WE_E070 | = lv_we_e070 | |
| WE_E07T | = lv_we_e07t | |
| WE_E070C | = lv_we_e070c | |
| ES_E070M | = lv_es_e070m | |
| EXCEPTIONS | ||
| CLIENT_RANGE_FULL = 1 | ||
| SAP_RANGE_FULL = 10 | ||
| UNALLOWED_TRFUNCTION = 11 | ||
| UNALLOWED_USER = 12 | ||
| ORDER_NOT_FOUND = 13 | ||
| INVALID_TARGETSYSTEM = 14 | ||
| INVALID_TARGET_DEVCLASS = 15 | ||
| INVALID_DEVCLASS = 16 | ||
| INVALID_TARGET_LAYER = 17 | ||
| INVALID_STATUS = 18 | ||
| NOT_AN_ORDER = 19 | ||
| E070L_INSERT_ERROR = 2 | ||
| ORDER_LOCK_FAILED = 20 | ||
| NO_AUTHORIZATION = 21 | ||
| WRONG_CLIENT = 22 | ||
| FILE_ACCESS_ERROR = 23 | ||
| WRONG_CATEGORY = 24 | ||
| INTERNAL_ERROR = 25 | ||
| E070L_UPDATE_ERROR = 3 | ||
| E070_INSERT_ERROR = 4 | ||
| E07T_INSERT_ERROR = 5 | ||
| E070C_INSERT_ERROR = 6 | ||
| E070M_INSERT_ERROR = 7 | ||
| NO_SYSTEMNAME = 8 | ||
| NO_SYSTEMTYPE = 9 | ||
| . " TR_INSERT_NEW_COMM | ||
ABAP code using 7.40 inline data declarations to call FM TR_INSERT_NEW_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.| "SELECT single TRKORR FROM E070 INTO @DATA(ld_we_trkorr). | ||||
| "SELECT single AS4TEXT FROM E07T INTO @DATA(ld_wi_kurztext). | ||||
| "SELECT single TARLAYER FROM E070M INTO @DATA(ld_iv_tarlayer). | ||||
| DATA(ld_iv_tarlayer) | = ' '. | |||
| "SELECT single S_LOCKFLAG FROM TRPARI INTO @DATA(ld_wi_protect). | ||||
| DATA(ld_wi_protect) | = ' '. | |||
| "SELECT single W_SIMULAT FROM TRPARI INTO @DATA(ld_iv_simulation). | ||||
| DATA(ld_iv_simulation) | = ' '. | |||
| "SELECT single TRFUNCTION FROM E070 INTO @DATA(ld_wi_trfunction). | ||||
| "SELECT single STRKORR FROM E070 INTO @DATA(ld_wi_strkorr). | ||||
| DATA(ld_wi_strkorr) | = ' '. | |||
| "SELECT single KORRDEV FROM E070 INTO @DATA(ld_wi_category). | ||||
| DATA(ld_wi_category) | = ' '. | |||
| "SELECT single TARSYSTEM FROM E070 INTO @DATA(ld_iv_tarsystem). | ||||
| DATA(ld_iv_tarsystem) | = ' '. | |||
| "SELECT single CLIENT FROM E070C INTO @DATA(ld_wi_client). | ||||
| DATA(ld_wi_client) | = ' '. | |||
| "SELECT single TARCLIENT FROM E070C INTO @DATA(ld_wi_target_client). | ||||
| DATA(ld_wi_target_client) | = ' '. | |||
| "SELECT single TARDEVCL FROM E070M INTO @DATA(ld_iv_tardevcl). | ||||
| DATA(ld_iv_tardevcl) | = ' '. | |||
| "SELECT single DEVCLASS FROM E070M INTO @DATA(ld_iv_devclass). | ||||
| DATA(ld_iv_devclass) | = ' '. | |||
Search for further information about these or an SAP related objects