‎2008 Jul 31 11:06 AM
Abapers,
I am declaring internal table like this way in 4.7, will it work in ECC 6.0?
data : begin of i_mara occurs 0,
matkl like mara-matkl,
end of i_mara.
thanks
‎2008 Jul 31 11:16 AM
It does work in ECC 6, but the declaration of an internal table using OCCURS is obsolete. The EPC check will throw up a message when you use the declaration. Its better to declare a table using LIKE or TYPE referring to a field string or work area.
DATA:
Begin of fs_string,
matkl type mara-maktl,
End of fs_string.
DATA:
IT_Table like standard table
of fs_string
initial size 0.
‎2008 Jul 31 11:07 AM
Hi,
Yes it will work.
Note: Table with header line shows error in EPC in ecc 6.0.
Regards
Adil
‎2008 Jul 31 11:07 AM
Yes it will work.
but instead of like better use type, if u use the like ther it will throw an EPC error so better use TYPE instead
of LIKE as showne below.
data :
begin of i_mara occurs 0,
matkl type mara-matkl,
end of i_mara.
‎2008 Jul 31 11:08 AM
it will work but use this.. it is better than that
types : begin of ty_mara ,
matkl like mara-matkl,
end of ty_mara.
data: itab type standard table of ty_mara with header line .
‎2008 Jul 31 11:09 AM
‎2008 Jul 31 11:09 AM
as also said by others it will work.
however it is obsolete statement in ECC 6.0, so we general avoid using OCCURS statement..
With luck,
Pritam.
‎2008 Jul 31 11:13 AM
Hi,
yes You can use the statement in ECC6.0 also but now it is obsolete statement, so better not to use.
‎2008 Jul 31 11:16 AM
It does work in ECC 6, but the declaration of an internal table using OCCURS is obsolete. The EPC check will throw up a message when you use the declaration. Its better to declare a table using LIKE or TYPE referring to a field string or work area.
DATA:
Begin of fs_string,
matkl type mara-maktl,
End of fs_string.
DATA:
IT_Table like standard table
of fs_string
initial size 0.