‎2008 May 09 1:14 PM
how to read last 3 letters in the file path on at selection screen
regards
sachin
‎2008 May 09 1:22 PM
hi check this..
data: file(100) type c value 'fdfdfdfdfdfdff.txt'.
data: test(3) type c ,
test1(100) type c .
split file at '.' into test test1 .
write:/ test1 .
or check this..
data: file(100) type c value 'fdfdfdfdfdfdff.txt'.
data: test(3) type c ,
test1(100) type c ,
i type i,
j type i.
i = strlen( file ) .
j = i - 3 .
write:/ file+j(3).
regards,
venkat
‎2008 May 09 1:17 PM
Hi,
At selection screen,
1-you will get the file name,
2-find lenght of the variable
3-minus 3 from the value u get from above into variable1
4-then read that file name from variable1.
Rewards if useful
Thanks,
Aditya
‎2008 May 09 1:17 PM
Hi,
Do like this
parameters : p_path type string.
data : l_int type i,
l_count type i,
l_path type string.
l_int = strlen(p_path).
l_count = l_int - 3.
l_path = p_path+l_int(3).
Regards,
Prashant
‎2008 May 09 1:22 PM
hi check this..
data: file(100) type c value 'fdfdfdfdfdfdff.txt'.
data: test(3) type c ,
test1(100) type c .
split file at '.' into test test1 .
write:/ test1 .
or check this..
data: file(100) type c value 'fdfdfdfdfdfdff.txt'.
data: test(3) type c ,
test1(100) type c ,
i type i,
j type i.
i = strlen( file ) .
j = i - 3 .
write:/ file+j(3).
regards,
venkat