Application Development 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: 

data types

Former Member
0 Kudos

Hello Friend,

Can anyone give the suggession for below issue.

data M(7) type p decimals 2 value '0*12345.66'.

write M.

error occurs is unable to interpret as number.

whether packed will allow the symbols like astrick.

good suggession will be rewarded.

6 REPLIES 6

Former Member
0 Kudos

Hello Purna,

You can not assign value with special characters to packed numbers.

you have to use dot.

Reward If Helpful

Regards

--

Sasidhar Reddy Matli.

Former Member
0 Kudos

hi,

u cant use the special character '*' in packed numbers thts why u r getting error.

plz reward points if it helps rgds

varma_narayana
Active Contributor
0 Kudos

Hi purna..

Type P is a Numeric field which can store Decimal values.

So it will not allow any other Characters.

<b>reward if Helpful</b>

Former Member
0 Kudos

Packed Number is a Built in ABAP type.

The valid length for packed numbers is between 1 and 16 bytes; two decimal places are packed into one byte, whereby the last byte only contains one place and the plus/minus sign;

After the decimal separator, up to 14 decimal places are permitted.

<b>

You cant use special characters such as '*' while storing a value in a variable of type P.</b>

Thanks,

Ankur

Reward if useful.

Former Member
0 Kudos

Hello purno,

U cannot store special character in type P.if u want to display it then declair it type STRING.

Reward me if helpful.please

Former Member
0 Kudos

hi,

packed, numeric wont allow special characters except . and _ symbols. u wanna display that then go for string or character data type and display.

if helpful reward some points.

with regards,

Suresh Aluri.