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

avoid sapce in smartforms

Former Member
0 Likes
4,317

Hi ,

I m using currency field in smartforms. it puts some blank space in currency field. how to remove it.

like: i m using wrbtr field type of currency.

value of wrbtr is 1,909.00.

but in output it prints like Rs. 1,909.00

how to remove space between Rs and the value.

1 ACCEPTED SOLUTION
Read only

anub
Participant
0 Likes
1,685

Hi,

In the smartform you can display wrbtr field as

&WRBTR(C)&

Hope this helps.

Rewards if useful.

Reagrds,

Anu.

7 REPLIES 7
Read only

Former Member
0 Likes
1,685

Hi,

To remove blank spaces use condense statement .

Read only

0 Likes
1,685

use like this &gv_wbter(13.2)&

Read only

Former Member
0 Likes
1,685

Better you go for character field.

Declare the char field and pass the amount field to that.

In smart form display the char field.

Regards,

madan.

Edited by: madan mohan reddy on May 8, 2008 2:08 PM

Read only

former_member188827
Active Contributor
0 Likes
1,685

move the value first to type c variable.

in global declarations tab..

zcurr type char25

den create program lines above text window in which u r displaying value.

in

input parameter: <ur_curr_field>

output parameter: zcurr

den write following code:

wrtite <ur_curr_field> to zcurr.

condense zcurr.

in the text window where u r displayin ur curr field, use zcurr instead of ur curr field.

plz reward points if dis helps

Read only

Former Member
0 Likes
1,685

Hi,

CONDENSE

Basic form

CONDENSE c.

Addition

... NO-GAPS

Effect

Shifts the contents of the field c to the left, so that each word is separated by exactly one blank.

Example

DATA: BEGIN OF NAME,

TITLE(8), VALUE 'Dr.',

FIRST_NAME(10), VALUE 'Michael',

SURNAME(10), VALUE 'Hofmann',

END OF NAME.

CONDENSE NAME.

WRITE NAME.

produces the output:

Dr. Michael Hofmann

Addition

... NO-GAPS

Effect

Suppresses all blanks from the field c

Example

DATA: BEGIN OF NAME,

TITLE(8), VALUE 'Dr.',

FIRST_NAME(10), VALUE 'Michael',

SURNAME(10), VALUE 'Hofmann',

END OF NAME.

CONDENSE NAME NO-GAPS.

The contents of NAME is now " Dr.MichaelHofmann ".

Since the field string NAME is interpreted and handled like a type C field, the CONDENSE statement treats it as a whole and ignores any sub-fields. The contents of the component field would therefore now be as follows:

NAME-TITLE = 'Dr.Micha'

NAME-FIRST_NAME = 'elHofmann '

NAME-SURNAME = ' '

Note

Do not use CONDENSE to manipulate field strings that include fields not of type C. This could result in these component fields containing characters of a different (i.e. incorrect) type.

Related SHIFT , CONCATENATE , REPLACE , SPLIT

Note

Performance

The runtime required to condense three fields is about 20 msn (standardized micooseconds). The variant ... NO-GAPS needs about 12 msn.

see this.

*reward points if usefull

Read only

Former Member
0 Likes
1,685

hi,

use codense statement to remove that,

syntax is:

&variablename(c)&

i think by using this ur problem will solve..

Read only

anub
Participant
0 Likes
1,686

Hi,

In the smartform you can display wrbtr field as

&WRBTR(C)&

Hope this helps.

Rewards if useful.

Reagrds,

Anu.