In this post, you will learn how to create dictionary objects like tables, data elements, and domains from Eclipse.

  • How to create tables in Eclipse ADT?
  • How to create data elements in Eclipse ADT?
  • How to create domains in Eclipse ADT?

When you use SAPGUI Data Dictionary transaction (SE11) you get a graphical editor. Eclipse has code based editor for creating tables as well. This will be the only option when it comes to the ABAP system on the cloud.

Table

To create a table, go to your package, right-click, and choose New->Other ABAP Repository Object.

Type ‘table’ in the search box, and choose Database Table.

Enter the Name and Description of the table you want to create.

Save it in a TR and click Finish. Once you click on finish, you get the below screen for the table.

This is a lot different from SE11, isn’t it? It is more aligned with the way we define CDS views. But, notice one thing – there are no tabs to go to. All information is on a single screen.

At the top, we have annotations that cover the settings/attributes of the table.

  • @EndUserText.label : This is the table description
  • @AbapCatalog.enhancement.category : Enhancement Category
  • @AbapCatalog.tableCategory : Type of table – usually it will be #TRANSPARENT
  • @AbapCatalog.deliveryClass : Delivery Class (A, C, L, G, E, S, W)
  • @AbapCatalog.dataMaintenance : #RESTRICTED

Now, you can add some fields.

Once you add the fields, then remember we need to maintain technical settings? There is a Technical Settings node.

One good thing is that it defaults, unlike SE11. You can change it as below.

This may appear to be a difficult encounter when you start using this, but it gets a lot easier with practice. Also, copying the tables, fields, etc becomes very simple.

Below is a sample code –

@EndUserText.label : 'Test Table'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table zjp_test_table {
  key client  : abap.clnt not null;
  key key_fld : abap.char(10) not null;
  field1      : abap.dats;
  field2      : abap.int1;
}

You can add, currency and quantity references using annotations at are field level.

define table zmmovie {
  key client : abap.clnt not null;
  key movie  : zmdmovie not null;  
  @Semantics.amount.currencyCode : 'zmmovie.currency'
  openingcol : abap.curr(23,2);
  currency   : abap.cuky;
}

You can also add foreign keys like below.

define table zmmovieav {
  key client : abap.clnt not null;
  @AbapCatalog.foreignKey.label : 'ToMovie'
  @AbapCatalog.foreignKey.screenCheck : true
  key movie  : zmdmovie not null
    with foreign key zmmovie
      where client = zmmovieav.client
        and movie  = zmmovieav.movie;
}

Data Element

Data element screens are similar to the SAPGUI editor but have a single screen which makes the creation more accessible.

All information is in one screen, so you don’t forget to maintain Field Labels.

Domain

Domain also gets a concise single screen.

To summarize creating data elements and domains gets log simpler and once you get used to table editor, I am sure you will prefer this over the SE11 editor.

Visit ABAP on HANA series for Tutorials on CDS, AMDP, Eclipse, and ALV IDA.


If you like the content, please subscribe…

Join 4,016 other subscribers

Discovering ABAP YouTube Channel