Skip to main content

Data Elements

Data Elements are a further abstraction layer to define data. Data Elements are used to define fields in tables and strucutres.

Data Elements can be an instance of a user-defined Domain, or they can be defined using built-in data types directly.

When you create a Data Element you can also provide additional information such as field labels, documentation, and search help. These add further context to how the data is used in the application.

Creating a Data Element

To create a Data Element, follow these steps:

  1. Go to transaction code SE11.
  2. Select "Data Type".
  3. Then you will see dialog with 3 options, select "Data Element" and enter a name for your Data Element.
  4. If you have already created a Domain, you can link it here by entering the Domain name. Otherwise, you can define using built-in data types directly.
  5. Provide field labels, documentation, and search help as needed.
  6. Save and activate the Data Element.

Use case of Data Elements

Data Elements are used when you want to define tables or structures. Taking previous examples in the Domain section about country codes and percentages. You can create multiple Data Elements using the same Domain.

Examples

Logistic Company

Lets say you are working for a logistic company and you have to create a table to store shipment details. Some of the fields can be

  • Country of Origin (From where the shipment is sent)
  • Destination Country (Where the shipment is going)
  • Current Country (Where the shipment is currently located) You can create Data Elements for each of these fields using the ZCOUNTRY_CODE Domain created earlier. You will define a Data Element for each field like this:
    Field NameData Element NameDomain
    Country of OriginZDE_COUNTRY_ORIGINZCOUNTRY_CODE
    Destination CountryZDE_DESTINATION_COUNTRYZCOUNTRY_CODE
    Current CountryZDE_CURRENT_COUNTRYZCOUNTRY_CODE

Now each of these can be used in the shipment table to ensure consistency. These might also be used in other tables across the system that require country codes in similar contexts.

Sales Application

In a sales application, you might have fields like

  • Discount Percentage
  • Tax Percentage You can create Data Elements for these fields using the ZPERCENTAGE Domain created earlier. You will define a Data Element for each field like this:
    Field NameData Element NameDomain
    Discount PercentageZDE_DISCOUNT_PERCENTAGEZPERCENTAGE
    Tax PercentageZDE_TAX_PERCENTAGEZPERCENTAGE

These Data Elements can be used in various tables, like sales orders, purchase orders, invoices, etc., ensuring that percentage values are consistently defined and validated across the application.