‎2008 Oct 31 4:34 PM
Hi all,
here I have the file path.
C:\Documents and Settings\RTHT\Desktop\test1.xls.
Every time file path may be change, but i need to take the filename text1.xls into one varibale.
regards,
Ajay reddy
‎2008 Oct 31 4:48 PM
‎2008 Oct 31 4:48 PM
‎2008 Oct 31 4:59 PM
Check this code I wrote, it's quite simple and gets the job done.
DATA: file TYPE string
VALUE 'C:\Documents and Settings\RTHT\Desktop\test1.xls',
schar(1) TYPE c,
cont TYPE i.
START-OF-SELECTION.
WHILE schar <> '\'.
SHIFT file CIRCULAR RIGHT.
schar = file+0(1).
cont = cont + 1.
ENDWHILE.
SHIFT file CIRCULAR LEFT.
cont = cont - 1.
WRITE file+0(cont).