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
585

Hi guys,

I got an requirement i am having one field which is populated by the user someimte the user enters the value by keeping some space at the begining or sometimes there wil be space after the value my requirement is to store this value without any leading or ending space i just need the value only no spaces with it can any one tel me how to do i it.. s it possible to do with an FM..? i need an simple code for this.

points will be rewarded

Ravi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
569

Hi..

<b>CONDENSE FIELD NO-GAPS.</b>

here is a simple code..

data:

wa_char(255),

wa_temp type dmbtr.

wa_char = ' 1000'.

condense wa_char no-gaps.

wa_temp = wa_char.

write wa_temp.

<b>Reward points if useful</b>

Regards

Ashu

4 REPLIES 4
Read only

Former Member
0 Likes
570

Hi..

<b>CONDENSE FIELD NO-GAPS.</b>

here is a simple code..

data:

wa_char(255),

wa_temp type dmbtr.

wa_char = ' 1000'.

condense wa_char no-gaps.

wa_temp = wa_char.

write wa_temp.

<b>Reward points if useful</b>

Regards

Ashu

Read only

0 Likes
569

hi ashu,

thks for the reply but i need to know does it remove the blank from the end of the string...? i checked out bu using strlen but it shoing the same length before and after condense i think it remove space from the begning only.

ravi

Read only

0 Likes
569

Hi Ravi...

It will condense the space both in the beggining and also at the end..

u can check the string length after condensing..

<b>Reward points if useful</b>

Regards

Ashu

Read only

Former Member
0 Likes
569

hi ravi

<b>yes it will condense spaces after string</b>

regards

ravish

<b>plz dont forget to reward points if useful</b>