10-09-2007 9:16 PM
Hi , I have a program that takes a packed decimal with 3 decimals as imput and displays it. Now when I change my settings on su3 from 1.234.567,890 to 1,234,567.980 , the value entered gets three trailing zeros . For example , if I enter 120 in the first format , it is seen as 120,000 , but if I do the same in the other format I am getting 120,000.000.
how to correct this , The program should work for any setting.
thankyou
10-09-2007 9:18 PM
Does the program attibutes have "fixed point arithmetic" checked?
Rob
10-09-2007 9:19 PM
10-09-2007 9:21 PM
From the ABAP editor screen:
Goto -> attributes.
Rob
Message was edited by:
Rob Burbank
10-09-2007 9:31 PM
Yes Rob , I tried with bot checked and un-checked , the problem persists.
10-09-2007 9:55 PM
Ok , PLease try out this very small code
REPORT ZTESTTE.
parameters ping type p decimals 3.
write ping.
with
1) The Fixed point checked and unchecked
and
2) By changing defaults in su3 from 1,234,567.890 to 1.234.567,890 . Right now only the second one seems to be working for me.
10-09-2007 10:06 PM
Krish,
What exactly you are trying to do...
U r getting some value as input r u doing any sort of transformations to that value or directly r u outputting the value as it is?
if u r not doing any kind of validations then declare the parameter variable as type C rather than P and check once....
10-09-2007 9:26 PM
Hi,
Please try WRITE ... USING MASK statement.
Regards,
Ferry Lianto
10-09-2007 9:29 PM
10-09-2007 10:10 PM
Hi,
Please try this.
PARAMETERS PING TYPE P DECIMALS 3.
SET COUNTRY 'IN'.
WRITE PING .
Regards,
Ferry Lianto