2007 Aug 09 8:09 AM
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
2007 Aug 09 8:19 AM
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
2007 Aug 09 8:16 AM
Hi Ravi,
If your variable is V_STRING then use this statement
<b>CONDENSE V_STRING</b> to meet your requirement.
Thanks,
Vinay
2007 Aug 09 8:17 AM
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
2007 Aug 09 8:19 AM
SHIFT text RIGHT DELETING TRAILING spaces.
SHIFT text LEFT DELETING LEADING spaces.
2007 Aug 09 8:20 AM
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....
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |