2007 Oct 25 7:03 PM
Hi All,
I have a small question. Please help me resolve this.
I am declaring 2 internal tables.
TYPES: BEGIN OF ITAB1,
COL1(5),
COL2(5),
END OF ITAB1.
DATA: ITAB2 TYPE TABLE OF ITAB1 WITH HEADERLINE.
DATA: BEGIN OF ITAB3,
COL1(5),
COL2(5),
END OF ITAB1.
DATA: ITAB4 LIKE TABLE OF ITAB3 WITH HEADERLINE.
Both the tables ITAB2 and ITAB4 have body and the work area defined in that.. Am I right?
And ITAB3 as such can be separately used as workarea, but ITAB1 cannot be used... Is this right?
Expecting the reply at the earliest...
Thanks in advance,
Smitha
2007 Oct 25 7:07 PM
Hi,
Both the tables ITAB2 and ITAB4 have body and the work area defined in that.. Am I right? Yes, you are right.
And ITAB3 as such can be separately used as workarea, but ITAB1 cannot be used... Is this right? Yes, this is right.
Regards,
Ferry Lianto
Hi,
Both the tables ITAB2 and ITAB4 have body and the work area defined in that.. Am I right? Yes, you are right.
And ITAB3 as such can be separately used as workarea, but ITAB1 cannot be used... Is this right? Yes, this is right.
Regards,
Ferry Lianto
2007 Oct 25 7:07 PM
Hi,
Both the tables ITAB2 and ITAB4 have body and the work area defined in that.. Am I right? Yes, you are right.
And ITAB3 as such can be separately used as workarea, but ITAB1 cannot be used... Is this right? Yes, this is right.
Regards,
Ferry Lianto
2007 Oct 25 7:12 PM
Hi Ferry Lianto,
Thankyou very much...
Also my doubt is that ITAB1 is not even a structure, which cannot be used as work area..?
Thanks,
Smitha
2007 Oct 25 7:11 PM
hi Smitha,
u can Declare the itab3 using HeaderLine 2, only insert "Occurs n" at code, like:
DATA: BEGIN OF ITAB3 <b>occurs 0</b>,
COL1(5),
COL2(5),
END OF ITAB1.
maybe it's help u 2...
Regards
Allan Cristian
2007 Oct 25 7:15 PM
Both are correct.
Type declarations you do when ever you wanted to create your own structure....
In ECC some rules for the internal tables should be followed i guess...
do not used header line.
compsary used work area.
so some examples
data: it_db type standard table of kna1,
wa_db type kna1.
types: begin of ty_itab,
fiel1..
2
3
end of ty_itab.
data: it_db type standard table of ty_itab,
wa_db type ty_itab.
so thats y u used types declaration....
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |