10-08-2007 8:26 AM
Hi,
All
how to declare the below statements using types
DATA: t_j_1bagnt OCCURS 0.
INCLUDE STRUCTURE j_1bagnt.
DATA: END OF t_j_1bagnt.
DATA: BEGIN OF t_j_1bnflin_t OCCURS 0.
INCLUDE STRUCTURE j_1bnflin.
DATA: END OF t_j_1bnflin_t.
DATA: BEGIN OF t_j_1bnfstx_t OCCURS 0.
INCLUDE STRUCTURE j_1bnfstx.
DATA: END OF t_j_1bnfstx_t.
DATA: BEGIN OF t_j_1binlin_t OCCURS 0.
INCLUDE STRUCTURE j_1binlin.
DATA: END OF t_j_1binlin_t.
very very urgent i am facing some problems with the declaration if a structure..
10-08-2007 8:39 AM
DATA: t_j_1bagnt OCCURS 0.
INCLUDE STRUCTURE j_1bagnt.
DATA: END OF t_j_1bagnt.
" the above is same as
TYPES: BEGIN OF ty_j_1bagnt.
INCLUDE TYPE j_1bagnt. " use of TYPE is suggested
TYPES: END OF ty_j_1bagnt.
DATA : t_j_1bagnt TYPE TABLE OF ty_j_1bagnt, " this is an internal table
wa_j_1bagnt type ty_j_1bagnt. " this is a work area
" Make sure you dont use the work area as internal table,
" internal table can contain multiple records
" work area can contain only one record its just liek a strucuture
Regards
Gopi
10-08-2007 8:30 AM
The declaration in ur previous post is correct.
example , how to declare the following using types is:
DATA: begin of t_j_1bagnt OCCURS 0.
INCLUDE STRUCTURE j_1bagnt.
DATA: END OF t_j_1bagnt.
using types the above,
types: begin of typ_j_1bagn.
INCLUDE STRUCTURE j_1bagnt.
DATA: END OF t_j_1bagnt. <b>"THIS IS TYPE DECLARATION.</b>
data: t_j_1bagnt type table of typ_j_1bagn<b>,"internal tab</b>
wa_j_1bagn like line of t_j_1bagnt. "<b>work area</b>
Message was edited by:
Hymavathi Oruganti
10-08-2007 8:39 AM
DATA: t_j_1bagnt OCCURS 0.
INCLUDE STRUCTURE j_1bagnt.
DATA: END OF t_j_1bagnt.
" the above is same as
TYPES: BEGIN OF ty_j_1bagnt.
INCLUDE TYPE j_1bagnt. " use of TYPE is suggested
TYPES: END OF ty_j_1bagnt.
DATA : t_j_1bagnt TYPE TABLE OF ty_j_1bagnt, " this is an internal table
wa_j_1bagnt type ty_j_1bagnt. " this is a work area
" Make sure you dont use the work area as internal table,
" internal table can contain multiple records
" work area can contain only one record its just liek a strucuture
Regards
Gopi
10-08-2007 8:40 AM
HI
u can declare in the following way
1)types: begin of t_j_1bagnt.
INCLUDE STRUCTURE j_1bagnt.
DATA: END OF t_j_1bagnt
data: typ_j_1bagnt type table of t_j_1bagnt, ->internal table
wa_j_1bagnt like line of t_j_1bagnt. -> work area
2)TYPES: BEGIN OF t_j_1bnflin_t.
INCLUDE STRUCTURE j_1bnflin.
DATA: END OF t_j_1bnflin_t.
data: typ_j_1bnflin_t type table of t_j_1bnflin_t,
wa_j_1bnflin type t_j_1bnflin_t.
in the same way reamining 2 too
regards
sandhya
10-08-2007 8:57 AM
TYPES: begin of t_j_1bagnt.
INCLUDE STRUCTURE j_1bagnt.
DATA: END OF t_j_1bagnt.
why it was written as DATA in the ending ( DATA: END OF t_j_1bagnt ).
10-08-2007 8:59 AM
10-08-2007 9:03 AM
no my doubt was that i have declared as Types: begin of t_xyz
and in the ending i am writing it as data: endof t_xyz.
what is the exact meaning of this declaration.
10-08-2007 9:05 AM
HI,
its a wrong syntax.
if u write begin of using types u have write end of also using types.
rgds,
bharat.
10-08-2007 8:44 AM
types: begin of ty_t_j_1bagnt,
INCLUDE STRUCTURE j_1bagnt,
END OFty_ t_j_1bagnt,
tt_ t_j_1bagnt type standard table of ty_t_j_1bagnt.
types: begin of ty_t_j_1bnflin_t,
INCLUDE STRUCTURE j_1bnflin,
END OFt_j_1bnflin_t,
tt_t_j_1bnflin_t type standard table of ty_t_j_1bnflin_t.
data: it_t_j_1bagnt type tt_ t_j_1bagnt,
wa_t_j_1bagnt type ty_t_j_1bagnt,
it_t_j_1bnflin_t type tt_t_j_1bnflin_t,
wa_ tt_t_j_1bnflin_t type ty_t_j_1bnflin_t.
this is how u need to declare....
reward points if helpful.........