Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

create table

Former Member
0 Likes
1,074

hi techies,

can any one tell , how to create table.

8 REPLIES 8
Read only

Former Member
Read only

Former Member
0 Likes
963

In the initial screen of the ABAP Dictionary, select object class Database table, enter the table name and choose Create.

The maintenance screen for the table is displayed.

Enter an explanatory short text in the field Short text.

You can for example find the table at a later time using this short text.

On the Delivery and Maintenance tab, enter the delivery class of the table.

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.

On the Fields tab page, enter the table fields. Perform the following steps for each table field:

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.

Maintain the technical settings for the table. The corresponding maintenance screen is displayed with Goto Technical settings.

The technical settings are a separate object and can be activated and transported separately from the table.

Maintain (if necessary) the foreign key relationships of the table to other tables.

The corresponding maintenance screen is displayed if you place the cursor on the check field and choose .

Create (if necessary) secondary indexes for the table.

To do this choose Goto indexes.

Save the table.

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.

Choose an enhancement category. For more information, see Structure Enhancements.

Choose .

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 objec Display.

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

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.

Read only

Former Member
0 Likes
963

to create a table u need to first loginto sap and then go to the data dictionary.

The transaction for going to this is SE11. Which is the standard transaction for accessing the abap data dictionary and definitions..

which then leads you to the screen where u have options for tables, views etc.

there uhave to click the radio button corresponding to the tables tab and then click on create.

now u have to enter the delivery and mentainence settings for tha table which again depends upon the type of ur table. Sap has basically 3 kinda tables. pool, cluster and transparent tables. The pool and the cluster tables generally have customization data. So u can go with Application table. And if u want to modify the table go for display/mentainence without restrictions..

After the delivery/mentainence tab u have the fields tab where u can define all your fields for the table followed by the data element. U can populate the table by generating the table mentainence generator for that.

Similarly the fields can be populated..

Read only

Former Member
0 Likes
963

Hai.

Go to SE11 enter table name in cust0mer namespace i.e. ztablename.

enter shortdescription and in delivary and maintance tab

enter Displayand maintenance allowed and delivery class as 'A'.

enter fieldnames and dataelement(zfieldname) .

double click the data element there u can give domain name.

same dataelement can be used for many tables if required.

enter the field labels in domain.

activate domain and dataelement finally .

and also check this.

The following are the table types used in SAP :

Transparent Tables

There is a physical table on the database for each transparent table.

The names of the physical table and the logical table definition in the

ABAP/4 Dictionary agree. All the business and application data is store

in transparent tables.

Pooled table

Pooled tables can be used to store control data (e.g. screen sequences,

program parameters or temporary data). Several pooled tables can be

combined to form a table pool. The table pool corresponds to a physical

table on the database in which all the records of the allocated pooled

tables are stored.

Cluster table

Cluster tables contain continuous text, for example documentation.

Several cluster tables can be combined to form a table cluster. Several

logical lines of different tables are combined to form a physical record

in this table category. This permits object-by-object storage or

object-by-object access. In order to combine tables in clusters, at

least part of the keys must agree. Several cluster tables are stored in

one corresponding table on the database.

I. Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)

Allows secondary indexes (SE11->Display Table->Indexes)

Can be buffered (SE11->Display Table->technical settings) Heavily updated tables should not be buffered.

II. Pool Tables (match codes, look up tables)

Should be accessed via primary key or

Should be buffered (SE11->Display Table->technical settings)

No secondary indexes

Select * is Ok because all columns retrieved anyway

III. Cluster Tables (BSEG,BSEC)

Should be accessed via primary key - very fast retrieval otherwise very slow

No secondary indexes

Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.

Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported

Can not be buffered

IV. Buffered Tables (includes both Transparent & Pool Tables)

While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance, it is not always necessary. Some tables are already buffered in memory. These are mostly configuration tables. If a table is already buffered, then a select statement against it is very fast. To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary display of a table (SE12). Pool tables should all be buffered.

Tables Documentation

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25c1f5d1-0901-0010-d495-e96d02a0...

Regards.

Sowjanya.B.

Read only

Former Member
0 Likes
963

Hi,

In the initial screen of the ABAP Dictionary, select object class Database table, enter the table name and choose Create.

The maintenance screen for the table is displayed.

Enter an explanatory short text in the field Short text.

You can for example find the table at a later time using this short text.

On the Delivery and Maintenance tab, enter the delivery class of the table.

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.

On the Fields tab page, enter the table fields. Perform the following steps for each table field:

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.

Maintain the technical settings for the table. The corresponding maintenance screen is displayed with Goto ® Technical settings.

The technical settings are a separate object and can be activated and transported separately from the table.

Maintain (if necessary) the foreign key relationships of the table to other tables.

The corresponding maintenance screen is displayed if you place the cursor on the check field and choose .

Create (if necessary) secondary indexes for the table.

To do this choose Goto ® Indexes.

Save the table.

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.

Choose an enhancement category. For more information, see Structure Enhancements.

Choose .

Read only

Former Member
0 Likes
963

Hi,

Use Transaction SE11.

Check radio button 'Database Table'.

Enter a table name, as yours is a user table it must start with a 'Z'.

Click on 'Create' button.

Enter a short description.

In the 'Delivery & Maintenance' tab, choose a Delivery Class according to your purpose. Set the 'Data browser/Table View Maint' according to your requirement. You must set these two.

Click on the 'Fields' tab and enter your table fields.

When you are done, Check syntax using ctrl+F2.

Activate using ctrl+F3.

Reward if helpful.

Read only

Former Member
0 Likes
963

Hi

Go to Tx SE11 and choose table radio Button

Enter the table name, begining Z or Y

Put Create Button or F5

Regards

Gregory