01-19-2012 11:21 AM
Hi All,
While using leave request service we are getting following dump in abap code , please advice
Runtime Errors DATA_LENGTH_0
Exception CX_SY_RANGE_OUT_OF_BOUNDS
Date and Time 13.01.2012 10:17:48
Invalid partial field access: Length 0
What happened?
Error in the ABAP Application Program
The current ABAP program "ZCL_PT_GEN_REQ================CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_RANGE_OUT_OF_BOUNDS', was not
caught in
procedure "IF_EX_PT_GEN_REQ~SEARCH_FOR_NEXT_PROCESSOR" "(METHOD)", nor was it
propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In the executed program "ZCL_PT_GEN_REQ================CP", the system
attempted to access the field
"IM_SEARCHSTRING" using the length 0.
However, a partial field access with the length specification 0 is not
allowed.
How to correct the error
Use a positive length specification if a part of the field "IM_SEARCHSTRING" is
to be
accessed.
If the error occurred in your own ABAP program or in an SAP
program you modified, try to remove the error.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DATA_LENGTH_0" "CX_SY_RANGE_OUT_OF_BOUNDS"
"ZCL_PT_GEN_REQ================CP" or "ZCL_PT_GEN_REQ================CM002"
"IF_EX_PT_GEN_REQ~SEARCH_FOR_NEXT_PROCESSOR"
Dump At source code shows as following
LOOP AT ex_persdata_tab INTO wa_ex_perdata.
w_str3 = wa_ex_perdata-user.
IF w_str3 CO im_searchstring.
w_len2 = sy-fdpos.
w_len1 = sy-fdpos + 1.
**Get First name
w_str2 = im_searchstring+w_len1.
**Get last name
---->>> w_str1 = im_searchstring(w_len2). (Point of dump) (Data type String = char25)
IF w_str2 EQ wa_ex_perdata-name.
APPEND wa_ex_perdata TO lt_ex_perdata.
EXIT.
ENDIF.
CLEAR:w_str2,w_str1,w_len2,w_len1.
ENDIF.
ENDLOOP.
CLEAR:wa_ex_perdata.
01-19-2012 12:56 PM
Hi,
im_searchstring doesnot have w_len2 value length. im_searchstring have less than (w_len2) characters. check it once.
01-19-2012 1:19 PM
attempted to access the field
"IM_SEARCHSTRING" using the length 0.
However, a partial field access with the length specification 0 is not
allowed.
that w_len2 of yours is having a value 0. you cant access a field with length 0. thats the error