Application Development 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: 

How to change the type P notation

Former Member
0 Kudos

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

9 REPLIES 9

Former Member
0 Kudos

Does the program attibutes have "fixed point arithmetic" checked?

Rob

0 Kudos

how can I check thta Rob ?

0 Kudos

From the ABAP editor screen:

Goto -> attributes.

Rob

Message was edited by:

Rob Burbank

0 Kudos

Yes Rob , I tried with bot checked and un-checked , the problem persists.

0 Kudos

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.

0 Kudos

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....

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try WRITE ... USING MASK statement.

Regards,

Ferry Lianto

Former Member
0 Kudos

This should be a very small code. Can you please post it here?

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this.


PARAMETERS PING TYPE P DECIMALS 3.
SET COUNTRY 'IN'.
WRITE PING .

Regards,

Ferry Lianto