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

P Type

Former Member
0 Likes
960

Hi friends

q1]]] The type P has a valid size of 1 to 16 bytes,----


does this always include sign, for example when we write only one integer number (without decimal ) .?

also say:-

q2]]] two decimals are packed into 1 byte while the last one contains digit & a sign. It is also known that upto 14 digits are allowed after the decimal point. Does this mean that for 14 digits after the decimal point , we get 7 bytes & previous to the point we get 9 digits each for 1 byte of the remaining 9 bytes of 16 bytes as here it is not said that the occupancy is 2 digit per byte?

also :-

q3]]] n that 7 bytes wher is the place of the sign ?

regards

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
833

PL check this <a href="https://forums.sdn.sap.com/click.jspa?searchID=1220522&messageID=2760137">Thread</a>

~Suresh

3 REPLIES 3
Read only

suresh_datti
Active Contributor
0 Likes
834

PL check this <a href="https://forums.sdn.sap.com/click.jspa?searchID=1220522&messageID=2760137">Thread</a>

~Suresh

Read only

amit_khare
Active Contributor
0 Likes
833

Packed numbers - type P

Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and the number of digits after the decimal point. The valid size can be any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. Up to 14 digits are allowed after the decimal point. The initial value is zero. When working with type P data, it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.

You can use type P data for such values as distances, weights, amounts of money, and so on.

From Help.sap.com.

Regards,

Amit

Reward all helpful replies.

This is the link given by Suresh, it will open now.

Message was edited by:

Amit Khare

Read only

0 Likes
833

hi

the thread is not opening and the sap help litrature is the source of my doubt

pls clarify more

regards