Skip to Content

How to remove gaps between two variables in smartforms??

Nov 22, 2016 at 05:59 AM


avatar image

Example : &amt1&<c>/-</>

output i am getting : 70,000.00 /-

but i need output like 70,000.00/- without soaces

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Raymond Giuseppi
Nov 22, 2016 at 06:58 AM

Use an ouput option without space for minus sign at right, like &amt1(S)&.


Show 2 Share
10 |10000 characters needed characters left characters exceeded


Thanks for your reply..

I am getting value for gv_amount from program just I am printing as it is, but I want to display '/-' after amount Ex: 40,000/-

but I am getting like 40,000 /-.

For this I have used &gv_amount&followed by /- but i should not get any space between gv_amount and /-.

Rajeshwar Reddy Jookonti

Did you read Raymond answer?

He says: &gv_amount(S)&/-

More info in SAP Library: Omitting the Sign

Florian Henninger
Nov 25, 2016 at 09:35 PM

Here is the official help site with all formatting options

Yoiur problem will be solved using the following syntax


This will display the value only if it is not initial (i) and will remove all unneeded zero (Z) + spaces (C)

The ending '/-' inside the & is there, that it will be also not displayed if your variable is initial.

But to be honest, maybe you can make yourself familiar with the search functionality located left to your user, it's hard to not see it as a basic question.


10 |10000 characters needed characters left characters exceeded
Asim Isik Nov 22, 2016 at 11:22 AM

Hi Rajeshwar ,

could you try as &gv_amount(CIZ)&

10 |10000 characters needed characters left characters exceeded
Raghu Govindarajan Nov 26, 2016 at 05:03 PM

First off that is an archaic way of representing rounded off quantities in currency. See Slash (punctuation) - Wikipedia for more information. So your example of 70,000.00/- (seventy thousand decimal zero zero) is wrong, you will have to remove the decimals when you use the "slash and dash". So that would become 70,000/-. If you have any decimals, you have to omit the "/-", because it is no longer an even quantity. So, if you add another half rupee (pound/dollar/whatever), you will have to represent this as 70,000.50 and you can not use the "/-" behind this number.

If you want to do this the right way, I can't think any of the native formatting options that will work for you. I believe you will have to write a routine to handle this. You can put this a routine in your SmartForm, or better still, if you anticipate using this convention in other programs/reports, develop a conversion exit or a little helper class with a static method that you can call from anywhere.

My other suggestion would be talking to whoever wanted this report and encouraging them to move into the modern world of decimals!

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Raghu,

You are right but my client need it. Thanks for the information. Very useful information.


Rajesh Reddy