Skip to Content
author's profile photo
Former Member

Max lenght of a string (PART 2) ;)

I have to convert a catalog (5000 lines) into a XML...

I declare my XMLStream into a DATA: XMLStream type STRING.

With a test catalog it's ok but with the real catalog (5000 material) I have this message :

An exception with the type CX_SY_RANGE_OUT_OF_BOUNDS occurred, but was neither handled locally, nor declared in a RAISING clause

I define all counters into float type.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Jun 23, 2004 at 10:04 AM

    I think the problem is not the string variable, cause this is handeld internally and is dynamic, means there should be no limit how many data you are putting in .

    I guess that you are parsing this string variable once you have filled it and therefore you are working with pointers (ie. strlen( var_length ) ). I think that in your live test, this variable var_length is not defined in the right way, and you are getting an owerflow.

    Have you tried to define all these variables as integer?

    Or just paste a little bit more of your code here.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Yes I tried with integer and float ... but noway ...

      But an Integer is a only 2 bytes value ? So limited to 65535 caracters...

      A fragment of my code ...


      DescNumber = DescNumber + 1.

      strlenfield = stream+PtrStr(3).

      PtrStr = PtrStr + 4.

      if strlenfield = 0.

      FieldtoTab = '----'.


      FieldtoTab = stream+PtrStr(strlenfield).


      PtrStr = PtrStr + strlenfield .

      read table LISTDESC index DescNumber into WA_LISTDESC.





      if stream+PtrStr(2) =';/' .







      if stream+PtrStr(1) = ';'.

      DescNumber = 0.






      PtrStr = PtrStr + 1.