Hi.,
You can use field length ., try like this.,
DATA: tmp(20) TYPE p DECIMALS 2,
shift TYPE i.
else create a data element with DEC or QUAN type with length and decimal what ever you required.
and assign tmp. to that data element., like
date tmp type zde_temp., " zde_temp is the data type which you created
hope this helps u.,
Thanks & Regards,
Kiran
Hello Ashish Kumar ,
Based on your requirement you can use the below mentioned SAP standard data types (both two decimals and 3 decimals with more than 17 digits before decimal) as the reference for your variables inside your program logic.
DEC23_2
OIUH_DEC18_2
OIUH_DEC22_2
/SDF/DEC30_3
hope this answers your question.
Thanks,
Greetson
Type p (packed decimal) is always stored in 8 bytes in the database. Therefore, you usually see usage field(15) type p decimals n, since the last bits are for the sign, and the decimal is, of course, implied and shown in the display based upon your definition of the p field. Considering that we can store two digits per byte, this gives us a maximum of 15 digits plus the sign in any p field.
Add comment