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

SapScript Numer Format

Former Member
0 Likes
1,047

Hi,

I need to change the format of a number I have on my sapScript...

I have 7.500 (decimal), and I need to have the output like 7500, how do I change it?

Thanks,

Gabriel P.

5 REPLIES 5
Read only

Former Member
0 Likes
929

Hi Gabriel,

Is 7.500 a decimal value then just multiply by 100 in your program.

Read only

Former Member
0 Likes
929

Hey,

Thanks for answering, I know that I can do it, but this form is used by a standard transaction, and I need to multiply it in the sapScript´s text element, how do I get it done?

Thanks again!!

Gabriel P

Read only

0 Likes
929

Hi,

You can write a perform in the script & write another program for doing that.Do you want a sample code for that.

Read only

Former Member
0 Likes
929

Hi again,

I thought there was another way to do it, I already know how to it, thanks!!

Gabriel P.

Read only

0 Likes
929

Ho fine,these are ways you can format in the script itself.check if something is useful to you.

&SYMBOL& No formatting

&SYMBOL+4& Offset - Output begins here. Offset refers to formatted value

&SYMBOL(5)& Length - Output data in the specified length

&SYMBOL(I)& Suppress initial value - If the field has been initialized, nothing is output

&SYMBOL(Z)& Suppress leading zeros

&SYMBOL(C)& Compress blank spaces - Consecutice spaces are compressed into a single space. Leading spacesare suppressed.

&SYMBOL(R)& Right align output

&SYMBOL(S)& Operators are suppressed

&SYMBOL(*)& Dictionary length - The data length is defined by the ABAP dictionary

&SYMBOL(8.2)& Decimal format. Length 8 decimals 2

&'text1'SYMBOL'text2'& Text can be inserted before and after the symbol