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

what are the values returned from this function

Former Member
0 Likes
295

Thanks.

fullpath = /tmp/C24102007.0904, I hope enough.

perform parsefilename using fullpath '/' filepath filename.

form parsefilename using file type string

separator type c

changing filepath type string

filename type string.

data : s type string,

p type string,

f type string,

i type i.

  • file = /usr/sap/trans/file, separator = '/'

s = file.

filepath = ''.

do.

split s at separator into p f.

if f = ''. exit. endif.

concatenate filepath p separator into filepath.

s = f.

enddo.

filename = p.

i = strlen( filepath ) - 1.

if i > 0.

if filepath+i(1) = separator.

filepath = filepath+0(i).

endif.

elseif i = 0.

filepath = separator.

else.

filepath = ''.

endif.

endform.

1 REPLY 1
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
277

I would say that FILEPATH would have the value "/TMP/" and that FILENAME would have the value "C24102007.0904" after executing this FORM routine.

Regards,

Rich Heilman