SAP TR_INSERT_REQUEST_WITH_TASKS Function Module for









TR_INSERT_REQUEST_WITH_TASKS is a standard tr insert request with tasks 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 insert request with tasks FM, simply by entering the name TR_INSERT_REQUEST_WITH_TASKS into the relevant SAP transaction such as SE37 or SE38.

Function Group: STR8
Program Name: SAPLSTR8
Main Program: SAPLSTR8
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TR_INSERT_REQUEST_WITH_TASKS 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_REQUEST_WITH_TASKS'"
EXPORTING
IV_TYPE = "
IV_TEXT = "
* IV_OWNER = SY-UNAME "
* IV_TARGET = "
* IT_ATTRIBUTES = "
* IT_USERS = "
* IV_TARDEVCL = "
* IV_DEVCLASS = "
* IV_TARLAYER = "

IMPORTING
ES_REQUEST_HEADER = "
ET_TASK_HEADERS = "

EXCEPTIONS
INSERT_FAILED = 1 ENQUEUE_FAILED = 2
.



IMPORTING Parameters details for TR_INSERT_REQUEST_WITH_TASKS

IV_TYPE -

Data type: TRFUNCTION
Optional: No
Call by Reference: No ( called with pass by value option)

IV_TEXT -

Data type: AS4TEXT
Optional: No
Call by Reference: No ( called with pass by value option)

IV_OWNER -

Data type: AS4USER
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_TARGET -

Data type: TR_TARGET
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_ATTRIBUTES -

Data type: SCTS_ATTRS
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_USERS -

Data type: SCTS_USERS
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_TARDEVCL -

Data type: TARDEVCL
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_DEVCLASS -

Data type: DEVCLASS
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_TARLAYER -

Data type: TARLAYER
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for TR_INSERT_REQUEST_WITH_TASKS

ES_REQUEST_HEADER -

Data type: TRWBO_REQUEST_HEADER
Optional: No
Call by Reference: No ( called with pass by value option)

ET_TASK_HEADERS -

Data type: TRWBO_REQUEST_HEADERS
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

INSERT_FAILED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ENQUEUE_FAILED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for TR_INSERT_REQUEST_WITH_TASKS 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_iv_type  TYPE TRFUNCTION, "   
lv_insert_failed  TYPE TRFUNCTION, "   
lv_es_request_header  TYPE TRWBO_REQUEST_HEADER, "   
lv_iv_text  TYPE AS4TEXT, "   
lv_enqueue_failed  TYPE AS4TEXT, "   
lv_et_task_headers  TYPE TRWBO_REQUEST_HEADERS, "   
lv_iv_owner  TYPE AS4USER, "   SY-UNAME
lv_iv_target  TYPE TR_TARGET, "   
lv_it_attributes  TYPE SCTS_ATTRS, "   
lv_it_users  TYPE SCTS_USERS, "   
lv_iv_tardevcl  TYPE TARDEVCL, "   
lv_iv_devclass  TYPE DEVCLASS, "   
lv_iv_tarlayer  TYPE TARLAYER. "   

  CALL FUNCTION 'TR_INSERT_REQUEST_WITH_TASKS'  "
    EXPORTING
         IV_TYPE = lv_iv_type
         IV_TEXT = lv_iv_text
         IV_OWNER = lv_iv_owner
         IV_TARGET = lv_iv_target
         IT_ATTRIBUTES = lv_it_attributes
         IT_USERS = lv_it_users
         IV_TARDEVCL = lv_iv_tardevcl
         IV_DEVCLASS = lv_iv_devclass
         IV_TARLAYER = lv_iv_tarlayer
    IMPORTING
         ES_REQUEST_HEADER = lv_es_request_header
         ET_TASK_HEADERS = lv_et_task_headers
    EXCEPTIONS
        INSERT_FAILED = 1
        ENQUEUE_FAILED = 2
. " TR_INSERT_REQUEST_WITH_TASKS




ABAP code using 7.40 inline data declarations to call FM TR_INSERT_REQUEST_WITH_TASKS

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_iv_owner) = SY-UNAME.
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!