Additional Transport Information

If tables are maintained in the background (hidden), they should be assigned to the associated maintenance object in the maintenance object definition object list, because of their logical dependence. Tables need not necessarily be put in the object list, but this loses the logical dependency on the maintenance object. The corresponding entries for these tables must then be made in the change request.

If other lockable objects, etc. are changed in the background, they must have their own entries in the request.

Structure

  • The tables T1 and T2 are maintained in the background in view V1.
  • T1 and T2 are not in the view definition.
  • T1 is in the V1 maintenance description object list, T2 is not.
  • Additional structures
  • IT1: internal table with T1 values
  • IT2: internal table with T2 values

The table T1 is automatically put in the change task in this constellation. A header entry must be created for the table T2.

  1. Routine to put other objects in the task event 10

    The header entry for the objects must be included in the internal table HyperLink: TX.SM30_EXIT_CORR_TABS VIM_CORR_OBJTAB v>, as they are neither in the view structure definition, nor are they associated text tables, nor are they in the maintenance object description object. Lockable objects are also allowed (e.g. programs).

    The routine for the example is as follows:

    FORM name10.
    VIM_CORR_OBJTAB = E071.
    VIM_CORR_OBJTAB-PGMID = 'R3TR'.
    VIM_CORR_OBJTAB-OBJECT = 'TABU'.
    VIM_CORR_OBJTAB-OBJ_NAME = 'T2'.
    VIM_CORR_OBJTAB-OBJFUNC = 'K'.
    APPEND VIM_CORR_OBJTAB.
    ENDFORM.

  2. Routine to create/delete/check a change request key entry event 11

    This routine puts the key entries for the additional hidden tables which belong to the current maintenance object entry, in the internal table hyperlink: TX.SM30_EXIT_CORR_TABS CORR_KEYTAB v>.

    The master object of the maintenance object must be specified for the additional tables in the object list. It is already in the global variable E071K.

    For additional tables which are not in the object list, the master object HyperLink: TX.SM30_EXIT_KON_TRSP TRANSP_OBJECT v> must be specified.

    The routine for the example is as follows:

    FORM name11.
    * 1. additional table T1 (in object list)

    CORR_KEYTAB = E071K.

    * or:
    * CORR_KEYTAB-TRKORR = E071K-TRKORR.
    * CORR_KEYTAB-PGMID = TRANSPORTER. "R3TR
    * CORR_KEYTAB-OBJECT = TRANSP_OBJECT. "TABU
    * CORR_KEYTAB-MASTERTYPE = MASTER_TYPE "VDAT
    * CORR_KEYTAB-MASTERNAME = MASTER_NAME "in ex. V1

    * 1.2 specify individual object names
    CORR_KEYTAB-OBJNAME = 'T1'.

    * 1.3 get object keys to be transported
    * depending on current view entry,
    * and put in CORR_KEYTAB ...

    LOOP AT IT1 INTO T1
    WHERE KEY1 EQ V1-KEY1.
    CORR_KEYTAB-TABKEY = T1-KEY1.

    *...object key found, use central
    * FORM routine to update table:

    CLEAR RC.
    PERFORM UPDATE_CORR_KEYTAB USING HyperLink: TX.SM30_EXIT_KON_TRSP CORR_ACTION v> RC.
    ENDLOOP.
    IF RC NE 0 AND CORR_ACTION EQ PRUEFEN.

    * in check mode, exit if a subobject is not in
    * correction

    SY-SUBRC = RC. EXIT.
    ELSE. "added, deleted or no error
    RC_SAFE = RC.
    ENDIF.

    * 2. additional table: T2
    * (NOT in object list):
    * create - CORR_KEYTAB entry (E071K):
    * 2.1 Fill fields with individual values

    CLEAR CORR_KEYTAB.
    CORR_KEYTAB-TRKORR = E071K-TRKORR.
    CORR_KEYTAB-PGMID = 'R3TR'.
    CORR_KEYTAB-OBJECT = 'TABU'.
    CORR_KEYTAB-OBJNAME = 'T2'.
    CORR_KEYTAB-MASTERTYPE = 'TABU'.
    CORR_KEYTAB-MASTERNAME = 'T2'.

    * 2.2 get object keys to be transported
    * depending on current view entry,
    * and put in CORR_KEYTAB ...

    LOOP AT IT2 INTO T2
    WHERE KEY1 EQ V1-KEY1.
    CORR_KEYTAB-TABKEY = T2-KEY1.
    CORR_KEYTAB-TABKEY+4 = T2-KEY2.

    *...object key found, use central
    * FORM routine to update table:

    CLEAR RC.
    PERFORM UPDATE_CORR_KEYTAB USING CORR_ACTION RC.
    ENDLOOP.
    IF RC NE 0 AND CORR_ACTION EQ PRUEFEN.

    * in check mode, exit if a subobject is not in
    * correction

    SY-SUBRC = RC.
    ....EXIT.
    ELSE. "add or delete or no error
    * get final return code

    IF RC_SAFE EQ 0 OR RC EQ 0.

    * at least one update successful

    CLEAR SY-SUBRC. "return ok.
    ELSE. "all updates not required
    SY-SUBRC = RC. "return not ok.
    ENDIF.
    ENDIF.
    ENDFORM.


    The current table/view entry, from which the information required for the CORR_KEYTAB entry can be obtained, is currently in the table/view work area.

  3. Routine to add the additional table entry keys event 12

This routine puts the key entries for the additional tables which do not necessarily belong to a single maintenance object entry, in the internal table hyperlink: TX.SM30_EXIT_CORR_TABS CORR_KEYTAB v> (structure E071K). The same applies as for the event 11 exit routine.

The routine for the example is as follows:

FORM name12.
DATA: RC LIKE SY-SUBRC.

* 1. additional table: T1 (in object list)

* create CORR_KEYTAB entry (E071K):

* 1.1 Initialize with globally preset E071K

CORR_KEYTAB = E071K.

* or:
* CORR_KEYTAB-TRKORR = E071K-TRKORR.
* CORR_KEYTAB-PGMID = TRANSPORTER. "R3TR
* CORR_KEYTAB-OBJECT = TRANSP_OBJECT. "TABU
* CORR_KEYTAB-MASTERTYPE = MASTER_TYPE "VDAT
* CORR_KEYTAB-MASTERNAME = MASTER_NAME "in ex. V1
* 1.2 specify individual object names

CORR_KEYTAB-OBJNAME = 'T1'.

*...object key found, use central
* FORM routine to update table:

CLEAR RC.
PERFORM UPDATE_CORR_KEYTAB USING CORR_ACTION RC.
IF RC NE 0.
RC_SAFE = RC.
ENDIF.

* 2. additional table: T2
* (NOT in object list)
* create - CORR_KEYTAB entry (E071K):
* 2.1 Fill fields with individual values

CLEAR CORR_KEYTAB.
CORR_KEYTAB-TRKORR = E071K-TRKORR.
CORR_KEYTAB-PGMID = 'R3TR'.
CORR_KEYTAB-OBJECT = 'TABU'.
CORR_KEYTAB-OBJNAME = 'T2'.
CORR_KEYTAB-MASTERTYPE = 'TABU'.
CORR_KEYTAB-MASTERNAME = 'T2'.

* 2.2 get object keys to be transported
* and put them in CORR_KEYTAB ...
...... individual coding, you can get the view entries
......from the internal table TOTAL.

CORR_KEYTAB-TABKEY = T2-KEY1.
CORR_KEYTAB-TABKEY+4 = T2-KEY2.

*...object key found, use central
* FORM routine to update table:

CLEAR RC.
PERFORM UPDATE_CORR_KEYTAB USING CORR_ACTION RC.

* get final return code

IF RC_SAFE EQ 0 OR RC EQ 0.

* at least one update successful

CLEAR SY-SUBRC. "return ok.
ELSE. "all updates not required
SY-SUBRC = RC. "return not ok.
ENDIF.
ENDFORM.