12-18-2008 4:21 AM
Hii
I have a structure BISEG
i need to declare an internal tabel with that structure BISEG + some additional fields
i did like below please advise if this correct
TYPES begin of types ty_itab
include type BISEG
xxxx type xxx
xxxx type xxx
End of types ty_itab
DATA:
itat TYPE standard tabel of ty_itab
note i don't want to use header line
12-18-2008 4:28 AM
Hi check this,
TYPES: begin of ty_itab.
INCLUDE STRUCTURE BISEG.
TYPES: xxxx type xxx,
xxxx type xxx,
End of ty_itab.
DATA:
itab TYPE standard table of ty_itab.
Regards
12-18-2008 4:25 AM
hi,
TYPES: BEGIN OF ty_record.
INCLUDE STRUCTURE pa0008.
TYPES: v_pernr TYPE pa0008-pernr,
v_begda(10),
v_endda(10).
TYPES: END OF ty_record.
Use like this .
Regards,
Arjun.
12-18-2008 4:26 AM
Hello newbie82 c,
Use:-
DATA : begin of itab. "without header line
INCLUDE STRUCTURE BISEG. "creates the same structure as of BISEG
DATA : xxxx type xxx, "other fields
xxxx type xxx,
end of itab.
This will create an internal table without header line.
Use 'OCCURS 0' after 'begin of itab' if you want to create an internal table with header line.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
12-18-2008 4:28 AM
Hi check this,
TYPES: begin of ty_itab.
INCLUDE STRUCTURE BISEG.
TYPES: xxxx type xxx,
xxxx type xxx,
End of ty_itab.
DATA:
itab TYPE standard table of ty_itab.
Regards
03-24-2023 7:22 AM
TYPES: begin of ty_itab.
INCLUDE TYPE BISEG.
TYPES: ABC type ABC,
End of ty_itab.
DATA:
03-24-2023 7:37 AM
As siddharthpurohit51087 indicates, the "Best Answer" here is obsolete. INCLUDE TYPE is now preferred.
12-18-2008 4:28 AM
Hi,
The code is correct, it will create the table without header line.
But I will suggest a small modification
TYPES: begin of ty_itab,
include type BISEG,
XXX TYPE xxx,
End of ty_itab.
DATA:
itat TYPE standard table of ty_itab.
With best regards,
Navneet Chaubey
Edited by: Navneet Chaubey on Dec 18, 2008 5:28 AM
12-18-2008 4:30 AM
Hi,
try this
create a temp structure with ur additional fields...
types : begin of t_temp,
xxxx type xxx,
xxxx type xxx,
end of t_temp.
then,
TYPES : begin of types ty_itab.
include type BISEG.
include type t_temp.
TYPES : End of types ty_itab.
DATA : itat TYPE standard tabel of ty_itab,
wa like line of itat.
regards,
Mr.A
12-18-2008 4:45 AM
01-07-2009 12:44 AM
Hello All:
Can I reopen this q, I searched but couldn't find a confirmative answer.
Instead of creating a type as below
TYPES begin of types ty_itab
include type BISEG
xxxx type xxx
xxxx type xxx
End of types ty_itab
I need to create the type with include structure after the additonal fields.
TYPES begin of types ty_itab
<fld1> type <ty1>
<fld2> type <ty2>
include type <struc>
End of types ty_itab
Can someone give the right syntax?
Please help,
Fred.