Hi Dharmaraj,
When you include a structure in a table type, using include, you dont create a heirarchical structure, all the fields will be in the same heirarchy. All the fields in the structure would be included in the table just as if they were directly included.
To access it, you just access with the table type and field, the structure name is not there.
eg table is ztable, and you include structure struct having field fldA, fldB, and fldC.
now to access fldA, fldb or fldC, you dont access as ztable-struct-fldA, but directly as ztable-fldA.
Here a structure addr2_comm is included.
You access the fields in it just like country field. All the field in the includ arre added, just as if they were directly not, as any sub structure.
Similar is the way when you declare a type in ABAP program.
TYPES: BEGINOF typ1,
mandt TYPE mandt,
land1 TYPE land1.
includestructure addr2_comm.
types: ENDOF typ1.
TYPES: BEGINOF typ2,
mandt TYPE mandt,
land1 TYPE land1,
addr2_com like addr2_comm,
ENDOF typ2.
data : it1 typetableof typ1 WITHHEADERLINE, it2 typetableof typ2 WITHHEADERLINE.
FOr the first type of table, the structure will not form any heirarchy, you can access the firelds in addr2_comm direcltly.
eg it1-tel_number.
However, for the second type, when you are declaring a structure inside table type using like addition, we will have to access it specify the structure name also. eg it2-addr2_comm-tel_number.
Hope that makes it clear.