SAP Function Modules

Share |

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

Pattern for FM TR_APPEND_TO_COMM_OBJS_KEYS - TR APPEND TO COMM OBJS KEYS
Associated Function Group: STRI
Released Date: 16.04.1998
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
  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

SAP Documentation for FM TR_APPEND_TO_COMM_OBJS_KEYS


Functions

You can also use the function module TR_APPEND_TO_COMM_OBJECTS_KEYS outside the Change and Transport System, since the actual function uses a short term lock (enqueue/dequeue edit lock)
This function has its own transaction logic. It sends commits and may make rollbacks. Use committed data only.
This function module appends the objects in the table WT_E071 (fields: Fill PGMID, OBJECT, OBJ_NAME, maybe OBJFUNC) and the corresponding keys in the table WT_E071K (fields: Fill PGMID, OBJECT, OBJ_NAME, MASTERNAME, MASTERTYP, TABKEY. maybe OBJFUNC, VIEWNAME) to the task in the parameter WI_TRKORR.
This function can append objects to tasks only.
If the parameter WI_SIMULATION = 'X', then the whole function is performed, apart from the changes to the database. Use this parameter for testing.
The parameter WI_SUPPRESS_KEY_CHECK deativates the syntax check for the table WT_E071K explicitly (only if the syntax has no errors).
Caution: This function module changes entries in the table WT_E071; this means that entries are both deleted and changed.
Documentation extract taken from SAP system, Copyright (c) SAP AG






Share |