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

table creation

Former Member
0 Likes
1,420

i am very new to abap .i was given to create a ztable with following fields BUKRS, BELNR, GJAHR, INITIATOR,BANKL

can any body tell the procedure to create the table

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,079

Use transaction se11 .. enter ztable name.. and fill the mandatory fields in it.. enter the field names u have in the fields tab.

Regards,

Aparna

8 REPLIES 8
Read only

Former Member
0 Likes
1,079

Hi Jai ,

Call the transaction SE11.

Enter the name of you table and press create

Enter the development class.

Then you will get a screen where you can enter the feild names and there types enter them.

At the top there will be a button named Technical Settings , press that and enter values in the mandatory feild.

Regards

Arun

Read only

Former Member
0 Likes
1,080

Use transaction se11 .. enter ztable name.. and fill the mandatory fields in it.. enter the field names u have in the fields tab.

Regards,

Aparna

Read only

Former Member
0 Likes
1,079

Hi,

TO create a ZTABLE, The steps are as follows:

Go to SE11.

Give ur table name zxxxx.

Press create.

Now Give the <b>short description</b> for ur table.

In the DELIVERY AND MAINTAINENCE TAB,

Specify the <b>delivery class A or C or wat ever depending on ur requirement</b>.(If u ztable is customizing table, Specify C else give A for applic table)

Specify <b>Data Browser/Table View Maint</b> as per ur requirement.

Now in the FIELDS TAB,

Specify the fields u want to display in ur table.

Accord choose in built data element and domain.

IF the data element and domain for ur requirement is not created, then u can create a Z data element and domain and use the same for ur table.

Finally after ur fields are given, Do the TECHNICAL SETTINGS for ur table and also do TABLE MAINTAINENCE GENERATOR (Goto Utilities -->Table maintainence).Only then u'll b able to give new entries in ur ztable.

Then activate ur table and save it in the assigned package.

Hope this is clear.

Any queries, jus write back.

All the best.

*****Reward points if useful.

Read only

Former Member
0 Likes
1,079

Hi,

Go to SE11

chk database talble giive table name as zXXXX...

clikc on create

give description to tabel

in delivery /maintenance:

in delivery class select 'A'

in fileds:

give filed names

mandt with data elementt mandt (primary key)

for bukrs, belnr gjahr initatior give data element as bukrs belnr gjahr char1

for banlk give data element if u know or clikc on predefined type and give tyep

select as prinary key

goto technical setting

select data class

i m giving only madantory fields if u want more help just press F1 on that fiedll u will get all infor.

Jogdand M B

Read only

Former Member
0 Likes
1,079

Hi,

1. Plan on paper first, what are the fields you are looking for table creation.

2. Look for the Normalization concept of database design.

<a href="https://forums.sdn.sap.com/click.jspa?searchID=3403784&messageID=3594747">Normalization on SDN</a>

<a href="http://en.wikipedia.org/wiki/Database_normalization">Database Normalization</a>

3. Create domains, data elements required for table creation depending on the fields in the table. First search for the standard Domains/Data Elements if any.

4. Now go to SE11 transaction for actual table creation.

5. 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.

6. 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.

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

8. 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.

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

10. 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.

11. 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.

12. 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.

13. 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)

14. 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.

15. 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 .

16. Create (if necessary) secondary indexes for the table.

To do this choose Goto Indexes.

17. 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.

18. Activate the table

Hope this helps.

PS If the answer solve your query, plz close the thread by rewarding each reply and mark it Solved.

Regards

Read only

Former Member
0 Likes
1,079

Steps to Creating domains, Data Elements, Tables

To give you the steps for creating table:.

There are two approach in creating a table.

1. Bottom-up approach

2. Top-down approach.

Both are valid and you can choose which approach is suitable for you. I always use the bottom-up approach. Here are the steps to create the tables with this approach.

1. SE11 will take you to the DDIC and enter the name of the new table to be created. Let us say Zname. Click create.

2. Enter the short discription of the table and enter the field of the table. If it is primary key and you have to check the box.

3. Enter the data element and double click it, you will be asked to save and will take you to data element discription page. Enter the short discription of the data element and enter the information of domain like the length of field and type of field.

4. If you wanted to use the existing domain then its fine, or else, you have to create one. Enter the domain name in the data element page and double click it. Page will ask to save and jump to domain creation page.

5. In the domain page, you have to save the information which you have already given in the data elements page and check it. Before going to data element page, you have to activate the domain.

6. Go to data element page and save, check and activate.

7. Go to main table page and save, check, and activate.

8. Also, you have to save the technical settings of the table.

The table is now ready for operation. You can use it in your program or you can use it to enter information.

Check table: It is the table which will have all the information about the Foreign keys which are the primary keys in the check table.

It can be created by creating the foreign key from the main table. Click foreign key in the main table and it will take you to a page which will ask for table name and field to which foreign key relation has to be associated. Enter the information and you can create the check table automatically.

SM30 is used for maintenance of the table, that is to realease the errors occured during the creation of the table.

Well, this is the information I have.

reward points if it is usefull ...

Girish

Read only

Former Member
0 Likes
1,079

Procedure

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