‎2005 Dec 21 10:03 AM
Hi ABAP Experts,
I have a DDIC Strucutue ZSTRU_1 which has the fields as follows.
C0 TYPE C.
C1 TYPE INT4.
Now in a report i want to declare a TYPE which should have the fields of ZSTRU_1 and some extra fields. So my Type should ideally look as follows.
TYPES: BEGIN OF ZSTRU_2,
C0 TYPE C,
C1 TYPE INT4,
C2 TYPE C,
C3 TYPE C,
END OF ZSTRU_2.
So is there any way to include the structure ZSTRU_1 in
ZSTRU_2 programatically.
‎2005 Dec 21 10:06 AM
Hi,
You can define it like -
TYPES : BEGIN OF ZSTRU_2.
INCLUDE STRUCTURE ZSTRU_1.
TYPES: C2 TYPE C,
C3 TYPE C.
TYPES: END OF ZSTRU_2.
Hope this will help you,
Regards
Amit
‎2005 Dec 21 10:06 AM
Hi,
You can define it like -
TYPES : BEGIN OF ZSTRU_2.
INCLUDE STRUCTURE ZSTRU_1.
TYPES: C2 TYPE C,
C3 TYPE C.
TYPES: END OF ZSTRU_2.
Hope this will help you,
Regards
Amit
‎2005 Dec 21 10:07 AM
Hi Vinayaka,
1. Use this kind of syntax.
Instead of T001, use ZSTRU_1.
DATA : BEGIN OF zstru_2.
INCLUDE STRUCTURE t001.
DATA : f1 TYPE c,
f2 TYPE c,
END OF zstru_2.
Regards,
Amit M.
‎2005 Dec 21 10:24 AM
types : BEGIN OF zstru_2.
INCLUDE STRUCTURE zstru_1.
DATA : C0 TYPE C,
C1 TYPE INT4,
C2 TYPE C,
C3 TYPE C,
END OF zstru_2.