Application Development and Automation 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: 
Read only

data types

Former Member
0 Likes
697

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
Read only

Former Member
0 Likes
660

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.

Read only

Former Member
0 Likes
660

hi,

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

plz reward points if it helps rgds

Read only

varma_narayana
Active Contributor
0 Likes
660

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>

Read only

Former Member
0 Likes
660

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.

Read only

Former Member
0 Likes
660

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

Read only

Former Member
0 Likes
660

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.