New issue 131 by SpatnyN...@gmail.com: CONDENSE_ABAP_SOURCE -> dump
http://code.google.com/p/zaplink/issues/detail?id=131
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.
Comment #1 on issue 131 by tar...@bensiali.net: CONDENSE_ABAP_SOURCE -> dump
http://code.google.com/p/zaplink/issues/detail?id=131
(No comment was entered for this change.)
Comment #2 on issue 131 by tar...@bensiali.net: CONDENSE_ABAP_SOURCE -> dump
http://code.google.com/p/zaplink/issues/detail?id=131
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
I confirm the correction solved the problem.
Thanks for quick fix. Kind regards B.
Comment #4 on issue 131 by tar...@bensiali.net: CONDENSE_ABAP_SOURCE -> dump
http://code.google.com/p/zaplink/issues/detail?id=131
Thanks for you reply.