Start of Content Area

Procedure documentation Creating Tables  Locate the document in its SAP Library structure

Procedure

  1. In the initial screen of the ABAP Dictionary, select object class Database table, enter the table name and choose This graphic is explained in the accompanying text Create.
  2. The maintenance screen for the table is displayed.

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

  5. On the Delivery and Maintenance tab, enter the delivery class of the table.
  6. On this tab, choose an entry from the dropdown box for the Data Browser/Table View Maintenance field. Choose Table maintenance allowed on this tab page if users with the corresponding authorization may change the data in the table using the Data Browser (Transaction SE16). For more information refer to the available options in Data Browser/Table View Maintenance.

  7. On the Fields tab page, enter the table fields. Perform the following steps for each table field:
  8. Enter a name for the table field in the column Fields. The field name may only contain letters, digits and underlining, and it must begin with a letter. A field name may not be longer than 16 characters.

    Select the Key column if the field should be part of the table key.

    Enter the name of a data element in field Field type. In this case the field takes the data type, length, decimal places and short text from this data element. If there is no suitable data element, you can go to the data element maintenance screen by entering a name and double-clicking.

    With Data element/Direct type, you can directly enter the data type, field length, decimal places and short text. Press this key again if you want to enter data elements for further fields.

    Only a limited functionality is provided for fields without data elements. No foreign keys or fixed values may be defined for such fields, and there is no F1 help.

    You must also define the reference field and reference table on tab page Currency/quantity fields for fields of types CURR (currency) and QUAN (quantity)

    You also can include the fields of an existing structure in the table. Note that the field names in the structure may not be longer than 16 places in this case.

  9. Maintain the technical settings for the table. The corresponding maintenance screen is displayed with Goto Technical settings.
  10. The technical settings are a separate object and can be activated and transported separately from the table.

  11. Maintain (if necessary) the foreign key relationships of the table to other tables.
  12. The corresponding maintenance screen is displayed if you place the cursor on the check field and choose This graphic is explained in the accompanying text .

  13. Create (if necessary) secondary indexes for the table.
  14. To do this choose Goto ® Indexes.

  15. Save the table.
  16. A dialog box appears in which you have to assign the table a development class.

    For tables with the Delivery Class G or E, you must also maintain a customer namespace (key block of the table) for the table entries. SAP cannot change table entries or import new entries in the customer namespace during upgrades. To navigate to the appropriate maintenance transaction, choose Define Customer Namespace on the Attributes tab.

  17. Choose an enhancement category. For more information, see Structure Enhancements.
  18. Choose This graphic is explained in the accompanying text.

Result

During activation, the table and all the indexes on the table are automatically created in the database (if not explicitly excluded when the index was defined). You can display the table definition in the database with Utilities ® Database object ® Display.

At activation, the runtime object for the table is also created. You can display the runtime object with Utilities ® Runtime object ® Display.

You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. The activation log is displayed automatically if errors occur when the table is activated.

Other Options

Constraints

See also:

Technical Settings

Indexes

Foreign Keys

End of Content Area