google-code-export / zaplink

Automatically exported from code.google.com/p/zaplink
1 stars 0 forks source link

CONDENSE_ABAP_SOURCE -> dump #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Dectected-on V0.0.008

Hi, I think there is a problem in class ZAPLINK_TOOLS, method 
CONDENSE_ABAP_SOURCE, line 7.

Code:
...
    <l> = conv_abap_line( <l> ).   condense <l>.
    if <l>(1) = '"'.   delete table. continue. endif.  
...

In the case the <l> contains ONLY spaces, they are removed by the condense 
statement, the <l>(1) check in the next line leads to a dump.

Dump: 
STRING_OFFSET_TOO_LARGE
CX_SY_RANGE_OUT_OF_BOUNDS

I think that there should be a correction like this:

    if <l> is initial or <l>(1) = '"'.   delete table. continue. endif.

I have checked source of the new 0.0.009 version and it looks the problem is 
not solved there.

Regards, B.

Original issue reported on code.google.com by SpatnyN...@gmail.com on 15 Dec 2011 at 12:02

GoogleCodeExporter commented 9 years ago

Original comment by tar...@bensiali.net on 15 Dec 2011 at 1:56

GoogleCodeExporter commented 9 years ago
Here is the fix :     IF <l> IS INITIAL. CLEAR <l>. CONTINUE. ENDIF.          " 
Issue 131

Here is the whole method code.

METHOD condense_abap_source.
  FIELD-SYMBOLS <l> TYPE ANY.
  LOOP AT table ASSIGNING <l>.
    IF <l> IS INITIAL. DELETE table. CONTINUE. ENDIF.  " Condense
    IF <l>(1) = '*'.   DELETE table. CONTINUE. ENDIF.  " Condense
    <l> = conv_abap_line( <l> ).   CONDENSE <l>.
    IF <l> IS INITIAL. CLEAR <l>. CONTINUE. ENDIF.          " Issue 131
    IF <l>(1) = '"'.   DELETE table. CONTINUE. ENDIF.  " commented line like :     " comment
  ENDLOOP.
ENDMETHOD.

Please confirm it's OK with your case to enable closure of this issue.
Sorry for the inconvenience

Original comment by tar...@bensiali.net on 15 Dec 2011 at 1:59

GoogleCodeExporter commented 9 years ago
I confirm the correction solved the problem.

Thanks for quick fix. Kind regards B.

Original comment by SpatnyN...@gmail.com on 15 Dec 2011 at 2:14

GoogleCodeExporter commented 9 years ago
Thanks for you reply.

Original comment by tar...@bensiali.net on 15 Dec 2011 at 8:33