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

diff b/w reference type and elementary type

Former Member
0 Likes
2,619

hi all

can any one what is the diff b/w reference type and elementary type in data element ....

thanks

lokesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,159

The data type attributes of a data element can be defined by:

Specifying a domain whose attributes are copied by the data element.

Specifying a build-in type where the data type, number of places, and possibly decimal places can be directly specified.

Specifying a reference type, i.e. reference to a class, an interface, a type defined in the Dictionary, a built-in type, or a generic reference to ANY or DATA.

In the maintenance screen you can set the option you require by setting the appropriate flag (domain, built-in type, reference type) and filling in the corresponding input fields.

A reference type is a reference to another type. There are the following kinds of reference types:

Reference to a class or an interface

Reference to a type defined in the Dictionary

Generic reference to ANY, OBJECT, or DATA

Reference to a built-in Dictionary type with specification of the length and possibly also the decimal places

You can use a reference type to define the data type properties for a data element, or for typing the component of a structure or the line type of a table type.

In the field Referenced type, enter the name of a class, an interface, the generic references DATA, OBJECT, ANY, or the name of a type defined in the Dictionary. If the reference type is to be a predefined Dictionary type, choose the reference to the predefined type. Enter the number of characters and, if required, the number of decimal places.

where as

The data class describes the data format at the user interface.

If a table field or structure field or a data element is used in an ABAP program, the data class is converted to a format used by the ABAP processor. When a table is created in the database, the data class of a table field is converted to a corresponding data format of the database system used.

You can find a detailed description of the data classes allowed in the ABAP Dictionary in Overview of the Data Classes.

2 REPLIES 2
Read only

Former Member
0 Likes
1,160

The data type attributes of a data element can be defined by:

Specifying a domain whose attributes are copied by the data element.

Specifying a build-in type where the data type, number of places, and possibly decimal places can be directly specified.

Specifying a reference type, i.e. reference to a class, an interface, a type defined in the Dictionary, a built-in type, or a generic reference to ANY or DATA.

In the maintenance screen you can set the option you require by setting the appropriate flag (domain, built-in type, reference type) and filling in the corresponding input fields.

A reference type is a reference to another type. There are the following kinds of reference types:

Reference to a class or an interface

Reference to a type defined in the Dictionary

Generic reference to ANY, OBJECT, or DATA

Reference to a built-in Dictionary type with specification of the length and possibly also the decimal places

You can use a reference type to define the data type properties for a data element, or for typing the component of a structure or the line type of a table type.

In the field Referenced type, enter the name of a class, an interface, the generic references DATA, OBJECT, ANY, or the name of a type defined in the Dictionary. If the reference type is to be a predefined Dictionary type, choose the reference to the predefined type. Enter the number of characters and, if required, the number of decimal places.

where as

The data class describes the data format at the user interface.

If a table field or structure field or a data element is used in an ABAP program, the data class is converted to a format used by the ABAP processor. When a table is created in the database, the data class of a table field is converted to a corresponding data format of the database system used.

You can find a detailed description of the data classes allowed in the ABAP Dictionary in Overview of the Data Classes.

Read only

abdul_hakim
Active Contributor
0 Likes
1,159

hi

ref type is for refferring to the classes.

for eg,

data ref type ref to <class name>.

elementary type for reffering normal dataobjects..

for eg,

data a1 type i.

data matnr like mara-matnr.

Cheers,

Abdul Hakim