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

Remove quantity leading space

Former Member
0 Likes
1,597

Hi,

How can i remove a quantity variable in SAPScript / report??

Regards,

Kit

5 REPLIES 5
Read only

Former Member
0 Likes
901

Hi

use CONDENSE keyword.

in Script you can apply formatting techniques...

&VAR& = 1,356.470

&VAR(.1)& = 1,356.5

&VAR(.4)& = 1,356.4700

&VAR(.0)& = 1,357

Message was edited by:

Perez C

Read only

Former Member
0 Likes
901

Hi!

Removing the easies with the following:

SHIFT gv_quantity LEFT DELETING LEADING space.

But with this the aligns will be messed up. The best way during report writing is this:

WRITE:/ 10 gv_matnr, 40(10) gv_quantity RIGHT-JUSTIFIED, 50 gv_meins.

And for SAPScript, you might use tabulators for right justify.

Regards

Tamá

Read only

former_member386202
Active Contributor
0 Likes
901

Hi,

Define one variable with character type pass ur quntity value into that variable

use condense statement and pass again that value to ur old quantity field.

EX.

DATA NAME (30).

Name = quantity.

CONDENSE NAME.

quantity = name

WRITE quantity.

Reward Points

Reagrds,

Prashant

Read only

Former Member
0 Likes
901

Move the value to a character field and then use Condense.

In SAP Script use character field for display purpose.

It will work.

Lokesh

Read only

Former Member
0 Likes
901

Hi,

You can do as below :

SHIFT gv_quantity left deleting leading '0'.

Thanks,

Sriram Ponna.