1. Open the Dictionary Perspective in the SAP NetWeaver Developer Studio.
2. Create a new project. Choose File ® New ® Project. Choose the project type Dictionary Project.
3. Enter a project name and choose the perspective language. The perspective language defines the language in which the tables texts are created.
4. In the Dictionary Explorer, position the cursor on Database Tables, and choose Create Table in the context menu.
5. Enter the name of the table.
Table names must begin with a prefix (for example, the name of a component ‚FI_*’).
The name of a table can be 18 characters long (inclusive of the prefix). Letters, numbers, and the character ‚_’ are allowed.
The name reservation takes place when the Dictionary object is assigned to an activity (check-in into Design Time Repository). If the name is already reserved, you can create the tale, but you cannot save it in the DTR.
6. In the field Description, enter a short description for the table.
7. Choose Multi-client enabled if you require this.
From an organizational and data-technical point of view, a client is a closed unit with separate master records and an independent set of tables within a mySAP system. As soon as multi-client-enablement has been implemented in the J2EE engine, the attribute Multi-client-enabled will be interpreted. This is currently not the case. However, if you need it, you should already set this function.
For more information on the client concept, refer to any SAP /3-System (Basis Release >= 6.20) under Help ® SAP Library ® SAP Netweaver Components ® Cross Application Functions ® Client Concept.
8. Choose Add Column to create new columns.
For each new column, either choose the Simple Type tab in the following dialog box, in which case the table column will refer to a data type defined in the Java Dictionary. Or in the tab Built-in Type, define the data type for the table column yourself.
¡ Enter a name for the table field in the Column Name field. The field name may only contain letters, digits, and underscore lines, and it must begin with a letter.
¡ In the field Built-in Type, choose a data type. The field JDBC Type is set automatically and provides information on the underlying, database-independent JDBC type that results from the selected Built-in Type and from the length entered for the field.
¡ In the following fields, you can enter the length, number of decimal places, and a short description, if required.
¡ If required, enter the DB Default. For more information, refer to the section Initial Values.
¡ Select the Key checkbox if the field should be part of the table key.
Key fields are used in tables for unique identification of data records. Examples of key fields are customer number, article description, and so on. A table can have up to 16 key fields.
¡ If required, select the checkbox Not Null. For more information, refer to the section Initial Values.
¡ After you have chosen Add Column to create a table column, choose the tab Simple Type. Enter the name of the field, the package in which the simple type is contained, and the simple type. In this way, you can include predefined data types in a table. For more information, read the explanations in the section Creating Data Types.
9. If necessary, create indexes for the table. For more information, refer to the section Creating Indexes.
10. Choose the tab Buffering. Here you can define the buffering type for the table. The table can be buffered entirely or row by row. If the table contains more than one key field, generic areas can be buffered. For more information, refer to the section Buffering Type.
Choose the pushbutton Advanced if you wish to exclude databases you are not using. When you create a table, different checks are carried out. If no database is excluded, the checks will be based on all the specified databases. However, remember that porting the table to a database of another type is not possible if the database was excluded in the database wizard.
11. Save your entries with the pushbutton (Save all Metadata). All the project metadata is stored and generated. When the data is saved, an XML description of the table is automatically created.
If the generation is to take place automatically, select the path Window -> Preferences -> Workbench and choose the option Perform build automatically on resource modification. Likewise, you can position the cursor on the project name and choose Build or Rebuild project in the context menu. If you choose Rebuild project, the generated XML file is updated.
Tables should be created solely using the Editor. No changes should be made to XML files. When you delete a table, the created XML file is kept at the moment.
The table is now created in the Java Dictionary. The table can now be deployed. During deployment, the table and all the indexes for the table are automatically created in the database (if not explicitly excluded when the index was defined).