Summary -

In this topic, we described about the below sections -

What is Data Element?

Data elements specifies the semantic information of table field. Data element gives the detailed information about fields.

Data element used to define the type of the field, structure or table row. Data element contains the information about editing the corresponding screen field and table field meaning or structure component.

The data element information is automatically available to all screen fields that refer to the data element. Data element defines either elementary type or reference type.

The elementary type is defined by built-in data type. The reference type is defined by using reference variables containing pointers to other objects or interfaces.

Below diagram explains the role of data element in the table definition -

Data Elements Diagram

Create Data Element -

Before creating a new data element, check if any existing data element have the same required specifications. If exists, then we must use the existing data element. If not exists, create a new element using the below steps -

Step-1: Go to SE11 transaction.

Create Data Element

It opens "ABAP Dictionary: Initial Screen".

Create Data Element

Step-2: Select "Data Type" radio button and enter the "Data Type" name. Click on "Create" button.

Create Data Element

Next, the Create Type dialog box gets opened. Select "Data element" and click on "Continue" mark.

Create Data Element

Next, the "Dictionary: Change Data Element screen" gets opened.

Create Data Element

Step-3: Enter the "Short Description" and search the Domain details from the existing list. In this example, we are using the existing domain name "Z_CUST_GENDER".

Create Data Element

Step-4: Once the domain selected, Open the "Field Label" tab to enter the Short, Medium, Long and Heading length and field labels.

Create Data Element

Note! The Short length must be greater than or equal to 10. The Medium, Long, Heading lengths should be greater than or equal to 15.

Step-5: Next, open "Data Type" tab and press "(Ctrl + S)" to save the data element. System asks for the package. Enter existing package if any, or create new package.

Create Data Element

Once the package information entered, click on "Local Object(If it is a local and non transportable object)" or "Save" icon to create the data element.

Step-6: Once the data element saved successfully, the "Z_CUST_GENDER saved" message displayed on status bar.

Create Data Element

Step-7: Once the Data element successfully saved message displayed, click on Activate button or Ctrl +F3 to activate the data element.

Create Data Element

Note! At this point it displays all inactive data element list if any other inactive data element exists. Select the appropriate data element that needs to activate.

If the data element activated successfully, the "Object activated" message displayed on status bar.

Create Data Element

Data element now created and activated. If error messages or warnings occurred during the activation of the data element, the activation log gets displayed automatically. The same activation log can navigate through menu option Utilities(M) → Activation log.


Change Data Element -

If any information in the data element updated wrongly, Data element requires to be changed. Change data element option is used to change the data element properties and follow the below steps to change data element.

Step-1: Go to SE11 transaction.

Change Data Element

It opens "ABAP Dictionary: Initial Screen".

Change Data Element

Step-2: Enter the "Data Type" name and click on the "Change" button.

Change Data Element

Step-3: Click on "Save" icon once the required information modified. Verify the below message gets displayed on status bar.

Change Data Element

Step-4: Click on "Activate" button or "Ctrl +F3" to activate the new changes of the data element. Verify the below message gets displayed on status bar.

Change Data Element

Delete Data Element -

If we want to delete the existing data element or a data element is wrongly created, follow the below steps to delete data element.

Step-1: Go to SE11 transaction.

Delete Data Element

It opens "ABAP Dictionary: Initial Screen".

Delete Data Element

Step-2: Enter the "Data Type" and click on the "Delete" icon.

Delete Data Element

Next, Delete data element popup gets opened for confirmation and click on "Yes" to delete the data element.

Delete Data Element

Once the data element successfully deleted, the below message displays on status bar.

Delete Data Element