‎2008 Aug 28 11:26 AM
experts,
ex : data var1 type string.
var1 =
' string content '.
while output how to supress leading and trailing spaces so that
i can get output as
'string content'.
thanks in advance.
‎2008 Aug 28 11:27 AM
Hi
USe CONDENSE var1
data :
w_string type string value ' jksafhsdjkf '.
write :
w_string.
condense w_string.
write /:
w_string.Regards
Pavan
‎2008 Aug 28 11:28 AM
Hi,
Use CONDENSE var1
for further detail in syntax , check
http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb33e6358411d1829f0000e829fbfe/content.htm
Regards,
anirban
‎2008 Aug 28 11:28 AM
‎2008 Aug 28 11:28 AM
‎2008 Aug 28 11:29 AM
‎2008 Aug 28 11:39 AM
if i use condense even the gaps between the words get deleted , which should not happen.
‎2008 Aug 28 11:41 AM
‎2008 Aug 28 11:42 AM
data str type string.
str = ' abc def '.
shift str left deleting leading space.
shift str right deleting trailing space.
write 😕 str.
‎2008 Aug 28 11:48 AM
Hi Ramesh,
Use
SHIFT STRING LEFT DELETING LEADING SPACE.
SHIFT STRING RIGHT DELETING TRAILING SPACE.
Regrds,
Chandra Sekhar
‎2008 Aug 28 11:30 AM
Hi,
data var1 type string.
var1 =
' string content '.
condense var1.
write:/ var1.
hope this helps.
‎2008 Aug 28 11:37 AM
Hi Ramesh,
As also told by others use CONDENSE statement.
data var1 type string.
var1 = ' string content '.
CONDENSE var1.
write: var1.With luck,
Pritam.
‎2008 Aug 28 11:46 AM
Hi Ramesh,
try the following code.
shift var1 LEFT DELETING LEADING space.
shift var1 RIGHT DELETING TRAILING space.
Cheers,
Vishnu