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

string operations

Former Member
0 Likes
711

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
Read only

Former Member
0 Likes
659

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
Read only

Former Member
0 Likes
659

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.

Read only

0 Likes
659

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

Read only

0 Likes
659

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.

Read only

Former Member
0 Likes
659

Hi,

try with this FM

PC_SPLIT_COMPLETE_FILENAME

Regards,

Suresh

Read only

Former Member
0 Likes
660

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