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: 

Difference between DDIC structure and structure made in class.

0 Kudos

Is there a big difference between a DDIC structure created via t-code SE11 and a structure made as an attribute in an ABAP class?

When would you prefer to make one over the other?

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos

A DDIC structure looks like a structured *TYPE* in a class (TYPES), not an attribute (DATA/CLASS-DATA).

Always prefer to define a type in a class (or interface), and if it's not possible then define a DDIC structure.

Here are some examples when A DDIC structure is required:

  • To type a parameter of a RFC-enabled function module
  • To define a list of reusable components in several DDIC structures or tables
  • etc.

Muthu_raja
Active Participant
0 Kudos

Hi,

I am not sure that I have understood your question completely,

DDIC Structure: Once Structure has been created via SE11, It will be common to all objects. we can utilize it in any of our objects ( classes, programs.. ) by directly refer that structure.

Class Structure: We can directly refer the global structure ( SE11 ) in the attribute or can create our own structure with TYPES and refer it. This Structure ( TYPES ) will be visible outside of the class also if it is an public.

If your structure needs to be utilized only in the class, you can create the structure inside the class than creating in SE11.

Please let me know if you need more details.

matt
Active Contributor

I use class/interface based types when the type is related only and solely to the class or interface (even if used by other classes/interfaces). Otherwise DDIC.