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 manupulation

Former Member
0 Likes
658

Hi guys,

I want an logic where i want to remove the starting and ending blanks of an character variable of length 32 ...i dont want to remove blanks if there is any at the middle of the string... pls rele me ...

ravi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
640

SHIFT text RIGHT DELETING TRAILING spaces.

SHIFT text LEFT DELETING LEADING spaces.

Hi guys,

I want an logic where i want to remove the starting and ending blanks of an character variable of length 32 ...i dont want to remove blanks if there is any at the middle of the string... pls rele me ...

ravi

4 REPLIES 4
Read only

Former Member
0 Likes
640

Hi Ravi,

If your variable is V_STRING then use this statement

<b>CONDENSE V_STRING</b> to meet your requirement.

Thanks,

Vinay

Read only

Former Member
0 Likes
640

Hi,

use CONDENSE command with no gaps....

DATA: BEGIN OF NAME,

TITLE(8) VALUE ' Dr.',

FIRST_NAME(10) VALUE 'Michael',

SURNAME(10) VALUE 'Hofmann',

END OF NAME.

CONDENSE NAME NO-GAPS.

The contents of NAME is now "Dr.MichaelHofmann".

**rewards point if usefull

vijay

Read only

Former Member
0 Likes
641

SHIFT text RIGHT DELETING TRAILING spaces.

SHIFT text LEFT DELETING LEADING spaces.

Read only

Former Member
0 Likes
640

Hi Ravi,

Use the following command

First to remove the first balnk ...

SHIFT <c> [BY <n> PLACES] [LEFT].

Second to remove the last blank space

SHIFT <c> [BY <n> PLACES] [RIGHT]

for n provide the value as 1

Pablo

Reward if helpful....