I have the following two simple abap programs, the first one runs just fine, but the second one will generate run time error: assign to non-existent memory area error.
The only differenence is the first one uses parameters, and the second one uses data.
Could anybody explain why this happens?
Thanks in advance.
dliu
REPORT ZTX1202.
data: c.
parameters: p(10) default 'ABCDEFGHIJ'.
do 10 times varying c from p0 next p1.
write: /, 'index:', sy-index.
enddo.
*********************start of the second report********
REPORT ZTX1203.
data: c.
data: p(10) value 'ABCDEFGHIJ'. " will get assign to non-existent memory area error
do 10 times varying c from p0 next p1.
write: /, 'index:', sy-index.
enddo.