<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Runtime Errors  DATA_LENGTH_0    Exception   CX_SY_RANGE_OUT_OF_BO in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-errors-data-length-0-exception-cx-sy-range-out-of-bo/m-p/8537223#M1657129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;attempted to access the field
"IM_SEARCHSTRING" using the length 0.
However, a partial field access with the length specification 0 is not
allowed.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that w_len2 of yours is having a value 0. you cant access a field with length 0. thats the error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jan 2012 13:19:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-01-19T13:19:53Z</dc:date>
    <item>
      <title>Runtime Errors  DATA_LENGTH_0    Exception   CX_SY_RANGE_OUT_OF_BO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-errors-data-length-0-exception-cx-sy-range-out-of-bo/m-p/8537221#M1657127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;While using leave request service we are getting following dump in abap code , please advice &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime Errors         DATA_LENGTH_0&lt;/P&gt;&lt;P&gt;Exception              CX_SY_RANGE_OUT_OF_BOUNDS&lt;/P&gt;&lt;P&gt;Date and Time          13.01.2012 10:17:48&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Invalid partial field access: Length 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; What happened?&lt;/P&gt;&lt;P&gt;     Error in the ABAP Application Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     The current ABAP program "ZCL_PT_GEN_REQ================CP" had to be&lt;/P&gt;&lt;P&gt;      terminated because it has&lt;/P&gt;&lt;P&gt;     come across a statement that unfortunately cannot be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; What can you do?&lt;/P&gt;&lt;P&gt;     Note down which actions and inputs caused the error.&lt;/P&gt;&lt;P&gt;     To process the problem further, contact you SAP system&lt;/P&gt;&lt;P&gt;     administrator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Using Transaction ST22 for ABAP Dump Analysis, you can look&lt;/P&gt;&lt;P&gt;     at and manage termination messages, and you can also&lt;/P&gt;&lt;P&gt;     keep them for a long time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Error analysis&lt;/P&gt;&lt;P&gt;     An exception occurred that is explained in detail below.&lt;/P&gt;&lt;P&gt;     The exception, which is assigned to class 'CX_SY_RANGE_OUT_OF_BOUNDS', was not&lt;/P&gt;&lt;P&gt;      caught in&lt;/P&gt;&lt;P&gt;     procedure "IF_EX_PT_GEN_REQ~SEARCH_FOR_NEXT_PROCESSOR" "(METHOD)", nor was it&lt;/P&gt;&lt;P&gt;      propagated by a RAISING clause.&lt;/P&gt;&lt;P&gt;     Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt;     exception would occur, the current program is terminated.&lt;/P&gt;&lt;P&gt;     The reason for the exception is:&lt;/P&gt;&lt;P&gt;     In the executed program "ZCL_PT_GEN_REQ================CP", the system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; attempted to access the field&lt;/P&gt;&lt;P&gt;"IM_SEARCHSTRING" using the length 0.&lt;/P&gt;&lt;P&gt;However, a partial field access with the length specification 0 is not&lt;/P&gt;&lt;P&gt;allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to correct the error&lt;/P&gt;&lt;P&gt;Use a positive length specification if a part of the field "IM_SEARCHSTRING" is&lt;/P&gt;&lt;P&gt; to be&lt;/P&gt;&lt;P&gt;accessed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the error occurred in your own ABAP program or in an SAP&lt;/P&gt;&lt;P&gt;program you modified, try to remove the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the error occures in a non-modified SAP program, you may be able to&lt;/P&gt;&lt;P&gt;find an interim solution in an SAP Note.&lt;/P&gt;&lt;P&gt;If you have access to SAP Notes, carry out a search with the following&lt;/P&gt;&lt;P&gt;keywords:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"DATA_LENGTH_0" "CX_SY_RANGE_OUT_OF_BOUNDS"&lt;/P&gt;&lt;P&gt;"ZCL_PT_GEN_REQ================CP" or "ZCL_PT_GEN_REQ================CM002"&lt;/P&gt;&lt;P&gt;"IF_EX_PT_GEN_REQ~SEARCH_FOR_NEXT_PROCESSOR"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Dump At source code shows as following&lt;/STRONG&gt;&lt;/U&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ex_persdata_tab INTO wa_ex_perdata.&lt;/P&gt;&lt;P&gt;        w_str3 = wa_ex_perdata-user.&lt;/P&gt;&lt;P&gt;        IF w_str3 CO im_searchstring.&lt;/P&gt;&lt;P&gt;          w_len2 = sy-fdpos.&lt;/P&gt;&lt;P&gt;          w_len1 = sy-fdpos + 1.&lt;/P&gt;&lt;P&gt;**Get First name&lt;/P&gt;&lt;P&gt;          w_str2 = im_searchstring+w_len1.&lt;/P&gt;&lt;P&gt;**Get last name&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="9" type="ul"&gt;&lt;P&gt; ----&amp;gt;&amp;gt;&amp;gt;       w_str1 = im_searchstring(w_len2).       (Point of dump) (Data type String = char25) &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          IF w_str2 EQ wa_ex_perdata-name.&lt;/P&gt;&lt;P&gt;            APPEND  wa_ex_perdata TO lt_ex_perdata.&lt;/P&gt;&lt;P&gt;            EXIT.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;          CLEAR:w_str2,w_str1,w_len2,w_len1.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;      CLEAR:wa_ex_perdata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 11:21:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-errors-data-length-0-exception-cx-sy-range-out-of-bo/m-p/8537221#M1657127</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-19T11:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Errors  DATA_LENGTH_0    Exception   CX_SY_RANGE_OUT_OF_BO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-errors-data-length-0-exception-cx-sy-range-out-of-bo/m-p/8537222#M1657128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;im_searchstring doesnot have w_len2 value length. im_searchstring have less than (w_len2)  characters. check it once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 12:56:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-errors-data-length-0-exception-cx-sy-range-out-of-bo/m-p/8537222#M1657128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-19T12:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Errors  DATA_LENGTH_0    Exception   CX_SY_RANGE_OUT_OF_BO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-errors-data-length-0-exception-cx-sy-range-out-of-bo/m-p/8537223#M1657129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;attempted to access the field
"IM_SEARCHSTRING" using the length 0.
However, a partial field access with the length specification 0 is not
allowed.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that w_len2 of yours is having a value 0. you cant access a field with length 0. thats the error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 13:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-errors-data-length-0-exception-cx-sy-range-out-of-bo/m-p/8537223#M1657129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-19T13:19:53Z</dc:date>
    </item>
  </channel>
</rss>

