on 05-21-2007 1:00 PM
hi friends,
Iam printing the quntity in decimal mode like 2.000.
but i want to print this as only 2.
How can i remove the the decimal in smart form..
Iam printing amount as 1234.00000.
But i have to print two zeros after decimal point..how can i remove zeros .
appricioate for u r answers..
regards,
sampath kumar
try FM FTR_CORR_SWIFT_DELETE_ENDZERO
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may use the option
field(.0) for printing the quantity
field(.2) for printing the amount..
Go through SAP help given below..
<b>Number of Decimal Places
A program symbol of one of the data types DEC, QUAN, and FLTP can contain decimal place data. Use the option below to override the Dictionary definition for the number of decimal places for the formatting of this symbol value.
Syntax
&symbol(.N)&
The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.
&EKPO-MENGE& -> 1,234.560
&EKPO-MENGE(.1) -> 1,234.6
&EKPO-MENGE&(.4) -> 1,234.5600
&EKPO-MENGE&(.0) -> 1,235</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi samapathkumar,
u just create one local variable,
ex: data: l_value type p.
then move your field to this local variable (l_value), then this local variable we can show in the output.
regards,
seshu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Check this...
data: first(10) type c value '1234.0000',
sec type p decimals 2.
sec = first.
write sec.
Regards
SAB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ex: Try this
Data : amt type i.
amount = 1234.00000.
amt = amount * 100000. " here 100000 is decimal places
So now amt equals to 123400000
amt = amt / 100000. " So amt = 1234.
I guess it will solve your problem.
Reward points to all useful answers.
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You the following logic to get the value converted to 'N' number of decimal places :-
Field-symbols : <fs_number> TYPE p.
l_number = 1234.00000.
l_number = l_number * ( 10 ** N ).
ASSIGN l_number TO <fs_number> DECIMALS N.
WRITE <fs_number> TO l_final_number.
Award points if usefull.
Best regards,
Harsh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Declare the variable with packed type of decimals 2.
Cheers,
Simha.
Reward all the helpful answers..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
move the decimal value to integer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi friends,
i tried this before only but its not working..
if iam using the write wa_quanty to new_qty.(its not working because iam moving the decimal value to integer.. here iam getting the error as write only for C,N,D,T types).
if iam using move wa_quanty TO new_qty. iam getting the valueas as wrong like
wa_quanty value is 1.0000 but iam getting new_qty the value 10000.
this is for smart form..please give the right answers..
regards,
sampath
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.