09-12-2008 12:25 PM
Hi,
I am creating a new structure in my program in ABAP Editor. The fields of this table will be all the fields in a custom table plus an additional field which is not a part of this table. The table has some 150 fields so I need to include it in my structure. I am using it in this way but its giving error:
TYPES: BEGIN OF t_struct,
INCLUDE TYPE zcustom_table,
zzfield TYPE c,
END OF t_struct.
This structure is getting created but giving an error when I am creating a table of this type as:
DATA : i_tab TYPE STANDARD TABLE OF t_struct WITH HEADER LINE.
Please suggest me how can get rid if this error.
Thanks,
Abhishek
09-12-2008 12:28 PM
hi,
you have to code like this:
TYPES: BEGIN OF t_struct.
INCLUDE STRUCTURE zcustom_table.
TYPES : zzfield TYPE c,
END OF t_struct.
work area:
DATA : gw_struct TYPE t_struct.
internal table:
DATA : gt_struct TYPE STANDARD TABLE of t_struct.
hope this helps
ec
09-12-2008 12:28 PM
hi,
you have to code like this:
TYPES: BEGIN OF t_struct.
INCLUDE STRUCTURE zcustom_table.
TYPES : zzfield TYPE c,
END OF t_struct.
work area:
DATA : gw_struct TYPE t_struct.
internal table:
DATA : gt_struct TYPE STANDARD TABLE of t_struct.
hope this helps
ec
09-12-2008 12:30 PM
Hi,
the syntax you declared is wrong,
check the below code , it will solve your problem
TYPES: BEGIN OF t_struct.
INCLUDE TYPE zcustom_table.
types : zzfield TYPE c.
types : END OF t_struct.
DATA : i_tab TYPE STANDARD TABLE OF t_struct WITH HEADER LINE.
regards
prasanth