cancel
Showing results for 
Search instead for 
Did you mean: 

Eliminating space

former_member214498
Contributor
0 Kudos

Hi Folks

I am trying to suppress space between the amount,currency sign and a trainling ' * ' sign.

For example : $ 80.00 *

Desired Output : $80.00*

I am able to condense the space between $ and 80.00

but space between 80.00 and * is still there.

so currently it is $80.00 *

Any idea how to remove this space between 80.00 and *.

Helpful answers will be rewarded.

Regards

Waz

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member187255
Active Contributor
0 Kudos

Try

CONDENSE text [NO-GAPS].

former_member214498
Contributor
0 Kudos

Hi

Thanx for a prompt response. Can you please elaborate its use in an example.

Regards

Waz

former_member187255
Active Contributor
0 Kudos

Try this...

data: a(10) type c.
a = '$ 80.00 *'.
CONDENSE a NO-GAPS.
write a.

former_member214498
Contributor
0 Kudos

Hi

Actually, the print program is a standard SAP program which is calling our SAP Script. No control over Print program so can't apply your solution.

Can we declare a variable inside SAP script and then concatenate the three values $, amount and * into that newly created variable inside our SAP Script?

Regards

Waz

Former Member
0 Kudos

Hi

try these

&symbol(i)& ---> Supress the initial value.

&symbol(z)& ---> Supress the leading zeros.

&symbol(c)& ---> compress blank spaces

regards

Shiva

former_member214498
Contributor
0 Kudos

Hi

(C) works in a way that it suppresses the white space between $ and amount. However this is still one white space left between amount and the *. I was trying to remove this gap.

Initially: output was : $ 80.00 *

After using (C) it became : $80.00 *. Now the Gap between 80.00 and * needs to be suppressed.

Regards

Waz

former_member214498
Contributor
0 Kudos

Hi

I used a perform within the SAP Script and moved the amount variable to that perform defined in a subroutine pool.

After that I did the required formating and sent it back to SAP Script.

Thank you all for your solutions.

Regards

Waz