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

read

Former Member
0 Likes
506

how to read last 3 letters in the file path on at selection screen

regards

sachin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
490

hi check this..

data: file(100) type c value 'fdfdfdfdfdfdff.txt'.

data: test(3) type c ,

test1(100) type c .

split file at '.' into test test1 .

write:/ test1 .

or check this..

data: file(100) type c value 'fdfdfdfdfdfdff.txt'.

data: test(3) type c ,

test1(100) type c ,

i type i,

j type i.

i = strlen( file ) .

j = i - 3 .

write:/ file+j(3).

regards,

venkat

3 REPLIES 3
Read only

Former Member
0 Likes
490

Hi,

At selection screen,

1-you will get the file name,

2-find lenght of the variable

3-minus 3 from the value u get from above into variable1

4-then read that file name from variable1.

Rewards if useful

Thanks,

Aditya

Read only

former_member386202
Active Contributor
0 Likes
490

Hi,

Do like this

parameters : p_path type string.

data : l_int type i,

l_count type i,

l_path type string.

l_int = strlen(p_path).

l_count = l_int - 3.

l_path = p_path+l_int(3).

Regards,

Prashant

Read only

Former Member
0 Likes
491

hi check this..

data: file(100) type c value 'fdfdfdfdfdfdff.txt'.

data: test(3) type c ,

test1(100) type c .

split file at '.' into test test1 .

write:/ test1 .

or check this..

data: file(100) type c value 'fdfdfdfdfdfdff.txt'.

data: test(3) type c ,

test1(100) type c ,

i type i,

j type i.

i = strlen( file ) .

j = i - 3 .

write:/ file+j(3).

regards,

venkat