Application Development 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: 

string operations

Former Member
0 Kudos

Hi,

On the selection screen if the user gives a file location, I have to separate the directory and the filename the problem is the location can change every time one time it can be C:\Documents and Settings\varunk\Desktop\main.bmp and other time it can be

C:\main.bmp so I have to separate both the directory and file name and pass it separetly.

Thanks and Regards,

V

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Use this.

SPLIT filename AT '/' INTO <c1>... <cn> INTO TABLE <itab>

Also check this.

[https://forums.sdn.sap.com/click.jspa?searchID=17587409&messageID=6346920]

Rhea.

Edited by: rhea on Oct 17, 2008 9:55 AM

5 REPLIES 5

Former Member
0 Kudos

Hello,

Can you explain me wht is the use of seperating the Directory u r uploading the file or downloading file.

or Checking the path correct or not.

0 Kudos

I have to pass the directory and filename separetly for further operation.

0 Kudos

Hi as Rhea told split the path, the final record in the itab would be your filename. You can also validate whether the directory and file name you have obtained are correct or not you can use any method from CL_GUI_FRONTEND_SERVICES class.

Former Member
0 Kudos

Hi,

try with this FM

PC_SPLIT_COMPLETE_FILENAME

Regards,

Suresh

Former Member
0 Kudos

Use this.

SPLIT filename AT '/' INTO <c1>... <cn> INTO TABLE <itab>

Also check this.

[https://forums.sdn.sap.com/click.jspa?searchID=17587409&messageID=6346920]

Rhea.

Edited by: rhea on Oct 17, 2008 9:55 AM