‎2007 Sep 04 10:39 AM
‎2007 Sep 04 10:49 AM
Hi
declare the str type string
and you r printing 26 characters from 10th position but from 10th position u can print only 14 characters only 14 r available
give as following
write :str+10(14).
it will work
Regards
sandhya
‎2007 Sep 04 10:45 AM
‎2007 Sep 04 10:47 AM
hi,
ur declared string is of length 24 n ur accessing the length which is exceed.
For ex:
write str+10(2).
the abv stmt retrives/output GR.
the string starts the count from the 0.
reward if helpful.
‎2007 Sep 04 10:49 AM
If you define STR as a string as i suppose the offset 10 with a length of 26 is too great, as the string is initialized with a length of 24.
Dynamic memory management is used internally for strings, so ABAP cannot insure which field belongs the characters you asked for.
So use COMPUTE string_length = STRLEN( STR ).
Regards
‎2007 Sep 04 10:49 AM
Hi
declare the str type string
and you r printing 26 characters from 10th position but from 10th position u can print only 14 characters only 14 r available
give as following
write :str+10(14).
it will work
Regards
sandhya
‎2007 Sep 04 10:50 AM
Hi Balaji..
data : str(100) type C.
STR = 'INDIA IS A GREAT COUNTRY'.
WRITE STR+10(26).
try this way.. You will not get error. Bcoz when you give STR+10(26)
It will try to access the characters from 11th position to 36th position. So the String may not have 36 characters.
<b>reward if Helfpul</b>
‎2007 Sep 04 10:50 AM
HI,
do like this..
data : str(100) type c.
STR = 'INDIA IS A GREAT COUNTRY'.
WRITE STR+10(26).
Regards,
nagaraj
‎2007 Sep 04 10:52 AM
Hi
str+10(26) means that str has a minimul lenght of 36 char,
but it has actuel only a lenght of 24 char. thats the problem.
Regards, Dieter