‎2006 Jan 26 7:31 AM
Hi,
Iam trying to declare two strucures into one itab like this.
data: begin of t_qmel occurs 0.
<b> include structure qmel.
include structure qmih.</b>
data: fegrp like qmfe-fegrp,
fecod like qmfe-fecod,
data: end of t_qmel.
Since common fields(MANDT & QMNUM) are existing in QMIH it is throwing the error.How can i avoid that? I dont want to declare field by field using QMIH.
cheers
kaki
‎2006 Jan 26 7:49 AM
You can include the second structure by adding a suffix like this:
INCLUDE STRUCTURE qmih AS name1 RENAMING WITH SUFFIX name2.
Effect
You can address the components included in INCLUDE STRUCTURE as a single entity using the group name name1. The behavior is the same as in addition 1. When the components of the structure s are included, the component names are renamed by appending the name name2. This allows you to include structure s more than once.
Hope this helps,
Rao A
Message was edited by: Rao Arimilli
‎2006 Jan 26 7:49 AM
You can include the second structure by adding a suffix like this:
INCLUDE STRUCTURE qmih AS name1 RENAMING WITH SUFFIX name2.
Effect
You can address the components included in INCLUDE STRUCTURE as a single entity using the group name name1. The behavior is the same as in addition 1. When the components of the structure s are included, the component names are renamed by appending the name name2. This allows you to include structure s more than once.
Hope this helps,
Rao A
Message was edited by: Rao Arimilli
‎2006 Jan 26 7:58 AM
&----
*& Report YCHATEST *
*& *
&----
*& *
*& *
&----
REPORT YCHATEST .
TYPES: BEGIN OF rec1,
f1(1) TYPE C,
f2 TYPE I,
END OF rec1.
TYPES: BEGIN OF rec2.
INCLUDE TYPE rec1 AS g RENAMING WITH SUFFIX _g.
INCLUDE TYPE rec1 AS h RENAMING WITH SUFFIX _h.
TYPES: END OF rec2.
DATA: str TYPE rec2.
The structure str consists of four components str-f1_g, str-f2_g, str-f1_h and str-f2_h. Using the group component str-g you can address the first two components; you can then address the latter two using str-h These substructures are of the type rec1.
‎2006 Jan 26 8:03 AM