‎2007 Dec 28 6:25 AM
Hi All,
I have to read internal table character by character for each line(row)in the internal table & select the data at the particular offset for e:g:- position 35 to 40,10 to 20...etc.
kindly advice me how this can be done?
Thanks,
Chetan.
‎2007 Dec 28 6:29 AM
Hi Chetan ,
Loop on the internal table and use the offset option used for strings to acheive your result.
Regards
Arun
‎2007 Dec 28 6:31 AM
Hi,
use the READ statment along with that use the offset position and read the record from thwe internal table.
if it is helpful, reward points,
satish.
‎2007 Dec 28 6:41 AM
hi.
data : ch(10) type c.
u can do by moving string
like
ch = str+4(10).
then in ch it will store from 4th character upto 10 character store.
may be it will help u.
regards,
Arpit
‎2007 Dec 28 6:37 AM
Hi Chetan,
I hope you have an internal table with only one field of character type (fixed length) or string type.
loop at that internal table
get the length of that that field in a variable var = strlen(<field name>)
then in a while loop
count = 1.
WHILE VAR > 0
*you will get the value of that variable in field(count)
VAR = VAR-1
count = count + 1
ENDWHILE.
Try this
Regards,
Pankaj
‎2007 Dec 28 6:49 AM
read table itab into wa_itab with key = k1.
if sy-subrc eq 0.
lv_len = strln(wa_itab-f1).
lv_1 = wa_itab-f1+35(lv_len-35)
lv_2 = wa_itab-f1+40(lv_len-40)
endif.
hope this helps