SAP TR_APPEND_TO_COMM Function Module for









TR_APPEND_TO_COMM is a standard tr append to 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 append to comm FM, simply by entering the name TR_APPEND_TO_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: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TR_APPEND_TO_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_APPEND_TO_COMM'"
EXPORTING
PI_KORRNUM = "Order, to be appended
WI_E071 = "Object key
* WI_SIMULATION = ' ' "Flag, 'X' - no database update
* WI_SUPPRESS_KEY_CHECK = ' ' "Flag, whether key syntax check suppressed

TABLES
* WT_E071K = "Input/output table E071K

EXCEPTIONS
NO_AUTHORIZATION = 1 TR_LOCK_ENQUEUE_FAILED = 10 TR_MODIF_ONLY_IN_MODIF_ORDER = 11 TR_NOT_OWNER = 12 TR_NO_APPEND_OF_CORR_ENTRY = 13 TR_NO_APPEND_OF_C_MEMBER = 14 TR_NO_SHARED_REPAIRS = 15 TR_ORDER_NOT_EXIST = 16 TR_ORDER_RELEASED = 17 TR_ORDER_UPDATE_ERROR = 18 TR_REPAIR_ONLY_IN_REPAIR_ORDER = 19 NO_SYSTEMNAME = 2 TR_WRONG_ORDER_TYPE = 20 WRONG_CLIENT = 21 NO_SYSTEMTYPE = 3 TR_CHECK_KEYSYNTAX_ERROR = 4 TR_CHECK_OBJ_ERROR = 5 TR_ENQUEUE_FAILED = 6 TR_ILL_KORRNUM = 7 TR_KEY_WITHOUT_HEADER = 8 TR_LOCKMOD_FAILED = 9
.



IMPORTING Parameters details for TR_APPEND_TO_COMM

PI_KORRNUM - Order, to be appended

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

WI_E071 - Object key

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

WI_SIMULATION - Flag, 'X' - no database update

Data type: TRPARI-W_SIMULAT
Default: ' '
Optional: No
Call by Reference: No ( called with pass by value option)

WI_SUPPRESS_KEY_CHECK - Flag, whether key syntax check suppressed

Data type: TRPARI-W_NO_CHECK
Default: ' '
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for TR_APPEND_TO_COMM

WT_E071K - Input/output table E071K

Data type: E071K
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NO_AUTHORIZATION - No authorization for this function

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

TR_LOCK_ENQUEUE_FAILED - Error in competing TLOCK access

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

TR_MODIF_ONLY_IN_MODIF_ORDER - Modifications only in correction requests

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

TR_NOT_OWNER - Order has other owner

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

TR_NO_APPEND_OF_CORR_ENTRY - unauthorized manual E071-Corr entries

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

TR_NO_APPEND_OF_C_MEMBER - c-member not via append (but via sapsccs)

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

TR_NO_SHARED_REPAIRS - no networking of repairs possible

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

TR_ORDER_NOT_EXIST - Order does not exist

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

TR_ORDER_RELEASED - Order already released

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

TR_ORDER_UPDATE_ERROR - Error on saving order header E070

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

TR_REPAIR_ONLY_IN_REPAIR_ORDER - Repairs only allowed in repair orders

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

NO_SYSTEMNAME - System name indeterminable or invalid length

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

TR_WRONG_ORDER_TYPE - wrong order category

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)

NO_SYSTEMTYPE - System category not determinable

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

TR_CHECK_KEYSYNTAX_ERROR - Syntax error in an E071k entry (->Message)

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

TR_CHECK_OBJ_ERROR - Syntax error in E071 entry (see message)

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

TR_ENQUEUE_FAILED - no short term lock possible

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

TR_ILL_KORRNUM - Order does not correspond to K

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

TR_KEY_WITHOUT_HEADER - E071K entry without E071 header entry

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

TR_LOCKMOD_FAILED - TLOCK modification not possible

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

Copy and paste ABAP code example for TR_APPEND_TO_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:
lt_wt_e071k  TYPE STANDARD TABLE OF E071K, "   
lv_pi_korrnum  TYPE E070-TRKORR, "   
lv_no_authorization  TYPE E070, "   
lv_tr_lock_enqueue_failed  TYPE E070, "   
lv_tr_modif_only_in_modif_order  TYPE E070, "   
lv_tr_not_owner  TYPE E070, "   
lv_tr_no_append_of_corr_entry  TYPE E070, "   
lv_tr_no_append_of_c_member  TYPE E070, "   
lv_tr_no_shared_repairs  TYPE E070, "   
lv_tr_order_not_exist  TYPE E070, "   
lv_tr_order_released  TYPE E070, "   
lv_tr_order_update_error  TYPE E070, "   
lv_tr_repair_only_in_repair_order  TYPE E070, "   
lv_wi_e071  TYPE E071, "   
lv_no_systemname  TYPE E071, "   
lv_tr_wrong_order_type  TYPE E071, "   
lv_wrong_client  TYPE E071, "   
lv_no_systemtype  TYPE E071, "   
lv_wi_simulation  TYPE TRPARI-W_SIMULAT, "   ' '
lv_wi_suppress_key_check  TYPE TRPARI-W_NO_CHECK, "   ' '
lv_tr_check_keysyntax_error  TYPE TRPARI, "   
lv_tr_check_obj_error  TYPE TRPARI, "   
lv_tr_enqueue_failed  TYPE TRPARI, "   
lv_tr_ill_korrnum  TYPE TRPARI, "   
lv_tr_key_without_header  TYPE TRPARI, "   
lv_tr_lockmod_failed  TYPE TRPARI. "   

  CALL FUNCTION 'TR_APPEND_TO_COMM'  "
    EXPORTING
         PI_KORRNUM = lv_pi_korrnum
         WI_E071 = lv_wi_e071
         WI_SIMULATION = lv_wi_simulation
         WI_SUPPRESS_KEY_CHECK = lv_wi_suppress_key_check
    TABLES
         WT_E071K = lt_wt_e071k
    EXCEPTIONS
        NO_AUTHORIZATION = 1
        TR_LOCK_ENQUEUE_FAILED = 10
        TR_MODIF_ONLY_IN_MODIF_ORDER = 11
        TR_NOT_OWNER = 12
        TR_NO_APPEND_OF_CORR_ENTRY = 13
        TR_NO_APPEND_OF_C_MEMBER = 14
        TR_NO_SHARED_REPAIRS = 15
        TR_ORDER_NOT_EXIST = 16
        TR_ORDER_RELEASED = 17
        TR_ORDER_UPDATE_ERROR = 18
        TR_REPAIR_ONLY_IN_REPAIR_ORDER = 19
        NO_SYSTEMNAME = 2
        TR_WRONG_ORDER_TYPE = 20
        WRONG_CLIENT = 21
        NO_SYSTEMTYPE = 3
        TR_CHECK_KEYSYNTAX_ERROR = 4
        TR_CHECK_OBJ_ERROR = 5
        TR_ENQUEUE_FAILED = 6
        TR_ILL_KORRNUM = 7
        TR_KEY_WITHOUT_HEADER = 8
        TR_LOCKMOD_FAILED = 9
. " TR_APPEND_TO_COMM




ABAP code using 7.40 inline data declarations to call FM TR_APPEND_TO_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_pi_korrnum).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single W_SIMULAT FROM TRPARI INTO @DATA(ld_wi_simulation).
DATA(ld_wi_simulation) = ' '.
 
"SELECT single W_NO_CHECK FROM TRPARI INTO @DATA(ld_wi_suppress_key_check).
DATA(ld_wi_suppress_key_check) = ' '.
 
 
 
 
 
 
 


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!