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

Output Length

phil_moh
Participant
0 Likes
2,767

Hi,

In my SAB BW ->SE11 ->Domain ->RSKYFFLO, I have the following:

Data Type = FLTP

No. Char = 16

Dec. Place = 16

Output Length = 23

Is the total number of char display on output is only 23?? If yes, then what's the point for us to have 16 Char, 16 Decimal Place which is 32 char in total?

I also notice that when we store the value using FLTP, the value in the DB is always divide by 10. i.e. value is 1.5678

when I display this on the report, the value is 15.678, which is correct. Why it is store as 1.5678 in DB?

Please advise, thanks.

8 REPLIES 8
Read only

Sandra_Rossi
Active Contributor
2,505

It's not 32 char, it's 23 char.

If it's FLTP, ignore 16 (a dummy number to mean 16 significant digits, but it's not used by the system).

Floating point numbers, as in any other language, are "always" expressed with one digit before the decimal point by convention, and then the exponent after "E" which tells you where the decimal point really is.

1.5678E+1 means 15.678

1.5678E+4 means 15678

Read only

2,505
  • 1.5678E+0 means 1.5678
  • 1.5678E-2 means 0.015678
  • -1.5678E-1 means -0.15678
  • -1.5678E+10 means -15678000000
Read only

0 Likes
2,505

Thanks all, so it is something done automatically to store as following in the DB?

  • 1.5678E+0 means 1.5678
  • 1.5678E-2 means 0.015678
  • -1.5678E-1 means -0.15678
  • -1.5678E+10 means -1567800000

So it is not 32 Char, it only has total 23 Char that we can display on the output? In that case if I have bigger number, i.e. 2,535,786,553.38766234521, how can I achieve this?

I tried using above FLTP, I only got this on result output: 2,535,786,553.38766234 (I missing the last 3 digit 521).

Read only

0 Likes
2,505

Q1: you don't have to do anything special, it's done automatically.

Q2: yes it's 23 characters reserved in the output, see the minimum value (I have a little doubt because it should have one more digit which makes 24 characters):

-1.797693134862316E+308

Q3: as you can read in ABAP documentation, it says that FLTP has "accuracy of at least 15 places. 17 places are represented in ABAP". You want 21 significant digits (accuracy). You may use one of these 2 ABAP types: P which has up to 31 significant digits with a maximum of 14 digits after decimal point, or DECFLOAT34 which has 34 significant digits (exponent up to -/+6000). If you have the choice, I'd recommend P type because it's better integrated in database.

See ABAP doc for exact information.

Why do you need this precision?

Read only

0 Likes
2,505

In that case, if we can increase the Output Length to 32, the FLTP will support my requirement then, correct? How can I do that?

I need this because when I total all the transaction, the total value is 2,535,786,553.38766234521. Because of the 23 Output Length, I got only 2,535,786,553.38766234 (missing the last 3 digit 521).

Thanks.

Read only

0 Likes
2,505

No, the system cannot store more than around 16 significant digits, so it cannot display more than what is stored. If you increase the output length, it will only display blanks.

It's not because of the 23 output length that the number is truncated, it's because of storage in memory/in database.

Read only

0 Likes
2,505

hmm.. doesn't make sense.

When I try to create new Domain (Data Type DEC, No. Char 20, Decimal Places 10), and change the Output Length to 33, it says:

"Output Length (33) is greater than the calculated output length (24)"

Please help how can I achieve the Output Length more than 23 Char?

Thanks

Read only

0 Likes
2,505

What "doesn't make sense"?

By the way, type "P" is the ABAP type corresponding to DDIC types DEC, CURR, QUAN, as explained in the ABAP doc.

If you have a DDIC type DEC of length 20, it means total 20 digits maximum, including decimals, but you want 23. What you defined is 10 digits before decimal point and 10 digits after decimal point.