2005 Dec 14 3:56 PM
I have declared a 'table in table' structure. (is it called deep structure?)
TYPES: BEGIN of ty_test1
header TYPE ty_header,
detail TYPE ty_detail OCCURS 0,
END of ty_test1.
DATA: it_test TYPE STANDARD TABLE OF ty_test1 WITH HEADER LINE OCCURS 0.
Can I also have a header line declared for the structure 'detail' inside the internal table so that I can use related functions LIKE 'MOVE-CORRESPONDING', 'SELECT..INTO CORRESPONDING FIELDS...' and 'LOOP AT it_test-detail'?
Thanks!
2005 Dec 14 4:02 PM
Hi,
Yes you can Declare.
But I am not sure about this deep structure.
2005 Dec 14 4:02 PM
Hi,
Yes you can Declare.
But I am not sure about this deep structure.
2005 Dec 14 4:10 PM
I don't think it's possible to have a header line.
You have to declare a aux. structure.
But Phani may Know another way, for his reply.
Alexandre Nogueira.
2005 Dec 14 4:15 PM
2005 Dec 14 4:23 PM
Ok, here is a little sample. Put it in debug and watch it work.
Types: ty_header(10) type c,
ty_detail(10) type c.
types: begin of ty_test1,
header type ty_header,
detail type ty_detail occurs 0,
end of ty_test1.
data: it_test type standard table of ty_test1 with header line.
data: wa_test type ty_test1.
data: it_detail type table of ty_detail.
data: wa_detail type ty_detail.
wa_detail = 'blahblahblah'.
append wa_detail to it_detail.
wa_test-detail[] = it_detail[].
append wa_test to it_test.
Check sy-subrc = 0.
Regards,
Rich Heilman
2005 Dec 14 4:08 PM
yes u can declare
data : wa_test like it_test.
Message was edited by: chandrasekhar jagarlamudi