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

finding spaces in a string

Former Member
0 Likes
643

hi all

how to find the spaces in the string when i use sy-fdpos its showing only the first space, but i want to know about all the spaces in the string how to doit in this string,

ONE HUNDRED TWENTY-THREE MILLION FOUR HUNDRED FIFTY-SIX THOUSAND SEVEN HUNDRED EIGHTY-NINE and TWELVE cents

thanks in advance

cheers

uday

4 REPLIES 4
Read only

Former Member
0 Likes
611

You will have to do it in a loop.

Do loop will work..

split the string at space into part1 and part2. It will split at first space and then repeat the same procedure untill u get all space positions..

thnx,

ags..

Read only

Former Member
0 Likes
611

Hi,

use FIND FIRST OCCURRENCE|ALL OCCURRENCES OF

Shruthi

Edited by: Shruthi R on May 23, 2008 5:55 AM

Edited by: Shruthi R on May 23, 2008 5:55 AM

Edited by: Shruthi R on May 23, 2008 5:56 AM

Read only

Former Member
0 Likes
611

Hi,

Follow the steps to resolve your problem.

1.calculate the string length and store it in a variable(cnt).

2. (a) Use "DO" loop for cnt times.

(b) Check each letter whether it is in alphabets or not.

(c) If not increase the value of another count(to count the spaces).

Regards,

Chandu

Read only

0 Likes
611

when i search for say HUNDRED is showing but when i search for ' ' or space its not showing up how come?

cheers

uday

thanks u all for u r suggestions