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

Condesing field in sapscript...

Former Member
0 Likes
620

Hi,

I am printing afield on spascript form

Amount is &RBKP-RMWWR&

But its priniting like

Amount is 16.

It seems its printing the spaces. How do I condense in script withing &x&. ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
583

you use &RBKP-RMWWR(C)& to remove the leading space

if you want to remove the leading 0's you can use

&RBKP-RMWWR(Z)&

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
583

You can do this.

Here 5 is, the number of places, and 2 is the decimal places.

&RBKP-RMWWR(5.2)&

REgards,

Rich Heilman

Read only

Former Member
0 Likes
584

you use &RBKP-RMWWR(C)& to remove the leading space

if you want to remove the leading 0's you can use

&RBKP-RMWWR(Z)&

Read only

abdul_hakim
Active Contributor
0 Likes
583

hi rajesh,

you need to use the formatting option as follows..

&RBKP-RMWWR(C)&

Go thru the below description...

<b>Space Compression

The symbol value is viewed as a sequence of ‘words’, each separated from the next by either one or a string of space characters. The C option has the effect of replacing each string of space characters with a single space and shifting the ‘words’ to the left as necessary to close up the gaps. Leading spaces are completely removed. The results are the same as those of the ABAP command CONDENSE.

Syntax:

&symbol(C)&

Assuming ' Albert Einstein ' is the symbol value,

&symbol& -> Albert Einstein

&symbol(C)& -> Albert Einstein</b>

Cheers,

Abdul Hakim