SAP Function Modules

TR_APPEND_TO_COMM_OBJS_KEYS SAP Function module - Append and lock objects and keys to a task







TR_APPEND_TO_COMM_OBJS_KEYS is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name TR_APPEND_TO_COMM_OBJS_KEYS into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: STRI
Released Date: 16.04.1998
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM TR_APPEND_TO_COMM_OBJS_KEYS - TR APPEND TO COMM OBJS KEYS





CALL FUNCTION 'TR_APPEND_TO_COMM_OBJS_KEYS' "Append and lock objects and keys to a task
  EXPORTING
*   wi_simulation = ' '         " trpari-w_simulat  Flag, 'X' - no database update
*   wi_suppress_key_check = ' '  " trpari-w_no_check  Flag whether key syntax check is suppressed
    wi_trkorr =                 " e070-trkorr   Task to be added to
*   it_e071k_str =              " e071k_strtyp  Table Key with String Field
  TABLES
    wt_e071 =                   " e071          Table of objects to be added
    wt_e071k =                  " e071k         Table of keys to be added
  EXCEPTIONS
    KEY_CHAR_IN_NON_CHAR_FIELD = 1  "           Character in a non-character field in a task key
    KEY_CHECK_KEYSYNTAX_ERROR = 2  "            Syntax error in an E071K entry (-> message)
    KEY_INTTAB_TABLE = 3        "               Table is internal table for a task key
    KEY_LONGER_FIELD_BUT_NO_GENERC = 4  "       Table key longer than E071K table key, but not generic
    KEY_MISSING_KEY_MASTER_FIELDS = 5  "        Empty master field(s) in a task key
    KEY_MISSING_KEY_TABLEKEY = 6  "             Field table key empty in a task key
    KEY_NON_CHAR_BUT_NO_GENERIC = 7  "          Non-char key but no generic in task key
    KEY_NO_KEY_FIELDS = 8       "               Table: no key fields for a task key
    KEY_STRING_LONGER_CHAR_KEY = 9  "           Table string longer than char key begin for task key
    KEY_TABLE_HAS_NO_FIELDS = 10  "             Table has no fields for a task key
    KEY_TABLE_NOT_ACTIV = 11    "               Table is not active for a task key
    KEY_UNALLOWED_KEY_FUNCTION = 12  "          Invalid function in a task key
    KEY_UNALLOWED_KEY_OBJECT = 13  "            Invalid object in the key of a task key
    KEY_UNALLOWED_KEY_OBJNAME = 14  "           Invalid object name in the key of a task key
    KEY_UNALLOWED_KEY_PGMID = 15  "             Invalid program ID in the key of a task key
    KEY_WITHOUT_HEADER = 16     "               E071K entry without E071 header entry
    OB_CHECK_OBJ_ERROR = 17     "               Syntax error in E071 entry (see message table)
    OB_DEVCLASS_NO_EXIST = 18   "               Development class does not exist
    OB_EMPTY_KEY = 19           "               Select fields in LOCK_KEY are empty (system error)
    OB_GENERIC_OBJECTNAME = 20  "               Generic object name only in command files
    OB_ILL_DELIVERY_TRANSPORT = 21  "           Invalid transport to delivery system
    OB_ILL_LOCK = 22            "               Lock in task of another system
    OB_ILL_PARTS_TRANSPORT = 23  "              Single elements in original request
    OB_ILL_SOURCE_SYSTEM = 24   "               Consolidation request only from integration system
    OB_ILL_SYSTEM_OBJECT = 25   "               Invalid system object
    OB_ILL_TARGET = 26          "               Consolidation request not in consolidation system
    OB_INTTAB_TABLE = 27        "               Table is an internal table
    OB_LOCAL_OBJECT = 28        "               Local private object
    OB_LOCKED_BY_OTHER = 29     "               Locked by another task
    OB_MODIF_ONLY_IN_MODIF_ORDER = 30  "        Modifications only in tasks
    OB_NAME_TOO_LONG = 31       "               Invalid object name length
    OB_NO_APPEND_OF_CORR_ENTRY = 32  "          Invalid manual E071 correction entries
    OB_NO_APPEND_OF_C_MEMBER = 33  "            C-member not with append (but with sapsccs)
    OB_NO_CONSOLIDATION_TRANSPORT = 34  "       Invalid transport in consolidation layer
    OB_NO_ORIGINAL = 35         "               Original request from non-original system
    OB_NO_SHARED_REPAIRS = 36   "               No link of repairs possible
    OB_NO_SYSTEMNAME = 37       "               System name cannot be determined or invalid length
    OB_NO_SYSTEMTYPE = 38       "               System type cannot be determined
    OB_NO_TADIR = 39            "               Missing TADIR entry, no lock necessary
    OB_NO_TADIR_NOT_LOCKABLE = 40  "            Missing TADIR entry, lock necessary
    OB_PRIVAT_OBJECT = 41       "               Private object (in consolidation request)
    OB_REPAIR_ONLY_IN_REPAIR_ORDER = 42  "      Repairs only allowed in repair requests
    OB_RESERVED_NAME = 43       "               Object in reserved name range
    OB_SYNTAX_ERROR = 44        "               Incorrect object syntax
    OB_TABLE_HAS_NO_FIELDS = 45  "              Table has no fields (does not exist)
    OB_TABLE_NOT_ACTIV = 46     "               Table is not activated
    TR_ENQUEUE_FAILED = 47      "               No short-term lock possible
    TR_ERRORS_IN_ERROR_TABLE = 48  "            Object error, exact error in WT_TRMESS_INT
    TR_ILL_KORRNUM = 49         "               Task does not correspond to K
    TR_LOCKMOD_FAILED = 50      "               TLOCK modification not possible
    TR_LOCK_ENQUEUE_FAILED = 51  "              Error in competing TLOCK access
    TR_NOT_OWNER = 52           "               Task has another owner
    TR_NO_SYSTEMNAME = 53       "               System name cannot be determined or invalid length
    TR_NO_SYSTEMTYPE = 54       "               System type cannot be determined
    TR_ORDER_NOT_EXIST = 55     "               Task does not exist
    TR_ORDER_RELEASED = 56      "               Task already released
    TR_ORDER_UPDATE_ERROR = 57  "               Error saving the task header E070
    TR_WRONG_ORDER_TYPE = 58    "               Incorrect task type
    OB_INVALID_TARGET_SYSTEM = 59  "            No application import in basis system
    TR_NO_AUTHORIZATION = 60    "               No authorization for this function
    OB_WRONG_TABLETYP = 61      "               Identifier <-> object: table <->  view intermixed
    OB_WRONG_CATEGORY = 62      "               Request and object categories conflict
    OB_SYSTEM_ERROR = 63        "               System error in determined request/task
    OB_UNLOCAL_OBJEKT_IN_LOCAL_ORD = 64  "      Transportable object not in local request
    TR_WRONG_CLIENT = 65        "               Task editing in invalid client
    OB_WRONG_CLIENT = 66        "               Object editing in invalid clients
    KEY_WRONG_CLIENT = 67       "               Key editing in invalid client
    .  "  TR_APPEND_TO_COMM_OBJS_KEYS

ABAP code example for Function Module TR_APPEND_TO_COMM_OBJS_KEYS





The ABAP code below is a full code listing to execute function module TR_APPEND_TO_COMM_OBJS_KEYS including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_wt_e071  TYPE STANDARD TABLE OF E071,"TABLES PARAM
wa_wt_e071  LIKE LINE OF it_wt_e071 ,
it_wt_e071k  TYPE STANDARD TABLE OF E071K,"TABLES PARAM
wa_wt_e071k  LIKE LINE OF it_wt_e071k .


DATA(ld_wi_simulation) = some text here

DATA(ld_wi_suppress_key_check) = some text here

SELECT single TRKORR
FROM E070
INTO @DATA(ld_wi_trkorr).

DATA(ld_it_e071k_str) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_wt_e071 to it_wt_e071.

"populate fields of struture and append to itab
append wa_wt_e071k to it_wt_e071k. . CALL FUNCTION 'TR_APPEND_TO_COMM_OBJS_KEYS' EXPORTING * wi_simulation = ld_wi_simulation * wi_suppress_key_check = ld_wi_suppress_key_check wi_trkorr = ld_wi_trkorr * it_e071k_str = ld_it_e071k_str TABLES wt_e071 = it_wt_e071 wt_e071k = it_wt_e071k EXCEPTIONS KEY_CHAR_IN_NON_CHAR_FIELD = 1 KEY_CHECK_KEYSYNTAX_ERROR = 2 KEY_INTTAB_TABLE = 3 KEY_LONGER_FIELD_BUT_NO_GENERC = 4 KEY_MISSING_KEY_MASTER_FIELDS = 5 KEY_MISSING_KEY_TABLEKEY = 6 KEY_NON_CHAR_BUT_NO_GENERIC = 7 KEY_NO_KEY_FIELDS = 8 KEY_STRING_LONGER_CHAR_KEY = 9 KEY_TABLE_HAS_NO_FIELDS = 10 KEY_TABLE_NOT_ACTIV = 11 KEY_UNALLOWED_KEY_FUNCTION = 12 KEY_UNALLOWED_KEY_OBJECT = 13 KEY_UNALLOWED_KEY_OBJNAME = 14 KEY_UNALLOWED_KEY_PGMID = 15 KEY_WITHOUT_HEADER = 16 OB_CHECK_OBJ_ERROR = 17 OB_DEVCLASS_NO_EXIST = 18 OB_EMPTY_KEY = 19 OB_GENERIC_OBJECTNAME = 20 OB_ILL_DELIVERY_TRANSPORT = 21 OB_ILL_LOCK = 22 OB_ILL_PARTS_TRANSPORT = 23 OB_ILL_SOURCE_SYSTEM = 24 OB_ILL_SYSTEM_OBJECT = 25 OB_ILL_TARGET = 26 OB_INTTAB_TABLE = 27 OB_LOCAL_OBJECT = 28 OB_LOCKED_BY_OTHER = 29 OB_MODIF_ONLY_IN_MODIF_ORDER = 30 OB_NAME_TOO_LONG = 31 OB_NO_APPEND_OF_CORR_ENTRY = 32 OB_NO_APPEND_OF_C_MEMBER = 33 OB_NO_CONSOLIDATION_TRANSPORT = 34 OB_NO_ORIGINAL = 35 OB_NO_SHARED_REPAIRS = 36 OB_NO_SYSTEMNAME = 37 OB_NO_SYSTEMTYPE = 38 OB_NO_TADIR = 39 OB_NO_TADIR_NOT_LOCKABLE = 40 OB_PRIVAT_OBJECT = 41 OB_REPAIR_ONLY_IN_REPAIR_ORDER = 42 OB_RESERVED_NAME = 43 OB_SYNTAX_ERROR = 44 OB_TABLE_HAS_NO_FIELDS = 45 OB_TABLE_NOT_ACTIV = 46 TR_ENQUEUE_FAILED = 47 TR_ERRORS_IN_ERROR_TABLE = 48 TR_ILL_KORRNUM = 49 TR_LOCKMOD_FAILED = 50 TR_LOCK_ENQUEUE_FAILED = 51 TR_NOT_OWNER = 52 TR_NO_SYSTEMNAME = 53 TR_NO_SYSTEMTYPE = 54 TR_ORDER_NOT_EXIST = 55 TR_ORDER_RELEASED = 56 TR_ORDER_UPDATE_ERROR = 57 TR_WRONG_ORDER_TYPE = 58 OB_INVALID_TARGET_SYSTEM = 59 TR_NO_AUTHORIZATION = 60 OB_WRONG_TABLETYP = 61 OB_WRONG_CATEGORY = 62 OB_SYSTEM_ERROR = 63 OB_UNLOCAL_OBJEKT_IN_LOCAL_ORD = 64 TR_WRONG_CLIENT = 65 OB_WRONG_CLIENT = 66 KEY_WRONG_CLIENT = 67 . " TR_APPEND_TO_COMM_OBJS_KEYS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 11. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 12. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 13. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 14. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 15. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 16. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 17. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 18. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 19. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 20. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 21. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 22. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 23. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 24. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 25. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 26. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 27. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 28. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 29. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 30. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 31. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 32. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 33. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 34. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 35. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 36. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 37. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 38. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 39. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 40. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 41. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 42. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 43. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 44. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 45. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 46. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 47. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 48. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 49. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 50. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 51. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 52. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 53. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 54. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 55. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 56. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 57. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 58. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 59. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 60. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 61. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 62. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 63. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 64. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 65. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 66. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 67. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_wi_simulation  TYPE TRPARI-W_SIMULAT ,
it_wt_e071  TYPE STANDARD TABLE OF E071 ,
wa_wt_e071  LIKE LINE OF it_wt_e071,
ld_wi_suppress_key_check  TYPE TRPARI-W_NO_CHECK ,
it_wt_e071k  TYPE STANDARD TABLE OF E071K ,
wa_wt_e071k  LIKE LINE OF it_wt_e071k,
ld_wi_trkorr  TYPE E070-TRKORR ,
ld_it_e071k_str  TYPE E071K_STRTYP .


ld_wi_simulation = some text here

"populate fields of struture and append to itab
append wa_wt_e071 to it_wt_e071.

ld_wi_suppress_key_check = some text here

"populate fields of struture and append to itab
append wa_wt_e071k to it_wt_e071k.

SELECT single TRKORR
FROM E070
INTO ld_wi_trkorr.

ld_it_e071k_str = 'Check type of data required'.

SAP Documentation for FM TR_APPEND_TO_COMM_OBJS_KEYS


You can also use the function module TR_APPEND_TO_COMM_OBJECTS_KEYS outside the Change and Transport System, since the actual function uses ...See here for full SAP fm documentation

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name TR_APPEND_TO_COMM_OBJS_KEYS or its description.