on 01-22-2017 5:52 AM
CREATE TYPE SAPABAP1.TT_TEST AS TABLE (
MATERIAL NVARCHAR (000018),
ZSLAMT_GC DECIMAL (000017, 000002));
CREATE PROCEDURE SAPABAP1.SP_TEST
(
IN I_VIEW SAPABAP1.TT_TEST,
I_PERCENT DECIMAL (000017, 000002) ,
OUT E_VIEW SAPABAP1.TT_TEST
)
LANGUAGE SQLSCRIPT READS SQL DATA AS
BEGIN
E_VIEW = SELECT MATERIAL, AMOUNT * :i_PERCENT AS AMOUNT FROM :I_VIEW ;
END;
I am getting this warning
java.sql.SQLWarning: general warning: general warning: Type mismatch for table variable E_VIEW:Declared type "DECIMAL(17,2)" of attribute "AMOUNT" not same as assigned type "DECIMAL(35,4)" :line 12 col 3 (at pos 270)
How do I fix this type mismatch ?
PS : searching older SCN posts are so difficult and also to post questions
TO_DECIMAL(AMOUNT * :i_PERCENT, 17,2) AS AMOUNT
PS: I found that I can cast to decimal , but wondering that is there any other alternate way , as casting to decimal will slow down my query
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.