2007 Nov 01 6:50 AM
Hi experts,
Can we define an array in ABAP. if yes then How. plz help.
Regards.
Vaibhav Tiwari.
Hi experts,
Can we define an array in ABAP. if yes then How. plz help.
Regards.
Vaibhav Tiwari.
2007 Nov 01 6:53 AM
data: begin of itab occurs 0,
str type string,
end of itab.
itab-str = '1 Record'. append itab.
itab-str = '2 Record'. append itab.
itab-str = '3 Record'. append itab.
itab-str = '4 Record'. append itab.
itab-str = '5 Record'. append itab.
itab-str = '6 Record'. append itab.
itab-str = '7 Record'. append itab.
itab-str = '8 Record'. append itab.
itab-str = '9 Record'. append itab.
read table itab index 5.
check sy-subrc = 0.
write:/ itab-str.
2007 Nov 01 6:57 AM
Hi Vaibhav,
In ABAP we have much better version of array called as Internal table.
Regards,
Atish
2007 Nov 01 7:02 AM
Hi,
There are no array concept in abap, instead of array there are internal table and field strings in abap.
Ex.
data : begin of itab occurs 10,
matnr like mara-matnr
mbrsh like mara-mbrsh,
end of itab.
data : begin of itab,
matnr like mara-matnr
mbrsh like mara-mbrsh,
end of itab.
Regards,
Prashant