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

FM than condense value

Former Member
0 Likes
1,418

hi

is there a FM that condense value such as " 12"

become "12"

a FM that remove space

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,329

hi,

there is a command to condense, try this .

CONDENSE

Removes spaces from a variable.

Syntax

CONDENSE <c> [NO-GAPS].

Removes all leading spaces, and replaces other series of blanks with a single space in the character field <c>. If you use the NO-GAPS addition, all of the spaces are removed.

Regards,

Arunsri

hi

is there a FM that condense value such as " 12"

become "12"

a FM that remove space

9 REPLIES 9
Read only

Former Member
0 Likes
1,330

hi,

there is a command to condense, try this .

CONDENSE

Removes spaces from a variable.

Syntax

CONDENSE <c> [NO-GAPS].

Removes all leading spaces, and replaces other series of blanks with a single space in the character field <c>. If you use the NO-GAPS addition, all of the spaces are removed.

Regards,

Arunsri

Read only

Former Member
0 Likes
1,329

Hi,

You can use the simple command of

CONDENSE field NO-GAPS.

If needed in a function module, create a function module with a CHANGING parameter as field and above code within.

Cheers,

Aditya

Read only

0 Likes
1,329

does that also work for character

e.g. " convert"

to "convert"

Read only

0 Likes
1,329

condense field no-gaps .

works for characters also.

Read only

0 Likes
1,329

Basically CONDENSE works only on follwing data types.

C, N, D, T or STRING

So in your case i.e. ' convert' (charcter type ) it should work.

Read only

0 Likes
1,329

Hi,

You can use the statement


condense <fieldname> no-gaps .

This will work characters also.

Thanks,

Sriram Ponna.

Read only

0 Likes
1,329

is there a FM module that exist because i want to passe this fucntion is ALV list

Read only

Former Member
0 Likes
1,329

hi ,

Use this statement

condense var no-gap.

thanks ,

satya.

Read only

Former Member
0 Likes
1,329

hi,

try out this function module

CONDENSE_TEXTLINES

Regards,

Arunsri