Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    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 a 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 ...

      Do.

      DescNumber = DescNumber + 1.

      strlenfield = stream+PtrStr(3).

      PtrStr = PtrStr + 4.

      if strlenfield = 0.

      FieldtoTab = '----'.

      else.

      FieldtoTab = stream+PtrStr(strlenfield).

      endif.

      PtrStr = PtrStr + strlenfield .

      read table LISTDESC index DescNumber into WA_LISTDESC.

      TAGNAME = WA_LISTDESC-FNAMEINT.

      %>

      <<%=TAGNAME%>><%=FieldtoTab%></<%=TAGNAME%>>

      <%

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

      %>

      </MATERIAL>

      </CATALOG>

      <%

      exit.

      else.

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

      DescNumber = 0.

      %>

      </MATERIAL><MATERIAL>

      <%

      endif.

      endif.

      PtrStr = PtrStr + 1.

      enddo.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.