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

length for decimal type.

Former Member
0 Likes
10,516

hello All,

I have a requirement to create new table fields. I have some doubts if you can sort out for me.

they need a field of type decimal with 5 integer and 3 decimal places. what should be the lenght of such field.

similarly what would be the length of a field of integer part 8 and decimal 2 places.

can someone please explain how do v decide the length for decimal fields?

thanks and regards,

Reena

1 ACCEPTED SOLUTION
Read only

Former Member
4,497

Hi Reena,

In your case, you define it with DEC.

No of Characters = 8

Decimal places = 3.

This means the total length is 8, of which 3 is reserved for the decimal part.

YOU DONT HAVE TO CALCULATE FOR THE '.'

--> this is more or less your Question, I think.

Hope this helps.

Reward points if it solved your problem.

Rgds,

Prashanth.

SAP.

The Output length = 53 1(Fpr the decimal) = 8.

You have to declare as Length 5, Decimals3

similarly for integer part 8 and decimals2, the output length will be 11.

In the declaration in se11, click on Predefined Type button and give data type as QUAN the legth as 8 and decimals as 2.

Regards,

Ravi

5 REPLIES 5
Read only

Former Member
0 Likes
4,497

The Output length = 53 1(Fpr the decimal) = 8.

You have to declare as Length 5, Decimals3

similarly for integer part 8 and decimals2, the output length will be 11.

In the declaration in se11, click on Predefined Type button and give data type as QUAN the legth as 8 and decimals as 2.

Regards,

Ravi

Read only

0 Likes
4,497

thanks all for ur answers,

let me be specific. My particular doubt is when i create a new data element, there when i define it as built-in type and elementary, then what shud i input as length of the field for f1 with integer part as 5 and decimals is 3.??

shudnt it be 9? since 5 [integer] + 3[decimals] + point.

please clarify.

thanks and regards,

Reena

Read only

Former Member
0 Likes
4,497

Hi,

When you creating the table, just give the Field name and click the Buit-in type push button, after that give the data type as I and then give the Length and then give the Decimal places.

Regards

Sudheer

Read only

Former Member
0 Likes
4,497

Hi,

u can specify the same...field lenght as 5 and decimal as 3 seperately...the data type can u can mention as DEC.

regards,

madhu

Read only

Former Member
4,498

Hi Reena,

In your case, you define it with DEC.

No of Characters = 8

Decimal places = 3.

This means the total length is 8, of which 3 is reserved for the decimal part.

YOU DONT HAVE TO CALCULATE FOR THE '.'

--> this is more or less your Question, I think.

Hope this helps.

Reward points if it solved your problem.

Rgds,

Prashanth.

SAP.