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

Omit Characters

Former Member
0 Likes
493

Hi all,

need to make the changes to the string expect the first and last three characters of the string.

any suggestions.

thanks

1 ACCEPTED SOLUTION
Read only

faisalatsap
Active Contributor
0 Likes
468

Hi, All

asking and replying to Basic Question are against the Forum Rules

Please Search Before Posting

Faisal

Hi all,

need to make the changes to the string expect the first and last three characters of the string.

any suggestions.

thanks

3 REPLIES 3
Read only

Former Member
0 Likes
468

Hi,

hope this will work...

data : str type string value '$Good morning$$$'.

data : lv_length type i.

lv_length = strlen(str).

lv_length = lv_length - 3.

str+1(lv_length) = 'Bad0 Morning'.

"Out put str = '$Bad0 morning$$$'

Read only

Former Member
0 Likes
468

you can follow the below steps...

data: l_var type string, ===> Your input string

l_len type i.

l_len = strlen( l_var ).

l_len = l_len - 1

l_var0+(1) =======>make change to First charecter...

l_var0+l_len(1 ) =====>make change to Lsst charecter

Regards, Sri

Read only

faisalatsap
Active Contributor
0 Likes
469

Hi, All

asking and replying to Basic Question are against the Forum Rules

Please Search Before Posting

Faisal