cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove gaps between two variables in smartforms??

0 Kudos

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

output i am getting : 70,000.00 /-

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Florian
Active Contributor

Here is the official help site with all formatting options

http://help.sap.com/saphelp_nw70ehp3/helpdata/en/4e/34031063de02c2e10000000a15822b/content.htm

Yoiur problem will be solved using the following syntax

&gv_amount(CZI)'/-'&

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.

~Florian

ajmartins1
Explorer
0 Kudos
tks! can u pleas update the link... this one is not working
raymond_giuseppi
Active Contributor

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

Regards,
Raymond

0 Kudos

Hi,

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 /-.

Sandra_Rossi
Active Contributor
0 Kudos

Did you read Raymond answer?

He says: &gv_amount(S)&/-

More info in SAP Library: Omitting the Sign

raghug
Active Contributor

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!

0 Kudos

Hi Raghu,

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

Regards,

Rajesh Reddy

Hi Rajeshwar ,

could you try as &gv_amount(CIZ)&