Skip to Content
0
May 06, 2020 at 08:04 PM

Numeric Overflow [314] AMDP Procedure

814 Views Last edit May 16, 2020 at 07:14 PM 2 rev

Hi Experts,

HANA DB version 1.0

BW Version 7.4 SP16

Q1) Please clarify on the numeric overflow issue with the following case statement which is written in AMDP procedure in BW transformation.

FIELD3 NVARCHAR(4) - VALUE 003

FIELD2 DECIMAL(10,2) - 0

FIELD4 INTEGER - 0

CASE

WHEN FIELD1 = 2 THEN ( FIELD2 * FIELD3) / FIELD4

END AS FIELD5;

This code is giving 314 Numeric Overflow error and not Divide by 0. when i replace the code as below with values then also it is giving 314 error

CASE

WHEN FIELD1 = '2' THEN ( 0 * FIELD3) / 0

END AS FIELD5;

If I give the direct value of FIELD3 as 003 in calculation it is showing divide by zero.Something happening with FIELD3.

Please clarify why the code is behaving like this

Q2) In the above code how to explictly get the datatype of field5 ? We know that what ever the outcome of case statement that value will come into FIELD5, But please show a way to identify the datatype with help of script code or any other way.