As part of the value conversion, it converts the whole number to an integer; depending on the scale this can exceed the overall number size beyond the supported length. The value supports upto 17 decimals (17 length) for the integer inserted and the scale determines the multiply by x to get the number.
For example,
4077232274536.00 > first adding the extra decimal places for the scale of 4 > 4077232274536.0000. Then converting to the full value (since Scale is 4, it multiplies by 10,000) > 40772322745360000 this brings it to 17 decimals.
The value is stored as above and as soon as it exceeds 16 in length; in an org without null measure handling enabled, it will fail with numeric overflow. With null measure handling enabled, it supports 17 decimal places at maximum.
NOTE :
To avoid overflow, calculate the maximum total digit length your data requires.
For a value of 4,077,232,274,536.00 with scale 4, the stored integer is 40,772,322,745,360,000 (17 digits) — at the maximum supported length.
Reduce scale to 2 or 3 to stay within limits.
005132522

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.