Skip to Content
0
Former Member
Mar 14, 2007 at 01:29 PM

Differece between parameters and data

25 Views

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.