Start of Content Area

Procedure documentation Creating Table Types  Locate the document in its SAP Library structure

Procedure

  1. In the initial screen of the ABAP Dictionary, enter the table type name in field Data type and choose Create.
  2. A dialog box appears in which you must define the type category.

  3. Select Table type and choose Choose.
  4. The maintenance screen for table types appears.

  5. Enter an explanatory short text in the field Short text.
  6. You can for example find the table type at a later time using this short text.

    Now define the structure of a row of the table type (row type), the options for accessing data in the defined internal table (access mode) and the key of the table type.

  7. Enter the row type of the table type on the Row type tab page. You can refer to an existing type (data element, structure, table, view, table type) or directly enter the row type.
  8. If you want to refer to an existing type, you must mark the Row type radio button and enter the name of the type in the field below it.

    If you want to enter the data type, field length and possibly the number of decimal places directly, you must mark the Built-in type radio button. Entries are now possible in the fields Data type, Number of places and Decimal places.

    If you want to use a reference type as row type, mark the radio button Reference type and then Referenced type. Enter the name of the referenced type. This can be the name of a class or an interface, a generic reference to ANY, OBJECT, or DATA or a reference to a type defined in the Dictionary. If you want the reference type to be a predefined Dictionary type, choose Reference to predefined type. Select the type, the number of places and possibly the number of decimal places.

  9. On the Access tab page define the access mode of the table type.
  10. This defines how to access the data in an internal table defined by the table type in ABAP programs.

  11. Define the key of the table type on the Key tab page.
  12. The key of a table type is defined by the key definition and the key category.

    If you select Key components, you can define the key of the table type directly in the input area with the same name. This option is only possible if the row type of the table type is a structure, table or view.

    You can display all the components of the row type with Select components. Select the components you want to copy to the key and choose This graphic is explained in the accompanying text.

  13. Save the table type.
  14. You are asked to assign the table type a development class. You can change this development class later with Goto Object directory entry.

  15. Choose This graphic is explained in the accompanying text.

Result

The table type is now activated. The runtime object of the type is created. At activation, a log is written; it can be displayed with Utilities ® Activation log. If errors occurred during activation, the activation log is automatically displayed.

Other Options