Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

need logic

Former Member
0 Likes
400

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
381

Hi, you can use the function

SO_SPLIT_FILE_AND_PATH

2 REPLIES 2
Read only

Former Member
0 Likes
382

Hi, you can use the function

SO_SPLIT_FILE_AND_PATH

Read only

Former Member
0 Likes
381

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).