Application Development 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: 

Regarding Domain and DATAELEMENT in abap..

Former Member
0 Kudos

    Hi Everyone,

            I have a small doubt regarding DOMAIN and DATAELEMENTS in abap. During Table creation in SE11 we always declare one dataelement for each field, But my doubt is instead of creating dataelements why SAP ddnt provide the options so that instead of creating dataelements we can directly put DOMAIN there, afterall dataelements is mapped to some specific DOMAIN only..Is there any benifit of creating DATAELEMENT ? Please provide me your experienced knowledge..

Thank you

1 ACCEPTED SOLUTION

former_member182041
Active Contributor
0 Kudos

Hi,

While creating fields in a dictionary table, you can directly give the datatype instead of data element by selecting menu EDIT->Predefined type.

Regarding the second doubt, let's say in future the data type characteristics for a particular field e.g. telephone number changes to 13 digits instead of current no. of digits. For such scenarios only the data element needs to be changed once and it would get reflected everywhere the data element is being used. Also, data element gets used in programs and hence there would be no impact in case of changes. Moreover, data element adds semantic feature to the data type which gets used in programs as well. You could sap help to read more. Thanks!

Regards,

Kumud

4 REPLIES 4

vinoth_aruldass
Contributor
0 Kudos

Domain is a technical attributes of an element and it is having a value range .

A data element is an elementary type. It describes the type attributes (data type, field length and possibly the number of decimal places) and screen information (explanatory text or field help) about unstructured data objects (table fields and structure fields or variables).

A data element can be referenced in ABAP programs with TYPE. This permits you to define variables that take on the type attributes of the data element in an ABAP program.

But Domain you cannot declare with type.

Do some SCN search for more information.

hope it helps,

Vinoth.

former_member491621
Contributor
0 Kudos

Hi Sanjib,

During Table creation in SE11 we always declare one dataelement for each field.

We do not necessarilly need to use data element for fields. We can use pre-defined types for fields.

former_member182041
Active Contributor
0 Kudos

Hi,

While creating fields in a dictionary table, you can directly give the datatype instead of data element by selecting menu EDIT->Predefined type.

Regarding the second doubt, let's say in future the data type characteristics for a particular field e.g. telephone number changes to 13 digits instead of current no. of digits. For such scenarios only the data element needs to be changed once and it would get reflected everywhere the data element is being used. Also, data element gets used in programs and hence there would be no impact in case of changes. Moreover, data element adds semantic feature to the data type which gets used in programs as well. You could sap help to read more. Thanks!

Regards,

Kumud

0 Kudos

Hi Kumud,

       Thank you for your answer...