Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

getting array error suddenly, why?

I just got this error message in a report that has been working. Any ideas please what this means..

" An Array's dimension must be between 1 and 1000"

shared stringvar array a;

local stringvar t := {CLSPAYTP.OTORD#};

shared numbervar c:=c;

shared stringvar ords:=ords;

//if instr(ords,{CLSPAYTP.OTORD#})<=0 then

    ords:=ords & ',' & {CLSPAYTP.OTORD#};

if not(t in a)

then ( 

        c:= c + 1;

//*** on next line we get the error *****

        redim preserve a[c];

        a[c] := t;

);

if c > 0 then a[c]

Former Member
replied

Hi Paul,

Use a delimited string as a workaround:

shared stringvar a;

local stringvar t := {CLSPAYTP.OTORD#};

shared stringvar ords:=ords;

if instr(a, t) = 0 then

(

a := a +  {CLSPAYTP.OTORD#} + '. ';

);

-Abhilash

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question