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

Difference between type definition using a field and data element

0 Likes
573

Hi,

I would like to know if there would be any difference in defining TYPE statements.

Below is an example:

TYPES : BEGIN OF ty_resb,

aufnr TYPE aufnr,

END OF ty_resb.

or

TYPES : BEGIN OF ty_resb,

aufnr TYPE resb-aufnr,

END OF ty_resb.

Among the above declarations which is efficient and why

2 REPLIES 2
Read only

Former Member
0 Likes
399

I guess the first one is better since a reference to a data element directly will automatically fetch the technical attributes of the field, whereas when you declare with reference to a table field, the table will get the reference first, then the field and then the data element, You could guess why the first one is better now

Vikranth

Read only

Former Member
0 Likes
399

vikrant is absolutely correct..

but some times for F4 helps we use tablename-field name... when you cant find the F4 with data element(domain)...