‎2007 Aug 16 4:31 PM
Hi,
I created
Types: begin of itab,
field 1 ...
-
-
Field 30,
End of itab.
Data: lt_itab type table of itab.
I need to create a second type itab1 with all the itab fields and also new fields field31 and field32.
I dont want to declare all the 30 fields again for the second one.
Can any one tell me how to create this?
Thanks.
rajesh
‎2007 Aug 16 4:38 PM
You can INCLUDE TYPE.
Types: begin of itab,
field1 type string,
field2 type string,
* More Fields in here.
Field30 type string,
End of itab.
Data: lt_itab type table of itab.
TYPES BEGIN OF new_itab.
INCLUDE type itab.
TYPES: field31 type string,
field32 type string,
END OF new_itab.
Regards,
Rich Heilman
‎2007 Aug 16 4:35 PM
Like this..
TYPES BEGIN OF new_itab.
INCLUDE STRUCTURE itab.
TYPES: initiator_per_no TYPE ptreq_actor-objid,
* declare your other fields here which are different
END OF new_itab.
A.
‎2007 Aug 16 4:38 PM
hi, if u have already created a internat table with the fields and you want to use those fields in creating of another table, follow the below format to do so.
Data: begin of ty_itab2.
include structure itab1.
<fields>.
Data: end of ty_itab2.
it will work, reward points if help ful
‎2007 Aug 16 4:38 PM
You can INCLUDE TYPE.
Types: begin of itab,
field1 type string,
field2 type string,
* More Fields in here.
Field30 type string,
End of itab.
Data: lt_itab type table of itab.
TYPES BEGIN OF new_itab.
INCLUDE type itab.
TYPES: field31 type string,
field32 type string,
END OF new_itab.
Regards,
Rich Heilman
‎2007 Aug 16 4:39 PM
‎2007 Aug 16 5:09 PM
Hi ,
Thanks for all my problem solve,
I gave the points all usefull answers.
Thanks.
Rajesh